This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch geoapi-4.0 in repository https://gitbox.apache.org/repos/asf/sis.git
commit 88aa2b277013bb0dd7405462681a45a5a97c48f9 Author: Martin Desruisseaux <[email protected]> AuthorDate: Tue Mar 5 12:53:31 2019 +0100 Rename a the localization keys of a few error messages. --- .../sis/metadata/iso/quality/AbstractElement.java | 2 +- .../java/org/apache/sis/util/ArgumentChecks.java | 6 ++-- .../java/org/apache/sis/util/resources/Errors.java | 32 ++++++++++++---------- .../apache/sis/util/resources/Errors.properties | 14 +++++----- .../apache/sis/util/resources/Errors_fr.properties | 14 +++++----- 5 files changed, 35 insertions(+), 33 deletions(-) diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractElement.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractElement.java index ab018cd..1a672f8 100644 --- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractElement.java +++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/quality/AbstractElement.java @@ -276,7 +276,7 @@ public class AbstractElement extends ISOMetadata implements Element { modCount++; default: if (!it.hasNext()) break; throw new IllegalArgumentException(Errors.format( - Errors.Keys.ExcessiveArgumentSize_3, "dates", 2, dates.size())); + Errors.Keys.TooManyCollectionElements_3, "dates", 2, dates.size())); } } return modCount != c; diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java b/core/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java index ae1f680..a171749 100644 --- a/core/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java +++ b/core/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java @@ -518,7 +518,7 @@ public final class ArgumentChecks extends Static { } /** - * Ensures that the given collection size of array length is between the given bounds, inclusive. + * Ensures that the given collection size or array length is between the given bounds, inclusive. * This method performs the same check than {@link #ensureBetween(String, int, int, int) * ensureBetween(…)}, but the error message is different in case of failure. * @@ -539,10 +539,10 @@ public final class ArgumentChecks extends Static { if (min == 1) { message = Errors.format(Errors.Keys.EmptyArgument_1, name); } else { - message = Errors.format(Errors.Keys.InsufficientArgumentSize_3, name, min, size); + message = Errors.format(Errors.Keys.TooFewCollectionElements_3, name, min, size); } } else if (size > max) { - message = Errors.format(Errors.Keys.ExcessiveArgumentSize_3, name, max, size); + message = Errors.format(Errors.Keys.TooManyCollectionElements_3, name, max, size); } else { return; } diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java b/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java index 91067c6..88705aa 100644 --- a/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java +++ b/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java @@ -281,11 +281,6 @@ public final class Errors extends IndexedResourceBundle { public static final short ErrorIn_2 = 34; /** - * Argument ‘{0}’ shall not contain more than {1} elements. A number of {2} is excessive. - */ - public static final short ExcessiveArgumentSize_3 = 35; - - /** * A size of {1} elements is excessive for the “{0}” list. */ public static final short ExcessiveListSize_2 = 36; @@ -484,11 +479,6 @@ public final class Errors extends IndexedResourceBundle { public static final short InfiniteArgumentValue_1 = 73; /** - * Argument ‘{0}’ shall contain at least {1} elements. A number of {2} is insufficient. - */ - public static final short InsufficientArgumentSize_3 = 74; - - /** * “{0}” is an invalid version identifier. */ public static final short InvalidVersionIdentifier_1 = 179; @@ -776,22 +766,34 @@ public final class Errors extends IndexedResourceBundle { public static final short TableNotFound_1 = 126; /** - * Expected at least {0} argument{0,choice,1#|2#s}, but got {1}. + * Expected at least {0,number} argument{0,choice,1#|2#s}, but got {1,number}. */ public static final short TooFewArguments_2 = 127; /** - * Too few occurrences of “{1}”. Expected at least {0} of them. + * Collection “{0}” contains only {2,number} element{2,choice,1#|2#s} while at least {1,number} + * elements were expected. + */ + public static final short TooFewCollectionElements_3 = 74; + + /** + * Too few occurrences of “{1}”. Expected at least {0,number} of them. */ public static final short TooFewOccurrences_2 = 128; /** - * Expected at most {0} argument{0,choice,1#|2#s}, but got {1}. + * Expected at most {0,number} argument{0,choice,1#|2#s}, but got {1,number}. */ public static final short TooManyArguments_2 = 129; /** - * Too many occurrences of “{1}”. The maximum is {0}. + * Collection “{0}” contains {2,number} elements while at most {1,number} element{1,choice,1# + * was|2#s were} expected. + */ + public static final short TooManyCollectionElements_3 = 35; + + /** + * Too many occurrences of “{1,number}”. The maximum is {0,number}. */ public static final short TooManyOccurrences_2 = 130; @@ -806,7 +808,7 @@ public final class Errors extends IndexedResourceBundle { public static final short UndefinedOrderingForElements_2 = 132; /** - * Expected an array of length {0}, but got {1}. + * Expected an array of length {0,number}, but got {1,number}. */ public static final short UnexpectedArrayLength_2 = 133; diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties b/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties index 835b4d1..9b8c0fe 100644 --- a/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties +++ b/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties @@ -67,7 +67,6 @@ EmptyEnvelope2D = Envelope must be at least two-dimensional an EmptyProperty_1 = Property named \u201c{0}\u201d shall not be empty. ErrorIn_2 = Error in \u201c{0}\u201d: {1} ErrorInFileAtLine_2 = An error occurred in file \u201c{0}\u201d at line {1}. -ExcessiveArgumentSize_3 = Argument \u2018{0}\u2019 shall not contain more than {1} elements. A number of {2} is excessive. ExcessiveListSize_2 = A size of {1} elements is excessive for the \u201c{0}\u201d list. ExcessiveNumberOfDimensions_1 = For this algorithm, {0} is an excessive number of dimensions. FactoryNotFound_1 = No factory of kind \u2018{0}\u2019 found. @@ -107,7 +106,6 @@ InconsistentUnitsForCS_1 = Unit of measurement \u201c{0}\u201d is incon IndexOutOfBounds_1 = Index {0} is out of bounds. IndicesOutOfBounds_2 = Indices ({0}, {1}) are out of bounds. InfiniteArgumentValue_1 = Argument \u2018{0}\u2019 can not take an infinite value. -InsufficientArgumentSize_3 = Argument \u2018{0}\u2019 shall contain at least {1} elements. A number of {2} is insufficient. InvalidVersionIdentifier_1 = \u201c{0}\u201d is an invalid version identifier. KeyCollision_1 = A different value is already associated to the \u201c{0}\u201d key. MandatoryAttribute_2 = Attribute \u201c{0}\u201d is mandatory for an object of type \u2018{1}\u2019. @@ -166,13 +164,15 @@ RecursiveCreateCallForKey_1 = Recursive call while creating an object for RequireDecimalSeparator = A decimal separator is required. StalledThread_1 = Thread \u201c{0}\u201d seems stalled. TableNotFound_1 = Table \u201c{0}\u201d has not been found. -TooFewArguments_2 = Expected at least {0} argument{0,choice,1#|2#s}, but got {1}. -TooFewOccurrences_2 = Too few occurrences of \u201c{1}\u201d. Expected at least {0} of them. -TooManyArguments_2 = Expected at most {0} argument{0,choice,1#|2#s}, but got {1}. -TooManyOccurrences_2 = Too many occurrences of \u201c{1}\u201d. The maximum is {0}. +TooFewArguments_2 = Expected at least {0,number} argument{0,choice,1#|2#s}, but got {1,number}. +TooFewCollectionElements_3 = Collection \u201c{0}\u201d contains only {2,number} element{2,choice,1#|2#s} while at least {1,number} elements were expected. +TooFewOccurrences_2 = Too few occurrences of \u201c{1}\u201d. Expected at least {0,number} of them. +TooManyArguments_2 = Expected at most {0,number} argument{0,choice,1#|2#s}, but got {1,number}. +TooManyCollectionElements_3 = Collection \u201c{0}\u201d contains {2,number} elements while at most {1,number} element{1,choice,1# was|2#s were} expected. +TooManyOccurrences_2 = Too many occurrences of \u201c{1,number}\u201d. The maximum is {0,number}. TreeDepthExceedsMaximum = Tree depth exceeds the maximum. UndefinedOrderingForElements_2 = Ordering between \u201c{0}\u201d and \u201c{1}\u201d elements is undefined. -UnexpectedArrayLength_2 = Expected an array of length {0}, but got {1}. +UnexpectedArrayLength_2 = Expected an array of length {0,number}, but got {1,number}. UnexpectedChange_1 = Unexpected change in \u2018{0}\u2019. UnexpectedCharactersAfter_2 = The \u201c{1}\u201d characters after \u201c{0}\u201d were unexpected. UnexpectedCharactersAtBound_4 = Text for \u2018{0}\u2019 was expected to {1,choice,0#begin|1#end} with \u201c{2}\u201d, but found \u201c{3}\u201d. diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties b/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties index f5f511f..fcca9be 100644 --- a/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties +++ b/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties @@ -64,7 +64,6 @@ EmptyEnvelope2D = L\u2019enveloppe doit avoir au moins deux di EmptyProperty_1 = La propri\u00e9t\u00e9 nomm\u00e9e \u00ab\u202f{0}\u202f\u00bb ne doit pas \u00eatre vide. ErrorIn_2 = Erreur dans \u00ab\u202f{0}\u202f\u00bb\u2008: {1} ErrorInFileAtLine_2 = Une erreur est survenue dans le fichier \u00ab\u202f{0}\u202f\u00bb \u00e0 la ligne {1}. -ExcessiveArgumentSize_3 = L\u2019argument \u2018{0}\u2019 ne peut pas contenir plus de {1} \u00e9l\u00e9ments. Un nombre de {2} est excessif. ExcessiveListSize_2 = Une taille de {1} \u00e9l\u00e9ments est excessive pour la liste \u00ab\u202f{0}\u202f\u00bb. ExcessiveNumberOfDimensions_1 = Pour cet algorithme, {0} est un trop grand nombre de dimensions. FactoryNotFound_1 = Aucune fabrique de type \u2018{0}\u2019 n\u2019a \u00e9t\u00e9 trouv\u00e9e. @@ -104,7 +103,6 @@ InconsistentUnitsForCS_1 = L\u2019unit\u00e9 de mesure \u00ab\u202f{0}\ IndexOutOfBounds_1 = L\u2019index {0} est en dehors des limites permises. IndicesOutOfBounds_2 = Les index ({0}, {1}) sont en dehors des limites permises. InfiniteArgumentValue_1 = L\u2019argument \u2018{0}\u2019 ne peut pas prendre une valeur infinie. -InsufficientArgumentSize_3 = L\u2019argument \u2018{0}\u2019 doit contenir au moins {1} \u00e9l\u00e9ments. Un nombre de {2} est insuffisant. InvalidVersionIdentifier_1 = \u00ab\u202f{0}\u202f\u00bb n\u2019est pas un identifiant de version valide. KeyCollision_1 = Une valeur diff\u00e9rente est d\u00e9j\u00e0 associ\u00e9e \u00e0 la cl\u00e9 \u00ab\u202f{0}\u202f\u00bb. MandatoryAttribute_2 = L\u2019attribut \u00ab\u202f{0}\u202f\u00bb est obligatoire pour un objet de type \u2018{1}\u2019. @@ -162,13 +160,15 @@ RecursiveCreateCallForKey_1 = Appel r\u00e9cursif lors de la cr\u00e9ation RequireDecimalSeparator = Un s\u00e9parateur d\u00e9cimal est requis. StalledThread_1 = La t\u00e2che \u00ab\u202f{0}\u202f\u00bb semble bloqu\u00e9e. TableNotFound_1 = La table \u00ab\u202f{0}\u202f\u00bb n\u2019a pas \u00e9t\u00e9 trouv\u00e9e. -TooFewArguments_2 = Au moins {0} argument{0,choice,1# \u00e9tait attendu|2#s \u00e9taient attendus}, mais seulement {1} {1,choice,1#a \u00e9t\u00e9 sp\u00e9cifi\u00e9|2#ont \u00e9t\u00e9 sp\u00e9cifi\u00e9s}. -TooFewOccurrences_2 = Trop peu d\u2019occurrences de \u00ab\u202f{1}\u202f\u00bb. Il en faut au moins {0}. -TooManyArguments_2 = Au plus {0} argument{0,choice,1# \u00e9tait attendu|2#s \u00e9taient attendus}, mais {1} {1,choice,1#a \u00e9t\u00e9 sp\u00e9cifi\u00e9|2#ont \u00e9t\u00e9 sp\u00e9cifi\u00e9s}. -TooManyOccurrences_2 = Trop d\u2019occurrences de \u00ab\u202f{1}\u202f\u00bb. Le maximum est {0}. +TooFewArguments_2 = Au moins {0,number} argument{0,choice,1# \u00e9tait attendu|2#s \u00e9taient attendus}, mais seulement {1,number} {1,choice,1#a \u00e9t\u00e9 sp\u00e9cifi\u00e9|2#ont \u00e9t\u00e9 sp\u00e9cifi\u00e9s}. +TooFewCollectionElements_3 = L\u2019ensemble \u00ab\u202f{0}\u202f\u00bb ne contient que {2,number} \u00e9l\u00e9ment{2,choice,1#|2#s} alors qu\u2019au moins {1,number} \u00e9l\u00e9ments \u00e9taient attendus. +TooFewOccurrences_2 = Trop peu d\u2019occurrences de \u00ab\u202f{1}\u202f\u00bb. Il en faut au moins {0,number}. +TooManyArguments_2 = Au plus {0,number} argument{0,choice,1# \u00e9tait attendu|2#s \u00e9taient attendus}, mais {1,number} {1,choice,1#a \u00e9t\u00e9 sp\u00e9cifi\u00e9|2#ont \u00e9t\u00e9 sp\u00e9cifi\u00e9s}. +TooManyCollectionElements_3 = L\u2019ensemble \u00ab\u202f{0}\u202f\u00bb contient {2,number} \u00e9l\u00e9ments alors qu\u2019au plus {1,number} \u00e9l\u00e9ment{1,choice,1# \u00e9tait attendu|2#s \u00e9taient attendus}. +TooManyOccurrences_2 = Trop d\u2019occurrences de \u00ab\u202f{1}\u202f\u00bb. Le maximum est {0,number}. TreeDepthExceedsMaximum = La profondeur de l\u2019arbre exc\u00e8de le maximum. UndefinedOrderingForElements_2 = L\u2019ordre entre les \u00e9l\u00e9ments \u00ab\u202f{0}\u202f\u00bb et \u00ab\u202f{1}\u202f\u00bb n\u2019est pas d\u00e9fini. -UnexpectedArrayLength_2 = Un tableau de longueur {0} \u00e9tait attendu, mais le tableau re\u00e7u est de longueur {1}. +UnexpectedArrayLength_2 = Un tableau de longueur {0} \u00e9tait attendu, mais le tableau re\u00e7u est de longueur {1,number}. UnexpectedChange_1 = Changement inattendu dans \u2018{0}\u2019. UnexpectedCharactersAfter_2 = Les caract\u00e8res \u00ab\u202f{1}\u202f\u00bb apr\u00e8s \u00ab\u202f{0}\u202f\u00bb sont inattendus. UnexpectedCharactersAtBound_4 = Le texte pour \u2018{0}\u2019 devait {1,choice,0#commencer|1#finir} par \u00ab\u202f{2}\u202f\u00bb, mais on a trouv\u00e9 \u00ab\u202f{3}\u202f\u00bb.
