comparison po/Makefile @ 36:e6f81aa329b1

Introduced i18n support; german and english translation available.
author Ingo Weinzierl <ingo_weinzierl@web.de>
date Sat, 02 Oct 2010 22:22:35 +0200
parents
children
comparison
equal deleted inserted replaced
35:cfa9e755a5d2 36:e6f81aa329b1
1 all:
2 @echo 'Usage:'
3 @echo ' make pot create getan.pot'
4 @echo ' make merge merge a new getan.pot with the *.po files'
5 @echo ' make mo create the mo files'
6 @echo ' make stat print statistics about the translation status'
7
8 MO_DIR = ../share/locale
9 DOMAIN = getan
10
11 pot:
12 pygettext -o $(DOMAIN).pot ../getan/*.py
13
14 merge:
15 for po in *.po; do \
16 lingua=`basename $$po .po`; \
17 mv $$lingua.po $$lingua.old.po; \
18 if msgmerge -o $$lingua.po $$lingua.old.po $(DOMAIN).pot; then\
19 rm $$lingua.old.po; \
20 else \
21 rm -f $$lingua.po; \
22 mv $$lingua.old.po $$lingua.po; \
23 fi \
24 done
25
26
27 mo:
28 for po in *.po; do\
29 lingua=`basename $$po .po`; \
30 install -d $(MO_DIR)/$$lingua/LC_MESSAGES/ ; \
31 echo -n $$po": "; \
32 msgfmt --statistics \
33 -o $(MO_DIR)/$$lingua/LC_MESSAGES/$(DOMAIN).mo $$po ;\
34 done
35
36
37 stat:
38 @for po in *.po; do\
39 echo -n $$po": "; \
40 msgfmt --statistics -o /dev/null $$po 2>&1 \
41 | sed -e 's/ \(messages*\|translations*\)//g' -e 's/\.$$//' ; \
42 done
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)