summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-02-28 16:52:56 -0300
committerJesusaves <cpntb1@ymail.com>2020-02-28 16:52:56 -0300
commit8ebdfe4c38f240fbfb269c3c6841a635b42b9a65 (patch)
treeb8e0d57abf2bcac99ad4d55a4b59d8892aec650b /web
parentcd5a9686449749f1ee5a5e9e44a3f099e4233541 (diff)
downloadtools-8ebdfe4c38f240fbfb269c3c6841a635b42b9a65.tar.gz
tools-8ebdfe4c38f240fbfb269c3c6841a635b42b9a65.tar.bz2
tools-8ebdfe4c38f240fbfb269c3c6841a635b42b9a65.tar.xz
tools-8ebdfe4c38f240fbfb269c3c6841a635b42b9a65.zip
Bugfix
Diffstat (limited to 'web')
-rw-r--r--web/po/en.po12
-rwxr-xr-xweb/updatelang.py17
2 files changed, 22 insertions, 7 deletions
diff --git a/web/po/en.po b/web/po/en.po
index 0d8c73c..7a55e6e 100644
--- a/web/po/en.po
+++ b/web/po/en.po
@@ -3,8 +3,8 @@ msgid ""
msgstr ""
"Project-Id-Version: 1.0\n"
"Report-Msgid-Bugs-To: dev@tmw2.org\n"
-"POT-Creation-Date: 2020-02-28 16:26-0300\n"
-"PO-Revision-Date: 2020-02-28 16:26-0300\n"
+"POT-Creation-Date: 2020-02-28 16:46-0300\n"
+"PO-Revision-Date: 2020-02-28 16:46-0300\n"
"Last-Translator: TMW2 Team <dev@tmw2.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
@@ -183,6 +183,14 @@ msgstr ""
msgid "Support us"
msgstr ""
+#. getInvolved/Header
+msgid "Get Involved"
+msgstr ""
+
+#. getInvolved/Translate
+msgid "Translate"
+msgstr ""
+
#. getInvolved/TaskNotListed/1
msgid "You want to contribute in a way not listed above?"
msgstr ""
diff --git a/web/updatelang.py b/web/updatelang.py
index 11ee54e..6b8c548 100755
--- a/web/updatelang.py
+++ b/web/updatelang.py
@@ -14,7 +14,7 @@ rootPath = "../../site/i18n/"
langs=[]
files={}
originals={}
-tm=["","\n"]
+tm={defaultLang: ["","\n"]}
# Search for array[?]==search in an array of dicts
# Returns the dictionary, or returns "ERROR"
@@ -60,6 +60,7 @@ def init():
# Create each language's template
for i in langs:
files[str(i)]=copy.copy(originals)
+ tm[str(i)]=["","\n"]
"""
# Do the reading for each language
@@ -85,8 +86,8 @@ def lgname(lg):
return "Unknown %s" % lg
# [OK] Entry
-def poentry(org, ttl):
- return polib.POEntry(msgid=org, msgstr=ttl)
+def poentry(org, ttl, comments):
+ return polib.POEntry(msgid=org, msgstr=ttl, comment=comments)
# Creates/Loads stuff
def generatePoFiles():
@@ -108,10 +109,16 @@ def generatePoFiles():
}
for key, speech in originals.items():
+ # Translation Memory (no duplicates)
+ if speech in tm[lg]:
+ continue
+ tm[lg].append(speech)
+
+ # Add to po file
if lg == "en":
- po.append(poentry(speech, ""))
+ po.append(poentry(speech, "", key))
else:
- po.append(poentry(speech, files[lg][key]))
+ po.append(poentry(speech, files[lg][key], key))
po.save("po/%s.po" % lg)
context.remove('en')