[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [gettor/develop] Improvement of links message. See #17424
commit 676ee2890ea9d078fc33ac8b990f2cf655b3a086
Author: ilv <ilv@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri Dec 11 10:18:25 2015 -0300
Improvement of links message. See #17424
---
gettor/core.py | 22 +++++++++++++++------
gettor/smtp.py | 8 +++++++-
lang/smtp/i18n/en/LC_MESSAGES/en.po | 37 ++++++++++++-----------------------
3 files changed, 35 insertions(+), 32 deletions(-)
diff --git a/gettor/core.py b/gettor/core.py
index 3d946c9..97f7ce3 100644
--- a/gettor/core.py
+++ b/gettor/core.py
@@ -253,43 +253,49 @@ class Core(object):
t32, t64 = [t for t in providers[pname].split(",") if t]
link, signature, chs32 = [l for l in t32.split("$") if l]
+ link = "%s: %s" % (pname, link)
links32[link] = signature
link, signature, chs64 = [l for l in t64.split("$") if l]
+ link = "%s: %s" % (pname, link.lstrip())
links64[link] = signature
else:
link, signature, chs32 = [l for l in providers[pname].split("$") if l]
+ link = "%s: %s" % (pname, link)
links32[link] = signature
#providers[pname] = providers[pname].replace(",", "")
#providers[pname] = providers[pname].replace("$", "\n\n")
+ ### We will improve and add the verification section soon ###
# all packages are signed with same key
# (Tor Browser developers)
- fingerprint = config.get('key', 'fingerprint')
+ # fingerprint = config.get('key', 'fingerprint')
# for now, english messages only
- fingerprint_msg = self._get_msg('fingerprint', 'en')
- fingerprint_msg = fingerprint_msg % fingerprint
+ # fingerprint_msg = self._get_msg('fingerprint', 'en')
+ # fingerprint_msg = fingerprint_msg % fingerprint
except ConfigParser.Error as e:
raise InternalError("%s" % str(e))
# create the final links list with all providers
all_links = []
- msg = "Tor Browser %s-bit:" % arch
+ msg = "Tor Browser %s-bit:\n" % arch
for link in links32:
msg = "%s\n%s" % (msg, link)
all_links.append(msg)
if osys == 'linux':
- msg = "\n\n\nTor Browser 64-bit:"
+ msg = "\n\n\nTor Browser 64-bit:\n"
for link in links64:
msg = "%s\n%s" % (msg, link)
all_links.append(msg)
+ ### We will improve and add the verification section soon ###
+ """
msg = "\n\n\nTor Browser's signature %s-bit:" %\
arch
for link in links32:
@@ -313,6 +319,9 @@ class Core(object):
all_links.append(msg)
"""
+ ### end verification ###
+
+ """
for key in providers.keys():
# get more friendly description of the provider
try:
@@ -328,8 +337,9 @@ class Core(object):
raise InternalError("%s" % str(e))
"""
+ ### We will improve and add the verification section soon ###
# add fingerprint after the links
- all_links.append(fingerprint_msg)
+ # all_links.append(fingerprint_msg)
if all_links:
return "".join(all_links)
diff --git a/gettor/smtp.py b/gettor/smtp.py
index ed6a4fc..1cc8db3 100644
--- a/gettor/smtp.py
+++ b/gettor/smtp.py
@@ -33,6 +33,12 @@ import blacklist
"""SMTP module for processing email requests."""
+OS = {
+ 'osx': 'Mac OS X',
+ 'linux': 'Linux',
+ 'windows': 'Windows'
+}
+
class ConfigError(Exception):
pass
@@ -368,7 +374,7 @@ class SMTP(object):
try:
links_subject = self._get_msg('links_subject', 'en')
links_msg = self._get_msg('links_msg', 'en')
- links_msg = links_msg % (os, lc, links)
+ links_msg = links_msg % (os, links)
self._send_email(
from_addr,
diff --git a/lang/smtp/i18n/en/LC_MESSAGES/en.po b/lang/smtp/i18n/en/LC_MESSAGES/en.po
index ee6a24e..f987648 100644
--- a/lang/smtp/i18n/en/LC_MESSAGES/en.po
+++ b/lang/smtp/i18n/en/LC_MESSAGES/en.po
@@ -22,42 +22,29 @@ msgstr "The locale you requested '%s' is not supported."
#: Links message
msgid "links_msg"
-msgstr "Hello there! this is the 'GetTor' robot.\n\
+msgstr "You requested Tor Browser for %s.\n\
\n\
-Below are the links for your request (Tor Browser for %s, %s package):\n\
+You will need only one of the links below to download the bundle. If a link\n\
+does not work for you, try the next one.\n\
\n\
%s\n\
\n\
-===========================================================================\n\
-Still need help? If you have any questions, trouble connecting to Tor\n\
-network, or need to talk to a human, please contact our support team at:\n\
\n\
- help@xxxxxxxxxxxxxxxxx\n\
-\n\
-We are ready to answer your queries in English, Farsi, Chinese, Arabic,\n\
-French and Spanish."
+All the best.\n\
+--\n\
+GetTor team"
#: Mirrors message
msgid "mirrors_msg"
-msgstr "Hello there! this is the 'GetTor' robot.\n\
+msgstr "Hi! this is the GetTor robot.\n\
\n\
Thank you for your request. Attached to this email you will find\n\
-an updated list of mirrors of Tor Project's website.\n\
-\n\
-Still need help? If you have any questions, trouble connecting to Tor\n\
-network, or need to talk to a human, please contact our support team at:\n\
-\n\
- help@xxxxxxxxxxxxxxxxx\n\
-\n\
-We are ready to answer your queries in English, Farsi, Chinese, Arabic,\n\
-French and Spanish."
+an updated list of mirrors of Tor Project's website."
#: Help message
msgid "help_msg"
-msgstr "Hello there! this is the 'GetTor' robot.\n\
-\n\
-Thank you for your request. I am here to help you download the latest\n\
-Tor Browser.\n\
+msgstr "Hi! This is the GetTor robot. I am here to help you download the\n\
+latest version of Tor Browser.\n\
\n\
Please reply to this message with one of the options below:\n\
\n\
@@ -66,6 +53,6 @@ Please reply to this message with one of the options below:\n\
osx\n\
mirrors\n\
\n\
-And I will send you the download/access instructions quickly.\n\
+I will then send you the download instructions.\n\
\n\
-Tip: Just send a blank reply to this message if you are not sure."
+If 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