summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMS <ms@taler.net>2022-11-03 10:40:00 +0100
committerMS <ms@taler.net>2022-11-03 10:40:00 +0100
commit3fd189c75c42ef39aff89137a898f63bffac3ca0 (patch)
tree28c1a76fb4593b909de7d9b1b3d4b509a50b5300
parentc83402620747df3de535d1f78e99f5a08593f4d2 (diff)
downloadtaler-merchant-demos-master.tar.gz
taler-merchant-demos-master.tar.bz2
taler-merchant-demos-master.zip
avoid double-slash in languages linksHEADmaster
-rw-r--r--talermerchantdemos/httpcommon/__init__.py3
-rw-r--r--talermerchantdemos/templates/common-base.html.j29
2 files changed, 4 insertions, 8 deletions
diff --git a/talermerchantdemos/httpcommon/__init__.py b/talermerchantdemos/httpcommon/__init__.py
index 56cfeda..2a6e53d 100644
--- a/talermerchantdemos/httpcommon/__init__.py
+++ b/talermerchantdemos/httpcommon/__init__.py
@@ -203,8 +203,7 @@ def make_utility_processor(pagename,base_url):
getactive=getactive,
getlang=getlang,
all_languages=all_languages,
- static=static,
- script_name=base_url,
+ static=static
)
return utility_processor
diff --git a/talermerchantdemos/templates/common-base.html.j2 b/talermerchantdemos/templates/common-base.html.j2
index 0964c9c..12c7741 100644
--- a/talermerchantdemos/templates/common-base.html.j2
+++ b/talermerchantdemos/templates/common-base.html.j2
@@ -86,12 +86,9 @@
<div style="position: relative; overflow: visible;">
<div class="nav" style="position: absolute; max-height: 60vh; overflow-y: scroll">
{% for lang_code, lang_display in all_languages.items() %}
- {% if lang_code != getlang() %}
- {% if script_name != None %}
- <a href="{{ script_name }}/{{ lang_code }}/" class="navbtn langbtn">{{ lang_display }}</a>
- {% else %}
- <a href="/{{ lang_code }}/" class="navbtn langbtn">{{ lang_display }}</a>
- {% endif %}
+ {% if lang_code != getlang() %}
+ <a href="{{ url_for('index') + lang_code + '/' }}"
+ class="navbtn langbtn">{{ lang_display }}</a>
{% endif %}
{% endfor %}
</div>