Changeset 35391
- Timestamp:
- 2021-09-14T14:17:21+12:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/XSLTUtil.java
r33720 r35391 237 237 public static String getInterfaceText(String interface_name, String dictionary_name, String lang, String key, String args_str) 238 238 { 239 String[] args = null; 239 // now we allow looking for files in the interface's resources folder 240 CustomClassLoader my_loader = new CustomClassLoader(XSLTUtil.class.getClassLoader(), GSFile.interfaceResourceDir(GlobalProperties.getGSDL3Home(), interface_name)); 241 String[] args = null; 240 242 if (args_str != null && !args_str.equals("")) 241 243 { … … 244 246 245 247 // try the specified dictionary first 246 Dictionary dict = new Dictionary(dictionary_name, lang );248 Dictionary dict = new Dictionary(dictionary_name, lang, my_loader); 247 249 String result = dict.get(key, args); 248 250 if (result == null) { … … 285 287 public static String getInterfaceTextWithArgs(String interface_name, String lang, String key, String[] args) 286 288 { 287 Dictionary dict = new Dictionary("interface_" + interface_name, lang); 289 // now we allow looking for files in the interface's resources folder 290 CustomClassLoader my_loader = new CustomClassLoader(XSLTUtil.class.getClassLoader(), GSFile.interfaceResourceDir(GlobalProperties.getGSDL3Home(), interface_name)); 291 Dictionary dict = new Dictionary("interface_" + interface_name, lang, my_loader); 288 292 289 // do we need this?? values can have __INTERFACE_NAME__ but would keys ever have it???290 key = key.replaceAll("__INTERFACE_NAME__", interface_name);291 293 String result = dict.get(key, args); 292 294 if (result == null) 293 { // not found - TODO delete this???294 //if not found, search a separate subdirectory named by the interface name 295 { 296 //if not found, search a separate subdirectory named by the interface name. this is used for eg the flax interface. this could be replaced by new class loader option? 295 297 String sep_interface_dir = interface_name + File.separatorChar + lang + File.separatorChar + "interface"; 296 298 dict = new Dictionary(sep_interface_dir, lang);
Note:
See TracChangeset
for help on using the changeset viewer.