[tor-commits] [gettor/master] Attempt to improve the overall usability

kaner at torproject.org kaner at torproject.org
Sat Sep 3 12:35:54 UTC 2011


commit a4bf1bd7da331a159d93cc45b255100f79f2e554
Author: Christian Fromme <kaner at strace.org>
Date:   Sat Aug 27 18:18:16 2011 +0200

    Attempt to improve the overall usability
    - Better help texts explaining what packages are for whom
    - Change package names
    - Add a hint on how to unpack the files
    - Remove WinRAR hint and link
---
 README                  |    2 +-
 README.USER-HOWTO       |   12 +-
 gettor.conf             |   81 ++++----
 lib/gettor/config.py    |    2 +-
 lib/gettor/filters.py   |   11 +-
 lib/gettor/i18n.py      |  557 ++++++++++++-----------------------------------
 lib/gettor/packages.py  |    6 +-
 lib/gettor/requests.py  |    2 +-
 lib/gettor/responses.py |  232 +++++++++++++-------
 9 files changed, 347 insertions(+), 558 deletions(-)

diff --git a/README b/README
index 1988a61..b7a2084 100644
--- a/README
+++ b/README
@@ -134,7 +134,7 @@ and should look similar to this:
 
 
     #            "bundle name": ("single file regex", "split file regex")
