Ignore:
Timestamp:
2022-09-08T11:08:46+12:00 (20 months ago)
Author:
kjdon
Message:

modified Dictionary, so that if a lang fragment starts with [PENDING], then don't use it. This is to allow the addition of old strings which will help the translators, but which are too out of date to display in the interface. OTher classes use of Dictionary modified so that they go through getTextString, or createDictionaryAndGetString, thereby benifitting from the pending stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/DisplayItemUtil.java

    r36507 r36592  
    8585    if (best_di != null) {
    8686        // look up the dictionary
    87         String value = getTextString(best_di.getAttribute(GSXML.KEY_ATT), lang, best_di.getAttribute(GSXML.DICTIONARY_ATT), class_loader);
     87          String value = Dictionary.createDictionaryAndGetString(best_di.getAttribute(GSXML.DICTIONARY_ATT), class_loader, best_di.getAttribute(GSXML.KEY_ATT), lang, null);
    8888        if (value != null) {
    8989        // copy the node now. Don't want to be modifying the underlying list as can lead to concurrent access problems.
     
    127127  }
    128128
    129   protected static String getTextString(String key, String lang, String dictionary, ClassLoader class_loader) {
    130     return getTextString(key, lang, dictionary, null, class_loader);
    131   }
    132 
    133   protected static String getTextString(String key, String lang, String dictionary, String[] args, ClassLoader class_loader)
    134   {
    135     Dictionary dict;
    136     if (class_loader != null) {
    137       dict = new Dictionary(dictionary, lang, class_loader);
    138     } else {
    139       dict = new Dictionary(dictionary, lang);
    140     }
    141     String result = dict.get(key, args);
    142     return result;
    143   }
    144  
    145129
    146130}
Note: See TracChangeset for help on using the changeset viewer.