[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Installation Guide .pot strings out of order



On 09/17/2009 01:34 AM, John J. McDonough wrote:
----- Original Message ----- From: "Tomek Chrzczonowicz" <chrzczonowicz gmail com>
To: <fedora-docs-list redhat com>
Sent: Wednesday, September 16, 2009 10:56 AM
Subject: Installation Guide .pot strings out of order
the order of strings in .pot files (translation templates)
doesn't match the one in the source text
The current version of Transifex requires us to jump through all sorts of hoops to create the pot files. It is unlikely that we can maintain the order, even if it were a permanent fix. The problem should be corrected with the updated tfx. We had hoped to see the updated version in time for F12 but I guess that isn't going to happen.

Hi Tomek,

What John says is correct, but I'll try to explain with slightly more detail. (I'll explain from first principles, so please be patient if you already know some of this!)

All of our longer texts are made up of multiple XML files. This makes them easier to write and to maintain, especially when more than one person works together on a text. In the case of the Installation Guide, this amounts to around 700 separate files.[1]

Our publication tool, Publican,[2] then transforms each of these XML files into a POT file, and then into PO files for each language. The order of the strings in the POT files and PO files matches the order of the strings in the original English XML files. You can see Publican's set of POT files for the Installation Guide here [3] and Publican's set of Polish PO files here [4].

Normally, these files are what translators of Publican documents should be working with. However, the version of Transifex in Fedora (version 0.5) does not support more than *one* POT file for the document, and *one* PO file per language.

To work around this limitation, we have used msgcat[5] to merge all the POT files into one giant POT file (nearly 4,000 strings!) and merge all the PO files for each language into one giant PO file for each language. Msgcat groups the strings from the individual POT/PO files primarily in *alphabetical order of the name of the original POT/PO file* (which of course, is the same as the name of the XML file from which each POT/PO file was generated originally). This is why you are seeing strings in an order different from how they appear in the published book. However, /within/ each of those groups, the strings do actually occur in the same order as they do in the source text.

To finish the story, once translators have finished their work, we must then split up the giant PO files into the individual, small PO files again so that we can publish the translated book. Unfortunately, the whole process is not 100% reliable, and occasionally, a few translated strings get lost in the process of merging all the PO files together and splitting them apart again.

Sometime after the release of Fedora 12, the Fedora Project is due to upgrade to Transifex 0.7. This supports multiple POT files and multiple PO files per language, meaning that translators will have access to the PO files generated by Publican itself. Note that this doesn't completely solve your problem if you want to work on a book in exactly the same order as the text will appear in the finished book, because if you want to work that way, you will need to identify which of the 700 PO files contains the text that you want to work on. The easiest solution would be to grep through the directory until you find the file that you want (this is also how we writers find sections that we need to correct or update). Of course, you can also use Gtranslator or Lokalize to search for the string in the huge PO files that we have now.

Hope this helps, and as always, thank you! for the hard work and dedication that you put into translating our docs.

Cheers

Ruediger




[1] http://git.fedorahosted.org/git/docs/install-guide.git?p=docs/install-guide.git;a=tree;f=en-US;hb=HEAD

[2] https://fedorahosted.org/publican/

[3] http://git.fedorahosted.org/git/docs/install-guide.git?p=docs/install-guide.git;a=tree;f=pot;hb=HEAD

[4] http://git.fedorahosted.org/git/docs/install-guide.git?p=docs/install-guide.git;a=tree;f=pl;hb=HEAD

[5] http://www.gnu.org/software/hello/manual/gettext/msgcat-Invocation.html


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]