[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Example of commented POT file
From:       Stephan Kulow <coolo () itm ! mu-luebeck ! de>
Date:       1999-06-02 15:19:35
[Download RAW message or body]

Aaron Levinson wrote:
> Hmm, msgmerge doesn't work on my machine.  If there is a slight difference
> between the new POT file and the old one (like a new string), msgmerge
> complains and exits.  The only merge tool on my machine that I could get
> to work was tupdate.  If you have a way to merge the comments of the old
tupdate isn't part of gettext-0.10.35, but 0.10. To use 0.10 is very
dangerous
as it has some grave bugs.

> POT file with the new one, that is fine, since I was able to use tupdate
> to merge the comments into the translated PO files.  I only have to do
> ediff once, just for the base POT file.  After that, the comments
> automatically get inserted into the translated PO files.
Well, for the CVS apps, the POT files are created each night. I wouldn't
like to get up to use ediff then ;)

I got tupdate now and rewrote it to my needs. The real merging is done
by
msgmerge (which works _much_ better and more reliable than tupdate). And
tupdate only merges the comments in the PO file. 

The whole merging process looks now like this:

egrep -e '^#|^msgid' $file  |  perl -np -e 'exit if /msgid/;' > test.po
egrep -v '^#[^,~]' $file | egrep '^.*[^ ]+.*$$' | grep -v
"\"POT-Creation" >> test.po
msgmerge --no-location test.po $template > test2.po
perl ./tupdate test2.po $template > test3.po
mv test3.po $file

> 
> This latter process, in script form is done as follows (keep in mind that
> I'm not a script writer, and I'm probably doing extra work in as
> unelegant a form as possible....):
> # DOS to UNIX just in case, I found ccp on Freshmeat
> ccp -d2u de/kmp3.po de/kmp3-2.po
> # get rid of comments in translated PO file
> sed '/^#/d' de/kmp3-2.po > de/kmp3.po

_very_ dangerous. Have you ever heard of fuzzy entries and that they are
marked with a comment?

> # merge base POT file (and comments) into translated PO file
> tupdate kmp3.po de/kmp3.po > de/kmp3-2.po
tupdate doesn't provide fuzzy logic - this may explain the former ;)

> # move temp file over actual file
> mv de/kmp3-2.po de/kmp3.po
> 
> This assumes that you already have a base POT file that is commented.
> 
> I'm trying to get someone to write a Perl script that will take the
> comments (just the comments) out of an old POT file and copy them into a
> new POT file.  It would ignore the filename and line locations and just
> look at the actual strings.  I don't know Perl, but this guy does, and he
> wants to contribute, so maybe....
> 
Well, this perl script does already exist ;)

And if kmp3 would be in kdemultimedia, you wouldn't have to worry at all
;)

What we need now are programmers that actually comment their POT files.

Greetings, Stephan

-- 
As long as Linux remains a religion of freeware fanatics,
Microsoft have nothing to worry about.  
                       By Michael Surkan, PC Week Online

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic