Changeset 2179 in josm for trunk/src/org/openstreetmap/josm/tools/I18n.java
- Timestamp:
- 2009-09-21T12:19:11+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/I18n.java
r2177 r2179 31 31 public static final String tr(String text, Object... objects) { 32 32 if (i18n == null) 33 return filter(MessageFormat.format(text, objects));33 return MessageFormat.format(filter(text), objects); 34 34 return filter(i18n.tr(text, objects)); 35 35 } … … 41 41 } 42 42 43 public static final String trc(String ctx, String text) { 44 if (i18n == null) 45 return text; 46 return i18n.trc(ctx, text); 47 } 48 43 49 public static final String marktr(String text) { 44 50 return text; … … 47 53 public static final String trn(String text, String pluralText, long n, Object... objects) { 48 54 if (i18n == null) 49 return filter(n == 1 ? tr(text, objects) : tr(pluralText, objects));55 return n == 1 ? tr(text, objects) : tr(pluralText, objects); 50 56 return filter(i18n.trn(text, pluralText, n, objects)); 51 57 } … … 53 59 public static final String trn(String text, String pluralText, long n) { 54 60 if (i18n == null) 55 return filter(n == 1 ? tr(text) : tr(pluralText));61 return n == 1 ? tr(text) : tr(pluralText); 56 62 return filter(i18n.trn(text, pluralText, n)); 63 } 64 65 public static final String trnc(String ctx, String text, String pluralText, long n, Object... objects) { 66 if (i18n == null) 67 return n == 1 ? tr(text, objects) : tr(pluralText, objects); 68 return i18n.trnc(ctx, text, pluralText, n, objects); 69 } 70 71 public static final String trnc(String ctx, String text, String pluralText, long n) { 72 if (i18n == null) 73 return n == 1 ? tr(text) : tr(pluralText); 74 return i18n.trnc(ctx, text, pluralText, n); 57 75 } 58 76
Note:
See TracChangeset
for help on using the changeset viewer.