Hi, On Mon, Aug 11, 2008 at 01:50:25PM +0200, Ulf-D. Ehlert wrote: > Nickolay V. Shmyrev (Sonntag, 10. August 2008, 13:45): > Nickolay V. Shmyrev (Sonntag, 10. August 2008, 14:47): > > Another thing I can't agree with is that po files are created for > > each xml file in sources. For me it seems like a waste of time, > > resources and this will drop one of main advantages of gettext - you > > can't share translation for a single string across document. > > > > I'd better recommend you to create per-chapter po file with > > > > xml2po -o pot src/chapter/*.xml Would that actually speed things a little bit up in comparison to merging the translations for every single po file? > [...] > The main (and most interesting) problem is how to save the translations, > since adding all translations to the po files with cut & paste is > obviously too much work. I was on vacation - sorry - but back on the construction scene now ;) I spend a few hours on figuring out a possible solution to save the translations by studying various sources (Nickolays proposed patch (bug 369510), the Mail conversation with Ulf who already had a look at xml2po and xml2po itself). I ended up by do the following scenario: 1. Profile the translation language as well into a subdirectory (e.g. de): cd oldsrc xsltproc --stringparam profile.lang "de" ../stylesheets/profile.xsl introduction.xml > introduction.xml.new mv introduction.xml.new ../de/introduction.xml 2. Reuse the translation to merge it into one po file: cd .. xml2po -r de/introduction.xml --output="po/de/foo.po" src/introduction.xml The foo.po now contains the english original msgids and the German translation. Did someone tried this actually? Ulf maybe? The only problem here is (of course), that the generated po file doesn't map 1:1 to the English original strings. This needs to be corrected by the author itself. Could still be a lot of work, but we don't have to copy & paste the whole manual. This means, we can do this in one shot: create for each translation a directory with the profiled xml files in it. Merge the translations to po files with English as a reference and check. The steps could be made manualy. Handy would be a small script for the authors of course. > It looks like 'xml2po' can do it if the English text and the translation > have "the same structure" [xml2po --help], but I'm afraid that for many > of our XML source files this is not true. (I didn't check it, though.) > > I thought (hoped) Roman was working on it... Yep doing it now :) Cheers! -- Roman Joost www: http://www.romanofski.de email: romanofski@xxxxxxxx
Attachment:
signature.asc
Description: Digital signature
_______________________________________________ Gimp-docs mailing list Gimp-docs@xxxxxxxxxxxxxxxxxxxxxx https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-docs