[OPEN-ILS-DOCUMENTATION] Fwd: Evergreen translations related documentation

Jane Sandberg sandbej at linnbenton.edu
Mon Mar 6 15:06:59 EST 2017


Hi all,

Eva Cerninakova has kindly assembled documentation about translations
in Evergreen for system administrators.  Please take a look and send
your feedback to this list.


---------- Forwarded message ----------
From: Cerninakova Eva <cernin at jabok.cz>
Date: Tue, Feb 28, 2017 at 4:55 AM
Subject: Evergreen translations related documentation
To: docs at evergreen-ils.org




Hi all,

1) I would like to suggest adding some pieces  concerning topic
related to Evergreen translations to  documentation. Based on  my own
experience I thing they might be really useful for users of various
Evergreen locale.

    For section Configuring and customizing the public interface I
would like to suggest adding information about adding translations to
PO file.  Probably it follow the information how to change some text
in the public interface, see
http://docs.evergreen-ils.org/2.11/_designing_your_catalog.html#_changing_some_text_in_the_public_interface
    For  Setting a default language and adding optional languages, see
http://docs.evergreen-ils.org/2.11/_setting_a_default_language_and_adding_optional_languages.html,
I would suggest adding information how to update translations in 2)
Evergreen using current translations from Launchpad(or make a separate
document following the Adding optional language section)

The texts are included in the attached files. I have tried write it in
AsciiDoc format, however, I am not sure whether it is entirely correct
(which concers my English as well).


2) I have also added information concerning Evergreen translations to
Evergreen Dokuwiki, see
https://wiki.evergreen-ils.org/doku.php?id=eg_translations. However,
at the moment I have not added  link to Evergreen translation page
from the Dokuwiki start page. Before I do it,  I would like to ask you
to revise the text. Besides other,  as I am not native English speaker
I am almost sure  it will be  necessary to "adapt" the text  to
correct English. It would be very helpful if somebody from DIG  looks
at the page and send me some comments to it  (or directly correct
possible mistypings or errors). When the Evergreen translation page
has been revised I will ad the link to it to the Dokuwiki start page.
Just a note: the Dokuwiki page Evergreen translation contains
information about adding translations to PO file and updating
translation -   I will  remove both  from Dokuwiki (or edit) later if
the information will be added to documentation.

Thanks

Eva







---
Mgr. Eva Cerniňáková
cernin at jabok.cz
Tel. +420 211 222 409

Knihovna Jabok
http:/knihovna.jabok.cz
Tel.  +420 211 222 410

Jabok - Vyšší odborná škola sociálně pedagogická a teologická
Salmovská 8, 120 00 Praha 2




-- 
Jane Sandberg
Electronic Resources Librarian
Linn-Benton Community College
sandbej at linnbenton.edu / 541-917-4655
Pronouns: she/her/hers or they/them/theirs
-------------- next part --------------
Updating translations in Evergreen using current translations from Launchpad
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Due to Evergreen release workflow/schedule it may happen, that some language strings in TPAC or in Web staff client are not available in locale language even if the particular string  has been already translated  in Launchpad.  In such cases it is possible to manually replace the PO file in Evergreen by up-to-date PO file downloaded from Launchpad. 

. Visit the Evergreen translation site in https://translations.launchpad.net/evergreen[Launchpad]] 
. Select required language (e.g. _Czech_ or _Spanish_)
. Open the  _tpac_  template  and  then select option _Download translation_. Note: 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 all existitng templates and languages at once, see https://translations.launchpad.net/evergreen/master/+export. The download link will be sent You to email address provided. 
. Download the file and name it according to the language used (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.

Analogically, to update the web staff client translations, download the translation template _webstaff_ and copy it to _openils/var/template/data/locale/staff_.

[NOTE]
====
 To see the changes it is necessary to set specific  language previously, see  _Setting a default language and adding optional languages_ in Evergreen documentation.
====

Changes require web server reload to take effect. As root run the command 

----
service apache2 restart
----
-------------- next part --------------


Adding translations 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. Evergreen PO files are stored  in _/openils/var/template/data/locale/_ 

The PO file consists of pairs of the text extracted from the code:  Message ID  denoted as _msgid_ and message string denoted as _msgstr_.  When adding the custom string to PO file: 
 
* The line with English expressions must start with _msgid_. The English term must be enclosed in double apostrophes. 
* The line with translation start with /msgstr/. The translation to local language must be and enclosed in enclosed in double apostrophes.  
* 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 number sign (#) 

Example: 
 
----

# ---------------------------------------------------------------------
# The lines below contains the custom strings manually added to the catalog
# ---------------------------------------------------------------------

#: ../../Open-ILS/src/custom_templates/opac/parts/topnav_links.tt2:1
msgid "Union Catalog of the Czech Republic"
msgstr "Souborný katalog České republiky"

#: ../../Open-ILS/src/custom_templates/opac/parts/topnav_links.tt2:1
msgid "Uniform Information Gateway "
msgstr "Jednotná informační brána"

----



[NOTE]
====
It is good practice to save backup copy of the original PO file before changing it.
====


After making changes, restart Apache to make the changes take effect. As root run the command:

----
service apache2 restart
----


More information about the OPEN-ILS-DOCUMENTATION mailing list