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:46:30 UTC

svn commit: r1244703 - in /commons/proper/math/trunk: ./ src/main/java/org/apache/commons/math3/exception/util/ src/main/java/org/apache/commons/math3/stat/regression/ src/main/resources/META-INF/localization/ src/test/java/org/apache/commons/math3/exc...

Author: luc
Date: Wed Feb 15 20:46:30 2012
New Revision: 1244703

URL: http://svn.apache.org/viewvc?rev=1244703&view=rev
Log:
Improved errors messages consistency and added tests for translations.

Added:
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/exception/util/LocalizedFormatsTest.java   (with props)
Modified:
    commons/proper/math/trunk/NOTICE.txt
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/exception/util/LocalizedFormats.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/regression/SimpleRegression.java
    commons/proper/math/trunk/src/main/resources/META-INF/localization/LocalizedFormats_fr.properties

Modified: commons/proper/math/trunk/NOTICE.txt
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/NOTICE.txt?rev=1244703&r1=1244702&r2=1244703&view=diff
==============================================================================
--- commons/proper/math/trunk/NOTICE.txt (original)
+++ commons/proper/math/trunk/NOTICE.txt Wed Feb 15 20:46:30 2012
@@ -51,6 +51,12 @@ Copyright (C) 1997 - 2002, Makoto Matsum
 All rights reserved
 ===============================================================================
 
+The LocalizedFormatsTest class in the unit tests is an adapted version of
+the OrekitMessagesTest class from the orekit library distributed under the
+terms of the Apache 2 licence. Original source copyright:
+Copyright 2010 CS Communication & Systèmes
+===============================================================================
+
 The complete text of licenses and disclaimers associated with the the original
 sources enumerated above at the time of code translation are in the LICENSE.txt
 file.

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=1244703&r1=1244702&r2=1244703&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:46:30 2012
@@ -193,7 +193,6 @@ public enum LocalizedFormats implements 
     NOT_MULTIPLICATION_COMPATIBLE_MATRICES("{0}x{1} and {2}x{3} matrices are not multiplication compatible"),
     ALPHA("alpha"), /* keep */
     BETA("beta"), /* keep */
-    NOT_POSITIVE_COLUMNDIMENSION("invalid column dimension: {0} (must be positive)"),
     NOT_POSITIVE_DEFINITE_MATRIX("not positive definite matrix"), /* keep */
     NON_POSITIVE_DEFINITE_MATRIX("not positive definite matrix: diagonal element at ({1},{1}) is smaller than {2} ({0})"),
     NON_POSITIVE_DEFINITE_OPERATOR("non positive definite linear operator"), /* keep */
@@ -249,7 +248,7 @@ public enum LocalizedFormats implements 
     NO_SUCH_MATRIX_ENTRY("no entry at indices ({0}, {1}) in a {2}x{3} matrix"),
     NAN_NOT_ALLOWED("NaN is not allowed"),
     NULL_NOT_ALLOWED("null is not allowed"), /* keep */
-    ARRAY_ZERO_LENGTH_OR_NULL_NOTALLOWED("A null or zero length array not allowed"),
+    ARRAY_ZERO_LENGTH_OR_NULL_NOT_ALLOWED("a null or zero length array not allowed"),
     COVARIANCE_MATRIX("covariance matrix"), /* keep */
     DENOMINATOR("denominator"), /* keep */
     DENOMINATOR_FORMAT("denominator format"), /* keep */
@@ -292,7 +291,6 @@ public enum LocalizedFormats implements 
     POLYNOMIAL("polynomial"), /* keep */
     POLYNOMIAL_INTERPOLANTS_MISMATCH_SEGMENTS("number of polynomial interpolants must match the number of segments ({0} != {1} - 1)"),
     POPULATION_LIMIT_NOT_POSITIVE("population limit has to be positive"),
-    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"),
     RANDOMKEY_MUTATION_WRONG_CLASS("RandomKeyMutation works only with RandomKeys, not {0}"),
