This is a multi-part message in MIME format.
--------------060901030903000702050404
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

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.


--------------060901030903000702050404
Content-Type: text/plain;
 name="mkhtml.sh"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="mkhtml.sh"

#!/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>'

--------------060901030903000702050404--

Reply via email to