Translating Gramps using Weblate

From Gramps
Revision as of 20:23, 28 June 2021 by Nick H (talk | contribs)
Jump to: navigation, search

As of Gramps 5.2.x, Hosted Weblate for translations.

Translators are advised to read the Weblate documentation.

Creating an account

Registration is easy - just click on Register.

The E-mail and Full name fields are used to credit your contributions.

You need to be signed in to translate, otherwise you can only make suggestions.

Starting a new translation

If your language is not currently translated, you can request that it be added. Navigate to the "gramps" component and select the Tools -> Start new translation menu option.

Select your language, and then click the "Request new translation" button. Further details can be found in the documentation.

A request will be sent to the administrator.

Workflow

Any authenticated user can edit translations. Changes are automatically submitted as a pull request to the Gramps GitHub repository. This can take 24 hours since Weblate attempts to group changes from the same author in a process called "lazy commits".

Some translators have been designated as reviewers. A list of reviewers can be found on the Translators Portal page.

A reviewer an approve translations. After a translation has been approved, it can only be changed by a reviewer or administrator, although any user can still make suggestions.

Bulk edit

It is possible to bulk edit translations. This can be useful if a reviewer wants to approve all translations that they have previously translated and are happy with.

The bulk edit toll can be found under the Tools -> Bulk edit menu option. This may not be available to all users.

Offline translation

Some translators prefer to work offline. In this case, downloading and uploading translations provides an option for a translator to use their favourite translation software.

  • Download the .po file using the Files -> Download translation menu option.
  • Use GTtranslator (GNOME, windows), KBabel (KDE), Lokalize (KDE, windows), Emacs po-mode, Virtaal (GNU/Linux, Mac, windows), poedit (GNU/Linux, OSX, windows), or any similar tool designed for translating .po files. If you do not like any of these tools, you can use any text editor to translate messages. If using vim, properly setting the "langmap" option will significantly speed up your work.
  • If possible, when you are finished translating, go to File -> Save as... to generate a .mo file to syntax check your work. Under poedit, there is an option to always compile a .mo file when saving changes by clicking File -> Preferences and on the Editor tab check the Automatically compile .mo file on save box. A dialog will warn you if there is a syntax error in your .po file. Lokalize and GTranslator also provide a syntax check when saving. Please enable this feature to avoid errors in the compilation process.
  • Upload the .po file using the Files -> Upload translation menu option.

Testing

  • Download the .mo file using the Files -> Customize download menu option. Select a "gettext MO" quick download containing all strings.
  • Rename the download to gramps.mo
  • Locate the translations directory. It will be something like /usr/share/locale/{lang}/LC_MESSAGES, with {lang} being your language.
  • Copy the gramps.mo file into the translations sirectory after making a backup of the original.

Translation issues

General guidance

  • Take heed with special characters. You must have the same number of and types as the original string.
  • Verify spelling and grammar on your translation.
  • Don't translate "too freely". Your translation should be as close match to the original as possible.
  • Be consistent with your translations. If you decide on a specific word/phrase for something, stick to that throughout the translation.

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.

Gramps terminology

There are terms with special significance in computer software. The terms are often creatively awkward constructs in English... just so the term is more unique and stands out in a sentence. Translating the words literally or substituting a translation of the underlying concept may not be workable. It may be necessary to become creative and substitute a similarly awkward (and short!) label in your target language.

The labels of some Gramps core concepts or interface elements hold that higher level of significance. These must be translated consistently between the User Interface and the Wiki. (Inconsistent translations will confuse the users.)

Example: The Active Person in Gramps is not a person with a healthy amount of vigorous physical exercise. Instead, it is the record from the People Category that is the focal center of reference for display & change. Neither would translate into a memorable label.

The Gramps Glossary is a good resource for understanding the context and significance of such terms. If you translate the Glossary and then alphabetize the translated terms, also leave an ID SPAN with the untranslated English term. This allows hotlinks from untranslated pages to work in unison with translated hotlinks.

If it becomes necessary to be creative translating a term, please add a language specific reference page for your language. This helps other Translators share your style of creativity.

LDS terminology

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.

  1. 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
  2. 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:

  1. LDS Ordinance names:
    • Sealed to Parents
    • Sealed to Spouse
    • LDS Baptism
    • Endowment
  2. LDS Status names for Ordinances:
    • Child
    • Cleared
    • Completed
    • Infant
    • Pre-1970
    • Qualified
    • Stillborn
    • Submitted
    • Uncleared
    • BIC (Born In the Covenant)
    • DNS (Do Not Submit)
    • Canceled
    • DNS/CAN (Do Not Submit/Previous sealing cancelled)