-    PACKAGES = { "tor-browser-bundle": 
+    PACKAGES = { "windows": 
                  ("tor-browser-.*_en-US.exe$", "tor-browser-.*_en-US_split"), }
 
 
diff --git a/README.USER-HOWTO b/README.USER-HOWTO
index f068e02..6929190 100644
--- a/README.USER-HOWTO
+++ b/README.USER-HOWTO
@@ -31,12 +31,12 @@ choices. An example reply to a request for help follows:
    I am sorry, but your request was not understood. Please select one of the
    following package names:
 
-       panther-bundle
-       source-bundle
-       windows-bundle
-       tiger-bundle
-       tor-browser-bundle
-       tor-im-browser-bundle
+        windows
+        macosx-i386
+        macosx-ppc
+        linux-i386
+        linux-x86_64
+        source
 
    Please send me another email. It only needs a single package name anywhere
    in the body of your email.
diff --git a/gettor.conf b/gettor.conf
index 276e122..4b42105 100644
--- a/gettor.conf
+++ b/gettor.conf
@@ -50,124 +50,121 @@ PACKAGES = {
 #   "bundle name": 
 #           ("single file regex",  # Path names need to be relative to 
 #            "split file regex"),  # BASEDIR/dist
-    "tor-browser-bundle": 
+    "windows": 
             ("torbrowser/tor-browser-*_en-US.exe", 
              "torbrowser/tor-browser-*_en-US_split"),
-    "tor-browser-bundle_en": 
+    "windows_en": 
             ("torbrowser/tor-browser-*_en-US.exe", 
              "torbrowser/tor-browser-*_en-US_split"),
-    "tor-browser-bundle_de": 
+    "windows_de": 
             ("torbrowser/tor-browser-*_de.exe", 
              "torbrowser/tor-browser-*_de_split"),
-    "tor-browser-bundle_ar": 
+    "windows_ar": 
             ("torbrowser/tor-browser-*_ar.exe", 
              "torbrowser/tor-browser-*_ar_split"),
-    "tor-browser-bundle_es": 
+    "windows_es": 
             ("torbrowser/tor-browser-*_es-ES.exe", 
              "torbrowser/tor-browser-*_es-ES_split"),
-    "tor-browser-bundle_fa": 
+    "windows_fa": 
             ("torbrowser/tor-browser-*_fa.exe", 
              "torbrowser/tor-browser-*_fa_split"),
-    "tor-browser-bundle_fr": 
+    "windows_fr": 
             ("torbrowser/tor-browser-*_fr.exe", 
              "torbrowser/tor-browser-*_fr_split"),
-    "tor-browser-bundle_it": 
+    "windows_it": 
             ("torbrowser/tor-browser-*_it.exe", 
              "torbrowser/tor-browser-*_it_split"),
-    "tor-browser-bundle_nl": 
+    "windows_nl": 
             ("torbrowser/tor-browser-*_nl.exe", 
              "torbrowser/tor-browser-*_nl_split"),
-    "tor-browser-bundle_pl": 
+    "windows_pl": 
             ("torbrowser/tor-browser-*_pl.exe", 
              "torbrowser/tor-browser-*_pl_split"),
-    "tor-browser-bundle_pt": 
+    "windows_pt": 
             ("torbrowser/tor-browser-*_pt-PT.exe", 
              "torbrowser/tor-browser-*_pt-PT_split"),
-    "tor-browser-bundle_ru": 
+    "windows_ru": 
             ("torbrowser/tor-browser-*_ru.exe", 
              "torbrowser/tor-browser-*_ru_split"),
-    "tor-browser-bundle_zh_CN": 
+    "windows_zh_CN": 
             ("torbrowser/tor-browser-*_zh-CN.exe", 
              "torbrowser/tor-browser-*_zh-CN_split"),
-    "source-bundle": 
+    "source": 
             ("tor-*.tar.gz", 
              "unavailable"),
-    "windows-bundle": 
-            ("vidalia-bundles/vidalia-bundle-*.exe", 
-             "unavailable"),
-    "macosx-ppc-bundle": 
+    "macosx-ppc": 
             ("vidalia-bundles/vidalia-bundle-*-ppc.dmg", 
              "unavailable"),
-    "macosx-i386-bundle": 
+    "macosx-i386": 
             ("vidalia-bundles/vidalia-bundle-*-i386.dmg", 
              "unavailable"),
-    "linux-browser-bundle-i386": 
+    "linux-i386": 
             ("torbrowser/linux/tor-browser-gnu-linux-i686-*-en-US.tar.gz", 
              "unavailable"),
-    "linux-browser-bundle-i386_en": 
+    "linux-i386_en": 
             ("torbrowser/linux/tor-browser-gnu-linux-i686-*-en-US.tar.gz", 
              "unavailable"),
-    "linux-browser-bundle-i386_ar": 
+    "linux-i386_ar": 
             ("torbrowser/linux/tor-browser-gnu-linux-i686-*-ar.tar.gz", 
              "unavailable"),
-    "linux-browser-bundle-i386_de": 
+    "linux-i386_de": 
             ("torbrowser/linux/tor-browser-gnu-linux-i686-*-de.tar.gz", 
              "unavailable"),
-    "linux-browser-bundle-i386_es-ES": 
+    "linux-i386_es-ES": 
             ("torbrowser/linux/tor-browser-gnu-linux-i686-*-es-ES.tar.gz", 
              "unavailable"),
-    "linux-browser-bundle-i386_fa": 
+    "linux-i386_fa": 
             ("torbrowser/linux/tor-browser-gnu-linux-i686-*-fa.tar.gz", 
              "unavailable"),
-    "linux-browser-bundle-i386_fr": 
+    "linux-i386_fr": 
             ("torbrowser/linux/tor-browser-gnu-linux-i686-*-fr.tar.gz", 
              "unavailable"),
-    "linux-browser-bundle-i386_it": 
+    "linux-i386_it": 
             ("torbrowser/linux/tor-browser-gnu-linux-i686-*-it.tar.gz", 
              "unavailable"),
-    "linux-browser-bundle-i386_nl": 
+    "linux-i386_nl": 
             ("torbrowser/linux/tor-browser-gnu-linux-i686-*-nl.tar.gz", 
              "unavailable"),
-    "linux-browser-bundle-i386_pl": 
+    "linux-i386_pl": 
             ("torbrowser/linux/tor-browser-gnu-linux-i686-*-pl.tar.gz", 
              "unavailable"),
-    "linux-browser-bundle-i386_ru": 
+    "linux-i386_ru": 
             ("torbrowser/linux/tor-browser-gnu-linux-i686-*-ru.tar.gz", 
              "unavailable"),
-    "linux-browser-bundle-i386_zh_CN": 
+    "linux-i386_zh_CN": 
             ("torbrowser/linux/tor-browser-gnu-linux-i686-*-zh-CN.tar.gz", 
              "unavailable"),
-    "linux-browser-bundle-x86_64": 
+    "linux-x86_64": 
             ("torbrowser/linux/tor-browser-gnu-linux-x86_64-*-en-US.tar.gz", 
              "unavailable"),
-    "linux-browser-bundle-x86_64_en": 
+    "linux-x86_64_en": 
             ("torbrowser/linux/tor-browser-gnu-linux-x86_64-*-en-US.tar.gz", 
              "unavailable"),
-    "linux-browser-bundle-x86_64_ar": 
+    "linux-x86_64_ar": 
             ("torbrowser/linux/tor-browser-gnu-linux-x86_64-*-ar.tar.gz", 
              "unavailable"),
-    "linux-browser-bundle-x86_64_de": 
+    "linux-x86_64_de": 
             ("torbrowser/linux/tor-browser-gnu-linux-x86_64-*-de.tar.gz", 
              "unavailable"),
-    "linux-browser-bundle-x86_64_es-ES": 
+    "linux-x86_64_es-ES": 
             ("torbrowser/linux/tor-browser-gnu-linux-x86_64-*-es-ES.tar.gz", 
              "unavailable"),
-    "linux-browser-bundle-x86_64_fa": 
+    "linux-x86_64_fa": 
             ("torbrowser/linux/tor-browser-gnu-linux-x86_64-*-fa.tar.gz", 
              "unavailable"),
-    "linux-browser-bundle-x86_64_fr": 
+    "linux-x86_64_fr": 
             ("torbrowser/linux/tor-browser-gnu-linux-x86_64-*-fr.tar.gz", 
              "unavailable"),
-    "linux-browser-bundle-x86_64_it": 
+    "linux-x86_64_it": 
             ("torbrowser/linux/tor-browser-gnu-linux-x86_64-*-it.tar.gz", 
              "unavailable"),
-    "linux-browser-bundle-x86_64_nl": 
+    "linux-x86_64_nl": 
             ("torbrowser/linux/tor-browser-gnu-linux-x86_64-*-nl.tar.gz", 
              "unavailable"),
-    "linux-browser-bundle-x86_64_pl": 
+    "linux-x86_64_pl": 
             ("torbrowser/linux/tor-browser-gnu-linux-x86_64-*-pl.tar.gz", 
              "unavailable"),
-    "linux-browser-bundle-x86_64_zh_CN": 
+    "linux-x86_64_zh_CN": 
             ("torbrowser/linux/tor-browser-gnu-linux-x86_64-*-zh-CN.tar.gz", 
              "unavailable"),
     # Mike won't sign Torbutton; He doesn't get gettor support
diff --git a/lib/gettor/config.py b/lib/gettor/config.py
index 0efa1f4..16fb8b8 100644
--- a/lib/gettor/config.py
+++ b/lib/gettor/config.py
@@ -46,7 +46,7 @@ CONFIG_DEFAULTS = {
    'DEFAULT_LOCALE': "en",
    'SUPP_LANGS': { 'en': ("english", ), },
    'PACKAGES': { 
-       "tor-browser-bundle": 
+       "windows": 
            ("tor-browser-.*_en-US.exe$", 
             "tor-browser-.*_en-US_split"), }
 }
diff --git a/lib/gettor/filters.py b/lib/gettor/filters.py
index f2f0534..ff0cfb4 100644
--- a/lib/gettor/filters.py
+++ b/lib/gettor/filters.py
@@ -18,11 +18,10 @@ def doPackageHacks(packageName, locale):
        suffix. This isn't nice because we're hard-coding package names here
        Attention: This needs to correspond to the  packages in packages.py
     """
-    if packageName == "tor-browser-bundle" \
-           or packageName == "tor-im-browser-bundle" \
-           or packageName == "linux-browser-bundle-i386" \
-           or packageName == "linux-browser-bundle-x86_64":
-        # "tor-browser-bundle" => "tor-browser-bundle_de"
+    if packageName == "windows" \
+           or packageName == "linux-i386" \
+           or packageName == "linux-x86_64":
+        # "windows" => "windows_de"
         packageName += "_" + locale
 
     return packageName
@@ -48,7 +47,7 @@ def doToAddressHack(toAddress):
        'torfarsi1 at torproject.org', we understand it to reply in Farsi to that
        email.
     """
-    if re.compile(".*torfarsi1 at torproject.org.*").match(toAddress):
+    if re.compile(".*torfarsi.*@torproject.org.*").match(toAddress):
         return "<gettor+fa at torproject.org>"
     else:
         return toAddress
diff --git a/lib/gettor/i18n.py b/lib/gettor/i18n.py
index 6f40bd1..54e365e 100644
--- a/lib/gettor/i18n.py
+++ b/lib/gettor/i18n.py
@@ -22,421 +22,47 @@ def _(text):
     """
     return text
 
-# Giant multi language help message. Add more translations as they become ready
-MULTILANGHELP = """
-    Hello, This is the "GetTor" robot.
-
-    I will mail you a Tor package, if you tell me which one you want.
-    Please select one of the following package names:
-
-        tor-browser-bundle
-        macosx-i386-bundle
-        macosx-ppc-bundle
-        linux-browser-bundle-i386
-        linux-browser-bundle-x86_64
-        source-bundle
-
-    Please reply to this mail (to gettor), and tell me
-    a single package name anywhere in the body of your email.
-
-    OBTAINING LOCALIZED VERSIONS OF TOR
-    ===================================
-
-    To get a version of Tor translated into your language, specify the
-    language you want in the address you send the mail to:
-
-        gettor+zh
-
-    This example will give you the requested package in a localized
-    version for Chinese. Check below for a list of supported language
-    codes.
-
-    List of supported locales:
-    -------------------------
-
-    Here is a list of all available languages:
-
-    gettor+ar:     Arabic
-    gettor+de:     German
-    gettor+en:     English
-    gettor+es:     Spanish
-    gettor+fa:     Farsi (Iran)
-    gettor+fr:     French
-    gettor+it:     Italian
-    gettor+nl:     Dutch
-    gettor+pl:     Polish
-    gettor+ru:     Russian
-    gettor+zh:     Chinese
-
-    If you select no language, you will receive the English version.
-
-    SUPPORT
-    =======
-
-    If you have any questions or it doesn't work, you can contact a
-    human at this support email address: tor-assistants
-
-    --
-
-    مرحبا، أنا روبوت \"احصل على تور\".
-    
-    سأرسل لك حزمة برامج تور، إذا أخبرتني أيها تريد.
-    رجاء اختر إحدى أسماء الحزم التالية:
-    
-    tor-browser-bundle
-    macosx-i386-bundle
-    macosx-ppc-bundle
-    linux-browser-bundle-i386
-    linux-browser-bundle-x86_64
-    source-bundle
-    
-    يرجى أن ترد على هذه الرسالة (إلى gettor at torproject.org)، وتخبرني
-    باسم حزمة واحدة فقط في أي مكان ضمن رسالة الرد.
-    
-    الحصول على إصدارات مترجمة من تور
-    ========================
-    
-    لتحصل على إصدار تور مترجم إلى لغتك، يرجى أن تحدد
-    اللغة التي تريد ضمن العنوان الذي سترسل الرسالة الإلكترونية إليه:
-    
-    gettor+zh at torproject.org
-    
-    هذا المثال يعطيك الحزمة المطلوبة مترجمة
-    للغة الصينية. تحقق من القائمة أدناه لتجد رموز اللغات
-    المدعومة.
-    
-    قائمة اللغات المدعومة:
-    -------------------
-    
-    ها هي قائمة اللغات المتوفرة:
-    
-    gettor+ar at torproject.org: العربية
-    gettor+de at torproject.org: الألمانية
-    gettor+en at torproject.org: الإنكليزية
-    gettor+es at torproject.org: الإسبانية
-    gettor+fa at torproject.org: الفارسية
-    gettor+fr at torproject.org: الفرنسية
-    gettor+it at torproject.org: الإيطالية
-    gettor+nl at torproject.org: الهولندية
-    gettor+pl at torproject.org: البولندية
-    gettor+ru at torproject.org: الروسية
-    gettor+zh at torproject.org: الصينية
-    
-    إن لم تقم باختيار لغة فستحصل على الإصدارة الإنكليزية.
-    
-    الدعم الفني
-    =======
-    
-    إن كانت لديك أية أسئلة أو إذا لم يعمل هذا الحل يمكنك الاتصال بكائن
-    بشري على عنوان الدعم الفني التالي: tor-assistants at torproject.org
-
-    --
-
-    سلام! روبات "GetTor" در خدمت شماست. 
-    
-    چنانچه به من بگویید که به کدامیک از بسته های Tor  نیاز دارید، آن را برای شما 
-    ارسال خواهم کرد. 
-    لطفا یکی از بسته های را زیر با ذکر نام انتخاب کنید:  
-    
-    tor-browser-bundle
-    macosx-i386-bundle
-    macosx-ppc-bundle
-    linux-browser-bundle-i386
-    linux-browser-bundle-x86_64
-    source-bundle
-
-    لطفا به این نامه پاسخ داده ( به آدرس gettor at torproject.org ) و در قسمتی از 
-    متن ایمیل خود نام یکی از بسته های فوق را ذکر کنید. 
-    
-    تهیه نسخه ترجمه شده  TOR  
-    ===================================
-    
-    برای دریافت نسخه ای از TOR  ترجمه شده به زبان محلی شما، می بایستی زبان مورد 
-    نظر خود را در آدرس گیرنده ایمیل ذکر کنید. بعنوان مثال:  
-    
-    gettor+zh at torproject.org
-
-    در این مثال، فرستنده خواهان نسخه ترجمه شده به زبان چینی می باشد. برای آگاهی 
-    از کدهای مربوط به زبانهای قابل پشتیبانی توسط Tor ، فهرست زیر را مطالعه کنید: 
-    فهرست زبانهای پشتیانی شده
-    -------------------------
-
-    gettor+ar at torproject.org: Arabic
-    gettor+de at torproject.org: German
-    gettor+en at torproject.org: English
-    gettor+es at torproject.org: Spanish
-    gettor+fa at torproject.org: Farsi (Iran)
-    gettor+fr at torproject.org: French
-    gettor+it at torproject.org: Italian
-    gettor+nl at torproject.org: Dutch
-    gettor+pl at torproject.org: Polish
-    gettor+ru at torproject.org: Russian
-    gettor+zh at torproject.org: Chinese
-
-    چنانچه هیچیک از زبانهای فوق را انتخاب نکنید، نسخه انگلیسی برای شما ارسال 
-    خواهد شد. 
-    
-    پشتیبانی 
-    =======
-    
-    چنانچه سوالی دارید یا برنامه دچار اشکال بوده و کار نمی کند ، با قسمت 
-    پشتیبانی با آدرس زیر تماس بگیرید تا یک انسان به سوال شما پاسخ دهد: tor-assistants at torproject.org
-
-    --
-
-    Hei, dette er "GetTor"-roboten
-    
-    Jeg kommer til å sende deg en Tor-pakke, hvis du forteller meg hvilken du 
-    vil ha.
-    Vennligst velg en av følgende pakkenavn:
-    
-    tor-browser-bundle
-    macosx-i386-bundle
-    macosx-ppc-bundle
-    linux-browser-bundle-i386
-    linux-browser-bundle-x86_64
-    source-bundle
-
-    Vennligst svar til denne eposten (til gettor at torproject.org), og nevn
-    kun et enkelt pakkenavn i tekstområdet til eposten din.
-    
-    SKAFFE LOKALISERTE VERSJONER AV TOR
-    ===================================
-
-    For å skaffe en versjon av Tor som har blitt oversatt til ditt språk,
-    spesifiser språket du vil i epostadressen du sender eposten til:
-
-    gettor+zh at torproject.org
-
-    Dette eksempelet vil gi deg en forespurt pakke som er en oversatt
-    versjon for kinesisk. Se listen nedenfor for hvilke språk det er støtte for.
-
-    Liste av støttede språk:
-    -------------------------
-
-    Her er en liste av språkene som er tilgjengelig:
-
-    gettor+ar at torproject.org: Arabisk
-    gettor+de at torproject.org: Tysk
-    gettor+en at torproject.org: Engelsk
-    gettor+es at torproject.org: Spansk
-    gettor+fa at torproject.org: Farsi (Iran)
-    gettor+fr at torproject.org: Fransk
-    gettor+it at torproject.org: Italiensk
-    gettor+nl at torproject.org: Nederlandsk
-    gettor+pl at torproject.org: Polsk
-    gettor+ru at torproject.org: Russisk
-    gettor+zh at torproject.org: Kinesisk
-
-    Hvis du ikke spesifiserer noen språk vil du motta standard Engelsk
-    versjon
-
-    STØTTE
-    =======
-
-    Hvis du har noen spørsmål eller det ikke virker, kan du kontakte et
-    menneske på denne support-eposten: tor-assistants at torproject.org
-
-    --
-
-    Olá! Este é o robot "GetTor".
-
-    Eu envio-lhe um pacote Tor, bastando para isso dizer qual o que quer. 
-    Escolha um dos seguintes pacotes:
-
-    tor-browser-bundle
-    macosx-i386-bundle
-    macosx-ppc-bundle
-    linux-browser-bundle-i386
-    linux-browser-bundle-x86_64
-    source-bundle
-
-    Por favor responda a esta email (para gettor at torproject.org), e diga qual o 
-    pacote que deseja, colocando o seu nome no corpo do seu email.
-
-    OBTER VERSÕES TRADUZIDAS DO TOR
-    ===================================
-
-    Para lhe ser enviado uma versão traduzida do Tor, especifique a língua no 
-    destinatário do seu email:
-
-    gettor+zh at torproject.org
-
-    Este exemplo vai enviar o pacote traduzido para Chinês Simplificado. Veja a 
-    lista de endereços de email existentes que pode utilizar:
-
-    Lista de endereços de email suportados:
-    -------------------------
-
-    gettor+pt at torproject.org: Português
-    gettor+ar at torproject.org: Arábico
-    gettor+de at torproject.org: Alemão
-    gettor+en at torproject.org: Inglês
-    gettor+es at torproject.org: Espanhol
-    gettor+fa at torproject.org: Farsi (Irão)
-    gettor+fr at torproject.org: Francês
-    gettor+it at torproject.org: Italiano
-    gettor+nl at torproject.org: Holandês
-    gettor+pl at torproject.org: Polaco
-    gettor+ru at torproject.org: Russo
-    gettor+zh at torproject.org: Chinês
-
-    Se não escolher nenhuma língua, receberá o Tor em Inglês.
-
-    SUPORTE
-    =======
-
-    Se tiver alguma dúvida, pode contactar um humano através do seguinte 
-    endereço: tor-assistants at torproject.org
-
-    --
-
-    Здравствуйте! Это "робот GetTor".
-
-    Я отошлю вам пакет Tor если вы укажете который вы хотите.
-    Пожалуйста выберите один из пакетов:
-
-    tor-browser-bundle
-    macosx-i386-bundle
-    macosx-ppc-bundle
-    linux-browser-bundle-i386
-    linux-browser-bundle-x86_64
-    source-bundle
-
-    Пожалуйста свяжитесь с нами по этой элктронной почте 
-    (gettor at torproject.org), и укажите
-    название одного из пакетов в любом месте в "теле" вашего письма.
-
-    ПОЛУЧЕНИЕ ЛОКАЛИЗИРОВАННЫХ ВЕРСИЙ TOR
-    ===================================
-
-    Чтобы получить версию Tor переведенную на ваш язык,укажите
-    предпочитаемый язык в адресной строке куда вы отослали электронную почту:
-
-    gettor+zh at torproject.org
-
-    Вышеуказанный пример даст вам запрошенный пакет в локализированной
-    версии китайского языка. Проверьте ниже список кодов поддерживаемых
-     языков.
-
-    Список поддерживаемых регионов
-    -------------------------
-
-    Ниже указан список всех доступных языков:
-
-    gettor+ar at torproject.org:   арабский
-    gettor+de at torproject.org: немецкий
-    gettor+en at torproject.org: английский
-    gettor+es at torproject.org: испанский
-    gettor+fa at torproject.org: фарси (Иран)
-    gettor+fr at torproject.org: французский
-    gettor+it at torproject.org: итальянский
-    gettor+nl at torproject.org: голландский
-    gettor+pl at torproject.org: польский
-    gettor+ru at torproject.org: русский
-    gettor+zh at torproject.org: китайский
-
-    Если вы не выберите язык, вы получите версию на английском языке.
-
-    ПОДДЕРЖКА
-    =======
-
-    Если у вас вопросы или что то не сработало, вы можете связаться 
-    с живым представителем по этому электронному адресу:tor-assistants at torproject.org
-
-    --
-
-    你好, 这里是"GetTor"自动回复。
-
-    您从这里可以得到Tor套件, 请告诉我您需要的套件种类.
-    请选择套件名称:
-
-        tor-browser-bundle
-                         (Tor+Firefox浏览器)
-        macosx-i386-bundle
-                         (Tor for MacOS)
-        macosx-ppc-bundle
-                         (Tor for MacOS on PowerPC )
-        linux-browser-bundle-i386
-        linux-browser-bundle-x86_64
-                         (Tor for Linux)
-        source-bundle
-                         (源码包)
-
-    请直接回复本邮件(gettor at torproject.org), 
-    并在信的正文中写好您所需要的套件名称(不包括括号内的中文)。
-
-    获取其他语言的Tor套件
-    ===================================
-
-    在收件人地址中指定语言代码可以获得本对应语言的版本,例如:
-
-        gettor+zh at torproject.org
-
-    本例中,您将得到中文版的Tor套件,下面是目前支持的语种代码:
-
-    支持语言列表:
-    -------------------------
-
-    全部可用语言列表:
-
-    gettor+ar at torproject.org:     Arabic
-    gettor+de at torproject.org:     German
-    gettor+en at torproject.org:     English
-    gettor+es at torproject.org:     Spanish
-    gettor+fa at torproject.org:     Farsi (Iran)
-    gettor+fr at torproject.org:     French
-    gettor+it at torproject.org:     Italian
-    gettor+nl at torproject.org:     Dutch
-    gettor+pl at torproject.org:     Polish
-    gettor+ru at torproject.org:     Russian
-    gettor+zh at torproject.org:     中文
-
-    如果您未指定语言代码,您将收到英文版。
-
-    支持
-    =======
-
-    如果您遇到困难或服务出现问题,请联系我们的
-    技术支持邮箱: tor-assistants at torproject.org
-
-    --
-        """
-
 GETTOR_TEXT = [
  # GETTOR_TEXT[0]
-_("""Hello, This is the "GetTor" robot.
-
-Thank you for your request."""),
+_("""Hello, This is the "GetTor" robot."""),
  # GETTOR_TEXT[1]
+_("""Thank you for your request."""),
+ # GETTOR_TEXT[2]
 _(""" Unfortunately, we won't answer you at this address. You should make
-an account with GMAIL.COM or YAHOO.CN and send the mail from
+an account with GMAIL.COM, YAHOO.COM or YAHOO.CN and send the mail from
 one of those."""),
- # GETTOR_TEXT[2]
+ # GETTOR_TEXT[3]
 _("""We only process requests from email services that support "DKIM",
 which is an email feature that lets us verify that the address in the
 "From" line is actually the one who sent the mail."""),
- # GETTOR_TEXT[3]
+ # GETTOR_TEXT[4]
 _("""(We apologize if you didn't ask for this mail. Since your email is from
 a service that doesn't use DKIM, we're sending a short explanation,
 and then we'll ignore this email address for the next day or so.)"""),
- # GETTOR_TEXT[4]
-_("""Please note that currently, we can't process HTML emails or base 64
-mails. You will need to send plain text."""),
  # GETTOR_TEXT[5]
 _("""If you have any questions or it doesn't work, you can contact a
 human at this support email address: tor-assistants at torproject.org"""),
  # GETTOR_TEXT[6]
 _("""I will mail you a Tor package, if you tell me which one you want.
-Please select one of the following package names:"""),
+Please select one of the following package names:
+
+    windows
+    macos-i386
+    macos-ppc
+    linux-i386
+    linux-x86_64
+    source"""),
  # GETTOR_TEXT[7]
-_("""Please reply to this mail (to gettor at torproject.org), and tell me
-a single package name anywhere in the body of your email."""),
+_("""Please reply to this mail, and tell me a single package name anywhere 
+in the body of your email."""),
  # GETTOR_TEXT[8]
-_(""" OBTAINING LOCALIZED VERSIONS OF TOR"""),
+_("""OBTAINING LOCALIZED VERSIONS OF TOR
+==================================="""),
  # GETTOR_TEXT[9]
 _("""To get a version of Tor translated into your language, specify the
-language you want in the address you send the mail to:"""),
+language you want in the address you send the mail to:
+
+    gettor+zh_CN at torproject.org"""),
  # GETTOR_TEXT[10]
 _("""This example will give you the requested package in a localized
 version for Chinese. Check below for a list of supported language
@@ -460,14 +86,18 @@ _("""    gettor+ar at torproject.org:     Arabic
  # GETTOR_TEXT[14]
 _("""If you select no language, you will receive the English version."""),
  # GETTOR_TEXT[15]
-_("""SMALLER SIZED PACKAGES"""),
+_("""SMALLER SIZED PACKAGES
+======================"""),
  # GETTOR_TEXT[16]
 _("""If your bandwith is low or your provider doesn't allow you to 
 receive large attachments in your email, there is a feature of 
 GetTor you can use to make it send you a number of small packages
 instead of one big one."""),
  # GETTOR_TEXT[17]
-_("""Simply include the keyword 'split' somewhere in your email like so:"""),
+_("""Simply include the keyword 'split' somewhere in your email like so:
+        
+    windows
+    split"""),
  # GETTOR_TEXT[18]
 _("""Sending this text in an email to GetTor will cause it to send you 
 the Tor Browser Bundle in a number of 1,4MB attachments."""),
@@ -478,38 +108,49 @@ one package again. This is done as follows:"""),
 _("""1.) Save all received attachments into one folder on your disk."""),
  # GETTOR_TEXT[21]
 _("""2.) Unzip all files ending in ".z". If you saved all attachments to
-a fresh folder before, simply unzip all files in that folder."""),
+a fresh folder before, simply unzip all files in that folder. If you don't
+know how to unzip the .z files, please see the UNPACKING THE FILES section."""),
  # GETTOR_TEXT[22]
 _("""3.) Verify all files as described in the mail you received with 
 each package. (gpg --verify)"""),
  # GETTOR_TEXT[23]
