From 40bb0830aa5c761cffc7706517445518affecc21 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 8 Feb 2017 08:23:37 +0100 Subject: add documentation, missing licensing statements, some DE fixes --- Makefile | 10 ++++++++++ citizens.html.j2 | 2 +- locale/de/LC_MESSAGES/messages.po | 25 ++++++++++--------------- locale/en/LC_MESSAGES/messages.po | 2 +- locale/es/LC_MESSAGES/messages.po | 2 +- locale/fr/LC_MESSAGES/messages.po | 2 +- locale/it/LC_MESSAGES/messages.po | 2 +- template.py | 9 ++++++++- template.sh | 9 ++++++++- 9 files changed, 41 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index c73498c3..24f3de50 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,15 @@ +# This file is in the public domain. + +# All: build HTML pages in all languages and compile the +# TypeScript logic in web-common. all: locale template cd web-common && tsc +# Extract translateable strings from jinga2 templates. locale/messages.pot: *.j2 pybabel extract -F locale/babel.map -o locale/messages.pot . +# Update translation (.po) files with new strings. locale-update: locale/messages.pot pybabel update -i locale/messages.pot -d locale -l en --previous pybabel update -i locale/messages.pot -d locale -l de --previous @@ -13,6 +19,7 @@ locale-update: locale/messages.pot if grep -nA1 '#-#-#-#-#' locale/*/LC_MESSAGES/messages.po; then echo -e "\nERROR: Conflicts encountered in PO files.\n"; exit 1; fi +# Compile translation files for use. locale-compile: pybabel compile -d locale -l en --use-fuzzy pybabel compile -d locale -l de --use-fuzzy @@ -20,7 +27,10 @@ locale-compile: pybabel compile -d locale -l it --use-fuzzy pybabel compile -d locale -l es --use-fuzzy +# Process everything related to gettext translations. locale: locale-update locale-compile +# Run the jinga2 templating engine to expand templates to HTML +# incorporating translations. template: locale-compile ./template.sh diff --git a/citizens.html.j2 b/citizens.html.j2 index 0f5964b7..bc1019ac 100644 --- a/citizens.html.j2 +++ b/citizens.html.j2 @@ -46,7 +46,7 @@ cash today.") }}

-

{{ _("Stability ") }}

+

{{ _("Stability") }}

