-
-
Notifications
You must be signed in to change notification settings - Fork 385
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
PICARD-2690: move const translations #2291
PICARD-2690: move const translations #2291
Conversation
48161a6
to
b153ad2
Compare
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.
Very needed move +1
b153ad2
to
f08e791
Compare
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.
It will ease translations for sure, good move.
dd04322
to
8428a17
Compare
This most prominently moves translations of dropdown lists for locales and writing systems into a separate component, making it easier to translate the main UI texts.
8428a17
to
cc7439e
Compare
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.
I don't think I have anything to add. It looks good to me.
Summary
Problem
The
picard.const
module contains longs lists, most specifically for locales and written scripts.This makes translating much harder, as half the strings to translate are from these lists, but they are essentially only used for very few UI elements.
Also it makes it difficult to assess how complete a translation of Picard is. A translations that translates all the UI texts except for the locale list has a low completion percentage on Weblate, but actually it is a very complete translation. Likewise a translation that solely translates the locales list shows with the same or higher completion, but actually the application can hardly be described as being localized.
Solution
Move translations of the strings in
picard.const
into a separate gettext message domain "picard-constants".I originally planned to move only the locales there, but with Babel it is easier to handle it by excluding a folder. And actually I think that fits well, as it also includes the scripts. Likewise I think it is no mistake to include the values in
picard/const/__init__.py
as well.There is a new setup command
picard_regen_constants_pot_file
. We could also include a single meta command to update both, but for now I wanted to keep it separate (see below).Action
Of course we should keep existing translations. My plan was as follows:
picard.pot
(removing the strings from it)picard.pot
andconstants/constants.pot
with a single command