Closed (fixed)
Project:
Clientside Validation
Version:
7.x-1.36
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Mar 2012 at 09:30 UTC
Updated:
4 Dec 2012 at 14:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
attiks commentedCan you provide a little bit more information? Did you translate the error message using the translate interface?
Comment #2
michiellucas commentedyes,
translations are filled in, when i disable this module the errors are translated.
Language settings:
English disabled
Dutch enabled and default
French enabled
Comment #3
attiks commentedSource language Dutch or English?
Comment #4
michiellucas commentedEnglish
Comment #5
attiks commentedAny chance I can get access to the site?
This module just calls Drupal.t() from inside javascript, so it should work the same as t() on the server side. But i never tried it with changing the default language.
Comment #6
jelle_sAlso, we put all our error messages through a theme function that looks like this:
So they really should be translated/translatable...
Comment #7
michiellucas commentedhttp://test.om.adfsolutions.eu/contact -> this is dutch
Comment #8
michiellucas commentedThis are forms embedded in panels, maybe the problem is there?
Comment #9
attiks commentedParts are translated, see screenshot. So triple check the translation interface
Comment #10
attiks commentedDefault string for required is "'!title field is required.'", but is seems you're using something like "The field !title field is required." so search for all string containing "required", I assume you didn't translate at least one.
Comment #11
michiellucas commentedComment #12
michiellucas commentedI found a part of the translation
Originele tekst !title field is required.
Now he gives this error message: The field Mijn vraag is verplicht. So he translates a part of the message.
The field is not found in translate interface.
When i disable clientside validation the messages are perfect translated.
Strange
Comment #13
michiellucas commentedThis is a webform. Something goes wrong, he thinks the label of the field is: The field Title
Strange thing is that without the clientside validation he gives to correct message
Comment #14
attiks commentedDid you define a prefix at admin/config/validation/clientside_validation - Field name prefix?
I created a webform at http://atix.be/ZkY and it seems ok to me, I translated the following strings:
Comment #15
michiellucas commentedNever trust a interim, thx for the quick answers
Comment #16
attiks commented@Michiel I assume it was the prefix?
Comment #17
Anonymous (not verified) commentedSorry to warm this old issue up, but I think I found the root of this problem: It seems like "!title field is required." and/or "!name field is required." doesn't show up anymore on localize.drupal.org. "!name field is required." was there until 7.x-1.16. Since then, it went missing on all later versions of this module. If you look here, you can see that the string "!title field is required." doesn't show up for translation in the latest version of this module. Neither does "!name field is required.".
I ran a "cat * | grep 'field is required.'" in the modules directory and I didn't find any references to a t() using this string. From what I know, this is how localize.drupal.org gets its strings from contrib. Anything else cannot be translated. I found "$message = '!title field is required.';" in the sourcecode, which seems to be a hardcoded string without using t().
Could you please have a look at this again? Thank you very much! :-)
Comment #18
attiks commentedComment #19
attiks commented#17 you're right "!title field is required." isn't at l.d.o., but "!name field is required." is.
The reason is that we added a theme wrapper function around the error messages (#6) so people can easily alter the message before it is translated.
I'll see how we can upload the regular messages to l.d.o.
Comment #20
attiks commentedWe need to add all strings to clientside_validation.api.php, so they get detected by l.d.o.
Comment #21
jelle_sFixed in latest dev. Leaving this open for now so we can see if l.d.o updates correctly.
Comment #22
Anonymous (not verified) commentedThanks for looking into this.
What I meant was that "!name field is required." isn't missing, but "disappeared". The string isn't being picked up by l.d.o in code after 7.x-1.16 of this module. The string itself is being used by a large number of other modules, therefore not missing.
"Show related projects" says:
Clientside Validation: 6.x-1.0 (5), 6.x-1.1 (5), 6.x-1.2 (2), 6.x-1.3 (2), 7.x-1.0 (2), 6.x-1.4 (2), 6.x-1.5 (2), 6.x-1.6 (2), 6.x-1.7 (2), 6.x-1.8 (2), 7.x-1.1 (4), 6.x-1.10 (4), 6.x-1.11 (2), 6.x-1.12 (2), 7.x-1.11 (2), 6.x-1.13 (4), 6.x-1.14 (4), 6.x-1.15 (2), <strong>7.x-1.16 (4)</strong>, 6.x-1.18 (4), 6.x-1.19 (4)Comment #23
attiks commented#22 that should be fixed whenever l.d.o. scans again, I assume they should be back somewhere tomorrow.
Comment #24
attiks commentedJust talked to Gabor on IRC, we need to create a new release before the strings are detected.
Comment #25
attiks commentedIt appears that clientside_validation.api.php is not picked up, @Jelle_S is going to fix it
Comment #26
jelle_sI moved the translations to clientside_validation.strings.php.
Comment #27
attiks commentedFixed in 7.x-1.36
Comment #28
Anonymous (not verified) commentedPerfect, thank you!