You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Paul Focke <pa...@outerthought.org> on 2005/11/08 10:22:46 UTC
Patch for i18n bug in forms samples
Hi,
Here is a patch which fixes the i18n in the forms samples. All it does
is add 2 lines to src/blocks/forms/samples/sitemap.xmap.
Judging by the sheer weight of this patch, I'm supposing that a jira
issue is not necessary.
--
Paul Focke http://outerthought.org/
Outerthought Open Source Java & XML
paul at outerthought.org
Re: Patch for i18n bug in forms samples
Posted by Sylvain Wallez <sy...@apache.org>.
Upayavira wrote:
> Paul Focke wrote:
>
>> Hi,
>>
>> Here is a patch which fixes the i18n in the forms samples. All it does
>> is add 2 lines to src/blocks/forms/samples/sitemap.xmap.
>>
>> Judging by the sheer weight of this patch, I'm supposing that a jira
>> issue is not necessary.
>>
>> ------------------------------------------------------------------------
>>
>> Index: src/blocks/forms/samples/sitemap.xmap
>> ===================================================================
>> --- src/blocks/forms/samples/sitemap.xmap (revision 331290)
>> +++ src/blocks/forms/samples/sitemap.xmap (working copy)
>> @@ -217,7 +217,9 @@
>> | Show a form, using the jx template macros
>> -->
>> <map:match pattern="*-display-pipeline.jx">
>> - <map:generate type="jx" src="forms/{1}_template.xml" label="content1"/>
>> + <map:generate type="jx" src="forms/{1}_template.xml" label="content1">
>> + <map:parameter name="locale" value="{flow-attribute:locale}"/>
>> + </map:generate>
>> <map:transform type="browser-update"/>
>> <map:transform type="i18n">
>> <map:parameter name="locale" value="{flow-attribute:locale}"/>
>>
>
> A ver interesting patch. However, I can't see quite how it would work.
> It replaces the 'locale' attribute with, well, 'locale'. Hmm.
>
> Can you explain a bit more what the problem is that it is fixing? And
> how does this patch fix it? What am I misunderstanding?
>
I more and more annoyed by the way i18n is handled (or not in Cocoon).
IMO, we should unify the locale handling in one place: request.getLocale().
Since Cocoon uses its own wrappers to environment objects, we can
implement request.getLocale() in the same way that LocaleAction does.
This will avoid passing these "locale" parameters around everywhere.
The LocaleAction will only be of use when we want to handle language
selection from the user (i.e. change the locale and store it in the
session or in a cookie).
Sylvain
--
Sylvain Wallez Anyware Technologies
http://people.apache.org/~sylvain http://www.anyware-tech.com
Apache Software Foundation Member Research & Technology Director
Re: Patch for i18n bug in forms samples
Posted by Upayavira <uv...@odoko.co.uk>.
Paul Focke wrote:
> Hi,
>
> Here is a patch which fixes the i18n in the forms samples. All it does
> is add 2 lines to src/blocks/forms/samples/sitemap.xmap.
>
> Judging by the sheer weight of this patch, I'm supposing that a jira
> issue is not necessary.
>
>
>
> ------------------------------------------------------------------------
>
> Index: src/blocks/forms/samples/sitemap.xmap
> ===================================================================
> --- src/blocks/forms/samples/sitemap.xmap (revision 331290)
> +++ src/blocks/forms/samples/sitemap.xmap (working copy)
> @@ -217,7 +217,9 @@
> | Show a form, using the jx template macros
> -->
> <map:match pattern="*-display-pipeline.jx">
> - <map:generate type="jx" src="forms/{1}_template.xml" label="content1"/>
> + <map:generate type="jx" src="forms/{1}_template.xml" label="content1">
> + <map:parameter name="locale" value="{flow-attribute:locale}"/>
> + </map:generate>
> <map:transform type="browser-update"/>
> <map:transform type="i18n">
> <map:parameter name="locale" value="{flow-attribute:locale}"/>
A ver interesting patch. However, I can't see quite how it would work.
It replaces the 'locale' attribute with, well, 'locale'. Hmm.
Can you explain a bit more what the problem is that it is fixing? And
how does this patch fix it? What am I misunderstanding?
Regards, Upayavira
Re: Patch for i18n bug in forms samples
Posted by Sylvain Wallez <sy...@apache.org>.
Paul Focke wrote:
> Hi,
>
> Here is a patch which fixes the i18n in the forms samples. All it does
> is add 2 lines to src/blocks/forms/samples/sitemap.xmap.
>
> Judging by the sheer weight of this patch, I'm supposing that a jira
> issue is not necessary.
>
Applied. Thanks!
Sylvain
--
Sylvain Wallez Anyware Technologies
http://people.apache.org/~sylvain http://www.anyware-tech.com
Apache Software Foundation Member Research & Technology Director