From c19e3039a252f50b986a2e4b8e66817395f512ee Mon Sep 17 00:00:00 2001 From: Pablo Saratxaga Date: Wed, 5 Mar 2003 20:06:46 +0000 Subject: changed name of _() function to N() use of perl_checker to create pot file --- po/Makefile | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'po/Makefile') diff --git a/po/Makefile b/po/Makefile index c8640c1e..aeb00b56 100644 --- a/po/Makefile +++ b/po/Makefile @@ -10,7 +10,6 @@ PL_FILES = ../_irpm ../urpm.pm ../urpme ../urpmf ../urpmi ../urpmi.addmedia \ # C-like files to search translatable strings in CFILES = ./placeholder.h -PL_CFILES = $(PL_FILES:%=%_.c) POFILES = $(shell ls *.po) MOFILES = $(POFILES:%.po=%.mo) LANGS = $(POFILES:%.po=%) @@ -26,9 +25,6 @@ all: $(GOALS) placeholder.h: ./create_placeholder -$(PL_CFILES): %_.c: % - ./fake_c.pl $< > $@ - merge: $(PGOAL).pot @for n in $(POFILES); do \ echo "Merging $$n"; \ @@ -36,14 +32,14 @@ merge: $(PGOAL).pot mv -f "$$n"t "$$n"; \ done -$(PGOAL).pot: $(PL_CFILES) $(CFILES) - xgettext --default-domain=$(PGOAL) -F -n \ - --add-comments='-PO' --add-comments=' Translator:'\ +$(PGOAL).pot: $(CFILES) + xgettext -F -n --add-comments \ --keyword=_ --keyword=__ --keyword=N_ --keyword=N \ --keyword=gettext \ - --language=C $(PL_CFILES) $(CFILES) - mv -f $(PGOAL).po $(PGOAL).pot - @rm -rf $(PL_CFILES) + --language=C -o placeholder.pot $(CFILES) + perl_checker -q --generate-pot $(PGOAL)_tmp.pot $(PL_FILES) + msgcat --use-first placeholder.pot $(PGOAL)_tmp.pot > $@ + rm -f placeholder.pot $(PGOAL)_tmp.pot install: all for l in $(LANGS); do \ @@ -52,6 +48,6 @@ install: all done clean: - @rm -rf *~ *.mo $(GOALS) $(PL_CFILES) + @rm -rf *~ *.mo $(GOALS) placeholder.pot $(PGOAL)_tmp.pot -- cgit v1.2.1