This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

1. Documentation

1.1. Translation contexts

Moved to Translation contexts of L10N Guidelines for Developers.

Translators: If you encounter any msgid that contains a '|' in a Gnome project, then the part before the '|' is a comment and your translation should only contain the translation for the part after the '|'. The described example would look like this de.po:

msgid "do something with a file|File"
msgstr "Datei"

1.2. Preparing GConf schemas for translation

It looks like there is no documentation on the web describing how to set up GConf schemas files for translations. The example from http://www.gnome.org/projects/gconf/ needs to be changed into the following:

schemadir = @GCONF_SCHEMA_FILE_DIR@
schemas_in_files = foo.schemas.in bar.schemas.in
schema_DATA = $(schemas_in_files:.schemas.in=.schemas)

@INTLTOOL_SCHEMAS_RULE@

EXTRA_DIST = $(schemas_in_files)

CLEANFILES = $(schema_DATA)

Then, intltool-update will collect the short and long names of the key from the foo.schemas.in file, will add them to the PACKAGE.pot file, and will insert the translated strings into the auto-created foo.schemas file. (This was discussed here http://bugzilla.gnome.org/show_bug.cgi?id=327353)

2. Most common problems

2.1. Innocent unmarked messages

Moved to What should be localized section of L10N Guidelines for Developers.

2.2. Language Bindings Notice

2.2.1. Python

#, python-format
msgid "Cannot find file %s in folder %s."

#, python-format
msgid "Cannot find file %(file_name)s in folder %(folder_name)s."

2.3. Translation not showing up

2.4. Using multiple domains

Moved to Avoid creating multi domain modules section of L10N Guidelines for Developers.

2.5. How to fix invalid translation (.po) files

In some cases, an invalid .po translation file may appear in your repository with the effect of failing to compile your module. This situation should get rarer as there is a git hook that validates PO files as they are pushed to your repository. However, some invalid translations may make it through because the translations were added at a time when no validation was enabled when committing.

The way to deal with this issue is to simply mark the offending translation as fuzzy (incomplete), which makes the .po file validate, and allows the translation to fix the translation at a later date.

Replace (we show two examples)

#: ../libnautilus-actions/nautilus-actions-config-gconf-private.h:96
#, c-format
msgid "Missing key: %s-%s"
msgid_plural "Missing keys: %s-%s"
msgstr[0] "Λείπει το κλειδί: %s"
msgstr[1] "Λείπουν τα κλειδιά: %s"

#: ../libnautilus-actions/nautilus-actions-config-gconf-private.h:102
msgid "Missing key"
msgid_plural "Missing keys"
msgstr[0] "Λείπει το κλειδί: %s"

with

#: ../libnautilus-actions/nautilus-actions-config-gconf-private.h:96
#, fuzzy, c-format
msgid "Missing key: %s-%s"
msgid_plural "Missing keys: %s-%s"
msgstr[0] "Λείπει το κλειδί: %s"
msgstr[1] "Λείπουν τα κλειδιά: %s"

#: ../libnautilus-actions/nautilus-actions-config-gconf-private.h:102
#, fuzzy
msgid "Missing key"
msgid_plural "Missing keys"
msgstr[0] "Λείπει το κλειδί: %s"

That is, you add the fuzzy keyword to the special line that starts with #,.

Furthermore, to notify the translators, please also report a bug about the problem in Bugzilla under the l10n product and the corresponding language component. This is not only in order to put the blame where the blame belongs, but more importantly to notify the corresponding language translators that this message was syntactically erroneous and needs a proper fix.

FIXME: Add stuff relevant to libraries


CategoryDeveloperTutorial


2024-10-23 11:10