You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@roller.apache.org by Alex D <zi...@free.fr> on 2007/02/16 09:52:05 UTC

Multi-language weblogs with Roller

Dear all,

I'm testing the latest version of Roller 3.0 . I'm on Red Hat 4, with Java
1.5 and tomcat 5.5.9.

I see in "What's new for Roller 3.0" that it has a "Better support for
multi-language weblogs"

But I can't get how it works...

I did the following:

* created one weblog with locale set to english
* I checked "Publish weblog in multiple languages"
* I unchecked "Show my weblog entries from all languages on my home page"

Then I have created 3 entries:
* in english (with locale set to english)
* in spanish (with locale set to spanish)
* in german (with locale set to german)

Then when I go to my weblog http://localhost:8080/roller3/localeen/ I can
see all my entries (english, german and spanish)
BUT "Show my weblog entries from all languages on my homepage" is unchecked,
So why all entries are displayed ? (normally I guess only the entries with
the locale set to the same locale of the blog should be displayed, meaning
"en" entries")

Also, if I go http://localhost:8080/roller3/localeen/es/ I can see all my
entries in spanish and also those in spanish.
That's ok for me
The calendar is in spanish BUT other text, for instance "posted by" are in
english. In the template, I'm using $text.get(" macro.weblog.postedby"),
So having a mix between spanish and english is disapointing.
How is is supposed to work ? Is the text supposed to be in the locale of the
weblog (english) or in the locale of the entry (spanish) or in the language
of the language id passed in URL (here "es" for spanish) ?
Why can't the text "macro.weblog.postedby" be in spanish, while it is
available in spanish in the ApplicationRessources_es.properties file.

Finally, I have created a second blog (localees), with locale set to spanish
(es).
Then when I go to my weblog http://localhost:8080/roller3/localees/ the
calendar is in spanish (es)
but dynamic text generated by $text.get("...") are still in english (despite
the fact they are set in ApplicationRessources_es.properties)
Is it normal ?
Is it a bug ?
How can we use the $text.get to get the texts set in the
ApplicationRessources_xx.properties and what is the locale taken in
consideration to display the text with $text.get (the one set for the blog,
the one set for an entry, the one passed in the URI or the one set for Java
?

Thanks in advance for your help,

Best regards,

Alexandre

Re: Multi-language weblogs with Roller

Posted by Elias Torres <el...@torrez.us>.
No external link to the patch yet, but it would be for 3.1 branch.

-Elias

Oscar Puga wrote:
> Thanks Elias and Alex for your help.
> 
> Elias, ¿Can I have the link to the patch?¿Is that patch valid for Roller
> 3.0?
> 
> 
> Elias Torres wrote:
>> We've noticed the same behavior and have a patch for that. Thanks for
>> the confirmation.
>>
>> -Elias
>>
>> Alex D wrote:
>>> Ok I made some tests...
>>> I changed each occurence of " = " with "=" in
>>> ApplicationResources_es.properties. Then I restarted tomcat.
>>> $text.get("macro.weblog.postedby")  was still in english.
>>>
>>> Then I copied ApplicationResources.properties to
>>> ApplicationResources_en.properties and copied
>>> ApplicationResources_es.properties to ApplicationResources.properties.
>>> Then
>>> I restarted Apache
>>> $text.get("macro.weblog.postedby")  was still in english !!!!!!!!
>>>
>>> Finally I  dropped ApplicationResources_en.properties and copied
>>> ApplicationResources_es.properties to ApplicationResources.properties.
>>> Then
>>> I restarted Apache
>>> $text.get("macro.weblog.postedby")  was finally in spanish !!!!!!!! That
>>> makes me think the ApplicationResources_es.properties is not corrupted
>>> (just
>>> some texts are missing, for instance macro.weblog.readMore or
>>> macro.weblog.readMoreLink; in that case it just displays the "macro" name
>>> instead of the text).
>>>
>>> So, my opinion is that, in any case, Roller3 doesn't take the locale id
>>> sent
>>> to the URL into consideration for $text.get use, it takes the values set
>>> in
>>> ApplicationResources.properties, and only if there is no
>>> ApplicationResources_en.properties is defined.
>>>
>>>
>>> Alex
>>>
>>> On 2/22/07, Oscar Puga <os...@yahoo.es> wrote:
>>>>
>>>>
>>>>> Does it mean that the bundle ApplicationResources_es.properties,
>>>> coming
>>>>> with
>>>>> the default install of Roller 3.0, is corrupted?
>>>> Just checking the ApplicationResources_es.properties files of Roller
>>>> 3.0,
>>>> I
>>>> founded that '=' symbol between the key and value parts is surronded by
>>>> a
>>>> whitespace in both sides. Perhaps this causes Roller to never match a
>>>> key.
>>>>
>>>> This also happens with the "nl" and "ru" locales.
>>>>
>>>> -- 
>>>> View this message in context:
>>>> http://www.nabble.com/Multi-language-weblogs-with-Roller-tf3238306s12275.html#a9096565
>>>>
>>>> Sent from the Roller - Dev mailing list archive at Nabble.com.
>>>>
>>>>
>>
> 

Re: Multi-language weblogs with Roller

Posted by Oscar Puga <os...@yahoo.es>.
Thanks Elias and Alex for your help.

Elias, ¿Can I have the link to the patch?¿Is that patch valid for Roller
3.0?


Elias Torres wrote:
> 
> We've noticed the same behavior and have a patch for that. Thanks for
> the confirmation.
> 
> -Elias
> 
> Alex D wrote:
>> Ok I made some tests...
>> I changed each occurence of " = " with "=" in
>> ApplicationResources_es.properties. Then I restarted tomcat.
>> $text.get("macro.weblog.postedby")  was still in english.
>> 
>> Then I copied ApplicationResources.properties to
>> ApplicationResources_en.properties and copied
>> ApplicationResources_es.properties to ApplicationResources.properties.
>> Then
>> I restarted Apache
>> $text.get("macro.weblog.postedby")  was still in english !!!!!!!!
>> 
>> Finally I  dropped ApplicationResources_en.properties and copied
>> ApplicationResources_es.properties to ApplicationResources.properties.
>> Then
>> I restarted Apache
>> $text.get("macro.weblog.postedby")  was finally in spanish !!!!!!!! That
>> makes me think the ApplicationResources_es.properties is not corrupted
>> (just
>> some texts are missing, for instance macro.weblog.readMore or
>> macro.weblog.readMoreLink; in that case it just displays the "macro" name
>> instead of the text).
>> 
>> So, my opinion is that, in any case, Roller3 doesn't take the locale id
>> sent
>> to the URL into consideration for $text.get use, it takes the values set
>> in
>> ApplicationResources.properties, and only if there is no
>> ApplicationResources_en.properties is defined.
>> 
>> 
>> Alex
>> 
>> On 2/22/07, Oscar Puga <os...@yahoo.es> wrote:
>>>
>>>
>>>
>>> > Does it mean that the bundle ApplicationResources_es.properties,
>>> coming
>>> > with
>>> > the default install of Roller 3.0, is corrupted?
>>>
>>> Just checking the ApplicationResources_es.properties files of Roller
>>> 3.0,
>>> I
>>> founded that '=' symbol between the key and value parts is surronded by
>>> a
>>> whitespace in both sides. Perhaps this causes Roller to never match a
>>> key.
>>>
>>> This also happens with the "nl" and "ru" locales.
>>>
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/Multi-language-weblogs-with-Roller-tf3238306s12275.html#a9096565
>>>
>>> Sent from the Roller - Dev mailing list archive at Nabble.com.
>>>
>>>
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Multi-language-weblogs-with-Roller-tf3238306s12275.html#a9099807
Sent from the Roller - Dev mailing list archive at Nabble.com.


Re: Multi-language weblogs with Roller

Posted by Elias Torres <el...@torrez.us>.
We've noticed the same behavior and have a patch for that. Thanks for
the confirmation.

-Elias

Alex D wrote:
> Ok I made some tests...
> I changed each occurence of " = " with "=" in
> ApplicationResources_es.properties. Then I restarted tomcat.
> $text.get("macro.weblog.postedby")  was still in english.
> 
> Then I copied ApplicationResources.properties to
> ApplicationResources_en.properties and copied
> ApplicationResources_es.properties to ApplicationResources.properties. Then
> I restarted Apache
> $text.get("macro.weblog.postedby")  was still in english !!!!!!!!
> 
> Finally I  dropped ApplicationResources_en.properties and copied
> ApplicationResources_es.properties to ApplicationResources.properties. Then
> I restarted Apache
> $text.get("macro.weblog.postedby")  was finally in spanish !!!!!!!! That
> makes me think the ApplicationResources_es.properties is not corrupted
> (just
> some texts are missing, for instance macro.weblog.readMore or
> macro.weblog.readMoreLink; in that case it just displays the "macro" name
> instead of the text).
> 
> So, my opinion is that, in any case, Roller3 doesn't take the locale id
> sent
> to the URL into consideration for $text.get use, it takes the values set in
> ApplicationResources.properties, and only if there is no
> ApplicationResources_en.properties is defined.
> 
> 
> Alex
> 
> On 2/22/07, Oscar Puga <os...@yahoo.es> wrote:
>>
>>
>>
>> > Does it mean that the bundle ApplicationResources_es.properties, coming
>> > with
>> > the default install of Roller 3.0, is corrupted?
>>
>> Just checking the ApplicationResources_es.properties files of Roller 3.0,
>> I
>> founded that '=' symbol between the key and value parts is surronded by a
>> whitespace in both sides. Perhaps this causes Roller to never match a
>> key.
>>
>> This also happens with the "nl" and "ru" locales.
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Multi-language-weblogs-with-Roller-tf3238306s12275.html#a9096565
>>
>> Sent from the Roller - Dev mailing list archive at Nabble.com.
>>
>>
> 

Re: Multi-language weblogs with Roller

Posted by Alex D <zi...@free.fr>.
Ok I made some tests...
I changed each occurence of " = " with "=" in
ApplicationResources_es.properties. Then I restarted tomcat.
$text.get("macro.weblog.postedby")  was still in english.

Then I copied ApplicationResources.properties to
ApplicationResources_en.properties and copied
ApplicationResources_es.properties to ApplicationResources.properties. Then
I restarted Apache
$text.get("macro.weblog.postedby")  was still in english !!!!!!!!

Finally I  dropped ApplicationResources_en.properties and copied
ApplicationResources_es.properties to ApplicationResources.properties. Then
I restarted Apache
$text.get("macro.weblog.postedby")  was finally in spanish !!!!!!!! That
makes me think the ApplicationResources_es.properties is not corrupted (just
some texts are missing, for instance macro.weblog.readMore or
macro.weblog.readMoreLink; in that case it just displays the "macro" name
instead of the text).

So, my opinion is that, in any case, Roller3 doesn't take the locale id sent
to the URL into consideration for $text.get use, it takes the values set in
ApplicationResources.properties, and only if there is no
ApplicationResources_en.properties is defined.


Alex

On 2/22/07, Oscar Puga <os...@yahoo.es> wrote:
>
>
>
> > Does it mean that the bundle ApplicationResources_es.properties, coming
> > with
> > the default install of Roller 3.0, is corrupted?
>
> Just checking the ApplicationResources_es.properties files of Roller 3.0,
> I
> founded that '=' symbol between the key and value parts is surronded by a
> whitespace in both sides. Perhaps this causes Roller to never match a key.
>
> This also happens with the "nl" and "ru" locales.
>
> --
> View this message in context:
> http://www.nabble.com/Multi-language-weblogs-with-Roller-tf3238306s12275.html#a9096565
> Sent from the Roller - Dev mailing list archive at Nabble.com.
>
>

Re: Multi-language weblogs with Roller

Posted by Oscar Puga <os...@yahoo.es>.

> Does it mean that the bundle ApplicationResources_es.properties, coming
> with
> the default install of Roller 3.0, is corrupted?

Just checking the ApplicationResources_es.properties files of Roller 3.0, I
founded that '=' symbol between the key and value parts is surronded by a
whitespace in both sides. Perhaps this causes Roller to never match a key.

This also happens with the "nl" and "ru" locales.

-- 
View this message in context: http://www.nabble.com/Multi-language-weblogs-with-Roller-tf3238306s12275.html#a9096565
Sent from the Roller - Dev mailing list archive at Nabble.com.


Re: Multi-language weblogs with Roller

Posted by Alex D <zi...@free.fr>.
Hi Allen,

First of all, thanks for this useful piece of information.

I confirm that with my version 3.0 (downloaded on November 21st) has the
following problem:

* If I leave "Show my weblog entries from all languages on my home page"
unchecked, in the frontpage (accessed without passing any language id in the
URI) I still have all my posts, even those defined with a locale different
of the main blog.
-> I'm gonna re-install v3.0 and test v3.1 to see if it can solve anything

Concerning the second point, I set the weblog with the locale "Spanish" (es)
and created a post with locale spanish.
I'm using the $text.get(" macro.weblog.postedby") to get the text in my
template.
In any case, it displays "Posted by". I checked in WEB-INF/classes and
ApplicationResources_es.properties (for spanish, coming with the default
install of Roller 3.0) and the macro.weblog.postedby exists and is set to
"Enviado por"

So you say:
> So to fix this should just be a matter of making sure the bundles are
> properly updated and synchronized with their translations.
Does it mean that the bundle ApplicationResources_es.properties, coming with
the default install of Roller 3.0, is corrupted ?
Did I do any mistake ?

Thanks in advance for your precious help,

Alex


On 2/16/07, Allen Gilliland <al...@sun.com> wrote:
>
>
>
> Alex D wrote:
> > Dear all,
> >
> > I'm testing the latest version of Roller 3.0 . I'm on Red Hat 4, with
> Java
> > 1.5 and tomcat 5.5.9.
> >
> > I see in "What's new for Roller 3.0" that it has a "Better support for
> > multi-language weblogs"
> >
> > But I can't get how it works...
> >
> > I did the following:
> >
> > * created one weblog with locale set to english
> > * I checked "Publish weblog in multiple languages"
> > * I unchecked "Show my weblog entries from all languages on my home
> page"
> >
> > Then I have created 3 entries:
> > * in english (with locale set to english)
> > * in spanish (with locale set to spanish)
> > * in german (with locale set to german)
> >
> > Then when I go to my weblog http://localhost:8080/roller3/localeen/ I
> can
> > see all my entries (english, german and spanish)
> > BUT "Show my weblog entries from all languages on my homepage" is
> > unchecked,
> > So why all entries are displayed ? (normally I guess only the entries
> with
> > the locale set to the same locale of the blog should be displayed,
> meaning
> > "en" entries")
>
> Hmmm.  That would be a bug, but I know that feature is working in 3.0 so
> I'm not sure what you may have done wrong.  You are correct that if your
> weblog locale is english and you unchecked the "show entries from all
> languages" button then you should only see english entries on your blog.
>
>
> >
> > Also, if I go http://localhost:8080/roller3/localeen/es/ I can see all
> my
> > entries in spanish and also those in spanish.
> > That's ok for me
> > The calendar is in spanish BUT other text, for instance "posted by" are
> in
> > english. In the template, I'm using $text.get(" macro.weblog.postedby"),
> > So having a mix between spanish and english is disapointing.
> > How is is supposed to work ? Is the text supposed to be in the locale of
> > the
> > weblog (english) or in the locale of the entry (spanish) or in the
> language
> > of the language id passed in URL (here "es" for spanish) ?
> > Why can't the text "macro.weblog.postedby" be in spanish, while it is
> > available in spanish in the ApplicationRessources_es.properties file.
>
> The problem with the text is just a problem with the resource bundles I
> believe.  My guess is that the default bundle, which is in english, has
> a number of entries which aren't properly reflected in the other bundles
> because we don't have much in the way of i18n resources for the project.
>   Any time you are trying to get a string from the bundles which doesn't
> exist in your desired language then you will get the default, which is
> english.
>
> So to fix this should just be a matter of making sure the bundles are
> properly updated and synchronized with their translations.
>
> -- Allen
>
>
> >
> > Finally, I have created a second blog (localees), with locale set to
> > spanish
> > (es).
> > Then when I go to my weblog http://localhost:8080/roller3/localees/ the
> > calendar is in spanish (es)
> > but dynamic text generated by $text.get("...") are still in english
> > (despite
> > the fact they are set in ApplicationRessources_es.properties)
> > Is it normal ?
> > Is it a bug ?
> > How can we use the $text.get to get the texts set in the
> > ApplicationRessources_xx.properties and what is the locale taken in
> > consideration to display the text with $text.get (the one set for the
> blog,
> > the one set for an entry, the one passed in the URI or the one set for
> Java
> > ?
> >
> > Thanks in advance for your help,
> >
> > Best regards,
> >
> > Alexandre
> >
>

Re: Multi-language weblogs with Roller

Posted by Allen Gilliland <al...@sun.com>.

Alex D wrote:
> Dear all,
> 
> I'm testing the latest version of Roller 3.0 . I'm on Red Hat 4, with Java
> 1.5 and tomcat 5.5.9.
> 
> I see in "What's new for Roller 3.0" that it has a "Better support for
> multi-language weblogs"
> 
> But I can't get how it works...
> 
> I did the following:
> 
> * created one weblog with locale set to english
> * I checked "Publish weblog in multiple languages"
> * I unchecked "Show my weblog entries from all languages on my home page"
> 
> Then I have created 3 entries:
> * in english (with locale set to english)
> * in spanish (with locale set to spanish)
> * in german (with locale set to german)
> 
> Then when I go to my weblog http://localhost:8080/roller3/localeen/ I can
> see all my entries (english, german and spanish)
> BUT "Show my weblog entries from all languages on my homepage" is 
> unchecked,
> So why all entries are displayed ? (normally I guess only the entries with
> the locale set to the same locale of the blog should be displayed, meaning
> "en" entries")

Hmmm.  That would be a bug, but I know that feature is working in 3.0 so 
I'm not sure what you may have done wrong.  You are correct that if your 
weblog locale is english and you unchecked the "show entries from all 
languages" button then you should only see english entries on your blog.


> 
> Also, if I go http://localhost:8080/roller3/localeen/es/ I can see all my
> entries in spanish and also those in spanish.
> That's ok for me
> The calendar is in spanish BUT other text, for instance "posted by" are in
> english. In the template, I'm using $text.get(" macro.weblog.postedby"),
> So having a mix between spanish and english is disapointing.
> How is is supposed to work ? Is the text supposed to be in the locale of 
> the
> weblog (english) or in the locale of the entry (spanish) or in the language
> of the language id passed in URL (here "es" for spanish) ?
> Why can't the text "macro.weblog.postedby" be in spanish, while it is
> available in spanish in the ApplicationRessources_es.properties file.

The problem with the text is just a problem with the resource bundles I 
believe.  My guess is that the default bundle, which is in english, has 
a number of entries which aren't properly reflected in the other bundles 
because we don't have much in the way of i18n resources for the project. 
  Any time you are trying to get a string from the bundles which doesn't 
exist in your desired language then you will get the default, which is 
english.

So to fix this should just be a matter of making sure the bundles are 
properly updated and synchronized with their translations.

-- Allen


> 
> Finally, I have created a second blog (localees), with locale set to 
> spanish
> (es).
> Then when I go to my weblog http://localhost:8080/roller3/localees/ the
> calendar is in spanish (es)
> but dynamic text generated by $text.get("...") are still in english 
> (despite
> the fact they are set in ApplicationRessources_es.properties)
> Is it normal ?
> Is it a bug ?
> How can we use the $text.get to get the texts set in the
> ApplicationRessources_xx.properties and what is the locale taken in
> consideration to display the text with $text.get (the one set for the blog,
> the one set for an entry, the one passed in the URI or the one set for Java
> ?
> 
> Thanks in advance for your help,
> 
> Best regards,
> 
> Alexandre
>