diff --git a/build.xml b/build.xml index 80f822a62..6778445bf 100644 --- a/build.xml +++ b/build.xml @@ -1619,6 +1619,8 @@ javax.swing.event, javax.swing.border"/> prefix="net/java/sip/communicator/plugin/updatechecker" /> + diff --git a/src/net/java/sip/communicator/plugin/updatechecker/Resources.java b/src/net/java/sip/communicator/plugin/updatechecker/Resources.java index 41a7629d7..73d4cd25e 100644 --- a/src/net/java/sip/communicator/plugin/updatechecker/Resources.java +++ b/src/net/java/sip/communicator/plugin/updatechecker/Resources.java @@ -29,9 +29,15 @@ public class Resources private static final String LANG_BUNDLE_NAME = "resources.languages.plugin.updatechecker.resources"; + + private static final String BUNDLE_APP_NAME + = "resources.application"; private static final ResourceBundle langBundle = ResourceBundle .getBundle(LANG_BUNDLE_NAME); + + private static final ResourceBundle APP_PROPERTIES_BUNDLE = ResourceBundle + .getBundle( BUNDLE_APP_NAME); /** * Returns an internationalized string corresponding to the given key. @@ -78,4 +84,24 @@ public static String getLangString(String key) return null; } } + + /** + * Returns an string corresponding to the given key. + * + * @param key The key of the string. + * @return An string corresponding to the given key. + */ + public static String getAppPropString(String key) + { + try + { + return APP_PROPERTIES_BUNDLE.getString(key); + } + catch (MissingResourceException e) + { + logger.error("Missing resources.", e); + + return null; + } + } } diff --git a/src/net/java/sip/communicator/plugin/updatechecker/UpdateCheckActivator.java b/src/net/java/sip/communicator/plugin/updatechecker/UpdateCheckActivator.java index f83c5b087..d4fa543f8 100644 --- a/src/net/java/sip/communicator/plugin/updatechecker/UpdateCheckActivator.java +++ b/src/net/java/sip/communicator/plugin/updatechecker/UpdateCheckActivator.java @@ -86,12 +86,12 @@ public void start(BundleContext bundleContext) throws Exception String dialogMsg = MessageFormat.format( Resources.getLangString("dialogMessage1"), - ver.getApplicationName()); + Resources.getAppPropString("applicationName")); if(lastVersion != null) dialogMsg += MessageFormat.format( Resources.getLangString("dialogMessage2"), - ver.getApplicationName(), lastVersion); + Resources.getAppPropString("applicationName"), lastVersion); contentMessage.setText(dialogMsg);