-
Notifications
You must be signed in to change notification settings - Fork 275
Translations
Pinta is available in around 60 languages, so it's important that user-visible strings can be translated. Pinta uses gettext and the NGettext C# implementation for internationalization.
To obtain a translation of a string, call Translations.GetString
(e.g. Translations.GetString ("My String")
). It is important that this is also done for format strings (e.g. Catalog.GetString ("My name is {0}", "Bob")
) since grammar rules can be different in other languages.
Note that string interpolation is not supported, so format strings must be used instead!
If you need to provide some additional information to translators about the meaning of the string or the context where it is used, add a comment in the preceding line that begins with Translators:
. This will be auto-detected (see below) and made available to translators.
The translation template (po/messages.pot) contains a list of all of the translatable strings in Pinta. This is auto-generated by running make updatepotfiles
and then make updatepot
, which searches for calls to Translations.GetString ()
.
If you're submitting a pull request that involves adding new strings, you can run make updatepot
first to update the translation template immediately. The translation template is also automatically updated every week.
The translation template is synced to Pinta's translation site, which provides an interface for translators to submit translations for those strings. Later, the updated translation files are automatically sent back to Pinta's repository via a pull request.