@@ -311,7 +309,6 @@ public enum LocalizedFormats implements 
     TOO_LARGE_CUTOFF_SINGULAR_VALUE("cutoff singular value is {0}, should be at most {1}"),
     TOO_LARGE_TOURNAMENT_ARITY("tournament arity ({0}) cannot be bigger than population size ({1})"),
     TOO_MANY_ELEMENTS_TO_DISCARD_FROM_ARRAY("cannot discard {0} elements from a {1} elements array"),
-    TOO_MUCH_CANCELLATION("too much cancellation in a denominator"),
     TOO_MANY_REGRESSORS("too many regressors ({0}) specified, only {1} in the model"),
     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}"),

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/regression/SimpleRegression.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/regression/SimpleRegression.java?rev=1244703&r1=1244702&r2=1244703&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/regression/SimpleRegression.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/regression/SimpleRegression.java Wed Feb 15 20:46:30 2012
@@ -773,7 +773,7 @@ public class SimpleRegression implements
      */
     public RegressionResults regress(int[] variablesToInclude) throws ModelSpecificationException{
         if( variablesToInclude == null || variablesToInclude.length == 0){
-          throw new MathIllegalArgumentException(LocalizedFormats.ARRAY_ZERO_LENGTH_OR_NULL_NOTALLOWED);
+          throw new MathIllegalArgumentException(LocalizedFormats.ARRAY_ZERO_LENGTH_OR_NULL_NOT_ALLOWED);
         }
         if( variablesToInclude.length > 2 || (variablesToInclude.length > 1 && !hasIntercept) ){
             throw new ModelSpecificationException(

Modified: 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=1244703&r1=1244702&r2=1244703&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/resources/META-INF/localization/LocalizedFormats_fr.properties (original)
+++ commons/proper/math/trunk/src/main/resources/META-INF/localization/LocalizedFormats_fr.properties Wed Feb 15 20:46:30 2012
@@ -14,6 +14,7 @@
 #  limitations under the License.
 
 ARGUMENT_OUTSIDE_DOMAIN = argument {0} hors domaine [{1} ; {2}]
+ARRAY_SIZE_EXCEEDS_MAX_VARIABLES = la taille de tableau ne devrait pas d\u00e9passer {0}
 ARRAY_SIZES_SHOULD_HAVE_DIFFERENCE_1 = les tableaux devraient avoir une diff\u00e9rence de taille de 1 ({0} != {1} + 1)
 ARRAY_SUMS_TO_ZERO = somme du tableau nulle
 ASSYMETRIC_EIGEN_NOT_SUPPORTED = la d\u00e9composition en valeurs/vecteurs propres de matrices 
@@ -48,8 +49,11 @@ CONTINUED_FRACTION_NAN_DIVERGENCE = Dive
 CONTRACTION_CRITERIA_SMALLER_THAN_EXPANSION_FACTOR = crit\u00e8re de contraction ({0}) inf\u00e9rieur au facteur d''extension ({1}). 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
+CROSSING_BOUNDARY_LOOPS = certains p\u00e9rim\u00e8tres de fronti\u00e8res se croisent
+CROSSOVER_RATE = proportion de m\u00e9lange ({0})
 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}
+DIFFERENT_ORIG_AND_PERMUTED_DATA = les donn\u00e9es originales et permut\u00e9es doivent contenir les m\u00eames \u00e9l\u00e9ments
 DIGEST_NOT_INITIALIZED = mod\u00e8le empirique non initialis\u00e9
 DIMENSIONS_MISMATCH_2x2 = {0}x{1} \u00e0 la place de {2}x{3}
 DIMENSIONS_MISMATCH_SIMPLE = {0} != {1}
@@ -57,6 +61,7 @@ DIMENSIONS_MISMATCH = dimensions incoh\u
 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}
+ELITISM_RATE = proportion d''\u00e9litisme ({0})
 EMPTY_CLUSTER_IN_K_MEANS = groupe vide dans l''algorithme des k-moyennes
 EMPTY_POLYNOMIALS_COEFFICIENTS_ARRAY = tableau de coefficients polyn\u00f4miaux vide
 EMPTY_SELECTED_COLUMN_INDEX_ARRAY = tableau des indices de colonnes s\u00e9lectionn\u00e9es vide
@@ -93,7 +98,7 @@ INFINITE_VALUE_CONVERSION = les valeurs 
 INITIAL_CAPACITY_NOT_POSITIVE = la capacit\u00e9 initiale ({0}) n''est pas positive
 INITIAL_COLUMN_AFTER_FINAL_COLUMN = colonne initiale {1} apr\u00e8s la colonne finale {0}
 INITIAL_ROW_AFTER_FINAL_ROW = ligne initiale {1} apr\u00e8s la ligne finale {0}
-INPUT_DATA_FROM_UNSUPPORTED_DATASOURCE = les donn\u00e9es d''entr\u00e9e proviennent 
+INPUT_DATA_FROM_UNSUPPORTED_DATASOURCE = les donn\u00e9es d''entr\u00e9e proviennent d''une source non prise en compte : {0}, sources prises en comptes : {1}, {2}
 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}
