[sane-devel] First try dutch translation

Laurent-jan ljm at xs4all.nl
Fri Feb 28 20:05:08 GMT 2003


Hi martin & Bertrik

Before eventually making a new translation, I tried to see what
translations were done and how they translated terms. I made the
script attached to this mail to make a comparaison.

Since you are comparing two translations, it may be of use to you.


ljm



-- 
(c) ljm @ xs4all . nl.  No part of this copyright message may be
reproduced, read or seen, dead or alive or by any means, including
but not limited to telepathy  without the benevolence of the author.

-------------- next part --------------
#!/bin/bash

# accumulate all in a single file


for f in `ls sane-backends.*.po` ; do
	lan=`echo $f | awk -F. '{print $2}'`
	cat  $f |
	awk -F\" '
	/^\#: .*/ {
        	state=1
	}
	/^$/ {  
		printf("\n")
        	state=0
	}
	/^msgid.*/ {
		if (state != 0 ) {
			print "ERROR PARSING FILE"
			state=0
			
		}
		if ($2 != ""){
			printf("%s", $2)
		}
        	state=2
	}
	/^msgstr.*/ {
		if (state==2){
			printf("|%s|",lan)
			if ($2 != ""){
				printf("%s", $2)
			}
		}
        	state=3
	}
	/^".*/{
        	if (state==2) printf("%s",$2)
        	if (state==3) printf("%s",$2)
	}'  lan=$lan >> /tmp/a$$
	
done

sort /tmp/a$$ | egrep -v '^$'| awk -F\| '
BEGIN{
	print "<html>"
	print "<body>"
	print "<table>"
}
{
	if ($1 !=lst){
		lst=$1
		print "</table><table border>"
		printf("<tr><td colspan=2>%s</td></tr>\n",$1)
	}
	printf("<tr><td>%s</td><td>%s</td></tr>\n",$2,$3)
}
END { print "</table>" }
' | grep -v '<tr><td></td><td></td></tr>'


More information about the sane-devel mailing list