On Sat, 2005-06-04 at 23:03 -0400, Pedro I. Sanchez wrote:
> On Sun, 2005-05-06 at 04:19 +0200, Thorsten Scherler wrote:
> > On Sat, 2005-06-04 at 20:55 -0400, Pedro I. Sanchez wrote:
> > <snip/>
> > > 
> > > My version of the Spanish messages would be the following:
> > > 
> > > <catalogue>
> > >   <message key="Font size:">Tamaño del texto:</message>
> > >   <message key="Last Published:">Fecha de publicación:</message>
> > >   <message key="Search">Buscar</message>
> > >   <message key="Search the site with">Buscar en</message>
> > > </catalogue>
> > > 
> > 
> > Nice, can you prepare a patch and add it to this issue? I will apply it
> > then, thx. I reckon there are more to come. ;-)
> > 
> Index: webapp/skins/common/messages/CommonMessages_es.xml
> ===================================================================
> --- webapp/skins/common/messages/CommonMessages_es.xml  (revision
> 180032)
> +++ webapp/skins/common/messages/CommonMessages_es.xml  (working copy)
> @@ -15,8 +15,9 @@
>    limitations under the License.
>  -->
>  <catalogue>
> -  <message key="Font size:">Tamaño de fuente:</message>
> -  <message key="Last Published:">Último publicado:</message>
> -  <message key="Search">Búsqueda</message>
> -  <message key="Search the site with">Búsqueda en</message>
> +  <message key="Font size:">Tamaño del texto:</message>
> +  <message key="Last Published:">Fecha de publicación:</message>
> +  <message key="Search">Buscar</message>
> +  <message key="Search the site with">Buscar en</message>
>  </catalogue>
> +
> 

Patch applied to trunk.

> > > Now, how do i specify the desired language? The i18n doc talks about
> > > specifying the locale in the transform, I guess in a map file. Ideally
> > > it should be specified forrest.properties, or even better at the command
> > > line, like:
> > > 
> > > $ LANG=de_DE forrest
> > > 
> > > How is it done now?
> > > 
> > 
> > Actually I just tested it in 'forrest run' and not forrest. 
> > 
> > In the dynamic mode you can change the preferred language of your
> > browser and hit refresh.
> > 
> In my experience, relying on the end user to select a language in his
> browser is never a good option. Most people don't even know they can do
> it. And you don't want your web pages to have to explain how to change
> the language option so that the pages can be read in a different
> language.
> 

Yeah you are right I guess we need some pics or a form to change the
locals via the site. Patches welcome. ;-) I will have a look later.

> In my case, my short-time interest is to generate a site that will show
> up in Spanish only, and this regardless of the language option of the
> web browser. In real life most web sites are written in a single
> language and they show up as such regardless of the language settings in
> the web browsers.
> 
> > Right now you find in the main forrest sitemap.xmap:
> > <map:transform type="i18n">
> > <map:parameter name="locale" value="{request:locale}"/>
> > </map:transform>
> > 
> > The question is how to parse the request:locale to the cli? ATM I do not
> > know that, but I guess that is possible. ;-)
> > 
> This is key for me. If I cannot specify the language when I run
> "forrest" to build my site then this is not a good solution. I guess the
> other option would be to hard-code value="es_ES" in the above. At least
> this would be just "one" thing hard coded :|
> 

Yeah that would solve your usecase, but in the future that should be
done like you suggested in your former mail.

LANG=de_DE forrest

Any thoughts, how?

> > > One other comment: You are placing the catalogues under common/messages,
> > > which is probably fine for the default skin. But I believe that skins
> > > should come with their own catalogues because each can have an entirely
> > > different set of labels to be translated. Is this being accommodated by
> > > the skins "plugin" thing?
> > > 
> > Yes, this will go into views for now I added it to viewHelper.xhtml.
> > There are some points I found out for a full i18n support for skins
> > (view based). ...but this will be another thread. ;-)
> > 
> > I reckon you have to extend the catalogues section like the following,
> > but I have not test that.
> > <catalogues default="common">
> >   <catalogue id="common" name="CommonMessages"
> > location="skins/common/messages"/>
> > <catalogue id="{forrest:skin}" name="{forrest:skin}Messages"
> > location="skins/{forrest:skin}/messages"/>
> > </catalogues>
> > 
> Yes, I was thinking along these lines. Each skin has to have its own
> catalogue as an extension of a common catalogue that all skins can use.
> But I read something about a skins "plugin" in development and I was
> wondering how this plugin would automatically update this index of
> catalogues.
> 

Actually that needs discussion. Right now the catalogues are in 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/messages/

I am not sure what would be the best to automatically update this index
of catalogues and whether this should be done by the plugin. For now we
just add all messages of the contract there. 

...but you are right we have to think how to mount as well
project-specific catalogues.

Any thoughts, how?


salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)

Reply via email to