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

PR: Change optionsMap to a an array of tuples to be able to localize the options #8820

merged 2 commits into from Aug 12, 2020


Copy link

@goanpeca goanpeca commented Aug 12, 2020


Code changes


The optionsMap used in the KeySelector of the notebooktools has been renamed and restructured as an array of tuples, instead of an object.

These options are now localizable:


User-facing changes

The export as options on the File menu has been shortened to avoid redundancy. The text in the palette has changed from Export Notebook to {something} to Export Notebook: {something}, which makes translations work as it is not a full sentence but two parts that are translated independently. (that is why we need to make a harder sentence split with the :)





Backwards-incompatible changes

OptionsMap that use the localizable string as the key. The names of these var will be changed to break (and force) the correct usage.

KeySelector.IOptions.title is no longer optional. We should encourage devs to give displayable/localizable names.

KeySelector.IOptions.optionsMap -> KeySelector.IOptions.optionValueArray

Copy link

Thanks for making a pull request to JupyterLab!

To try out this branch on binder, follow this link: Binder

@blink1073 blink1073 added this to the 3.0 milestone Aug 12, 2020
Copy link

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


@blink1073 blink1073 merged commit ce1dd83 into jupyterlab:master Aug 12, 2020
@goanpeca goanpeca deleted the update-option-map branch August 12, 2020 15:42
@github-actions github-actions bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Feb 9, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
pkg:notebook status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. tag:i18n
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants