static {
   Translations en = Translations.getTranslations(Locale.ENGLISH);
   for (int i = 0; i < 190; i++) {
     EngineeringUnits eu = new EngineeringUnits(i);
     ENGINEERING_UNITS_CODES.addElement(
         i, StringUtils.capitalize(en.translate(eu.getKey())), eu.getKey());
   }
 }
Beispiel #2
0
 @Override
 public String getEventListLink(int ref1, int ref2, Translations translations) {
   String alt = Functions.quotEncode(translations.translate("events.editPointLink"));
   StringBuilder sb = new StringBuilder();
   sb.append("<a href='point_links.shtm?plid=");
   sb.append(ref1);
   sb.append("'><img src='");
   sb.append(getModule().getWebPath()).append("/web/link.png");
   sb.append("' alt='").append(alt);
   sb.append("' title='").append(alt);
   sb.append("'/></a>");
   return sb.toString();
 }
    public List<StringStringPair> getResults(Translations translations) {
      synchronized (results) {
        List<StringStringPair> l = new ArrayList<StringStringPair>();
        String m;
        for (StringStringPair kvp : results) {
          if (kvp.getValue() == null) m = translations.translate("modules.downloadComplete");
          else
            m =
                new TranslatableMessage("modules.downloadFailure", kvp.getValue())
                    .translate(translations);
          l.add(new StringStringPair(kvp.getKey(), m));
        }

        return l;
      }
    }