@@ -103,10 +108,13 @@ INSUFFICIENT_ROWS_AND_COLUMNS = donn\u00
 INTEGRATION_METHOD_NEEDS_AT_LEAST_TWO_PREVIOUS_POINTS = la m\u00e9thode {0} n\u00e9cessite au moins deux points pr\u00e9c\u00e9dents
 INTERNAL_ERROR = erreur interne, veuillez signaler l''erreur \u00e0 {0}
 INVALID_BINARY_DIGIT = chiffre binaire invalide : {0}
+INVALID_BINARY_CHROMOSOME = la mutation binaire ne fonctionne qu''avec BinaryChromosome
 INVALID_BRACKETING_PARAMETERS = param\u00e8tres d''encadrement invalides : borne inf\u00e9rieure = {0}, valeur initiale = {1}, borne sup\u00e9rieure = {2}
+INVALID_FIXED_LENGTH_CHROMOSOME = le m\u00e9lange \u00e0 un point ne fonctionne qu''avec les chromosomes \u00e0 taille fixe
 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}
+NOT_ENOUGH_DATA_REGRESSION = le nombre d''observations est insuffisant pour r\u00e9aliser une r\u00e9gression
 INVALID_REGRESSION_ARRAY= la longueur du tableau de donn\u00e9es = {0} ne correspond pas au nombre d''observations = {1} et le nombre de variables explicatives = {2}
 INVALID_REGRESSION_OBSERVATION = la longueur du tableau de variables explicatives ({0}) ne correspond pas au nombre de variables dans le mod\u00e8le ({1})
 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})
@@ -116,13 +124,14 @@ LCM_OVERFLOW_64_BITS = d\u00e9passement 
 LIST_OF_CHROMOSOMES_BIGGER_THAN_POPULATION_SIZE = la liste des chromosomes d\u00e9passe maxPopulationSize
 LOESS_EXPECTS_AT_LEAST_ONE_POINT = la r\u00e9gression Loess n\u00e9cessite au moins un point
 LOWER_BOUND_NOT_BELOW_UPPER_BOUND = la borne inf\u00e9rieure ({0}) doit \u00eatre strictement plus petite que la borne sup\u00e9rieure ({1})
-LOWER_ENDPOINT_ABOVE_UPPER_ENDPOINT = la borne inf\u00e9rieure ({0}) devrait \u00eatre inf\u00e9rieure 
+LOWER_ENDPOINT_ABOVE_UPPER_ENDPOINT = la borne inf\u00e9rieure ({0}) devrait \u00eatre inf\u00e9rieure  ou \u00e9gale \u00e0 la borne sup\u00e9rieure ({1})
 MAP_MODIFIED_WHILE_ITERATING = la table d''adressage a \u00e9t\u00e9 modifi\u00e9e pendant l''it\u00e9ration
 EVALUATIONS = \u00e9valuations
 MAX_COUNT_EXCEEDED = limite ({0}) d\u00e9pass\u00e9
 MAX_ITERATIONS_EXCEEDED = nombre maximal d''it\u00e9rations ({0}) d\u00e9pass\u00e9
 MINIMAL_STEPSIZE_REACHED_DURING_INTEGRATION = pas minimal ({1,number,0.00E00}) atteint, l''int\u00e9gration n\u00e9cessite {0,number,0.00E00}
 MISMATCHED_LOESS_ABSCISSA_ORDINATE_ARRAYS = Loess a besoin de tableaux d'abscisses et d'oordonn\u00e9es de m\u00eame taille, mais il y a {0} points en abscisse et {1} en ordonn\u00e9e
