You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by lu...@apache.org on 2012/02/15 21:47:21 UTC
svn commit: r1244705 - in /commons/proper/math/trunk/src:
main/java/org/apache/commons/math3/exception/util/
main/resources/META-INF/localization/ main/resources/assets/
main/resources/assets/org/ main/resources/assets/org/apache/
main/resources/assets...
Author: luc
Date: Wed Feb 15 20:47:20 2012
New Revision: 1244705
URL: http://svn.apache.org/viewvc?rev=1244705&view=rev
Log:
Moved resources for error messages translations out of META-INF.
Added:
commons/proper/math/trunk/src/main/resources/assets/
commons/proper/math/trunk/src/main/resources/assets/org/
commons/proper/math/trunk/src/main/resources/assets/org/apache/
commons/proper/math/trunk/src/main/resources/assets/org/apache/commons/
commons/proper/math/trunk/src/main/resources/assets/org/apache/commons/math3/
commons/proper/math/trunk/src/main/resources/assets/org/apache/commons/math3/exception/
commons/proper/math/trunk/src/main/resources/assets/org/apache/commons/math3/exception/util/
commons/proper/math/trunk/src/main/resources/assets/org/apache/commons/math3/exception/util/LocalizedFormats_fr.properties (contents, props changed)
- copied, changed from r1244703, commons/proper/math/trunk/src/main/resources/META-INF/localization/LocalizedFormats_fr.properties
Removed:
commons/proper/math/trunk/src/main/resources/META-INF/localization/LocalizedFormats_fr.properties
Modified:
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/exception/util/LocalizedFormats.java
commons/proper/math/trunk/src/site/xdoc/changes.xml
commons/proper/math/trunk/src/test/java/org/apache/commons/math3/exception/util/LocalizedFormatsTest.java
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/exception/util/LocalizedFormats.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/exception/util/LocalizedFormats.java?rev=1244705&r1=1244704&r2=1244705&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/exception/util/LocalizedFormats.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/exception/util/LocalizedFormats.java Wed Feb 15 20:47:20 2012
@@ -376,8 +376,9 @@ public enum LocalizedFormats implements
/** {@inheritDoc} */
public String getLocalizedString(final Locale locale) {
try {
+ final String path = LocalizedFormats.class.getName().replaceAll("\\.", "/");
ResourceBundle bundle =
- ResourceBundle.getBundle("META-INF/localization/LocalizedFormats", locale);
+ ResourceBundle.getBundle("assets/" + path, locale);
if (bundle.getLocale().getLanguage().equals(locale.getLanguage())) {
// the value of the resource is the translated format
return bundle.getString(toString());
Copied: commons/proper/math/trunk/src/main/resources/assets/org/apache/commons/math3/exception/util/LocalizedFormats_fr.properties (from r1244703, commons/proper/math/trunk/src/main/resources/META-INF/localization/LocalizedFormats_fr.properties)
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/resources/assets/org/apache/commons/math3/exception/util/LocalizedFormats_fr.properties?p2=commons/proper/math/trunk/src/main/resources/assets/org/apache/commons/math3/exception/util/LocalizedFormats_fr.properties&p1=commons/proper/math/trunk/src/main/resources/META-INF/localization/LocalizedFormats_fr.properties&r1=1244703&r2=1244705&rev=1244705&view=diff
==============================================================================
(empty)
Propchange: commons/proper/math/trunk/src/main/resources/assets/org/apache/commons/math3/exception/util/LocalizedFormats_fr.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: commons/proper/math/trunk/src/main/resources/assets/org/apache/commons/math3/exception/util/LocalizedFormats_fr.properties
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Modified: commons/proper/math/trunk/src/site/xdoc/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/site/xdoc/changes.xml?rev=1244705&r1=1244704&r2=1244705&view=diff
==============================================================================
--- commons/proper/math/trunk/src/site/xdoc/changes.xml (original)
+++ commons/proper/math/trunk/src/site/xdoc/changes.xml Wed Feb 15 20:47:20 2012
@@ -52,6 +52,10 @@ The <action> type attribute can be add,u
If the output is not quite correct, check for invisible trailing spaces!
-->
<release version="3.0" date="TBD" description="TBD">
+ <action dev="luc" type="update">
+ Resources for error messages translations have been moved out of META-INF
+ folder in the jar, to avoid interferences with some build systems
+ </action>
<action dev="erans" type="fix" issue="MATH-744" due-to="Thundre">
Fixed "doubleValue" and "floatValue" method in "BigFraction" when
numerator and denominator are larger than the range of the
Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/exception/util/LocalizedFormatsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/exception/util/LocalizedFormatsTest.java?rev=1244705&r1=1244704&r2=1244705&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/exception/util/LocalizedFormatsTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/exception/util/LocalizedFormatsTest.java Wed Feb 15 20:47:20 2012
@@ -41,9 +41,10 @@ public class LocalizedFormatsTest {
@Test
public void testAllKeysPresentInPropertiesFiles() {
+ final String path = LocalizedFormats.class.getName().replaceAll("\\.", "/");
for (final String language : new String[] { "fr" } ) {
ResourceBundle bundle =
- ResourceBundle.getBundle("META-INF/localization/LocalizedFormats", new Locale(language));
+ ResourceBundle.getBundle("assets/" + path, new Locale(language));
for (LocalizedFormats message : LocalizedFormats.values()) {
final String messageKey = message.toString();
boolean keyPresent = false;
@@ -60,9 +61,10 @@ public class LocalizedFormatsTest {
@Test
public void testAllPropertiesCorrespondToKeys() {
+ final String path = LocalizedFormats.class.getName().replaceAll("\\.", "/");
for (final String language : new String[] { "fr" } ) {
ResourceBundle bundle =
- ResourceBundle.getBundle("META-INF/localization/LocalizedFormats", new Locale(language));
+ ResourceBundle.getBundle("assets/" + path, new Locale(language));
for (final Enumeration<String> keys = bundle.getKeys(); keys.hasMoreElements();) {
final String propertyKey = keys.nextElement();
try {