> On 23/01/2012, at 8:04 PM, Olivier Lamy wrote:
>> I have started some doc (really work in progress :-) ).
>> I will basically focus on provided documentation with code samples.
>> Resource bundle are loaded only once when user go to the application.
>> For static content some explanations can be read here
> Ok, I think I'll need to look closer at the js webapp overall to see how it fits together.
>> By default locale is the browser locale except if you have the query
>> parameter ?request_lang=en (due to my bad experience with selenium
>> tests which failed on my fr machine I did that to be able to force
>> locale :-) ).
>> 2012/1/23 Brett Porter <brett@...>:
>>> I haven't had time to wade through all the UI changes yet, but in fixing the JDK 5 compatibility problem this morning, I saw that there is a class serving all the i18n resources over REST, which are then used in jquery.
>>> I'm curious how this architecture works? My expectation would have been that there are no localized strings in the static content (HTML/JS), and that the REST calls would return localized content as requested. Where are the keyed requests coming from?
>>> Also, how does this perform with caching and behave with allowing users to select the locale?
>>> I did notice that the call generating it is potentially quite inefficient. There are 2 calls to convert properties to a string (one for redback, which has subcalls, one for archiva), which both converted back to properties, merged and then back to a string. I'd hope the resource bundles could just be loaded once (presuming they can be updated as may be needed in an OSGi scenario later).
>> I miss you here :-).
>> There is only on rest call. I have tried to reuse redback i18n.
>> There are two properties load (one in en and an other one in the
>> request locale except if en is the default). Note it's more 2*2
>> (redback then archiva)
> In DefaultCommonServices.getAllI18nResources( locale ):
> - redback properties are loaded and converted to string
> - archiva properties are loaded and converted to string
> - redback string is converted back to properties
> - archiva string is converted back to properties and added to the same properties instance
> - the combined properties is converted back to a string
> The class just seemed very confusing - it would be better to just gather all the required properties in one instance, then write them out to the request with properties.store()?
agree I just wanted to reused redback methods but sure could (will) be