Internationalization help: Re: python string format

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Internationalization help: Re: python string format

Dave; we appreciate the work you are doing, so please keep asking questions.
I don’t think my Github account has ability to do a Pull Request.  I will, however, Edit my local gramps.pot file, then submit it as a bug report along with the source module and line number from the comments above the msgid, as you suggested.


Basically any conversion forms:

·        %(text)o where o represents a single conversion op-code such as i, d or s, will be merely transformed to {text}

·        Any more complex op-code (such as x, X, or using width, flags, or others special specifiers) will be just annotated with a [TODO] flag.


I do have, however, a non-related question (not a formatting issue) concerning translation of special strings, such as ‘_Person Filter’, ‘_Proceed with the tool’, ‘G_roup as’. 

·        Are these ‘_’ marks of shortcut navigation keys?  Should any word that contains the ‘_’ be left alone as IS? 

The '_' does indicate that the following character is a navigation key.  You should translate the message, but you should also try to figure out a suitable character in the newly translated message to use for a navigation key.  To do this will probably require you to look into the part of Gramps that the message is part of and make sure you don't pick shortcut keys that conflict with each other.   For most dialogs, there are only a few such keys.  The Gramps main window with its sub-menus will require a bit more care.  You might want to do these one dialog at a time, so you don't lose track of what you have done.  Again the source module can be used to search for other messages potentially relating to the dialog.  It will help if you have Gramps open, maybe using the English messages from the running Gramps to help do these together.

·        Should the rest of the words such as the above ‘Filter’, ‘with the tool’, ‘as’ be translated to the target language, but kept only after(?) the key words?  Or can their position relative to the keyword change, if needed?  In my native language, positional changes are often important.

You should make the translation make sense; so I would NOT mix English and your language unless there is no appropriate translation and users in your language can figure out what is meant.   Changing word positions within a phase is certainly allowed, although if the phase has format parameters you have to be careful.  I recommend looking over
to cover some of the more subtle aspects of translation.

Be aware that I am probably not the best person to advise you on this as I am American (only English, well, the Texas variant of American English) and accordingly I have actually never done any translation work.  Hopefully one of our more experienced multi-lingual developers can join this conversation.

Paul C.

Check out the vibrant tech community on one of the world's most
engaging tech sites,!
Gramps-devel mailing list
[hidden email]