Changeset 2174 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2009-09-20T22:17:04+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/I18n.java
r2017 r2174 31 31 public static final String tr(String text, Object... objects) { 32 32 if (i18n == null) 33 return MessageFormat.format(text, objects);34 return i18n.tr(text, objects);33 return filter(MessageFormat.format(text, objects)); 34 return filter(i18n.tr(text, objects)); 35 35 } 36 36 37 37 public static final String tr(String text) { 38 38 if (i18n == null) 39 return text;40 return i18n.tr(text);39 return filter(text); 40 return filter(i18n.tr(text)); 41 41 } 42 42 … … 47 47 public static final String trn(String text, String pluralText, long n, Object... objects) { 48 48 if (i18n == null) 49 return n == 1 ? tr(text, objects) : tr(pluralText, objects);50 return i18n.trn(text, pluralText, n, objects);49 return filter(n == 1 ? tr(text, objects) : tr(pluralText, objects)); 50 return filter(i18n.trn(text, pluralText, n, objects)); 51 51 } 52 52 53 53 public static final String trn(String text, String pluralText, long n) { 54 54 if (i18n == null) 55 return n == 1 ? tr(text) : tr(pluralText); 56 return i18n.trn(text, pluralText, n); 55 return filter(n == 1 ? tr(text) : tr(pluralText)); 56 return filter(i18n.trn(text, pluralText, n)); 57 } 58 59 public static final String filter(String text) 60 { 61 int i; 62 if(text.startsWith("~") && (i = text.indexOf(":")) >= 0) 63 return text.substring(i+1); 64 return text; 57 65 } 58 66
Note:
See TracChangeset
for help on using the changeset viewer.