Closed Ben066 closed 9 years ago
Hi Benoit,
From the sounds of it, it seems like there may be a ' or " out of place in the translation that may be casuing an issue with the javascript. I will download a copy of WordPress in french and run my localhost installation in French to see if I can a) replicate the problem and then b) resolve the problem for you.
In regards to the translation file, WordPress |i8n translation engine. You'll see any translatable strings wrapped in a function similar to __("translatable text here","yikes-inc-easy-mailchimp"); or _e("translatable text here","yikes-inc-easy-mailchimp");
I thought we had wrapped the success messages in the translate function, but I could be mistaken. I will take a look into wrapping up the success messages to be translated. I will post back here shortly with my findings.
Thanks, Evan
Hi Benoi,
There is indeed a javascript error being caused by the translation. You can see the error being caused by this line:
$('#yks-status').html('<div class="error"><p>Les options ne pouvaient être sauvés (ou que vous n'avez pas à changer).</p></div>');
The quotation marks are being escaped in an improper location which is causing the other text to not be parsed properly. I will get this fixed up for you, and send over an update for you.
Evan
thank you I'll wait for the update
Ok Benoit,
I've pushed the updated french files back to the repository. You can re-download the plugin, or just overwrite the options.php file from the plugin and everything should work properly.
I'm not sure if the confirmation messages will be translated. I wrapped them in the translate function and translated them, but on my installation it seems to be sticking to english. This could be that I've saved my confirmation in english prior to translating that string. I'm sure if the first time you save the plugin settings, you're confirmation messages will be in French.
I will need to go back and wrap the error messages in the translate function as well. I don't believe the "email@email has been banned" is currently translated, but I have confirmed the other error message: "Error - The Following fields are required, and May not be left blank:" is translated into "Erreur - Les champs suivants sont obligatoires, et ne peuvent pas être laissées en blanc:"
You can go ahead and re-download and re-install the plugin from the repo: http://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/
Let me know if you run into any difficulties.
Thanks! Evan
Excellent I redid the installation of the extension, my admin interface is now in French or English according to my user. The error message with translation are translated correctly in the admin panel.
I still have questions • In the Settings section, I want to translate messages "Custom Message Opt-In" to have it in both languages my site.
If I understand well the operation of the extension. The following error messages are generated by mailchimp and display a variable using the following: # yks_form_error_message or there a file that contains all error messages ... Is can customize messages according to my needs?
When I write an invalid email address in the French form, the following messages are not translated .. eg @ Email.com -> The username portion of the email address is invalid (the portion before the @:). user @ -> The username portion of the email address is invalid (the portion before the @:). dfgsdg lssafd.com -> An email address must Contain a single @. email@email.com -> "email@email.com" has been banned.
The English form I have good error message if my email address is invalid ex: @ email.com -> The username portion of the email address is invalid (the portion before the @:). user @ -> The domain portion of the email address is invalid (the portion partner after the @:). Error - The following fields are mandatory and can not be left blank:
On my french form, when I enter an existing E-MAIL in my list I have the following message: user@yourmail.com est déjà abonné à la liste Test. Cliquez-ici pour mettre votre profil à jour.. ... The links " Cliquez-ici " is not a link. But in English I do not have the same message, I get the following message: user@yourmail.com is already subscribed.
Again a big thank you for your help
Benoit
Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active. http://www.avast.com
Hi Benoit
All of the messages you have indicated there are returned from MailChimp via the API. So as far as I can tell, they are not translatable by our plugin. We send off the request to the MailChimp services, and MailChimp returns the message based on the success or failure of what you are trying to achieve. I believe it would need to be translated on the MailChimp side before being sent back to the plugin. Maybe there is a language setting within MailChimp? I'm not sure as I've only ever used the english translation.
As far as the link "Cliquez-ici", that is stripped out in the English version because it is a link over to MailChimp to update your profile. The link takes you to your personal profile to update on their servers, so it directs you away from our plugin.
I'll take a look and see what I can find in regards to the error messages being translated before being sent back over to the plugin.
Evan
Hi Evans
Thank you for your help ..
1) That is what I understood for the handling of error messages. I made changes to my account mailchimp was using the "translate it" option, I translated my forms and error messages returned by the form. I tried the French (France) and French (Canada) translations. I still have the same error, so I was wondering where was made the management of error messages.
2) Is it possible that the message "Single Opt-In Message" is displayed according to my language?
Again thank you for your help
Benoit
De : Evan Herman [mailto:notifications@github.com] Envoyé : 9 juin 2014 09:35 À : yikesinc/yikes-inc-easy-mailchimp-extender Cc : Ben066 Objet : Re: [yikes-inc-easy-mailchimp-extender] French translation of error messages (#80)
Hi Benoit
All of the messages you have indicated there are returned from MailChimp via the API. So as far as I can tell, they are not translatable by our plugin. We send off the request to the MailChimp services, and MailChimp returns the message based on the success or failure of what you are trying to achieve. I believe it would need to be translated on the MailChimp side before being sent back to the plugin. Maybe there is a language setting within MailChimp? I'm not sure as I've only ever used the english translation.
As far as the link "Cliquez-ici", that is stripped out in the English version because it is a link over to MailChimp to update your profile. The link takes you to your personal profile to update on their servers, so it directs you away from our plugin.
I'll take a look and see what I can find in regards to the error messages being translated before being sent back over to the plugin.
Evan
— Reply to this email directly or view https://github.com/yikesinc/yikes-inc-easy-mailchimp-extender/issues/80#issuecomment-45490702 it on GitHub. https://github.com/notifications/beacon/7797891__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxNzk0MDExOSwiZGF0YSI6eyJpZCI6MzM5NjkzOTZ9fQ==--c1ece506985f32223d4eeeb40e40c714ca4c51a6.gif
Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active. http://www.avast.com
1) I am not exactly sure how error messages would be translated on the MailChimp side. That may be a question best suited for the MailChimp tech support team. Just let them know that the API is returning error messages in English and you'd like to know how to return it in the appropriate language.
2) When I went through and translated the plugin there was not an appropriate translation for "Single Opt-In Message" so instead of translating it to slang or an incorrect translation altogether I left it as is. If you'd like you can download the .po and .mo files and make the necessary translations that you need. If you do so you can post it back here and we will merge it back in with our main plugin files.
Thanks, Evan
Hi Evan
Ok i will send a message to mailchimp, about the API.
i'm sorry for the confusion about the string "Single Opt-In Message", this is not the string I want to translate, but the contents of the text box below. the string "thanks for subscribing!" i try to put the <?php _e(thanks for subscribing!)?> in the text editor but php code is blocked by the text editor..
Is there a way to get the message of thanks in both language. When the site is in french the following message "Merci pour votre inscription!" and the english site the following message "thanks for subscribing!". After completing and sending the form.
Thank
PS i'm really sorry about my english
Benoit
De : Evan Herman [mailto:notifications@github.com] Envoyé : 9 juin 2014 12:29 À : yikesinc/yikes-inc-easy-mailchimp-extender Cc : Ben066 Objet : Re: [yikes-inc-easy-mailchimp-extender] French translation of error messages (#80)
1) I am not exactly sure how error messages would be translated on the MailChimp side. That may be a question best suited for the MailChimp tech support team. Just let them know that the API is returning error messages in English and you'd like to know how to return it in the appropriate language.
2) When I went through and translated the plugin there was not an appropriate translation for "Single Opt-In Message" so instead of translating it to slang or an incorrect translation altogether I left it as is. If you'd like you can download the .po and .mo files and make the necessary translations that you need. If you do so you can post it back here and we will merge it back in with our main plugin files.
Thanks, Evan
— Reply to this email directly or view https://github.com/yikesinc/yikes-inc-easy-mailchimp-extender/issues/80#issuecomment-45511342 it on GitHub. https://github.com/notifications/beacon/7797891__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxNzk1MDU0OSwiZGF0YSI6eyJpZCI6MzM5NjkzOTZ9fQ==--d7cc21f4f9b5f4453a1c23aff89cc4755662a95b.gif
Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active. http://www.avast.com
The message isn't translating for you?
When I run the plugin on a french site I'm getting my confirmation/success messages in French. And when I'm running it on an english site, they appear in english.
Is that not working for you?
In regards to wrapping the string in the php function you need to wrap it as the other strings are wrapped. Simply adding _e() around your text will not work. You'll need to add the text domain to the end of the function.
Take a look at some of the other strings within the plugin. It's a bit more involved than that as well. After you wrap your strings you need to open the file in a .po editing program such as POEdit. After you save translate your strings, you re-save the file as an .mo file, which gets read by the plugin and spits out your strings as translated.
Yes to the site in french, it works fine .. but when I go to the English site. I have the same problem, the message appears in french, when it should be in English... My website is bilingual.
it may be something, I did not understand or wrong?
tanks
De : Evan Herman [mailto:notifications@github.com] Envoyé : 9 juin 2014 15:49 À : yikesinc/yikes-inc-easy-mailchimp-extender Cc : Ben066 Objet : Re: [yikes-inc-easy-mailchimp-extender] French translation of error messages (#80)
Why not just write the message in french yourself?
— Reply to this email directly or view https://github.com/yikesinc/yikes-inc-easy-mailchimp-extender/issues/80#issuecomment-45535387 it on GitHub. https://github.com/notifications/beacon/7797891__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxNzk2MjUxNiwiZGF0YSI6eyJpZCI6MzM5NjkzOTZ9fQ==--2ab274cb033388091f89ad1331bed772df137e96.gif
Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active. http://www.avast.com
Oh I see what the issue is. It's going to be a bit difficult to display the confirmation in both French and English. The way it works, the string gets translated after saving the settings. So when you save the confirmation in french, it gets stored as an french string. When you re-view the site in english, you'd need to re-save the settings to get the confirmation message to display back in english.
I will take a look into the core code of the plugin and see if I can figure out a way that you can have the string in both english and french. It may just require a bit of shifting around of the code to get it working properly.
I will post back here when I figure something out for you Ben.
Evan
Hello Evans,
Thank you for the time you take to resolve my issues. Just to confirm, I want the confirmation message is displayed in French for a French and English to an English visitor. (My site is multilingual English / French)
Then I contacted mailchimp, as you have suggested, about error messages untranslated and here is the answer they returned me
It's correct that when translations are activated for subscription forms some errors returned by the API will be translated while others are not. This is due to the way errors in general are handled. When going through our API Documentation (http://apidocs.mailchimp.com/), developers can see errors commonly returned by a method, including which are method-specific and which ones are broader errors. These errors indicate what an issue may be, but the details are meant to assist a developer rather than an absolute end-message to always be returned to users of the developer's system.
In situations like this, the method-specific errors are returning the translations, but some errors could be returned in much broader circumstances, including situations having nothing to do with signup forms. It's these cases which are not translated, and would be up to the plugin developer to manage.
I'll wait for the next update your plug-in, I think it is a good plugin that deserves to be better known to all thank you Benoit
De : Evan Herman [mailto:notifications@github.com] Envoyé : 9 juin 2014 16:20 À : yikesinc/yikes-inc-easy-mailchimp-extender Cc : Ben066 Objet : Re: [yikes-inc-easy-mailchimp-extender] French translation of error messages (#80)
Oh I see what the issue is. It's going to be a bit difficult to display the confirmation in both French and English. The way it works, the string gets translated after saving the settings. So when you save the confirmation in french, it gets stored as an french string. When you re-view the site in english, you'd need to re-save the settings to get the confirmation message to display back in english.
I will take a look into the core code of the plugin and see if I can figure out a way that you can have the string in both english and french. It may just require a bit of shifting around of the code to get it working properly.
I will post back here when I figure something out for you Ben.
Evan
— Reply to this email directly or view https://github.com/yikesinc/yikes-inc-easy-mailchimp-extender/issues/80#issuecomment-45538909 it on GitHub. https://github.com/notifications/beacon/7797891__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxNzk2NDQwOCwiZGF0YSI6eyJpZCI6MzM5NjkzOTZ9fQ==--5c516d5207402ea0cec0880f6275233be820a915.gif
Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active. http://www.avast.com
Hello First, a big thank you for the translation files crosses yikes-inc-easy-mailchimp-extender-fr_FR.po and yikes-inc-easy-mailchimp-extender-fr_FR.po. I met a problem, following the establishment has files in the language directory, the "save setting" button on the Manage Forms MailChimp Settings is disabled, I cannot click on the button to save the changes. I have this problem only when the interface is in French. When my admin is in English the button works correctly and I can save. Then I have a question about the different error messages, unfortunately there are not translated into the language file. example: • "email@email.com" has been banned • Error - The Following fields are required, and May not be left blank:
Is it possible to make the message of Single Opt-In message (Thank You for subscribing) translatable into different languages? The submit button on the front end form is not translated. I do translations myself, but I need help finding the form and error messages plugin file .. What am I looking for? Is it possible to remove the text "* = required field"
Thank you for your help
Benoit