Mercurial > getan
annotate po/README @ 536:a59622c06936
Fix generating reports if no week given
unix_week() cannot handle week being None but does so for year. It just
assumes the current year in this case, although this only duplicates the
initialisation of year with c_year in this context. week being None gives
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
load_entries() handles the case with no week given, thus call it anyhow.
This fix makes it possible to invoke scripts/getan-report with a year given
but no week and seeing the expected result (data for a whole year) instead
of a traceback.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 09 Jan 2020 11:32:34 +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 Getan Message Translations |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
2 ============================== |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
3 |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
4 The message catalogs are managed with the following software: |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
5 |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
6 - pygettext (usually distributed with Python) |
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 - GNU gettext (msgmerge and msgfmt) |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
9 |
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 Common tasks: |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
12 |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
13 - Create/Update getan.pot-File when the sources were edited and |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
14 messages have been added or changed and after a fresh checkout |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
15 |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
16 $ make pot |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
17 |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
18 - When the getan.pot has been changed, run |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
19 |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
20 $ make merge |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
21 |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
22 to merge the changes in the pot file with the messages already in the |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
23 *.po files. |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
24 |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
25 - When the translations in the po files have been changed, run |
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 $ make mo |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
28 |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
29 to generate new .mo files under ../share/locale |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
30 |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
31 - The make mo command prints statistics about the translations. To get |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
32 a less verbose version use this: |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
33 |
e6f81aa329b1
Introduced i18n support; german and english translation available.
Ingo Weinzierl <ingo_weinzierl@web.de>
parents:
diff
changeset
|
34 $ make stat |