[or-cvs] r14559: This L10n change fixes alt tag incomplete issues. It also fi (check/trunk/cgi-bin)

ioerror at seul.org ioerror at seul.org
Mon May 5 08:19:16 UTC 2008


Author: ioerror
Date: 2008-05-05 04:19:16 -0400 (Mon, 05 May 2008)
New Revision: 14559

Modified:
   check/trunk/cgi-bin/index.py
Log:
This L10n change fixes alt tag incomplete issues. It also fixes some space/tab issues that were silly.


Modified: check/trunk/cgi-bin/index.py
===================================================================
--- check/trunk/cgi-bin/index.py	2008-05-05 04:08:49 UTC (rev 14558)
+++ check/trunk/cgi-bin/index.py	2008-05-05 08:19:16 UTC (rev 14559)
@@ -63,14 +63,14 @@
         # We're not exiting from a Tor exit
         return 1
     else:
-	if not answer.answers:
-	    # We're getting unexpected data - fail closed
-	    return 2
-	for a in answer.answers:
-	    if a['data'] != "127.0.0.2":
-	        return 2
-	# If we're here, we've had a positive exit answer
-	return 0
+        if not answer.answers:
+            # We're getting unexpected data - fail closed
+            return 2
+        for a in answer.answers:
+            if a['data'] != "127.0.0.2":
+                return 2
+        # If we're here, we've had a positive exit answer
+        return 0
 
 def getLocales():
     locale_descriptions = { 'en_US' : 'English', 'de' : 'Deutsch', 'es' : 'español','fa_IR' : 'fa_IR', 'ja': '(Nihogo)', 'pt_BR' : 'Português', 'pl' : 'polski', 'zh_CN' :'(Simplified Chinese)' }
@@ -160,40 +160,39 @@
 
     if UsingTor == 0:
         req.write('\n')
-	req.write('<img alt="Congratulations. You are using Tor." '\
-	'src="https://check.torproject.org/images/tor-on.png">\n<br>')
-	req.write('<h1 style="color: #0A0">\n')
-	req.write(_('Congratulations. You are using Tor.'))
-	req.write('<br>\n<br>\n')
-	req.write('</h1>\n')
-	req.write(_('Please refer to the <a href="https://www.torproject.org/">Tor website</a> for further information about using Tor safely.'))
-	req.write('<br>\n<br>\n')
+        req.write('<img alt="' + _("Congratulations. You are using Tor.") + \
+        'src="https://check.torproject.org/images/tor-on.png">\n<br>')
+        req.write('<h1 style="color: #0A0">\n')
+        req.write(_('Congratulations. You are using Tor.'))
+        req.write('<br>\n<br>\n')
+        req.write('</h1>\n')
+        req.write(_('Please refer to the <a href="https://www.torproject.org/">Tor website</a> for further information about using Tor safely.'))
+        req.write('<br>\n<br>\n')
     
     # This is the case where we have an NXDOMAIN and they aren't using Tor
     elif UsingTor == 1:
         req.write('\n')
-        req.write('<img alt="Sorry. You are not using Tor." '\
+        req.write('<img alt="' + _("Sorry. You are not using Tor.") + '" '\
         'src="https://check.torproject.org/images/tor-off.png">\n<br>')
         req.write('<h1 style="color: #A00">')
         req.write(_('Sorry. You are not using Tor.'))
-	req.write('<br>\n<br>\n')
+        req.write('<br>\n<br>\n')
         req.write('</h1>')
         req.write(_('If you are attempting to use a Tor client, please refer to the <a href="https://www.torproject.org/">Tor website</a> and specifically the <a href="https://wiki.torproject.org/noreply/TheOnionRouter/TorFAQ#ItDoesntWork">instructions for configuring your Tor client</a>.'))
-	req.write('<br>\n<br>\n')
+        req.write('<br>\n<br>\n')
 
     # This means we have some strange data response we don't understand
     # It's better that we fail closed and let the user know everything went wrong
     elif UsingTor == 2:
         req.write('\n')
-        req.write('<img alt="Sorry, your query failed or an unexpected '\
-        'response was received." '\
+        req.write('<img alt="' + _("Sorry, your query failed or an unexpected response was received.") + '" '\
         'src="https://check.torproject.org/images/tor-off.png">\n<br>')
         req.write('<h1 style="color: #A00">\n')
         req.write(_('Sorry, your query failed or an unexpected response was received.'))
-	req.write('<br>\n')
-	req.write('</h1>')
+        req.write('<br>\n')
+        req.write('</h1>')
         req.write(_('A temporary service outage prevents us from determining if your source IP address is a <a href="https://www.torproject.org/">Tor</a> node.  For other ways to test whether you are using Tor, please visit <a href="https://wiki.torproject.org/noreply/TheOnionRouter/TorFAQ#IsMyConnectionPrivate">this FAQ entry</a>.'))
-	req.write('<br>\n<br>\n')
+        req.write('<br>\n<br>\n')
 
     # Now we'll close up this html rat hole
     req.write('\n')



More information about the tor-commits mailing list