Comments (17)
Just tested it here: added the language tags and changed my site to chinese. Resulting booking mails were as expected in Chinese ...
from events-made-easy.
I tested it multiple times today and all my contact person emails are in English. I don't think something's wrong with Polylang + Loco because the registrant received all the emails in Chinese.
Booking Cancelled Email Subject:
[:en]Registration for '#_EVENTNAME' cancelled[:zh]取消了 "#_EVENTNAME" 的预订[:]
Booking Cancelled Email Body:
[:en]
Dear #_PERSONFULLNAME,
Your request to register #_RESPSEATS seat(s) for #_EVENTNAME has been cancelled.
With Metta,
#_CONTACTPERSON
[:zh]
亲爱的 #_PERSONFULLNAME,
你为 #_EVENTNAME 预订的 #_RESPSEATS 个座位的请求已被取消。
祝安康快乐,
#_CONTACTPERSON
[:]
Contact Person Cancelled Booking Email Subject:
[:en]A registration has been cancelled for '#_EVENTNAME'[:zh]已取消 '#_EVENTNAME' 的预订[:]
Contact Person Cancelled Booking Email Body:
[:en]
#_PERSONFULLNAME (#_PERSONEMAIL) has cancelled for #_EVENTNAME on #_STARTDATE.
Now there are #_RESERVEDSEATS seat(s) registered, #_AVAILABLESEATS are still available.
With Metta,
Events Manager
[:zh]
#_PERSONFULLNAME(#_PERSONEMAIL)已经取消了 #_STARTDATE 的#_EVENTNAME。
现在有 #_RESERVEDSEATS 个座位被预订,仍有 #_AVAILABLESEATS 个座位可用。
祝安康快乐,
活动经理
[:]
My templates also seem to be right.
What other settings, other than templates, can I check for proper translations?
Edit:
The confirmation message is also not being translated.
The message is already translated in Glotpress.
Edit 2:
Cancellation messages are translated though. But the date is not translated. 'March' should be translated to '3月‘ and the date format to Y F j.
Cancellation confirmation:
from events-made-easy.
Translation of dates is done through php, not EME.
But I think something else is wrong ... this message is clearly translated in EME:
$ret_string .= "<div class='eme-message-success eme-rsvp-message-success'>" . __( 'Thank you for confirming these bookings.', 'events-made-easy' ) . '</div>';
So if that translation is not coming through, something else is not working as expected (not EME). So several questions:
- how do you switch languages in polylang?
- what do you mean with glotpress? Is that your local translation installation?
What are your polylang url settings? See:
from events-made-easy.
And since polylang seems extremely complicated to me, can you put up a test website (not live) and provide me with an account to test? Also: make sure you can reproduce the problem on the test site and provide the simplest scenario for me to test.
from events-made-easy.
- This is from Polylang:
The language is either set by the language code in URL, or you can use a different sub-domain or domain per language.
My registration forms are 2 different posts with one set to English and the other set to Chinese. There is also a setting to link these 2 posts together. To switch languages, there is a widget at the top right hand corner to do so.
You can go to my test website/web page to see the registration forms.
-
I mean the plugin's translation handled by Wordpress. Not sure what it's called. I see the names "Polyglot", "Glotpress" in the documentation.
Edit:
4) Sent the link to your email. You can use the posts mentioned above to do your testing. It should be the first 2 posts in "All Posts". The 4 recurrent events shown in EME are the ones I am using for the registration forms for both languages.
from events-made-easy.
Currently (see mail), I think it is related to the polylang-language set for the special events page. I now removed that language, causing the page to be in the language of choice (and not the per-page set language). Feel free to provide feedback.
from events-made-easy.
I'm having problems with my email provider. Their webmail server is taking very long to load so I can't access the emails sent from the test server. I will update once their server is back to normal.
from events-made-easy.
you can also look in the EME email-management menu, tab "sent emails", all emails from EME are kept there.
I do see that there are translation tags around the person name (in that tab), how/why did you do that?
from events-made-easy.
btw: I clicked on a link in the mail (assuming it is unsubscribe/confirm or so) and got a bunch of chinese characters back, so it seems ok for me :-)
from events-made-easy.
you can also look in the EME email-management menu, tab "sent emails", all emails from EME are kept there. I do see that there are translation tags around the person name (in that tab), how/why did you do that?
It's because Chinese names are in the format LASTNAME + FIRSTNAME, whereas for English names, it is in the format FIRSTNAME + LASTNAME.
from events-made-easy.
It is working now! Thanks so much!
Any changes in code to prevent this from happening again?
Edit:
I now removed that language, causing the page to be in the language of choice (and not the per-page set language). Feel free to provide feedback.
Is this a change in EME code?
from events-made-easy.
In fact this is not an EME issue but an polylang issue. As I said in my mail:
The actual problem is that the special events page is "linked" to english. Best to do here:
- delete the special events page
- disable polylang
- create new events page
- enable polylang
- set the new page in the EME options (Events tab) settings
Since the page is then not linked to a language, it should use the language of choice at that moment.
Also:
I went a little further and added code to EME that will remove the polylang language if set to it. So that should solve it for future cases :-) . In theory polylang should just provide an option to remove the language for specific pages, as I can't start including code for each translation plugin myself. In that case, the workaround as above is also ok.
However: it might be that one needs to refresh the rewrite rules if the language ever gets added again, we'll see that when it happens again.
from events-made-easy.
The code will be in the next version of EME (and is on your dev-site).
Now: does this mean that the name translation is incorrect, or just stored/displayed wrong in EME "sent email" tab?
from events-made-easy.
And while I'm at it, this info on polylang was already in the plugin compatibility document:
https://www.e-dynamics.be/wordpress/compatibility-with-other-plugins/
That would've saved us some time ... :-)
from events-made-easy.
I will report this issue to Polylang and see if they can do anything about it.
from events-made-easy.
The code will be in the next version of EME (and is on your dev-site). Now: does this mean that the name translation is incorrect, or just stored/displayed wrong in EME "sent email" tab?
In the "Email Templates" Settings, if I do not use the language tags and using First + Last:
The email I receive will also be First + Last:
But if I put the language tags like this:
Then, the name for Chinese can be displayed correctly, i.e. Last + First:
Is this what you are asking?
Edit:
This is from "Sent Emails":
Do you mean that in "Sent Emails", the name should be displayed in the Chinese format, instead of current form with language tags? It has been like this ever since I started using EME so I didn't give it much thought.
from events-made-easy.
It is indeed from "Set emails". I've fixed the code now for all usage of the full name. Next version will fix that :-)
Now the gdpr issue ...
from events-made-easy.
Related Issues (20)
- Publish date is always publish date, not event date in RSS HOT 3
- Warning: Undefined variable $res in /wp-content/plugins/events-made-easy/eme-rsvp.php on line 3191 HOT 1
- "Booking Pending Email" for Contact Person not being sent HOT 1
- Bug with PHP 8.2 HOT 7
- Generic email not sending HOT 2
- Missing shortcode [eme_edit_member_form] HOT 7
- text or name search in filterform HOT 4
- Offline Payment Option not showing HOT 2
- Event page hangs if selecting Single Event Format in Single Event Title dropdown HOT 12
- WP Data not retrieved in the eme_add_member_form HOT 3
- Placeholder issue #_FIRSTNAME HOT 9
- wpdb::prepare was called incorrectly HOT 11
- compicated recurring event has issues HOT 2
- Permission Error HOT 4
- Weekly stopped working HOT 1
- The payment link to Stripe no longer works HOT 1
- Custom Attributes: display all by default HOT 1
- Plugin could not be activated because it triggered a fatal error HOT 10
- Fatal error HOT 2
- Calculate "etxra charge" of custom field only once in multibooking forms HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from events-made-easy.