Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internationalization #58

Open
4 tasks
nthiery opened this issue Jan 11, 2023 · 4 comments
Open
4 tasks

Internationalization #58

nthiery opened this issue Jan 11, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@nthiery
Copy link

nthiery commented Jan 11, 2023

Context

For course material in French, we are using extensively Jupyter notebooks
in Myst-Markdown, rendered in JupyterLab for interactive use and Jupyter-Book
for browsing on the web. Myst features like admonitions are great to structure
the content; now that they are available in JupyterLab, we will start using them
extensively.

There remains one caveat:

:::{warning} ...
...
:::

is rendered in JupyterLab with an English title "Warning" instead of the
desirable "Avertissement" displayed in Jupyter-Book.

Proposal

It would be desirable for the rendering of myst features to use the language of the document.

Caveat: define "the language of the document"

  • In the context of a jupyter book, it would be consistent to use the language
    set in the jupyter book configuration.
  • If nothing else: using the language of the JupyterLab interface?

Tasks and updates

  • enable internationalization
  • reuse existing translations (e.g. from JupyterBook and its dependencies)
  • define a logic for setting the language
  • implement that logic
@nthiery nthiery added the enhancement New feature or request label Jan 11, 2023
@welcome
Copy link

welcome bot commented Jan 11, 2023

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

@nthiery
Copy link
Author

nthiery commented Jan 11, 2023

Quick discussion here https://github.com/orgs/executablebooks/discussions/912#discussioncomment-4651002
Happy to help with the beta testing.

@agoose77
Copy link
Collaborator

@rowanc1 there are two ways to account for the existing user configuration:

  1. A server extension; this has all the config-finding business logic, and provides REST endpoints for jupyterlab-myst to consume
  2. Directly using JupyterLab's contents API (GET /api/contents/_config.yml) and parsing it in the frontend.

I don't yet have a feel for which option is best. I think (2) is less work, but would require some assumptions e.g. the root content directory for JupyterLab must be the book directory. (1) would let the user define which configuration to use at startup e.g. jupyter lab --MyST.config_file=./_config.yml

We would also want the ability to define the relevant configuration directly in JupyterLab i.e. as settings rather than as an on-disk file.

@chrisjsewell
Copy link

jupyter-book/myst-spec#52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants