aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xpo/get_from_compssusers.pl17
1 files changed, 11 insertions, 6 deletions
diff --git a/po/get_from_compssusers.pl b/po/get_from_compssusers.pl
index 16a5d174..e9c7adf7 100755
--- a/po/get_from_compssusers.pl
+++ b/po/get_from_compssusers.pl
@@ -2,7 +2,8 @@
use MDK::Common;
-@miss = (qw(Development Server Workstation), 'Graphical Environment');
+our @miss = (qw(Server Workstation), 'Graphical Environment');
+our @exceptions = qw(Configuration Mail);
my $po = $ARGV[0];
my $drakxfile = "../../../gi/perl-install/share/po/$po";
@@ -13,14 +14,18 @@ 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";
+our $current;
+our $entry;
foreach my $line (cat_($drakxfile)) {
- $line =~ m|^\Q#: ../../share/compssUsers:999| || ($line =~ m|^msgid "([^"]+)"| && grep { $_ eq $1 } @miss) and do {
+ $line =~ m|^\Q#: ../../share/compssUsers:999| || ($line =~ m|^msgid "([^"]+)"| && member($1, @miss)) and do {
$current = 'inside';
- print "# DO NOT BOTHER TO MODIFY HERE, BUT IN DRAKX PO\n";
- $line =~ m|^#:| or print "#: ../../share/compssUsers:999\n";
+ $entry = "# DO NOT BOTHER TO MODIFY HERE, BUT IN DRAKX PO\n";
+ $line =~ m|^#:| or $entry .= "#: ../../share/compssUsers:999\n";
};
- $current eq 'inside' and print $line;
- $line =~ m|^$| and do {
+ $current eq 'inside' and $entry .= $line;
+ $line =~ m|^msgid "([^"]+)"| && member($1, @exceptions) and $current = 'outside';
+ $line =~ m|^$| && $current eq 'inside' and do {
$current = 'outside';
+ print $entry;
};
}