GNOME Bugzilla – Bug 369510
Allow translation of the user manual with .po files
Last modified: 2009-10-20 09:55:33 UTC
As was discussed on http://lists.xcf.berkeley.edu/lists/gimp-docs/2006-September/000383.html and described on wiki: http://wiki.gimp.org/gimp/GimpDocsWorkflow There is a patch about it and here is Roman's opinion: > I think it'll make sense, if we wait until the UI freeze of GIMP 2.3. > Than we can do a branch and create the docs for the upcoming 2.4 > release. Thats the time where we can also introduce your proposed way of > using xml2po. > I think several authors will like it. Moreover, Vitaly is now working on translation of menus subdir into Russian with po file.
Created attachment 75861 [details] Proposed patch
This patch should go in the TRUNK as soon as possible now.
Time to get this patch into our SVN. -> assign
Nickolay, can you give me short introduction about what the patch provides? I just applied it and want to verify if it really works :)
On build it checks if po file for language exists in current directory. If it is there, after profiling it also adds translation from po file instead of english messages and then filters everything. xml2po is a bit modified to satisfy our needs (it marks nodes with language attribute while original one just drops it).
Okey, I fiddled a bit with the xml2po program. 1. How can I extract only language specific strings? (Like I want to extract only german from gimp.xml) 2. It seems that the backmerge doesn't work correctly. The result of the russian HTML has now two headings for 'text and path'. Did I something wrong or how does this supposed to work?
1. Sorry, I don't quite understand. The file extracted has pot format it means it has only English strings marked for translation while actual translations are empty. Do you want to get already translated to german po file? It will be a bit more complicated task. xml2po has --reuse option to extract such things, but the issue is that both translated and original xml documents should have exactly the same structure. It's certainly not true for our docs. So I would say it's requires work. 2. Right, it's an issue. If string is translated both in po file and in xml it will be duplicated. I see no easy way to deal with it. Currently translator should remove all strings from xml document one he translated them in po file.
1. So - I'm fine with creating po template for only one reference language, e.g. English. But this didn't work for me either. The pot template I created lists all strings including foreign language. I tried with the '-l' option but it didn't work either. Maybe I'm doing it in a wrong way... 2. Hm ... okey. The authors need to deal with this issue anyways and it seems to be the cleaner way of handling those translations. That'll be fine I think. I'll use this discussion here to put this into a README file for our authors. To start quickly if they want to use the *.po approach. BTW. can we probably use an svn:external pointing to the gnome-docutils or maybe better, integrating it into our configure process. So people need to have the gnome-docutils installed. Or is this a customized version for our manual?
1. Po creation is a bit tricky. You have to profile file for english first and only then you should extract strings with xml2po. 3. About using external xml2po, it's actually modified to meet our needs and probably more modifications will be required, for example we might want to fire warning if strings are duplicated as in 2. But I agree we should try to merge our changes back to xml2po. Ok, I'll try to look on the issues listed, probably some will be resolved.
I'd like to postpone this feature to the next release. Would that be okey for you?
Sure it's fine, Heh, I need more time to sort it out.
Thanks. -> 0.13Release
Today I've just updated the translation for menus subdir Vitaly did since October. Results after Vitaly's translation: 513 translated, 651 untranslated. After update: 464 translated, 301 fuzzy, 905 untralnslated. So in 513 translations only 50 were lost. I've used the following command to update: for f in *.xml; do xsltproc --stringparam profile.lang en ../../stylesheets/profile.xsl $f > $f mv $f.new $f done xml2po -u menus.po *.xml
Created attachment 87513 [details] Po file after update, gzipped
I work on that now.
I schedule this to be fixed for the FUTURE. Currently I hope we have this fixed for the next release, but it seems that it needs some time to figure out how we do the migration.
Scheduling it for 2.6.0 release, since we're very close to finish this feature.
I think it's time to close this feature request...