Mercurial > pidgin
comparison po/stats.pl @ 21100:29d8c86c14cd
propagate from branch 'im.pidgin.pidgin' (head cd2be742f6c45c200000003fc5a6341297bbe857)
to branch 'im.pidgin.cpw.khc.msnp14.soap' (head 1d7d51174ae87c7f03bb1290a8e447bf2a1704a5)
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Thu, 04 Oct 2007 06:13:01 +0000 |
parents | 54fa708ba54f |
children | 72f90ea7ae34 |
comparison
equal
deleted
inserted
replaced
20537:c49b886231d5 | 21100:29d8c86c14cd |
---|---|
24 | 24 |
25 | 25 |
26 use Locale::Language; | 26 use Locale::Language; |
27 | 27 |
28 $lang{'ca@valencia'} = "Catalan (Valencian)"; | 28 $lang{'ca@valencia'} = "Catalan (Valencian)"; |
29 $lang{'be@latin'} = "Belarusian (Latin)"; | |
29 $lang{en_AU} = "English (Australian)"; | 30 $lang{en_AU} = "English (Australian)"; |
30 $lang{en_CA} = "English (Canadian)"; | 31 $lang{en_CA} = "English (Canadian)"; |
31 $lang{en_GB} = "English (British)"; | 32 $lang{en_GB} = "English (British)"; |
32 $lang{my_MM} = "Burmese (Myanmar)"; | 33 $lang{my_MM} = "Burmese (Myanmar)"; |
33 $lang{pt_BR} = "Portuguese (Brazilian)"; | 34 $lang{pt_BR} = "Portuguese (Brazilian)"; |
34 $lang{'sr@Latn'} = "Serbian (Latin)"; | 35 $lang{'sr@latin'} = "Serbian (Latin)"; |
35 $lang{zh_CN} = "Chinese (Simplified)"; | 36 $lang{zh_CN} = "Chinese (Simplified)"; |
36 $lang{zh_HK} = "Chinese (Hong Kong)"; | 37 $lang{zh_HK} = "Chinese (Hong Kong)"; |
37 $lang{zh_TW} = "Chinese (Traditional)"; | 38 $lang{zh_TW} = "Chinese (Traditional)"; |
38 | 39 |
39 opendir(DIR, ".") || die "can't open directory: $!"; | 40 opendir(DIR, ".") || die "can't open directory: $!"; |
60 | 61 |
61 foreach $index (0 .. $#pos) { | 62 foreach $index (0 .. $#pos) { |
62 $trans = $fuzz = $untrans = 0; | 63 $trans = $fuzz = $untrans = 0; |
63 $po = $pos[$index]; | 64 $po = $pos[$index]; |
64 print STDERR "$po..." if($ARGV[0] eq '-v'); | 65 print STDERR "$po..." if($ARGV[0] eq '-v'); |
65 system("msgmerge $po.po $PACKAGE.pot -o $po.new 2>/dev/null"); | 66 system("msgmerge -U $po.po $PACKAGE.pot 2>/dev/null"); |
66 $_ = `msgfmt --statistics $po.new -o /dev/null 2>&1`; | 67 if (($? & 127) == 2) { |
68 printf STDERR "Caught keyboard interrupt--exiting\n"; | |
69 exit | |
70 } | |
71 $_ = `msgfmt --statistics $po -o /dev/null 2>&1`; | |
67 chomp; | 72 chomp; |
68 if(/(\d+) translated message/) { $trans = $1; } | 73 if(/(\d+) translated message/) { $trans = $1; } |
69 if(/(\d+) fuzzy translation/) { $fuzz = $1; } | 74 if(/(\d+) fuzzy translation/) { $fuzz = $1; } |
70 if(/(\d+) untranslated message/) { $untrans = $1; } | 75 if(/(\d+) untranslated message/) { $untrans = $1; } |
71 unlink("$po.new"); | |
72 | 76 |
73 $name = ""; | 77 $name = ""; |
74 $name = $lang{$po}; | 78 $name = $lang{$po}; |
75 $name = code2language($po) unless $name ne ""; | 79 $name = code2language($po) unless $name ne ""; |
76 $name = "???" unless $name ne ""; | 80 $name = "???" unless $name ne ""; |