Revision 4732
trunk/frameworks/_fwAndami/src/com/iver/andami/messages/Messages.java | ||
---|---|---|
95 | 95 |
*/ |
96 | 96 |
public static String getString(String key) { |
97 | 97 |
Logger logger = Logger.getLogger("Messages"); |
98 |
logger.warn("Messages viejo--"+key+": "+org.gvsig.i18n.Messages.getText(key, "com.iver.andami.messages.Messages")); |
|
98 |
logger.warn("Messages viejo--"+key+": "+org.gvsig.i18n.Messages.getText(key, "com.iver.andami.messages.Messages", false));
|
|
99 | 99 |
return org.gvsig.i18n.Messages.getText(key, "com.iver.andami.messages.Messages"); |
100 | 100 |
} |
101 | 101 |
|
102 | 102 |
public static String get(String key) { |
103 | 103 |
Logger logger = Logger.getLogger("Messages"); |
104 |
logger.warn("Messages viejo--"+key+": "+org.gvsig.i18n.Messages.getText(key, "com.iver.andami.messages.Messages")); |
|
104 |
logger.warn("Messages viejo--"+key+": "+org.gvsig.i18n.Messages.getText(key, "com.iver.andami.messages.Messages", false));
|
|
105 | 105 |
return org.gvsig.i18n.Messages.getText(key, "com.iver.andami.messages.Messages"); |
106 | 106 |
} |
107 | 107 |
} |
trunk/frameworks/_fwAndami/src/com/iver/andami/Launcher.java | ||
---|---|---|
988 | 988 |
while (i.hasNext()) { |
989 | 989 |
String pluginName = (String) i.next(); |
990 | 990 |
PluginConfig config = (PluginConfig) pluginsConfig.get(pluginName); |
991 |
|
|
992 | 991 |
PluginServices ps = (PluginServices) pluginsServices.get(pluginName); |
993 | 992 |
|
994 | 993 |
if (config.getResourceBundle() != null) { |
995 | 994 |
// add the locale files associated with the plugin |
996 |
//org.gvsig.i18n.Messages.addResourceFamily(ps.getClassLoader().getBaseDir(), config.getResourceBundle().getName()); |
|
997 |
org.gvsig.i18n.Messages.addResourceFamily(config.getResourceBundle().getName(), ps.getClassLoader()); |
|
995 |
org.gvsig.i18n.Messages.addResourceFamily(config.getResourceBundle().getName(), ps.getClassLoader(), pluginName); |
|
998 | 996 |
} |
999 | 997 |
} |
1000 | 998 |
} |
trunk/frameworks/_fwAndami/src/com/iver/andami/PluginServices.java | ||
---|---|---|
114 | 114 |
*/ |
115 | 115 |
public String getText(String key) { |
116 | 116 |
if (key == null) return null; |
117 |
String translation = org.gvsig.i18n.Messages.getTextNoLog(key);
|
|
117 |
String translation = org.gvsig.i18n.Messages.getText(key, false);
|
|
118 | 118 |
if (translation != null) |
119 | 119 |
return translation; |
120 | 120 |
else |
121 | 121 |
{ |
122 |
logger.warn("Plugin "+getPluginName()+" -- "+org.gvsig.i18n.Messages.getTextNoLog("Messages._no_se_encontro_la_traduccion_para")+ key);
|
|
122 |
logger.warn("Plugin "+getPluginName()+" -- "+org.gvsig.i18n.Messages.getText("Messages._no_se_encontro_la_traduccion_para", false)+ key);
|
|
123 | 123 |
return key; |
124 | 124 |
} |
125 | 125 |
} |
... | ... | |
275 | 275 |
*/ |
276 | 276 |
public static String getText(Object pluginObject, String key) { |
277 | 277 |
if (key == null) return null; |
278 |
String translation = org.gvsig.i18n.Messages.getTextNoLog(key);
|
|
278 |
String translation = org.gvsig.i18n.Messages.getText(key, false);
|
|
279 | 279 |
if (translation != null) |
280 | 280 |
return translation; |
281 | 281 |
else |
282 | 282 |
{ |
283 |
logger.warn(org.gvsig.i18n.Messages.getTextNoLog("Messages._no_se_encontro_la_traduccion_para") + key);
|
|
283 |
logger.warn(org.gvsig.i18n.Messages.getText("Messages._no_se_encontro_la_traduccion_para",false) + key);
|
|
284 | 284 |
return key; |
285 | 285 |
} |
286 | 286 |
} |
Also available in: Unified diff