User Tools

Site Tools


eg_translations

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
eg_translations [2017/03/19 14:19] – [Making the custom string in TPAC translatable.] cernineg_translations [2023/10/31 16:28] (current) – tool slike/tools like bmagic
Line 16: Line 16:
 //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. //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.
  
-Usually an application is used to manage translations in PO files, e.g., desktop tool [[ https://poedit.net/| Poedit]] or online tool [[ https://translations.launchpad.net/evergreen |Launchpad]] used for Evergreen  translations.+Usually an application is used to manage translations in PO files, e.g., desktop tool [[ https://poedit.net/| Poedit]] or online tools like [[ https://translations.launchpad.net/evergreen |Launchpad]] and [[https://poeditor.com/|Poeditor]], both used for Evergreen  translations.
  
 The PO file consists of pairs of the text extracted from the code: The PO file consists of pairs of the text extracted from the code:
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 English trings 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.))+  - ** 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 92: Line 92:
   - **Be brief.** \\ When possible, use brief expressions in the translation. In some cases, too long expression could confuse the user, make the menu too wide or button too robust etc. However, in some cases, this does not apply, see following:   - **Be brief.** \\ When possible, use brief expressions in the translation. In some cases, too long expression could confuse the user, make the menu too wide or button too robust etc. However, in some cases, this does not apply, see following:
   - **Translation must be understandable -  adapt them to the language and the local context.** \\ Sometimes it is not the best choice to translate  string "word for word". In some cases it is better to use terms that slightly differ from the original but are commonly used in the language you are translating to. It might be also useful to  change the order of the words or sentences for given language, even exceptionally to add  kind of "explanation" for the better understanding of the context etc.   - **Translation must be understandable -  adapt them to the language and the local context.** \\ Sometimes it is not the best choice to translate  string "word for word". In some cases it is better to use terms that slightly differ from the original but are commonly used in the language you are translating to. It might be also useful to  change the order of the words or sentences for given language, even exceptionally to add  kind of "explanation" for the better understanding of the context etc.
-  - **Always use the Evergreen master series for the translations.** +  - **Always use the Evergreen main series for the translations.** 
   - **The most important templates are listed first in Launchpad.** \\  Start with //tpac// template (which contains strings used in Online public Evergreen catalog). It can be a good start for testing the translations and functionality.   - **The most important templates are listed first in Launchpad.** \\  Start with //tpac// template (which contains strings used in Online public Evergreen catalog). It can be a good start for testing the translations and functionality.
   - ** Be in touch with other translators. **   - ** Be in touch with other translators. **
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 118: Line 109:
   - 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 133: Line 124:
  
 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). )) 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 182: Line 174:
 http://knihovna.jabok.cuni.cz (Knihovna Jabok, Czech Republic) http://knihovna.jabok.cuni.cz (Knihovna Jabok, Czech Republic)
  
----------------------+===== Adding Translations Through Angular Interfaces ===== 
 + 
 +The newer Angular administration interfaces provide a button to add translations (for example, the MARC Coded Value Map controls the Audience dropdown fields in the OPAC advanced search), but you will need to edit a file in order to enable it for each language.  
 + 
 +  Edit Open-ILS/src/eg2/src/environments/environment.prod.ts 
 +  Modify the locales array (eg, locales: ['en-US','fr-CA','es-ES'] 
 +  Recompile Angular: ng build --prod 
 ===== Additional information ===== ===== Additional information =====
  
eg_translations.1489947564.txt.gz · Last modified: 2022/02/10 13:34 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.