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
Replace gettext with tinygettext #6411
Conversation
Assigned to Nordfriese |
Mirrored from Codeberg I think it would be better handled similar to asio when not packaged, ie. have a script to check a tested commit out into Why all the new |
Mirrored from Codeberg It doesn't seem to get a lot of commits: The |
Mirrored from Codeberg Thanks for the review :) <@>bunnybot merge |
Mirrored from Codeberg Yes, bunnbot is clearly a little confused about the review state here… <@>bunnybot merge force |
Co-authored-by: Benedikt Straub <[email protected]> Co-committed-by: Benedikt Straub <[email protected]>
Mirrored from Codeberg
Created on Thu Mar 14 13:41:47 CET 2024 by Benedikt Straub (Nordfriese)
Type of change
Refactoring
Issue(s) closed
Fixes #4978
Fixes #6450
How it works
Embed tinygettext to replace gettext.
Language changes are now applied immediately. We do not mess with any environment variables, except to read
LANG
and/orLANGUAGE
once at startup to find out the platform's system language.This removes the dependencies on gettext and libintl. We still need xgettext to build the catalogues in the automated workflow and that's it.
Tinygettext reads the PO files directly, so I have moved them all into the data/i18n directory. I hope I updated all occurrences and that builds will still work.
Tinygettext can not use MO files. Therefore, add-on translations are broken until I make a branch for the server to serve us the raw PO files instead of precompiled MO files. (Which I will do after this branch has been merged.)
Since translations no longer need to be compiled, I removed the
-DOPTION_BUILD_TRANSLATIONS
option.Since the diff is a bit cluttered by the many renamings and the new module, I recommend reviewing this commit by commit.
Possible regressions
Strings not being translated correctly
The translation maintenance scripts