-
Notifications
You must be signed in to change notification settings - Fork 23
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 i18n to RStudio (initial elaboration and work) #149
Comments
The i18n of Rstudio can only be partial. It seems the menus/text are still in English, but the inside (the text, and the error messages) are able to be in French, if one changes the Environment variable to French This is the code to add the French Locale and set it.
The next step is to find how to detect the language, and in runtime set the environment variable. |
To have R-studio in ‘French’ it needs
R-Studio (image) only needs LANG. |
From what I gathered, the way to have environment variables would be through the PodDefault (see https://www.kubeflow.org/docs/notebooks/setup/ step 12) |
The short answer for this issue, is to have the Environment variable LANG set to the wanted language. For this to work, the locale for that language needs to also be available (ex: fr_CA.UTF-8). |
This issue is split in two part,
Note: The locales are now added as part of the Dockerfile, see https://github.com/StatCan/kubeflow-containers/blob/d2b7863936af5e42ae2d4f342d1524887c1703db/docker-bits/0_Spark.Dockerfile#L8 Some other components in kubeflow-container may need to do similar things. i18n might be related to LANG, LANGUAGE and LC_ALL env variables. |
Started work on internationalizing the menus and commands. Command names/labels are defined by XML in |
The commands defined in the
The generation of code for these classes is called for in
This process invokes To internationalize this, we must:
I have successfully modified the generators to use i18n with a hard-coded interface file, but I'm not sure yet how best to automatically generate the constants interface or the properties files. Big questions are how to invoke GWT's generation mechanism properly and where they're placed once they're generated. (note: this describes commands, but I think other things are similarly generated using this file (shortcuts, others)) |
As discussed here, JSON user prefs and state are built from a JSON schema file. This schema/resulting files is used in various locations in the UI (e.g. the Options dialog, the Command Palette) and needs to be translated as well. The developer flow around changing these is to:
Maybe I should update this workflow to output files for multiple languages(?). We could build translatable files from the default language version, and maybe use a Need to look into what content the |
Easiest way forward appears to be handling building of the interface/property files for any metadata file translation (eg: XML/JSON files) the same way as the project currently uses the JSON file to build the actual user properties. We will add scripts that translate the XML/JSON files to interface/property files, using the English text in the XML/JSON files to seed the default text in the interface and English version of the property files. The property files can then be translated as needed. Typical development flow would then be:
|
Update of progress/general work summary documented here: ca-scribner/rstudio#1 (comment) 11000 new lines and counting in the PR haha. Although a lot of that is automatically generated through scripts |
Brief summary of progress:
Next steps:
Big outstanding items:
|
Refactoring this into an epic tracked by Statcan/daaas/510. Closing this issue to claim the work already completed (fleshing out the task, doing some of the updates, etc). Future work will be tracked in separate issues |
Look into Bilungualism options for RStudio
The text was updated successfully, but these errors were encountered: