Translation
Size: 6378
Comment: imported from the old wiki
|
Size: 6649
Comment: added edubuntu-docs pacakge reference
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= DocteamStepByStepl18n = | [[Include(DocumentationTeam/MenuBar)]] |
Line 3: | Line 3: |
== Introduction == | = Introduction = |
Line 5: | Line 5: |
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 documentation requires some special considerations which do not apply when translating programs. This page contains instructions for translators and an explanation of the toolchain used to convert the documentation into translation templates and back again. |
Line 7: | Line 7: |
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). | = For Translators = Ubuntu documentation uses Rosetta as a translation portal, as with the rest of Ubuntu. For explanations of how to use Rosetta, see the ["Rosetta"] page. The documentation can be found in the following packages: {{{ubuntu-docs}}}, {{{kubuntu-docs}}}, {{{edubuntu-docs}}} and {{{xubuntu-docs}}}. There are a number of specific considerations to bear in mind when translating documentation. attachment:IconsPage/IconNote.png ''Failure to observe these instructions will result in the translated document breaking.'' 1. '''Tags should not be translated.''' Where you see a tag in the translation (for example: "{{{<xref linkend="free-software"/>}}}"), the tag and anything inside the tag itself should not be translated. It is very important to copy and paste these tags '''exactly''' as they appear in this English. The exception to this is where a tag contains a URL where there is an equivalent translated URL. In those cases the translator should use discretion about whether to localise the URL. 1. '''Entities should not be translated.''' Where you see a phrase expressed like "{{{>}}}", do not change this. 1. '''Always maintain the order of tags.''' When you see different tags nested inside each other (for example: "{{{<menuchoice><guimenu>System</guimenu><guimenuitem>Administration</guimenuitem><guimenuitem>Users and Groups</guimenuitem></menuchoice>}}}", you must always preserve that order carefully - copying and pasting from the English is the best way to ensure that you do this correctly. Only translate the words inside the tags. 1. For full English copies of the various guides to give you context while translating, click System -> Help -> System Documentation (in Ubuntu Dapper), or simply open Khelpcenter (in Kubuntu Dapper). Alternatively, all the guides are available to browse at http://doc.ubuntu.com 1. The documents are not automatically imported into Ubuntu (like the translation of programs). They need to be exported and uploaded manually to the packages. The documentation team will take care of this on occasions. If you have any questions, please ask on the [https://lists.ubuntu.com/mailman/listinfo/ubuntu-translators ubuntu-translators] mailing list: or the [https://lists.ubuntu.com/mailman/listinfo/ubuntu-doc ubuntu-doc] mailing list. == Testing translations == You can now test the translations you've done in Rosetta by inserting them into our repository and viewing them in Yelp. 1. Download the LANG.po file for a particular document (these instructions use the example of the french (fr) translation of the {{{internet}}} document from https://launchpad.net/ubuntu/feisty/+source/ubuntu-docs/+pots). 1. Get the feisty branch of our repository:{{{ sudo apt-get install subversion svn checkout https://docteam.ubuntu.com/repos/branches/feisty ubuntu-docs}}} 1. Browse to the ubuntu directory{{{ cd ubuntu-docs/ubuntu}}} 1. Insert the new LANG.po file in the relevant document folder, under the {{{po}}} subfolder:{{{ mv ~/Desktop/fr.po internet/po/}}} 1. Run the translate script and choose the relevant document and language:{{{ ./translate.sh -d internet -l fr}}} 1. The script will update the docbook xml for your document and language and will check the file created for validity. It will print any errors as output. 1. Open the file in yelp:{{{ yelp internet/fr/internet.xml}}} '''NOTE:''' if you wish to make any changes to the translation, you should do so in Rosetta. = For Documentation Team Members = 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 52: |
* 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 58: |
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 63: |
== File Naming Convention == | These are taken in turn below. |
Line 29: | Line 65: |
* 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 67: |
== 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}}} * '''IMPORTANT:''' 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 75: |
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 77: |
* 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 80: |
* 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 82: |
== 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. * Now, we check which translations have been updated, and which are *completely* new: {{{svn status}}} * If there are completely new translations, these need to be added to the relevant Makefile for building html, and to the packaging for {k}{x}ubuntu-docs. |
Line 63: | Line 91: |
{{{ 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 93: |
== 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 |
Include(DocumentationTeam/MenuBar)
Introduction
Translating documentation requires some special considerations which do not apply when translating programs. This page contains instructions for translators and an explanation of the toolchain used to convert the documentation into translation templates and back again.
For Translators
Ubuntu documentation uses Rosetta as a translation portal, as with the rest of Ubuntu. For explanations of how to use Rosetta, see the ["Rosetta"] page.
The documentation can be found in the following packages: ubuntu-docs, kubuntu-docs, edubuntu-docs and xubuntu-docs.
There are a number of specific considerations to bear in mind when translating documentation.
attachment:IconsPage/IconNote.png Failure to observe these instructions will result in the translated document breaking.
Tags should not be translated. Where you see a tag in the translation (for example: "<xref linkend="free-software"/>"), the tag and anything inside the tag itself should not be translated. It is very important to copy and paste these tags exactly as they appear in this English. The exception to this is where a tag contains a URL where there is an equivalent translated URL. In those cases the translator should use discretion about whether to localise the URL.
Entities should not be translated. Where you see a phrase expressed like ">", do not change this.
Always maintain the order of tags. When you see different tags nested inside each other (for example: "<menuchoice><guimenu>System</guimenu><guimenuitem>Administration</guimenuitem><guimenuitem>Users and Groups</guimenuitem></menuchoice>", you must always preserve that order carefully - copying and pasting from the English is the best way to ensure that you do this correctly. Only translate the words inside the tags.
For full English copies of the various guides to give you context while translating, click System -> Help -> System Documentation (in Ubuntu Dapper), or simply open Khelpcenter (in Kubuntu Dapper). Alternatively, all the guides are available to browse at http://doc.ubuntu.com
- The documents are not automatically imported into Ubuntu (like the translation of programs). They need to be exported and uploaded manually to the packages. The documentation team will take care of this on occasions.
If you have any questions, please ask on the [https://lists.ubuntu.com/mailman/listinfo/ubuntu-translators ubuntu-translators] mailing list: or the [https://lists.ubuntu.com/mailman/listinfo/ubuntu-doc ubuntu-doc] mailing list.
Testing translations
You can now test the translations you've done in Rosetta by inserting them into our repository and viewing them in Yelp.
Download the LANG.po file for a particular document (these instructions use the example of the french (fr) translation of the internet document from https://launchpad.net/ubuntu/feisty/+source/ubuntu-docs/+pots).
Get the feisty branch of our repository:
sudo apt-get install subversion svn checkout https://docteam.ubuntu.com/repos/branches/feisty ubuntu-docs
Browse to the ubuntu directory
cd ubuntu-docs/ubuntu
Insert the new LANG.po file in the relevant document folder, under the po subfolder:
mv ~/Desktop/fr.po internet/po/
Run the translate script and choose the relevant document and language:
./translate.sh -d internet -l fr
- The script will update the docbook xml for your document and language and will check the file created for validity. It will print any errors as output.
Open the file in yelp:
yelp internet/fr/internet.xml
NOTE: if you wish to make any changes to the translation, you should do so in Rosetta.
For Documentation Team Members
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:
- generating a translation template
- letting the translators work their magic
- 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
IMPORTANT: 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.
- Now, we check which translations have been updated, and which are *completely* new:
svn status
- If there are completely new translations, these need to be added to the relevant Makefile for building html, and to the packaging for {k}{x}ubuntu-docs.
That's it!
DocumentationTeam/Translation (last edited 2014-07-02 21:01:40 by belkinsa)