-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday, 2010-04-01 at 21:39 +0200, Freek de Kruijf wrote:
Hi,
Recently updated .pot files appeared in trunk webyast. However updated (merged) .po files did not appear. So I tried to do the merging myself. Because doing it all by hand did not seem smart, so I designed a script to do that, also for yast and lcn.
I wrote another script, but only for webyast. I took an already existing script from lcn or yast as a base - those scripts live in the "50-tools/" directory, something "*merge". The problem is that they are not documented, we don't know their intended use. #!/bin/bash log=log.txt :>$log # Set to echo for debugging #echo=true echo=echo # set -x fromdir=~/Projects/babel/SuSE/trunk/webyast potdir=00-pot memdir=50-memory check_file () { [ -f $1 ] || { echo "*** file $1 does not exist" ; exit 1 ; } } check_dir () { [ -d $1 ] || { echo "*** directory $1 does not exist" ; exit 1 ; } } file_by_file () { fromdirpo="$fromdir/es/po" fromdirpot="$fromdir/$potdir" #$echo $fromdirpo #$echo $fromdirpot check_dir $fromdirpot for pot in $fromdirpot/*.pot; do check_file $pot textdomain=${pot##*/}; textdomain=${textdomain%\.pot} echo es/po/$textdomain.es.po | tee -a $log po=$fromdirpo/$textdomain.es.po if [ -f $po ]; then msgmerge --previous --update --backup=simple $po $pot else $echo " --> no existe $po, creandolo" | tee -a $log msginit --no-translator --locale=es_ES.utf8 --input=$pot --output=$po fi $echo echo done } [ -z "$fromdir" ] && { echo "*** from DIR missing; exiting" exit 1 } file_by_file And I see that I wrote another such a script long ago, on this desktop (the one I mention above I was using the portable and away from most of my scripts).
I assumed that by checking the POT-Creation-Date in the .pot and the corresponding .po file would give me an indication whether to use msgmerge or leave things alone. However I found .pot files without a POT-Creation-Date line.
I do a merge when I see the warning in "vertal". Another hint can be taken from the catalog tool kbabel uses, comparing the number of messages in the pot and po files.
I also found a file in the .../nl/po/ directory which did not end on .nl.po but only on .po
That's probably the fault of someone in your team; you can use "svn log somefile" and learn who created it. You can use "svn move" to rename it.
Will this be improved or do we have to work with these inconsistencies?
Some things need manual interaction, I think. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAku1A/EACgkQtTMYHG2NR9Uz/QCbBqkDGZfU2qBifU7HlolOPn+N Vk4An3O8lDvJAw9rf0hreuAx9a2jY8R0 =9IUo -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-translation+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-translation+help@opensuse.org