Note: Currently new registrations are closed, if you want an account Contact us

Difference between revisions of "Po file editing"

From FSCI Wiki
(verification and statistics)
Line 35: Line 35:


See [http://d-i.alioth.debian.org/i18n-doc/apf.html more about gettext (po) file editors]
See [http://d-i.alioth.debian.org/i18n-doc/apf.html more about gettext (po) file editors]
==Validation==
You can check if there is any obvious mistakes by running the following command
msgfmt -c <file.po>
You will need [http://www.gnu.org/software/gettext/ GNU gettext] package for this command.
Also you can see the details of how many strings translated, how many remains untranslated, how many fuzzy translations are there ... by running the following command
msgfmt --statistics <file.po>


==Collaboration==
==Collaboration==

Revision as of 22:26, 17 December 2006

Some Basics

A .po file is a plain text file.

if you are not familiar with the PO format, gettext documentation is worth reading, especially sections dedicated to this format, e.g. by running:

        info -n '(gettext)PO Files'
        info -n '(gettext)Header Entry'

Note down the string that you wish to translate, translate it and then replace it as shown in the example below. For example

Before

#. Type: text
#. Description
#: ../main-menu.templates:3
msgid "Debian installer main menu"
msgstr ""

After (for example if it is Hindi)

#. Type: text
#. Description
#: ../main-menu.templates:3
msgid "Debian installer main menu"
msgstr "डेबियन संस्थापक मुख्य मेन्य"

Please don't translate variables ( like ${PORT} ). Also check the comment to see if you should should not translate some (like country name has to be in English).

Note: Don't forget to fill in the header information such as copyright, language team, last translator ...

PO file Editors

Even though po files are plain text files using an editor designed for po file editing is highly recommended. Most of these tools has advanced features such as format checking, rough translation...

See more about gettext (po) file editors

Validation

You can check if there is any obvious mistakes by running the following command

msgfmt -c <file.po>

You will need GNU gettext package for this command.

Also you can see the details of how many strings translated, how many remains untranslated, how many fuzzy translations are there ... by running the following command

msgfmt --statistics <file.po>

Collaboration

There are web based tools like pootle and entrans which support collaborative editing.

Also we have basic protocol to collaboratively edit po files on a wiki. This can be useful if you are planning to translate it offline.

Start by claiming or blocking your portion by adding

# --> <put your name here> Starting from here
# .... 

At the starting and

# ...
# --> <put your name here> Ends here
# ...

At the end (ie, on top of the last string you have claimed, see how it is done already if you are not clear)


And don't translate strings which are already claimed which will be lead to effort duplication. You can check if some portion is claimed/blocked by searching for "# -->" (press CTRL+F and type this)

I suggest you create a .po file by combining the headder from this file and the portions which you bolcked and use a po file editor like kbabel to translate. It has many options including that of checking the file for mismatches. Please check for correctness before you put it back on wiki.

The steps are explained with the help of a digram here

Steps in blocking a portion and updating the translations

More Info