labs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simo...@apache.org
Subject svn commit: r762795 - /labs/magma/trunk/foundation-i18n/src/main/java/org/apache/magma/i18n/I18nRenderingHelper.java
Date Tue, 07 Apr 2009 14:38:08 GMT
Author: simoneg
Date: Tue Apr  7 14:38:08 2009
New Revision: 762795

URL: http://svn.apache.org/viewvc?rev=762795&view=rev
Log:
LABS-334 : added a new tr() method supporting placeholders

Modified:
    labs/magma/trunk/foundation-i18n/src/main/java/org/apache/magma/i18n/I18nRenderingHelper.java

Modified: labs/magma/trunk/foundation-i18n/src/main/java/org/apache/magma/i18n/I18nRenderingHelper.java
URL: http://svn.apache.org/viewvc/labs/magma/trunk/foundation-i18n/src/main/java/org/apache/magma/i18n/I18nRenderingHelper.java?rev=762795&r1=762794&r2=762795&view=diff
==============================================================================
--- labs/magma/trunk/foundation-i18n/src/main/java/org/apache/magma/i18n/I18nRenderingHelper.java
(original)
+++ labs/magma/trunk/foundation-i18n/src/main/java/org/apache/magma/i18n/I18nRenderingHelper.java
Tue Apr  7 14:38:08 2009
@@ -19,6 +19,17 @@
 	public String tr(String message) {
 		return new LocalizableString(message).toString();
 	}
+
+	/**
+	 * Translates the given message, replacing placeholders with values.
+	 * @param message The message to translate
+	 * @param values The values to use in placeholders
+	 * @return the translated message
+	 */
+	public String tr(String message, Object... values) {
+		return new LocalizableString(message, values).toString();
+	}
+	
 	
 	/**
 	 * Formats the given date correctly for the current locale



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org


Mime
View raw message