Changeset 5952


Ignore:
Timestamp:
May 27, 2020, 2:17:46 PM (2 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1247: Add more translations to SSP plug-in

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/branches/4.27-stable/src/net/sf/basedb/reggie/ssp/SspPlugin.java

    r5945 r5952  
    327327      translations.put("hög", "High");
    328328      translations.put("låg", "Low");
     329      translations.put("hog", "High");
     330      translations.put("lag", "Low");
     331      translations.put("grad 1", "Grade1");
     332      translations.put("grad 2", "Grade2");
     333      translations.put("grad 3", "Grade3");
    329334    }
    330335    String translatedWord = translations.get(word.toLowerCase());
     
    340345      // Pattern to match ClassA=ScoreA; ClassB=ScoreB; ...ClassN=ScoreN
    341346      // We catch 'Class' in $1 and rest in $2
    342       translatePattern = Pattern.compile("(\\w+)(=.+?(;|$))");
     347      // Note: there can be spaces classes, for example: 'Class A'
     348      translatePattern = Pattern.compile("(\\w+[\\s\\w]*)(=.+?(;|$))");
    343349    }
    344350    Matcher m = translatePattern.matcher(scores);
Note: See TracChangeset for help on using the changeset viewer.