[icedtea-web] RFC: unify localization code
Omair Majid
omajid at redhat.com
Mon Oct 25 11:20:35 PDT 2010
On 10/25/2010 01:22 PM, Deepak Bhole wrote:
> * Omair Majid<omajid at redhat.com> [2010-10-25 12:54]:
>> Hi,
>>
>> Netx contains a number of duplicate methods named "R" defined in
>> various files that act as a wrapper for JNLPRuntime.getMessage().
>> The attached patch creates a new class Translate and moves all the
>> "R" methods to it. This set of overloaded "R" methods is then
>> statically imported anywhere that needs localized strings.
>>
>
> While it is being refactored, why not use varargs for R()?
>
Fixed.
Changelog:
2010-10-25 Omair Majid <omajid at redhat.com>
* net/sourceforge/jnlp/ExtensionDesc.java: Import Translator.R
and use that.
* net/sourceforge/jnlp/JNLPFile.java: Import Translator.R.
(R): Remove.
* net/sourceforge/jnlp/JREDesc.java: Import Translator.R.
(checkHeapSize): Use R instead of JNLPRuntime.getMessage.
* net/sourceforge/jnlp/Launcher.java: Import Translator.R.
(R): Remove.
* net/sourceforge/jnlp/Parser.java: Import Translator.R
(R(String)): Remove.
(R(String,Object)): Remove.
(R(String,Object,Object)): Remove.
(R(String,Object,Object,Object)): Remove.
* net/sourceforge/jnlp/cache/CacheEntry.java: Import
Translator.R
(CacheEntry): Use R instead of JNLPRuntime.getMessage.
* net/sourceforge/jnlp/cache/CacheUtil.java: Import
Translator.R
(R(String)): Remove.
(R(String,Object)): Remove.
* net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java:
Import Translator.R and use that instead of
JNLPRuntime.getMessage.
* net/sourceforge/jnlp/runtime/Boot.java: Import Translator.R.
(R(String)): Remove.
(R(String, Object)): Remove.
(run): Use R instead of JNLPRuntime.getMessage.
* net/sourceforge/jnlp/runtime/JNLPClassLoader.java: Import
Translator.R.
(R): Remove.
* net/sourceforge/jnlp/runtime/JNLPSecurityManager.java:
Import Translator.R. Use it instead of JNLPRuntime.getMeesage.
(R): Remove.
* net/sourceforge/jnlp/security/AccessWarningPane.java:
Import Translator.R.
* net/sourceforge/jnlp/security/CertWarningPane.java:
Likewise.
* net/sourceforge/jnlp/security/HttpsCertVerifier.java:
Import Translator.R.
(R(String)): Remove.
(R(String,String,String)): Remove.
* net/sourceforge/jnlp/security/MoreInfoPane.java
Import Translator.R.
* net/sourceforge/jnlp/security/SecurityDialogPanel.java
(R(String)): Remove.
(R(String,Object)): Remove.
* net/sourceforge/jnlp/services/ServiceUtil.java
(R): Remove.
* net/sourceforge/jnlp/services/SingleInstanceLock.java:
Import Translator.R
(R(String)): Remove.
(R(String,Object)): Remove.
* net/sourceforge/jnlp/tools/JarSigner.java: Import
Translator.R.
(R): Remove
* net/sourceforge/jnlp/runtime/Translator.java: New file
(R(String)): New method.
(R(String,Object)): Likewise.
(R(String,Object,Object)): Likewise.
(R(String,Object,Object,Object)): Likewise.
(R(String,Object[])): Likewise.
Thanks,
Omair
More information about the distro-pkg-dev
mailing list