From e1c3a665b4fb9aa1478f2a85102398ad6a1414e4 Mon Sep 17 00:00:00 2001
From: chihchun <rex.cc.tsai@gmail.com>
Date: Fri, 10 Jan 2014 14:13:50 +0800
Subject: [PATCH] Fix #9560 - only use MessageFormat.format when needed.
---
src/org/openstreetmap/josm/tools/I18n.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/org/openstreetmap/josm/tools/I18n.java b/src/org/openstreetmap/josm/tools/I18n.java
index dafda2f..d8d4fd0 100644
a
|
b
|
public final class I18n {
|
154 | 154 | */ |
155 | 155 | public static final String tr(String text, Object... objects) { |
156 | 156 | if (text == null) return null; |
157 | | return MessageFormat.format(gettext(text, null), objects); |
| 157 | if(objects.length == 0) |
| 158 | return gettext(text, null); |
| 159 | else |
| 160 | return MessageFormat.format(gettext(text, null), objects); |
158 | 161 | } |
159 | 162 | |
160 | 163 | /** |