+MUTATION_RATE = proportion de mutation ({0})
 NAN_ELEMENT_AT_INDEX = l''\u00e9l\u00e9ment {0} est un NaN
 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}
@@ -134,9 +143,10 @@ NUMBER_OF_SUCCESSES = nombre de succ\u00
 NEGATIVE_NUMBER_OF_TRIALS = le nombre d''essais ne doit pas \u00eatre n\u00e9gatif ({0})
 NUMBER_OF_INTERPOLATION_POINTS = nombre de points d''interpolation ({0})
 NUMBER_OF_TRIALS = nombre d''essais ({0})
-NEGATIVE_ROBUSTNESS_ITERATIONS = le nombre d''it\u00e9rations robuste ne peut \u00eatre n\u00e9gatif, alors qu''il est de {0}
-START_POSITION = position de d\u00e9part
+ROBUSTNESS_ITERATIONS = nombre d''it\u00e9rations robuste ({0})
+START_POSITION = position de d\u00e9part ({0})
 NON_CONVERGENT_CONTINUED_FRACTION = \u00c9chec de convergence (en moins de {0} it\u00e9rations) de fraction continue pour la valeur {1}
+NON_INVERTIBLE_TRANSFORM = la transformation affine non-inversible r\u00e9duit des lignes \u00e0 de simples points
 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}
@@ -155,13 +165,11 @@ NOT_INCREASING_SEQUENCE = les points {3}
 NOT_MULTIPLICATION_COMPATIBLE_MATRICES = les dimensions {0}x{1} et {2}x{3} sont incompatibles pour la multiplication matricielle
 ALPHA = alpha
 BETA = beta
-NOT_POSITIVE_COLUMNDIMENSION = nombre de colonnes invalide : {0} (doit \u00eatre positif)
 NOT_POSITIVE_DEFINITE_MATRIX = matrice non d\u00e9finie positive
 NON_POSITIVE_DEFINITE_MATRIX = matrice non d\u00e9finie positive: l''\u00e9l\u00e9ment diagonal ({1},{1}) est inf\u00e9rieur \u00e0 {2} ({0})
-NON_SELF_ADJOINT_LINEAR_OPERATOR = : |x'' A y - y'' A x| > {0} quand x est {1} et y est {2}
-NON_POSITIVE_DEFINITE_LINEAR_OPERATOR = op\u00e9rateur lin\u00e9aire non d\u00e9fini positif
-NON_SELF_ADJOINT_LINEAR_OPERATOR = op\u00e9rateur lin\u00e9aire non auto-adjoint
-NON_SQUARE_LINEAR_OPERATOR = op\u00e9rateur lin\u00e9aire non carr\u00e9 ({0}x{1})
+NON_POSITIVE_DEFINITE_OPERATOR = op\u00e9rateur lin\u00e9aire non d\u00e9fini positif
+NON_SELF_ADJOINT_OPERATOR = op\u00e9rateur lin\u00e9aire non auto-adjoint
+NON_SQUARE_OPERATOR = op\u00e9rateur lin\u00e9aire non carr\u00e9 ({0}x{1})
 NOT_POSITIVE_DEGREES_OF_FREEDOM = les degr\u00e9s de libert\u00e9 doivent \u00eatre positifs ({0})
 DEGREES_OF_FREEDOM = degr\u00e9s de libert\u00e9 ({0})
 NOT_POSITIVE_ELEMENT_AT_INDEX = l''\u00e9l\u00e9ment {0} n''est pas positif : {1}
