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

Translate settings schema #205

Merged
merged 1 commit into from
Sep 6, 2021

Conversation

fcollonval
Copy link
Member

@fcollonval fcollonval commented Sep 6, 2021

References

Fixes jupyterlab/jupyterlab#10414
Fixes jupyterlab/jupyterlab-translate#1
Closes jupyterlab/jupyterlab#10752

Before After
image image

Code changes

The settings schemas are translated on the backend side before served to the frontend.

The code of the handlers was refactored.
The translation handler is now conditionned on the existence of settings configuration as they hold the locale source of thruth.

User changes

Settings translatable strings are displayed translated; in particular title and description in the setting editor.

Backward incompatible

N/A

@codecov-commenter
Copy link

codecov-commenter commented Sep 6, 2021

Codecov Report

Merging #205 (f4090eb) into master (900ee8a) will decrease coverage by 0.66%.
The diff coverage is 79.06%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #205      +/-   ##
==========================================
- Coverage   77.97%   77.30%   -0.67%     
==========================================
  Files          27       28       +1     
  Lines        1998     2058      +60     
==========================================
+ Hits         1558     1591      +33     
- Misses        440      467      +27     
Impacted Files Coverage Δ
jupyterlab_server/translation_utils.py 75.60% <50.87%> (-7.08%) ⬇️
jupyterlab_server/settings_utils.py 85.22% <85.22%> (ø)
jupyterlab_server/handlers.py 87.82% <100.00%> (ø)
jupyterlab_server/settings_handler.py 87.50% <100.00%> (+2.43%) ⬆️
jupyterlab_server/translations_handler.py 92.30% <100.00%> (+0.64%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 900ee8a...f4090eb. Read the comment docs.

@fcollonval fcollonval added this to the 2.7 milestone Sep 6, 2021
Copy link
Contributor

@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.

Thank you!

@blink1073 blink1073 merged commit 407a8e9 into jupyterlab:master Sep 6, 2021
@blink1073
Copy link
Contributor

I'll cut this release tomorrow

@krassowski
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Translation of settings Add more explicit sources of strings
4 participants