-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Default UI language is resolved in the frontend #1044
Default UI language is resolved in the frontend #1044
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1044 +/- ##
=======================================
Coverage 39.34% 39.35%
=======================================
Files 58 58
Lines 4061 4060 -1
Branches 2237 2236 -1
=======================================
Hits 1598 1598
Misses 1091 1091
+ Partials 1372 1371 -1 ☔ View full report in Codecov by Sentry. |
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.
+1 on @mgautierfr's feedback
Reminder to myself - translatewiki PR #1033 has been merged, so |
Please rebase-fixup. |
... so that extra info about the count of translated strings can be added. Note that due to increased size skin/languages.js lost its too-small-to-be-worth-compressing status.
Note that static/skin/languages.js must be generated/updated manually by running the static/generate_i18n_resources_list.py script. Previously it had to be done only when new languages were added. Now the translation counts will also need to be updated when new entries are added to static/skin/i18n/en.json or upon merging a few translatewiki PRs.
This change eliminates any need for defaultUserLanguage in viewer_settings.js.
026a55a
to
c697611
Compare
Done |
@mgautierfr Done |
Fixes #1038
Fixes #1039
This change makes the viewer resolve the default UI language in the front end, without any dependence on the backend's handling of the
Accept-Language
header. Yet, the latter has not been removed since it is currently used in the following scenarios:/nojs
endpoint/invalid_endpoint
, or any other invalid kiwix-serve URL directly loaded in the browser rather than via the Kiwix JS viewer).