Changes between Version 6 and Version 7 of DevelopersGuide/StyleGuide
- Timestamp:
- 2009-05-29T21:46:58+02:00 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DevelopersGuide/StyleGuide
v6 v7 23 23 import import static org.openstreetmap.josm.tools.I18n.tr; 24 24 25 threw new Exception(tr("error message always in tr")); 25 threw new Exception(tr("error message always in tr()")); 26 26 27 new JLab le(tr("Lablealways intr"));27 new JLabel(tr("Label always in tr()")); 28 28 29 // etc. 29 // etc. 30 30 }}} 31 31 32 32 33 33 * never assemble localized messages with {{{+}}}. Use format 34 placeholders instead. 34 placeholders instead. 35 35 36 36 '''DONT''' 37 {{{new JLab le(tr("My Label " + labelId));}}}37 {{{new JLabel(tr("My Label " + labelId));}}} 38 38 39 39 40 40 '''DO''' 41 {{{new JLab le(tr("My Label {0}",labelId));}}}41 {{{new JLabel(tr("My Label {0}",labelId));}}} 42 42 43 43 Only exception: {{{+}}} can be used to break long lines of non-variable texts.