Revision 38806 branches/v2_0_0_prep/libraries/libInternationalization/src/org/gvsig/i18n/Messages.java

View differences:

Messages.java
154 154
		}
155 155
		return translation;
156 156
	}
157
	
158
	public static String translate(String message, String[] args) {
159
		String msg = message;
160
		if (msg == null) {
161
			return "";
162
		}
163
		msg = getText(msg, args);
164
		if (msg == null) {
165
			msg = "_" + message.replace("_", " ");
166
		}
167
		return msg;
168
	}
157 169

  
170
	public static String translate(String message) {
171
		String msg = message;
172
		if (msg == null) {
173
			return "";
174
		}
175
		msg = getText(msg, (String[]) null);
176
		if (msg == null) {
177
			msg = "_" + message.replace("_", " ");
178
		}
179
		return msg;
180
	}
181

  
158 182
	/**
159 183
	 * <p>Gets the localized message associated with the provided key.
160 184
	 * If the key is not in the dictionary or the translation is empty,
......
173 197
		return getText(key, arguments, _CLASSNAME);
174 198
	}
175 199

  
200
	
176 201
	/**
177 202
	 * <p>Gets the localized message associated with the provided key.
178 203
	 * If the key is not in the dictionary or the translation is empty,

Also available in: Unified diff