Broken link to PO file

Topics: General
Apr 19, 2013 at 2:00 PM
Does anyone know where can I get the en-US PO file?

The link on the Orchard website is broken (http://orchardproject.net/localize/download/en-US).

Thanks!
Coordinator
Apr 22, 2013 at 5:22 AM
What do you need it for?
Apr 22, 2013 at 5:22 PM
Edited Apr 22, 2013 at 5:29 PM
Bertrand,

There is a string on the ReCaptchaPartDriver class that I would like to localize, actually just change its value, the "Incorrect word" text:
if(!HandleValidateResponse(context, result)) {
                    updater.AddModelError("Parts_ReCaptcha_Fields", T("Incorrect word"));
                }
I was planning on modifying the orchard.module.po to something like:
#: Orchard.AntiSpam.Drivers.ReCaptchaPartDriver
#| msgid "Incorrect word"
msgctxt "Orchard.AntiSpam.Drivers.ReCaptchaPartDriver"
msgid "Incorrect word"
msgstr "The text you entered in the Captcha field does not match the image"
By the way, if I modify the file located at \src\Orchard.Web\Modules\Orchard.AntiSpam\App_Data\Localization\en-US\orchard.module.po, will it get updated (overwritten) when we update to the next version of Orchard? I believe it would, right?

Thanks.
Coordinator
Apr 22, 2013 at 6:03 PM
Please fix the text in place, file a bug and attach the patch or make a pull request. Bringing in the en-us po file is not just overkill, it also won't work.
Apr 22, 2013 at 7:21 PM
Bertrand,

Thank you for your feedback. So, just to make sure I understood correctly, you are telling me to change the code on ReCaptchaPartDriver.cs:

From this:
if(!HandleValidateResponse(context, result)) {
    updater.AddModelError("Parts_ReCaptcha_Fields", T("Incorrect word"));
                }
To this?
if(!HandleValidateResponse(context, result)) {
    updater.AddModelError("Parts_ReCaptcha_Fields", T("The text you entered in the Captcha field does not match the image"));
                }
Coordinator
Apr 22, 2013 at 7:40 PM
Agree, this text is stupid, doesn't help at all. And yes I made up this one.
Apr 22, 2013 at 9:08 PM
I can change this, no problem at all, however what happens to all the Localization files (that other people have already created)?

The files currently contain a definition for the term "Incorrect word", correct? What will happen to them if I change this?

For example, the French translation:
#: Orchard.AntiSpam.Drivers.ReCaptchaPartDriver
#| msgid "Incorrect word"
msgctxt "Orchard.AntiSpam.Drivers.ReCaptchaPartDriver"
msgid "Incorrect word"
msgstr "Mot incorrect"
Thanks,
Rafael
Coordinator
Apr 22, 2013 at 9:11 PM
The translations will have to include the translation for the new text once it is changed, and the old one will be obsoleted. This happens all the time, and is not a problem.
Apr 23, 2013 at 5:15 PM
Bertrand and Sebastien,

Since this is the first time I am submitting a patch, I just wanted to make sure I did it correctly so that I don't cause any disruptions. Would you mind looking at the source code on the repository to make sure the Commit was fine? The Branch, Review, etc?

I've added a comment to the Work Item # 19638. And here is a copy of the Patch.

Thank you.
# HG changeset patch
# User rafaelmedeiros
# Date 1366733527 14400
# Node ID 1af36d2630afef6703180145c2fb2078992022ad
# Parent  b3601054d64122535c36c7ad49b527c7f11e3fa2
#19638: Modified the text to be more meaningful.

diff -r b3601054d641 -r 1af36d2630af src/Orchard.Web/Modules/Orchard.AntiSpam/Drivers/ReCaptchaPartDriver.cs
--- a/src/Orchard.Web/Modules/Orchard.AntiSpam/Drivers/ReCaptchaPartDriver.cs   Mon Oct 29 11:25:36 2012 -0700
+++ b/src/Orchard.Web/Modules/Orchard.AntiSpam/Drivers/ReCaptchaPartDriver.cs   Tue Apr 23 12:12:07 2013 -0400
@@ -51,7 +51,7 @@
                     );
 
                 if(!HandleValidateResponse(context, result)) {
-                    updater.AddModelError("Parts_ReCaptcha_Fields", T("Incorrect word"));
+                    updater.AddModelError("Parts_ReCaptcha_Fields", T("The text you entered in the Captcha field does not match the image"));
                 }
             }
 
Coordinator
Apr 24, 2013 at 3:00 AM
I would check your commit if you could point me to it.
Apr 24, 2013 at 3:12 PM
Thanks Bertrand, I believe it is fine.

Here is the Commit Link
And here the Issue Link