From 58d15a09e3be7b796c977a98e0e9d7acc822705b Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Fri, 27 Jun 2003 12:44:56 +0000 Subject: fix some missing translations for compssUsers ("Mandrake Choices") --- po/Makefile | 5 +++-- po/clean_po.pl | 17 +++++++++++++++++ po/get_from_compssusers.pl | 3 ++- rpmdrake.spec | 1 + 4 files changed, 23 insertions(+), 3 deletions(-) create mode 100755 po/clean_po.pl diff --git a/po/Makefile b/po/Makefile index b8c3d974..1076b152 100644 --- a/po/Makefile +++ b/po/Makefile @@ -20,7 +20,8 @@ all: $(MOFILES) %.mo: %.po if [ -z "`echo $(IGNOREPOMS) | grep $<`" ]; then cat $< "$<"m >> "$<"f; else cp $< "$<"f; fi - msgfmt -o $@ "$<"f + ./clean_po.pl "$<"f > "$<"g + msgfmt -o $@ "$<"g merge: $(PGOAL).pot @for n in $(POFILES); do \ @@ -46,5 +47,5 @@ install: done clean: - @rm -rf *.mo *.pof $(POFILES:%=%t) $(PL_CFILES) $(PGOAL).pot desktopstuff.pot rpmdrake_tmp.pot + @rm -rf *.mo *.pof *.pog $(POFILES:%=%t) $(PL_CFILES) $(PGOAL).pot desktopstuff.pot rpmdrake_tmp.pot diff --git a/po/clean_po.pl b/po/clean_po.pl new file mode 100755 index 00000000..7022dc74 --- /dev/null +++ b/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; +} diff --git a/po/get_from_compssusers.pl b/po/get_from_compssusers.pl index 35bfa041..ea350a41 100755 --- a/po/get_from_compssusers.pl +++ b/po/get_from_compssusers.pl @@ -2,12 +2,13 @@ use MDK::Common; -@miss = qw(Development Server); +@miss = (qw(Development Server Workstation), 'Graphical Environment'); foreach my $line (cat_("../../../gi/perl-install/share/po/$ARGV[0]")) { $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"; + $line =~ m|^#:| or print "#: ../../share/compssUsers:999\n"; }; $current eq 'inside' and print $line; $line =~ m|^$| and do { diff --git a/rpmdrake.spec b/rpmdrake.spec index 6ff47b04..a88688e3 100644 --- a/rpmdrake.spec +++ b/rpmdrake.spec @@ -106,6 +106,7 @@ rm -rf $RPM_BUILD_ROOT - fix sorting of translated stuff in the treeview (will need drakxtools > 9.2-0.7mdk to work properly though) - split translation of groups to ease i18n job +- fix some missing translations for compssUsers ("Mandrake Choices") * Fri Jun 6 2003 Guillaume Cottenceau 2.1-23mdk - rpmdrake: at install time, when some local files are impossible -- cgit v1.2.1