-_("""4.) Now use a program that can unrar multivolume RAR archives. On
-Windows, this usually is WinRAR. If you don't have that
-installed on you computer yet, get it here:"""),
+_("""4.) Now unpack the multi-volume archive into one file by double-
+clicking the file ending in "..split.part01.exe". This should start the 
+process automatically."""),
  # GETTOR_TEXT[24]
-_("""To unpack your Tor package, simply doubleclick the ".exe" file."""),
- # GETTOR_TEXT[25]
 _("""5.) After unpacking is finished, you should find a newly created 
 ".exe" file in your destination folder. Simply doubleclick
 that and Tor Browser Bundle should start within a few seconds."""),
- # GETTOR_TEXT[26]
+ # GETTOR_TEXT[25]
 _("""6.) That's it. You're done. Thanks for using Tor and have fun!"""),
+ # GETTOR_TEXT[26]
+_("""SUPPORT
+======="""),
  # GETTOR_TEXT[27]
-_("""SUPPORT"""),
- # GETTOR_TEXT[28]
 _("""If you have any questions or it doesn't work, you can contact a
 human at this support email address: tor-assistants at torproject.org"""),
- # GETTOR_TEXT[29]
+ # GETTOR_TEXT[28]
 _(""" Here's your requested software as a zip file. Please unzip the
 package and verify the signature."""),
