How to Translate OpenSolaris Messages

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

Joining an Existing Team

If a language team exists for your language, contact coordinator of the team.

Adding a new language

If there 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
  • wait for approval of new language
  • add your language to the table of localization teams
  • start with localization

Starting Work

All files to be translated are stored in a Mercurial repository. Downloading the files from Mercurial repository is allowed for all team members via anonymous access. Committing is allowed only for team coordinators.

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
    • contains ON (command-line) and OpenSolaris Installer messages
  • JDS repository
    • contains messages Java Desktop System applications (package manager, GNOME applications ported to OpenSlaris - ekiga, gcalctool, gimp and more).

Repository Structure of ON (command-line) and Installer messages

The message files are stored here

--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

Installer's message files are stored here

--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

Unfortunately, you have to download whole directory. The directory contains subdirectories named by language codes. Find the code of your language.

hg clone ssh://anon@hg.opensolaris.org/hg/nv-g11n/messages/ messages

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.

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.

/bin/cp -r de_DE ta_IN

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.

/bin/rm -rf __LOCALE__
/bin/cp -r en_US __LOCALE__
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_en_US.properties)

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 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.

If you don't know, what is the PO and POT file, please read article Work with PO Files.

Language Team Pages

If you work in the large team, you should have your own team page 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.

How to translate

For translating process you can use:

  • Pootle and the official Pootle server for translation of OpenSolaris you can find here
    For activating your account and for questions regarding to OpenSolaris.org project please contact Róbert Malovec
  • CTI- our new approach for Sun's products translation
    • still in developement. Provides more functionality than Pootle. We recommend to use CTI instead of Pootle.
      For questions about adding new language/project into CTI please contact Róbert Malovec
  • Special translation tools

How to test your translated PO files

  • Convert PO files into MO files using this command:
    msgfmt -o example.po example.mo
    
  • Copy created MO files to appropriate directory
    e.g.
    /usr/lib/locale/__LOCALE__/LC_MESSAGES
    Good to know
    Keep folder's structure
    Replace __LOCALE__ by your locale

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 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

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.
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


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