annotate po/Makefile @ 362:90c09cca49c3

Fix loading entries of a project Projects.entries is converted into a read only property. Therefore it is not allowed to set the entries directly. Instead the load_entries method must be used.
author Björn Ricks <bjoern.ricks@intevation.de>
date Mon, 03 Mar 2014 15:08:07 +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
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)