[Solar-svn] Revision 2899
pmjones at solarphp.com
pmjones at solarphp.com
Fri Oct 19 18:44:31 CDT 2007
Standards: [BRK] The locale key prefix for validation-failure messages is now 'INVALID_' (vice 'VALIDATE_').
Modified: trunk/Solar/Filter/Locale/en_US.php
===================================================================
--- trunk/Solar/Filter/Locale/en_US.php 2007-10-19 23:35:54 UTC (rev 2898)
+++ trunk/Solar/Filter/Locale/en_US.php 2007-10-19 23:44:30 UTC (rev 2899)
@@ -15,38 +15,38 @@
*
*/
return array(
- 'VALIDATE_ALNUM' => 'Please use only letters (A-Z) and numbers (0-9).',
- 'VALIDATE_ALPHA' => 'Please use only the letters A-Z.',
- 'VALIDATE_BLANK' => 'This value must be blank.',
- 'VALIDATE_BOOL' => 'This value should be true (yes) or false (no).',
- 'VALIDATE_COMPARE' => 'This value is not the same as the other one.',
- 'VALIDATE_CTYPE' => 'This value does not match the required c-type.',
- 'VALIDATE_EMAIL' => 'Please enter a valid email address.',
- 'VALIDATE_FLOAT' => 'Please enter a floating-point number.',
- 'VALIDATE_INT' => 'Please use only whole numbers.',
- 'VALIDATE_IN_KEYS' => 'Please choose a different value.',
- 'VALIDATE_IN_LIST' => 'Please choose a different value.',
- 'VALIDATE_IP' => 'Please use a valid IP address (v4 or v6).',
- 'VALIDATE_IPV4' => 'Please use a valid IPv4 address.',
- 'VALIDATE_IPV6' => 'Please use a valid IPv6 address.',
- 'VALIDATE_ISO_DATE' => 'Please enter a date in "yyyy-mm-dd" format.',
- 'VALIDATE_ISO_TIME' => 'Please enter a time in "hh:ii:ss" format.',
- 'VALIDATE_ISO_TIMESTAMP' => 'Please enter a timestamp in "yyyy-mm-ddThh:ii:ss" format.',
- 'VALIDATE_LOCALE_CODE' => 'Please use a valid language-and-contry code in "ll_CC" format.',
- 'VALIDATE_MAX' => 'Please enter a smaller value.',
- 'VALIDATE_MAX_LENGTH' => 'Please enter a shorter string.',
- 'VALIDATE_MIME_TYPE' => 'Please enter a valid mime-type (e.g., "text/plain").',
- 'VALIDATE_MIN' => 'Please enter a larger value.',
- 'VALIDATE_MIN_LENGTH' => 'Please enter a longer string.',
- 'VALIDATE_NOT_BLANK' => 'This value is not allowed to be blank.',
- 'VALIDATE_NOT_ZERO' => 'This value is not allowed to be zero.',
- 'VALIDATE_NUMERIC' => 'Please use a number.',
- 'VALIDATE_PREG_MATCH' => 'This value does not match the required expression.',
- 'VALIDATE_RANGE' => 'This value is outside the allowed range.',
- 'VALIDATE_RANGE_LENGTH' => 'This value is too short, or too long.',
- 'VALIDATE_SEP_WORDS' => 'Please use only letters (A-Z), numbers (0-9), underscores(_), and separators.',
- 'VALIDATE_SIZE_SCOPE' => 'This value is not of the proper size and scope.',
- 'VALIDATE_STRING' => 'Please enter a string.',
- 'VALIDATE_URI' => 'Please enter a valid web address.',
- 'VALIDATE_WORD' => 'Please use only letters (A-Z), numbers (0-9), and underscores(_).',
+ 'INVALID_ALNUM' => 'Please use only letters (A-Z) and numbers (0-9).',
+ 'INVALID_ALPHA' => 'Please use only the letters A-Z.',
+ 'INVALID_BLANK' => 'This value must be blank.',
+ 'INVALID_BOOL' => 'This value should be true (yes) or false (no).',
+ 'INVALID_COMPARE' => 'This value is not the same as the other one.',
+ 'INVALID_CTYPE' => 'This value does not match the required c-type.',
+ 'INVALID_EMAIL' => 'Please enter a valid email address.',
+ 'INVALID_FLOAT' => 'Please enter a floating-point number.',
+ 'INVALID_INT' => 'Please use only whole numbers.',
+ 'INVALID_IN_KEYS' => 'Please choose a different value.',
+ 'INVALID_IN_LIST' => 'Please choose a different value.',
+ 'INVALID_IP' => 'Please use a valid IP address (v4 or v6).',
+ 'INVALID_IPV4' => 'Please use a valid IPv4 address.',
+ 'INVALID_IPV6' => 'Please use a valid IPv6 address.',
+ 'INVALID_ISO_DATE' => 'Please enter a date in "yyyy-mm-dd" format.',
+ 'INVALID_ISO_TIME' => 'Please enter a time in "hh:ii:ss" format.',
+ 'INVALID_ISO_TIMESTAMP' => 'Please enter a timestamp in "yyyy-mm-ddThh:ii:ss" format.',
+ 'INVALID_LOCALE_CODE' => 'Please use a valid language-and-contry code in "ll_CC" format.',
+ 'INVALID_MAX' => 'Please enter a smaller value.',
+ 'INVALID_MAX_LENGTH' => 'Please enter a shorter string.',
+ 'INVALID_MIME_TYPE' => 'Please enter a valid mime-type (e.g., "text/plain").',
+ 'INVALID_MIN' => 'Please enter a larger value.',
+ 'INVALID_MIN_LENGTH' => 'Please enter a longer string.',
+ 'INVALID_NOT_BLANK' => 'This value is not allowed to be blank.',
+ 'INVALID_NOT_ZERO' => 'This value is not allowed to be zero.',
+ 'INVALID_NUMERIC' => 'Please use a number.',
+ 'INVALID_PREG_MATCH' => 'This value does not match the required expression.',
+ 'INVALID_RANGE' => 'This value is outside the allowed range.',
+ 'INVALID_RANGE_LENGTH' => 'This value is too short, or too long.',
+ 'INVALID_SEP_WORDS' => 'Please use only letters (A-Z), numbers (0-9), underscores(_), and separators.',
+ 'INVALID_SIZE_SCOPE' => 'This value is not of the proper size and scope.',
+ 'INVALID_STRING' => 'Please enter a string.',
+ 'INVALID_URI' => 'Please enter a valid web address.',
+ 'INVALID_WORD' => 'Please use only letters (A-Z), numbers (0-9), and underscores(_).',
);
\ No newline at end of file
Added: trunk/Solar/Filter/Locale/pt_BR.php
===================================================================
--- trunk/Solar/Filter/Locale/pt_BR.php (rev 0)
+++ trunk/Solar/Filter/Locale/pt_BR.php 2007-10-19 23:44:30 UTC (rev 2899)
@@ -0,0 +1,51 @@
+<?php
+/**
+ *
+ * Locale file; returns the strings for a specific language.
+ *
+ * @category Solar
+ *
+ * @package Solar_Filter
+ *
+ * @author Rodrigo Moraes <http://tipos.org>
+ *
+ * @license http://opensource.org/licenses/bsd-license.php BSD
+ *
+ * @version $Id: pt_BR.php 939 2007-07-29 20:19:04Z moraes $
+ *
+ */
+return array(
+ 'INVALID_ALNUM' => 'Use apenas letras (A-Z) ou números (0-9).',
+ 'INVALID_ALPHA' => 'Use apenas letras (A-Z).',
+ 'INVALID_BLANK' => 'Este valor deve permanecer em branco.',
+ 'INVALID_BOOL' => 'Este valor deve ser verdadeiro (sim) ou falso (não).',
+ 'INVALID_CTYPE' => 'Este valor não é um c-type válido.',
+ 'INVALID_EMAIL' => 'Digite um endereço de email válido.',
+ 'INVALID_FLOAT' => 'Use um valor decimal.',
+ 'INVALID_INT' => 'Use apenas números inteiros.',
+ 'INVALID_IN_KEYS' => 'Escolha um valor diferente.',
+ 'INVALID_IN_LIST' => 'Escolha um valor diferente.',
+ 'INVALID_IP' => 'Informe um endereço IP válido (v4 ou v6).',
+ 'INVALID_IPV4' => 'Informe um endereço IPv4 válido.',
+ 'INVALID_IPV6' => 'Informe um endereço IPv6 válido.',
+ 'INVALID_ISO_DATE' => 'Informe uma data no formato "aaaa-mm-dd".',
+ 'INVALID_ISO_TIME' => 'Informe um horário no formato "hh:mm:ss".',
+ 'INVALID_ISO_TIMESTAMP' => 'Informe uma data no formato "aaaa-mm-ddThh:mm:ss".',
+ 'INVALID_LOCALE_CODE' => 'Informe uma código de idioma e paÃs no formato "ii_PP".',
+ 'INVALID_MAX' => 'Use um valor menor.',
+ 'INVALID_MAX_LENGTH' => 'Digite um texto menor.',
+ 'INVALID_MIME_TYPE' => 'Informe um mime-type válido (por exemplo, "text/plain").',
+ 'INVALID_MIN' => 'Use um valor maior.',
+ 'INVALID_MIN_LENGTH' => 'Digite um texto maior.',
+ 'INVALID_NOT_BLANK' => 'Este valor não pode ser deixado em branco.',
+ 'INVALID_NOT_ZERO' => 'Este valor não pode ser zero.',
+ 'INVALID_NUMERIC' => 'Use um número.',
+ 'INVALID_RANGE' => 'Este valor está fora do limite permitido.',
+ 'INVALID_RANGE_LENGTH' => 'Este valor é muito curto ou muito longo.',
+ 'INVALID_REGEX' => 'Este valor não corresponde à uma expressão permitida.',
+ 'INVALID_SEP_WORDS' => 'Use apenas letras (A-Z), números (0-9), underscore (_) ou separadores.',
+ 'INVALID_SIZE_SCOPE' => 'Este valor não tem um tamanho e escopo apropriado.',
+ 'INVALID_STRING' => 'Digite um texto.',
+ 'INVALID_URI' => 'Use um endereço de internet válido.',
+ 'INVALID_WORD' => 'Use apenas letras (A-Z), números (0-9) ou underscore (_).',
+);
\ No newline at end of file
Modified: trunk/Solar/Filter.php
===================================================================
--- trunk/Solar/Filter.php 2007-10-19 23:35:54 UTC (rev 2898)
+++ trunk/Solar/Filter.php 2007-10-19 23:44:30 UTC (rev 2899)
@@ -563,7 +563,7 @@
// is it blank?
if ($blank) {
- $msg = $this->_chainLocale('VALIDATE_NOT_BLANK');
+ $msg = $this->_chainLocale('INVALID_NOT_BLANK');
$this->_chain_invalid[$key][] = $msg;
}
}
@@ -638,8 +638,10 @@
*/
protected function _chainLocale($key)
{
- // the translation key ... converts from
- // 'validatePregReplace' => 'VALIDATE_PREG_REPLACE'
+ // 'validatePregReplace' => 'invalidPregReplace'
+ $key = 'invalid' . substr($key, 8);
+
+ // 'validatePregReplace' => 'INVALID_PREG_REPLACE'
$key = strtoupper(preg_replace('/([a-z])([A-Z])/', '$1_$2', $key));
// the translated message
Modified: trunk/Solar/Locale/en_US.php
===================================================================
--- trunk/Solar/Locale/en_US.php 2007-10-19 23:35:54 UTC (rev 2898)
+++ trunk/Solar/Locale/en_US.php 2007-10-19 23:44:30 UTC (rev 2899)
@@ -54,30 +54,6 @@
'ERR_METHOD_NOT_CALLABLE' => 'Method not callable.',
'ERR_METHOD_NOT_IMPLEMENTED' => 'Method not implemented.',
- // validation messages (used when validation fails)
- 'VALID_ALPHA' => 'Please use only the letters A-Z.',
- 'VALID_ALNUM' => 'Please use only letters (A-Z) and numbers (0-9).',
- 'VALID_BLANK' => 'This value must be blank.',
- 'VALID_EMAIL' => 'Please enter a valid email address.',
- 'VALID_INKEYS' => 'Please choose a different value.',
- 'VALID_INLIST' => 'Please choose a different value.',
- 'VALID_INTEGER' => 'Please use only whole numbers.',
- 'VALID_ISODATE' => 'Please enter a date in "yyyy-mm-dd" format.',
- 'VALID_ISOTIMESTAMP' => 'Please enter a timestamp in "yyyy-mm-ddThh:ii:ss" format.',
- 'VALID_ISOTIME' => 'Please enter a time in "hh:ii:ss" format.',
- 'VALID_MAX' => 'Please enter a smaller value.',
- 'VALID_MAXLENGTH' => 'Please enter a shorter string.',
- 'VALID_MIN' => 'Please enter a larger value.',
- 'VALID_MINLENGTH' => 'Please enter a longer string.',
- 'VALID_NOTZERO' => 'This value is not allowed to be zero.',
- 'VALID_NOTBLANK' => 'This value is not allowed to be blank.',
- 'VALID_RANGE' => 'This value is outside the allowed range.',
- 'VALID_RANGELENGTH' => 'This value is too short, or too long.',
- 'VALID_SCOPE' => 'This value is not in the proper scope.',
- 'VALID_SEPWORDS' => 'Please use only letters (A-Z), numbers (0-9), underscores(_), and separators.',
- 'VALID_URI' => 'Please enter a valid web address.',
- 'VALID_WORD' => 'Please use only letters (A-Z), numbers (0-9), and underscores(_).',
-
// success feedback messages
'SUCCESS_FORM' => 'Saved.',
Modified: trunk/Solar/Locale/fr_FR.php
===================================================================
--- trunk/Solar/Locale/fr_FR.php 2007-10-19 23:35:54 UTC (rev 2898)
+++ trunk/Solar/Locale/fr_FR.php 2007-10-19 23:44:30 UTC (rev 2899)
@@ -43,26 +43,6 @@
'ERR_CONNECTION_FAILED' => 'Connection invalide.',
'ERR_INVALID' => 'Donnée invalide.',
- // validation messages
- 'VALID_ALPHA' => 'Veuillez utiliser esclusivement les lettres A-Z.',
- 'VALID_ALNUM' => 'Veuillez utiliser esclusivement les lettres (A-Z) et les nombres (0-9)',
- 'VALID_BLANK' => 'Cette valeur n\'est pas autorisée.',
- 'VALID_EMAIL' => 'Veuillez entrer une adresse email valide.',
- 'VALID_INKEYS' => 'Veuillez choisir une valeur différente.',
- 'VALID_INLIST' => 'Veuillez choisir une valeur différente.',
- 'VALID_SCOPE' => 'Cette valeur n\'appartient pas à la cible définie.',
- 'VALID_INTEGER' => 'Veuillez exclusivement utiliser des nombres entiers.',
- 'VALID_ISODATE' => 'Veuillez entrer une date au format "yyyy-mm-dd".',
- 'VALID_ISOTIMESTAMP' => 'Veuillez entrer une date-temps au format "yyyy-mm-ddThh:mm:ss".',
- 'VALID_ISOTIME' => 'Veuillez entrer un temps au format "hh:mm:ss".',
- 'VALID_MAX' => 'Veuillez entrer une valeur plus petite.',
- 'VALID_MAXLENGTH' => 'Veuillez entrer un texte moins long.',
- 'VALID_MIN' => 'Veuillez entrer une plus grande valeur.',
- 'VALID_MINLENGTH' => 'Veuillez entrer un texte plus long.',
- 'VALID_NOTZERO' => 'Cette valeur ne peut pas être zéro.',
- 'VALID_NOTBLANK' => 'Cette valeur doit être laissée en blanc.',
- 'VALID_URI' => 'Veuiilez entrer une adresse web valide.',
-
// success/failure messages
'SUCCESS_SAVED' => 'Sauvegardé.',
'FAILURE_FORM' => 'Merci de corriger les erreurs affichées.',
Modified: trunk/Solar/Locale/pt_BR.php
===================================================================
--- trunk/Solar/Locale/pt_BR.php 2007-10-19 23:35:54 UTC (rev 2898)
+++ trunk/Solar/Locale/pt_BR.php 2007-10-19 23:44:30 UTC (rev 2899)
@@ -56,30 +56,6 @@
'ERR_METHOD_NOT_CALLABLE' => 'Método não pode ser invocado.',
'ERR_METHOD_NOT_IMPLEMENTED' => 'Método não implementado.',
- // validation messages (used when validation fails)
- 'VALID_ALPHA' => 'Por favor, utilize apenas as letras A-Z.',
- 'VALID_ALNUM' => 'Por favor, utilize apenas as letras (A-Z) e números (0-9).',
- 'VALID_BLANK' => 'Este valor deve permanecer como não preenchido.',
- 'VALID_EMAIL' => 'Por favor, entre com um endereço de email válido.',
- 'VALID_INKEYS' => 'Por favor, selecione um valor diferente.',
- 'VALID_INLIST' => 'Por favor, selecione um valor diferente.',
- 'VALID_INTEGER' => 'Por favor, utilize apenas números inteiros.',
- 'VALID_ISODATE' => 'Por favor, entre com uma data no formato "yyyy-mm-dd".',
- 'VALID_ISOTIMESTAMP' => 'Por favor, entre com a data e o tempo (data-tempo) no formato "yyyy-mm-ddThh:ii:ss".',
- 'VALID_ISOTIME' => 'Por favor, entre com o horário no formato "hh:ii:ss".',
- 'VALID_MAX' => 'Por favor, entre com um valor menor.',
- 'VALID_MAXLENGTH' => 'Por favor, entre com uma string menor.',
- 'VALID_MIN' => 'Por favor, entre com um valor maior.',
- 'VALID_MINLENGTH' => 'Por favor, entre com uma string maior.',
- 'VALID_NOTZERO' => 'Este valor não pode ser zero.',
- 'VALID_NOTBLANK' => 'Este valor não pode ser deixado em branco.',
- 'VALID_RANGE' => 'Este valor está fora dos limites permitidos.',
- 'VALID_RANGELENGTH' => 'Este valor é muito curto ou muito longo.',
- 'VALID_SCOPE' => 'Este valor náo está contido em um escopo apropriado.',
- 'VALID_SEPWORDS' => 'Por favor, utilize apenas letras (A-Z), números (0-9), underscores (_), e separadores.',
- 'VALID_URI' => 'Por favor, entre com um endereço web válido.',
- 'VALID_WORD' => 'Por favor, utilize apenas letras (A-Z), números (0-9), e underscores (_).',
-
// success feedback messages
'SUCCESS_FORM' => 'Salvo.',
Added: trunk/Solar/Sql/Model/Locale/en_US.php
===================================================================
--- trunk/Solar/Sql/Model/Locale/en_US.php (rev 0)
+++ trunk/Solar/Sql/Model/Locale/en_US.php 2007-10-19 23:44:30 UTC (rev 2899)
@@ -0,0 +1,5 @@
+<?php
+return array(
+ 'INVALID_CONFIRM' => 'The confirmation value is not the same as the original.',
+ 'INVALID_UNIQUE' => 'This value is already in use.',
+);
\ No newline at end of file
Added: trunk/Solar/Sql/Model/Locale/pt_BR.php
===================================================================
--- trunk/Solar/Sql/Model/Locale/pt_BR.php (rev 0)
+++ trunk/Solar/Sql/Model/Locale/pt_BR.php 2007-10-19 23:44:30 UTC (rev 2899)
@@ -0,0 +1,5 @@
+<?php
+return array(
+ 'INVALID_CONFIRM' => 'O valor de confirmação não é idêntico.',
+ 'INVALID_UNIQUE' => 'Este valor já está em uso.',
+);
\ No newline at end of file
More information about the Solar-svn
mailing list