ZF-9930: Spanish translation for Zend_Validate messages

Description

Hi,

Please find attached the Spanish (es_ES) translation of the Zend_Validate messages. This should be put under /resources/languages/es/

I can't find this alredy there as of r22347

Comments

thank you for contributing. However, no file was attached.

Please note that the file revision fields and associated information should be updated within the file before committing it to trunk.

Hi Dolf,

Now there's one. Sorry, it's my first improvement report and it took me a while to find my way.

Cheers, Carlos.

The added resource files have 2 problems. I would ask to correct them because I dont want to add files which have problems before they have been integrated.

Note that the resource files must be kept up to date with the english resources, otherwise it could be that the spanish resources are deleted in future.

Hi Thomas,

Thanks for your feedback. Please note that I've just compared the current version of file /standard/trunk/resources/languages/en/Zend_Validate.php (r22365) in trunk with the corresponding one delivered in ZF 1.10.5 (r22306) and they're both identical. As I made the translation on the 1.10.5 (r22306) version of the file, the translations should be fully valid now and onwards, at least until new validation messages are added to Zend_Validate_*.

Apart of that, I honestly can't find the 2 faults you mention, but if you tell me where they are located, I'll be more than happy to fix them and re-post the corrected file. I fully agree no defective files should be integrated in trunk.

Thanks, Carlos.

Actual Trunk gives the following errors:


1) testTranslationAvailableInEnglish(resources_languages_Zend_ValidateTest)
array (
  'es 1' => 'The key "The token \'%token%\' does not match the given token \'%value%\'" isn\'t available within english translation file',
  'fr 2' => 'The key "\'%value%\' contains not only digit characters" isn\'t available within english translation file',
  'it 3' => 'The key "The token \'%token%\' does not match the given token \'%value%\'" isn\'t available within english translation file',
  'ru 4' => 'The key "\'%value%\' contains not only digit characters" isn\'t available within english translation file',
  'ru 5' => 'The key "The token \'%token%\' does not match the given token \'%value%\'" isn\'t available within english translation file',
  'ru 6' => 'The key "\'%value%\' does not appear to be an postal code" isn\'t available within english translation file',
  'sr 7' => 'The key "\'%value%\' contains not only digit characters" isn\'t available within english translation file',
  'sr 8' => 'The key "The token \'%token%\' does not match the given token \'%value%\'" isn\'t available within english translation file',
  'sr 9' => 'The key "\'%value%\' does not appear to be an postal code" isn\'t available within english translation file',
  'sv 10' => 'The key "\'%value%\' contains not only digit characters" isn\'t available within english translation file',
  'sv 11' => 'The key "The token \'%token%\' does not match the given token \'%value%\'" isn\'t available within english translation file',
  'sv 12' => 'The key "\'%value%\' does not appear to be an postal code" isn\'t available within english translation file',
  'uk 13' => 'The key "The token \'%token%\' does not match the given token \'%value%\'" isn\'t available within english translation file',
  'uk 14' => 'The key "\'%value%\' does not appear to be an postal code" isn\'t available within english translation file',
)
C:\Voxtronic\3rdParty\Zend Framework\tests\resources\languages\Zend_ValidateTest
.php:133

2) testAllTranslated(resources_languages_Zend_ValidateTest)
array (
  'es 1' => 'Message "The two given tokens do not match" not translated',
  'fr 2' => 'Message "Invalid type given, the value should be a string" not translated',
  'it 3' => 'Message "Invalid type given, value should be string" not translated',
  'it 4' => 'Message "The two given tokens do not match" not translated',
  'ru 5' => 'Message "\'%value%\' contains characters which are not digits; but only digits are allowed" not translated',
  'ru 6' => 'Message "The two given tokens do not match" not translated',
  'ru 7' => 'Message "Invalid type given. The value should be a string or a integer" not translated',
  'ru 8' => 'Message "\'%value%\' does not appear to be a postal code" not translated',
  'ru 9' => 'Message "There was an internal error while using the pattern \'%pattern%\'" not translated',
  'ru 10' => 'Message "Invalid type given, the value should be a string" not translated',
  'ru 11' => 'Message "Invalid type given, the value should be a integer, a float or a numeric string" not translated',
  'sr 12' => 'Message "The two given tokens do not match" not translated',
  'sr 13' => 'Message "Invalid type given. The value should be a string or a integer" not translated',
  'sr 14' => 'Message "\'%value%\' does not appear to be a postal code" not translated',
  'sr 15' => 'Message "There was an internal error while using the pattern \'%pattern%\'" not translated',
  'sr 16' => 'Message "Invalid type given, the value should be a string" not translated',
  'sr 17' => 'Message "Invalid type given, the value should be a integer, a float or a numeric string" not translated',
  'sv 18' => 'Message "\'%value%\' contains characters which are not digits; but only digits are allowed" not translated',
  'sv 19' => 'Message "The two given tokens do not match" not translated',
  'sv 20' => 'Message "Invalid type given. The value should be a string or a integer" not translated',
  'sv 21' => 'Message "\'%value%\' does not appear to be a postal code" not translated',
  'sv 22' => 'Message "There was an internal error while using the pattern \'%pattern%\'" not translated',
  'sv 23' => 'Message "Invalid type given, the value should be a string" not translated',
  'sv 24' => 'Message "Invalid type given, the value should be a integer, a float or a numeric string" not translated',
  'uk 25' => 'Message "The two given tokens do not match" not translated',
  'uk 26' => 'Message "Invalid type given. The value should be a string or a integer" not translated',
  'uk 27' => 'Message "\'%value%\' does not appear to be a postal code" not translated',
  'uk 28' => 'Message "There was an internal error while using the pattern \'%pattern%\'" not translated',
  'uk 29' => 'Message "Invalid type given, the value should be a string" not translated',
  'uk 30' => 'Message "Invalid type given, the value should be a integer, a float or a numeric string" not translated',
)
C:\Voxtronic\3rdParty\Zend Framework\tests\resources\languages\Zend_ValidateTest
.php:212

FAILURES!
Tests: 6, Assertions: 0, Failures: 2.

as you can see there are 2 failures for the language "es". I tested with r22365 as mentioned by you.

Hi Thomas,

Ummmmmm, I see. I really don't understand what happened. Anyway, the attached file should now be fixed. Actually, the 2 assertion failures were for the same wrong Zend_Validate_Identical message, one for the key that shouldn't be there, the other one for the key that was missing.

Thanks for the feedback!

Best regards, Carlos.

Added with r22375

Note: Keep in mind to keep this language up to date. Otherwise it could be reverted from core (ru, sv, sr and uk will probably be reverted for the next release)

Reopened:

The given file contains invalid characters. &xxx; character encoding is not allowed.

All content have to be given in UTF8. Please change the resource file.

Hi Thomas,

Here you go! The new attached file is purely in UTF-8. Besides, as I read all the strings again to remove HTML entities, I also corrected some few minor errors, so the translations are a bit more "accurate" now.

Excuse my ignorance: I understand the need for UTF-8, but it shouldn't have anything to do with whether certain HTML entities are used or not, right? For example, ZF makes use of PHP's htmlentities() in different parts of the framework to escape content that could perfectly be in UTF-8, and still HTML entities are thus used. So, is this more a style decision, or has it a "deeper" intention?

Thanks for your patience. As I said, I'm new contributing ZF and I'd like to continue learning along the process, so any feedback is, again, welcome!

Best regards, Carlos.

Thank you.. I'll commit it tomorrow.

UTF-8: The translations are not only used for HTML but also for other views. So it is not fixed that we have htmlentities in place. Therefor all content (especially translations) must be given as UTF-8.

Beside that it is a rule for ZF itself that everything has to be given in UTF-8.

Implemented with r22386