View Source

h1. How to Translate OpenSolaris Messages

This section provides information about localizing of OpenSolaris system messages and GUI applications.

[#Joining an Existing Team]
[#Adding a new language]
[#Starting Work]
[#The Most Important Files]
[#Repository Structure]
[#Creating a new language]
[#About PO and POT Files]
[#Language Team Pages]
[#How to translate]
[#How to test your translated _PO files_]
[#How to update a translation]
[#CTI]

h2. {anchor:Joining an Existing Team}Joining an Existing Team

If a [language team|http://www.opensolaris.org/os/community/int_localization/community_structure/#a] exists for your language, contact coordinator of the [team|http://www.opensolaris.org/os/community/int_localization/leaders/].

h3. {anchor:Adding a new language}Adding a new language

If [there|http://www.opensolaris.org/os/community/int_localization/community_structure/#a] is no team for your language and you would like to create a new group, proceed as follows:
* create an account at opensolaris.org pages
* send an email introducing yourself to the group mailing list or the main community mailing list, [i18n-discuss|mailto:i18n(dash)discuss(at)opensolaris(dot)org]
* wait for approval of new language
* add your language to the [table of localization teams|http://www.opensolaris.org/os/community/int_localization/community_structure/#a]
* start with localization

h2. {anchor:Starting Work}Starting Work

All files to be translated are stored in a [Mercurial repository|http://www.opensolaris.org/os/community/tools/scm/hg_help/]. Downloading the files from Mercurial repository is allowed for all team members via anonymous access. Committing is allowed only for [team coordinators|http://www.opensolaris.org/os/community/int_localization/leaders/].

h4. {anchor:The Most Important Files}The Most Important Files

If you are at the beginning of localization, you should start with the most important files. These files belong to the most visible applications of the OpenSolaris, like Installer.

Software messages are not stored in one place. They are divided to some categories and are present in couple of repositories.
+The most important are:+
* [g11n repository|http://src.opensolaris.org/source/xref/nv-g11n/messages/messages/]
** contains ON (command-line) and OpenSolaris Installer messages
* [JDS repository|http://src.opensolaris.org/source/xref/jds/]
** contains messages Java Desktop System applications (package manager, GNOME applications ported to OpenSlaris - ekiga, gcalctool, gimp and [more|http://src.opensolaris.org/source/xref/jds/spec-files/trunk/po-sun/]).

h2. {anchor:Repository Structure}Repository Structure of ON (command-line) and Installer messages

The message files are stored [here|http://src.opensolaris.org/source/xref/nv-g11n/messages/messages/on/]
{code}
--nv-g11n
+--messages
+--messages
+--on
+--cs_CZ |
+--de_DE |
+--en_US |
+--es_ES |
+--fr_FR |
+--it_IT |
+--ja_JP |
+--ko_KR |
+--sc_CE |
+--zh_CN |
+--zh_TW |
|
+--usr
+--lib ------------------------
+--share +--help ------------------------------------------
+--lib +--locale ----------------- +--auths --------
+--locale +--LC_MESSAGES +--profiles +--locale
+--com +--LC_TIME +--locale
+--sun
+--admin -----------------------------
+--dhcpmgr --------- +--pm
+--slp +--bridge +--client
+--cli -----------------------------------------
+--client -------- +--common
+--common +--SUNWbinfiles +--dhcpbatch
+--data +--SUNWfiles +--dhcpconfig
+--server +--SUNWnisplus +--dhtadm
+--ui +--pntadm
{code}
Installer's message files are stored [here|http://src.opensolaris.org/source/xref/nv-g11n/messages/messages/install/]
{code}
--nv-g11n
+--messages
+--install
+--cs_CZ |
+--de_DE |
+--en_US |
+--es_ES |
+--fr_FR |
+--it_IT |
+--ja_JP |
+--ko_KR |
+--sc_CE |
+--sk_SK |
+--zh_CN |
+--zh_TW |
|
+--usr
+--lib ----------------------------------------------------------------
+--share +--locale
+--gui-install ----------------------- +--__LOCALE__
+--locale +--help +--LC_MESSAGES
+--__LOCALE__ +--__LOCALE__
+--LC_MESSAGES
{code}
(on) Unfortunately, you have to download whole directory. The directory contains subdirectories named by language codes. Find the code of your language.
{code}
hg clone ssh://anon@hg.opensolaris.org/hg/nv-g11n/messages/ messages
{code}
This process takes a few minutes, depending on the size of the files and will create a directories called de_messages and de_installer.
More detailed info about check-outing G11N repositories can be found [here|http://www.opensolaris.org/os/project/nv-g11n/documents/repository/].

h4. {anchor:Creating a new language}Creating a new language

If you are creating a new language, (ex. Tamil, ta_IN), then you have to make a new directory, which could be a copy of an existing locale.
{code}
/bin/cp -r de_DE ta_IN
{code}
Within each locale (ta_IN) directory, the en_US directory contains the untranslated strings, while the \_\__LOCALE_\_\_ will contain these strings translated into your languages. If you had copied from 'de_DE' from the above step, then you will see German translations in the files under the \_\__LOCALE_\_\_ directory. If you don't want any other translated strings, then you can remove the \_\__LOCALE_\_\_ directory and copy the en_US directory to start the translations afresh.
{code}
/bin/rm -rf __LOCALE__
/bin/cp -r en_US __LOCALE__
{code}
{info:title=Be Aware}
Some message files have also in its name the name of locale. These names have to be renamed according to translated locale.

(example of that file: /messages/messages/on/en_US/usr/share/lib/locale/com/sun/slp/Server\_{color:#ff0000}en_US{color}.properties)
{info}

h2. {anchor:About PO and POT Files}About PO and POT Files

Original English text in the PO file is not possible to change. You can change only translation. If you find an error in the original English text, please use [Bugzilla|http://defect.opensolaris.org/bz/] to report it. Use the *i18n-l10n component* \- _Issues relating to internationalization and localization such as missing, incomplete or garbled translation, national keyboard input, fonts, locale data or unicode conversions issues._ All wrong texts must be fixed in the source code of the application first and then will be generated a new POT file and automatically merge with your files. After it, the changed string will be marked as fuzzy.

(on) If you don't know, what is the PO and POT file, please read article [Work with PO Files|Work with po files].

h2. {anchor:Language Team Pages}Language Team Pages

If you work in the large team, you should have your own [team page|http://www.opensolaris.org/os/community/int_localization/community_structure/#a] in your native language. If you would like to create a new group or volunteer to be a leader, please send an email introducing yourself to the main community mailing list, [i18n-discuss|mailto:i18n(dash)discuss(at)opensolaris(dot)org].

h2. {anchor:How to translate}How to translate

For translating process you can use:
* [Pootle|http://wikis.sun.com/display/g11n/Using+Pootle+for+translation] and the official Pootle server for translation of OpenSolaris you can find [here|http://pootle.sunvirtuallab.com]
(on) For activating your account and for questions regarding to OpenSolaris.org project please contact [Róbert Malovec|mailto:Robert(dot)Malovec(at)Sun(dot)COM]
* [CTI|http://cti.sunvirtuallab.com|Community Translation Interface]\- our new approach for Sun's products translation
** still in developement. Provides more functionality than Pootle. We recommend to use CTI instead of Pootle.
(on) For questions about adding new language/project into CTI please contact [Róbert Malovec|mailto:Robert(dot)Malovec(at)Sun(dot)COM]
* [Special translation tools|Translation tools]

h2. {anchor:How to test your translated _PO files_}How to test your translated _PO files_

* Convert _PO files_ into _MO files_ using this command:
{code}
msgfmt -o example.po example.mo
{code}
* Copy created _MO files_ to appropriate directory
e.g.
_/usr/lib/locale/_\_\__LOCALE_\_\__/LC_MESSAGES_
{info:title=Good to know}Keep folder's structure
Replace \_\__LOCALE_\_\_ by your locale
{info}

h2. {anchor:How to update a translation}How to update a translation

* If you are making regular contributions to G11N projects, you may apply for a Read/Write account so that you can commit to the repositories directly. Please refer to [Requesting an HG Account|http://www.opensolaris.org/os/project/nv-g11n/documents/get_account/] for how to apply for a writable account to G11N repositories. After you get your account, you can check out the repositories by replacing _'username'_ with your account name.
* If you don't have Write access to Mercurial repository, please send your translated _PO files_ to your [team leader|http://www.opensolaris.org/os/community/int_localization/leaders/]

h2. {anchor:CTI}CTI (Community Translation Interface) Tool

* Is a web application created by the Globalization department of Sun Microsystems for open-source community translators. It currently supports only the OpenSolaris community.
* CTI makes translation easy, translators only need to take care about localization, integration process is made directly by Sun Engineers.

* CTI was designed with the goal that any user of OpenSolaris should be able to translate any part of the operating system. To use CTI, one needs to know which part of OpenSolaris they want to translate. The different parts of OpenSolaris localization are divided into "translation projects."

* The CTI allows you to use our globalization management system remotely by viewing and editing the Translation Memory (TM). The OpenSolaris TM is organized into projects, files and segments. Each segment is a piece of text translated into many languages. A segment can be a word, a sentence or even a paragraph.

* To translate some part of OpenSolaris, you first need to identify the segment. When you find the segment, you need to translate it as a whole, making the segment 100% translated. When the translation memory is udpated, the change is then propagated automatically into the appropriate file, which you can then integrate into your OpenSolaris installation by installing an updated package via the Package Manager from our IPS repository.

* To get an overview about the translation via CTI please see the Translation of OpenSolaris presentation from OpenSolaris Developer Conference 2008 in Prague.

The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact