commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r955423 [6/6] - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/ main/java/org/apache/commons/math/analysis/integration/ main/java/org/apache/commons/math/analysis/interpolation/ main/java/org/apache/commons/math/analys...
Date Wed, 16 Jun 2010 23:03:42 GMT
Added: commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/LocalizedFormats.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/LocalizedFormats.java?rev=955423&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/LocalizedFormats.java (added)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/LocalizedFormats.java Wed Jun 16 23:03:38 2010
@@ -0,0 +1,314 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.math.util;
+
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * Enumeration for localized messages formats used for exemple
+ * in exceptions messages.
+ * <p>
+ * The constants in this enumeration represent the available
+ * formats as localized strings. These formats are intended to be
+ * localized using simple properties files, using the constant
+ * name as the key and the property value as the message format.
+ * The source English format is provided in the constants themselves
+ * to serve both as a reminder for developers to understand the parameters
+ * needed by each format, as a basis for translators to create
+ * localized properties files, and as a default format if some
+ * translation is missing.
+ * </p>
+ * @since 2.1
+ * @version $Revision$ $Date$
+ */
+public enum LocalizedFormats implements Localizable {
+
+    // CHECKSTYLE: stop MultipleVariableDeclarations
+
+    ARGUMENT_OUTSIDE_DOMAIN("Argument {0} outside domain [{1} ; {2}]"),
+    ARRAY_SIZES_SHOULD_HAVE_DIFFERENCE_1("array sizes should have difference 1 ({0} != {1} + 1)"),
+    ASSYMETRIC_EIGEN_NOT_SUPPORTED("eigen decomposition of assymetric matrices not supported yet"),
+    AT_LEAST_ONE_COLUMN("matrix must have at least one column"),
+    AT_LEAST_ONE_ROW("matrix must have at least one row"),
+    BANDWIDTH_OUT_OF_INTERVAL("bandwidth must be in the interval [0,1], but got {0}"),
+    BINOMIAL_INVALID_PARAMETERS_ORDER("must have n >= k for binomial coefficient (n,k), got n = {0}, k = {1}"),
+    BINOMIAL_NEGATIVE_PARAMETER("must have n >= 0 for binomial coefficient (n,k), got n = {0}"),
+    CANNOT_CLEAR_STATISTIC_CONSTRUCTED_FROM_EXTERNAL_MOMENTS("statistics constructed from external moments cannot be cleared"),
+    CANNOT_COMPUTE_0TH_ROOT_OF_UNITY("cannot compute 0-th root of unity, indefinite result"),
+    CANNOT_COMPUTE_NTH_ROOT_FOR_NEGATIVE_N("cannot compute nth root for null or negative n: {0}"),
+    CANNOT_CONVERT_OBJECT_TO_FRACTION("cannot convert given object to a fraction number: {0}"),
+    CANNOT_DISCARD_NEGATIVE_NUMBER_OF_ELEMENTS("cannot discard a negative number of elements ({0})"),
+    CANNOT_FORMAT_INSTANCE_AS_3D_VECTOR("cannot format a {0} instance as a 3D vector"),
+    CANNOT_FORMAT_INSTANCE_AS_COMPLEX("cannot format a {0} instance as a complex number"),
+    CANNOT_FORMAT_INSTANCE_AS_REAL_VECTOR("cannot format a {0} instance as a real vector"),
+    CANNOT_FORMAT_OBJECT_TO_FRACTION("cannot format given object as a fraction number"),
+    CANNOT_INCREMENT_STATISTIC_CONSTRUCTED_FROM_EXTERNAL_MOMENTS("statistics constructed from external moments cannot be incremented"),
+    CANNOT_NORMALIZE_A_ZERO_NORM_VECTOR("cannot normalize a zero norm vector"),
+    CANNOT_RETRIEVE_AT_NEGATIVE_INDEX("elements cannot be retrieved from a negative array index {0}"),
+    CANNOT_SET_AT_NEGATIVE_INDEX("cannot set an element at a negative index {0}"),
+    CANNOT_SUBSTITUTE_ELEMENT_FROM_EMPTY_ARRAY("cannot substitute an element from an empty array"),
+    CANNOT_TRANSFORM_TO_DOUBLE("Conversion Exception in Transformation: {0}"),
+    CARDAN_ANGLES_SINGULARITY("Cardan angles singularity"),
+    CLASS_DOESNT_IMPLEMENT_COMPARABLE("class ({0}) does not implement Comparable"),
+    CLOSEST_ORTHOGONAL_MATRIX_HAS_NEGATIVE_DETERMINANT("the closest orthogonal matrix has a negative determinant {0}"),
+    COLUMN_INDEX_OUT_OF_RANGE("column index {0} out of allowed range [{1}, {2}]"),
+    CONTINUED_FRACTION_INFINITY_DIVERGENCE("Continued fraction convergents diverged to +/- infinity for value {0}"),
+    CONTINUED_FRACTION_NAN_DIVERGENCE("Continued fraction diverged to NaN for value {0}"),
+    CONTRACTION_CRITERIA_SMALLER_THAN_EXPANSION_FACTOR("contraction criteria ({0}) smaller than the expansion factor ({1}).  This would lead to a never ending loop of expansion and contraction as a newly expanded internal storage array would immediately satisfy the criteria for contraction."),
+    CONTRACTION_CRITERIA_SMALLER_THAN_ONE("contraction criteria smaller than one ({0}).  This would lead to a never ending loop of expansion and contraction as an internal storage array length equal to the number of elements would satisfy the contraction criteria."),
+    CONVERGENCE_FAILED("convergence failed"),
+    CUMULATIVE_PROBABILITY_RETURNED_NAN("Cumulative probability function returned NaN for argument {0} p = {1}"),
+    DIFFERENT_ROWS_LENGTHS("some rows have length {0} while others have length {1}"),
+    DIGEST_NOT_INITIALIZED("digest not initialized"),
+    DIMENSIONS_MISMATCH_2x2("dimensions mismatch: got {0}x{1} but expected {2}x{3}"),
+    DIMENSIONS_MISMATCH_SIMPLE("dimensions mismatch {0} != {1}"),
+    DISCRETE_CUMULATIVE_PROBABILITY_RETURNED_NAN("Discrete cumulative probability function returned NaN for argument {0}"),
+    DISTRIBUTION_NOT_LOADED("distribution not loaded"),
+    DUPLICATED_ABSCISSA("Abscissa {0} is duplicated at both indices {1} and {2}"),
+    EMPTY_POLYNOMIALS_COEFFICIENTS_ARRAY("empty polynomials coefficients array"),
+    EMPTY_SELECTED_COLUMN_INDEX_ARRAY("empty selected column index array"),
+    EMPTY_SELECTED_ROW_INDEX_ARRAY("empty selected row index array"),
+    EMPTY_STRING_FOR_IMAGINARY_CHARACTER("empty string for imaginary character"),
+    ENDPOINTS_NOT_AN_INTERVAL("endpoints do not specify an interval: [{0}, {1}]"),
+    EQUAL_VERTICES_IN_SIMPLEX("equal vertices {0} and {1} in simplex configuration"),
+    EULER_ANGLES_SINGULARITY("Euler angles singularity"),
+    EVALUATION_FAILED("evaluation failed for argument = {0}"),
+    EXPANSION_FACTOR_SMALLER_THAN_ONE("expansion factor smaller than one ({0})"),
+    FACTORIAL_NEGATIVE_PARAMETER("must have n >= 0 for n!, got n = {0}"),
+    FAILED_BRACKETING("number of iterations={0}, maximum iterations={1}, initial={2}, lower bound={3}, upper bound={4}, final a value={5}, final b value={6}, f(a)={7}, f(b)={8}"),
+    FAILED_FRACTION_CONVERSION("Unable to convert {0} to fraction after {1} iterations"),
+    FIRST_COLUMNS_NOT_INITIALIZED_YET("first {0} columns are not initialized yet"),
+    FIRST_ELEMENT_NOT_ZERO("first element is not 0: {0}"),
+    FIRST_ROWS_NOT_INITIALIZED_YET("first {0} rows are not initialized yet"),
+    FRACTION_CONVERSION_OVERFLOW("Overflow trying to convert {0} to fraction ({1}/{2})"),
+    FUNCTION_NOT_DIFFERENTIABLE("function is not differentiable"),
+    FUNCTION_NOT_POLYNOMIAL("function is not polynomial"),
+    GCD_OVERFLOW_32_BITS("overflow: gcd({0}, {1}) is 2^31"),
+    GCD_OVERFLOW_64_BITS("overflow: gcd({0}, {1}) is 2^63"),
+    HOLE_BETWEEN_MODELS_TIME_RANGES("{0} wide hole between models time ranges"),
+    IDENTICAL_ABSCISSAS_DIVISION_BY_ZERO("identical abscissas x[{0}] == x[{1}] == {2} cause division by zero"),
+    INDEX_LARGER_THAN_MAX("the index specified: {0} is larger than the current maximal index {1}"),
+    INDEX_NOT_POSITIVE("index ({0}) is not positive"),
+    INDEX_OUT_OF_RANGE("index {0} out of allowed range [{1}, {2}]"),
+    INFINITE_ARRAY_ELEMENT("Array contains an infinite element, {0} at index {1}"),
+    INFINITE_VALUE_CONVERSION("cannot convert infinite value"),
+    INITIAL_CAPACITY_NOT_POSITIVE("initial capacity ({0}) is not positive"),
+    INITIAL_COLUMN_AFTER_FINAL_COLUMN("initial column {0} after final column {1}"),
+    INITIAL_ROW_AFTER_FINAL_ROW("initial row {0} after final row {1}"),
+    INPUT_DATA_FROM_UNSUPPORTED_DATASOURCE("input data comes from unsupported datasource: {0}, supported sources: {1}, {2}"),
+    INSTANCES_NOT_COMPARABLE_TO_EXISTING_VALUES("instance of class {0} not comparable to existing values"),
+    INSUFFICIENT_DATA_FOR_T_STATISTIC("insufficient data for t statistic, needs at least 2, got {0}"),
+    INSUFFICIENT_DIMENSION("insufficient dimension {0}, must be at least {1}"),
+    INSUFFICIENT_OBSERVED_POINTS_IN_SAMPLE("sample contains {0} observed points, at least {1} are required"),
+    INSUFFICIENT_ROWS_AND_COLUMNS("insufficient data: only {0} rows and {1} columns."),
+    INTEGRATION_METHOD_NEEDS_AT_LEAST_ONE_PREVIOUS_POINT("{0} method needs at least one previous point"),
+    INTERNAL_ERROR("internal error, please fill a bug report at {0}"),
+    INVALID_BRACKETING_PARAMETERS("invalid bracketing parameters:  lower bound={0},  initial={1}, upper bound={2}"),
+    INVALID_INTERVAL_INITIAL_VALUE_PARAMETERS("invalid interval, initial value parameters:  lower={0}, initial={1}, upper={2}"),
+    INVALID_ITERATIONS_LIMITS("invalid iteration limits: min={0}, max={1}"),
+    INVALID_MAX_ITERATIONS("bad value for maximum iterations number: {0}"),
+    INVALID_ROUNDING_METHOD("invalid rounding method {0}, valid methods: {1} ({2}), {3} ({4}), {5} ({6}), {7} ({8}), {9} ({10}), {11} ({12}), {13} ({14}), {15} ({16})"),
+    ITERATOR_EXHAUSTED("iterator exhausted"),
+    LCM_OVERFLOW_32_BITS("overflow: lcm({0}, {1}) is 2^31"),
+    LCM_OVERFLOW_64_BITS("overflow: lcm({0}, {1}) is 2^63"),
+    LOESS_EXPECTS_AT_LEAST_ONE_POINT("Loess expects at least 1 point"),
+    LOWER_BOUND_NOT_BELOW_UPPER_BOUND("upper bound ({0}) must be greater than lower bound ({1})"),
+    LOWER_ENDPOINT_ABOVE_UPPER_ENDPOINT("lower endpoint ({0}) must be less than or equal to upper endpoint ({1})"),
+    MAP_MODIFIED_WHILE_ITERATING("map has been modified while iterating"),
+    MAX_EVALUATIONS_EXCEEDED("maximal number of evaluations ({0}) exceeded"),
+    MAX_ITERATIONS_EXCEEDED("maximal number of iterations ({0}) exceeded"),
+    MINIMAL_STEPSIZE_REACHED_DURING_INTEGRATION("minimal step size ({0,number,0.00E00}) reached, integration needs {1,number,0.00E00}"),
+    MISMATCHED_LOESS_ABSCISSA_ORDINATE_ARRAYS("Loess expects the abscissa and ordinate arrays to be of the same size, but got {0} abscissae and {1} ordinatae"),
+    NAN_VALUE_CONVERSION("cannot convert NaN value"),
+    NEGATIVE_BRIGHTNESS_EXPONENT("brightness exponent should be positive or null, but got {0}"),
+    NEGATIVE_COMPLEX_MODULE("negative complex module {0}"),
+    NEGATIVE_ELEMENT_AT_2D_INDEX("element ({0}, {1}) is negative: {2}"),
+    NEGATIVE_ELEMENT_AT_INDEX("element {0} is negative: {1}"),
+    NEGATIVE_LENGTH("length cannot be negative ({0})"),
+    NEGATIVE_NUMBER_OF_SUCCESSES("number of successes must be non-negative ({0})"),
+    NEGATIVE_NUMBER_OF_TRIALS("number of trials must be non-negative ({0})"),
+    NEGATIVE_ROBUSTNESS_ITERATIONS("the number of robustness iterations must be non-negative, but got {0}"),
+    NEGATIVE_START_POSITION("start position cannot be negative ({0})"),
+    NON_CONVERGENT_CONTINUED_FRACTION("Continued fraction convergents failed to converge for value {0}"),
+    NON_POSITIVE_MICROSPHERE_ELEMENTS("number of microsphere elements must be positive, but got {0}"),
+    NON_POSITIVE_POLYNOMIAL_DEGREE("polynomial degree must be positive: degree={0}"),
+    NON_REAL_FINITE_ABSCISSA("all abscissae must be finite real numbers, but {0}-th is {1}"),
+    NON_REAL_FINITE_ORDINATE("all ordinatae must be finite real numbers, but {0}-th is {1}"),
+    NON_REAL_FINITE_WEIGHT("all weights must be finite real numbers, but {0}-th is {1}"),
+    NON_SQUARE_MATRIX("a {0}x{1} matrix was provided instead of a square matrix"),
+    NORMALIZE_INFINITE("Cannot normalize to an infinite value"),
+    NORMALIZE_NAN("Cannot normalize to NaN"),
+    NOT_ADDITION_COMPATIBLE_MATRICES("{0}x{1} and {2}x{3} matrices are not addition compatible"),
+    NOT_DECREASING_NUMBER_OF_POINTS("points {0} and {1} are not decreasing ({2} < {3})"),
+    NOT_ENOUGH_DATA_FOR_NUMBER_OF_PREDICTORS("not enough data ({0} rows) for this many predictors ({1} predictors)"),
+    NOT_ENOUGH_POINTS_IN_SPLINE_PARTITION("spline partition must have at least {0} points, got {1}"),
+    NOT_INCREASING_NUMBER_OF_POINTS("points {0} and {1} are not increasing ({2} > {3})"),
+    NOT_MULTIPLICATION_COMPATIBLE_MATRICES("{0}x{1} and {2}x{3} matrices are not multiplication compatible"),
+    NOT_POSITIVE_ALPHA("alpha must be positive ({0})"),
+    NOT_POSITIVE_BETA("beta must be positive ({0})"),
+    NOT_POSITIVE_COLUMNDIMENSION("invalid column dimension: {0} (must be positive)"),
+    NOT_POSITIVE_DEFINITE_MATRIX("not positive definite matrix"),
+    NOT_POSITIVE_DEGREES_OF_FREEDOM("degrees of freedom must be positive ({0})"),
+    NOT_POSITIVE_ELEMENT_AT_INDEX("element {0} is not positive: {1}"),
+    NOT_POSITIVE_EXPONENT("invalid exponent {0} (must be positive)"),
+    NOT_POSITIVE_LENGTH("length must be positive ({0})"),
+    NOT_POSITIVE_MEAN("mean must be positive ({0})"),
+    NOT_POSITIVE_NUMBER_OF_SAMPLES("number of sample is not positive: {0}"),
+    NOT_POSITIVE_PERMUTATION("permutation k ({0}) must be positive"),
+    NOT_POSITIVE_POISSON_MEAN("the Poisson mean must be positive ({0})"),
+    NOT_POSITIVE_POPULATION_SIZE("population size must be positive ({0})"),
+    NOT_POSITIVE_ROW_DIMENSION("invalid row dimension: {0} (must be positive)"),
+    NOT_POSITIVE_SAMPLE_SIZE("sample size must be positive ({0})"),
+    NOT_POSITIVE_SCALE("scale must be positive ({0})"),
+    NOT_POSITIVE_SHAPE("shape must be positive ({0})"),
+    NOT_POSITIVE_STANDARD_DEVIATION("standard deviation must be positive ({0})"),
+    NOT_POSITIVE_UPPER_BOUND("upper bound must be positive ({0})"),
+    NOT_POSITIVE_WINDOW_SIZE("window size must be positive ({0})"),
+    NOT_POWER_OF_TWO("{0} is not a power of 2"),
+    NOT_POWER_OF_TWO_CONSIDER_PADDING("{0} is not a power of 2, consider padding for fix"),
+    NOT_POWER_OF_TWO_PLUS_ONE("{0} is not a power of 2 plus one"),
+    NOT_STRICTLY_DECREASING_NUMBER_OF_POINTS("points {0} and {1} are not strictly decreasing ({2} <= {3})"),
+    NOT_STRICTLY_INCREASING_KNOT_VALUES("knot values must be strictly increasing"),
+    NOT_STRICTLY_INCREASING_NUMBER_OF_POINTS("points {0} and {1} are not strictly increasing ({2} >= {3})"),
+    NOT_SUBTRACTION_COMPATIBLE_MATRICES("{0}x{1} and {2}x{3} matrices are not subtraction compatible"),
+    NOT_SYMMETRIC_MATRIX("not symmetric matrix"),
+    NO_BIN_SELECTED("no bin selected"),
+    NO_CONVERGENCE_WITH_ANY_START_POINT("none of the {0} start points lead to convergence"),
+    NO_DATA("no data"),
+    NO_DEGREES_OF_FREEDOM("no degrees of freedom ({0} measurements, {1} parameters)"),
+    NO_DENSITY_FOR_THIS_DISTRIBUTION("This distribution does not have a density function implemented"),
+    NO_FEASIBLE_SOLUTION("no feasible solution"),
+    NO_OPTIMUM_COMPUTED_YET("no optimum computed yet"),
+    NO_RESULT_AVAILABLE("no result available"),
+    NO_SUCH_MATRIX_ENTRY("no entry at indices ({0}, {1}) in a {2}x{3} matrix"),
+    NULL_COVARIANCE_MATRIX("covariance matrix is null"),
+    NULL_DENOMINATOR("denominator is null"),
+    NULL_DENOMINATOR_FORMAT("denominator format can not be null"),
+    NULL_FRACTION("null fraction"),
+    NULL_FUNCTION("function is null"),
+    NULL_IMAGINARY_FORMAT("null imaginary format"),
+    NULL_INPUT_ARRAY("input values array is null"),
+    NULL_NUMERATOR("numerator is null"),
+    NULL_NUMERATOR_FORMAT("numerator format can not be null"),
+    NULL_OBJECT_TRANSFORMATION("Conversion Exception in Transformation, Object is null"),
+    NULL_REAL_FORMAT("null real format"),
+    NULL_WHOLE_FORMAT("whole format can not be null"),
+    NUMBER_OF_SUCCESS_LARGER_THAN_POPULATION_SIZE("number of successes ({0}) must be less than or equal to population size ({1})"),
+    NUMERATOR_OVERFLOW_AFTER_MULTIPLY("overflow, numerator too large after multiply: {0}"),
+    N_POINTS_GAUSS_LEGENDRE_INTEGRATOR_NOT_SUPPORTED("{0} points Legendre-Gauss integrator not supported, number of points must be in the {1}-{2} range"),
+    OBSERVED_COUNTS_ALL_ZERO("observed counts are all 0 in observed array {0}"),
+    OBSERVED_COUNTS_BOTTH_ZERO_FOR_ENTRY("observed counts are both zero for entry {0}"),
+    OUT_OF_BOUNDS_QUANTILE_VALUE("out of bounds quantile value: {0}, must be in (0, 100]"),
+    OUT_OF_BOUND_SIGNIFICANCE_LEVEL("out of bounds significance level {0}, must be between {1} and {2}"),
+    OUT_OF_ORDER_ABSCISSA_ARRAY("the abscissae array must be sorted in a strictly increasing order, but the {0}-th element is {1} whereas {2}-th is {3}"),
+    OUT_OF_RANGE_ROOT_OF_UNITY_INDEX("out of range root of unity index {0} (must be in [{1};{2}])"),
+    OUT_OF_RANGE_SIMPLE("{0} out of [{1}, {2}] range"),
+    OVERFLOW_IN_FRACTION("overflow in fraction {0}/{1}, cannot negate"),
+    PERCENTILE_IMPLEMENTATION_CANNOT_ACCESS_METHOD("cannot access {0} method in percentile implementation {1}"),
+    PERCENTILE_IMPLEMENTATION_UNSUPPORTED_METHOD("percentile implementation {0} does not support {1}"),
+    PERMUTATION_EXCEEDS_N("permutation k ({0}) exceeds n ({1})"),
+    POLYNOMIAL_INTERPOLANTS_MISMATCH_SEGMENTS("number of polynomial interpolants must match the number of segments ({0} != {1} - 1)"),
+    POSITION_SIZE_MISMATCH_INPUT_ARRAY("position {0} and size {1} don't fit to the size of the input array {2}"),
+    POWER_NEGATIVE_PARAMETERS("cannot raise an integral value to a negative power ({0}^{1})"),
+    PROPAGATION_DIRECTION_MISMATCH("propagation direction mismatch"),
+    ROOTS_OF_UNITY_NOT_COMPUTED_YET("roots of unity have not been computed yet"),
+    ROTATION_MATRIX_DIMENSIONS("a {0}x{1} matrix cannot be a rotation matrix"),
+    ROW_INDEX_OUT_OF_RANGE("row index {0} out of allowed range [{1}, {2}]"),
+    SAME_SIGN_AT_ENDPOINTS("function values at endpoints do not have different signs, endpoints: [{0}, {1}], values: [{2}, {3}]"),
+    SAMPLE_SIZE_EXCEEDS_COLLECTION_SIZE("sample size ({0}) exceeds collection size ({1})"),
+    SAMPLE_SIZE_LARGER_THAN_POPULATION_SIZE("sample size ({0}) must be less than or equal to population size ({1})"),
+    SIMPLEX_NEED_ONE_POINT("simplex must contain at least one point"),
+    SIMPLE_MESSAGE("{0}"),
+    SINGULAR_MATRIX("matrix is singular"),
+    SUBARRAY_ENDS_AFTER_ARRAY_END("subarray ends after array end"),
+    TOO_LARGE_CUTOFF_SINGULAR_VALUE("cutoff singular value is {0}, should be at most {1}"),
+    TOO_MANY_ELEMENTS_TO_DISCARD_FROM_ARRAY("cannot discard {0} elements from a {1} elements array"),
+    TOO_SMALL_BANDWIDTH("the bandwidth must be large enough to accomodate at least 2 points. There are {0}  data points, and bandwidth must be at least {1}  but it is only {2}"),
+    TOO_SMALL_COST_RELATIVE_TOLERANCE("cost relative tolerance is too small ({0}), no further reduction in the sum of squares is possible"),
+    TOO_SMALL_INTEGRATION_INTERVAL("too small integration interval: length = {0}"),
+    TOO_SMALL_ORTHOGONALITY_TOLERANCE("orthogonality tolerance is too small ({0}), solution is orthogonal to the jacobian"),
+    TOO_SMALL_PARAMETERS_RELATIVE_TOLERANCE("parameters relative tolerance is too small ({0}), no further improvement in the approximate solution is possible"),
+    TWO_OR_MORE_CATEGORIES_REQUIRED("two or more categories required, got {0}"),
+    TWO_OR_MORE_VALUES_IN_CATEGORY_REQUIRED("two or more values required in each category, one has {0}"),
+    UNABLE_TO_BRACKET_OPTIMUM_IN_LINE_SEARCH("unable to bracket optimum in line search"),
+    UNABLE_TO_COMPUTE_COVARIANCE_SINGULAR_PROBLEM("unable to compute covariances: singular problem"),
+    UNABLE_TO_FIRST_GUESS_HARMONIC_COEFFICIENTS("unable to first guess the harmonic coefficients"),
+    UNABLE_TO_ORTHOGONOLIZE_MATRIX("unable to orthogonalize matrix in {0} iterations"),
+    UNABLE_TO_PERFORM_QR_DECOMPOSITION_ON_JACOBIAN("unable to perform Q.R decomposition on the {0}x{1} jacobian matrix"),
+    UNABLE_TO_SOLVE_SINGULAR_PROBLEM("unable to solve: singular problem"),
+    UNBOUNDED_SOLUTION("unbounded solution"),
+    UNKNOWN_MODE("unknown mode {0}, known modes: {1} ({2}), {3} ({4}), {5} ({6}), {7} ({8}), {9} ({10}) and {11} ({12})"),
+    UNPARSEABLE_3D_VECTOR("unparseable 3D vector: \"{0}\""),
+    UNPARSEABLE_COMPLEX_NUMBER("unparseable complex number: \"{0}\""),
+    UNPARSEABLE_FRACTION_NUMBER("unparseable fraction number: \"{0}\""),
+    UNPARSEABLE_REAL_VECTOR("unparseable real vector: \"{0}\""),
+    UNSUPPORTED_EXPANSION_MODE("unsupported expansion mode {0}, supported modes are {1} ({2}) and {3} ({4})"),
+    URL_CONTAINS_NO_DATA("URL {0} contains no data"),
+    VALUES_ADDED_BEFORE_CONFIGURING_STATISTIC("{0} values have been added before statistic is configured"),
+    VECTOR_LENGTH_MISMATCH("vector length mismatch: got {0} but expected {1}"),
+    VECTOR_MUST_HAVE_AT_LEAST_ONE_ELEMENT("vector must have at least one element"),
+    WRONG_BLOCK_LENGTH("wrong array shape (block length = {0}, expected {1})"),
+    WRONG_NUMBER_OF_POINTS("{0} points are required, got only {1}"),
+    ZERO_DENOMINATOR("denominator must be different from 0"),
+    ZERO_DENOMINATOR_IN_FRACTION("zero denominator in fraction {0}/{1}"),
+    ZERO_FRACTION_TO_DIVIDE_BY("the fraction to divide by must not be zero: {0}/{1}"),
+    ZERO_NORM("zero norm"),
+    ZERO_NORM_FOR_ROTATION_AXIS("zero norm for rotation axis"),
+    ZERO_NORM_FOR_ROTATION_DEFINING_VECTOR("zero norm for rotation defining vector");
+
+    // CHECKSTYLE: resume MultipleVariableDeclarations
+
+
+    /** Source English format. */
+    private final String sourceFormat;
+
+    /** Simple constructor.
+     * @param sourceFormat source English format to use when no
+     * localized version is available
+     */
+    private LocalizedFormats(final String sourceFormat) {
+        this.sourceFormat = sourceFormat;
+    }
+
+    /** {@inheritDoc} */
+    public String getSourceString() {
+        return sourceFormat;
+    }
+
+    /** {@inheritDoc} */
+    public String getLocalizedString(final Locale locale) {
+        try {
+            ResourceBundle bundle =
+                    ResourceBundle.getBundle("META-INF/localization/LocalizedFormats", locale);
+            if (bundle.getLocale().getLanguage().equals(locale.getLanguage())) {
+                // the value of the resource is the translated format
+                return bundle.getString(toString());
+            }
+
+        } catch (MissingResourceException mre) {
+            // do nothing here
+        }
+
+        // either the locale is not supported or the resource is unknown
+        // don't translate and fall back to using the source format
+        return sourceFormat;
+
+    }
+
+}

Propchange: commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/LocalizedFormats.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/LocalizedFormats.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java?rev=955423&r1=955422&r2=955423&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java Wed Jun 16 23:03:38 2010
@@ -362,12 +362,12 @@ public final class MathUtils {
         throws IllegalArgumentException {
         if (n < k) {
             throw MathRuntimeException.createIllegalArgumentException(
-                "must have n >= k for binomial coefficient (n,k), got n = {0}, k = {1}",
+                LocalizedFormats.BINOMIAL_INVALID_PARAMETERS_ORDER,
                 n, k);
         }
         if (n < 0) {
             throw MathRuntimeException.createIllegalArgumentException(
-                  "must have n >= 0 for binomial coefficient (n,k), got n = {0}",
+                  LocalizedFormats.BINOMIAL_NEGATIVE_PARAMETER,
                   n);
         }
     }
@@ -593,7 +593,7 @@ public final class MathUtils {
     public static long factorial(final int n) {
         if (n < 0) {
             throw MathRuntimeException.createIllegalArgumentException(
-                  "must have n >= 0 for n!, got n = {0}",
+                  LocalizedFormats.FACTORIAL_NEGATIVE_PARAMETER,
                   n);
         }
         if (n > 20) {
@@ -626,7 +626,7 @@ public final class MathUtils {
     public static double factorialDouble(final int n) {
         if (n < 0) {
             throw MathRuntimeException.createIllegalArgumentException(
-                  "must have n >= 0 for n!, got n = {0}",
+                  LocalizedFormats.FACTORIAL_NEGATIVE_PARAMETER,
                   n);
         }
         if (n < 21) {
@@ -651,7 +651,7 @@ public final class MathUtils {
     public static double factorialLog(final int n) {
         if (n < 0) {
             throw MathRuntimeException.createIllegalArgumentException(
-                  "must have n >= 0 for n!, got n = {0}",
+                  LocalizedFormats.FACTORIAL_NEGATIVE_PARAMETER,
                   n);
         }
         if (n < 21) {
@@ -699,7 +699,7 @@ public final class MathUtils {
         if ((u == 0) || (v == 0)) {
             if ((u == Integer.MIN_VALUE) || (v == Integer.MIN_VALUE)) {
                 throw MathRuntimeException.createArithmeticException(
-                        "overflow: gcd({0}, {1}) is 2^31",
+                        LocalizedFormats.GCD_OVERFLOW_32_BITS,
                         p, q);
             }
             return Math.abs(u) + Math.abs(v);
@@ -725,7 +725,7 @@ public final class MathUtils {
         }
         if (k == 31) {
             throw MathRuntimeException.createArithmeticException(
-                    "overflow: gcd({0}, {1}) is 2^31",
+                    LocalizedFormats.GCD_OVERFLOW_32_BITS,
                     p, q);
         }
         // B2. Initialize: u and v have been divided by 2^k and at least
@@ -788,7 +788,7 @@ public final class MathUtils {
         if ((u == 0) || (v == 0)) {
             if ((u == Long.MIN_VALUE) || (v == Long.MIN_VALUE)){
                 throw MathRuntimeException.createArithmeticException(
-                        "overflow: gcd({0}, {1}) is 2^63",
+                        LocalizedFormats.GCD_OVERFLOW_64_BITS,
                         p, q);
             }
             return Math.abs(u) + Math.abs(v);
@@ -814,7 +814,7 @@ public final class MathUtils {
         }
         if (k == 63) {
             throw MathRuntimeException.createArithmeticException(
-                    "overflow: gcd({0}, {1}) is 2^63",
+                    LocalizedFormats.GCD_OVERFLOW_64_BITS,
                     p, q);
         }
         // B2. Initialize: u and v have been divided by 2^k and at least
@@ -964,7 +964,7 @@ public final class MathUtils {
         int lcm = Math.abs(mulAndCheck(a / gcd(a, b), b));
         if (lcm == Integer.MIN_VALUE) {
             throw MathRuntimeException.createArithmeticException(
-                "overflow: lcm({0}, {1}) is 2^31",
+                LocalizedFormats.LCM_OVERFLOW_32_BITS,
                 a, b);
         }
         return lcm;
@@ -999,7 +999,7 @@ public final class MathUtils {
         long lcm = Math.abs(mulAndCheck(a / gcd(a, b), b));
         if (lcm == Long.MIN_VALUE){
             throw MathRuntimeException.createArithmeticException(
-                "overflow: lcm({0}, {1}) is 2^63",
+                LocalizedFormats.LCM_OVERFLOW_64_BITS,
                 a, b);
         }
         return lcm;
@@ -1230,11 +1230,11 @@ public final class MathUtils {
        throws ArithmeticException, IllegalArgumentException {
          if (Double.isInfinite(normalizedSum)) {
              throw MathRuntimeException.createIllegalArgumentException(
-                     "Cannot normalize to an infinite value");
+                     LocalizedFormats.NORMALIZE_INFINITE);
          }
          if (Double.isNaN(normalizedSum)) {
              throw MathRuntimeException.createIllegalArgumentException(
-                     "Cannot normalize to NaN");
+                     LocalizedFormats.NORMALIZE_NAN);
          }
          double sum = 0d;
          final int len = values.length;
@@ -1242,7 +1242,7 @@ public final class MathUtils {
          for (int i = 0; i < len; i++) {
              if (Double.isInfinite(values[i])) {
                  throw MathRuntimeException.createArithmeticException(
-                         "Array contains an infinite element, {0} at index {1}", values[i], i);
+                         LocalizedFormats.INFINITE_ARRAY_ELEMENT, values[i], i);
              }
              if (!Double.isNaN(values[i])) {
                  sum += values[i];
@@ -1588,7 +1588,7 @@ public final class MathUtils {
 
         if (e < 0) {
             throw MathRuntimeException.createIllegalArgumentException(
-                "cannot raise an integral value to a negative power ({0}^{1})",
+                LocalizedFormats.POWER_NEGATIVE_PARAMETERS,
                 k, e);
         }
 
@@ -1618,7 +1618,7 @@ public final class MathUtils {
 
         if (e < 0) {
             throw MathRuntimeException.createIllegalArgumentException(
-                "cannot raise an integral value to a negative power ({0}^{1})",
+                LocalizedFormats.POWER_NEGATIVE_PARAMETERS,
                 k, e);
         }
 
@@ -1648,7 +1648,7 @@ public final class MathUtils {
 
         if (e < 0) {
             throw MathRuntimeException.createIllegalArgumentException(
-                "cannot raise an integral value to a negative power ({0}^{1})",
+                LocalizedFormats.POWER_NEGATIVE_PARAMETERS,
                 k, e);
         }
 
@@ -1678,7 +1678,7 @@ public final class MathUtils {
 
         if (e < 0) {
             throw MathRuntimeException.createIllegalArgumentException(
-                "cannot raise an integral value to a negative power ({0}^{1})",
+                LocalizedFormats.POWER_NEGATIVE_PARAMETERS,
                 k, e);
         }
 
@@ -1708,7 +1708,7 @@ public final class MathUtils {
 
         if (e < 0) {
             throw MathRuntimeException.createIllegalArgumentException(
-                "cannot raise an integral value to a negative power ({0}^{1})",
+                LocalizedFormats.POWER_NEGATIVE_PARAMETERS,
                 k, e);
         }
 
@@ -1728,7 +1728,7 @@ public final class MathUtils {
 
         if (e < 0) {
             throw MathRuntimeException.createIllegalArgumentException(
-                "cannot raise an integral value to a negative power ({0}^{1})",
+                LocalizedFormats.POWER_NEGATIVE_PARAMETERS,
                 k, e);
         }
 
@@ -1758,7 +1758,7 @@ public final class MathUtils {
 
         if (e.compareTo(BigInteger.ZERO) < 0) {
             throw MathRuntimeException.createIllegalArgumentException(
-                "cannot raise an integral value to a negative power ({0}^{1})",
+                LocalizedFormats.POWER_NEGATIVE_PARAMETERS,
                 k, e);
         }
 
@@ -1884,24 +1884,24 @@ public final class MathUtils {
             if (dir > 0) {
                 if (strict) {
                     if (val[i] <= previous) {
-                        throw MathRuntimeException.createIllegalArgumentException("points {0} and {1} are not strictly increasing ({2} >= {3})",
+                        throw MathRuntimeException.createIllegalArgumentException(LocalizedFormats.NOT_STRICTLY_INCREASING_NUMBER_OF_POINTS,
                                                                                   i - 1, i, previous, val[i]);
                     }
                 } else {
                     if (val[i] < previous) {
-                        throw MathRuntimeException.createIllegalArgumentException("points {0} and {1} are not increasing ({2} > {3})",
+                        throw MathRuntimeException.createIllegalArgumentException(LocalizedFormats.NOT_INCREASING_NUMBER_OF_POINTS,
                                                                                   i - 1, i, previous, val[i]);
                     }
                 }
             } else {
                 if (strict) {
                     if (val[i] >= previous) {
-                        throw MathRuntimeException.createIllegalArgumentException("points {0} and {1} are not strictly decreasing ({2} <= {3})",
+                        throw MathRuntimeException.createIllegalArgumentException(LocalizedFormats.NOT_STRICTLY_DECREASING_NUMBER_OF_POINTS,
                                                                                   i - 1, i, previous, val[i]);
                     }
                 } else {
                     if (val[i] > previous) {
-                        throw MathRuntimeException.createIllegalArgumentException("points {0} and {1} are not decreasing ({2} < {3})",
+                        throw MathRuntimeException.createIllegalArgumentException(LocalizedFormats.NOT_DECREASING_NUMBER_OF_POINTS,
                                                                                   i - 1, i, previous, val[i]);
                     }
                 }

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/OpenIntToDoubleHashMap.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/OpenIntToDoubleHashMap.java?rev=955423&r1=955422&r2=955423&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/OpenIntToDoubleHashMap.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/OpenIntToDoubleHashMap.java Wed Jun 16 23:03:38 2010
@@ -50,14 +50,6 @@ public class OpenIntToDoubleHashMap impl
     /** Serializable version identifier */
     private static final long serialVersionUID = -3646337053166149105L;
 
-    /** Message for map modification during iteration. */
-    private static final String CONCURRENT_MODIFICATION_MESSAGE =
-        "map has been modified while iterating";
-
-    /** Message for exhausted iterator. */
-    private static final String EXHAUSTED_ITERATOR_MESSAGE =
-        "iterator exhausted";
-
     /** Load factor for the map. */
     private static final float LOAD_FACTOR = 0.5f;
 
@@ -534,11 +526,10 @@ public class OpenIntToDoubleHashMap impl
         public int key()
             throws ConcurrentModificationException, NoSuchElementException {
             if (referenceCount != count) {
-                throw MathRuntimeException.createConcurrentModificationException(
-                      CONCURRENT_MODIFICATION_MESSAGE);
+                throw MathRuntimeException.createConcurrentModificationException(LocalizedFormats.MAP_MODIFIED_WHILE_ITERATING);
             }
             if (current < 0) {
-                throw MathRuntimeException.createNoSuchElementException(EXHAUSTED_ITERATOR_MESSAGE);
+                throw MathRuntimeException.createNoSuchElementException(LocalizedFormats.ITERATOR_EXHAUSTED);
             }
             return keys[current];
         }
@@ -552,11 +543,10 @@ public class OpenIntToDoubleHashMap impl
         public double value()
             throws ConcurrentModificationException, NoSuchElementException {
             if (referenceCount != count) {
-                throw MathRuntimeException.createConcurrentModificationException(
-                      CONCURRENT_MODIFICATION_MESSAGE);
+                throw MathRuntimeException.createConcurrentModificationException(LocalizedFormats.MAP_MODIFIED_WHILE_ITERATING);
             }
             if (current < 0) {
-                throw MathRuntimeException.createNoSuchElementException(EXHAUSTED_ITERATOR_MESSAGE);
+                throw MathRuntimeException.createNoSuchElementException(LocalizedFormats.ITERATOR_EXHAUSTED);
             }
             return values[current];
         }
@@ -570,8 +560,7 @@ public class OpenIntToDoubleHashMap impl
             throws ConcurrentModificationException, NoSuchElementException {
 
             if (referenceCount != count) {
-                throw MathRuntimeException.createConcurrentModificationException(
-                      CONCURRENT_MODIFICATION_MESSAGE);
+                throw MathRuntimeException.createConcurrentModificationException(LocalizedFormats.MAP_MODIFIED_WHILE_ITERATING);
             }
 
             // advance on step
@@ -585,7 +574,7 @@ public class OpenIntToDoubleHashMap impl
             } catch (ArrayIndexOutOfBoundsException e) {
                 next = -2;
                 if (current < 0) {
-                    throw MathRuntimeException.createNoSuchElementException(EXHAUSTED_ITERATOR_MESSAGE);
+                    throw MathRuntimeException.createNoSuchElementException(LocalizedFormats.ITERATOR_EXHAUSTED);
                 }
             }
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/OpenIntToFieldHashMap.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/OpenIntToFieldHashMap.java?rev=955423&r1=955422&r2=955423&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/OpenIntToFieldHashMap.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/OpenIntToFieldHashMap.java Wed Jun 16 23:03:38 2010
@@ -53,14 +53,6 @@ public class OpenIntToFieldHashMap<T ext
     /** Serializable version identifier. */
     private static final long serialVersionUID = -9179080286849120720L;
 
-    /** Message for map modification during iteration. */
-    private static final String CONCURRENT_MODIFICATION_MESSAGE =
-        "map has been modified while iterating";
-
-    /** Message for exhausted iterator. */
-    private static final String EXHAUSTED_ITERATOR_MESSAGE =
-        "iterator exhausted";
-
     /** Load factor for the map. */
     private static final float LOAD_FACTOR = 0.5f;
 
@@ -546,11 +538,10 @@ public class OpenIntToFieldHashMap<T ext
         public int key()
             throws ConcurrentModificationException, NoSuchElementException {
             if (referenceCount != count) {
-                throw MathRuntimeException.createConcurrentModificationException(
-                      CONCURRENT_MODIFICATION_MESSAGE);
+                throw MathRuntimeException.createConcurrentModificationException(LocalizedFormats.MAP_MODIFIED_WHILE_ITERATING);
             }
             if (current < 0) {
-                throw MathRuntimeException.createNoSuchElementException(EXHAUSTED_ITERATOR_MESSAGE);
+                throw MathRuntimeException.createNoSuchElementException(LocalizedFormats.ITERATOR_EXHAUSTED);
             }
             return keys[current];
         }
@@ -564,11 +555,10 @@ public class OpenIntToFieldHashMap<T ext
         public T value()
             throws ConcurrentModificationException, NoSuchElementException {
             if (referenceCount != count) {
-                throw MathRuntimeException.createConcurrentModificationException(
-                      CONCURRENT_MODIFICATION_MESSAGE);
+                throw MathRuntimeException.createConcurrentModificationException(LocalizedFormats.MAP_MODIFIED_WHILE_ITERATING);
             }
             if (current < 0) {
-                throw MathRuntimeException.createNoSuchElementException(EXHAUSTED_ITERATOR_MESSAGE);
+                throw MathRuntimeException.createNoSuchElementException(LocalizedFormats.ITERATOR_EXHAUSTED);
             }
             return values[current];
         }
@@ -582,8 +572,7 @@ public class OpenIntToFieldHashMap<T ext
             throws ConcurrentModificationException, NoSuchElementException {
 
             if (referenceCount != count) {
-                throw MathRuntimeException.createConcurrentModificationException(
-                      CONCURRENT_MODIFICATION_MESSAGE);
+                throw MathRuntimeException.createConcurrentModificationException(LocalizedFormats.MAP_MODIFIED_WHILE_ITERATING);
             }
 
             // advance on step
@@ -597,7 +586,7 @@ public class OpenIntToFieldHashMap<T ext
             } catch (ArrayIndexOutOfBoundsException e) {
                 next = -2;
                 if (current < 0) {
-                    throw MathRuntimeException.createNoSuchElementException(EXHAUSTED_ITERATOR_MESSAGE);
+                    throw MathRuntimeException.createNoSuchElementException(LocalizedFormats.ITERATOR_EXHAUSTED);
                 }
             }
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/ResizableDoubleArray.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/ResizableDoubleArray.java?rev=955423&r1=955422&r2=955423&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/ResizableDoubleArray.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/ResizableDoubleArray.java Wed Jun 16 23:03:38 2010
@@ -321,7 +321,7 @@ public class ResizableDoubleArray implem
     public synchronized double substituteMostRecentElement(double value) {
         if (numElements < 1) {
             throw MathRuntimeException.createArrayIndexOutOfBoundsException(
-                    "cannot substitute an element from an empty array");
+                    LocalizedFormats.CANNOT_SUBSTITUTE_ELEMENT_FROM_EMPTY_ARRAY);
         }
 
         double discarded = internalArray[startIndex + (numElements - 1)];
@@ -362,7 +362,7 @@ public class ResizableDoubleArray implem
 
         if (expansion <= 1.0) {
             throw MathRuntimeException.createIllegalArgumentException(
-                    "expansion factor smaller than one ({0})",
+                    LocalizedFormats.EXPANSION_FACTOR_SMALLER_THAN_ONE,
                     expansion);
         }
     }
@@ -449,11 +449,11 @@ public class ResizableDoubleArray implem
     private synchronized void discardExtremeElements(int i,boolean front) {
         if (i > numElements) {
             throw MathRuntimeException.createIllegalArgumentException(
-                    "cannot discard {0} elements from a {1} elements array",
+                    LocalizedFormats.TOO_MANY_ELEMENTS_TO_DISCARD_FROM_ARRAY,
                     i, numElements);
        } else if (i < 0) {
            throw MathRuntimeException.createIllegalArgumentException(
-                   "cannot discard a negative number of elements ({0})",
+                   LocalizedFormats.CANNOT_DISCARD_NEGATIVE_NUMBER_OF_ELEMENTS,
                    i);
         } else {
             // "Subtract" this number of discarded from numElements
@@ -533,13 +533,13 @@ public class ResizableDoubleArray implem
     public synchronized double getElement(int index) {
         if (index >= numElements) {
             throw MathRuntimeException.createArrayIndexOutOfBoundsException(
-                    "the index specified: {0} is larger than the current maximal index {1}",
+                    LocalizedFormats.INDEX_LARGER_THAN_MAX,
                     index, numElements - 1);
         } else if (index >= 0) {
             return internalArray[startIndex + index];
         } else {
             throw MathRuntimeException.createArrayIndexOutOfBoundsException(
-                    "elements cannot be retrieved from a negative array index {0}",
+                    LocalizedFormats.CANNOT_RETRIEVE_AT_NEGATIVE_INDEX,
                     index);
         }
     }
@@ -668,7 +668,7 @@ public class ResizableDoubleArray implem
     public synchronized void setElement(int index, double value) {
         if (index < 0) {
             throw MathRuntimeException.createArrayIndexOutOfBoundsException(
-                    "cannot set an element at a negative index {0}",
+                    LocalizedFormats.CANNOT_SET_AT_NEGATIVE_INDEX,
                     index);
         }
         if (index + 1 > numElements) {
@@ -710,7 +710,7 @@ public class ResizableDoubleArray implem
         if (expansionMode != MULTIPLICATIVE_MODE &&
                 expansionMode != ADDITIVE_MODE) {
             throw MathRuntimeException.createIllegalArgumentException(
-                    "unsupported expansion mode {0}, supported modes are {1} ({2}) and {3} ({4})",
+                    LocalizedFormats.UNSUPPORTED_EXPANSION_MODE,
                     expansionMode, MULTIPLICATIVE_MODE, "MULTIPLICATIVE_MODE",
                     ADDITIVE_MODE, "ADDITIVE_MODE");
         }
@@ -733,7 +733,7 @@ public class ResizableDoubleArray implem
             }
         } else {
             throw MathRuntimeException.createIllegalArgumentException(
-                    "initial capacity ({0}) is not positive",
+                    LocalizedFormats.INITIAL_CAPACITY_NOT_POSITIVE,
                     initialCapacity);
         }
     }
@@ -751,7 +751,7 @@ public class ResizableDoubleArray implem
         // If index is negative thrown an error
         if (i < 0) {
             throw MathRuntimeException.createIllegalArgumentException(
-                    "index ({0}) is not positive",
+                    LocalizedFormats.INDEX_NOT_POSITIVE,
                     i);
         }
 

Added: 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/META-INF/localization/LocalizedFormats_fr.properties?rev=955423&view=auto
==============================================================================
--- commons/proper/math/trunk/src/main/resources/META-INF/localization/LocalizedFormats_fr.properties (added)
+++ commons/proper/math/trunk/src/main/resources/META-INF/localization/LocalizedFormats_fr.properties Wed Jun 16 23:03:38 2010
@@ -0,0 +1,230 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+ARRAY_SIZES_SHOULD_HAVE_DIFFERENCE_1 = les tableaux devraient avoir une diff\u00e9rence de taille de 1 ({0} != {1} + 1)
+ASSYMETRIC_EIGEN_NOT_SUPPORTED = la d\u00e9composition en valeurs/vecteurs propres de matrices 
+AT_LEAST_ONE_COLUMN = une matrice doit comporter au moins une colonne
+AT_LEAST_ONE_ROW = une matrice doit comporter au moins une ligne
+BINOMIAL_INVALID_PARAMETERS_ORDER = n doit \u00eatre sup\u00e9rieur ou \u00e9gal \u00e0 k pour le coefficient du bin\u00f4me (n,k), or n = {0}, k = {1}
+BINOMIAL_NEGATIVE_PARAMETER = n doit \u00eatre positif pour le coefficient du bin\u00f4me (n,k), or n = {0}
+CANNOT_CLEAR_STATISTIC_CONSTRUCTED_FROM_EXTERNAL_MOMENTS = les statistiques bas\u00e9es sur des moments externes ne peuvent pas \u00eatre remises \u00e0 z\u00e9ro
+CANNOT_COMPUTE_0TH_ROOT_OF_UNITY = impossible de calculer la racine z\u00e9roi\u00e8me de l''unit\u00e9, 
+CANNOT_COMPUTE_NTH_ROOT_FOR_NEGATIVE_N = impossible de calculer la racine ni\u00e8me pour n n\u00e9gatif ou nul : {0}
+CANNOT_CONVERT_OBJECT_TO_FRACTION = impossible de convertir l''objet sous forme d''un nombre rationnel : {0}
+CANNOT_DISCARD_NEGATIVE_NUMBER_OF_ELEMENTS = impossible d''enlever un nombre d''\u00e9l\u00e9ments{0} n\u00e9gatif
+CANNOT_FORMAT_INSTANCE_AS_3D_VECTOR = impossible de formater une instance de {0} comme un vecteur de dimension 3
+CANNOT_FORMAT_INSTANCE_AS_COMPLEX = impossible de formater une instance de {0} comme un nombre complexe
+CANNOT_FORMAT_INSTANCE_AS_REAL_VECTOR = impossible de formater une instance de {0} comme un vecteur r\u00e9el
+CANNOT_FORMAT_OBJECT_TO_FRACTION = impossible de formater l''objet sous forme d''un nombre rationnel
+CANNOT_INCREMENT_STATISTIC_CONSTRUCTED_FROM_EXTERNAL_MOMENTS = les statistiques bas\u00e9es sur des moments externes ne peuvent pas \u00eatre incr\u00e9ment\u00e9es
+CANNOT_NORMALIZE_A_ZERO_NORM_VECTOR = impossible de normer un vecteur de norme nulle
+CANNOT_RETRIEVE_AT_NEGATIVE_INDEX = impossible d''extraire un \u00e9l\u00e9ment \u00e0 un index n\u00e9gatif ({0})
+CANNOT_SET_AT_NEGATIVE_INDEX = impossible de mettre un \u00e9l\u00e9ment \u00e0 un index n\u00e9gatif ({0})
+CANNOT_SUBSTITUTE_ELEMENT_FROM_EMPTY_ARRAY = impossible de substituer un \u00e9l\u00e9ment dans un tableau vide
+CANNOT_TRANSFORM_TO_DOUBLE = Exception de conversion dans une transformation : {0}
+CARDAN_ANGLES_SINGULARITY = singularit\u00e9 d''angles de Cardan
+CLASS_DOESNT_IMPLEMENT_COMPARABLE = la classe ({0}) n''implante pas l''interface Comparable
+CLOSEST_ORTHOGONAL_MATRIX_HAS_NEGATIVE_DETERMINANT = la matrice orthogonale la plus proche a un d\u00e9terminant n\u00e9gatif {0}
+CONTINUED_FRACTION_INFINITY_DIVERGENCE = Divergence de fraction continue \u00e0 l''infini pour la valeur {0}
+CONTINUED_FRACTION_NAN_DIVERGENCE = Divergence de fraction continue \u00e0 NaN pour la valeur {0}
+CONTRACTION_CRITERIA_SMALLER_THAN_EXPANSION_FACTO = crit\u00e8re de contraction ({0}) inf\u00e9rieur au facteur d''extension. Ceci induit une boucle infinie d''extensions/contractions car tout tableau de stockage fra\u00eechement \u00e9tendu respecte imm\u00e9diatement le crit\u00e8re de contraction.
+CONTRACTION_CRITERIA_SMALLER_THAN_ONE = crit\u00e8re de contraction inf\u00e9rieur \u00e0 un ({0}). Ceci induit une boucle infinie d''extensions/contractions car tout tableau de stockage de longueur \u00e9gale au nombre d''\u00e9l\u00e9ments respecte le crit\u00e8re de contraction.
+CONVERGENCE_FAILED = \u00c9chec de convergence
+CUMULATIVE_PROBABILITY_RETURNED_NAN = Fonction de probabilit\u00e9 cumulative retourn\u00e9 NaN \u00e0 l''argument de {0} p = {1}
+DIFFERENT_ROWS_LENGTHS = certaines lignes ont une longueur de {0} alors que d''autres ont une longueur de {1}
+DIGEST_NOT_INITIALIZED = mod\u00e8le empirique non initialis\u00e9
+DIMENSIONS_MISMATCH_2x2 = dimensions incoh\u00e9rentes : {0}x{1} \u00e0 la place de {2}x{3}
+DIMENSIONS_MISMATCH_SIMPLE = dimensions incoh\u00e9rentes {0} != {1}
+DISCRETE_CUMULATIVE_PROBABILITY_RETURNED_NAN = Discr\u00e8tes fonction de probabilit\u00e9 cumulative retourn\u00e9 NaN \u00e0 l''argument de {0}
+DISTRIBUTION_NOT_LOADED = aucune distribution n''a \u00e9t\u00e9 charg\u00e9e
+DUPLICATED_ABSCISSA = Abscisse {0} dupliqu\u00e9e aux indices {1} et {2}
+EMPTY_POLYNOMIALS_COEFFICIENTS_ARRAY = tableau de coefficients polyn\u00f4miaux vide
+EMPTY_SELECTED_COLUMN_INDEX_ARRAY = tableau des indices de colonnes s\u00e9lectionn\u00e9es vide
+EMPTY_SELECTED_ROW_INDEX_ARRAY = tableau des indices de lignes s\u00e9lectionn\u00e9es vide
+EMPTY_STRING_FOR_IMAGINARY_CHARACTER = cha\u00eene vide pour le caract\u00e8 imaginaire
+EQUAL_VERTICES_IN_SIMPLEX = sommets {0} et {1} \u00e9gaux dans la configuration du simplex
+EULER_ANGLES_SINGULARITY = singularit\u00e9 d''angles d''Euler
+EVALUATION_FAILED = erreur d''\u00e9valuation pour l''argument {0}
+EXPANSION_FACTOR_SMALLER_THAN_ONE = facteur d''extension inf\u00e9rieur \u00e0 un ({0})
+FACTORIAL_NEGATIVE_PARAMETER = n doit \u00eatre positif pour le calcul de n!, or n = {0}
+FAILED_BRACKETING = nombre d''it\u00e9rations = {0}, it\u00e9rations maximum = {1}, valeur initiale = {2}, borne inf\u00e9rieure = {3}, borne sup\u00e9rieure = {4}, valeur a finale = {5}, valeur b finale = {6}, f(a) = {7}, f(b) = {8}
+FAILED_FRACTION_CONVERSION = Impossible de convertir {0} en fraction apr\u00e8s {1} it\u00e9rations
+FIRST_COLUMNS_NOT_INITIALIZED_YET = les {0} premi\u00e8res colonnes ne sont pas encore initialis\u00e9es
+FIRST_ELEMENT_NOT_ZERO = le premier \u00e9l\u00e9ment n''est pas nul : {0}
+FIRST_ROWS_NOT_INITIALIZED_YET = les {0} premi\u00e8res lignes ne sont pas encore initialis\u00e9es
+FRACTION_CONVERSION_OVERFLOW = D\u00e9passement de capacit\u00e9 lors de la conversion de {0} en fraction ({1}/{2})
+FUNCTION_NOT_DIFFERENTIABLE = la fonction n''est pas diff\u00e9rentiable
+FUNCTION_NOT_POLYNOMIAL = la fonction n''est pas p\u00f4lynomiale
+GCD_OVERFLOW_32_BITS = d\u00e9passement de capacit\u00e9 : le PGCD de {0} et {1} vaut 2^31
+GCD_OVERFLOW_64_BITS = d\u00e9passement de capacit\u00e9 : le PGCD de {0} et {1} vaut 2^63
+HOLE_BETWEEN_MODELS_TIME_RANGES = trou de longueur {0} entre les domaines temporels des mod\u00e8les
+INDEX_LARGER_THAN_MAX = l''index sp\u00e9cifi\u00e9 ({0}) d\u00e9passe l''index maximal courant ({1})
+INDEX_NOT_POSITIVE = l''indice ({0}) n''est pas positif
+INFINITE_ARRAY_ELEMENT = le tableau contient l''\u00e9l\u00e9ment infini {0} \u00e0 l''index {1}
+INFINITE_VALUE_CONVERSION = les valeurs infinies ne peuvent \u00eatre converties
+INITIAL_CAPACITY_NOT_POSITIVE = la capacit\u00e9 initiale ({0}) n''est pas positive
+INITIAL_COLUMN_AFTER_FINAL_COLUMN = colonne initiale {0} apr\u00e8s la colonne finale {1}
+INITIAL_ROW_AFTER_FINAL_ROW = ligne initiale {0} apr\u00e8s la ligne finale {1}
+INPUT_DATA_FROM_UNSUPPORTED_DATASOURCE = les donn\u00e9es d''entr\u00e9e proviennent 
+INSTANCES_NOT_COMPARABLE_TO_EXISTING_VALUES = l''instance de la classe {0} n''est pas comparable aux valeurs existantes
+INSUFFICIENT_DATA_FOR_T_STATISTIC = deux valeurs ou plus sont n\u00e9cessaires pour la statistique t, il y en a {0}
+INSUFFICIENT_DIMENSION = dimension {0} insuffisante, elle devrait \u00eatre au moins {1}
+INSUFFICIENT_OBSERVED_POINTS_IN_SAMPLE = l''\u00e9chantillon ne contient que {0} points alors qu''au moins {1} sont n\u00e9cessaires
+INSUFFICIENT_ROWS_AND_COLUMNS = donn\u00e9es insuffisantes : seulement {0} lignes et {1} colonnes.
+INTEGRATION_METHOD_NEEDS_AT_LEAST_ONE_PREVIOUS_POINT = la m\u00e9thode {0} n\u00e9cessite au moins un point pr\u00e9c\u00e9dent
+INTERNAL_ERROR = erreur interne, veuillez signaler l''erreur \u00e0 {0}
+INVALID_BRACKETING_PARAMETERS = param\u00e8tres d''encadrement invalides : borne inf\u00e9rieure = {0}, valeur initiale = {1}, borne sup\u00e9rieure = {2}
+INVALID_INTERVAL_INITIAL_VALUE_PARAMETERS = param\u00e8tres de l''intervalle initial invalides : borne inf = {0}, valeur initiale = {1}, borne sup = {2}
+INVALID_ITERATIONS_LIMITS = limites d''it\u00e9rations invalides : min = {0}, max = {1}
+INVALID_MAX_ITERATIONS = valeur invalide pour le nombre maximal d''it\u00e9rations : {0}
+INVALID_ROUNDING_METHOD = m\u00e9thode d''arondi {0} invalide, m\u00e9thodes valides : {1} ({2}), {3} ({4}), {5} ({6}), {7} ({8}), {9} ({10}), {11} ({12}), {13} ({14}), {15} ({16})
+ITERATOR_EXHAUSTED = it\u00e9ration achev\u00e9e
+LCM_OVERFLOW_32_BITS = d\u00e9passement de capacit\u00e9 : le MCM de {0} et {1} vaut 2^31
+LCM_OVERFLOW_64_BITS = d\u00e9passement de capacit\u00e9 : le MCM de {0} et {1} vaut 2^63
+LOESS_EXPECTS_AT_LEAST_ONE_POINT = la r\u00e9gression Loess n\u00e9cessite au moins un point
+LOWER_BOUND_NOT_BELOW_UPPER_BOUND = la borne sup\u00e9rieure ({0}) doit \u00eatre sup\u00e9rieure
+LOWER_ENDPOINT_ABOVE_UPPER_ENDPOINT = la borne inf\u00e9rieure ({0}) devrait \u00eatre inf\u00e9rieure 
+MAP_MODIFIED_WHILE_ITERATING = la table d''adressage a \u00e9t\u00e9 modifi\u00e9e pendant l''it\u00e9ration
+MAX_EVALUATIONS_EXCEEDED = nombre maximal d''\u00e9valuations ({0}) d\u00e9pass\u00e9
+MAX_ITERATIONS_EXCEEDED = nombre maximal d''it\u00e9rations ({0}) d\u00e9pass\u00e9
+MINIMAL_STEPSIZE_REACHED_DURING_INTEGRATION = pas minimal ({0,number,0.00E00}) atteint, l''int\u00e9gration n\u00e9cessite {1,number,0.00E00}
+NAN_VALUE_CONVERSION = les valeurs NaN ne peuvent \u00eatre converties
+NEGATIVE_BRIGHTNESS_EXPONENT = l''exposant de brillance devrait \u00eatre positif ou null, or e = {0}
+NEGATIVE_COMPLEX_MODULE = module n\u00e9gatif ({0}) pour un nombre complexe
+NEGATIVE_ELEMENT_AT_2D_INDEX = l''\u00e9l\u00e9ment ({0}, {1}) est n\u00e9gatif : {2}
+NEGATIVE_ELEMENT_AT_INDEX = l''\u00e9l\u00e9ment {0} est n\u00e9gatif : {1}
+NEGATIVE_LENGTH = la longueur ne peut pas \u00eatre n\u00e9gative
+NEGATIVE_NUMBER_OF_SUCCESSES = le nombre de succ\u00e8s ne doit pas \u00eatre n\u00e9gatif ({0})
+NEGATIVE_NUMBER_OF_TRIALS = le nombre d''essais ne doit pas \u00eatre n\u00e9gatif ({0})
+NEGATIVE_ROBUSTNESS_ITERATIONS = le nombre d''it\u00e9rations robuste ne peut \u00eatre n\u00e9gatif, alors qu''il est de {0}
+NEGATIVE_START_POSITION = la position de d\u00e9part ne peut pas \u00eatre n\u00e9gative
+NON_CONVERGENT_CONTINUED_FRACTION = \u00c9chec de convergence de fraction continue pour la valeur {0}
+NON_POSITIVE_MICROSPHERE_ELEMENTS = le nombre d''\u00e9l\u00e9ments de la microsph\u00e8re devrait \u00eatre positif, or n = {0}
+NON_POSITIVE_POLYNOMIAL_DEGREE = le polyn\u00f4me doit \u00eatre de degr\u00e9 positif : degr\u00e9 = {0}
+NON_REAL_FINITE_ABSCISSA = toutes les abscisses doivent \u00eatre des nombres r\u00e9els finis, mais l''abscisse {0} vaut {1}
+NON_REAL_FINITE_ORDINATE = toutes les ordonn\u00e9es doivent \u00eatre des nombres r\u00e9els finis, mais l''ordonn\u00e9e {0} vaut {1}
+NON_REAL_FINITE_WEIGHT = tous les poids doivent \u00eatre des nombres r\u00e9els finis, mais le poids {0} vaut {1}
+NON_SQUARE_MATRIX = une matrice {0}x{1} a \u00e9t\u00e9 fournie \u00e0 la place d''une matrice carr\u00e9e
+NORMALIZE_INFINITE = impossible de normaliser vers une valeur infinie
+NORMALIZE_NAN = impossible de normaliser vers NaN
+NOT_ADDITION_COMPATIBLE_MATRICES = les dimensions {0}x{1} et {2}x{3} sont incompatibles pour l''addition matricielle
+NOT_DECREASING_NUMBER_OF_POINTS = les points {0} et {1} ne sont pas d\u00e9croissants ({2} < {3})
+NOT_ENOUGH_DATA_FOR_NUMBER_OF_PREDICTORS = pas assez de donn\u00e9es ({0} lignes) pour {1} pr\u00e9dicteurs
+NOT_ENOUGH_POINTS_IN_SPLINE_PARTITION = une partiction spline n\u00e9cessite au moins {0} points, seuls {1} ont \u00e9t\u00e9 fournis
+NOT_INCREASING_NUMBER_OF_POINTS = les points {0} et {1} ne sont pas croissants ({2} > {3})
+NOT_MULTIPLICATION_COMPATIBLE_MATRICES = les dimensions {0}x{1} et {2}x{3} sont incompatibles pour la multiplication matricielle
+NOT_POSITIVE_ALPHA = alpha doit \u00eatre positif ({0})
+NOT_POSITIVE_BETA = beta doit \u00eatre positif ({0})
+NOT_POSITIVE_COLUMNDIMENSION = nombre de colonnes invalide : {0} (doit \u00eatre positif)
+NOT_POSITIVE_DEFINITE_MATRIX = matrice non d\u00e9finie positive
+NOT_POSITIVE_DEGREES_OF_FREEDOM = les degr\u00e9s de libert\u00e9 doivent \u00eatre positifs ({0})
+NOT_POSITIVE_ELEMENT_AT_INDEX = l''\u00e9l\u00e9ment {0} n''est pas positif : {1}
+NOT_POSITIVE_EXPONENT = exposant {0} invalide (doit \u00eatre positif)
+NOT_POSITIVE_LENGTH = la longueur doit \u00eatre positive ({0})
+NOT_POSITIVE_MEAN = la moyenne doit \u00eatre positive ({0})
+NOT_POSITIVE_NUMBER_OF_SAMPLES = le nombre d''\u00e9chantillons n''est pas positif : {0}
+NOT_POSITIVE_PERMUTATION = la permutation k ({0}) doit \u00eatre positive
+NOT_POSITIVE_POISSON_MEAN = la moyenne de Poisson doit \u00eatre positive ({0})
+NOT_POSITIVE_POPULATION_SIZE = la taille de la population doit \u00eatre positive ({0})
+NOT_POSITIVE_ROW_DIMENSION = nombre de lignes invalide : {0} (doit \u00eatre positif)
+NOT_POSITIVE_SAMPLE_SIZE = la taille de l''\u00e9chantillon doit \u00eatre positive ({0})
+NOT_POSITIVE_SCALE = l''\u00e9chelle doit \u00eatre positive ({0})
+NOT_POSITIVE_SHAPE = le facteur de forme doit \u00eatre positif ({0})
+NOT_POSITIVE_STANDARD_DEVIATION = l''\u00e9cart type doit \u00eatre positif ({0})
+NOT_POSITIVE_UPPER_BOUND = la borne sup\u00e9rieure doit \u00eatre positive ({0})
+NOT_POSITIVE_WINDOW_SIZE = la taille de la fen\u00eatre doit \u00eatre positive ({0})
+NOT_POWER_OF_TWO = {0} n''est pas une puissance de 2
+NOT_POWER_OF_TWO_CONSIDER_PADDING = {0} n''est pas une puissance de 2, ajoutez des \u00e9l\u00e9ments pour corriger
+NOT_POWER_OF_TWO_PLUS_ONE = {0} n''est pas une puissance de 2 plus un
+NOT_STRICTLY_DECREASING_NUMBER_OF_POINTS = les points {0} et {1} ne sont pas strictement d\u00e9croissants ({2} <= {3})
+NOT_STRICTLY_INCREASING_KNOT_VALUES = les n\u0153uds d''interpolation doivent \u00eatre strictement croissants
+NOT_STRICTLY_INCREASING_NUMBER_OF_POINTS = les points {0} et {1} ne sont pas strictement croissants ({2} >= {3})
+NOT_SUBTRACTION_COMPATIBLE_MATRICES = les dimensions {0}x{1} et {2}x{3} sont incompatibles pour la soustraction matricielle
+NOT_SYMMETRIC_MATRIX = matrice non symm\u00e9trique
+NO_BIN_SELECTED = aucun compartiment s\u00e9lectionn\u00e9
+NO_CONVERGENCE_WITH_ANY_START_POINT = aucun des {0} points de d\u00e9part n''aboutit \u00e0 une convergence
+NO_DATA = aucune donn\u00e9e
+NO_DEGREES_OF_FREEDOM = aucun degr\u00e9 de libert\u00e9 ({0} mesures, {1} param\u00e8tres)
+NO_DENSITY_FOR_THIS_DISTRIBUTION = La fonction de densit\u00e9 pour cette distribution n''a pas \u00e9t\u00e9 mis en \u0153uvre
+NO_FEASIBLE_SOLUTION = aucune solution r\u00e9alisable
+NO_OPTIMUM_COMPUTED_YET = aucun optimum n''a encore \u00e9t\u00e9 calcul\u00e9
+NO_RESULT_AVAILABLE = aucun r\u00e9sultat n''est disponible
+NO_SUCH_MATRIX_ENTRY = pas d''\u00e9l\u00e9ment ({0}, {1}) dans une matrice {2}x{3}
+NULL_COVARIANCE_MATRIX = la matrice de covariance est nulle
+NULL_DENOMINATOR = le d\u00e9nominateur est null
+NULL_DENOMINATOR_FORMAT = le format du d\u00e9nominateur ne doit pas \u00eatre nul
+NULL_FRACTION = fraction nulle
+NULL_FUNCTION = la fonction est nulle
+NULL_IMAGINARY_FORMAT = format imaginaire nul
+NULL_INPUT_ARRAY = le tableau des valeurs d''entr\u00e9es est nul
+NULL_NUMERATOR = le num\u00e9rateur est null
+NULL_NUMERATOR_FORMAT = le format du num\u00e9rateur ne doit pas \u00eatre nul
+NULL_OBJECT_TRANSFORMATION = Exception de conversion dans une transformation, l''objet est nul
+NULL_REAL_FORMAT = format r\u00e9el nul
+NULL_WHOLE_FORMAT = le format complet ne doit pas \u00eatre nul
+NUMBER_OF_SUCCESS_LARGER_THAN_POPULATION_SIZE = le nombre de succ\u00e8s doit \u00eatre inf\u00e9rieur 
+NUMERATOR_OVERFLOW_AFTER_MULTIPLY = d\u00e9passement de capacit\u00e9 pour le num\u00e9rateur apr\u00e8s multiplication : {0}
+OBSERVED_COUNTS_ALL_ZERO = aucune occurrence dans le tableau des observations {0}
+OBSERVED_COUNTS_BOTTH_ZERO_FOR_ENTRY = les occurrences observ\u00e9es sont toutes deux nulles pour l''entr\u00e9e {0}
+OUT_OF_BOUNDS_QUANTILE_VALUE = valeur de quantile {0} hors bornes, doit \u00eatre dans l''intervalle ]0, 100]
+OUT_OF_BOUND_SIGNIFICANCE_LEVEL = niveau de signification {0} hors domaine, doit \u00eatre entre {1} et {2}
+OUT_OF_ORDER_ABSCISSA_ARRAY = les abscisses doivent \u00eatre en ordre strictement croissant, mais l''\u00e9l\u00e9ment {0} vaut {1} alors que l''\u00e9l\u00e9ment {2} vaut {3}
+OUT_OF_RANGE_SIMPLE = {0} hors du domaine [{1}, {2}]
+OVERFLOW_IN_FRACTION = d\u00e9passement de capacit\u00e9 pour la fraction {0}/{1}, son signe ne peut \u00eatre chang\u00e9
+PERCENTILE_IMPLEMENTATION_CANNOT_ACCESS_METHOD = acc\u00e8s impossible \u00e0 la m\u00e9thode {0}
+PERCENTILE_IMPLEMENTATION_UNSUPPORTED_METHOD = l''implantation de pourcentage {0} ne dispose pas de la m\u00e9thode {1}
+PERMUTATION_EXCEEDS_N = la permutation k ({0}) d\u00e9passe n ({1})
+POLYNOMIAL_INTERPOLANTS_MISMATCH_SEGMENTS = le nombre d''interpolants polyn\u00f4miaux doit correspondre au nombre de segments ({0} != {1} - 1)
+POSITION_SIZE_MISMATCH_INPUT_ARRAY = la position {0} et la taille {1} sont incompatibles avec la taille du tableau d''entr\u00e9e {2}
+POWER_NEGATIVE_PARAMETERS = impossible d''\u00e9lever une valeur enti\u00e8re 
+PROPAGATION_DIRECTION_MISMATCH = directions de propagation incoh\u00e9rentes
+ROOTS_OF_UNITY_NOT_COMPUTED_YET = les racines de l''unit\u00e9 n''ont pas encore \u00e9t\u00e9 calcul\u00e9es
+ROTATION_MATRIX_DIMENSIONS = une matrice {0}x{1} ne peut pas \u00eatre une matrice de rotation
+SAMPLE_SIZE_EXCEEDS_COLLECTION_SIZE = la taille de l''\u00e9chantillon ({0}) d\u00e9passe la taille de la collection ({1})
+SAMPLE_SIZE_LARGER_THAN_POPULATION_SIZE = la taille de l''\u00e9chantillon doit \u00eatre inf\u00e9rieure 
+SIMPLEX_NEED_ONE_POINT = le simplex doit contenir au moins un point
+SIMPLE_MESSAGE = {0}
+SINGULAR_MATRIX = matrice singuli\u00e8re
+SUBARRAY_ENDS_AFTER_ARRAY_END = le sous-tableau se termine apr\u00e8s la fin du tableau
+TOO_LARGE_CUTOFF_SINGULAR_VALUE = la valeur singuli\u00e8re de coupure vaut {0}, elle ne devrait pas d\u00e9passer {1}
+TOO_MANY_ELEMENTS_TO_DISCARD_FROM_ARRAY = impossible d''enlever {0} \u00e9l\u00e9ments d''un tableau en contenant {1}
+TOO_SMALL_BANDWIDTH = la largeur de bande doit \u00eatre assez grande pour supporter au moins 2 points. Il y a {0} donn\u00e9es et la largeur de bande doit \u00eatre au moins de {1}, or elle est seulement de {2}
+TOO_SMALL_COST_RELATIVE_TOLERANCE = trop petite tol\u00e9rance relative sur le co\u00fbt ({0}), aucune r\u00e9duction de la somme des carr\u00e9s n''est possible
+TOO_SMALL_INTEGRATION_INTERVAL = intervalle d''int\u00e9gration trop petit : {0}
+TOO_SMALL_ORTHOGONALITY_TOLERANCE = trop petite tol\u00e9rance sur l''orthogonalit\u00e9 ({0}), la solution est orthogonale \u00e0 la jacobienne
+TOO_SMALL_PARAMETERS_RELATIVE_TOLERANCE = trop petite tol\u00e9rance relative sur les param\u00e8tres ({0}), aucune am\u00e9lioration de la solution approximative n''est possible
+TWO_OR_MORE_CATEGORIES_REQUIRED = deux cat\u00e9gories ou plus sont n\u00e9cessaires, il y en a {0}
+TWO_OR_MORE_VALUES_IN_CATEGORY_REQUIRED = deux valeurs ou plus sont n\u00e9cessaires pour chaque cat\u00e9gorie, une cat\u00e9gorie en a {0}
+UNABLE_TO_BRACKET_OPTIMUM_IN_LINE_SEARCH = impossible d''encadrer l''optimum lors de la recherche lin\u00e9aire
+UNABLE_TO_COMPUTE_COVARIANCE_SINGULAR_PROBLEM = impossible de calculer les covariances : probl\u00e8me singulier
+UNABLE_TO_FIRST_GUESS_HARMONIC_COEFFICIENTS = impossible de faire une premi\u00e8re estimation des coefficients harmoniques
+UNABLE_TO_ORTHOGONOLIZE_MATRIX = impossible de rendre la matrice orthogonale en {0} it\u00e9rations
+UNABLE_TO_PERFORM_QR_DECOMPOSITION_ON_JACOBIAN = impossible de calculer la factorisation Q.R de la matrice jacobienne {0}x{1}
+UNABLE_TO_SOLVE_SINGULAR_PROBLEM = r\u00e9solution impossible : probl\u00e8me singulier
+UNBOUNDED_SOLUTION = solution non born\u00e9e
+UNKNOWN_MODE = mode {0} inconnu, modes connus : {1} ({2}), {3} ({4}), {5} ({6}), {7} ({8}), {9} ({10}) et {11} ({12})
+UNSUPPORTED_EXPANSION_MODE = mode d''extension {0} no support\u00e9, les modes support\u00e9s sont {1} ({2}) et {3} ({4})
+URL_CONTAINS_NO_DATA = l''adresse {0} ne contient aucune donn\u00e9e
+VALUES_ADDED_BEFORE_CONFIGURING_STATISTIC = {0} valeurs ont \u00e9t\u00e9 ajout\u00e9es 
+VECTOR_LENGTH_MISMATCH = taille de vecteur invalide : {0} au lieu de {1} attendue
+VECTOR_MUST_HAVE_AT_LEAST_ONE_ELEMENT = un vecteur doit comporter au moins un \u00e9l\u00e9ment
+WRONG_BLOCK_LENGTH = forme de tableau erron\u00e9e (bloc de longueur {0} au lieu des {1} attendus
+WRONG_NUMBER_OF_POINTS = {0} sont n\u00e9cessaires, seuls {1} ont \u00e9t\u00e9 fournis
+ZERO_DENOMINATOR = le d\u00e9nominateur doit \u00eatre diff\u00e9rent de 0
+ZERO_DENOMINATOR_IN_FRACTION = d\u00e9nominateur null dans le nombre rationnel {0}/{1}
+ZERO_FRACTION_TO_DIVIDE_BY = division par un nombre rationnel nul : {0}/{1}
+ZERO_NORM = norme nulle
+ZERO_NORM_FOR_ROTATION_AXIS = norme nulle pour un axe de rotation
+ZERO_NORM_FOR_ROTATION_DEFINING_VECTOR = norme nulle pour un axe de d\u00e9finition de rotation

Propchange: commons/proper/math/trunk/src/main/resources/META-INF/localization/LocalizedFormats_fr.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/math/trunk/src/main/resources/META-INF/localization/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=955423&r1=955422&r2=955423&view=diff
==============================================================================
--- commons/proper/math/trunk/src/site/xdoc/changes.xml (original)
+++ commons/proper/math/trunk/src/site/xdoc/changes.xml Wed Jun 16 23:03:38 2010
@@ -52,6 +52,9 @@ The <action> type attribute can be add,u
     If the output is not quite correct, check for invisible trailing spaces!
      -->
     <release version="2.2" date="TBD" description="TBD">
+      <action dev="luc" type="fix" issue="MATH-361">
+        Improved localization of error messages.
+      </action>      
       <action dev="erans" type="fix" issue="MATH-376">
         Allow multiple optimizations with a default simplex.
       </action>      

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ConvergenceExceptionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ConvergenceExceptionTest.java?rev=955423&r1=955422&r2=955423&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ConvergenceExceptionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ConvergenceExceptionTest.java Wed Jun 16 23:03:38 2010
@@ -21,6 +21,8 @@ import junit.framework.TestCase;
 
 import java.util.Locale;
 
+import org.apache.commons.math.util.LocalizedFormats;
+
 /**
  * @version $Revision$ $Date$
  */
@@ -35,11 +37,11 @@ public class ConvergenceExceptionTest ex
     }
 
     public void testConstructorPatternArguments(){
-        String pattern = "a {0}x{1} matrix cannot be a rotation matrix";
+        LocalizedFormats pattern = LocalizedFormats.ROTATION_MATRIX_DIMENSIONS;
         Object[] arguments = { Integer.valueOf(6), Integer.valueOf(4) };
         ConvergenceException ex = new ConvergenceException(pattern, arguments);
         assertNull(ex.getCause());
-        assertEquals(pattern, ex.getPattern());
+        assertEquals(pattern, ex.getLocalizablePattern());
         assertEquals(arguments.length, ex.getArguments().length);
         for (int i = 0; i < arguments.length; ++i) {
             assertEquals(arguments[i], ex.getArguments()[i]);
@@ -56,13 +58,13 @@ public class ConvergenceExceptionTest ex
     }
 
     public void testConstructorPatternArgumentsCause(){
-        String pattern = "a {0}x{1} matrix cannot be a rotation matrix";
+        LocalizedFormats pattern = LocalizedFormats.ROTATION_MATRIX_DIMENSIONS;
         Object[] arguments = { Integer.valueOf(6), Integer.valueOf(4) };
         String inMsg = "inner message";
         Exception cause = new Exception(inMsg);
         ConvergenceException ex = new ConvergenceException(cause, pattern, arguments);
         assertEquals(cause, ex.getCause());
-        assertEquals(pattern, ex.getPattern());
+        assertEquals(pattern, ex.getLocalizablePattern());
         assertEquals(arguments.length, ex.getArguments().length);
         for (int i = 0; i < arguments.length; ++i) {
             assertEquals(arguments[i], ex.getArguments()[i]);

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/FunctionEvaluationExceptionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/FunctionEvaluationExceptionTest.java?rev=955423&r1=955422&r2=955423&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/FunctionEvaluationExceptionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/FunctionEvaluationExceptionTest.java Wed Jun 16 23:03:38 2010
@@ -19,6 +19,8 @@ package org.apache.commons.math;
 
 import java.util.Locale;
 
+import org.apache.commons.math.util.LocalizedFormats;
+
 import junit.framework.TestCase;
 
 /**
@@ -46,11 +48,11 @@ public class FunctionEvaluationException
     }
 
     public void testConstructorPatternArguments(){
-        String pattern = "evaluation failed for argument = {0}";
+        LocalizedFormats pattern = LocalizedFormats.EVALUATION_FAILED;
         Object[] arguments = { Double.valueOf(0.0) };
         FunctionEvaluationException ex = new FunctionEvaluationException(0.0, pattern, arguments);
         assertNull(ex.getCause());
-        assertEquals(pattern, ex.getPattern());
+        assertEquals(pattern, ex.getLocalizablePattern());
         assertEquals(arguments.length, ex.getArguments().length);
         for (int i = 0; i < arguments.length; ++i) {
             assertEquals(arguments[i], ex.getArguments()[i]);
@@ -60,12 +62,12 @@ public class FunctionEvaluationException
     }
 
     public void testConstructorArrayPatternArguments(){
-        String pattern = "evaluation failed for argument = {0}";
+        LocalizedFormats pattern = LocalizedFormats.EVALUATION_FAILED;
         Object[] arguments = { Double.valueOf(0.0) };
         FunctionEvaluationException ex =
             new FunctionEvaluationException(new double[] { 0, 1, 2 }, pattern, arguments);
         assertNull(ex.getCause());
-        assertEquals(pattern, ex.getPattern());
+        assertEquals(pattern, ex.getLocalizablePattern());
         assertEquals(arguments.length, ex.getArguments().length);
         for (int i = 0; i < arguments.length; ++i) {
             assertEquals(arguments[i], ex.getArguments()[i]);
@@ -78,13 +80,13 @@ public class FunctionEvaluationException
     }
 
     public void testConstructorPatternArgumentsCause(){
-        String pattern = "evaluation failed for argument = {0}";
+        LocalizedFormats pattern = LocalizedFormats.EVALUATION_FAILED;
         Object[] arguments = { Double.valueOf(0.0) };
         String inMsg = "inner message";
         Exception cause = new Exception(inMsg);
         FunctionEvaluationException ex = new FunctionEvaluationException(cause, 0.0, pattern, arguments);
         assertEquals(cause, ex.getCause());
-        assertEquals(pattern, ex.getPattern());
+        assertEquals(pattern, ex.getLocalizablePattern());
         assertEquals(arguments.length, ex.getArguments().length);
         for (int i = 0; i < arguments.length; ++i) {
             assertEquals(arguments[i], ex.getArguments()[i]);
@@ -94,14 +96,14 @@ public class FunctionEvaluationException
     }
 
     public void testConstructorArrayPatternArgumentsCause(){
-        String pattern = "evaluation failed for argument = {0}";
+        LocalizedFormats pattern = LocalizedFormats.EVALUATION_FAILED;
         Object[] arguments = { Double.valueOf(0.0) };
         String inMsg = "inner message";
         Exception cause = new Exception(inMsg);
         FunctionEvaluationException ex =
             new FunctionEvaluationException(cause, new double[] { 0, 1, 2 }, pattern, arguments);
         assertEquals(cause, ex.getCause());
-        assertEquals(pattern, ex.getPattern());
+        assertEquals(pattern, ex.getLocalizablePattern());
         assertEquals(arguments.length, ex.getArguments().length);
         for (int i = 0; i < arguments.length; ++i) {
             assertEquals(arguments[i], ex.getArguments()[i]);

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/MathConfigurationExceptionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/MathConfigurationExceptionTest.java?rev=955423&r1=955422&r2=955423&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/MathConfigurationExceptionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/MathConfigurationExceptionTest.java Wed Jun 16 23:03:38 2010
@@ -21,6 +21,8 @@ import junit.framework.TestCase;
 
 import java.util.Locale;
 
+import org.apache.commons.math.util.LocalizedFormats;
+
 /**
  * @version $Revision$ $Date$
  */
@@ -34,11 +36,11 @@ public class MathConfigurationExceptionT
     }
 
     public void testConstructorPatternArguments(){
-        String pattern = "a {0}x{1} matrix cannot be a rotation matrix";
+        LocalizedFormats pattern = LocalizedFormats.ROTATION_MATRIX_DIMENSIONS;
         Object[] arguments = { Integer.valueOf(6), Integer.valueOf(4) };
         MathConfigurationException ex = new MathConfigurationException(pattern, arguments);
         assertNull(ex.getCause());
-        assertEquals(pattern, ex.getPattern());
+        assertEquals(pattern, ex.getLocalizablePattern());
         assertEquals(arguments.length, ex.getArguments().length);
         for (int i = 0; i < arguments.length; ++i) {
             assertEquals(arguments[i], ex.getArguments()[i]);
@@ -55,13 +57,13 @@ public class MathConfigurationExceptionT
     }
 
     public void testConstructorPatternArgumentsCause(){
-        String pattern = "a {0}x{1} matrix cannot be a rotation matrix";
+        LocalizedFormats pattern = LocalizedFormats.ROTATION_MATRIX_DIMENSIONS;
         Object[] arguments = { Integer.valueOf(6), Integer.valueOf(4) };
         String inMsg = "inner message";
         Exception cause = new Exception(inMsg);
         MathConfigurationException ex = new MathConfigurationException(cause, pattern, arguments);
         assertEquals(cause, ex.getCause());
-        assertEquals(pattern, ex.getPattern());
+        assertEquals(pattern, ex.getLocalizablePattern());
         assertEquals(arguments.length, ex.getArguments().length);
         for (int i = 0; i < arguments.length; ++i) {
             assertEquals(arguments[i], ex.getArguments()[i]);

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/MathExceptionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/MathExceptionTest.java?rev=955423&r1=955422&r2=955423&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/MathExceptionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/MathExceptionTest.java Wed Jun 16 23:03:38 2010
@@ -24,6 +24,10 @@ import java.io.PrintStream;
 import java.io.PrintWriter;
 import java.util.Locale;
 
+import org.apache.commons.math.util.DummyLocalizable;
+import org.apache.commons.math.util.Localizable;
+import org.apache.commons.math.util.LocalizedFormats;
+
 /**
  * @version $Revision$ $Date$
  */
@@ -37,11 +41,11 @@ public class MathExceptionTest extends T
     }
 
     public void testConstructorPatternArguments(){
-        String pattern = "a {0}x{1} matrix cannot be a rotation matrix";
+        LocalizedFormats pattern = LocalizedFormats.ROTATION_MATRIX_DIMENSIONS;
         Object[] arguments = { Integer.valueOf(6), Integer.valueOf(4) };
         MathException ex = new MathException(pattern, arguments);
         assertNull(ex.getCause());
-        assertEquals(pattern, ex.getPattern());
+        assertEquals(pattern, ex.getLocalizablePattern());
         assertEquals(arguments.length, ex.getArguments().length);
         for (int i = 0; i < arguments.length; ++i) {
             assertEquals(arguments[i], ex.getArguments()[i]);
@@ -58,13 +62,13 @@ public class MathExceptionTest extends T
     }
 
     public void testConstructorPatternArgumentsCause(){
-        String pattern = "a {0}x{1} matrix cannot be a rotation matrix";
+        LocalizedFormats pattern = LocalizedFormats.ROTATION_MATRIX_DIMENSIONS;
         Object[] arguments = { Integer.valueOf(6), Integer.valueOf(4) };
         String inMsg = "inner message";
         Exception cause = new Exception(inMsg);
         MathException ex = new MathException(cause, pattern, arguments);
         assertEquals(cause, ex.getCause());
-        assertEquals(pattern, ex.getPattern());
+        assertEquals(pattern, ex.getLocalizablePattern());
         assertEquals(arguments.length, ex.getArguments().length);
         for (int i = 0; i < arguments.length; ++i) {
             assertEquals(arguments[i], ex.getArguments()[i]);
@@ -77,8 +81,8 @@ public class MathExceptionTest extends T
      * Tests the printStackTrace() operation.
      */
     public void testPrintStackTrace() {
-        String outMsg = "outer message";
-        String inMsg = "inner message";
+        Localizable outMsg = new DummyLocalizable("outer message");
+        Localizable inMsg = new DummyLocalizable("inner message");
         MathException cause = new MathConfigurationException(inMsg);
         MathException ex = new MathException(cause, outMsg);
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -102,8 +106,8 @@ public class MathExceptionTest extends T
      * Test serialization
      */
     public void testSerialization() {
-        String outMsg = "outer message";
-        String inMsg = "inner message";
+        Localizable outMsg = new DummyLocalizable("outer message");
+        Localizable inMsg = new DummyLocalizable("inner message");
         MathException cause = new MathConfigurationException(inMsg);
         MathException ex = new MathException(cause, outMsg);
         MathException image = (MathException) TestUtils.serializeAndRecover(ex);
@@ -131,7 +135,7 @@ public class MathExceptionTest extends T
         if (jdkSupportsNesting) {
             assertEquals(stack, stack2);
         } else {
-            assertTrue(stack2.indexOf(inMsg) != -1);
+            assertTrue(stack2.indexOf(inMsg.getSourceString()) != -1);
             assertTrue(stack2.indexOf("MathConfigurationException") != -1);
         }
     }

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/MaxIterationsExceededExceptionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/MaxIterationsExceededExceptionTest.java?rev=955423&r1=955422&r2=955423&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/MaxIterationsExceededExceptionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/MaxIterationsExceededExceptionTest.java Wed Jun 16 23:03:38 2010
@@ -19,6 +19,8 @@ package org.apache.commons.math;
 
 import java.util.Locale;
 
+import org.apache.commons.math.util.LocalizedFormats;
+
 import junit.framework.TestCase;
 
 /**
@@ -38,7 +40,7 @@ public class MaxIterationsExceededExcept
     public void testComplexConstructor(){
         MaxIterationsExceededException ex =
             new MaxIterationsExceededException(1000000,
-                "Continued fraction convergents failed to converge for value {0}",
+                LocalizedFormats.NON_CONVERGENT_CONTINUED_FRACTION,
                 1234567);
         assertNull(ex.getCause());
         assertNotNull(ex.getMessage());

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/HighamHall54IntegratorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/HighamHall54IntegratorTest.java?rev=955423&r1=955422&r2=955423&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/HighamHall54IntegratorTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/ode/nonstiff/HighamHall54IntegratorTest.java Wed Jun 16 23:03:38 2010
@@ -33,6 +33,7 @@ import org.apache.commons.math.ode.event
 import org.apache.commons.math.ode.events.EventHandler;
 import org.apache.commons.math.ode.sampling.StepHandler;
 import org.apache.commons.math.ode.sampling.StepInterpolator;
+import org.apache.commons.math.util.LocalizedFormats;
 
 public class HighamHall54IntegratorTest
   extends TestCase {
@@ -51,7 +52,7 @@ public class HighamHall54IntegratorTest
             public void computeDerivatives(double t, double[] y, double[] dot)
             throws DerivativeException {
             if (t < -0.5) {
-                throw new DerivativeException("{0}", "oops");
+                throw new DerivativeException(LocalizedFormats.SIMPLE_MESSAGE, "oops");
             } else {
                 throw new DerivativeException(new RuntimeException("oops"));
            }
@@ -217,7 +218,7 @@ public class HighamHall54IntegratorTest
           double middle = (pb.getInitialTime() + pb.getFinalTime()) / 2;
           double offset = t - middle;
           if (offset > 0) {
-            throw new EventException("Evaluation failed for argument = {0}", t);
+            throw new EventException(LocalizedFormats.EVALUATION_FAILED, t);
           }
           return offset;
         }

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/TestBean.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/TestBean.java?rev=955423&r1=955422&r2=955423&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/TestBean.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/TestBean.java Wed Jun 16 23:03:38 2010
@@ -59,7 +59,7 @@ public class TestBean {
      *
      */
     public Double getZ() {
-        throw new MathRuntimeException("?");
+        throw new MathRuntimeException(LocalizedFormats.SIMPLE_MESSAGE, "?");
     }
 
     /**



Mime
View raw message