-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Use the application name instead of hard-coded "JupyterLab" in dialogs/commands #16230
Conversation
Thanks for making a pull request to jupyterlab! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to look at the rest of the file, I think 2 other places in this file would need translation.
body: trans.__('Please confirm you want to shut down JupyterLab.'), | ||
body: trans.__( | ||
'Please confirm you want to shut down ' + app.name + '.' | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to look into the rest of the codebase how translation is done. Typically you do not want to concatenate strings. For example in japanese, that would be: JupyterLab をシャットダウンすることを確認してください。
or something like that, where JupyterLab is not at the end, and the ends dot is not .
but 。
.
For example :
packages/notebook-extension/src/index.ts: body: trans.__('Are you sure you want to close "%1"?', fileName),
This let the translater chose where the variable goes in the translation.
If you look line 372, just above there is also a caption: trans.__('Shut down JupyterLab'),
, this could also be updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 thank you for reviewing this!
For reference: https://jupyterlab.readthedocs.io/en/stable/extension/internationalization.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the feedback! Making the changes now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @sawickid, kooks good to me.
…s/commands (jupyterlab#16230) * updated shutdown dialogue to display app.name * fixed style * updated strings to conform with translation standards * style fix * Remove extra quotes --------- Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
References
jupyter/notebook#7188
"File > Shutdown in classic notebook ask if I want to shutdow JupyterLab"
Code changes
Edits shutdown dialogue body to ask if the user wants to shutdown <app.name>, instead of exclusively 'JupyterLab'
User will be prompted to confirm shutdown of Jupyter Notebook, instead of JupyterLab, when using Jupyter Notebook