diff options
author | Mystery Man <unknown@mandriva.org> | 2004-11-06 08:30:59 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2004-11-06 08:30:59 +0000 |
commit | 42e38e074bf1200783849ea85e205e6614f988d7 (patch) | |
tree | 3c218a7ef3c66c8064eb2f6fa84ef44cef7b55a6 /perl-install/share/po/help_update_english_only.pl | |
parent | a4a67fd68bcffc42eb98871618c8f07b55157d5e (diff) | |
download | drakx-backup-do-not-use-topic/a.tar drakx-backup-do-not-use-topic/a.tar.gz drakx-backup-do-not-use-topic/a.tar.bz2 drakx-backup-do-not-use-topic/a.tar.xz drakx-backup-do-not-use-topic/a.zip |
This commit was manufactured by cvs2svn to create branch 'a'.topic/a
Diffstat (limited to 'perl-install/share/po/help_update_english_only.pl')
-rwxr-xr-x | perl-install/share/po/help_update_english_only.pl | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/perl-install/share/po/help_update_english_only.pl b/perl-install/share/po/help_update_english_only.pl deleted file mode 100755 index 4792e0ad5..000000000 --- a/perl-install/share/po/help_update_english_only.pl +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/perl -w - -use MDK::Common; - -my @prev = get("DrakX.pot.old"); -my @curr = get("DrakX.pot"); - -@prev == @curr or die "the number of messages has changed: " . int(@prev) . " is now " . int(@curr); - -my %l = map_index { $_ => $prev[$::i] } @curr; - -while (my ($new, $old) = each %l) { - my ($s_old) = $old =~ /"(.*)\\n"/ or die "<$old>"; - my ($s_new) = $new =~ /"(.*)\\n"/ or die "<$new>"; - next if $s_old eq $s_new; - - warn "mismatch\n in $s_old\n vs $s_new\n"; -} - -print STDERR "Is that ok (Y/n) ? "; -<STDIN> !~ /n/i or exit; - -foreach my $po (glob_("*.po")) { - my $s = cat_($po); - while (my ($new, $old) = each %l) { - my $offset = index($s, $old); - if ($offset >= 0) { - # print STDERR "replacing $old with $new\n"; - substr($s, $offset, length($old), $new); - } - } - output($po, $s); -} - - -sub get { - my ($file) = @_; - my @l; - foreach (cat_($file)) { - my $nb = /^#:.*help\.pm/ .. /msgstr ""/ or next; - if ($nb =~ /E0/) { - push @l, $s if $s; - $s = ''; - } elsif (/^"/) { - $s .= $_; - } - } - @l; -} - |