This is an old revision of the document!
Evergreen translations can be found and managed in Launchpad . Evergreen is translated with Open permissions - it means anyone can submit translations directly to the project in Launchpad ( registration is required to edit the translations).
If new features of Evergreen and code is written, some parts of the code contains text strings that need to be translated. To manage translations, POT and PO files are used.
POT stands for Portable Object Template i.e., the file that you get when you extract texts from the application.
PO files are the files containing the translations. Each language have its own PO file, e.g., Czech translation in Evergreen has cs-CZ.po file, Spanish has es-ES.po file etc.
The PO file consists of pairs of the text extracted from the code:
Useful comments (like developers note to translators or location of the text string in the file system) can be added to each pair.
Example of the id and string pair with the comments (in the Czech PO file):
#: ../../Open-ILS/src/templates/opac/parts/config.tt2:1 msgid "All Libraries" msgstr "Všechny knihovny" #. (bib_lib_name) #: ../../Open-ILS/src/templates/opac/parts/record/copy_table.tt2:58 msgid "%1 (foreign item)" msgstr "%1 (cizí exemplář)" #: ../../Open-ILS/src/templates/opac/parts/place_hold.tt2:102 msgid "All Parts" msgstr "Všechny části"
Build master of Evergreen release is responsible for generating the POT and PO files.
Currently there are over 30 Evergreeen translation projects in Launchpad. However, only languages meeting at least one of the following criteria are included into Evergreen release:
NOTE: These criteria are not a "law" and they can be changed in individual cases (exception can be make e.g, if only minor parts has been translated yet but local community exists and plans to test or implement Evegreen locale and language in a near future). Please, feel free to contact Evergreen translations coordinator Eva Cerniňáková if you have any questions.
As translation strings are separated from the "program" and the same word or string can have more meanings, it is sometimes tricky to understand what is the proper way to translate it. We recommend following:
More information available at Launchpad
If you have any questions, please, contact Evergreen translations coordinator Eva Cerniňáková.
Due to Evergreen release workflow/schedule it may happen, that some language strings in TPAC or in Web staff client are not available in locale language even if the particular string has been already translated in Launchpad. It may also be necessary to test translations for a new release (e.g. beta) when translations have not been yet added from Launchpad to Evergreen release. In such cases it is possible to manually replace the PO file in Evergreen by up-to-date PO file downloaded from Launchpad.
Changes require web server reload to take effect (as root run the command service apache2 restart)
Analogically, to update the web staff client translations, download the translation template webstaff and copy it to /openils/var/template/data/locale/staff.
NOTE: It is necessary to set specific language previously, see the documentation: Setting a default language and adding optional languages.
To make the custom string translatable (e.g., links in top or bottom navigation in OPAC, or any other kind of custom information on catalog homepage etc.), it is necessary to insert the text to TPAC template as translatable string and add the custom strings to the PO containing translations in given language.
As Evergreen supports multiple languages, it is important, that any customization to Evergreen’s default text (e.g., links in top or bottom navigation in OPAC, or any other kind of custom information on catalog homepage etc.) uses the localization function. To make the custom string translatable, the string must be in English and must be surrounded by [% l(' ') %] 3)).
For example if you want to add the custom translatable link to the Evergreen top navigation bar (template openils/var/template/opac/parts/topnav_links.tt2), the added link will look like this:
<a href="http://example.com">[% l('Example text') %]</a>
For more information see the documentation: Changing some text in the TPAC.
Note: It is recommended to use use template overriding rather than touching the installed templates. For more information see the documentation:
After you have added custom text in translatable form to a TT2 template, you need to add the custom strings and its translations to the PO file containing the translations (the PO files are stored in /openils/var/template/data/locale/ )
Note: It is good practice to save backup copy of the original PO file before changing it.
Example: Czech texts inserted to cs.CZ.po (texts are used in TT2 files for TPAC interface customization)
# --------------------------------------------------------------------- # The lines below contains the custom strings manually added to catalog # --------------------------------------------------------------------- #: ../../Open-ILS/src/custom_templates/opac/parts/topnav_links.tt2:1 msgid "Union Catalog of the Czech Republic" msgstr "Souborný katalog České republiky" #: ../../Open-ILS/src/custom_templates/opac/parts/topnav_links.tt2:1 msgid "Uniform Information Gateway " msgstr "Jednotná informační brána"
Example of living Evergreen catalog using translatable custom strings:
http://knihovna.jabok.cuni.cz (Knihovna Jabok, Czech Republic)
Information on Evergreen Internationalization (I18N), Localization (L10N), and Globalization (G11N)