diff --git a/src/org/openstreetmap/josm/tools/I18n.java b/src/org/openstreetmap/josm/tools/I18n.java
index 03aaf9a..03d5daf 100644
|
a
|
b
|
public class I18n {
|
| 146 | 146 | * @see #trnc |
| 147 | 147 | */ |
| 148 | 148 | public static final String tr(String text, Object... objects) { |
| | 149 | if (text == null) |
| | 150 | return null; |
| 149 | 151 | return MessageFormat.format(gettext(text, null), objects); |
| 150 | 152 | } |
| 151 | 153 | |
| … |
… |
public class I18n {
|
| 219 | 221 | * @see #trnc |
| 220 | 222 | */ |
| 221 | 223 | public static final String trn(String singularText, String pluralText, long n, Object... objects) { |
| 222 | | return MessageFormat.format(gettextn(singularText, pluralText, null, n), objects); |
| | 224 | String text = gettextn(singularText, pluralText, null, n); |
| | 225 | if (text == null) |
| | 226 | return null; |
| | 227 | return MessageFormat.format(text, objects); |
| 223 | 228 | } |
| 224 | 229 | |
| 225 | 230 | /** |
| … |
… |
public class I18n {
|
| 246 | 251 | * @see #trn |
| 247 | 252 | */ |
| 248 | 253 | public static final String trnc(String context, String singularText, String pluralText, long n, Object... objects) { |
| 249 | | return MessageFormat.format(gettextn(singularText, pluralText, context, n), objects); |
| | 254 | String text = gettextn(singularText, pluralText, context, n); |
| | 255 | if (text == null) |
| | 256 | return null; |
| | 257 | return MessageFormat.format(text, objects); |
| 250 | 258 | } |
| 251 | 259 | |
| 252 | 260 | private static final String gettext(String text, String ctx, boolean lazy) |
| … |
… |
public class I18n {
|
| 283 | 291 | |
| 284 | 292 | private static final String gettextn(String text, String plural, String ctx, long num) |
| 285 | 293 | { |
| | 294 | if (text == null) |
| | 295 | return null; |
| 286 | 296 | int i; |
| 287 | 297 | if(ctx == null && text.startsWith("_:") && (i = text.indexOf("\n")) >= 0) |
| 288 | 298 | { |