+ # GETTOR_TEXT[29]
+_("""VERIFY SIGNATURE
+================
+If your computer has GnuPG installed, use the gpg commandline 
+tool as follows after unpacking the zip file:
+
+    gpg --verify tor-browser-1.3.24_en-US.exe.asc tor-browser-1.3.24_en-US.exe"""),
  # GETTOR_TEXT[30]
-_("""Hint: If your computer has GnuPG installed, use the gpg
-commandline tool as follows after unpacking the zip file:"""),
+_("""The output should look somewhat like this:
+
+    gpg: Good signature from 'Erinn Clark <...>'"""),
  # GETTOR_TEXT[31]
-_("""The output should look somewhat like this:"""),
- # GETTOR_TEXT[32]
 _("""If you're not familiar with commandline tools, try looking for
-a graphical user interface for GnuPG on this website:"""),
+a graphical user interface for GnuPG on this website:
+
+    http://www.gnupg.org/related_software/frontends.html"""),
+ # GETTOR_TEXT[32]
+_("""BLOCKED ACCESS / CENSORSHIP
+==========================="""),
  # GETTOR_TEXT[33]
 _("""If your Internet connection blocks access to the Tor network, you
 may need a bridge relay. Bridge relays (or "bridges" for short)
@@ -519,7 +160,9 @@ connections to all the known Tor relays, they probably won't be able
 to block all the bridges."""),
  # GETTOR_TEXT[34]
 _("""You can acquire a bridge by sending an email that contains "get bridges"
-in the body of the email to the following email address:"""),
+in the body of the email to the following email address:
+
+    bridges at torproject.org"""),
  # GETTOR_TEXT[35]
 _("""It is also possible to fetch bridges with a web browser at the following
 url: https://bridges.torproject.org/"""),
