Uživatelské nástroje

Nástroje pro tento web


evergreen_translations

Rozdíly

Zde můžete vidět rozdíly mezi vybranou verzí a aktuální verzí dané stránky.

Odkaz na výstup diff

Obě strany předchozí revizePředchozí verze
Následující verze
Předchozí verze
evergreen_translations [2017/02/26 23:48] eceevergreen_translations [2017/02/28 11:53] (aktuální) – [How to translate Evergreen (useful tips for translators)] ece
Řádek 65: Řádek 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 (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á]] when necessary or if you have any questions.+NOTE: These criteria are not a "law" and they can be changed in individual cases (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.
  
  
Řádek 74: Řádek 74:
  
   - **Understand what you translate.** \\ It is quite useful to have an idea  how  the software  really works. You can test the  Evergreen functionality by your own Evergreen  installation or you can use Evergreen community   [[ https://wiki.evergreen-ils.org/doku.php?id=community_servers | demo servers]].   - **Understand what you translate.** \\ It is quite useful to have an idea  how  the software  really works. You can test the  Evergreen functionality by your own Evergreen  installation or you can use Evergreen community   [[ https://wiki.evergreen-ils.org/doku.php?id=community_servers | demo servers]].
-  - **Leave the string untranslated until you are absolutely sure about its meaning.** \\ When using Evergreen, it is much less complicated to cope with English (untranslated) strings and messages then to come across wrong/misleading translation (e.g. the word "copy" usually means particular item of the document in Evergreen, but it can be used as a verb meaning to "reproduce" something). One English expression can also have various meanings in other languages etc.). You can get some hints from: +  - **Leave the string untranslated until you are absolutely sure about its meaning.** \\ When using Evergreen, it is much less complicated to cope with English (untranslated) strings and messages then to come across wrong/misleading translation. E.g. the word "copy" usually means particular item of the document in Evergreen, but it can be used as a verb meaning to "reproduce" something. One English expression can also have various meanings in other languages etc. You can get some hints from: 
     - 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.: //"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]] ((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]] 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.))
   - **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), 
     - terms used in ICT (like protocols names),      - terms used in ICT (like protocols names), 
     - SQL entities,      - SQL entities, 
-    - names of the countries and languages,  +    - names of countries and languages,  
-    - names of the providers etc.+    - names of providers etc.
   - **Pay attention to symbols representing specific characters** \\ It is necessary to add  newline or space to your translation  if it is used in the original string.   - **Pay attention to symbols representing specific characters** \\ It is necessary to add  newline or space to your translation  if it is used in the original string.
   - **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:** \\ 
Řádek 115: Řádek 115:
  
 **Recommended practice:** **Recommended practice:**
-  - Visit the Evergreen translation site in Launchapd (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).
Řádek 121: Řádek 121:
   - Download the file and rename it according to the used language (e.g., cs-CZ.po for Czech or  es-ES.po for Spanish)     - Download the file and rename it according to the used 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.
-  - Changes require web server reload to take effect (as root run the command //"service apache2 restart"//)+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//. Analogically, to update the web staff client translations, download the translation template “webstaff” and copy it to ///openils/var/template/data/locale/staff//.
Řádek 130: Řádek 130:
  
 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. 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.
-====  Inserting  the text to TPAC template as translatable string. ==== 
  
-Translatable string must be in English  and must be enclosed in proper code, e.g.,  **[% l('**  and     ** ') %]**. + 
-For example if you want to add  the custom translatable  link to the template openils/var/template/opac/parts/topnav_links.tt2, the added link will look like this:+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))). 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 +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>             <a href="http://example.com">[% l('Example text') %]</a>
 For more information see the documentation: [[http://docs.evergreen-ils.org/2.10/_changing_some_text_in_the_tpac.html | Changing some text in the TPAC]]. For more information see the documentation: [[http://docs.evergreen-ils.org/2.10/_changing_some_text_in_the_tpac.html | Changing some text in the TPAC]].
  
 Note: It is recommended to use use template overriding rather than touching the installed templates. For more information  Note: It is recommended to use use template overriding rather than touching the installed templates. For more information 
-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]] and  +see the documentation:  
- [[http://docs.evergreen-ils.org/2.11/_how_to_override_templates.html |How to overriding templates]].+  * [[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]].
  
 ==== Adding the custom string to PO file ==== ==== Adding the custom string to PO file ====
Řádek 145: Řádek 153:
 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 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+Note: It is good practice to save backup copy of the original PO file before changing it.
 === Editing PO file === === Editing PO file ===
  
/var/www/eg-wiki.osvobozena-knihovna.cz/data/attic/evergreen_translations.1488149280.txt.gz · Poslední úprava: 2017/02/26 23:48 autor: ece