@@ -174,7 +182,7 @@ MEAN = moyenne ({0})
 NOT_POSITIVE_NUMBER_OF_SAMPLES = le nombre d''\u00e9chantillons n''est pas positif : {0}
 NUMBER_OF_SAMPLES = nombre d''\u00e9chantillons ({0})
 NOT_POSITIVE_PERMUTATION = la permutation k ({0}) doit \u00eatre positive
-PERMUTATION_SIZE = taille de la permutation
+PERMUTATION_SIZE = taille de la permutation ({0})
 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})
 POPULATION_SIZE = taille de la population ({0})
@@ -185,7 +193,7 @@ SCALE = facteur d''\u00e9chelle ({0})
 NOT_POSITIVE_SHAPE = le facteur de forme doit \u00eatre positif ({0})
 SHAPE = facteur de forme ({0})
 NOT_POSITIVE_STANDARD_DEVIATION = l''\u00e9cart type doit \u00eatre positif ({0})
-STANDARD_DEVIATION = \u00e9cart type
+STANDARD_DEVIATION = \u00e9cart type ({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
@@ -197,6 +205,7 @@ NOT_STRICTLY_INCREASING_KNOT_VALUES = le
 NOT_STRICTLY_INCREASING_NUMBER_OF_POINTS = les points {0} et {1} ne sont pas strictement croissants ({2} >= {3})
 NOT_STRICTLY_INCREASING_SEQUENCE = les points {3} et {2} ne sont pas strictement croissants ({1} >= {0})
 NOT_SUBTRACTION_COMPATIBLE_MATRICES = les dimensions {0}x{1} et {2}x{3} sont incompatibles pour la soustraction matricielle
+NOT_SUPPORTED_IN_DIMENSION_N = m\u00e9thode non disponible en dimension {0}
 NOT_SYMMETRIC_MATRIX = matrice non symm\u00e9trique
 NON_SYMMETRIC_MATRIX = matrice non symm\u00e9trique: la diff\u00e9rence entre les \u00e9l\u00e9ments ({0},{1}) et ({1},{0}) est sup\u00e9rieure \u00e0 {2}
 NO_BIN_SELECTED = aucun compartiment s\u00e9lectionn\u00e9
@@ -211,6 +220,7 @@ NO_RESULT_AVAILABLE = aucun r\u00e9sulta
 NO_SUCH_MATRIX_ENTRY = pas d''\u00e9l\u00e9ment ({0}, {1}) dans une matrice {2}x{3}
 NAN_NOT_ALLOWED = "NaN" n''est pas permis
 NULL_NOT_ALLOWED = "null" n''est pas permis
+ARRAY_ZERO_LENGTH_OR_NULL_NOT_ALLOWED = un tableau nul ou de taille z\u00e9ro n''est pas autoris\u00e9
 COVARIANCE_MATRIX = matrice de covariance
 DENOMINATOR = d\u00e9nominateur
 DENOMINATOR_FORMAT = format du d\u00e9nominateur
@@ -242,18 +252,18 @@ OUT_OF_RANGE_SIMPLE = {0} hors du domain
 OUT_OF_RANGE_LEFT = {0} hors du domaine ({1}, {2}]
 OUT_OF_RANGE_RIGHT = {0} hors du domaine [{1}, {2})
 OUT_OF_RANGE = hors domaine
+OUTLINE_BOUNDARY_LOOP_OPEN = un p\u00e9rim\u00e8tre fronti\u00e8re est ouvert
 OVERFLOW = d\u00e9passement de capacit\u00e9
 OVERFLOW_IN_FRACTION = d\u00e9passement de capacit\u00e9 pour la fraction {0}/{1}, son signe ne peut \u00eatre chang\u00e9
 OVERFLOW_IN_ADDITION = d\u00e9passement de capacit\u00e9 pour l''addition : {0} + {1}
 OVERFLOW_IN_SUBTRACTION = d\u00e9passement de capacit\u00e9 pour la soustraction : {0} - {1}
-PERCENTILE_IMPLEMENTATION_CANNOT_ACCESS_METHOD = acc\u00e8s impossible \u00e0 la m\u00e9thode {0}
+PERCENTILE_IMPLEMENTATION_CANNOT_ACCESS_METHOD = acc\u00e8s impossible \u00e0 la m\u00e9thode {0} dans la mise en \u0153uvre du pourcentage {1}
 PERCENTILE_IMPLEMENTATION_UNSUPPORTED_METHOD = l''implantation de pourcentage {0} ne dispose pas de la m\u00e9thode {1}
 PERMUTATION_EXCEEDS_N = la taille de la permutation ({0}) d\u00e9passe le domaine de la permutation ({1})
 POLYNOMIAL = polyn\u00f4me
 POLYNOMIAL_INTERPOLANTS_MISMATCH_SEGMENTS = le nombre d''interpolants polyn\u00f4miaux doit correspondre au nombre de segments ({0} != {1} - 1)
 POPULATION_LIMIT_NOT_POSITIVE = la limite de population doit \u00eatre positive
-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 
+POWER_NEGATIVE_PARAMETERS = impossible d''\u00e9lever une valeur enti\u00e8re \u00e0 une puissance n\u00e9gative ({0}^{1})
 PROPAGATION_DIRECTION_MISMATCH = directions de propagation incoh\u00e9rentes
 RANDOMKEY_MUTATION_WRONG_CLASS = RandomKeyMutation ne fonctionne qu''avec la classe RandomKeys, pas avec {0}
 ROOTS_OF_UNITY_NOT_COMPUTED_YET = les racines de l''unit\u00e9 n''ont pas encore \u00e9t\u00e9 calcul\u00e9es
@@ -262,19 +272,21 @@ ROW_INDEX_OUT_OF_RANGE = l''index de lig
 ROW_INDEX = index de ligne ({0})
 SAME_SIGN_AT_ENDPOINTS = les valeurs aux bornes de la fonction devraient avoir des signes difff\u00e9rents ; bornes : [{0}, {1}], valeurs : [{2}, {3}]
 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 
+SAMPLE_SIZE_LARGER_THAN_POPULATION_SIZE = la taille de l''\u00e9chantillon ({0}) doit \u00eatre inf\u00e9rieure ou \u00e9gale \u00e0 la taille de la population ({1})
 SIMPLEX_NEED_ONE_POINT = le simplex doit contenir au moins un point
 SIMPLE_MESSAGE = {0}
 SINGULAR_MATRIX = matrice singuli\u00e8re
 SINGULAR_OPERATOR = l''op\u00e9rateur est singulier
 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_LARGE_TOURNAMENT_ARITY = l''arit\u00e9 du tournois ({0}) ne doit pas d\u00e9passer la taille de la population ({1})
 TOO_MANY_ELEMENTS_TO_DISCARD_FROM_ARRAY = impossible d''enlever {0} \u00e9l\u00e9ments d''un tableau en contenant {1}
-TOO_MANY_REGRESSORS = trop de variables explicatives sp\u00e9cifi\u00e9es {0}, il n'y en a que {1} dans le mod\u00e8le
+TOO_MANY_REGRESSORS = trop de variables explicatives sp\u00e9cifi\u00e9es {0}, il n''y en a que {1} dans le mod\u00e8le
 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
+TRUST_REGION_STEP_FAILED = l''\u00e9tape de la r\u00e9gion de confiance n''a pas r\u00e9duit Q"),
 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
@@ -285,7 +297,6 @@ UNABLE_TO_PERFORM_QR_DECOMPOSITION_ON_JA
 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})