@@ -537,7 +180,7 @@ _("""It was successfully understood. Your request is currently being processed.
 Your package should arrive within the next ten minutes."""),
  # GETTOR_TEXT[39]
 _("""If it doesn't arrive, the package might be too big for your mail provider.
-Try resending the mail from a GMAIL.COM or YAHOO.COM account."""),
+Try resending the mail from a GMAIL.COM, YAHOO.CN or YAHOO.COM account."""),
  # GETTOR_TEXT[40]
 _("""Unfortunately we are currently experiencing problems and we can't fulfill
 your request right now. Please be patient as we try to resolve this issue."""),
@@ -545,5 +188,89 @@ your request right now. Please be patient as we try to resolve this issue."""),
 _("""Unfortunately there is no split package available for the package you
 requested. Please send us another package name or request the same package 
 again, but remove the 'split' keyword. In that case we'll send you the whole 
-package. Make sure this is what you want.""")
+package. Make sure this is what you want."""),
+ # GETTOR_TEXT[42]
+_("""UNPACKING THE FILES
+==================="""),
+ # GETTOR_TEXT[43]
+_("""To unpack the files you received, there's a number of alternatives on
+how to do it. The easiest way is to install 7-Zip, a free file compression/
+uncompression tool. If it isn't installed on your computer yet, you can
+download it here:
+
+    http://www.7-zip.org/"""),
+ # GETTOR_TEXT[44]
+_("""When 7-Zip is installed, you can open the .z archive you received from
+us by double-clicking on it."""),
+ # GETTOR_TEXT[45]
+_("""An alternative way to get the .z files extraced is to rename them to
+.zip. For example, if you recevied a file called "windows.z", rename it to 
+"windows.zip". You should then be able to extract the archive with common 
+file archiver programs that probably are already installed on your computer."""),
+ # GETTOR_TEXT[46]
+_("""Please reply to this mail, and tell me a single package name anywhere in 
+the body of your email. To make your decision a bit easier, here's a 
+short explanation of what these packages are:"""),
+ # GETTOR_TEXT[47]
+_("""windows:
+The Tor Browser Bundle package for Windows operating systems. If you're 
+running some version of Windows, like Windows XP, Windows Vista or 
+Windows 7, this is the package you should get."""),
+ # GETTOR_TEXT[48]
+_("""macos-i386:
+The Tor Browser Bundle package for OS X, Intel CPU architecture. In 
+general, newer Mac hardware will require you to use this package."""),
+ # GETTOR_TEXT[49]
+_("""macos-ppc:
+This is a Vidalia Bundle for older Macs running OS X on PowerPC CPUs. 
+Note that this package will be deprecated soon."""),
+ # GETTOR_TEXT[50]
+_("""linux-i386:
+The Tor Browser Bundle package for Linux, 32bit versions."""),
+ # GETTOR_TEXT[51]
+_("""Note that this package is rather large and needs your email provider to 
+allow for attachments of about 30MB in size."""),
+ # GETTOR_TEXT[52]
+_("""linux-x86_64:
+The Tor Browser Bundle package for Linux, 64bit versions."""),
+ # GETTOR_TEXT[53]
+_("""source:
+The Tor source code. Only request this package if you know what you're 
+doing. This isn't the package a normal user wants."""),
+ # GETTOR_TEXT[54]
+_("""FREQUENTLY ASKED QUESTIONS
+=========================="""),
+ # GETTOR_TEXT[55]
+_("""What is Tor?"""),
+ # GETTOR_TEXT[56]
+_("""The name "Tor" can refer to several different components."""),
+ # GETTOR_TEXT[57]
+_("""The Tor software is a program you can run on your computer that helps 
+keep you safe on the Internet. Tor protects you by bouncing your 
+communications around a distributed network of relays run by volunteers 
+all around the world: it prevents somebody watching your Internet connection 
+from learning what sites you visit, and it prevents the sites you visit from 
+learning your physical location. This set of volunteer relays is called the 
+Tor network. You can read more about how Tor works here:
+
+    https://www.torproject.org/about/overview.html.en"""),
+ # GETTOR_TEXT[58]
+_("""What is the Tor Browser Bundle?"""),
+ # GETTOR_TEXT[59]
+_("""The Browser Bundle (TBB) is the package we recommend to most users. 
+The bundle comes with everything you need to safely browse the Internet.
+Just extract it and run."""),
+ # GETTOR_TEXT[60]
+_("""What package should I request?"""),
+ # GETTOR_TEXT[61]
+_("""This depends on the operating system you use. For instance, if your
+operating system is Microsoft Windows, you should request "windows". Here
+is a short explanation of all packages to request and what operating 
+systems there are suitable for:"""),
+ # GETTOR_TEXT[62]
+_("""How do I extract the file(s) you sent me?"""),
+ # GETTOR_TEXT[63]
+_("""QUESTION:"""),
+ # GETTOR_TEXT[64]
+_("""ANSWER:""")
 ]
diff --git a/lib/gettor/packages.py b/lib/gettor/packages.py
index c5fa791..c3dbe65 100644
--- a/lib/gettor/packages.py
+++ b/lib/gettor/packages.py
@@ -131,8 +131,8 @@ class Packages:
         self.rsync += " "
         self.rsync += "--exclude='*privoxy*'"
         self.rsync += " "
-        self.rsync += "--exclude='*alpha*'"
-        self.rsync += " "
+#self.rsync += "--exclude='*alpha*'"
+#       self.rsync += " "
         self.rsync += "--exclude='*torbutton*'"
         self.rsync += " "
         # Exclude tor-im bundles for now. Too large. XXX 
@@ -140,8 +140,6 @@ class Packages:
         self.rsync += " "
         self.rsync += "--exclude='*win32*'"
         self.rsync += " "
-        self.rsync += "--exclude='*android*'"
-        self.rsync += " "
         self.rsync += "--exclude='*misc*'"
         self.rsync += " "
         if not silent:
diff --git a/lib/gettor/requests.py b/lib/gettor/requests.py
index 5b9bb3b..977b776 100644
--- a/lib/gettor/requests.py
+++ b/lib/gettor/requests.py
@@ -107,7 +107,7 @@ class requestMail:
         """If we find 'split' somewhere we assume that the user wants a split 
            delivery
         """
