[ 
http://jira.magnolia-cms.com/browse/MGNLSTK-614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=27651#action_27651
 ] 

Grégory Joseph edited comment on MGNLSTK-614 at 3/26/10 12:24 PM:
------------------------------------------------------------------

{quote}Calling \$\{i18n[....]} in a template that does not define i18nBasename 
throws a freemarker exception "Expression i18n is undefined".
I suggest that the i18n array should always be defined in freemarker, no matter 
what the i18nBasename is. 
{quote}
Makes sense, especially since we always a fallback to the default message 
bundle anyway (i think)

{quote}
Having no i18nBasename property in the paragraph definition should IMO be 
handled as if the i18n messages file isn't available and should not result in 
an exception.
{quote}
It should probably have the same behavior as 
{{info.magnolia.cms.i18n.EmptyMessages}}.

{quote}
So, this is most probably not a STK issue yet, however, I think it would make 
sense to integrate something like ${i18n(...)} (method call, not array) into 
STK to achieve the desired behavior.
{quote}
That would just be confusing.

{quote}
Christian Ringele added a comment - 26/Mar/10 12:00 PM
I think the i18nBasename property should be definable on the site definition as 
a default value.
So paragraphs&template not defining the value explicit, would inherit it from 
the site configuration.
{quote}
I'm not sure about this: you'll want to redefine that property on your custom 
site to override the messages such as "read on" etc; BUT the *same* 
i18nBasename is also used to translate the paragraphs and templates 
names/definitions.
I like the idea, but we'd need some clarifications as to what translations go 
where. Perhaps the few translations such as "read on" should not even be in the 
paragraph definition's translations. OR, the site-i18nBasename could have 
priority, and fall back to the paragraph's for keys that are not defined in the 
site's i18n bundle.


      was (Author: gjoseph):
    {quote}Calling \${i18n[....]} in a template that does not define 
i18nBasename throws a freemarker exception "Expression i18n is undefined".
I suggest that the i18n array should always be defined in freemarker, no matter 
what the i18nBasename is. 
{quote}
Makes sense, especially since we always a fallback to the default message 
bundle anyway (i think)

{quote}
Having no i18nBasename property in the paragraph definition should IMO be 
handled as if the i18n messages file isn't available and should not result in 
an exception.
{quote}
It should probably have the same behavior as 
{{info.magnolia.cms.i18n.EmptyMessages}}.

{quote}
So, this is most probably not a STK issue yet, however, I think it would make 
sense to integrate something like ${i18n(...)} (method call, not array) into 
STK to achieve the desired behavior.
{quote}
That would just be confusing.

{quote}
Christian Ringele added a comment - 26/Mar/10 12:00 PM
I think the i18nBasename property should be definable on the site definition as 
a default value.
So paragraphs&template not defining the value explicit, would inherit it from 
the site configuration.
{quote}
I'm not sure about this: you'll want to redefine that property on your custom 
site to override the messages such as "read on" etc; BUT the *same* 
i18nBasename is also used to translate the paragraphs and templates 
names/definitions.
I like the idea, but we'd need some clarifications as to what translations go 
where. Perhaps the few translations such as "read on" should not even be in the 
paragraph definition's translations. OR, the site-i18nBasename could have 
priority, and fall back to the paragraph's for keys that are not defined in the 
site's i18n bundle.

  
> Freemarker ${i18n[..]} expressions shouldn't result in freemarker exception 
> if "i18nBasename" property is not set for paragraph
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MGNLSTK-614
>                 URL: http://jira.magnolia-cms.com/browse/MGNLSTK-614
>             Project: Magnolia Standard Templating Kit
>          Issue Type: Improvement
>    Affects Versions: 1.2.1
>            Reporter: Vivian Steller
>            Assignee: Philipp Bärfuss
>
> Calling ${i18n[....]} in a template that does not define i18nBasename throws 
> a freemarker exception "Expression i18n is undefined".
> I suggest that the i18n array should always be defined in freemarker, no 
> matter what the i18nBasename is. Having no i18nBasename property in the 
> paragraph definition should IMO be handled as if the i18n messages file isn't 
> available and should not result in an exception.
> So, this is most probably not a STK issue yet, however, I think it would make 
> sense to integrate something like ${i18n(...)} (method call, not array) into 
> STK to achieve the desired behavior.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <dev-list-unsubscr...@magnolia-cms.com>
----------------------------------------------------------------

Reply via email to