Ticket #828: 0001-fixed-older-and-newer-arrows-for-rtl-locales.patch

File 0001-fixed-older-and-newer-arrows-for-rtl-locales.patch, 2.3 KB (added by Leah Velleman, 8 years ago)
  • mediagoblin/templates/mediagoblin/utils/prev_next.html

    From 3f238a41ffd0a1ec4b0764c35bfdfcd7f52e6d02 Mon Sep 17 00:00:00 2001
    From: Leah Velleman <leah.velleman@gmail.com>
    Date: Mon, 20 Jun 2016 17:06:41 -0400
    Subject: [PATCH] fixed 'older' and 'newer' arrows for rtl locales
    
    ---
     mediagoblin/templates/mediagoblin/utils/prev_next.html | 15 +++++++++++----
     1 file changed, 11 insertions(+), 4 deletions(-)
    
    diff --git a/mediagoblin/templates/mediagoblin/utils/prev_next.html b/mediagoblin/templates/mediagoblin/utils/prev_next.html
    index 9e262ed..1570cf5 100644
    a b  
    1919{# Provide navigation links to neighboring media entries, if possible #}
    2020{% set prev_entry_url = media.url_to_prev(request.urlgen) %}
    2121{% set next_entry_url = media.url_to_next(request.urlgen) %}
     22{% if request.locale.startswith("fa") or request.locale.startswith("ar") %}
     23  {% set next_arrow = "→" %}
     24  {% set prev_arrow = "←" %}
     25{% else %}
     26  {% set next_arrow = "←" %}
     27  {% set prev_arrow = "→" %}
     28{% endif %}
    2229
    2330{% if prev_entry_url or next_entry_url %}
    2431  <div class="navigation">
    2532   {# There are no previous entries for the very first media entry #}
    2633    {% if prev_entry_url %}
    2734      <a class="navigation_button navigation_left" href="{{ prev_entry_url }}">
    28         &larr; {% trans %}newer{% endtrans %}
     35        {{next_arrow}} {% trans %}newer{% endtrans %}
    2936      </a>
    3037    {% else %}
    3138      {# This is the first entry. display greyed-out 'previous' image #}
    3239      <p class="navigation_button navigation_left">
    33         &larr; {% trans %}newer{% endtrans %}
     40        {{next_arrow}} {% trans %}newer{% endtrans %}
    3441      </p>
    3542    {% endif %}
    3643    {# Likewise, this could be the very last media entry #}
    3744    {% if next_entry_url %}
    3845      <a class="navigation_button navigation_right" href="{{ next_entry_url }}">
    39         {% trans %}older{% endtrans %} &rarr;
     46        {% trans %}older{% endtrans %} {{prev_arrow}}
    4047      </a>
    4148    {% else %}
    4249      {# This is the last entry. display greyed-out 'next' image #}
    4350      <p class="navigation_button navigation_right">
    44         {% trans %}older{% endtrans %} &rarr;
     51        {% trans %}older{% endtrans %} {{prev_arrow}}
    4552      </p>
    4653    {% endif %}
    4754  </div>