User Tools

Site Tools


eg_translations

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
eg_translations [2017/02/28 07:34]
cernin created
eg_translations [2017/03/21 12:33] (current)
tmccanna [Making the custom string in TPAC translatable.]
Line 1: Line 1:
 ====== Evergreen translations ====== ====== Evergreen translations ======
-Evergreen translations can be found and managed in [[https://​translations.launchpad.net/​evergreen/​ | Launchpad ​ ]]. Evergreen is translated with Open permissions - it means anyone can submit translations directly to the project in Launchpad ([[ https://​login.launchpad.net/​0Llx9dRODKgBKpo5/​+decide | registration]] is required to edit the translations).+Evergreen translations can be found and managed in [[https://​translations.launchpad.net/​evergreen/​|Launchpad]]. Evergreen is translated with Open permissions - it means anyone can submit translations directly to the project in Launchpad ([[ https://​login.launchpad.net/​0Llx9dRODKgBKpo5/​+decide | registration]] is required to edit the translations).
  
 ===== Understanding the translations workflow ===== ===== Understanding the translations workflow =====
Line 46: Line 46:
  
   - When new release is being prepared, the //POT// files are generated and imported into Evergreen translation project in Launchpad. The import to Launchpad happens usually at the time when Evergreen ​ beta is released.   - When new release is being prepared, the //POT// files are generated and imported into Evergreen translation project in Launchpad. The import to Launchpad happens usually at the time when Evergreen ​ beta is released.
-  - The strings in Launchpad are translated to various languages.+  - The strings in Launchpad are translated to various languages. Also strings newly added to Evergreen can be added to Launchpad in the meantime, between beta release and X.Y.0 release
   - Before X.Y.0 release the new //PO// files are generated from the Launchpad translation data and are included into the release.   - Before X.Y.0 release the new //PO// files are generated from the Launchpad translation data and are included into the release.
  
Line 57: Line 57:
 ==== 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
Line 65: Line 65:
   * 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.
  
  
Line 77: Line 77:
     - 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), ​
Line 87: Line 87:
   - **In some cases, some parts of strings should not be translated. It concerns particularly:​** \\    - **In some cases, some parts of strings should not be translated. It concerns particularly:​** \\ 
      ​- ​ Data placeholders and variable names (e.g., %s or $name or ${name} etc.)      ​- ​ Data placeholders and variable names (e.g., %s or $name or ${name} etc.)
-     - Formatting/​XML tags +     - Formatting(HTML)/XML tags 
      - Program parameters etc.      - Program parameters etc.
   - ** After you have translated a string, read it again.** \\ It is good practice to review the translation and see possible mistyping or errors, missing punctuation etc.   - ** After you have translated a string, read it again.** \\ It is good practice to review the translation and see possible mistyping or errors, missing punctuation etc.
Line 99: Line 99:
  
 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á]].
- 
- 
- 
- 
- 
- 
- 
- 
- 
  
  
Line 115: Line 106:
  
 **Recommended practice:** **Recommended practice:**
-  - Visit the Evergreen translation site in Launchpad (https://​translations.launchpad.net/​evergreen+  - Visit the Evergreen translation site in Launchpad (https://​translations.launchpad.net/​evergreen)
   - 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.
Line 125: Line 116:
 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 previouslysee 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. =====
Line 132: Line 123:
  
  
-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)))
- +
- +
  
  
Line 147: Line 135:
 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.
Line 160: Line 148:
   * It is recommended to  add a note in which template and on which line the particular ​ string is located. The lines with notes must be marked as comments (i.e., start with //#//​) ​   * It is recommended to  add a note in which template and on which line the particular ​ string is located. The lines with notes must be marked as comments (i.e., start with //#//​) ​
  
-**Example:​** Czech texts inserted to cs.CZ.po ​ (used for TPAC interface customization)+**Example:​** Czech texts inserted to cs.CZ.po ​ (texts are used in TT2 files for TPAC interface customization)
    
  
Line 177: Line 165:
  
 </​code> ​   </​code> ​  
 +
 +**Example of living Evergreen catalog using translatable custom strings:**
 +
 +http://​knihovna.jabok.cuni.cz (Knihovna Jabok, Czech Republic)
  
 --------------------- ---------------------
 +===== Additional information =====
 +
 Information on Evergreen ​ Information on Evergreen ​
 [[evergreen-admin:​customizations:​i18n|Internationalization (I18N), Localization (L10N), and Globalization (G11N)]] [[evergreen-admin:​customizations:​i18n|Internationalization (I18N), Localization (L10N), and Globalization (G11N)]]
eg_translations.1488285280.txt.gz · Last modified: 2017/02/28 07:34 by cernin

© 2008-2017 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a member of Software Freedom Conservancy.