Changeset 5834


Ignore:
Timestamp:
2003-11-13T14:04:29+13:00 (20 years ago)
Author:
kjdon
Message:

added a new line back in to description, and now use Codec instead of Utility.decodeGreenstone to transform the description

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/collection/CollectionConfiguration.java

    r5816 r5834  
    7171                temp = tokenizer.nextToken();
    7272                // check for language
    73                 String language = "";
     73                String language = "en"; // assume the no-lang ones are english, but we shouldn't really do this.
    7474                if(temp.startsWith("[") && temp.endsWith("]")) {
    7575                    language = temp.substring(temp.indexOf("=") + 1, temp.length() - 1);
     
    8282                    Gatherer.println("we have found a starting quote but not an ending quote, so now read lines until we get to an end quote");
    8383                    StringBuffer value_raw = new StringBuffer(temp.substring(1));
     84                    // add the new line back in
     85                    value_raw.append(StaticStrings.NEW_LINE_CHAR);
    8486                    int pos = value_raw.indexOf(start_string);
    8587                    int old_pos = 0;
     
    111113                    if (name==null || language.equalsIgnoreCase(Gatherer.dictionary.getLanguage())) {
    112114                    name= Utility.decodeGreenstone(temp);
     115                    // should we use Codec here too?
     116                   
    113117                    }
    114118                   
    115119                } else if (meta_type.equalsIgnoreCase("collectionextra")) {
    116120                    if (description == null|| language.equalsIgnoreCase(Gatherer.dictionary.getLanguage())) {
    117                     description = Utility.decodeGreenstone(temp);
     121                    //description = Utility.decodeGreenstone(temp);
    118122                    // or should we use codec??
    119                     // description = Codec.transform(temp, Codec.GREENSTONE_TO_TEXT);
     123                    description = Codec.transform(temp, Codec.GREENSTONE_TO_TEXT);
    120124                    }
    121125                }
Note: See TracChangeset for help on using the changeset viewer.