-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Internationalization of kiwix-serve's backend #679
Commits on Apr 13, 2022
-
Configuration menu - View commit details
-
Copy full SHA for a18dd82 - Browse repository at this point
Copy the full SHA a18dd82View commit details -
Configuration menu - View commit details
-
Copy full SHA for c574735 - Browse repository at this point
Copy the full SHA c574735View commit details -
Configuration menu - View commit details
-
Copy full SHA for d029c2b - Browse repository at this point
Copy the full SHA d029c2bView commit details -
i18n data is kept in and generated from JSON files
Introduced a new resource compiler script kiwix-compile-i18n that processes i18n string data stored in JSON files and generates sorted C++ tables of string keys and values for all languages.
Configuration menu - View commit details
-
Copy full SHA for 507e111 - Browse repository at this point
Copy the full SHA 507e111View commit details -
User language control via userlang query param
This is a draft commit enabling the testing of the support for kiwix-serve internationalization.
Configuration menu - View commit details
-
Copy full SHA for e4a0a02 - Browse repository at this point
Copy the full SHA e4a0a02View commit details -
Configuration menu - View commit details
-
Copy full SHA for 577b6e2 - Browse repository at this point
Copy the full SHA 577b6e2View commit details -
URL-not-found message went into i18n JSON resource
Yet, the URL-not-found message is not yet fully internationalized since its usage is hardcoded to English.
Configuration menu - View commit details
-
Copy full SHA for 202ec81 - Browse repository at this point
Copy the full SHA 202ec81View commit details -
Configuration menu - View commit details
-
Copy full SHA for 387f977 - Browse repository at this point
Copy the full SHA 387f977View commit details -
Configuration menu - View commit details
-
Copy full SHA for b2526c7 - Browse repository at this point
Copy the full SHA b2526c7View commit details -
Localized "No such book" 404 message for /random
However the title and the heading of the 404 page are not localized yet.
Configuration menu - View commit details
-
Copy full SHA for cb5ae01 - Browse repository at this point
Copy the full SHA cb5ae01View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ace162 - Browse repository at this point
Copy the full SHA 1ace162View commit details -
Configuration menu - View commit details
-
Copy full SHA for 52d4f73 - Browse repository at this point
Copy the full SHA 52d4f73View commit details -
Configuration menu - View commit details
-
Copy full SHA for ca7e0fb - Browse repository at this point
Copy the full SHA ca7e0fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7793826 - Browse repository at this point
Copy the full SHA 7793826View commit details -
Configuration menu - View commit details
-
Copy full SHA for d2c864b - Browse repository at this point
Copy the full SHA d2c864bView commit details -
Configuration menu - View commit details
-
Copy full SHA for fbd23a8 - Browse repository at this point
Copy the full SHA fbd23a8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6f3db20 - Browse repository at this point
Copy the full SHA 6f3db20View commit details -
"Go to welcome page" in taskbar isn't translated
The (failing) tests now demonstrate that some text in the taskbar is not translated. Will fix in the next commit.
Configuration menu - View commit details
-
Copy full SHA for 901664b - Browse repository at this point
Copy the full SHA 901664bView commit details -
Configuration menu - View commit details
-
Copy full SHA for c2bfeb4 - Browse repository at this point
Copy the full SHA c2bfeb4View commit details -
Configuration menu - View commit details
-
Copy full SHA for f73be3c - Browse repository at this point
Copy the full SHA f73be3cView commit details -
Testing the translation of "Go to the main page"
The new test fails since the "Go to the main page" button is not yet internationalized.
Configuration menu - View commit details
-
Copy full SHA for ed7717c - Browse repository at this point
Copy the full SHA ed7717cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3da81a3 - Browse repository at this point
Copy the full SHA 3da81a3View commit details -
Testing the translation of "Go to random page"
The new test fails since the "Go to random page" button is not yet internationalized.
Configuration menu - View commit details
-
Copy full SHA for 527a606 - Browse repository at this point
Copy the full SHA 527a606View commit details -
Internationalized "Go to a randomly selected page"
At this point a potential issue has been revealed. Now we produce the final HTML via 2-level template expansion 1. Render parameterized messages 2. Render the HTML template In which templates we should use double mustache "{{}}" (HTML-escaping) tags and where we may use triple mustache "{{{}}}" (non-escaping) tags?
Configuration menu - View commit details
-
Copy full SHA for 11be821 - Browse repository at this point
Copy the full SHA 11be821View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5052d40 - Browse repository at this point
Copy the full SHA 5052d40View commit details -
Configuration menu - View commit details
-
Copy full SHA for a0d9a82 - Browse repository at this point
Copy the full SHA a0d9a82View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9987fbd - Browse repository at this point
Copy the full SHA 9987fbdView commit details -
Preliminary support for Accept-Language: header
In the absence of the "userlang" query parameter in the URL, the value of the "Accept-Language" header is used. However, it is assumed that "Accept-Language" specifies a single language (rather than a comma separated list of languages possibly weighted with quality values). Example: Accept-Language: fr // should work Accept-Language: fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5 // The requested language will be considered to be // "fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5". // The i18n code will fail to find resources for such a language // and will use the default "en" instead.
Configuration menu - View commit details
-
Copy full SHA for 927c125 - Browse repository at this point
Copy the full SHA 927c125View commit details