-UNKNOWN_ADDITIONAL_EQUATION = \u00e9quation additionnelle inconnue
 UNKNOWN_PARAMETER = param\u00e8tre {0} inconnu
 UNMATCHED_ODE_IN_EXPANDED_SET = l''\u00e9quation diff\u00e9rentielle ne correspond pas \u00e0 l''\u00e9quation principale du jeu \u00e9tendu
 CANNOT_PARSE_AS_TYPE = cha\u00eene "{0}" non analysable (\u00e0 partir de la position {1}) en un objet de type {2}

Added: 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=1244703&view=auto
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/exception/util/LocalizedFormatsTest.java (added)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/exception/util/LocalizedFormatsTest.java Wed Feb 15 20:46:30 2012
@@ -0,0 +1,109 @@
+/*
+ * 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.
+ */
+/**
+ * This file is an adapted version of OrekitMessagesTest test class
+ * for the <a href="https://www.orekit.org/forge/projects/orekit">orekit</a> library.
+ * The original file is distributed under the terms of the Apache 2 license and is:
+ * Copyright 2010 CS Communication & Systèmes
+ */
+package org.apache.commons.math3.exception.util;
+
+
+import java.text.MessageFormat;
+import java.util.Enumeration;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+import junit.framework.Assert;
+
+import org.junit.Test;
+
+public class LocalizedFormatsTest {
+
+    @Test
+    public void testMessageNumber() {
+        Assert.assertEquals(311, LocalizedFormats.values().length);
+    }
+
+    @Test
+    public void testAllKeysPresentInPropertiesFiles() {
+        for (final String language : new String[] { "fr" } ) {
+            ResourceBundle bundle =
+                ResourceBundle.getBundle("META-INF/localization/LocalizedFormats", new Locale(language));
+            for (LocalizedFormats message : LocalizedFormats.values()) {
+                final String messageKey = message.toString();
+                boolean keyPresent = false;
+                for (final Enumeration<String> keys = bundle.getKeys(); keys.hasMoreElements();) {
+                    keyPresent |= messageKey.equals(keys.nextElement());
+                }
+                Assert.assertTrue("missing key \"" + message.name() + "\" for language " + language,
+                                  keyPresent);
+            }
+            Assert.assertEquals(language, bundle.getLocale().getLanguage());
+        }
+
+    }
+
+    @Test
+    public void testAllPropertiesCorrespondToKeys() {
+        for (final String language : new String[] { "fr" } ) {
+            ResourceBundle bundle =
+                ResourceBundle.getBundle("META-INF/localization/LocalizedFormats", new Locale(language));
+            for (final Enumeration<String> keys = bundle.getKeys(); keys.hasMoreElements();) {
+                final String propertyKey = keys.nextElement();
+                try {
+                    Assert.assertNotNull(LocalizedFormats.valueOf(propertyKey));
+                } catch (IllegalArgumentException iae) {
+                    Assert.fail("unknown key \"" + propertyKey + "\" in language " + language);
+                }
+            }
+            Assert.assertEquals(language, bundle.getLocale().getLanguage());
+        }
+
+    }
+
+    @Test
+    public void testNoMissingFrenchTranslation() {
+        for (LocalizedFormats message : LocalizedFormats.values()) {
+            String translated = message.getLocalizedString(Locale.FRENCH);
+            Assert.assertFalse(message.name(), translated.toLowerCase().contains("missing translation"));
+        }
+    }
+
+    @Test
+    public void testNoOpEnglishTranslation() {
+        for (LocalizedFormats message : LocalizedFormats.values()) {
+            String translated = message.getLocalizedString(Locale.ENGLISH);
+            Assert.assertEquals(message.getSourceString(), translated);
+        }
+    }
+
+    @Test
+    public void testVariablePartsConsistency() {
+        for (final String language : new String[] { "fr" } ) {
+            Locale locale = new Locale(language);
+            for (LocalizedFormats message : LocalizedFormats.values()) {
+                MessageFormat source     = new MessageFormat(message.getSourceString());
+                MessageFormat translated = new MessageFormat(message.getLocalizedString(locale));
+                Assert.assertEquals(message.name() + " (" + language + ")",
+                                    source.getFormatsByArgumentIndex().length,
+                                    translated.getFormatsByArgumentIndex().length);
+            }
+        }
+    }
+
+}

Propchange: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/exception/util/LocalizedFormatsTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/exception/util/LocalizedFormatsTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"