forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thorsten Scherler (JIRA)" <>
Subject [jira] Commented: (FOR-506) Do not hard-code site-visible message strings in skin files
Date Sat, 04 Jun 2005 04:06:42 GMT
    [ ] 

Thorsten Scherler commented on FOR-506:

The patch enables i18n support for forrest. Mainly it is focus right now on the i18n support
for skins (in particular pelt).

The changes I do not mention here are related to setup i18n support for the backend.

The following code changes are as well the only example I implemented right now. ;-)

Index: webapp/skins/pelt/xslt/html/site2xhtml.xsl
--- webapp/skins/pelt/xslt/html/site2xhtml.xsl	(revision 179925)
+++ webapp/skins/pelt/xslt/html/site2xhtml.xsl	(working copy)
@@ -34,7 +34,8 @@
-<xsl:stylesheet version="1.0" xmlns:xsl="">
+<xsl:stylesheet version="1.0" xmlns:xsl=""
+  xmlns:i18n="">
   <xsl:import href="../../../common/xslt/html/site2xhtml.xsl"/>
@@ -687,7 +688,7 @@
   <xsl:template match="div[@id='disable-font-script']">
     <xsl:if test="$disable-font-script = 'false'">
 	  <div class="trail">
-	        Font size: 
+	         <i18n:text >Font size:</i18n:text> 

You see I just surrounded the caption with a <i18n:text /> tag and added the key into
the common messages.

e.g. spanish translation:
+  <message  key="Font size:">Tamaño de fuente:</message>
or german:
+  <message key="Font size:">Schriftgrösse:</message>

So what we need is that 
1) we surround all captions with <i18n:text /> tags
2) add this keys to the catalogue

I will prepare an example how to do it with @attributes.

> Do not hard-code site-visible message strings in skin files
> -----------------------------------------------------------
>          Key: FOR-506
>          URL:
>      Project: Forrest
>         Type: Improvement
>   Components: Skins (general issues)
>     Versions: 0.7-dev
>  Environment: N/A
>     Reporter: Pedro I. Sanchez
>     Assignee: Thorsten Scherler
>     Priority: Minor
>  Attachments: patchI18n.diff
> Text strings like "Copyright", "Published", and "Search" are hardcoded into skin files
like site2xhtml.xsl. When creating web sites in languages other than English the web developer
is forced to create local versions of these skin files with the appropriated translations.
> Instead, the DTD for the skinconf.xml should be improved to allow these translations
to be specified in this file. This would make Forrest much easier to use.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message