Mailing List Archive

svn commit: r1641622 - in /forrest/trunk/main/webapp/skins: coat/xslt/html/site-to-xhtml.xsl pelt/xslt/html/site-to-xhtml.xsl scales/xslt/html/site-to-xhtml.xsl
Author: sjur
Date: Tue Nov 25 14:07:42 2014
New Revision: 1641622

URL: http://svn.apache.org/r1641622
Log:
Better support for i18n for the search box and its placeholder text. Also improved the same for the font resize buttons.

Modified:
forrest/trunk/main/webapp/skins/coat/xslt/html/site-to-xhtml.xsl
forrest/trunk/main/webapp/skins/pelt/xslt/html/site-to-xhtml.xsl
forrest/trunk/main/webapp/skins/scales/xslt/html/site-to-xhtml.xsl

Modified: forrest/trunk/main/webapp/skins/coat/xslt/html/site-to-xhtml.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/skins/coat/xslt/html/site-to-xhtml.xsl?rev=1641622&r1=1641621&r2=1641622&view=diff
==============================================================================
--- forrest/trunk/main/webapp/skins/coat/xslt/html/site-to-xhtml.xsl (original)
+++ forrest/trunk/main/webapp/skins/coat/xslt/html/site-to-xhtml.xsl Tue Nov 25 14:07:42 2014
@@ -200,8 +200,8 @@ footer, searchbar, css etc. As input, i
<xsl:when test="$config/search/@provider = 'lucene'">
<!-- Lucene search -->
<form method="get" action="{$root}{$lucene-search}">
- <input type="text" id="query" name="queryString" size="25" onFocus="getBlank (this, '{$search-prompt}');">
- <xsl:attribute name="value">
+ <input type="text" id="query" name="queryString" size="25" i18n:attr="value placeholder">
+ <xsl:attribute name="placeholder">
<xsl:value-of select="$search-prompt"/>
</xsl:attribute>
</input>&#160;
@@ -211,8 +211,8 @@ footer, searchbar, css etc. As input, i
<xsl:otherwise>
<form class="roundtopsmall" method="get" action="http://www.google.com/search">
<input type="hidden" name="sitesearch" value="{$config/search/@domain}"/>
- <input type="text" id="query" name="q" size="25" onFocus="getBlank (this, '{$search-prompt}');">
- <xsl:attribute name="value">
+ <input type="text" id="query" name="q" size="25" i18n:attr="value placeholder">
+ <xsl:attribute name="placeholder">
<xsl:value-of select="$search-prompt"/>
</xsl:attribute>
</input>&#160;
@@ -416,8 +416,8 @@ footer, searchbar, css etc. As input, i
<xsl:when test="$config/search/@provider = 'lucene'">
<!-- Lucene search -->
<form method="get" action="{$root}{$lucene-search}">
- <input type="text" id="query" name="queryString" size="18" onFocus="getBlank (this, '{$search-prompt}');">
- <xsl:attribute name="value">
+ <input type="text" id="query" name="queryString" size="18" i18n:attr="value placeholder">
+ <xsl:attribute name="placeholder">
<xsl:value-of select="$search-prompt"/>
</xsl:attribute>
</input>&#160;
@@ -427,8 +427,8 @@ footer, searchbar, css etc. As input, i
<xsl:otherwise>
<form method="get" action="http://www.google.com/search">
<input type="hidden" name="sitesearch" value="{$config/search/@domain}"/>
- <input type="text" id="query" name="q" size="18" onFocus="getBlank (this, '{$search-prompt}');">
- <xsl:attribute name="value">
+ <input type="text" id="query" name="q" size="18" i18n:attr="value placeholder">
+ <xsl:attribute name="placeholder">
<xsl:value-of select="$search-prompt"/>
</xsl:attribute>
</input>&#160;
@@ -698,9 +698,9 @@ if (VERSION > 3) {
<xsl:if test="$disable-font-script = 'false'">
<div class="trail">
<i18n:text >Font size:</i18n:text>
- &#160;<input type="button" onclick="ndeSetTextSize('reset'); return false;" title="Reset text" class="resetfont" value="Reset"/>
- &#160;<input type="button" onclick="ndeSetTextSize('decr'); return false;" title="Shrink text" class="smallerfont" value="-a"/>
- &#160;<input type="button" onclick="ndeSetTextSize('incr'); return false;" title="Enlarge text" class="biggerfont" value="+a"/>
+ &#160;<input type="button" onclick="ndeSetTextSize('reset'); return false;" title="Reset text" class="resetfont" value="Reset" i18n:attr="value title"/>
+ &#160;<input type="button" onclick="ndeSetTextSize('decr'); return false;" title="Shrink text" class="smallerfont" value="-a" i18n:attr="value title"/>
+ &#160;<input type="button" onclick="ndeSetTextSize('incr'); return false;" title="Enlarge text" class="biggerfont" value="+a" i18n:attr="value title"/>
</div>
</xsl:if>
</xsl:template>

Modified: forrest/trunk/main/webapp/skins/pelt/xslt/html/site-to-xhtml.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/skins/pelt/xslt/html/site-to-xhtml.xsl?rev=1641622&r1=1641621&r2=1641622&view=diff
==============================================================================
--- forrest/trunk/main/webapp/skins/pelt/xslt/html/site-to-xhtml.xsl (original)
+++ forrest/trunk/main/webapp/skins/pelt/xslt/html/site-to-xhtml.xsl Tue Nov 25 14:07:42 2014
@@ -198,17 +198,16 @@ footer, searchbar, css etc. As input, i
|start Search
+</xsl:comment>
<div class="searchbox">
- <xsl:variable name="search-prompt">
- <i18n:text>Search the site with</i18n:text>
-<xsl:text> </xsl:text>
- <xsl:value-of select="$config/search/@provider"/>
+ <xsl:variable
+ name="search-prompt">Search the site with <xsl:value-of
+ select="$config/search/@provider"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="$config/search/@provider = 'lucene'">
<!-- Lucene search -->
<form method="get" action="{$root}{$lucene-search}">
- <input type="text" id="query" name="queryString" size="25" onFocus="getBlank (this, '{$search-prompt}');">
- <xsl:attribute name="value">
+ <input type="text" id="query" name="queryString" size="25" i18n:attr="value placeholder">
+ <xsl:attribute name="placeholder">
<xsl:value-of select="$search-prompt"/>
</xsl:attribute>
</input>&#160;
@@ -218,8 +217,8 @@ footer, searchbar, css etc. As input, i
<xsl:otherwise>
<form class="roundtopsmall" method="get" action="http://www.google.com/search">
<input type="hidden" name="sitesearch" value="{$config/search/@domain}"/>
- <input type="text" id="query" name="q" size="25" onFocus="getBlank (this, '{$search-prompt}');">
- <xsl:attribute name="value">
+ <input type="text" id="query" name="q" size="25" i18n:attr="value placeholder">
+ <xsl:attribute name="placeholder">
<xsl:value-of select="$search-prompt"/>
</xsl:attribute>
</input>&#160;
@@ -459,11 +458,10 @@ document.write("]]><i18n:text >Last Publ
+</xsl:comment>
<div class="searchbox">
<hr />
- <xsl:variable name="search-prompt">
- <i18n:text>Search the site with</i18n:text>
-<xsl:text> </xsl:text>
- <xsl:value-of select="$config/search/@provider"/>
- </xsl:variable>
+ <xsl:variable
+ name="search-prompt">Search the site with <xsl:value-of
+ select="$config/search/@provider"/>
+ </xsl:variable>
<xsl:choose>
<xsl:when test="$config/search/@provider = 'lucene'">
<!-- Lucene search -->
@@ -479,7 +477,7 @@ document.write("]]><i18n:text >Last Publ
<xsl:otherwise>
<form method="get" action="http://www.google.com/search">
<input type="hidden" name="sitesearch" value="{$config/search/@domain}"/>
- <input type="text" id="query" name="q" size="18" onFocus="getBlank (this, '{$search-prompt}');">
+ <input type="text" id="query" name="q" size="18" onFocus="getBlank (this, '{$search-prompt}');" i18n:attr="value">
<xsl:attribute name="value">
<xsl:value-of select="$search-prompt"/>
</xsl:attribute>
@@ -749,10 +747,10 @@ if (VERSION > 3) {
<xsl:template match="div[@id='disable-font-script']">
<xsl:if test="$disable-font-script = 'false'">
<div class="trail">
- <i18n:text >Font size:</i18n:text>
- &#160;<input type="button" onclick="ndeSetTextSize('reset'); return false;" title="Reset text" class="resetfont" value="Reset"/>
- &#160;<input type="button" onclick="ndeSetTextSize('decr'); return false;" title="Shrink text" class="smallerfont" value="-a"/>
- &#160;<input type="button" onclick="ndeSetTextSize('incr'); return false;" title="Enlarge text" class="biggerfont" value="+a"/>
+ <i18n:text >Font size:</i18n:text>
+ &#160;<input type="button" onclick="ndeSetTextSize('reset'); return false;" title="Reset text" class="resetfont" value="Reset" i18n:attr="value title"/>
+ &#160;<input type="button" onclick="ndeSetTextSize('decr'); return false;" title="Shrink text" class="smallerfont" value="-a" i18n:attr="value title"/>
+ &#160;<input type="button" onclick="ndeSetTextSize('incr'); return false;" title="Enlarge text" class="biggerfont" value="+a" i18n:attr="value title"/>
</div>
</xsl:if>
</xsl:template>

Modified: forrest/trunk/main/webapp/skins/scales/xslt/html/site-to-xhtml.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/skins/scales/xslt/html/site-to-xhtml.xsl?rev=1641622&r1=1641621&r2=1641622&view=diff
==============================================================================
--- forrest/trunk/main/webapp/skins/scales/xslt/html/site-to-xhtml.xsl (original)
+++ forrest/trunk/main/webapp/skins/scales/xslt/html/site-to-xhtml.xsl Tue Nov 25 14:07:42 2014
@@ -206,8 +206,8 @@ footer, searchbar, css etc. As input, i
<xsl:when test="$config/search/@provider = 'lucene'">
<!-- Lucene search -->
<form method="get" action="{$root}{$lucene-search}">
- <input type="text" id="query" name="queryString" size="25" onFocus="getBlank (this, '{$search-prompt}');">
- <xsl:attribute name="value">
+ <input type="text" id="query" name="queryString" size="25" i18n:attr="value placeholder">
+ <xsl:attribute name="placeholder">
<xsl:value-of select="$search-prompt"/>
</xsl:attribute>
</input>&#160;
@@ -217,8 +217,8 @@ footer, searchbar, css etc. As input, i
<xsl:otherwise>
<form class="roundtopsmall" method="get" action="http://www.google.com/search">
<input type="hidden" name="sitesearch" value="{$config/search/@domain}"/>
- <input type="text" id="query" name="q" size="25" onFocus="getBlank (this, '{$search-prompt}');">
- <xsl:attribute name="value">
+ <input type="text" id="query" name="q" size="25" i18n:attr="value placeholder">
+ <xsl:attribute name="placeholder">
<xsl:value-of select="$search-prompt"/>
</xsl:attribute>
</input>&#160;
@@ -464,8 +464,8 @@ document.write("]]><i18n:text >Last Publ
<xsl:when test="$config/search/@provider = 'lucene'">
<!-- Lucene search -->
<form method="get" action="{$root}{$lucene-search}">
- <input type="text" id="query" name="queryString" size="18" onFocus="getBlank (this, '{$search-prompt}');">
- <xsl:attribute name="value">
+ <input type="text" id="query" name="queryString" size="18" i18n:attr="value placeholder">
+ <xsl:attribute name="placeholder">
<xsl:value-of select="$search-prompt"/>
</xsl:attribute>
</input>&#160;
@@ -475,8 +475,8 @@ document.write("]]><i18n:text >Last Publ
<xsl:otherwise>
<form method="get" action="http://www.google.com/search">
<input type="hidden" name="sitesearch" value="{$config/search/@domain}"/>
- <input type="text" id="query" name="q" size="18" onFocus="getBlank (this, '{$search-prompt}');">
- <xsl:attribute name="value">
+ <input type="text" id="query" name="q" size="18" i18n:attr="value placeholder">
+ <xsl:attribute name="placeholder">
<xsl:value-of select="$search-prompt"/>
</xsl:attribute>
</input>&#160;
@@ -746,9 +746,9 @@ if (VERSION > 3) {
<xsl:if test="$disable-font-script = 'false'">
<div class="trail">
<i18n:text >Font size:</i18n:text>
- &#160;<input type="button" onclick="ndeSetTextSize('reset'); return false;" title="Reset text" class="resetfont" value="Reset"/>
- &#160;<input type="button" onclick="ndeSetTextSize('decr'); return false;" title="Shrink text" class="smallerfont" value="-a"/>
- &#160;<input type="button" onclick="ndeSetTextSize('incr'); return false;" title="Enlarge text" class="biggerfont" value="+a"/>
+ &#160;<input type="button" onclick="ndeSetTextSize('reset'); return false;" title="Reset text" class="resetfont" value="Reset" i18n:attr="value title"/>
+ &#160;<input type="button" onclick="ndeSetTextSize('decr'); return false;" title="Shrink text" class="smallerfont" value="-a" i18n:attr="value title"/>
+ &#160;<input type="button" onclick="ndeSetTextSize('incr'); return false;" title="Enlarge text" class="biggerfont" value="+a" i18n:attr="value title"/>
</div>
</xsl:if>
</xsl:template>