summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-02-05 15:02:57 +0100
committerMarcello Stanisci <stanisci.m@gmail.com>2018-02-05 15:02:57 +0100
commit27bcd990946426209ad740b8207e141abce1067b (patch)
tree812d3591433809f793a73ae5a2cfdf60703cbdeb
parentb1f33b6377c77713196b4914577ee40912f7984a (diff)
downloadwww-27bcd990946426209ad740b8207e141abce1067b.tar.gz
www-27bcd990946426209ad740b8207e141abce1067b.tar.bz2
www-27bcd990946426209ad740b8207e141abce1067b.zip
adding portuguese
-rw-r--r--.gitignore1
-rw-r--r--Makefile2
-rwxr-xr-xtemplate.py3
3 files changed, 5 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 02acdf2..e995b28 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,6 +14,7 @@ fr/
it/
es/
ru/
+pt/
__pycache__
*.pyc
diff --git a/Makefile b/Makefile
index 8dc4bae..3b7a543 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,7 @@ locale-update: locale/messages.pot
msgmerge -U -m --previous locale/es/LC_MESSAGES/messages.po locale/messages.pot
msgmerge -U -m --previous locale/it/LC_MESSAGES/messages.po locale/messages.pot
msgmerge -U -m --previous locale/ru/LC_MESSAGES/messages.po locale/messages.pot
+ msgmerge -U -m --previous locale/pt/LC_MESSAGES/messages.po locale/messages.pot
if grep -nA1 '#-#-#-#-#' locale/*/LC_MESSAGES/messages.po; then echo -e "\nERROR: Conflicts encountered in PO files.\n"; exit 1; fi
@@ -28,6 +29,7 @@ locale-compile:
pybabel compile -d locale -l it --use-fuzzy
pybabel compile -d locale -l es --use-fuzzy
pybabel compile -d locale -l ru --use-fuzzy
+ pybabel compile -d locale -l pt --use-fuzzy
# Process everything related to gettext translations.
locale: locale-update locale-compile
diff --git a/template.py b/template.py
index 005239d..f0d37da 100755
--- a/template.py
+++ b/template.py
@@ -30,7 +30,8 @@ langs_full = {"en": "English",
"it": "Italiano",
"es": "Español",
"de": "Deutsch",
- "ru": "Ру́сский язы́к"}
+ "ru": "Ру́сский язы́к",
+ "pt": "Português"}
for in_file in glob.glob("*.j2"):
name, ext = re.match(r"(.*)\.([^.]+)$", in_file.rstrip(".j2")).groups()