aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-09-01 18:56:27 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-09-01 18:56:27 +0000
commit646633797ffbf4faf723fb4c3072482f4445fa15 (patch)
treef1bb4fc4610ba45c897069fbcf6323b2989142bd
parente68e14bcda81b5086c51812701463aceabdd9f2d (diff)
downloadrpmdrake-646633797ffbf4faf723fb4c3072482f4445fa15.tar
rpmdrake-646633797ffbf4faf723fb4c3072482f4445fa15.tar.gz
rpmdrake-646633797ffbf4faf723fb4c3072482f4445fa15.tar.bz2
rpmdrake-646633797ffbf4faf723fb4c3072482f4445fa15.tar.xz
rpmdrake-646633797ffbf4faf723fb4c3072482f4445fa15.zip
be sure to notice when rpmdrake and drakx encodings are different (die)
-rwxr-xr-xpo/get_from_compssusers.pl11
1 files changed, 10 insertions, 1 deletions
diff --git a/po/get_from_compssusers.pl b/po/get_from_compssusers.pl
index ea350a41..16a5d174 100755
--- a/po/get_from_compssusers.pl
+++ b/po/get_from_compssusers.pl
@@ -4,7 +4,16 @@ use MDK::Common;
@miss = (qw(Development Server Workstation), 'Graphical Environment');
-foreach my $line (cat_("../../../gi/perl-install/share/po/$ARGV[0]")) {
+my $po = $ARGV[0];
+my $drakxfile = "../../../gi/perl-install/share/po/$po";
+
+-e $drakxfile or exit 0;
+
+my ($enc_rpmdrake) = cat_($po) =~ /Content-Type: .*; charset=(.*)\\n/i;
+my ($enc_drakx) = cat_($drakxfile) =~ /Content-Type: .*; charset=(.*)\\n/;
+uc($enc_rpmdrake) ne uc($enc_drakx) and die "Encodings differ for $po! rpmdrake's encoding: $enc_rpmdrake; drakx's encoding: $enc_drakx";
+
+foreach my $line (cat_($drakxfile)) {
$line =~ m|^\Q#: ../../share/compssUsers:999| || ($line =~ m|^msgid "([^"]+)"| && grep { $_ eq $1 } @miss) and do {
$current = 'inside';
print "# DO NOT BOTHER TO MODIFY HERE, BUT IN DRAKX PO\n";