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

[tor-commits] [tpo/staging] Fix small bug in alternatives



commit d5a603d3037e74ac5dc8d2b7224f59123c58edbf
Author: hiro <hiro@xxxxxxxxxxxxxx>
Date:   Tue Apr 23 10:20:57 2019 +0200

    Fix small bug in alternatives
---
 templates/hero-download.html | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/templates/hero-download.html b/templates/hero-download.html
index 954fb8c..c215de8 100644
--- a/templates/hero-download.html
+++ b/templates/hero-download.html
@@ -8,21 +8,22 @@
   {% for id, item in bag('platforms').items() %}
     <div class="col-sm-6 col-md-3 py-3">
       <div class="oval-2 bg-darker mx-auto">
+        {% set alt_l = alt %}
         {% set t = bag('versions', 'torbrowser-stable') %}
         {% set download_prefix = 'https://www.torproject.org/dist/torbrowser/' + t.version + '/' %}
-        {% if alt == 'en' %}
-          {% set alt = 'en-US' %}
-        {% elif alt == 'es' %}
-          {% set alt = 'es-ES' %}
+        {% if alt_l == 'en' %}
+          {% set alt_l = 'en-US' %}
+        {% elif alt_l == 'es' %}
+          {% set alt_l = 'es-ES' %}
         {% endif %}
         {% if id == 'windows' %}
-          {% set download_link = download_prefix + 'torbrowser-install-win64-' + t.version + '_' + alt + '.exe' %}
+          {% set download_link = download_prefix + 'torbrowser-install-win64-' + t.version + '_' + alt_l + '.exe' %}
           {% set sig_link = download_link + '.asc' %}
         {% elif id == 'apple' %}
-          {% set download_link = download_prefix + 'TorBrowser-' + t.version + '-osx64' + '_' + alt + '.dmg' %}
+          {% set download_link = download_prefix + 'TorBrowser-' + t.version + '-osx64' + '_' + alt_l + '.dmg' %}
           {% set sig_link = download_link + '.asc' %}
         {% else %}
-          {% set download_link = download_prefix + 'tor-browser-linux64-' + t.version + '_' + alt + '.tar.xz' %}
+          {% set download_link = download_prefix + 'tor-browser-linux64-' + t.version + '_' + alt_l + '.tar.xz' %}
           {% set sig_link = download_link + '.asc' %}
         {% endif %}
         <a class="downloadLink" href="{{ download_link }}">



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