diff --git a/ABOUT-NLS b/ABOUT-NLS index 4eba0ce06..528ad9e49 100644 --- a/ABOUT-NLS +++ b/ABOUT-NLS @@ -1,206 +1,214 @@ CDS Invenio NATIVE LANGUAGE SUPPORT =================================== Revision: $Id$ About ===== This document describes the Native Language Support (NLS) in CDS Invenio. Contents ======== 1. Native Language Support information for administrators 2. Native Language Support information for translators 3. Native Language Support information for programmers A. Introducing a new language 1. Native Language Support information for administrators ========================================================= CDS Invenio is currently available in the following languages: bg = Bulgarian ca = Catalan cs = Czech de = German el = Greek en = English es = Spanish fr = French it = Italian ja = Japanese no = Norwegian (Bokmål) pl = Polish pt = Portuguese ru = Russian sk = Slovak sv = Swedish uk = Ukrainian If you are installing CDS Invenio and you want to enable/disable some languages, please just follow the standard installation procedure as described in the INSTALL file. The default language of the installation as well as the list of all user-seen languages can be selected in the general config.wml file, see variables CDSLANG and CDSLANGS. (Please note that some runtime CDS Invenio daemons -- such as webcoll, responsible for updating the collection cache, running every hour or so -- may work twice as long when twice as many user-seen languages are selected, because it creates collection cache page elements for every user-seen language. Therefore, if you have defined thousands of collections and if you find the webcoll speed to be slow in your setup, you may want to try to limit the list of selected languages.) 2. Native Language Support information for translators ====================================================== If you want to contibute a translation to CDS Invenio, then please follow the procedure below: - Please check out the existence of po/LL.po file for your language, where LL stands for the ISO 639 language code (e.g. `el' for Greek). If such a file exists, then this language is already supported, in which case you may want to review the existing translation (see below). If the file does not exist yet, then you can create an empty one by copying the cds-invenio.pot template file into LL.po that you can review as described in the next item. (Please note that you would have to translate some dynamic elements that are currently not located in the PO file, see the appendix A below.) - Please edit LL.po to review existing translation. The PO file format is a standard GNU gettext one and so you can take advantage of dedicated editing modes of programs such as GNU Emacs, KBabel, or poEdit to edit it. Pay special attention to strings marked as fuzzy and untranslated. (E.g. in the Emacs PO mode, press `f' and `u' to find them.) Do not forget to remove fuzzy marks for reviewed translations. (E.g. in the Emacs PO mode, press `TAB' to remove fuzzy status of a string.) - After you are done with translations, please validate your file to make sure it does not contain formatting errors. (E.g. in the Emacs PO mode, press `V' to validate the file.) - If you have access to a test installation of CDS Invenio, you may want to see your modified PO file in action: $ cd po $ emacs ja.po # edit Japanese translation $ make update-gmo $ make install $ sudo apachectl restart $ firefox http://your.site/?ln=ja # check it out in context If you do not have access to a test installation, please contribute your PO file (see next step) and the CDS Invenio developers will install it on a test site and will contact you so that you would be able to check your translations in the global context of the application. - Please contribute your translation by emailing the file to . You help is greatly appreciated and will be properly credited in the CREDITS file. See also the GNU gettext manual, especially the chapters 5, 6 and 11. 3. Native Language Support information for programmers ====================================================== CDS Invenio uses standard GNU gettext I18N and L12N philosophy. In Python programs, all output strings should be made translatable via _() convention: from messages import gettext_set_language [...] def square(x, ln=cdslang): _ = gettext_set_language(ln) print _("Hello there!") print _("The square of %s is %s.") % (x, x*x) In WML source files, the convention is _()_: _(Search Help)_ Please follow the WebSearch module files for an example. Appendix A. Introducing a new language ====================================== If you are introducing a new language for the first time, then please firstly create and edit the PO file as described above in Section 2. This will make the largest portion of the translating work done, but it is not fully enough, because we currently have also to translate some dynamic elements that aren't located in PO files. The development team can edit the respective files ourself, if the translator sends over the following translations by email: - server name: Atlantis Institute of Fictive Science - field names, usually loaded from tabfill.sql.wml: any field title author abstract keyword report number subject reference fulltext collection division year experiment record ID + + - miscellaneous terms loaded from tabfill.sql.wml: + word similarity + - collection names, usually loaded from democfgdata.sql.wml: Preprints Books Theses Reports Articles Pictures CERN Divisions CERN Experiments Theoretical Physics (TH) Experimental Physics (EP) Articles & Preprints Books & Reports Multimedia & Arts Poetry + - miscellaneus terms loaded from democfgdata.sql.wml: + + journal impact factor + - the right-hand-side portalbox: ABOUT THIS SITE Welcome to the demo site of the CDS Invenio, a free document server software coming from CERN. Please feel free to explore all the features of this demo site to the full. SEE ALSO The development team will than edit various files (po/LINGUAS, config files, sql files, plenty of Makefile files, etc) as needed. The last phase of the initial introduction of the new language would be to translate some short static HTML pages: - modules/webhelp/web/index.html.wml - modules/websearch/doc/index.html.wml Thanks for helping to internationalize CDS Invenio. - CDS Development Group