Menu

#276 internationalisation links

AMBER
closed
1(low)
2013-11-12
2011-05-09
No

In the footer of pages such as http://www.tei-c.org/release/doc/tei-p5-doc/en/html/HD.html there are links to the translations of the TEI, but the links don't go to the translations of the current page, they go to the translations of the title page. Surely they should go to translations of the current page?

Discussion

  • Martin Holmes

    Martin Holmes - 2011-08-17

    As far as I can see, the footer is generated by Stylesheets/odds2/guidelines.xsl, and this is the relevant template:

    <xsl:template name="stdfooter">
    <xsl:param name="style" select="'plain'"/>
    <xsl:param name="file">index</xsl:param>
    <xsl:variable name="date">
    <xsl:call-template name="generateDate"/>
    </xsl:variable>
    <xsl:variable name="author">
    <xsl:call-template name="generateAuthor"/>
    </xsl:variable>
    <div class="stdfooter">
    <xsl:if test="$outputTarget='html'">
    <p>
    [<a href="../../en/html/{$file}.html">English</a>]
    [<a href="../../de/html/{$file}.html">Deutsch</a>]
    [<a href="../../es/html/{$file}.html">Español</a>]
    [<a href="../../it/html/{$file}.html">Italiano</a>]
    [<a href="../../fr/html/{$file}.html">Français</a>]
    [<a href="../../ja/html/{$file}.html">日本語</a>]
    [<a href="../../kr/html/{$file}.html">한국어</a>]
    [<a href="../../zh-tw/html/{$file}.html">中文</a>]
    </p>
    </xsl:if>
    [...]
    </div>
    [...]
    <xsl:template>

    The parameter $file has a default value of "index", and it appears that the default value is being used all the time, rather than a new value being passed in for each specific page, in the xsl:result-document:

    <html>
    [...]
    <body id="TOP">
    <xsl:call-template name="bodyHook"/>
    <xsl:call-template name="guidelinesTop"/>
    <div id="onecol" class="main-content">
    <xsl:call-template name="mainTOC"/>
    </div>
    <xsl:call-template name="stdfooter"/>
    </body>
    </html>

    No value is supplied for the parameter. The correct value seems to be available in the form of an xsl:variable called $outName, which is constructed just above the <xsl:result-document>. When I get a chance, I'm going to try passing that into the template and see what happens.

     
  • Martin Holmes

    Martin Holmes - 2011-08-17

    It's more complicated than I thought, and I was wrong about the location: it's in P5/Utilities/guidelines.xsl.model, and in the place where the stdfooter is called (line 553), no variable with the filename is in scope. I confess I'm stumped here; I think this one is for Sebastian.

    For one thing, I'm confused about the build process, which seems to copy guidelines.xsl.model over guidelines.xsl, and then use the latter. Why, I wonder?

     
  • Lou Burnard

    Lou Burnard - 2011-11-02

    Reassigning this to Sebastian R as a stylesheet bug

     
  • Lou Burnard

    Lou Burnard - 2011-11-02
    • labels: 627822 --> XSLT stylesheets
    • assigned_to: nobody --> rahtz
     
  • Sebastian Rahtz

    Sebastian Rahtz - 2011-11-02

    This is hard. I don't see how to access the file name in generality either. sometimes you really want global variables....

     
  • James Cummings

    James Cummings - 2013-11-09
    • Group: --> AMBER
    • Priority: 5 --> 1(low)
     
  • James Cummings

    James Cummings - 2013-11-09

    Has anything changed since 2011 in our processing and file layout that might make this easier? Is there way to be passing the current filename as a parameter (then constructing a global variable) in the way this is now processed? This deserves a solution if we can construct it in the way we handle internationalisation in the production of the Guidelines. But if the answer is still "no, no way to do this" then we should close this as wont-fix.

     
  • Sebastian Rahtz

    Sebastian Rahtz - 2013-11-09

    I don't say its impossible. just waiting for someone to take the time to dive on and fix it.

     
  • Sebastian Rahtz

    Sebastian Rahtz - 2013-11-09
     
  • Sebastian Rahtz

    Sebastian Rahtz - 2013-11-12
    • status: open --> closed
     
  • Sebastian Rahtz

    Sebastian Rahtz - 2013-11-12

    duly completed.closing ticket