-        match = re.match(".*split.*", line, re.DOTALL)
+        match = re.match("\s*split.*", line, re.DOTALL)
         if match:
             logging.debug("User requested a split delivery")
             return True
diff --git a/lib/gettor/responses.py b/lib/gettor/responses.py
index b0dd643..bf1d2cb 100644
--- a/lib/gettor/responses.py
+++ b/lib/gettor/responses.py
@@ -18,92 +18,157 @@ from email.mime.text import MIMEText
 import gettor.blacklist
 import gettor.i18n as i18n
 
-def getPackageHelpMsg(t):
-        return t.gettext(i18n.GETTOR_TEXT[0]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[6]) + "\n\n" \
-             + """        tor-browser-bundle
-        macosx-i386-bundle
-        macosx-ppc-bundle
-        linux-browser-bundle-i386
-        linux-browser-bundle-x86_64
-        source-bundle""" + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[7]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[8]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[9]) + "\n\n" \
-             + "        gettor+zh_CN at torproject.org" + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[10]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[11]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[12]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[13]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[14]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[15]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[16]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[17]) + "\n\n" \
-             + "        tor-browser-bundle" + "\n" \
-             + "        split" + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[18]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[19]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[20]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[21]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[22]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[23]) + "\n\n" \
-             + "        http://www.win-rar.com/download.html" + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[23]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[24]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[25]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[26]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[27]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[28]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[33]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[34]) + "\n\n" \
-             + "        bridges at torproject.org" + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[34]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[35]) + "\n"
-                
+def getGreetingText(t):
+    return t.gettext(i18n.GETTOR_TEXT[0]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[1]) + "\n\n"
+
+def getPackageHelpText(t):
+    return t.gettext(i18n.GETTOR_TEXT[6]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[46]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[47]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[48]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[49]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[50]) + "\n" \
+         + t.gettext(i18n.GETTOR_TEXT[51]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[52]) + "\n" \
+         + t.gettext(i18n.GETTOR_TEXT[51]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[53]) + "\n\n"
+
+def getLocalizedVersionHelpText(t):
+    return t.gettext(i18n.GETTOR_TEXT[8]) + "\n" \
+         + t.gettext(i18n.GETTOR_TEXT[9]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[10]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[12]) + "\n" \
+         + t.gettext(i18n.GETTOR_TEXT[13]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[14]) + "\n\n"
+
+def getBridgesHelpText(t):
+    return t.gettext(i18n.GETTOR_TEXT[32]) + "\n" \
+         + t.gettext(i18n.GETTOR_TEXT[33]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[34]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[35]) + "\n\n"
+
+def getGeneralHelpText(t):
+    return getGreetingText(t) \
+         + getPackageHelpText(t) \
+         + getLocalizedVersionHelpText(t) \
+         + t.gettext(i18n.GETTOR_TEXT[15]) + "\n" \
+         + t.gettext(i18n.GETTOR_TEXT[16]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[17]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[18]) + "\n\n" \
+         + getBridgesHelpText(t) \
+         + getSupportText(t)
+
+def getFAQText(t):
+    return t.gettext(i18n.GETTOR_TEXT[54]) + "\n\n" \
+             + t.gettext(i18n.GETTOR_TEXT[63]) + "\n" \
+             + t.gettext(i18n.GETTOR_TEXT[55]) + "\n" \
+             + t.gettext(i18n.GETTOR_TEXT[64]) + "\n" \
+             + t.gettext(i18n.GETTOR_TEXT[56]) + "\n" \
+             + t.gettext(i18n.GETTOR_TEXT[57]) + "\n\n" \
+             + t.gettext(i18n.GETTOR_TEXT[63]) + "\n" \
+             + t.gettext(i18n.GETTOR_TEXT[58]) + "\n" \
+             + t.gettext(i18n.GETTOR_TEXT[64]) + "\n" \
+             + t.gettext(i18n.GETTOR_TEXT[59]) + "\n\n" \
+             + t.gettext(i18n.GETTOR_TEXT[63]) + "\n" \
+             + t.gettext(i18n.GETTOR_TEXT[60]) + "\n" \
+             + t.gettext(i18n.GETTOR_TEXT[64]) + "\n" \
+             + t.gettext(i18n.GETTOR_TEXT[61]) + "\n\n" \
+             + t.gettext(i18n.GETTOR_TEXT[47]) + "\n\n" \
+             + t.gettext(i18n.GETTOR_TEXT[48]) + "\n\n" \
+             + t.gettext(i18n.GETTOR_TEXT[49]) + "\n\n" \
+             + t.gettext(i18n.GETTOR_TEXT[50]) + "\n\n" \
+             + t.gettext(i18n.GETTOR_TEXT[51]) + "\n\n" \
+             + t.gettext(i18n.GETTOR_TEXT[52]) + "\n\n" \
+             + t.gettext(i18n.GETTOR_TEXT[53]) + "\n\n" \
+             + t.gettext(i18n.GETTOR_TEXT[63]) + "\n" \
+             + t.gettext(i18n.GETTOR_TEXT[62]) + "\n" \
+             + t.gettext(i18n.GETTOR_TEXT[64]) + "\n" \
+             + t.gettext(i18n.GETTOR_TEXT[43]) + "\n\n" \
+             + t.gettext(i18n.GETTOR_TEXT[44]) + "\n\n" \
+             + t.gettext(i18n.GETTOR_TEXT[45]) + "\n\n"
+
+def getSupportText(t):
+    return t.gettext(i18n.GETTOR_TEXT[26]) + "\n" \
+         + t.gettext(i18n.GETTOR_TEXT[27]) + "\n\n" 
+
+def getSplitPackageText(t):
+    return t.gettext(i18n.GETTOR_TEXT[36]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[37]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[19]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[20]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[21]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[22]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[23]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[24]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[25]) + "\n\n" 
+
+def getUnpackingText(t):
+    return t.gettext(i18n.GETTOR_TEXT[42]) + "\n" \
+         + t.gettext(i18n.GETTOR_TEXT[43]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[44]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[45]) + "\n\n" \
+
+def getVerifySignatureText(t):
+    return t.gettext(i18n.GETTOR_TEXT[29]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[30]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[31]) + "\n\n"
+
+def getInitialHelpMsg(t, config):
+    """Build a help string containing all languages we know.
+    """
+    help_text = ""
+    # Hello, dirty hack! Add "en", "fa", "zh_CN" hard-coded in the front
+    # as long as Python won't let us order out dict
+    t = i18n.getLang("en", config)
+    help_text += getGeneralHelpText(t)
+    help_text += "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n\n"
+    t = i18n.getLang("fa", config)
+    help_text += getGeneralHelpText(t)
+    help_text += "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n\n"
+    t = i18n.getLang("zh_CN", config)
+    help_text += getGeneralHelpText(t)
+    help_text += "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n\n"
+    for lang in config.SUPP_LANGS.keys():
+        # Hack continued: Skip "en", "fa", "zh_CN" -- because we have those
+        # already in
+        if lang == "en" or lang == "fa" or lang == "zh_CN":
+            continue       
+        t = i18n.getLang(lang, config)
+        help_text += getGeneralHelpText(t)
+        help_text += "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n\n"
+    return help_text
+
 def getPackageMsg(t):
