You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by cd...@apache.org on 2006/08/10 10:49:55 UTC
svn commit: r430318 - in /forrest/trunk/whiteboard/plugins:
org.apache.forrest.plugin.internal.dispatcher/internal.xmap
org.apache.forrest.themes.core/themes/pelt/html/search-input.ft
Author: cdupoirieux
Date: Thu Aug 10 01:49:54 2006
New Revision: 430318
URL: http://svn.apache.org/viewvc?rev=430318&view=rev
Log:
Improvment of the i18n.
Now use the location map to find the directory where catalogues are.
The search-input contract use the i18n:translate tag which is very nice to make complex translation, indeed.
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/internal.xmap
forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/pelt/html/search-input.ft
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/internal.xmap
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/internal.xmap?rev=430318&r1=430317&r2=430318&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/internal.xmap (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/internal.xmap Thu Aug 10 01:49:54 2006
@@ -56,9 +56,9 @@
<map:transformer name="i18n"
src="org.apache.cocoon.transformation.I18nTransformer">
<catalogues default="contracts">
- <catalogue id="other" name="OtherMessages" location="messages" />
+ <catalogue id="other" name="OtherMessages" location="{lm:project.translations}" />
<catalogue id="contracts" name="ContractsMessages"
- location="messages" />
+ location="{lm:project.translations}" />
</catalogues>
<cache-at-startup>true</cache-at-startup>
</map:transformer>
@@ -218,4 +218,4 @@
pass-through="true" />
</map:pipeline>
</map:pipelines>
-</map:sitemap>
\ No newline at end of file
+</map:sitemap>
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/pelt/html/search-input.ft
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/pelt/html/search-input.ft?rev=430318&r1=430317&r2=430318&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/pelt/html/search-input.ft (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/pelt/html/search-input.ft Thu Aug 10 01:49:54 2006
@@ -48,7 +48,7 @@
<xsl:template match="/">
<forrest:content>
<forrest:part xpath="/html/head">
- <script type="text/javascript" src="{$root}themes/getBlank.js"> </script>
+ <script type="text/javascript" language="javascript" src="{$root}themes/getBlank.js"> </script>
</forrest:part>
<forrest:part>
@@ -61,8 +61,10 @@
<div class="search-input">
<!-- Form prompt -->
<xsl:variable name="search-prompt">
- <i18n:text>Search the site with</i18n:text>
- <xsl:value-of select="$search-input/search/@provider"/>
+ <i18n:translate>
+ <i18n:text i18n:key="Search the site with">Search the site with {0}</i18n:text>
+ <i18n:param><xsl:value-of select="$search-input/search/@provider"/></i18n:param>
+ </i18n:translate>
</xsl:variable>
<!-- Form action -->
<xsl:variable name="search-action">
@@ -90,7 +92,9 @@
</div>
<div class="search-field">
<input type="text" name="{$search-query}"
- size="{$input-size}" value="{normalize-space($search-prompt)}"/>
+ size="{$input-size}" value="{normalize-space($search-prompt)}"
+ onFocus="getBlank(this, '{normalize-space($search-prompt)}');"
+ onBlur="getPrompt(this, '{normalize-space($search-prompt)}');"/>
</div>
<div class="search-submit">
<input type="submit" value="Search" name="Search"