diff options
Diffstat (limited to 'po')
-rw-r--r-- | po/Makefile | 17 | ||||
-rwxr-xr-x | po/create_placeholder | 29 |
2 files changed, 4 insertions, 42 deletions
diff --git a/po/Makefile b/po/Makefile index bc184108..a34169a7 100644 --- a/po/Makefile +++ b/po/Makefile @@ -10,8 +10,6 @@ PL_FILES = ../rpm-find-leaves ../urpm.pm ../urpme ../urpmf \ ../urpmi.removemedia ../urpmi.update ../urpmq \ ../urpm/parallel_ka_run.pm ../urpm/parallel_ssh.pm \ ../urpm/msg.pm ../urpm/args.pm ../rurpmi -# C-like files to search translatable strings in -CFILES = ./placeholder.h POFILES = $(shell ls *.po) MOFILES = $(POFILES:%.po=%.mo) @@ -24,9 +22,6 @@ all: $(GOALS) %.mo: %.po msgfmt -o $@ $< -placeholder.h: - ./create_placeholder - merge: $(PGOAL).pot @for n in $(POFILES); do \ echo "Merging $$n"; \ @@ -34,17 +29,13 @@ merge: $(PGOAL).pot mv -f "$$n"t "$$n"; \ done -$(PGOAL).pot: $(CFILES) - xgettext -F -n --add-comments \ - --keyword=_ --keyword=__ --keyword=N_ --keyword=N \ - --keyword=gettext \ - --language=C -o placeholder.pot $(CFILES) +$(PGOAL).pot: xgettext -F -n --add-comments \ --keyword=N_ --keyword=N \ --language=Perl -o $(PGOAL)_tmp.pot $(PL_FILES) - [ ! -e $(PGOAL)_tmp.pot ] || msgcat --use-first placeholder.pot $(PGOAL)_tmp.pot > $@ + [ ! -e $(PGOAL)_tmp.pot ] || msgcat --use-first $(PGOAL)_tmp.pot > $@ perl -pi -es/perl-format/c-format/ $@ - rm -f placeholder.pot $(PGOAL)_tmp.pot + rm -f $(PGOAL)_tmp.pot install: all for l in $(LANGS); do \ @@ -53,4 +44,4 @@ install: all done clean: - @rm -rf *~ *.mo $(GOALS) placeholder.pot $(PGOAL)_tmp.pot + @rm -rf *~ *.mo $(GOALS) $(PGOAL)_tmp.pot diff --git a/po/create_placeholder b/po/create_placeholder deleted file mode 100755 index a40287bb..00000000 --- a/po/create_placeholder +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -echo -e "\ -/* this is a placeholder so that xgettext can find the translatable - * strings. This file is automatically generated, look at - * ./create_placeholder - */ -char *foobar[] = { -/* This is a list of chars acceptable as a 'yes' answer to a Yes/No question; - you can put here the letters for 'yes' for your language, so people - can hit those keys in their keyboard to reply. - please keep the 'Yy' for compatibility reasons - */ - N_(\"Yy\"), -/* This is a list of chars acceptable as a 'no' answer to a Yes/No question; - you can put here the letters for 'no' for your language, so people - can hit those keys in their keyboard to reply. - please keep the 'Nn' for compatibility reasons - */ - N_(\"Nn\"), " > placeholder.h.$$ - -echo "};" >> placeholder.h.$$ - -# diff returns true if files are equal -if ! diff placeholder.h.$$ placeholder.h > /dev/null 2> /dev/null -then - cat placeholder.h.$$ > placeholder.h -fi -rm -f placeholder.h.$$ |