Translation

Differences between revisions 1 and 14 (spanning 13 versions)
Revision 1 as of 2005-05-28 21:09:01
Size: 6378
Editor: adsl-213-190-44-43
Comment: imported from the old wiki
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 1: Line 1:
= DocteamStepByStepl18n = ## page was renamed from DocteamStepByStepl10n
## page was renamed from DocteamStepByStepl18n
Line 3: Line 4:
== Introduction == == Translating Ubuntu Documentation ==
Line 5: Line 6:
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. 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!
Line 7: Line 8:
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.ubuntu.com/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.ubuntu.com/distros/ubuntu/hoary/+sources/ubuntu-docs/+translations here] (don't forget to login). 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.
Line 11: Line 12:
  * poxml from kdesdk
  * 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. With {{{pwd trunk/}}} do {{{make pot}}}.
 0. Pot files in the source debs uploaded to the hoary archives are automatically imported into [http://launchpad.ubuntu.com/rosetta Rosetta]. The exception to this is where there are more than one .pot file in a directory, in which case automatic upload is not yet implemented.
  * Note: BREEZY BADGER (Ubuntu 5.10) is not yet in Rosetta: only hoary is there at the moment.
 0. Documents are translated via the [http://launchpad.ubuntu.com/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 and commit them to the relevant section of the Docteam Repository. There are some scripts in the teamstuff/ directory that may be used to check (when passed with the -s flag) and download the relevant po files (when passed without), but as of yet they have not been modified to place the po files in the correct directory structure of our trunk repository.
  * ''Here's the tricky bit.''
   * Given that not very many translations of our docs got into Hoary, and given that Rosetta is currently working on Hoary, we thought it would be nice if some translations of the Docteam work could make it into Hoary. This would require a fairly complicated bilateral regime:
    * HOARY: First of all, new translations for hoary cannot be committed to TRUNK, given that this is already in Breezy mode. Rather, they will be committed to the TAGGED release. Then the xml files can be created using the {{{make po}}} script, and a new package built and uploaded. Note: we need to get permission for uploads of this type.
     * Update on permission: I have now spoken to MattZimmerman today about the possibility of uploading ubuntu-doc updates to hoary with added translations: he was positive about the idea, and on a side note mentioned that in the end it might be desirable to add translated documentation to language packs.
    * BREEZY: We will be continuing to work on Breezy documents, and these will be uploaded to Rosetta and translated in the manner described above. However it is also useful if we can avoid translators having to work on things which have already been translated for Hoary (given that some parts of the documentation will remain the same). This will require merging .po files in the hoary/tag branch into the current trunk.
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 27: Line 23:
== File Naming Convention == These are taken in turn below.
Line 29: 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 41: 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 43: 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 45: 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 58: Line 40:
 * Script "make-po" does not check XML markup (Valid and Well-formed). If nn.po contains errors, the nn.xml will contain errors. Fix nn.po file not nn.xml. Then do {{{make po}}} and check nn.xml with {{{./validate}}}
 * 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 61: 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 63: 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 74: 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!
----
CategoryDocteam

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)