Mercurial > getan
annotate po/Makefile @ 199:3fa4ab9146dd
Implement three phase user input handling
First the state is able to filter keys. Afterwards the MainLoop widget is
allowed to act on keypress. At last the state is allowed to react on keys.
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Fri, 05 Apr 2013 19:29:33 +0200 |
parents | e6f81aa329b1 |
children |
rev | line source |
---|---|
36
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
1 all: |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
2 @echo 'Usage:' |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
3 @echo ' make pot create getan.pot' |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
4 @echo ' make merge merge a new getan.pot with the *.po files' |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
5 @echo ' make mo create the mo files' |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
6 @echo ' make stat print statistics about the translation status' |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
7 |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
8 MO_DIR = ../share/locale |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
9 DOMAIN = getan |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
10 |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
11 pot: |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
12 pygettext -o $(DOMAIN).pot ../getan/*.py |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
13 |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
14 merge: |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
15 for po in *.po; do \ |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
16 lingua=`basename $$po .po`; \ |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
17 mv $$lingua.po $$lingua.old.po; \ |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
18 if msgmerge -o $$lingua.po $$lingua.old.po $(DOMAIN).pot; then\ |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
19 rm $$lingua.old.po; \ |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
20 else \ |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
21 rm -f $$lingua.po; \ |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
22 mv $$lingua.old.po $$lingua.po; \ |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
23 fi \ |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
24 done |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
25 |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
26 |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
27 mo: |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
28 for po in *.po; do\ |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
29 lingua=`basename $$po .po`; \ |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
30 install -d $(MO_DIR)/$$lingua/LC_MESSAGES/ ; \ |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
31 echo -n $$po": "; \ |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
32 msgfmt --statistics \ |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
33 -o $(MO_DIR)/$$lingua/LC_MESSAGES/$(DOMAIN).mo $$po ;\ |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
34 done |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
35 |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
36 |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
37 stat: |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
38 @for po in *.po; do\ |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
39 echo -n $$po": "; \ |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
40 msgfmt --statistics -o /dev/null $$po 2>&1 \ |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
41 | sed -e 's/ \(messages*\|translations*\)//g' -e 's/\.$$//' ; \ |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
42 done |