diff locale/GNUmakefile @ 2330:8ae58eda9331

in addition to xpot... ...(which is needed to extract deferred translations - above all, docstrings in admin.py commands), use xgettext to extract plural forms; update and compile message files
author Alexander Smishlajev <a1s@users.sourceforge.net>
date Tue, 18 May 2004 19:36:12 +0000
parents 1421b19cd61b
children 106737dbe689
line wrap: on
line diff
--- a/locale/GNUmakefile	Tue May 18 19:29:21 2004 +0000
+++ b/locale/GNUmakefile	Tue May 18 19:36:12 2004 +0000
@@ -1,8 +1,34 @@
-XPOT=xpot
-PACKAGES=$(shell find ../roundup -type d|grep -v CVS)
-VERSION=$(shell cd .. && python -c 'import roundup; print roundup.__version__')
+# Extract translatable strings from Roundup sources,
+# update and compile all existing translations
+#
+# $Id: GNUmakefile,v 1.2 2004-05-18 19:36:12 a1s Exp $
+
+# tool locations
+XPOT ?= xpot
+MSGFMT ?= msgfmt
+MSGMERGE ?= msgmerge
+XGETTEXT ?= xgettext
+
+TEMPLATE=roundup.pot
 
-all: messages
+PACKAGES=$(shell find ../roundup -type d|grep -v CVS)
+SOURCES=$(PACKAGES:=/*.py)
+PO_FILES=$(wildcard *.po)
+MO_FILES=$(PO_FILES:.po=.mo)
+
+.PHONY: $(TEMPLATE)
+
+all: $(TEMPLATE) $(MO_FILES)
 
-messages:
-	xpot -p Roundup -v $(VERSION) -o roundup.pot $(PACKAGES:=/*.py)
+$(TEMPLATE):
+	${XPOT} -n -o $@ $(SOURCES)
+	${XGETTEXT} -j -w 80 -F \
+	  --msgid-bugs-address=roundup-devel@lists.sourceforge.net \
+	  --copyright-holder="See Roundup README.txt" \
+	  -o $@ $(SOURCES)
+
+%.po: $(TEMPLATE)
+	${MSGMERGE} -U --suffix=.bak $@ $<
+
+%.mo: %.po
+	${MSGFMT} -o $@ $<

Roundup Issue Tracker: http://roundup-tracker.org/