summaryrefslogtreecommitdiffstats
path: root/po/Makefile
diff options
context:
space:
mode:
authorPablo Saratxaga <pablo@mandriva.com>2002-08-24 01:22:19 +0000
committerPablo Saratxaga <pablo@mandriva.com>2002-08-24 01:22:19 +0000
commit675c8475ee4b93d462e758d7e82e9941ed1f782e (patch)
tree25a8c9fa62dd5015507faa45605dec0908ef05be /po/Makefile
parent295d031d89e99fd41f519bbea819eb83df07a480 (diff)
downloadurpmi-675c8475ee4b93d462e758d7e82e9941ed1f782e.tar
urpmi-675c8475ee4b93d462e758d7e82e9941ed1f782e.tar.gz
urpmi-675c8475ee4b93d462e758d7e82e9941ed1f782e.tar.bz2
urpmi-675c8475ee4b93d462e758d7e82e9941ed1f782e.tar.xz
urpmi-675c8475ee4b93d462e758d7e82e9941ed1f782e.zip
Changed remaining gettext("foo $bar") into _("foo %s", $bar)
Added russian man pages redo the way the *.pot file is created rebuild *.po files
Diffstat (limited to 'po/Makefile')
-rw-r--r--po/Makefile52
1 files changed, 36 insertions, 16 deletions
diff --git a/po/Makefile b/po/Makefile
index 91a7f125..a53e5ac4 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -1,14 +1,46 @@
# Installation directories
localedir = $(PREFIX)/usr/share/locale
-LANGS = $(shell ls *.po | xargs -i basename {} .po )
PGOAL = urpmi
-GOALS = $(PGOAL).pot $(foreach a, $(LANGS), $(a).mo)
-POTFILES = $(shell sed -e "s+^+../+" "POTFILES.in" )
+
+# perl files to search translatable strings in
+PL_FILES = ../_irpm ../urpm.pm ../urpme ../urpmi ../urpmi.addmedia \
+ ../urpmi.removemedia ../urpmi.update ../urpmq
+# 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=%)
+
+GOALS = $(PGOAL).pot $(MOFILES)
all: $(GOALS)
+%.mo: %.po
+ msgfmt -o $@ $<
+
+$(PL_CFILES): %_.c: %
+ ./fake_c.pl $< > $@
+
+merge: $(PGOAL).pot
+ @for n in $(POFILES); do \
+ echo "Merging $$n"; \
+ msgmerge "$$n" $< > "$$n"t; \
+ mv -f "$$n"t "$$n"; \
+ done
+
+$(PGOAL).pot: $(PL_CFILES) $(CFILES)
+ ./create_placeholder
+ xgettext --default-domain=$(PGOAL) -F -n \
+ --add-comments='-PO' --add-comments=' Translator:'\
+ --keyword=_ --keyword=__ --keyword=N_ --keyword=gettext \
+ --language=C $(PL_CFILES) $(CFILES)
+ mv -f $(PGOAL).po $(PGOAL).pot
+ @rm -rf $(PL_CFILES)
+
install: all
for l in $(LANGS); do \
install -d $(localedir)/$$l/LC_MESSAGES; \
@@ -16,18 +48,6 @@ install: all
done
clean:
- rm -f *~ *.[oas] *.mo $(GOALS) TAGS
-
-%.h:
- @touch $@
-
-%.mo: %.po
- msgfmt -o $@ $<
+ @rm -rf *~ *.mo $(GOALS) $(PL_CFILES)
-%.pot: $(POTFILES)
- ./create_placeholder $(POTFILES)
- xgettext --default-domain=`basename $@ .pot` --add-comments \
- --keyword=__ --keyword=_ --keyword=N_ --keyword=gettext \
- placeholder.h && \
- mv `basename $@ .pot`.po $@