This is an automated email from the ASF dual-hosted git repository.

thiagohp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git


The following commit(s) were added to refs/heads/master by this push:
     new e65243cba TAP5-2725: Lack of consistency in DateField validation error 
message
e65243cba is described below

commit e65243cbab05f177ef9412f4b2ef6e7f5b69a042
Author: Thiago H. de Paula Figueiredo <[email protected]>
AuthorDate: Fri May 27 15:39:14 2022 -0300

    TAP5-2725: Lack of consistency in DateField validation error message
---
 .../main/java/org/apache/tapestry5/corelib/components/DateField.java   | 3 +--
 .../java/org/apache/tapestry5/corelib/components/Html5DateField.java   | 2 +-
 tapestry-core/src/main/resources/org/apache/tapestry5/core.properties  | 2 +-
 .../src/main/resources/org/apache/tapestry5/core_es.properties         | 2 +-
 .../src/main/resources/org/apache/tapestry5/core_fr.properties         | 3 ++-
 .../src/main/resources/org/apache/tapestry5/core_it.properties         | 2 +-
 .../src/main/resources/org/apache/tapestry5/core_pt_BR.properties      | 2 +-
 7 files changed, 8 insertions(+), 8 deletions(-)

diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DateField.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DateField.java
index c986beb19..821326bda 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DateField.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/DateField.java
@@ -102,7 +102,6 @@ public class DateField extends AbstractField
      * generally used to provide this object in a declarative fashion.
      */
     @Parameter(defaultPrefix = BindingConstants.VALIDATE)
-    @SuppressWarnings("unchecked")
     private FieldValidator<Object> validate;
 
     /**
@@ -327,7 +326,7 @@ public class DateField extends AbstractField
                 parsedValue = format.parse(value);
         } catch (ParseException ex)
         {
-            validationTracker.recordError(this, 
messages.format("core-date-value-not-parseable", value));
+            validationTracker.recordError(this, 
messages.format("core-date-value-not-parseable", controlName));
             return;
         }
 
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Html5DateField.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Html5DateField.java
index d66dff7a8..7bf3c078f 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Html5DateField.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Html5DateField.java
@@ -146,7 +146,7 @@ public class Html5DateField extends AbstractField
                 parsedValue = getDateFormat().parse(value);
         } catch (ParseException ex)
         {
-            validationTracker.recordError(this, 
messages.format("core-date-value-not-parseable", value));
+            validationTracker.recordError(this, 
messages.format("core-date-value-not-parseable", controlName));
             return;
         }
 
diff --git 
a/tapestry-core/src/main/resources/org/apache/tapestry5/core.properties 
b/tapestry-core/src/main/resources/org/apache/tapestry5/core.properties
index 61cac585b..bb2462881 100644
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/core.properties
+++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core.properties
@@ -24,7 +24,7 @@ core-block-error=Unable to locate a block to edit property 
'%s' (with data type
 core-cancel-label=Cancel
 
 # DateField validation error:
-core-date-value-not-parseable=Date value '%s' is not parseable.
+core-date-value-not-parseable=You must provide a valid date value for %s.
 
 # Validation error summary instructions:
 core-default-error-banner=You must correct the following errors before 
continuing.
diff --git 
a/tapestry-core/src/main/resources/org/apache/tapestry5/core_es.properties 
b/tapestry-core/src/main/resources/org/apache/tapestry5/core_es.properties
index cc78585f0..b0bb34bd6 100644
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_es.properties
+++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_es.properties
@@ -24,7 +24,7 @@ core-block-error=No se puede localizar un bloque para editar 
la propiedad «%s»
 core-cancel-label=Cancelar
 
 # DateField validation error:
-core-date-value-not-parseable=El valor de fecha «%s» no es analizable.
+core-date-value-not-parseable=%s tiene que ser una fecha.
 
 # Validation error summary instructions:
 core-default-error-banner=Debe corregir los siguientes errores antes de 
continuar.
diff --git 
a/tapestry-core/src/main/resources/org/apache/tapestry5/core_fr.properties 
b/tapestry-core/src/main/resources/org/apache/tapestry5/core_fr.properties
index b800d9e79..784f3b3b5 100644
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_fr.properties
+++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_fr.properties
@@ -24,7 +24,8 @@
 core-cancel-label=Annuler
 
 # DateField validation error:
-core-date-value-not-parseable=La date '%s' ne peut pas être analysée.
+core-date-value-not-parseable=Vous devez saisir une date pour %s.
+
 
 # Validation error summary instructions:
 core-default-error-banner=Vous devez corriger ces erreurs avant de poursuivre.
diff --git 
a/tapestry-core/src/main/resources/org/apache/tapestry5/core_it.properties 
b/tapestry-core/src/main/resources/org/apache/tapestry5/core_it.properties
index ba319eba0..9bea0f33e 100644
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/core_it.properties
+++ b/tapestry-core/src/main/resources/org/apache/tapestry5/core_it.properties
@@ -24,7 +24,7 @@
 core-cancel-label=Annulla
 
 # DateField validation error:
-core-date-value-not-parseable=Il valore '%s' non è una data accettabile.
+core-date-value-not-parseable=Il campo %s richiede un valore di tipo data.
 
 # Validation error summary instructions:
 core-default-error-banner=Per poter proseguire è necessario correggere gli 
errori seguenti.
diff --git 
a/tapestry-core/src/main/resources/org/apache/tapestry5/core_pt_BR.properties 
b/tapestry-core/src/main/resources/org/apache/tapestry5/core_pt_BR.properties
index 06670610b..d66019f1e 100644
--- 
a/tapestry-core/src/main/resources/org/apache/tapestry5/core_pt_BR.properties
+++ 
b/tapestry-core/src/main/resources/org/apache/tapestry5/core_pt_BR.properties
@@ -24,7 +24,7 @@
 #core-cancel-label=
 
 # DateField validation error:
-#core-date-value-not-parseable=
+core-date-value-not-parseable=%s deve ser uma data válida.
 
 # Validation error summary instructions:
 core-default-error-banner=Você deve corrigir os seguintes erros antes de 
continuar.

Reply via email to