Many users comment that the phrase "What code is in the image" is very odd.
In English it may be: "Type the characters shown in the image"
But then other people may have better ideas - Could the user decide what instruction to give?
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | captcha-[893170].patch | 2.36 KB | pavel.karoukin |
| #7 | captcha-[893170].patch | 8.86 KB | pavel.karoukin |
Comments
Comment #1
soxofaan commentedI'm certainly open for a better phrase there.
However, I would change it in the Drupal 7 version,
and leave it in the Drupal 6 version, otherwise all translations will break.
FYI: it's already possible to change the string (in Drupal 6) with help of the String overrides module.
Comment #2
vivekkhurana commentedHow about we add a setting in the admin section, which will let admin user define the message for a site?
Comment #3
soxofaan commentedThat's a good idea, but the problem is how to handle translation/localization. Take for example the general CAPTCHA description text on the general CAPTCHA admin page. It's possible but it requires quite a bit of code and UI overhead.
I've heard of an alternative/more clean solution for this, but I can't the pointers at the moment.
Comment #4
vivekkhurana commentedHow about we follow the same translation/localization method as menu system ? A menu can be translated to various languages and yet configured via a UI.
Comment #5
soxofaan commentedI've not looked into that system in detail for D7, but if doesn't require a lot of code, that should be a good option.
Comment #6
pavel.karoukin commentedComment #7
pavel.karoukin commentedThis patch actually fix the whole image_captcha.module for D7, not just option for changing strings. I had to test this so I had to fix module =)
There is quite a bit of changes, so comments and review welcome!
Comment #8
soxofaan commented#7: captcha-[893170].patch queued for re-testing.
Comment #9
pavel.karoukin commentedOh. Completely forgot about it. Will checkout latest captcha version and update this patch once will get back home.
Comment #10
pavel.karoukin commentedHere we go.
Comment #11
soxofaan commentedHi Hippich,
Sorry for the delay, but I couldn't review your patch until now. Anyway, thanks.
The current patch works around this system:
According to the experts, this is not right way to use the t-function: String translation: why using t() for user specified text is evil?.
As noted in #3, I tried to solve this for the CAPTCHA description UI-text with quite a bit of custom code (look for "locale" in the CAPTCHA module files). I'm not really happy with it because it is ugly code and does not follow a standard Drupal workflow.
Apparently, there seem to be alternative solutions, depending on the Internationalisation (aka i18n) module, but this needs some more investigation (e.g. is i18n already stable enough for Drupal 7?). Here are already some pointers I found (but may be outdated for D7):
http://drupal.org/node/609364
http://drupal.org/node/313293
http://drupal.org/node/789286
Comment #12
pavel.karoukin commentedSo main idea is that user supplied string could be in any language, not just in english. And the only way to do it right now - do it trhough i18n, which is not even in alpha for d7.
what I think we could do - introduce new function like "captcha_translate", which will be proxy to translate code. For now it could contain direct passthru call to t(), but later it could be replaced by i18n code.
What do you think?
Comment #13
soxofaan commentedindeed, as illustrated in http://drupal.org/node/609364, I agree that something like
captcha_translate, with easily swappable implementation, should be used for translatable user defined strings.Maybe we should first do this in the Drupal 6 version were i18n is stable?
Comment #14
pavel.karoukin commentedWe will not be able to do this in D7 version anyway (until i18n will be stable enough for D7). So these should be separate issues. I will redo this patch with separate translation "proxy" function tomorrow.
Comment #15
msathesh commentedI used the string overrides module to do the job.
Comment #16
winklet commentedThe string overrides module works when you want to change the text below the text input field but NOT the part above it that says "What code is in the image?". Can this be fixed? (I need to translate it to different languages for a multilingual site).
Nevermind - it worked when I tried it a second time for some reason.
Comment #17
Netskill commentedHello,
I see you found a solution for my problem : how translate
«What code is in the image ?»
and
Enter the characters shown in the image.
Could you explain me how you do that ?
Thanks for help
Comment #18
Netskill commentedHello,
I see you found a solution for my problem : how translate
«What code is in the image ?»
and
Enter the characters shown in the image.
Could you explain me how you do that ?
Thanks for help
Comment #19
wundo commentedLatest patch still has the issue Soxofaan mentioned in 11, and I think String override is better suited to this task, so I'm marking as fixed.