diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2005-07-18 22:15:26 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2005-07-18 22:15:26 +0000 |
commit | 748a4de99a5276a08490f379486a126e91385219 (patch) | |
tree | b97d5af033e63b4dd94f06567530ccf8be3f525f /po/Makefile | |
parent | bf3764a7da111bb34aa430f62eac0b15c738b8e9 (diff) | |
download | quilt-748a4de99a5276a08490f379486a126e91385219.tar.gz |
- Add internationalization support to Perl scripts as well.
Diffstat (limited to 'po/Makefile')
-rw-r--r-- | po/Makefile | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/po/Makefile b/po/Makefile index f2e98e3..31dacea 100644 --- a/po/Makefile +++ b/po/Makefile @@ -1,7 +1,3 @@ -QUILT_IN := add applied delete diff edit files fold fork graph grep \ - import mail new next patches pop previous push refresh \ - remove series setup snapshot top unapplied upgrade -SCRIPTS_IN := patchfns inspect patchfns # scripts/parse-patch is perl based # LINGUAS = ... @@ -16,13 +12,24 @@ all: $(LINGUAS:%=%.mo) msgmerge -o $@ $@ $^ msgfmt --statistics -o /dev/null $@ -quilt.pot: $(QUILT_IN:%=../quilt/%.in) $(SCRIPTS_IN:%=../scripts/%.in) ../bin/quilt.in +quilt.pot: $(filter-out ../debian/control ../doc/quilt.1 ../doc/README, \ + $(patsubst %.in,%,$(wildcard ../*/*.in))) rm -f quilt.pot; touch quilt.pot + ( cd .. ; \ for file in $+ ; do \ - bash --dump-po-strings $$file \ - |msguniq \ - |msgcat --force-po -F - quilt.pot -o quilt.pot; \ - done + file=$${file#../} ; \ + if head $$file | grep -q bash; then \ + bash --dump-po-strings $$file ; \ + elif head $$file | grep -q perl; then \ + xgettext --from-code=UTF-8 --omit-header --language=Perl \ + --keyword=_ -o - $$file; \ + else \ + echo "Don't know how to handle $$file" >&2 ; \ + exit 1 ; \ + fi \ + done ) \ + |msguniq \ + |msgcat --force-po -F - quilt.pot -o quilt.pot clean: rm -f *.mo *~ |