jupyter-book / jupyterlab-myst

Use MyST Markdown directly in Jupyter Lab
https://jupyter-book.github.io/jupyterlab-myst/
BSD 3-Clause "New" or "Revised" License
146 stars 18 forks source link

Internationalization #58

Open nthiery opened 1 year ago

nthiery commented 1 year ago

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"

Tasks and updates

welcome[bot] commented 1 year ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
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! :tada:

nthiery commented 1 year ago

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

agoose77 commented 1 year ago

@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 commented 1 year ago

https://github.com/executablebooks/myst-spec/issues/52