Mercurial > getan
annotate po/Makefile @ 540:91aaf455c44e
Add new template zeiterfassung-hierarchy1
* Add template for getan-report for the use case where hierarchical
project keys are used to select the workpackages within a project.
The grouping within the new template is done the way it is, because
a second attribute lookup is not possible in Jinja2, when having
just an entry it is not possible to get the `projects[entry.project_id].key`.
author | Bernhard Reiter <bernhard@intevation.de> |
---|---|
date | Thu, 30 Jan 2020 10:47:20 +0100 |
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 |