[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [gettor/master] Updates to locales



commit c696e656dd3c7815151356c0476157dd948194fe
Author: hiro <hiro@xxxxxxxxxxxxxx>
Date:   Fri Mar 8 12:10:06 2019 +0100

    Updates to locales
---
 gettor/services/email/sendmail.py |  3 +--
 scripts/add_lins_to_db            | 15 ++++++++++-----
 share/locale/en.json              |  8 ++++----
 3 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/gettor/services/email/sendmail.py b/gettor/services/email/sendmail.py
index 92aa766..bce20da 100644
--- a/gettor/services/email/sendmail.py
+++ b/gettor/services/email/sendmail.py
@@ -187,8 +187,7 @@ class Sendmail(object):
                         else:
                             link_msg = link_str
 
-                    body_msg = strings._("links_body")
-                    body_msg = body_msg.format(links=link_msg)
+                    body_msg = strings._("links_body").format(platform, link_msg)
                     subject_msg = strings._("links_subject")
 
                     hid = hashlib.sha256(id.encode('utf-8'))
diff --git a/scripts/add_lins_to_db b/scripts/add_lins_to_db
index 351ef56..f625a98 100755
--- a/scripts/add_lins_to_db
+++ b/scripts/add_lins_to_db
@@ -57,12 +57,17 @@ def main():
   versions = webFile.read().decode('utf-8')
   version = versions.split("&#34;")[1]
 
-  gitlab = "https://gitlab.com/hiromipaw/torbrowser/raw/releases/";
+  providers = {
+    "osx": "https://gitlab.com/hiromipaw/torbrowser/raw/releases/";,
+    "windows": "https://gitlab.com/hiromipaw/torbrowser/raw/releases/";,
+    "linux": "https://gitlab.com/hiromipaw/torbrowser/raw/releases/";
+  }
+
 
   prefixes = {
-    "osx": "https://gitlab.com/hiromipaw/torbrowser/raw/releases/TorBrowser-";,
-    "windows": "https://gitlab.com/hiromipaw/torbrowser/raw/releases/torbrowser-install-";,
-    "linux": "https://gitlab.com/hiromipaw/torbrowser/raw/releases/tor-browser-linux64-";
+    "osx": "TorBrowser-",
+    "windows": "torbrowser-install-",
+    "linux": "tor-browser-linux64-"
   }
 
   versions = {"windows": version, 'linux': version, 'osx': version}
@@ -74,7 +79,7 @@ def main():
   }
 
   keys = set().union(suffixes, versions, prefixes)
-  releases = {k: "".join(dic.get(k, version) for dic in (prefixes, versions, suffixes))  for k in keys}
+  releases = {k: "".join(dic.get(k, version) for dic in (providers, prefixes, versions, suffixes))  for k in keys}
 
 
   if not abs_filename:
diff --git a/share/locale/en.json b/share/locale/en.json
index 83c91e6..2b735c0 100644
--- a/share/locale/en.json
+++ b/share/locale/en.json
@@ -1,6 +1,6 @@
 {
-  "links_body": "GetTor Test. Please be kind. \n \n You can download GetTor from the following links: \n \n %s",
-  "links_subject": "GetTor Email Test.",
+  "links_body": "You requested Tor Browser for {}.\n \nYou will need only one of the links below to download the bundle. If a link does not work for you, try the next one.\n \n{}\n \n \n--\nGetTor",
+  "links_subject": "[GetTor] Links for your request",
   "help_body": "GetTor Help Test. Please be kind.",
   "help_subject": "GetTor Help Email Test",
   "help_debug": "Log application errors to stdout",
@@ -9,8 +9,8 @@
   "smtp_mirrors_subject": "[GetTor] Mirrors",
   "smtp_help_subject": "[GetTor] Help",
   "smtp_unsupported_locale_subject": "[GetTor] Unsupported locale",
-  "smtp_unsupported_locale_msg": "The locale you requested '%s' is not supported.",
-  "smtp_vlinks_msg": "You requested Tor Browser for %s.\n \nYou will need only one of the links below to download the bundle. If a link does not work for you, try the next one.\n \n%s\n \n \n--\nGetTor",
+  "smtp_unsupported_locale_msg": "The locale you requested '{}' is not supported.",
+  "smtp_vlinks_msg": "You requested Tor Browser for {}.\n \nYou will need only one of the links below to download the bundle. If a link does not work for you, try the next one.\n \n{}\n \n \n--\nGetTor",
   "smtp_mirrors_msg": "Hi! this is the GetTor robot.\n \nThank you for your request. Attached to this email you will find\nan updated list of mirrors of Tor Project's website.",
   "smtp_help_msg": "Hi! This is the GetTor robot. I am here to help you download the\nlatest version of Tor Browser.\n \nPlease reply to this message with one of the options below:\n \nwindows\nlinux\nosx\nmirrors\n \nI will then send you the download instructions.\n \nIf you are unsure, just send a blank reply to this message."
 }



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits