Re: i18n in JX Template

2008-06-25 Thread Jeroen Reijn

Hi Magnus,

everything seems to be ok. Did you try turning on the logger of the i18n 
transformer to see what might be wrong?


Regards,

Jeroen Reijn

Magnus Haraldsen Amundsen wrote:
 


In my JX Template i’ve created a system to display menues.

 


c:menu

c:menuelement title=”menu.topic link=admin/emner/ 
i18n:attr=title/


c:menuelement title=menu.resource link=admin/ressurser/ 
i18n:attr=title/


c:menuelement title=menu.user link=admin/brukere/ 
i18n:attr=title/


c:menuelement title=menu.publisher link=admin/utgivere/ 
i18n:attr=title/


c:menuelement title=menu.link link=admin/lenkesjekk/ 
i18n:attr=title/


c:menuelement title=menu.database link=admin/database/ 
i18n:attr=title/


/c:menu

 


And I’ve tried to i18n the menus using the syntax above, but it shows as

 


Menu.topic

Menu.resource

Menu.user

Menu.publisher

Menu.link

Menu.database

 

 


when the HTML is transformed.

 


How do I fix this?

 



IMPORTANT NOTICE: This message may contain confidential information. If 
you have received this e-mail in error, do not use, copy or distribute 
it. Do not open any attachments. Delete it immediately from your system 
and notify the sender promptly by e-mail that you have done so. Thank you.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: i18n in JX Template

2008-06-25 Thread Magnus Haraldsen Amundsen
Hi Jeroen,

How do I enable logging on the i18nTransformer?

-Original Message-
From: Jeroen Reijn [mailto:[EMAIL PROTECTED] 
Sent: 25. juni 2008 11:06
To: users@cocoon.apache.org
Subject: Re: i18n in JX Template

Hi Magnus,

everything seems to be ok. Did you try turning on the logger of the i18n

transformer to see what might be wrong?

Regards,

Jeroen Reijn

Magnus Haraldsen Amundsen wrote:
  
 
 In my JX Template i've created a system to display menues.
 
  
 
 c:menu
 
 c:menuelement title=menu.topic link=admin/emner/ 
 i18n:attr=title/
 
 c:menuelement title=menu.resource link=admin/ressurser/ 
 i18n:attr=title/
 
 c:menuelement title=menu.user link=admin/brukere/ 
 i18n:attr=title/
 
 c:menuelement title=menu.publisher link=admin/utgivere/ 
 i18n:attr=title/
 
 c:menuelement title=menu.link link=admin/lenkesjekk/ 
 i18n:attr=title/
 
 c:menuelement title=menu.database link=admin/database/ 
 i18n:attr=title/
 
 /c:menu
 
  
 
 And I've tried to i18n the menus using the syntax above, but it shows
as
 
  
 
 Menu.topic
 
 Menu.resource
 
 Menu.user
 
 Menu.publisher
 
 Menu.link
 
 Menu.database
 
  
 
  
 
 when the HTML is transformed.
 
  
 
 How do I fix this?
 
  
 
 
 IMPORTANT NOTICE: This message may contain confidential information.
If 
 you have received this e-mail in error, do not use, copy or distribute

 it. Do not open any attachments. Delete it immediately from your
system 
 and notify the sender promptly by e-mail that you have done so. Thank
you.
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

IMPORTANT NOTICE:
This message may contain confidential information.
If you have received this e-mail in error, do not use, copy or
distribute it. Do not open any attachments. Delete it immediately from
your system and notify the sender promptly by e-mail that you
have done so. Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: i18n in JX Template

2008-06-25 Thread Andy Stevens
2008/6/25 Magnus Haraldsen Amundsen [EMAIL PROTECTED]:

 In my JX Template i've created a system to display menues.

 c:menu

 c:menuelement title=menu.topic link=admin/emner/
 i18n:attr=title/
...
but it shows as

 Menu.topic
...
 How do I fix this?

Given that your tokens are all lower case but the output has a leading
capital letter, it seems to me that either they *are* being
substituted (and your catalog has menu.topic=Menu.topic etc.), or
something else is altering the title attributes (to capitalise them)
before the i18n transformer sees them and they aren't translated as
the transformer is probably case sensitive as regards the key names
(so it no longer thinks they match the keys in the catalog).

Or were the capital letters introduced by your mail client and the
original output is also lower case?

One other thought - is the i18n namespace declared correctly in your
template file?  Perhaps the transformer isn't recognising the
i18n:attr attributes, so doesn't think it needs to do anything with
the titles.


Andy
-- 
http://pseudoq.sourceforge.net/  Open source java sudoku solver

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: i18n in JX Template

2008-06-25 Thread Magnus Haraldsen Amundsen
The upper case was because of Outlook.

The namespace is correct, and it works when the i18n:attr is used in the
XSLT, but not in the JX Template.



-Original Message-
From: Andy Stevens [mailto:[EMAIL PROTECTED] 
Sent: 25. juni 2008 11:37
To: users@cocoon.apache.org
Subject: Re: i18n in JX Template

2008/6/25 Magnus Haraldsen Amundsen
[EMAIL PROTECTED]:

 In my JX Template i've created a system to display menues.

 c:menu

 c:menuelement title=menu.topic link=admin/emner/
 i18n:attr=title/
...
but it shows as

 Menu.topic
...
 How do I fix this?

Given that your tokens are all lower case but the output has a leading
capital letter, it seems to me that either they *are* being
substituted (and your catalog has menu.topic=Menu.topic etc.), or
something else is altering the title attributes (to capitalise them)
before the i18n transformer sees them and they aren't translated as
the transformer is probably case sensitive as regards the key names
(so it no longer thinks they match the keys in the catalog).

Or were the capital letters introduced by your mail client and the
original output is also lower case?

One other thought - is the i18n namespace declared correctly in your
template file?  Perhaps the transformer isn't recognising the
i18n:attr attributes, so doesn't think it needs to do anything with
the titles.


Andy
-- 
http://pseudoq.sourceforge.net/  Open source java sudoku solver

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

IMPORTANT NOTICE:
This message may contain confidential information.
If you have received this e-mail in error, do not use, copy or
distribute it. Do not open any attachments. Delete it immediately from
your system and notify the sender promptly by e-mail that you
have done so. Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: i18n in JX Template

2008-06-25 Thread Magnus Haraldsen Amundsen
Does anyone have any ideas? I'm really stuck on this and my SCRUM-task
won't budge until it's solved ;)

-Original Message-
From: Magnus Haraldsen Amundsen
[mailto:[EMAIL PROTECTED] 
Sent: 25. juni 2008 12:06
To: users@cocoon.apache.org
Subject: RE: i18n in JX Template

The upper case was because of Outlook.

The namespace is correct, and it works when the i18n:attr is used in the
XSLT, but not in the JX Template.



-Original Message-
From: Andy Stevens [mailto:[EMAIL PROTECTED] 
Sent: 25. juni 2008 11:37
To: users@cocoon.apache.org
Subject: Re: i18n in JX Template

2008/6/25 Magnus Haraldsen Amundsen
[EMAIL PROTECTED]:

 In my JX Template i've created a system to display menues.

 c:menu

 c:menuelement title=menu.topic link=admin/emner/
 i18n:attr=title/
...
but it shows as

 Menu.topic
...
 How do I fix this?

Given that your tokens are all lower case but the output has a leading
capital letter, it seems to me that either they *are* being
substituted (and your catalog has menu.topic=Menu.topic etc.), or
something else is altering the title attributes (to capitalise them)
before the i18n transformer sees them and they aren't translated as
the transformer is probably case sensitive as regards the key names
(so it no longer thinks they match the keys in the catalog).

Or were the capital letters introduced by your mail client and the
original output is also lower case?

One other thought - is the i18n namespace declared correctly in your
template file?  Perhaps the transformer isn't recognising the
i18n:attr attributes, so doesn't think it needs to do anything with
the titles.


Andy
-- 
http://pseudoq.sourceforge.net/  Open source java sudoku solver

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

IMPORTANT NOTICE:
This message may contain confidential information. 
If you have received this e-mail in error, do not use, copy or 
distribute it. Do not open any attachments. Delete it immediately from
your system and notify the sender promptly by e-mail that you 
have done so. Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

IMPORTANT NOTICE:
This message may contain confidential information.
If you have received this e-mail in error, do not use, copy or
distribute it. Do not open any attachments. Delete it immediately from
your system and notify the sender promptly by e-mail that you
have done so. Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: i18n in JX Template

2008-06-25 Thread Jeroen Reijn

Magnus,

i'm not sure which cocoon versiom you are using, but in case you are 
using 2.1, try setting the loglevel for the i18n transformer to DEBUG. 
You can figure out what the logger is for your transformer by looking at 
the logger attribute of the i18n transformer definition.


map:transformer name=i18n 
src=org.apache.cocoon.transformation.I18nTransformer 
logger=sitemap.transformer.i18n



Now in my logkit.xconf there is a category named:

category log-level=WARN name=sitemap
  log-target id-ref=sitemap/
  log-target id-ref=error/
/category

It may or may not contain additional nested categories.

In your case you want to add a new nested category.

category log-level=WARN name=sitemap
  log-target id-ref=sitemap/
  log-target id-ref=error/

  category log-level=WARN name=transformer.i18n
log-target id-ref=sitemap/
log-target id-ref=error/
  /category

/category

The name is the interesting part here. It should match the logger 
specified in your transformer configuration.


Regards,

Jeroen




Magnus Haraldsen Amundsen wrote:

Does anyone have any ideas? I'm really stuck on this and my SCRUM-task
won't budge until it's solved ;)

-Original Message-
From: Magnus Haraldsen Amundsen
[mailto:[EMAIL PROTECTED] 
Sent: 25. juni 2008 12:06

To: users@cocoon.apache.org
Subject: RE: i18n in JX Template

The upper case was because of Outlook.

The namespace is correct, and it works when the i18n:attr is used in the
XSLT, but not in the JX Template.



-Original Message-
From: Andy Stevens [mailto:[EMAIL PROTECTED] 
Sent: 25. juni 2008 11:37

To: users@cocoon.apache.org
Subject: Re: i18n in JX Template

2008/6/25 Magnus Haraldsen Amundsen
[EMAIL PROTECTED]:

In my JX Template i've created a system to display menues.

c:menu

c:menuelement title=menu.topic link=admin/emner/
i18n:attr=title/

...

but it shows as

Menu.topic

...

How do I fix this?


Given that your tokens are all lower case but the output has a leading
capital letter, it seems to me that either they *are* being
substituted (and your catalog has menu.topic=Menu.topic etc.), or
something else is altering the title attributes (to capitalise them)
before the i18n transformer sees them and they aren't translated as
the transformer is probably case sensitive as regards the key names
(so it no longer thinks they match the keys in the catalog).

Or were the capital letters introduced by your mail client and the
original output is also lower case?

One other thought - is the i18n namespace declared correctly in your
template file?  Perhaps the transformer isn't recognising the
i18n:attr attributes, so doesn't think it needs to do anything with
the titles.


Andy


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: i18n in JX Template

2008-06-25 Thread Robin Wyles

Hi,

It might help if you also posted snippets from your sitemap to show:

1. The pipeline handling the display of the JX template.

2. map:transformer/ element that defines the i18n transformer  
configuration.




Robin





On 25 Jun 2008, at 13:46, Magnus Haraldsen Amundsen wrote:


Does anyone have any ideas? I'm really stuck on this and my SCRUM-task
won't budge until it's solved ;)

-Original Message-
From: Magnus Haraldsen Amundsen
[mailto:[EMAIL PROTECTED]
Sent: 25. juni 2008 12:06
To: users@cocoon.apache.org
Subject: RE: i18n in JX Template

The upper case was because of Outlook.

The namespace is correct, and it works when the i18n:attr is used  
in the

XSLT, but not in the JX Template.



-Original Message-
From: Andy Stevens [mailto:[EMAIL PROTECTED]
Sent: 25. juni 2008 11:37
To: users@cocoon.apache.org
Subject: Re: i18n in JX Template

2008/6/25 Magnus Haraldsen Amundsen
[EMAIL PROTECTED]:


In my JX Template i've created a system to display menues.

c:menu

c:menuelement title=menu.topic link=admin/emner/
i18n:attr=title/

...

but it shows as

Menu.topic

...

How do I fix this?


Given that your tokens are all lower case but the output has a leading
capital letter, it seems to me that either they *are* being
substituted (and your catalog has menu.topic=Menu.topic etc.), or
something else is altering the title attributes (to capitalise them)
before the i18n transformer sees them and they aren't translated as
the transformer is probably case sensitive as regards the key names
(so it no longer thinks they match the keys in the catalog).

Or were the capital letters introduced by your mail client and the
original output is also lower case?

One other thought - is the i18n namespace declared correctly in your
template file?  Perhaps the transformer isn't recognising the
i18n:attr attributes, so doesn't think it needs to do anything with
the titles.


Andy
--
http://pseudoq.sourceforge.net/  Open source java sudoku solver

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

IMPORTANT NOTICE:
This message may contain confidential information.
If you have received this e-mail in error, do not use, copy or
distribute it. Do not open any attachments. Delete it immediately from
your system and notify the sender promptly by e-mail that you
have done so. Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

IMPORTANT NOTICE:
This message may contain confidential information.
If you have received this e-mail in error, do not use, copy or
distribute it. Do not open any attachments. Delete it immediately from
your system and notify the sender promptly by e-mail that you
have done so. Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





smime.p7s
Description: S/MIME cryptographic signature


RE: i18n in JX Template

2008-06-25 Thread Magnus Haraldsen Amundsen
Sitemap:

We have 2 sitemaps, one for the app and one for skins

From the sitemap-app
map:match pattern=xml2/*
  map:generate src=templates/{1}.jx.xml type=jx/
  map:serialize type=servletService
map:parameter name=service value=servlet:skin:/admin-styling/
  /map:serialize
/map:match

Which uses from the sitemap-skin

map:match pattern=admin-styling
  map:act type=locale
map:generate src=service-consumer:/
map:transform src=transform/admin-styling.xslt
   map:parameter name=baseurl value={request:contextPath}/
   map:parameter name=locale value={language}/
/map:transform
map:transform type=i18n
   map:parameter name=locale value={language}/
/map:transform
map:serialize type=xhtml/
  /map:act
/map:match


Where the i18nTransformer is configured as follows

map:components
 map:transformers
  map:transformer name=i18n
src=org.apache.cocoon.transformation.I18nTransformer

 catalogues default=messages
   catalogue id=messages name=messages location=translations
/
 /catalogues
   /map:transformer
/map:transformers
  /map:components




-Original Message-
From: Robin Wyles [mailto:[EMAIL PROTECTED] 
Sent: 25. juni 2008 14:56
To: users@cocoon.apache.org
Subject: Re: i18n in JX Template

Hi,

It might help if you also posted snippets from your sitemap to show:

1. The pipeline handling the display of the JX template.

2. map:transformer/ element that defines the i18n transformer  
configuration.



Robin





On 25 Jun 2008, at 13:46, Magnus Haraldsen Amundsen wrote:

 Does anyone have any ideas? I'm really stuck on this and my SCRUM-task
 won't budge until it's solved ;)

 -Original Message-
 From: Magnus Haraldsen Amundsen
 [mailto:[EMAIL PROTECTED]
 Sent: 25. juni 2008 12:06
 To: users@cocoon.apache.org
 Subject: RE: i18n in JX Template

 The upper case was because of Outlook.

 The namespace is correct, and it works when the i18n:attr is used  
 in the
 XSLT, but not in the JX Template.



 -Original Message-
 From: Andy Stevens [mailto:[EMAIL PROTECTED]
 Sent: 25. juni 2008 11:37
 To: users@cocoon.apache.org
 Subject: Re: i18n in JX Template

 2008/6/25 Magnus Haraldsen Amundsen
 [EMAIL PROTECTED]:

 In my JX Template i've created a system to display menues.

 c:menu

 c:menuelement title=menu.topic link=admin/emner/
 i18n:attr=title/
 ...
 but it shows as

 Menu.topic
 ...
 How do I fix this?

 Given that your tokens are all lower case but the output has a leading
 capital letter, it seems to me that either they *are* being
 substituted (and your catalog has menu.topic=Menu.topic etc.), or
 something else is altering the title attributes (to capitalise them)
 before the i18n transformer sees them and they aren't translated as
 the transformer is probably case sensitive as regards the key names
 (so it no longer thinks they match the keys in the catalog).

 Or were the capital letters introduced by your mail client and the
 original output is also lower case?

 One other thought - is the i18n namespace declared correctly in your
 template file?  Perhaps the transformer isn't recognising the
 i18n:attr attributes, so doesn't think it needs to do anything with
 the titles.


 Andy
 -- 
 http://pseudoq.sourceforge.net/  Open source java sudoku solver

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 IMPORTANT NOTICE:
 This message may contain confidential information.
 If you have received this e-mail in error, do not use, copy or
 distribute it. Do not open any attachments. Delete it immediately from
 your system and notify the sender promptly by e-mail that you
 have done so. Thank you.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 IMPORTANT NOTICE:
 This message may contain confidential information.
 If you have received this e-mail in error, do not use, copy or
 distribute it. Do not open any attachments. Delete it immediately from
 your system and notify the sender promptly by e-mail that you
 have done so. Thank you.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


IMPORTANT NOTICE:
This message may contain confidential information.
If you have received this e-mail in error, do not use, copy or
distribute it. Do not open any attachments. Delete it immediately from
your system and notify the sender promptly by e-mail that you
have done so. Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: i18n in JX Template

2008-06-25 Thread Magnus Haraldsen Amundsen
And we use Cocoon 2.2, but the 2.1 i18nTransformer (at least the
namespace) since we couldn't find any documentation for 2.2.

-Original Message-
From: Magnus Haraldsen Amundsen
[mailto:[EMAIL PROTECTED] 
Sent: 25. juni 2008 15:09
To: users@cocoon.apache.org
Subject: RE: i18n in JX Template

Sitemap:

We have 2 sitemaps, one for the app and one for skins

From the sitemap-app
map:match pattern=xml2/*
  map:generate src=templates/{1}.jx.xml type=jx/
  map:serialize type=servletService
map:parameter name=service value=servlet:skin:/admin-styling/
  /map:serialize
/map:match

Which uses from the sitemap-skin

map:match pattern=admin-styling
  map:act type=locale
map:generate src=service-consumer:/
map:transform src=transform/admin-styling.xslt
   map:parameter name=baseurl value={request:contextPath}/
   map:parameter name=locale value={language}/
/map:transform
map:transform type=i18n
   map:parameter name=locale value={language}/
/map:transform
map:serialize type=xhtml/
  /map:act
/map:match


Where the i18nTransformer is configured as follows

map:components
 map:transformers
  map:transformer name=i18n
src=org.apache.cocoon.transformation.I18nTransformer

 catalogues default=messages
   catalogue id=messages name=messages location=translations
/
 /catalogues
   /map:transformer
/map:transformers
  /map:components




-Original Message-
From: Robin Wyles [mailto:[EMAIL PROTECTED] 
Sent: 25. juni 2008 14:56
To: users@cocoon.apache.org
Subject: Re: i18n in JX Template

Hi,

It might help if you also posted snippets from your sitemap to show:

1. The pipeline handling the display of the JX template.

2. map:transformer/ element that defines the i18n transformer  
configuration.



Robin





On 25 Jun 2008, at 13:46, Magnus Haraldsen Amundsen wrote:

 Does anyone have any ideas? I'm really stuck on this and my SCRUM-task
 won't budge until it's solved ;)

 -Original Message-
 From: Magnus Haraldsen Amundsen
 [mailto:[EMAIL PROTECTED]
 Sent: 25. juni 2008 12:06
 To: users@cocoon.apache.org
 Subject: RE: i18n in JX Template

 The upper case was because of Outlook.

 The namespace is correct, and it works when the i18n:attr is used  
 in the
 XSLT, but not in the JX Template.



 -Original Message-
 From: Andy Stevens [mailto:[EMAIL PROTECTED]
 Sent: 25. juni 2008 11:37
 To: users@cocoon.apache.org
 Subject: Re: i18n in JX Template

 2008/6/25 Magnus Haraldsen Amundsen
 [EMAIL PROTECTED]:

 In my JX Template i've created a system to display menues.

 c:menu

 c:menuelement title=menu.topic link=admin/emner/
 i18n:attr=title/
 ...
 but it shows as

 Menu.topic
 ...
 How do I fix this?

 Given that your tokens are all lower case but the output has a leading
 capital letter, it seems to me that either they *are* being
 substituted (and your catalog has menu.topic=Menu.topic etc.), or
 something else is altering the title attributes (to capitalise them)
 before the i18n transformer sees them and they aren't translated as
 the transformer is probably case sensitive as regards the key names
 (so it no longer thinks they match the keys in the catalog).

 Or were the capital letters introduced by your mail client and the
 original output is also lower case?

 One other thought - is the i18n namespace declared correctly in your
 template file?  Perhaps the transformer isn't recognising the
 i18n:attr attributes, so doesn't think it needs to do anything with
 the titles.


 Andy
 -- 
 http://pseudoq.sourceforge.net/  Open source java sudoku solver

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 IMPORTANT NOTICE:
 This message may contain confidential information.
 If you have received this e-mail in error, do not use, copy or
 distribute it. Do not open any attachments. Delete it immediately from
 your system and notify the sender promptly by e-mail that you
 have done so. Thank you.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 IMPORTANT NOTICE:
 This message may contain confidential information.
 If you have received this e-mail in error, do not use, copy or
 distribute it. Do not open any attachments. Delete it immediately from
 your system and notify the sender promptly by e-mail that you
 have done so. Thank you.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


IMPORTANT NOTICE:
This message may contain confidential information. 
If you have received this e-mail in error, do not use, copy or 
distribute it. Do not open any attachments. Delete it immediately from
your system and notify the sender promptly by e-mail that you 
have done so. Thank you

RE: i18n in JX Template

2008-06-25 Thread Magnus Haraldsen Amundsen
I added a i18nTransform before the XSLT transform, just for the fun of
it, and then the menus is translated correctly.

-Original Message-
From: Magnus Haraldsen Amundsen
[mailto:[EMAIL PROTECTED] 
Sent: 25. juni 2008 15:15
To: users@cocoon.apache.org
Subject: RE: i18n in JX Template

And we use Cocoon 2.2, but the 2.1 i18nTransformer (at least the
namespace) since we couldn't find any documentation for 2.2.

-Original Message-
From: Magnus Haraldsen Amundsen
[mailto:[EMAIL PROTECTED] 
Sent: 25. juni 2008 15:09
To: users@cocoon.apache.org
Subject: RE: i18n in JX Template

Sitemap:

We have 2 sitemaps, one for the app and one for skins

From the sitemap-app
map:match pattern=xml2/*
  map:generate src=templates/{1}.jx.xml type=jx/
  map:serialize type=servletService
map:parameter name=service value=servlet:skin:/admin-styling/
  /map:serialize
/map:match

Which uses from the sitemap-skin

map:match pattern=admin-styling
  map:act type=locale
map:generate src=service-consumer:/
map:transform src=transform/admin-styling.xslt
   map:parameter name=baseurl value={request:contextPath}/
   map:parameter name=locale value={language}/
/map:transform
map:transform type=i18n
   map:parameter name=locale value={language}/
/map:transform
map:serialize type=xhtml/
  /map:act
/map:match


Where the i18nTransformer is configured as follows

map:components
 map:transformers
  map:transformer name=i18n
src=org.apache.cocoon.transformation.I18nTransformer

 catalogues default=messages
   catalogue id=messages name=messages location=translations
/
 /catalogues
   /map:transformer
/map:transformers
  /map:components




-Original Message-
From: Robin Wyles [mailto:[EMAIL PROTECTED] 
Sent: 25. juni 2008 14:56
To: users@cocoon.apache.org
Subject: Re: i18n in JX Template

Hi,

It might help if you also posted snippets from your sitemap to show:

1. The pipeline handling the display of the JX template.

2. map:transformer/ element that defines the i18n transformer  
configuration.



Robin





On 25 Jun 2008, at 13:46, Magnus Haraldsen Amundsen wrote:

 Does anyone have any ideas? I'm really stuck on this and my SCRUM-task
 won't budge until it's solved ;)

 -Original Message-
 From: Magnus Haraldsen Amundsen
 [mailto:[EMAIL PROTECTED]
 Sent: 25. juni 2008 12:06
 To: users@cocoon.apache.org
 Subject: RE: i18n in JX Template

 The upper case was because of Outlook.

 The namespace is correct, and it works when the i18n:attr is used  
 in the
 XSLT, but not in the JX Template.



 -Original Message-
 From: Andy Stevens [mailto:[EMAIL PROTECTED]
 Sent: 25. juni 2008 11:37
 To: users@cocoon.apache.org
 Subject: Re: i18n in JX Template

 2008/6/25 Magnus Haraldsen Amundsen
 [EMAIL PROTECTED]:

 In my JX Template i've created a system to display menues.

 c:menu

 c:menuelement title=menu.topic link=admin/emner/
 i18n:attr=title/
 ...
 but it shows as

 Menu.topic
 ...
 How do I fix this?

 Given that your tokens are all lower case but the output has a leading
 capital letter, it seems to me that either they *are* being
 substituted (and your catalog has menu.topic=Menu.topic etc.), or
 something else is altering the title attributes (to capitalise them)
 before the i18n transformer sees them and they aren't translated as
 the transformer is probably case sensitive as regards the key names
 (so it no longer thinks they match the keys in the catalog).

 Or were the capital letters introduced by your mail client and the
 original output is also lower case?

 One other thought - is the i18n namespace declared correctly in your
 template file?  Perhaps the transformer isn't recognising the
 i18n:attr attributes, so doesn't think it needs to do anything with
 the titles.


 Andy
 -- 
 http://pseudoq.sourceforge.net/  Open source java sudoku solver

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 IMPORTANT NOTICE:
 This message may contain confidential information.
 If you have received this e-mail in error, do not use, copy or
 distribute it. Do not open any attachments. Delete it immediately from
 your system and notify the sender promptly by e-mail that you
 have done so. Thank you.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 IMPORTANT NOTICE:
 This message may contain confidential information.
 If you have received this e-mail in error, do not use, copy or
 distribute it. Do not open any attachments. Delete it immediately from
 your system and notify the sender promptly by e-mail that you
 have done so. Thank you.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


IMPORTANT

Re: i18n in JX Template

2008-06-25 Thread Andy Stevens
2008/6/25 Magnus Haraldsen Amundsen [EMAIL PROTECTED]:
 I added a i18nTransform before the XSLT transform, just for the fun of
 it, and then the menus is translated correctly.

So what does the admin-styling XSLT do?  Could it be interfering with
the i18n namespace or stripping the i18n:attr attributes off the
relevant elements?


Andy.
-- 
http://pseudoq.sourceforge.net/  Open source java sudoku application

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]