Wed, 13 May 2009 20:29:03 +0000
Support custom smileys in MUCs (when all participants support BoB and a maximum
of 10 participants are in the chat).
Always announce support for BoB, since disable custom smileys will still turn
off fetching them, and BoB can be used for other purposes further on.
|
22143
778676c8ac77
Don't assume perl is at /usr/bin/perl, use /usr/bin/env instead. This is not
Richard Laager <rlaager@pidgin.im>
parents:
20802
diff
changeset
|
1 | #!/usr/bin/env perl |
| 7202 | 2 | |
| 11466 | 3 | # Copyright 2003-2005 Nathan Walp <faceprint@faceprint.com> |
| 7202 | 4 | # |
| 5 | # This program is free software; you can redistribute it and/or modify | |
| 6 | # it under the terms of the GNU General Public License as published by | |
| 7 | # the Free Software Foundation; either version 2 of the License, or | |
| 8 | # (at your option) any later version. | |
| 9 | # | |
| 10 | # This program is distributed in the hope that it will be useful, | |
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 13 | # GNU General Public License for more details. | |
| 14 | # | |
| 15 | # You should have received a copy of the GNU General Public License | |
| 16 | # along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
17713
diff
changeset
|
17 | # Foundation, Inc., 50 Temple Place, Suite 330, Boston, MA 02111-1301 USA |
| 7202 | 18 | # |
| 19 | ||
| 11466 | 20 | use POSIX qw(strftime); |
| 21 | ||
| 7202 | 22 | |
| 15828 | 23 | my $PACKAGE="pidgin"; |
| 9412 | 24 | |
| 25 | ||
| 7202 | 26 | use Locale::Language; |
| 27 | ||
| 13801 | 28 | $lang{'ca@valencia'} = "Catalan (Valencian)"; |
|
20131
23207d7d877c
applied changes from f6deeedd3d31f0863466fff4c81816aee12122a6
Richard Laager <rlaager@pidgin.im>
parents:
20130
diff
changeset
|
29 | $lang{'be@latin'} = "Belarusian (Latin)"; |
| 10058 | 30 | $lang{en_AU} = "English (Australian)"; |
| 8860 | 31 | $lang{en_CA} = "English (Canadian)"; |
| 8033 | 32 | $lang{en_GB} = "English (British)"; |
| 11472 | 33 | $lang{my_MM} = "Burmese (Myanmar)"; |
| 7548 | 34 | $lang{pt_BR} = "Portuguese (Brazilian)"; |
|
20802
933b5898de30
sr@Latn changed to sr@latin
Luke Schierer <lschiere@pidgin.im>
parents:
20133
diff
changeset
|
35 | $lang{'sr@latin'} = "Serbian (Latin)"; |
| 7202 | 36 | $lang{zh_CN} = "Chinese (Simplified)"; |
|
17713
ad5925348b09
Teach stats.pl about zh_HK
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15828
diff
changeset
|
37 | $lang{zh_HK} = "Chinese (Hong Kong)"; |
| 7202 | 38 | $lang{zh_TW} = "Chinese (Traditional)"; |
| 39 | ||
| 40 | opendir(DIR, ".") || die "can't open directory: $!"; | |
| 41 | @pos = grep { /\.po$/ && -f } readdir(DIR); | |
| 42 | foreach (@pos) { s/\.po$//; }; | |
| 43 | closedir DIR; | |
| 44 | ||
| 45 | @pos = sort @pos; | |
| 46 | ||
| 47 | $now = `date`; | |
| 48 | ||
|
13186
8d82505b0509
[gaim-migrate @ 15548]
Richard Laager <rlaager@pidgin.im>
parents:
11472
diff
changeset
|
49 | system("intltool-update --pot > /dev/null"); |
| 7202 | 50 | |
| 9412 | 51 | $_ = `msgfmt --statistics $PACKAGE.pot -o /dev/null 2>&1`; |
| 7202 | 52 | |
| 53 | die "unable to get total: $!" unless (/(\d+) untranslated messages/); | |
| 54 | ||
| 55 | $total = $1; | |
| 11466 | 56 | $generated = strftime "%Y-%m-%d %H:%M:%S", gmtime; |
| 7202 | 57 | |
| 11361 | 58 | print "<?xml version='1.0'?>\n"; |
| 59 | print "<?xml-stylesheet type='text/xsl' href='l10n.xsl'?>\n"; | |
| 11466 | 60 | print "<project version='1.0' xmlns:l10n='http://faceprint.com/code/l10n' name='$PACKAGE' pofile='$PACKAGE.pot' strings='$total' generated='$generated'>\n"; |
| 7202 | 61 | |
| 62 | foreach $index (0 .. $#pos) { | |
| 63 | $trans = $fuzz = $untrans = 0; | |
| 64 | $po = $pos[$index]; | |
| 7739 | 65 | print STDERR "$po..." if($ARGV[0] eq '-v'); |
|
24446
0057ba1e6290
Pass --no-location to msgmerge when generating the stats at
Mark Doliner <markdoliner@pidgin.im>
parents:
22143
diff
changeset
|
66 | system("msgmerge --no-location -U $po.po $PACKAGE.pot 2>/dev/null"); |
|
20130
c9ccebfba92d
applied changes from 4dd446ee59f869036e9065d0f45270444f319f1d
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
67 | if (($? & 127) == 2) { |
|
c9ccebfba92d
applied changes from 4dd446ee59f869036e9065d0f45270444f319f1d
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
68 | printf STDERR "Caught keyboard interrupt--exiting\n"; |
|
c9ccebfba92d
applied changes from 4dd446ee59f869036e9065d0f45270444f319f1d
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
69 | exit |
|
c9ccebfba92d
applied changes from 4dd446ee59f869036e9065d0f45270444f319f1d
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
70 | } |
|
20133
be3efe2c8463
applied changes from 71a27720e49364f4f24fc09309442fc3a2c17bc9
Richard Laager <rlaager@pidgin.im>
parents:
20131
diff
changeset
|
71 | $_ = `msgfmt --statistics $po -o /dev/null 2>&1`; |
| 7202 | 72 | chomp; |
|
9765
e96eb185e767
[gaim-migrate @ 10633]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9413
diff
changeset
|
73 | if(/(\d+) translated message/) { $trans = $1; } |
|
e96eb185e767
[gaim-migrate @ 10633]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9413
diff
changeset
|
74 | if(/(\d+) fuzzy translation/) { $fuzz = $1; } |
|
e96eb185e767
[gaim-migrate @ 10633]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9413
diff
changeset
|
75 | if(/(\d+) untranslated message/) { $untrans = $1; } |
| 11361 | 76 | |
| 11472 | 77 | $name = ""; |
| 78 | $name = $lang{$po}; | |
| 79 | $name = code2language($po) unless $name ne ""; | |
| 80 | $name = "???" unless $name ne ""; | |
| 81 | ||
| 82 | print "<lang code='$po' name='$name' translated='$trans' fuzzy='$fuzz' />\n"; | |
| 8060 | 83 | print STDERR "done ($untrans untranslated strings).\n" if($ARGV[0] eq '-v'); |
| 7202 | 84 | } |
| 85 | ||
| 11361 | 86 | print "</project>\n"; |
| 87 |