Changeset 2179 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2009-09-21T12:19:11+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/Filters.java
r2177 r2179 2 2 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 import static org.openstreetmap.josm.tools.I18n.trc; 4 5 5 6 import javax.swing.table.AbstractTableModel; … … 140 141 public String getColumnName(int column){ 141 142 String[] names = { /* translators notes must be in front */ 142 /* column header: enable filter */ tr(" _: filter\nE"),143 /* column header: enable filter */ tr("filter","E"), 143 144 /* column header: hide filter */ tr("H"), 144 145 /* column header: filter text */ tr("Text"), -
trunk/src/org/openstreetmap/josm/gui/layer/RawGpsLayer.java
r2178 r2179 5 5 import static org.openstreetmap.josm.tools.I18n.tr; 6 6 import static org.openstreetmap.josm.tools.I18n.trn; 7 import static org.openstreetmap.josm.tools.I18n.trnc; 7 8 8 9 import java.awt.Color; … … 156 157 points += c.size(); 157 158 } 158 String tool = data.size()+" "+trn ("_: gps\ntrack", "_: gps\ntracks", data.size())159 String tool = data.size()+" "+trnc("gps", "track", "tracks", data.size()) 159 160 +" "+points+" "+trn("point", "points", points); 160 161 File f = getAssociatedFile(); -
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.