After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 369510 - Allow translation of the user manual with .po files
Allow translation of the user manual with .po files
Status: RESOLVED FIXED
Product: GIMP-manual
Classification: Other
Component: General
git master
Other All
: Normal enhancement
: 2.6.0Release
Assigned To: Róman Joost
Róman Joost
Depends on:
Blocks: 515535
 
 
Reported: 2006-11-02 16:44 UTC by Nickolay V. Shmyrev
Modified: 2009-10-20 09:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (10.14 KB, application/x-gzip)
2006-11-02 16:44 UTC, Nickolay V. Shmyrev
Details
Po file after update, gzipped (110.06 KB, application/x-gzip)
2007-05-04 06:36 UTC, Nickolay V. Shmyrev
Details

Description Nickolay V. Shmyrev 2006-11-02 16:44:05 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.
Comment 1 Nickolay V. Shmyrev 2006-11-02 16:44:42 UTC
Created attachment 75861 [details]
Proposed patch
Comment 2 Róman Joost 2007-01-28 16:46:30 UTC
This patch should go in the TRUNK as soon as possible now.
Comment 3 Róman Joost 2007-02-10 10:41:50 UTC
Time to get this patch into our SVN.

-> assign
Comment 4 Róman Joost 2007-02-14 08:36:07 UTC
Nickolay, can you give me short introduction about what the patch provides? I just applied it and want to verify if it really works :)
Comment 5 Nickolay V. Shmyrev 2007-02-14 09:53:47 UTC
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).
Comment 6 Róman Joost 2007-02-28 21:37:58 UTC
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?
Comment 7 Nickolay V. Shmyrev 2007-02-28 21:45:54 UTC
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.
Comment 8 Róman Joost 2007-03-01 07:58:22 UTC
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?
Comment 9 Nickolay V. Shmyrev 2007-03-02 09:41:50 UTC
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.
Comment 10 Róman Joost 2007-03-06 08:44:55 UTC
I'd like to postpone this feature to the next release. Would that be okey for you?
Comment 11 Nickolay V. Shmyrev 2007-03-06 20:51:19 UTC
Sure it's fine, Heh, I need more time to sort it out.
Comment 12 Róman Joost 2007-03-06 21:37:41 UTC
Thanks. 

-> 0.13Release
Comment 13 Nickolay V. Shmyrev 2007-05-04 06:35:03 UTC
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
Comment 14 Nickolay V. Shmyrev 2007-05-04 06:36:04 UTC
Created attachment 87513 [details]
Po file after update, gzipped
Comment 15 Róman Joost 2008-06-14 08:05:53 UTC
I work on that now.
Comment 16 Róman Joost 2008-07-05 22:40:41 UTC
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.
Comment 17 Róman Joost 2008-10-01 19:46:17 UTC
Scheduling it for 2.6.0 release, since we're very close to finish this feature.
Comment 18 Ulf-D. Ehlert 2009-10-20 09:55:33 UTC
I think it's time to close this feature request...