summaryrefslogtreecommitdiffstats
path: root/po
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2009-01-27 17:30:19 +0000
committerPascal Rigaux <pixel@mandriva.com>2009-01-27 17:30:19 +0000
commitd22f36b1528465e6098fd7422852a3f06b3c678c (patch)
treeb99e203562494f5d7f2a3065e58569bda62e815a /po
parent2e873ba83b8221f73590b189d8ec06f1635113fb (diff)
downloadbootloader-theme-d22f36b1528465e6098fd7422852a3f06b3c678c.tar
bootloader-theme-d22f36b1528465e6098fd7422852a3f06b3c678c.tar.gz
bootloader-theme-d22f36b1528465e6098fd7422852a3f06b3c678c.tar.bz2
bootloader-theme-d22f36b1528465e6098fd7422852a3f06b3c678c.tar.xz
bootloader-theme-d22f36b1528465e6098fd7422852a3f06b3c678c.zip
enhance po Makefile
- wrapper around po2text to handle fuzzy strings - add update_n_merge and merge rules to help update the po files
Diffstat (limited to 'po')
-rw-r--r--po/Makefile18
1 files changed, 17 insertions, 1 deletions
diff --git a/po/Makefile b/po/Makefile
index b120b47..57ead20 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -8,8 +8,14 @@ all: .ready
.ready: text.inc $(TEXTS)
@touch .ready
+# the po2txt script requires that the po file has no fuzzy entries
+# and the same comments as the pot file; so we do a msgfmt/msgunfmt/msgmerge
+# to ensure that
%.tr: %.po text.inc
- bin/po2txt --product='$(PRODUCT)' $< >$@
+ msgfmt $< -o - | msgunfmt | \
+ msgmerge --no-fuzzy-matching - bootloader.pot > tmpfile.po && \
+ bin/po2txt --product='$(PRODUCT)' tmpfile.po >$@
+ echo rm -f tmpfile.po
# en.tr uses msgids from bootloader.pot
en.tr text.inc: bootloader.pot
@@ -17,3 +23,13 @@ en.tr text.inc: bootloader.pot
clean:
rm -f .ready text.inc *.tr *~ talk/*~
+
+
+update_n_merge: bootloader.pot merge
+
+merge:
+ for n in *.po; do \
+ echo "Merging $$n"; \
+ msgmerge -C $$n $$n bootloader.pot > "$$n"t ; \
+ mv -f "$$n"t $$n ; \
+ done