StatCan / kubeflow-containers-desktop

Experimental containers to be used with Kubeflow for a Desktop experience
Other
1 stars 2 forks source link

Add i18n to non-jupyter native widgets. #51

Closed Jose-Matsuda closed 3 years ago

Jose-Matsuda commented 3 years ago

Motivated by #48 and Brendan to add some separation and have the issue titles be more reflective of what was actually changed. There are some non native jupyter widgets coming from ml-workspace that do not get translated. These are pictured below image The values under Open Tool are from when I was toying around with it and their values come from the .workspace/tools directories json files. image This Commit and Push notebook as well as the widget directly to the right of "Share Notebook" and largely come from the js files in tooling-extension/jupyter_tooling

The way I've been thinking of handling this issue is simple. For the Open Tool we just add another field of "descriptionfr". For the other widgets / translatable areas we have two JSON files of English and French and we just load those files in depending on which language the browser is in. From there we just access the values.

All in all there are around 20 sentences of varying lengths (usually short) that need to be translated.

Jose-Matsuda commented 3 years ago

@ca-scribner Wanted to discuss the Open Tool dropdown in the first picture above. This exists because the ml-workspace does not appear to have a landing page like ours does. In that video I pulled the latest image, and then just went to localhost:8080 as instructed in the readme and bam it's that. So it seems to act like a 'portal' because there is no portal normally so it seems almost redundant to have (almost because it could be said that the user wants to go to this Jupyter instance and then find out they also want to run vscode or something). Having said that, this dropdown is so much easier to try and localize than from what I mention below regarding "git" and the pop-ups associated with them.

As an aside, I also think I know why the "git" button does not work. When you try to use the git widget in the original ml-workspace, it opens up a tab with ungit which we currently do not have installed / up and running on ours. This is even reflected in an error message when you try and use the git function in an opened notebook image I currently don't have an estimate on how long it takes to fix that functionality.

Jose-Matsuda commented 3 years ago

Important Update

These non-native jupyter widgets are to be deleted. They came from ml-workspace and are shown in the picture below surrounded by red brackets. image (Open Tool, Git, and Share notebook (this is FileBrowser functionality which is also being removed)

Note that an up to date git on the desktop command line is still wanted