-        return t.gettext(i18n.GETTOR_TEXT[0]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[29]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[30]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[31]) + "\n\n" \
-             + "  gpg: Good signature from 'Erinn Clark <...>'" \
-             + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[32]) + "\n\n" \
-             + "  http://www.gnupg.org/related_software/frontends.html" \
-             + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[33]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[34]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[35]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[27]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[28]) + "\n"
+    return getGreetingText(t) \
+         + t.gettext(i18n.GETTOR_TEXT[28]) + "\n\n" \
+         + getVerifySignatureText(t) \
+         + getUnpackingText(t) \
+         + getBridgesHelpText(t) \
+         + getFAQText(t) \
+         + getSupportText(t)
 
 def getSplitPackageMsg(t):
-        return t.gettext(i18n.GETTOR_TEXT[0]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[36]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[37]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[19]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[20]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[21]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[22]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[23]) + "\n\n" \
-             + "        http://www.win-rar.com/download.html" + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[24]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[25]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[26]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[27]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[28]) + "\n"
+    return getGreetingText(t) \
+         + t.gettext(i18n.GETTOR_TEXT[28]) + "\n\n" \
+         + getSplitPackageText(t) \
+         + getUnpackingText(t) \
+         + getBridgesHelpText(t) \
+         + getFAQText(t) \
+         + getSupportText(t)
 
 def getDelayAlertMsg(t):
-        return t.gettext(i18n.GETTOR_TEXT[0]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[38]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[39]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[27]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[28]) + "\n"
+    return getGreetingText(t) \
+         + t.gettext(i18n.GETTOR_TEXT[38]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[39]) + "\n\n" \
+         + getSupportText(t)
 
 def getNoSplitAvailable(t):
-        return t.gettext(i18n.GETTOR_TEXT[0]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[41]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[27]) + "\n\n" \
-             + t.gettext(i18n.GETTOR_TEXT[28]) + "\n"
+    return getGreetingText(t) \
+         + t.gettext(i18n.GETTOR_TEXT[1]) + "\n\n" \
+         + t.gettext(i18n.GETTOR_TEXT[41]) + "\n\n" \
+         + getSupportText(t)
+
 
 class Response:
     def __init__(self, config, reqInfo):
@@ -158,11 +223,11 @@ class Response:
         """
         # First of all, check if user is whitelisted: Whitelist beats Blacklist
         if self.wList.lookupListEntry(self.reqInfo['user'], "general"):
-            logging.info("Whitelisted user " + self.reqInfo['user'])
+            logging.info("Whitelisted user " + self.reqInfo['hashed_user'])
             return False
         # Now check general and specific blacklists, in that order
         if self.bList.lookupListEntry(self.reqInfo['user'], "general"):
-            logging.info("Blacklisted user " + self.reqInfo['user'])
+            logging.info("Blacklisted user " + self.reqInfo['hashed_user'])
             return True
         # Create a unique dir name for the requested routine
         self.bList.createSublist(fname)
@@ -291,6 +356,9 @@ class Response:
     def sendHelp(self):
         """Send a help mail. This happens when a user sent us a request we 
            didn't really understand
+
+           XXX: This routine is currently not used, since we send out the 
+                longer MULTILANGHELP message instead.
         """
         if self.isBlacklistedForMessageType("sendHelp"):
             # Don't send anything
@@ -306,7 +374,7 @@ class Response:
             # Don't send anything
             return False
         logging.info("Sending package help to %s" % self.reqInfo['hashed_user'])
-        return self.sendTextEmail(i18n.MULTILANGHELP)
+        return self.sendTextEmail(getInitialHelpMsg(self.t, self.config))
 
     def sendTextEmail(self, text):
         """Generic text message sending routine.





More information about the tor-commits mailing list