Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
eg_translations [2017/03/19 14:08] – [Evergreen translations] cernin | eg_translations [2017/03/21 12:33] – [Making the custom string in TPAC translatable.] tmccanna |
---|
==== Support for individual languages in Evergreen release ==== | ==== Support for individual languages in Evergreen release ==== |
| |
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: | Currently there are over 30 Evergreen translation projects in Launchpad. However, only languages meeting at least one of the following criteria are included into Evergreen release: |
| |
* At least 70 % of translation is complete | * At least 70 % of translation is complete |
* The en-* variant of translations have an exception from criteria above as they are a special case (there is no need to translate all strings). | * The en-* variant of translations have an exception from criteria above as they are a special case (there is no need to translate all strings). |
| |
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 [[mailto:cernin@jabok.cz | Eva Cerniňáková]] if you have any questions. | 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 Evergreen locale and language in a near future). Please, feel free to contact Evergreen translations coordinator [[mailto:cernin@jabok.cz | Eva Cerniňáková]] if you have any questions. |
| |
| |
- Notes to translators (denoted by blue icons with "i") | - Notes to translators (denoted by blue icons with "i") |
- String location (under the //New translation// field). \\ E.g. information: //Located in ../../Open-ILS/src/templates/opac/register.tt2:63// means that the translated string occurs in //register.tt2// template file for OPAC, line 63 (and probably have something to do with user registration in OPAC). | - String location (under the //New translation// field). \\ E.g. information: //Located in ../../Open-ILS/src/templates/opac/register.tt2:63// means that the translated string occurs in //register.tt2// template file for OPAC, line 63 (and probably have something to do with user registration in OPAC). |
- ** Be consistent in used expressions** \\ Translate the same word or string always in the same way. It is good to make some "revisions" time to time. You can use [[https://docs.google.com/spreadsheets/d/13YvSic49TI8g-zyE4dn1QXCvwqf1cXumKEhjEhcVvSg/edit?usp=sharing | list of Evergreen translation strings]] containg all strings with name of the template in which the string occurs ((Note: The items have been extracted from individual templates using simple script. When an unexpected character (e.g., part of the code or variables) was used in translation string, it could affect the processing of the template. In such cases the item might exceptionally have been missing or inaccurate.)) | - ** Be consistent in used expressions** \\ Translate the same word or string always in the same way. It is good to make some "revisions" time to time. You can use [[https://docs.google.com/spreadsheets/d/13YvSic49TI8g-zyE4dn1QXCvwqf1cXumKEhjEhcVvSg/edit?usp=sharing | list of Evergreen translation strings]] containing all English strings with name of the template, to identify quickly in which template the string occurs ((Note: The items have been extracted from individual templates using simple script. When an unexpected character (e.g., part of the code or variables) was used in translation string, it could affect the processing of the template. In such cases the item might exceptionally have been missing or inaccurate.)) |
- **Recognize the background of translated expression.** \\ Translation strings contain e.g.: | - **Recognize the background of translated expression.** \\ Translation strings contain e.g.: |
- standardized terms used for MARC record description in Evergreen (it is good to have national MARC fields and terms translations at hand), | - standardized terms used for MARC record description in Evergreen (it is good to have national MARC fields and terms translations at hand), |
| |
If you have any questions, please, contact Evergreen translations coordinator [[ mailto:cernina@jabok.cz | Eva Cerniňáková]]. | If you have any questions, please, contact Evergreen translations coordinator [[ mailto:cernina@jabok.cz | Eva Cerniňáková]]. |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
- Select required language (e.g. Czech or Spanish ….) | - Select required language (e.g. Czech or Spanish ….) |
- Open the //tpac// template and then select option //Download translation// (note: in order to be able to download the translation file you need to be logged in to Launchpad). | - Open the //tpac// template and then select option //Download translation// (note: in order to be able to download the translation file you need to be logged in to Launchpad). |
- Select //PO format// and submit the //Request for download// button ((You can also request for download of [[https://translations.launchpad.net/evergreen/master/+export | all existitng templates and languages at once]])). The download link will be sent You to email address provided. | - Select //PO format// and submit the //Request for download// button ((You can also request for download of [[https://translations.launchpad.net/evergreen/master/+export | all existing templates and languages at once]])). The download link will be sent You to email address provided. |
- Download the file and rename it according to the desired language (e.g., cs-CZ.po for Czech or es-ES.po for Spanish) | - Download the file and rename it according to the desired language (e.g., cs-CZ.po for Czech or es-ES.po for Spanish) |
- Copy the downloaded file to /openils/var/template/data/locale. It is a good practice to backup the original PO file before. | - Copy the downloaded file to /openils/var/template/data/locale. It is a good practice to backup the original PO file before. |
Analogically, to update the web staff client translations, download the translation template //webstaff// and copy it to ///openils/var/template/data/locale/staff//. | 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: [[http://docs.evergreen-ils.org/2.10/_setting_a_default_language_and_adding_optional_languages.html | Setting a default language and adding optional languages]]. | NOTE: It is necessary to set specific language previously - see the documentation: [[http://docs.evergreen-ils.org/2.10/_setting_a_default_language_and_adding_optional_languages.html | Setting a default language and adding optional languages]]. |
| |
===== Making the custom string in TPAC translatable. ===== | ===== Making the custom string in TPAC translatable. ===== |
| |
| |
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('** ** ') %]** (( The [% ... %] signifies a TT block, which can contain one or more TT processing instructions. l(" ... "); is a function that marks text for localization (translation). )) | As Evergreen supports multiple languages, it is important, that any customization to Evergreen’s default text uses the localization function. To make the custom string translatable, the string must be in English and must be surrounded by **[% l('** ** ') %]** (( The [% ... %] signifies a TT block, which can contain one or more TT processing instructions. l(" ... "); is a function that marks text for localization (translation). )) |
| |
| |
| |
| |
see the documentation: | see the documentation: |
* [[http://docs.evergreen-ils.org/2.11/_designing_your_catalog.html#_configuring_and_customizing_the_public_interface | Configuring and customizing the public interface]] | * [[http://docs.evergreen-ils.org/2.11/_designing_your_catalog.html#_configuring_and_customizing_the_public_interface | Configuring and customizing the public interface]] |
* [[http://docs.evergreen-ils.org/2.11/_how_to_override_templates.html |How to overriding templates]]. | * [[http://docs.evergreen-ils.org/2.11/_how_to_override_templates.html |How to override templates]]. |
| |
==== Adding the custom string to PO file ==== | ==== Adding the custom string to PO file ==== |
| |
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/ // ) | After you have added custom texts 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. | Note: It is good practice to save backup copy of the original PO file before changing it. |