Tips for translators of the GRAMPS program.
- 1 Tips for translators
- 2 Hard to Translate Phrases
- 3 Updating your translation
- 4 Advanced issues
Tips for translators
Translating GRAMPS into a new language means translating English strings used in the GRAMPS interface. To put it shortly, this amounts to
- obtaining the gramps.pot file with the strings to be translated,
- translating the strings in the template, and
- getting the translated file uploaded into gramps SVN repository.
Another avenue of translation is translating the documentation. This is a different and lengthy process and it is decribed in our Translating the manual page. Here we will concentrate on the interface translation only.
gramps.potfrom GRAMPS SVN repository, see the introduction to SVN.
- Look for
gramps.potin the directory
gramps.potto the file named
lang.po, according to the language you are translating into (
ru.pofor Russian, etc.)
- Use GTtranslator, KBabel, Emacs po-mode, or any similar tool designed for translating
.pofiles. If you do not like any of these tools, you can use any text editor to translate messages.
- Even though GRAMPS uses UNICODE (UTF-8) for its character set, you may use your native character set for your translation. Just make sure you specify the character set you are using in the
Content-Typeline in the
.pofile. GRAMPS will handle the conversion to UNICODE.
- Currently, formatting is performed during build time, so you should not have to worry about it. The translated
.pofile is the product of your work. Check it into SVN if you obtained the permission to do so, or email it to Don Allingham or Alex Roitman otherwise.
Hard to Translate Phrases
Some things are just hard to translate. Below are a few of the more difficult items, along with some suggestions on how to handle them.
The Church of Jesus Christ of Latter Day Saints (a.k.a. Mormons) maintains a lot of genealogy data. In the United States, they are probably the non-government organization with the most detailed records available. Genealogical research is important to the Mormon church. They are responsible for defining the GEDCOM format.
The LDS Church has some specific terminology that can present difficulty in translating. There are two approaches to handling the information.
- If the LDS Church has a presence in your country, contact the LDS Temple in your area and ask them what the correct terminology is in your native language
- If the LDS Church does not have a presence in your country, it would probably be safe to simply not translate the phrases.
These terms include:
- LDS Ordinance names:
- Sealed to Parents
- Sealed to Spouse
- LDS Baptism
- LDS Status names for Ordinances:
Updating your translation
If you have submitted a translation, changes are that after some weeks/months, new strings are added to GRAMPS, implying you need to update your translation file.
Assuming you have obtained originally the GRAMPS source tree as explained in Brief introduction to SVN. Now:
- Update your gramps tree from SVN. This can be done by executing the command
svn upfrom the root GRAMPS svn directory. This will download an updated
- Use your outdated translation to translate the strings that did not change:
msgmerge --no-wrap lang.po template.po -o newlang.powhere
lang</lang> is your language code. The
--no-wrapoption will prevent changes due to automatic word wrapping. You need it only if want more readable SVN diffs.
- Translate all untranslated messages in
newlang.po. When you are sure everything is right, rename
lang.poand check it into SVN as you did with the original file.
- If command
msgmergeis not available on your system, you have to install the
Format line parameters
Format line parameters such as %s and %d should not be translated. The order of these parameters should not be changed. Examples:
English: Long widowhood: %s was a widow %d years.
Translation (using Backward English as an example :-): Gnol doohwodiw: %s saw a wodiw %d sraey.
Named format line parameters such as %(something)s and %(something)d also should not be translated. Feel free to change the order of named parameters to correctly phrase the message in your language. Also, use hints provided by the names. Examples:
English: Baptized before birth: %(male_name)s born %(byear)d, baptized %(bapyear)d.
Translation into Backward English: Dezitpab erofeb htrib: %(byear)d nrob %(male_name)s, dezitpab %(bapyear)d.
In the above example, the verb "born" should be in masculine form (if verbs in your language have gender, that is), since the person born is apparently a male.
In some cases, two different concepts can be expressed by the same word in English and yet require different translations. For example, the title of the book' and the nobility title of the person are expressed by the same Title word. However, in other languages different words are needed to describe the book title and the person's title.
To mitigate such problems, a context can be added to the translation string. A context-enabled string has a vertical line separating the context from the string:
The correct translation should not include either the context or the separator. The context is to give the translator idea of what the string means. However, both the context and the separator must not be in the translated string, so in backward english the above is translated into
Translating relationships is not done within the
.pofiles, except for occasional
motherstrings here and there in the interfaces and reports. Complete translation of all relationships for the language/culture is done inside a relationship calculator plugin.
In short, the need for a plugin comes from the impossibility to translate "first cousin twice removed" in languages such as, e.g., German or Russian. See the Relationship Calculator page for details on why and how to create such a plugin.