Skip to content

replace gettext and intltool with Babel#70

Merged
lazyfrosch merged 12 commits intognome-terminator:masterfrom
mattrose:13-gettext
May 17, 2020
Merged

replace gettext and intltool with Babel#70
lazyfrosch merged 12 commits intognome-terminator:masterfrom
mattrose:13-gettext

Conversation

@mattrose
Copy link
Copy Markdown
Member

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.pot you can now just run python setup.py extract_messages, I've replaced the contents of po/genpot.sh with the correct command
It uses the same mechanism to generate the .mo files tied into the same python setup.py build command.

The old build command would run a tool called "intltool-merge" that would merge all of the translated strings into the data/terminator.desktop and data/terminator.appdata.xml. The new version just pulls the translations out and uses the same localization machanisms as the python files

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

@mattrose mattrose linked an issue May 11, 2020 that may be closed by this pull request
@lazyfrosch
Copy link
Copy Markdown
Member

I'm still fiddling around with it.

@lazyfrosch lazyfrosch added enhancement New feature or request i18n Translation related issues labels May 17, 2020
@lazyfrosch lazyfrosch added this to the 2.0 milestone May 17, 2020
@mattrose mattrose requested a review from lazyfrosch May 17, 2020 15:34
@lazyfrosch
Copy link
Copy Markdown
Member

@mattrose I refactored the code a bit, and added a general update command.

Copy link
Copy Markdown
Member

@lazyfrosch lazyfrosch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope this is a good base for translation now

@lazyfrosch lazyfrosch merged commit ec2d50c into gnome-terminator:master May 17, 2020
@lazyfrosch
Copy link
Copy Markdown
Member

Thanks @mattrose for your work!

@lazyfrosch lazyfrosch added invalid This doesn't seem right and removed enhancement New feature or request i18n Translation related issues labels May 19, 2020
@lazyfrosch
Copy link
Copy Markdown
Member

This will be reverted in #100

@lazyfrosch lazyfrosch removed this from the 2.0 milestone May 19, 2020
@mattrose mattrose deleted the 13-gettext branch September 4, 2023 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve gettext integration

5 participants