diff options
-rw-r--r-- | po/Makefile | 18 |
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 |