Rhonda's Blog                    
 
Mainpage Disclaimer

Fri, 20 Jul 2007

msgmerge --previous and poedit

Since quite a while gettext has support for a feature which I was waiting for since ages: --previous. It means that when a string gets marked fuzzy it adds the previous original string as a comment so one is able to see the difference which led to the fuzzy marking. This makes translation of po files much much more comfortable because one can easily find out now what has changed. Let me give you a reallife example:

#: data/core/help.cfg:331
#, fuzzy
#| msgid "race^Mechanical"
msgid "trait^Mechanical"
msgstr "Kriegsgerät"

With out the previous string (in the "#|" line) you would propably be puzzled about what has changed because the string gets stripped off the everything before the ^ for displaying it in this case.

Though, not all translation tools behave correctly. One of them is unfortunately poedit. It moves the previous string to a wrong place and thus breaks the parsing of the file. A bugreport has been filed about it—but unfortunately it also means that upstream projects that already support (like Wesnoth) it are considering disabling it again because of this. So I wrote quickly a perl script that is able to fix that for you: pofix.pl. It's quite simple, reads from stdin and writes to stdout.
Go and support --previous before your competitors do it and hijack all your translators! ;)

/debian | permanent link | Comments: 0

Trackbacks are closed for this story.

Comments are closed for this story.


 
Feeds
If you want to syndicate this blog, feel free to do so.
This list contains the feeds that I follow:

 
Calendar
December
Sun Mon Tue Wed Thu Fri Sat
22 23 24 25 26 27 28
29 30 31        

2024
Months
Dec

 
About
©opyright 1999++ by Rhonda
[rss feed]

[html by vim] [graphics by gimp]

[generated by wml]

[powered by blosxom]