#377 fo: Localized output of @function in keycap not supported

output: all formats
XSL (399)


as suggested in [1], the function attribute in keycap is not supported.

For example, if you write <keycap function="control"/> I thought that the
stylesheets fill in the missing content with a localized version. Unfortunatly, there is no output.

I think, an empty <keycap/> tag might be useful for translation issues to descrease costs and improve consistency.

For this reason I suggest to modify two things:

1. Extend the localisation files under common/ with a kontext "keycap". Inside the context you find all the necessary translation. For example, some entries in German could look like this:

<l:context name="keycap">
<l:template name="alt" text="Alt"/>
<l:template name="backspace" text="&lt;&#x2014;"/>
<!-- <l:template name="command" text=""/> -->
<l:template name="control" text="Strg"/>
<l:template name="delete" text="Entf"/>
<!-- ... -->

2. Modify the template keycap in fo/inline.xsl and {html,xhtml}/inline.xsl to support localized keycaps:

<xsl:template match="keycap">
<xsl:param name="key.contents" select="."/>
<xsl:variable name="key.length" select="string-length($key.contents)"/>

<xsl:when test="@function and @function!=''">
<xsl:call-template name="inline.boldseq">
<xsl:with-param name="content">
<xsl:call-template name="gentext.template">
<xsl:with-param name="context" select="local-name()"/>
<xsl:with-param name="name" select="@function"/>
<xsl:call-template name="inline.boldseq"/>

Hope it helps.

[1] http://lists.oasis-open.org/archives/docbook-apps/200703/msg00026.html


  • Michael(tm) Smith

    • labels: 321159 --> XSL
    • milestone: 447636 --> output: all formats
    • summary: Localized output of @function in keycap not supported --> fo: Localized output of @function in keycap not supported
  • Michael(tm) Smith

    Logged In: YES
    Originator: NO

    Not a bug.

  • Thomas Schraitle

    Logged In: YES
    Originator: YES

    Of course, it's not a bug, it's a suggestion. :) I suggested the method on the docbook-apps mailinglist some time ago, but nobody responded, so I thought I make a feature request.
    Please consider this change. :-)


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks