Translation

Differences between revisions 13 and 14
Revision 13 as of 2006-06-22 16:47:20
Size: 5415
Editor: mailgate
Comment: trivial
Revision 14 as of 2006-08-09 08:56:12
Size: 3253
Editor: mailgate
Comment: thorough rewrite
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
== Introduction ==
Line 5: Line 4:
This page is a description of how the Documentation Team work gets translated and inserted into Ubuntu. It is primarily intended for reference of the Documentation Team: translators do not need to know all this information. == Translating Ubuntu Documentation ==
Line 7: Line 6:
If you are a translator, and are interested in helping out translating the Ubuntu documentation into your language, all you need to know is how to use the [http://launchpad.net/rosetta Rosetta translation system]. You can find out how to use that on the ["Rosetta"] wiki page. Once you have learnt all of this, the docteam documents can be found [https://launchpad.net/products/ubuntu-doc here] (don't forget to login). If you are a translator, and are interested in helping out translating the Ubuntu documentation into your language, all you need to know is how to use the [http://launchpad.net/rosetta Rosetta translation system]. You can find out how to use that on the ["Rosetta"] wiki page. Once you have learnt all of this, the docteam documents can be found in several places: [https://launchpad.net/distros/ubuntu/dapper/+source/ubuntu-docs ubuntu-docs], [https://launchpad.net/distros/ubuntu/dapper/+source/kubuntu-docs kubuntu-docs], and [https://launchpad.net/distros/ubuntu/dapper/+source/xubuntu-docs xubuntu-docs]. That's it!

The rest of this pa
ge is a description of how the Documentation Team work gets translated and inserted into Ubuntu. It is primarily intended for reference of the Documentation Team: translators do not need to know all this information.
Line 11: Line 12:
  * gnome-doc-utils
  * gettext
To install all packages required to build ubuntu-docs, including translations, run:

  {{{apt-get build-dep ubuntu-docs}}}
Line 16: Line 18:
 0. When English XML document is ready for translation, make a POT file. We use the command {{{xml2po -e -o output.pot input.xml}}}.
  * N.B. for documents spread over more than one file, the xml2po command needs to be slightly different. Use the command {{{xml2po --help}}} for an example of this use.
  * For documents which have an omf file, these should also be included in the pot file.
 0. The pot file should then be uploaded to rosetta. This is done automatically if the pot is in a source deb package uploaded into the current version of Ubuntu, if not, it must be done manually with the help of the Rosetta Administrators.
 0. Documents are translated via the [http://launchpad.net/rosetta Rosetta] interface.
 0. Automatic exporting from Rosetta into the docteam tree is not implemented, and it seems that it will be difficult to implement it in the future. Therefore a member of the docteam will check the status of translations in the documents and when they are ready, export them from Rosetta (go to [https://launchpad.net/products/ubuntu-doc this link], click on the relevant template on the left, and then Download the po files from the menu on the right) and commit them to the relevant section of the Docteam Repository.
 0. The po files come in the format {{{cc.po}}}, where cc is the [http://www.w3.org/WAI/ER/IG/ert/iso639.htm two letter language code]. These can be converted back to xml using the command {{{xml2po -e -p cc.po path/to/original/document.xml > path/to/translated/document-cc.xml}}}. The "translate.sh" script which is found in the directory for many documents can be used to automate this process.
There are three steps to getting documentation translated:
 0. generating a translation template
 0. letting the translators work their magic
 0. importing the translations back into our repository
Line 24: Line 23:
== File Naming Convention == These are taken in turn below.
Line 26: Line 25:
  * English document names may contain one hyphen. Example:
    * Correct "xxx-xxx.xml" "release-notes.xml
    * Incorrect "xxx-xxx-xxx.xml"
  * POT file name is same as English filename but with .pot extension. Example:
    * Correct "xxx-xxx.pot" "release-notes.pot"
    * Incorrect "xxx-xxx-xxx.pot"
  * PO file name must be in the following format
    * Correct "nn.po" (where nn = two letter country code) e.g. "fr.po"
    * Incorrect "xxxxxx-nn.pot"
Note::
 See ISO 639: 2-letter codes at [http://www.w3.org/WAI/ER/IG/ert/iso639.htm]
=== 1. Generating a translation template ===
Line 38: Line 27:
== Problems ==  * When an English XML document is ready for translation, we make a POT file, which is the template that translators use. To make this, we use the command:
  {{{xml2po -e -o output.pot input.xml}}}.
 * For documents spread over more than one file, these can be included as follows:
  {{{xml2po -e -o output.pot chapter1.xml chapter2.xml}}}
 * For documents which have an omf file, these should also be included in the pot file.
 * As a result, generally the appropriate command is:
  {{{xml2po -e -o output.pot C/*.xml C/*.omf}}}
Line 40: Line 35:
Some of the following problems may be encountered while using Rosetta as a translating interface. We are hoping that Rosetta will be a suitable way of getting Docteam documentation translated by the maximum number of people, but it is normal that we will have some teething problems, which may be solved by amending our {{{make pot}}} / {{{make po}}} scripts or by filing bugs with the Rosetta guys. If you come across an error which isn't listed here, please list it here and report it to the [mailto:ubuntu-doc@lists.ubuntu.com Docteam] and [mailto:rosetta-users@lists.ubuntu.com Rosetta-users] lists. === 2. Letting the translators work their magic ===
Line 42: Line 37:
 * PO file may contain syntax errors. These are shown when running make-po script. For example:
{{{
msgfmt: releasenotes/release-notes-fr.po: some header fields still have the initial default value
msgfmt: releasenotes/release-notes-fr.po: warning: PO file header fuzzy
                                          warning: older versions of msgfmt will give an error on this
msgfmt: found 1 fatal error
124 translated messages.
}}}
   In this case:
   * Check that the header has been modified. Sometimes people forget to complete the "Last-Translator" field.
   * Strip the line #, fuzzy from the file.
   * Locate and resolve any fatal message string errors.
 * The pot file should then be uploaded to rosetta. This is done automatically if the pot is in a source deb package uploaded into the current version of Ubuntu, if not, it must be done manually with the help of the Rosetta Administrators.
 * Translators then do the rest!
Line 55: Line 40:
 * Languages such as German have special characters such as ü and ß. Instead of using the "Entity" use the "Decimal." For example: replace {{{ß}}} with {{{ß}}}. Use [http://zvon.org/other/charSearch/PHP/search.php] to resolve an "Entity" to a "Decimal." === 3. Importing the translations back into our repository ===
Line 57: Line 42:
== How to check a translation when another language is installed ==  * Automatic exporting from Rosetta into the docteam tree is not implemented. So here is what happens.
 * When a good time comes to import the translations, the translations can be downloaded from rosetta (for example, the "Download Translations link [https://launchpad.net/distros/ubuntu/dapper/+source/ubuntu-docs/+pots/desktopguide here]).
 * The tarball as imported from Rosetta is placed in the relevant document's directory (for example ''branches/dapper/ubuntu/desktopguide'').
 * The translation script (''translate.sh'') is then used to unpack the tarball, and convert the translations back to xml in the appropriate directory.
 * The script also checks the resulting xml for validity, and there are generally errors that must be corrected which are displayed onscreen. This must be done manually.
Line 59: Line 48:
{{{
sudo dpkg-reconfigure locales
}}}
Choose the locale of your choice.
Then :
{{{
LANG=<locale>
yelp ghelp:about-ubuntu
}}}
Replace about-ubuntu by either document of your choice.
That's it!
Line 70: Line 50:
== Todo ==

 * Translation of screenshots - The current method that we have for doing this is to install the relevant language packs and to take the screenshots manually (see TakingScreenshots). This is obviously not the easiest way, so any suggestions are welcome. Thanks!
  * There is a script to automate making screenshots in KDE, but I am not sure how useful it is: http://www.kde.org/kdeslides/fosdem2006/2006-02-sander-screenshot-automation/html/slide_1.html

Translating Ubuntu Documentation

If you are a translator, and are interested in helping out translating the Ubuntu documentation into your language, all you need to know is how to use the [http://launchpad.net/rosetta Rosetta translation system]. You can find out how to use that on the ["Rosetta"] wiki page. Once you have learnt all of this, the docteam documents can be found in several places: [https://launchpad.net/distros/ubuntu/dapper/+source/ubuntu-docs ubuntu-docs], [https://launchpad.net/distros/ubuntu/dapper/+source/kubuntu-docs kubuntu-docs], and [https://launchpad.net/distros/ubuntu/dapper/+source/xubuntu-docs xubuntu-docs]. That's it!

The rest of this page is a description of how the Documentation Team work gets translated and inserted into Ubuntu. It is primarily intended for reference of the Documentation Team: translators do not need to know all this information.

Package Requirements

To install all packages required to build ubuntu-docs, including translations, run:

  • apt-get build-dep ubuntu-docs

Process

There are three steps to getting documentation translated:

  1. generating a translation template
  2. letting the translators work their magic
  3. importing the translations back into our repository

These are taken in turn below.

1. Generating a translation template

  • When an English XML document is ready for translation, we make a POT file, which is the template that translators use. To make this, we use the command:
    • xml2po -e -o output.pot input.xml.

  • For documents spread over more than one file, these can be included as follows:
    • xml2po -e -o output.pot chapter1.xml chapter2.xml

  • For documents which have an omf file, these should also be included in the pot file.
  • As a result, generally the appropriate command is:
    • xml2po -e -o output.pot C/*.xml C/*.omf

2. Letting the translators work their magic

  • The pot file should then be uploaded to rosetta. This is done automatically if the pot is in a source deb package uploaded into the current version of Ubuntu, if not, it must be done manually with the help of the Rosetta Administrators.
  • Translators then do the rest!

3. Importing the translations back into our repository

  • Automatic exporting from Rosetta into the docteam tree is not implemented. So here is what happens.
  • When a good time comes to import the translations, the translations can be downloaded from rosetta (for example, the "Download Translations link [https://launchpad.net/distros/ubuntu/dapper/+source/ubuntu-docs/+pots/desktopguide here]).

  • The tarball as imported from Rosetta is placed in the relevant document's directory (for example branches/dapper/ubuntu/desktopguide).

  • The translation script (translate.sh) is then used to unpack the tarball, and convert the translations back to xml in the appropriate directory.

  • The script also checks the resulting xml for validity, and there are generally errors that must be corrected which are displayed onscreen. This must be done manually.

That's it!


CategoryDocteam

DocumentationTeam/Translation (last edited 2014-07-02 21:01:40 by belkinsa)