summaryrefslogtreecommitdiffstats
path: root/perl-install/share
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-12-10 01:56:26 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-12-10 01:56:26 +0000
commit3661bf4880dea683268c973962238f4196bd7118 (patch)
tree3ab4faf7c759ae3718c7392699efb0535840131f /perl-install/share
parentc3b33d89ad77ea8b294c5f2d4ecfb81f8854ab5d (diff)
downloaddrakx-backup-do-not-use-3661bf4880dea683268c973962238f4196bd7118.tar
drakx-backup-do-not-use-3661bf4880dea683268c973962238f4196bd7118.tar.gz
drakx-backup-do-not-use-3661bf4880dea683268c973962238f4196bd7118.tar.bz2
drakx-backup-do-not-use-3661bf4880dea683268c973962238f4196bd7118.tar.xz
drakx-backup-do-not-use-3661bf4880dea683268c973962238f4196bd7118.zip
use "perl_checker --generate-pot" instead of fake_c + xgettext
Diffstat (limited to 'perl-install/share')
-rw-r--r--perl-install/share/po/Makefile10
-rwxr-xr-xperl-install/share/po/fake_c.pl22
2 files changed, 2 insertions, 30 deletions
diff --git a/perl-install/share/po/Makefile b/perl-install/share/po/Makefile
index c853263c5..4088668cb 100644
--- a/perl-install/share/po/Makefile
+++ b/perl-install/share/po/Makefile
@@ -1,7 +1,6 @@
include ../../Makefile.config
PMSFILES = $(wildcard $(ALLPMS:%=../../%))
-PMSCFILES = $(PMSFILES:%=%_.c)
# temporarly don't include those po files
# (too low translation percentage)
@@ -30,18 +29,13 @@ help:
%.mo: %.po
msgfmt -o $@ $<
-$(PMSCFILES): %_.c: %
- ./fake_c.pl $< > $@
-
$(POFILES): DrakX.pot
perl -ne 'print unless /^# DO NOT BOTHER TO MODIFY HERE, SEE:|^#.*\Qdrakx-help.xml/ .. /^$$/' $@ > $@t
if [ -e help-$@t ]; then perl -pe 's|^#~ ||' -i $@t ; msgmerge -C $@t help-$@t $< > $@; else msgmerge $@t $< > $@; fi
rm $@t
DrakX.pot: $(PMSFILES)
- $(MAKE) $(PMSCFILES);
- xgettext -F -n --add-comments='-PO' --keyword=N --keyword=N_ -o $@ $(PMSCFILES)
- rm $(PMSCFILES)
+ perl_checker -q --generate-pot $@ $(PMSFILES)
perl i18n_compssUsers 2>/dev/null >> $@
install:
@@ -51,7 +45,7 @@ install:
done
clean:
- @rm -rf drakx-help.xml .memdump doc empty.po tmp.* messages tmp.pot *.mo $(POFILES:%=%t) $(PMSCFILES)
+ @rm -rf drakx-help.xml .memdump doc empty.po tmp.* messages tmp.pot *.mo $(POFILES:%=%t)
check:
@grep -F '$$' DrakX.pot && { echo "bad translation strings (contains \$$) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"; exit 1; } ||:
diff --git a/perl-install/share/po/fake_c.pl b/perl-install/share/po/fake_c.pl
deleted file mode 100755
index cd80801eb..000000000
--- a/perl-install/share/po/fake_c.pl
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/perl -lp
-
-s|^(N_?\()| $1|; # add a blank at the beginning (?!)
-
-s|N\(\[(.*),\s*(.*),\s*(.*)\]|ngettext($2,$3,$1)|; # special plural form handling
-
-s,\Qs/#.*//,,; # ugly special case
-
-s,(^|[^\$])#([^+].*),"$1/*" . simpl($2) . "*/",e;
- # rewrite comments to C format except for:
- # - ``#+ xxx'' comments which are kept
- # - ``$#xxx'' which are not comments
-
-s|//|/""/|g; # ensure // or not understood as comments
-
-s|$|\\n\\|; # multi-line strings not handled in C
-
-sub simpl {
- local $_ = $_[0];
- s,\*/,,g;
- $_;
-}