evergreen_translations
Rozdíly
Zde můžete vidět rozdíly mezi vybranou verzí a aktuální verzí dané stránky.
Obě strany předchozí revizePředchozí verzeNásledující verze | Předchozí verze | ||
evergreen_translations [2017/02/28 11:08] – [Adding the custom string to PO file] ece | evergreen_translations [2017/02/28 11:53] (aktuální) – [How to translate Evergreen (useful tips for translators)] ece | ||
---|---|---|---|
Řádek 1: | Řádek 1: | ||
+ | ====== Evergreen translations ====== | ||
+ | Evergreen translations can be found and managed in [[https:// | ||
+ | |||
+ | ===== Understanding the translations workflow ===== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | 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 files ==== | ||
+ | |||
+ | " | ||
+ | ==== PO files ==== | ||
+ | |||
+ | PO files are the files containing the translations. Each language have its own PO file, e.g., Czech translation | ||
+ | |||
+ | Usually an application is used to manage translations in PO files, e.g., desktop tool [[ https:// | ||
+ | |||
+ | The PO file consists of pairs of the text extracted from the code: | ||
+ | - " | ||
+ | - The text of the translation, | ||
+ | |||
+ | 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 " | ||
+ | |||
+ | < | ||
+ | #: ../ | ||
+ | msgid "All Libraries" | ||
+ | msgstr " | ||
+ | |||
+ | #. (bib_lib_name) | ||
+ | #: ../ | ||
+ | msgid "%1 (foreign item)" | ||
+ | msgstr "%1 (cizí exemplář)" | ||
+ | |||
+ | #: ../ | ||
+ | msgid "All Parts" | ||
+ | msgstr " | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Translation workflow at Evergreen release ==== | ||
+ | |||
+ | - 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 | ||
+ | - The strings in Launchpad are translated to various languages. | ||
+ | - Before X.Y.0 release the new “PO” files are generated from the Launchpad translation data and are included into the release. | ||
+ | |||
+ | Build master of Evergreen release | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==== Support for individual languages in Evergreen release ==== | ||
+ | |||
+ | Currently there are over 30 Evergreeen translation projects in Launchpad. However, | ||
+ | |||
+ | * At least 70 % of translation is complete | ||
+ | * Translation has been updated within the past 12 months and at least 50 % is complete | ||
+ | * It is known there is someone actively working on the translation | ||
+ | * There is a known living Evergreen catalog using the particular language | ||
+ | * 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 " | ||
+ | |||
+ | |||
+ | ==== How to translate Evergreen (useful tips for translators) ==== | ||
+ | |||
+ | As translation strings are separated from the " | ||
+ | We recommend following: | ||
+ | |||
+ | - **Understand what you translate.** \\ It is quite useful to have an idea how the software | ||
+ | - **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/ | ||
+ | - Notes to translators (denoted by blue icons with " | ||
+ | - String location (under the //"new translation"// | ||
+ | - ** Be consistent in used expressions** \\ Translate the same word or string always in the same way. It is good to make some " | ||
+ | - **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), | ||
+ | - terms used in ICT (like protocols names), | ||
+ | - SQL entities, | ||
+ | - names of countries and languages, | ||
+ | - names of providers etc. | ||
+ | - **Pay attention to symbols representing specific characters** \\ It is necessary to add newline or space to your translation | ||
+ | - **In some cases, some parts of strings should not be translated. It concerns particularly: | ||
+ | | ||
+ | - Formatting/ | ||
+ | - 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. | ||
+ | - **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 | ||
+ | - **Always use the Evergreen master series for the translations.** | ||
+ | - **The most important templates are listed first in Launchpad.** \\ Start with " | ||
+ | - ** Be in touch with other translators. ** | ||
+ | |||
+ | More information available at [[https:// | ||
+ | |||
+ | If you have any questions, please, contact Evergreen translations coordinator [[ mailto: | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Updating translations in Evergreen using current translations from Launchpad ===== | ||
+ | |||
+ | Due to Evergreen release workflow/ | ||
+ | |||
+ | **Recommended practice:** | ||
+ | - Visit the Evergreen translation site in Launchpad (https:// | ||
+ | - Select required language (e.g. Czech or Spanish ….) | ||
+ | - Open the // | ||
+ | - Select //"PO format"// | ||
+ | - 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 / | ||
+ | Changes require web server reload to take effect (as root run the command //" | ||
+ | |||
+ | Analogically, | ||
+ | |||
+ | NOTE: It is necessary to set specific | ||
+ | |||
+ | ===== Making the custom string in TPAC translatable. ===== | ||
+ | |||
+ | To make the custom string 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, | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | For example if you want to add the custom translatable | ||
+ | <a href=" | ||
+ | For more information see the documentation: | ||
+ | |||
+ | Note: It is recommended to use use template overriding rather than touching the installed templates. For more information | ||
+ | see the documentation: | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | |||
+ | ==== 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 | ||
+ | |||
+ | Note: It is good practice to save backup copy of the original PO file before changing it. | ||
+ | === Editing PO file === | ||
+ | |||
+ | * The English expressions must be identified by //msgid// and enclosed in “ “. | ||
+ | * The translation must be identified by //msgstr// and enclosed in “ “ . | ||
+ | * It is recommended to add a note in which template and on which line the particular | ||
+ | |||
+ | **Example: | ||
+ | |||
+ | |||
+ | < | ||
+ | # --------------------------------------------------------------------- | ||
+ | # The lines below contains the custom strings manually added to catalog | ||
+ | # --------------------------------------------------------------------- | ||
+ | |||
+ | #: ../ | ||
+ | msgid "Union Catalog of the Czech Republic" | ||
+ | msgstr " | ||
+ | |||
+ | #: ../ | ||
+ | msgid " | ||
+ | msgstr " | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||