summaryrefslogtreecommitdiffstats
path: root/perl-install/share
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-07-23 18:48:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-07-23 18:48:32 +0000
commite58875f801fa0703cef9138df2ed456b34462969 (patch)
treea19cb45c9223771542847b0bb6de18c16ac4f5fb /perl-install/share
parentdb1ceba674784dfd8ffaacbff6446e6a6102b448 (diff)
downloaddrakx-backup-do-not-use-e58875f801fa0703cef9138df2ed456b34462969.tar
drakx-backup-do-not-use-e58875f801fa0703cef9138df2ed456b34462969.tar.gz
drakx-backup-do-not-use-e58875f801fa0703cef9138df2ed456b34462969.tar.bz2
drakx-backup-do-not-use-e58875f801fa0703cef9138df2ed456b34462969.tar.xz
drakx-backup-do-not-use-e58875f801fa0703cef9138df2ed456b34462969.zip
do not use the po's directly. Use mo's through gettext
Diffstat (limited to 'perl-install/share')
-rw-r--r--perl-install/share/po/.cvsignore1
-rw-r--r--perl-install/share/po/Makefile33
2 files changed, 25 insertions, 9 deletions
diff --git a/perl-install/share/po/.cvsignore b/perl-install/share/po/.cvsignore
index 9eccd17f0..f3dcd7811 100644
--- a/perl-install/share/po/.cvsignore
+++ b/perl-install/share/po/.cvsignore
@@ -1,2 +1,3 @@
.*.sw?
+*.mo
*~
diff --git a/perl-install/share/po/Makefile b/perl-install/share/po/Makefile
index 1e2f640ce..43b32542a 100644
--- a/perl-install/share/po/Makefile
+++ b/perl-install/share/po/Makefile
@@ -2,17 +2,21 @@ include ../../Makefile.config
PMSFILES = $(wildcard $(PMS:%=../../%))
PMSCFILES = $(PMSFILES:%=%_.c)
+
POFILES = $(shell ls *.po)
-PERL2C =
+MOFILES = $(POFILES:%.po=%.mo)
+LANGS = $(POFILES:%.po=%)
-all: $(POFILES)
+LOCALEDIR=$(DATADIR)/locale
-clean:
- rm -f empty.po tmp.* messages tmp.pot $(POFILES:%=%t) $(PMSCFILES)
-verif:
- perl -ne '/^\s*#/ or $$i += my @l = /\b__?\(/g; END { print "$$i\n" }' $(PMSFILES)
- perl -ne '$$i += my @l = /\.c:/g; END { print "$$i\n" }' DrakX.pot
+all: $(MOFILES)
+
+%.mo: %.po
+ msgfmt -o $@ $<
+
+$(PMSCFILES): %_.c: %
+ ./fake_c.pl $< > $@
$(POFILES): DrakX.pot
cp -f $@ $@t
@@ -25,6 +29,19 @@ DrakX.pot: $(PMSFILES)
rm $(PMSCFILES)
perl i18n_compssUsers 2>/dev/null >> $@
+install:
+ for l in $(LANGS); do \
+ install -d $(LOCALEDIR)/$$l/LC_MESSAGES; \
+ install -m 644 $$l.mo $(LOCALEDIR)/$$l/LC_MESSAGES/$(NAME).mo; \
+ done
+
+clean:
+ rm -f empty.po tmp.* messages tmp.pot *.mo $(POFILES:%=%t) $(PMSCFILES)
+
+verif:
+ perl -ne '/^\s*#/ or $$i += my @l = /\b__?\(/g; END { print "$$i\n" }' $(PMSFILES)
+ perl -ne '$$i += my @l = /\.c:/g; END { print "$$i\n" }' DrakX.pot
+
verif2:
# perl -I ../.. -Mcommon -e 'foreach (qw($(PMSFILES))) { printf "package foo%d;\n", ++$$i; print common::cat_($$_) }' | perl -ne 'print if !/use (diagnostics|vars|strict)/' | OUTFILE=tmp.pm perl -I. -I../.. -Mb_dump_strings >/dev/null 2>/dev/null
perl -pe 's|$$|\\n\\|' tmp.pm > tmp.pm_.c
@@ -33,7 +50,5 @@ verif2:
grep "^msgid" tmp.pot | sort > tmp.pot.light
grep "^msgid" DrakX.pot | sort | diff - tmp.pot.light | grep "^>" || true
-$(PMSCFILES): %_.c: %
- ./fake_c.pl $< > $@
# for i in *.po; do echo -n "$i "; msgfmt -v $i 2>&1; done | perl -e 'print map { $_->[0] } sort { $a->[1] <=> $b->[1] } map { [ $_, (split)[1] ] } <>'