[yelp-xsl] mal2html-page: Fix RTL issues in link trails



commit 943629f3ca2f34c4c97e1680c368ab923b77ba66
Author: Shaun McCance <shaunm gnome org>
Date:   Mon Aug 19 11:16:38 2013 -0400

    mal2html-page: Fix RTL issues in link trails
    
    We needed some RLMs to get the flow right in the very common
    case of bidi link trails. Also, guillemets mirror, so we needed
    to stop mirroring them so they didn't mirror the mirror back to
    the wrong thing.

 xslt/mallard/html/mal2html-page.xsl |   26 +++++++++-----------------
 1 files changed, 9 insertions(+), 17 deletions(-)
---
diff --git a/xslt/mallard/html/mal2html-page.xsl b/xslt/mallard/html/mal2html-page.xsl
index 03243ad..9489f13 100644
--- a/xslt/mallard/html/mal2html-page.xsl
+++ b/xslt/mallard/html/mal2html-page.xsl
@@ -395,28 +395,20 @@ separators used between links.
       <xsl:with-param name="role" select="'trail guide'"/>
     </xsl:call-template>
   </a>
+  <xsl:if test="$direction = 'rtl'">
+    <xsl:text>&#x200F;</xsl:text>
+  </xsl:if>
   <xsl:choose>
-    <xsl:when test="$direction = 'rtl'">
-      <xsl:choose>
-        <xsl:when test="$node/@child = 'section'">
-          <xsl:text>&#x00A0;‹ </xsl:text>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:text>&#x00A0;« </xsl:text>
-        </xsl:otherwise>
-      </xsl:choose>
+    <xsl:when test="$node/@child = 'section'">
+      <xsl:text>&#x00A0;› </xsl:text>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:choose>
-        <xsl:when test="$node/@child = 'section'">
-          <xsl:text>&#x00A0;› </xsl:text>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:text>&#x00A0;» </xsl:text>
-        </xsl:otherwise>
-      </xsl:choose>
+      <xsl:text>&#x00A0;» </xsl:text>
     </xsl:otherwise>
   </xsl:choose>
+  <xsl:if test="$direction = 'rtl'">
+    <xsl:text>&#x200F;</xsl:text>
+  </xsl:if>
   <xsl:for-each select="$node/mal:link">
     <xsl:call-template name="mal2html.page.linktrails.link">
       <xsl:with-param name="direction" select="$direction"/>


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