aboutsummaryrefslogtreecommitdiffstats
path: root/modules/rpmdragora/po/clean_po.pl
diff options
context:
space:
mode:
authorMatteo Pasotti <matteo@mageia.org>2013-01-07 17:17:05 +0000
committerMatteo Pasotti <matteo@mageia.org>2013-01-07 17:17:05 +0000
commit7ff32d873460c70bc158a8cc38c04132926e5791 (patch)
tree687ddd2060e10fc9cf530870f46c96442b623566 /modules/rpmdragora/po/clean_po.pl
parent80b79c965d0fa811d8c6433fd999bfaebe48d2f2 (diff)
downloadmanatools-7ff32d873460c70bc158a8cc38c04132926e5791.tar
manatools-7ff32d873460c70bc158a8cc38c04132926e5791.tar.gz
manatools-7ff32d873460c70bc158a8cc38c04132926e5791.tar.bz2
manatools-7ff32d873460c70bc158a8cc38c04132926e5791.tar.xz
manatools-7ff32d873460c70bc158a8cc38c04132926e5791.zip
- imported rpmdragora module (still under development)
Diffstat (limited to 'modules/rpmdragora/po/clean_po.pl')
-rwxr-xr-xmodules/rpmdragora/po/clean_po.pl17
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/rpmdragora/po/clean_po.pl b/modules/rpmdragora/po/clean_po.pl
new file mode 100755
index 00000000..7022dc74
--- /dev/null
+++ b/modules/rpmdragora/po/clean_po.pl
@@ -0,0 +1,17 @@
+#!/usr/bin/perl
+
+# we remove old translations (#~ stuff) because some id's may be shared
+# with what's extracted from the compss, and in such case msgfmt will
+# not put the translations in the mo :(
+
+use MDK::Common;
+
+my $line_number = 0;
+my @contents = cat_($ARGV[0]);
+
+foreach (@contents) {
+ $line_number++;
+ /^#, fuzzy/ && $contents[$line_number+1] =~ /^#~/ and next;
+ /^#~/ and next;
+ print;
+}