From d820e16241cb43dea174b485bf38970367d7723e Mon Sep 17 00:00:00 2001 From: waker Date: Sun, 27 Feb 2011 16:37:57 +0100 Subject: moved extract_translators.pl to scripts folder --- scripts/extract_translators.pl | 54 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100755 scripts/extract_translators.pl (limited to 'scripts') diff --git a/scripts/extract_translators.pl b/scripts/extract_translators.pl new file mode 100755 index 00000000..a3ad02a2 --- /dev/null +++ b/scripts/extract_translators.pl @@ -0,0 +1,54 @@ +#!/usr/bin/env perl + +use strict; +use Locale::Language; +use Locale::Country; + +my @files = split /\s+/, `ls po/*.po`; +my @files = sort {$a cmp $b} @files; + +foreach my $f (@files) { + open F, "<$f"; + + my $code = $f; + $code =~ s/^po\/(.*)\.po/$1/g; + + my $script; + if ($code =~ /(.*)@(.*)/) { + $code = $1; + $script = $2; + } + + my $country; + if ($code =~ /(.*)_(.*)/) { + $code = $1; + $country = code2country ($2); + } + + my $lang = code2language($code); + #print "$code\n"; + print "$lang"; + if ($country) { + print " ($country)"; + } + if ($script) { + print " ($script)"; + } + print "\n"; + while () { + if (/^#/) { + if (/\@/ && !(/Yakovenko/) && !(/EMAIL/)) { + s/^#//; + s/, [0-9]+\.$//g; + chomp; + print "$_\n"; + } + } + else { + last; + } + } + print "\n"; + + close F; +} -- cgit v1.2.3