Skip to content

Commit 5290eb3

Browse files
author
Alexander Smishlajev
committed
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
1 parent eb552e0 commit 5290eb3

File tree

1 file changed

+31
-5
lines changed

1 file changed

+31
-5
lines changed

locale/GNUmakefile

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,34 @@
1-
XPOT=xpot
1+
# Extract translatable strings from Roundup sources,
2+
# update and compile all existing translations
3+
#
4+
# $Id: GNUmakefile,v 1.2 2004-05-18 19:36:12 a1s Exp $
5+
6+
# tool locations
7+
XPOT ?= xpot
8+
MSGFMT ?= msgfmt
9+
MSGMERGE ?= msgmerge
10+
XGETTEXT ?= xgettext
11+
12+
TEMPLATE=roundup.pot
13+
214
PACKAGES=$(shell find ../roundup -type d|grep -v CVS)
3-
VERSION=$(shell cd .. && python -c 'import roundup; print roundup.__version__')
15+
SOURCES=$(PACKAGES:=/*.py)
16+
PO_FILES=$(wildcard *.po)
17+
MO_FILES=$(PO_FILES:.po=.mo)
18+
19+
.PHONY: $(TEMPLATE)
20+
21+
all: $(TEMPLATE) $(MO_FILES)
22+
23+
$(TEMPLATE):
24+
${XPOT} -n -o $@ $(SOURCES)
25+
${XGETTEXT} -j -w 80 -F \
26+
27+
--copyright-holder="See Roundup README.txt" \
28+
-o $@ $(SOURCES)
429

5-
all: messages
30+
%.po: $(TEMPLATE)
31+
${MSGMERGE} -U --suffix=.bak $@ $<
632

7-
messages:
8-
xpot -p Roundup -v $(VERSION) -o roundup.pot $(PACKAGES:=/*.py)
33+
%.mo: %.po
34+
${MSGFMT} -o $@ $<

0 commit comments

Comments
 (0)