[rfc][icedtea-web] Move Translation Responsibility from JNLPRuntime to Translator

Jiri Vanek jvanek at redhat.com
Wed Sep 10 15:36:57 UTC 2014


On 09/10/2014 04:51 PM, Jie Kang wrote:
> Hello,
>
> This patch moves the translation responsibility from JNLPRuntime to Translator. Previously, the Translator contained two one-line functions calling methods in JNLPRuntime to perform localization of text. This localization is now performed in Translator instead.
>
> Thoughts?


Moreover ok.. jsut few thoughts:)


Main one - can we get rid of static context?
Well the Transaltor.R() api will probably remain, it would be enormous and unnecessary refactroing 
of every file, but inside may be hidden call to correct lazy-loading singleton.... hm?
>
>
...
> +     */
> +    private static String getMessage(String key, Object... args) {
> +        return MessageFormat.format(getMessage(key), args);
> +    }
>
Second though. Is this method worthy? if so(and it is..), should be tested :)

And the testing will me much more simple if this class will be possible to instantiate....


ty!

J.




More information about the distro-pkg-dev mailing list