{{ _("Coins in your digital wallet will be of the same denomination as the cash in your physical wallet. So you will not have to worry about diff --git a/locale/de/LC_MESSAGES/messages.po b/locale/de/LC_MESSAGES/messages.po index 40781877..2dae6453 100644 --- a/locale/de/LC_MESSAGES/messages.po +++ b/locale/de/LC_MESSAGES/messages.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2017-01-30 23:16+0100\n" +"POT-Creation-Date: 2017-02-08 06:20+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: de\n" @@ -24,7 +24,7 @@ msgstr "de" #: financial-news.html.j2:5 governments.html.j2:5 index.html.j2:5 #: investors.html.j2:5 merchants.html.j2:5 news.html.j2:5 wallet.html.j2:5 msgid "GNU Taler" -msgstr "" +msgstr "GNU Taler" #: about.html.j2:5 about.html.j2:14 msgid "About us" @@ -46,7 +46,6 @@ msgid "" msgstr "" #: about.html.j2:32 -#, fuzzy msgid "CFO" msgstr "CFO" @@ -73,9 +72,8 @@ msgid "PhD Student, Inria.." msgstr "Doktorand, Inria." #: about.html.j2:66 about.html.j2:81 -#, fuzzy msgid "Software engineer." -msgstr "" +msgstr "Softwareentwickler" #: about.html.j2:73 #, fuzzy @@ -83,14 +81,12 @@ msgid "Sustainable business development." msgstr "Des Grundes wegen" #: about.html.j2:77 -#, fuzzy msgid "Software engineer. Works on libebics." -msgstr "EBICS." +msgstr "Softwareentwickler. Arbeitet an libebics." #: about.html.j2:87 -#, fuzzy msgid "Translator (Spanish)" -msgstr "Übersetzer" +msgstr "Übersetzer (Spanisch)" #: about.html.j2:91 about.html.j2:95 #, fuzzy @@ -112,7 +108,7 @@ msgstr "Doktorand, TU München. Currently teaching." #: about.html.j2:115 #, fuzzy msgid "Software engineer. Works on Android wallet." -msgstr "Android Geldbörse" +msgstr "Softwareentwickler. Arbeitet an der Android Geldbörse" #: citizens.html.j2:5 msgid "Citizens" @@ -178,7 +174,7 @@ msgstr "" #: citizens.html.j2:42 msgid "Convenience" -msgstr "Bequeme Einrichtung" +msgstr "Bequemlichkeit" #: citizens.html.j2:44 msgid "" @@ -194,7 +190,7 @@ msgstr "" "\t eine SEPA-Überweisung." #: citizens.html.j2:49 -msgid "Stability " +msgid "Stability" msgstr "Stabilität" #: citizens.html.j2:51 @@ -818,9 +814,8 @@ msgstr "" "\t auszuschließen." #: governments.html.j2:42 index.html.j2:39 -#, fuzzy msgid "Libre" -msgstr "Liberal" +msgstr "Libre" #: governments.html.j2:44 msgid "" @@ -1115,7 +1110,7 @@ msgstr "" #: investors.html.j2:5 msgid "Investors" -msgstr "" +msgstr "Investoren" #: investors.html.j2:14 msgid "Operate a Taler exchange!" diff --git a/locale/en/LC_MESSAGES/messages.po b/locale/en/LC_MESSAGES/messages.po index aad11e27..e5c5c8df 100644 --- a/locale/en/LC_MESSAGES/messages.po +++ b/locale/en/LC_MESSAGES/messages.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2017-01-30 23:16+0100\n" +"POT-Creation-Date: 2017-02-08 06:20+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: en\n" diff --git a/locale/es/LC_MESSAGES/messages.po b/locale/es/LC_MESSAGES/messages.po index f82d56a1..c0871ab6 100644 --- a/locale/es/LC_MESSAGES/messages.po +++ b/locale/es/LC_MESSAGES/messages.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2017-01-30 23:16+0100\n" +"POT-Creation-Date: 2017-02-08 06:20+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: es\n" diff --git a/locale/fr/LC_MESSAGES/messages.po b/locale/fr/LC_MESSAGES/messages.po index d504bc3a..a0a04eda 100644 --- a/locale/fr/LC_MESSAGES/messages.po +++ b/locale/fr/LC_MESSAGES/messages.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2017-01-30 23:16+0100\n" +"POT-Creation-Date: 2017-02-08 06:20+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: fr\n" diff --git a/locale/it/LC_MESSAGES/messages.po b/locale/it/LC_MESSAGES/messages.po index a2545ba0..dfeacc92 100644 --- a/locale/it/LC_MESSAGES/messages.po +++ b/locale/it/LC_MESSAGES/messages.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2017-01-30 23:16+0100\n" +"POT-Creation-Date: 2017-02-08 06:20+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: it\n" diff --git a/template.py b/template.py index e86574db..f872ad3e 100755 --- a/template.py +++ b/template.py @@ -1,5 +1,12 @@ #!/usr/bin/env python - +# This file is in the public domain. +# +# This script runs the jinga2 templating engine on an input template-file +# using the specified locale for gettext translations, and outputs +# the resulting (HTML) ouptut-file. +# +# Note that the gettext files need to be prepared first. This script +# is thus to be invoked via the Makefile. import os import sys import re diff --git a/template.sh b/template.sh index 1c743617..040f3a00 100755 --- a/template.sh +++ b/template.sh @@ -1,5 +1,12 @@ #!/bin/sh - +# This file is in the public domain. +# +# Wrapper around 'template.py', running it on all +# of our jinja2 input files for all languages for which +# we have translations. +# +# Note that the gettext files need to be prepared first. This script +# is thus to be invoked via the Makefile. for f in $(git ls-files *.j2); do for ld in locale/*/; do l=$(basename $ld) -- cgit v1.2.3