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

Difference between revisions of "Po file editing"

From FSCI Wiki
(More details about the po file format added)
(more info added)
Line 17: Line 17:
</pre>
</pre>


After
After (for example if it is Hindi)
<pre>
<pre>
#. Type: text
#. Type: text
Line 23: Line 23:
#: ../main-menu.templates:3
#: ../main-menu.templates:3
msgid "Debian installer main menu"
msgid "Debian installer main menu"
msgstr ""
msgstr "डेबियन संस्थापक मुख्य मेन्य"
</pre>
</pre>
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).
==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 [http://d-i.alioth.debian.org/i18n-doc/apf.html more about gettext (po) file editors]
==Collaboration==
There are web based tools like [http://pootle.wordforge.org/ pootle] and [http://entrans.sourceforge.net 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
<pre>
# -->(name) Starting from here
# ....
</pre>
At the starting and
<pre>
# ...
# -->(name) Ends
# ...
</pre>
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.


==More Info==
==More Info==
* [http://www.gnu.org/software/gettext/manual/html_node/gettext_9.html#SEC9 .po file format]
* [http://www.gnu.org/software/gettext/manual/html_node/gettext_9.html#SEC9 .po file format]
* [http://d-i.alioth.debian.org/i18n-doc/apf.html More about gettext (po) file editors]
* [http://d-i.alioth.debian.org/i18n-doc/apf.html More about gettext (po) file editors]

Revision as of 17:29, 7 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).

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

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

# -->(name) Starting from here
# .... 

At the starting and

# ...
# -->(name) Ends
# ...

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.

More Info