replace gettext and intltool with Babel#70
Merged
lazyfrosch merged 12 commits intognome-terminator:masterfrom May 17, 2020
Merged
replace gettext and intltool with Babel#70lazyfrosch merged 12 commits intognome-terminator:masterfrom
lazyfrosch merged 12 commits intognome-terminator:masterfrom
Conversation
grazzolini
approved these changes
May 11, 2020
JakubVanek
reviewed
May 11, 2020
lazyfrosch
requested changes
May 11, 2020
dmaphy
suggested changes
May 11, 2020
Member
|
I'm still fiddling around with it. |
Co-authored-by: Dominic Hopf <dmaphy@googlemail.com>
JakubVanek
reviewed
May 13, 2020
Member
|
@mattrose I refactored the code a bit, and added a general update command. |
This will update all catalogs with the template.
For now just i18n.
lazyfrosch
approved these changes
May 17, 2020
Member
lazyfrosch
left a comment
There was a problem hiding this comment.
I hope this is a good base for translation now
Member
|
Thanks @mattrose for your work! |
This was referenced May 17, 2020
Closed
Member
|
This will be reverted in #100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've managed to replace all of the gettext and intltool external dependency and replace it with the python babel library instead. It's actually much simpler as well, which is nice.
Notes:
To generate the
po/terminator.potyou can now just runpython setup.py extract_messages, I've replaced the contents ofpo/genpot.shwith the correct commandIt uses the same mechanism to generate the .mo files tied into the same
python setup.py buildcommand.The old
buildcommand would run a tool called "intltool-merge" that would merge all of the translated strings into thedata/terminator.desktopanddata/terminator.appdata.xml. The new version just pulls the translations out and uses the same localization machanisms as the python filesNotes for distributors: If your build environment is not able to run pip install or is otherwise detached from the net, you will need to add the babel library package explicitly to the BuildRequires section of the respective package. In fedora it's python3-babel.
I've run a few tests and make sure it all works but I would appreciate it if other people would take a look too. @lazyfrosch can merge it once he thinks it's ready.