Re: po cleaning and good "diff"-ing; help us



Am Tue, 28 Sep 2010 14:57:53 +0900 (JST)
schrieb Teika Kazura <teika lavabit com>:

> If you know po file or how to take "good" diff to resolve edit
> conflicts, please help us.
> 
> Old fragments seem to remain in *.po. For example, the top line of the
> following seems to be a comment line, which starts with "#", not "#.":
> 
> # ../lisp/menus.jl
> #. ../themes/mxflat/theme.jl
> #. ../themes/gradient/theme.jl
> msgid "vertical"

That's right. I guess it's because it's in comment format rather than file format.

> Some lines seem outdated at all:
> 
> #, fuzzy
> #~ msgid "Arguments given to the `xterm' command."

Not in general. #, fuzzy simply means, that the original string changed after the
translation was done. example:

original "Have a nice day!"
translated "Einen schönen Tag!" (german)

new original "Have a nice day."
translated "Einen schönen Tag!"

another examle:

original: "Hvae a nice day!"
translated "Einen schönen Tag!"

new original "Have a nice day!"
translated "Einen schönen Tag!"

So fuzzy strings simply need to be checked and fixed (1st example) or unmarked (2nd
example).

> (What's "#~"?)

#~ is a string that doesn't exist anymore in the program, but is not yet removed from the
translation. You simply delete them via your editor. Or keep them.

> Are there easy way to clean them up? I tried Emacs po-mode, but
> it doesn't help much.
> # po_es, the Spanish, is well maintained and a browse gave me the
> # impression that it's clean, but many po's are not.
> 
> 
> I'd also like to ask how to take diff to match our aim. Two updates of
> a po file is submitted independently, but the based pot files differ.
> I'd like to ask Gnome translation team to review them, so we should
> take "diff" in a human readable way.

Before creating sawfish.pot, run autogen.sh and make again, then go into po/
and issue ./make-pot. Update a .po file via ./update.sh [LANG], where [LANG] is the two
or four letter code, eg ./update.sh de or ./update.sh en_GB. 

Normally you rebuild the .po file against the latest .pot rather than diffing.
Because:
	- changed strings are marked fuzzy
	- new strings are untranslated
	- removed strings are marked as such

taking a diff between both is not necessary.

If you want to diff two .po files, I would rebuilt both of them and then simply do `diff
-u po1.po po2.po'.

> In po files, "msgid" strings seem to be the key, so it'll be good if
> items of the same key can be compared side-by-side. (But msgid can be
> multi-line.)

Strings which are the same are grouped together, so that they can be translated at once.
If similar strings aren't grouped, maybe it's a whitespace issue. (say a leading or
trailing space in one of the two occurences.)



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