Hey Sylvain

My reply is inline in blue font below

On Fri, Oct 30, 2009 at 5:21 AM, syllant <[email protected]> wrote:

>
> Hi all,
>
> I had reported a request feature about implementing
> internationalization support (http://code.google.com/p/aost/issues/
> detail?id=221&q=i18n), I see it's committed and documented for 0.7.0
> snaphost(http://code.google.com/p/aost/issues/detail?id=221&q=i18n),
> great ;-)
>
> However, I have some concerns about implementation:
>
> 1. Management of multiple bundles is incorrect:
> InternationalizationManager#translate() methods do not handle case
> when bundle key is not found in some bundles, which makes this feature
> unusable according to me: you can't aggregate distinct messages from
> distinct bundles. This method should handle MissingResourceException.
>

Actually you can aggregate distinct messages from different bundles. If you
go to this link
http://code.google.com/p/aost/wiki/InternationalizationSupportTellurium
and scroll down to the section called "Internationalization Extension to
User defined tests" you will find how you can
add your own message bundle (use a function called addResourceBundle).

The basic idea is that you can add as many distinct message bundles as long
as they are not called the same, and are not named "DefaultMessagesBundle"
since that is the default message bundle used in the core.

Also if you dont find a key, it should throw a MissingResourceException.


>
> 2. You don't allow to specify language when asking for a translation.
> It would be useful to be able to pass locale, either by adding
> optional locale parameter in translate method (translate('msgKey',
> Locale.FRENCH)), either by providing one InternationalizationManager
> instance by locale
>

Yes this would definitely be a good additional feature to add, which I will
add as soon as I can. Although you can kinda do it right now, if you can
call setLocale() of the InternationalizationManager class. But i will
definitely add this functionality


> 3. I find term 'translate' not totally relevant: it does not translate
> something, it just provides value for specified key. I think these
> methods should be named with someting like get()
>

My intention of using translate was to signify that the English version of
the message was being translated to non english
But now that I think about it, your suggestion makes better sense. Let me
see what I can do about this.
( translate just sounded cool :-) )

>
> 4. method BaseTelluriumJavaTestCase#geti18nManager() does not respect
> Java naming standard, it should be getI18nManager()
>
> Yeah i agree, Will update the project soon.


> 5. It would be useful to allow to set a custom implementation of
> InternationalizationManager
>

Yep definitely a good idea, will look into it.


>
> Anyway, I go on with 0.7.0 snapshot, with patched implementation of
> InternationalizationManager for #1 issue.
>

Thanks for trying this feature out. Please do let me know if you face any
problems or any of the functionalities are not working as desired.

>
> Sylvain
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tellurium-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tellurium-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to