-
Notifications
You must be signed in to change notification settings - Fork 945
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
Add support for localization to the lab extension #3286
Conversation
This can be backported to 7.x. |
This mostly looks good to me, but to make sure I understand: If a translator wanted to add an entry for this, would they add the entry to the same language pack that JupyterLab uses? How would the versioning of our keys compare to that of JupyterLab? I.e. if we change something, how will we ensure compatibility between an old ipywidgets version and new lab and/or new ipywidgets and old lab? |
Since Also this is only for the lab extension and should be independent of the main I've just opened jupyterlab/language-packs#109 to add |
Different translation file, the same language pack (may change in the future).
Language packs will retain old translation strings for some time (we didn't decide on how long for extensions, but for JupyterLab as long as old versions are supported). This is tracked in jupyterlab/language-packs#43. I saw @fcollonval implement some of that in jupyterlab/jupyterlab-translate#9 but I think we are not confident that it all works on integration level just yet? |
Yep for now the merge of source strings is working. But there is no information about the version from which the strings are coming. So there is no easy way to handle the lifecycle of the source strings for extensions in the JupyterLab language packs. |
Thanks for answering Vidar's question. Since this seems like the best we can do, I think we ought to go forward. Thanks! |
At the moment the "Save Widget State Automatically" command label is not translated when using JupyterLab in a different display language, in the following case in French:
This PR adds an optional
ITranslator
to the lab plugin to handle this.We also use a custom
jupyterlab_widgets
domain since the extension lives outside of the core JupyterLab repo right now.