Giter VIP home page Giter VIP logo

Comments (17)

liedekef avatar liedekef commented on August 13, 2024

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.

refugeindhamma avatar refugeindhamma commented on August 13, 2024

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.

Registrant's emails:
image

Contact person's emails:
image

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.
image

The message is already translated in Glotpress.
image

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:
image

Cancellation confirmed:
image

from events-made-easy.

liedekef avatar liedekef commented on August 13, 2024

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:
image

from events-made-easy.

liedekef avatar liedekef commented on August 13, 2024

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.

refugeindhamma avatar refugeindhamma commented on August 13, 2024
  1. 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.

  1. I mean the plugin's translation handled by Wordpress. Not sure what it's called. I see the names "Polyglot", "Glotpress" in the documentation.

  2. Polylang's URL settings
    image

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.

liedekef avatar liedekef commented on August 13, 2024

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.

refugeindhamma avatar refugeindhamma commented on August 13, 2024

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.

liedekef avatar liedekef commented on August 13, 2024

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.

liedekef avatar liedekef commented on August 13, 2024

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.

refugeindhamma avatar refugeindhamma commented on August 13, 2024

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.

refugeindhamma avatar refugeindhamma commented on August 13, 2024

It is working now! Thanks so much!
image

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.

liedekef avatar liedekef commented on August 13, 2024

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.

liedekef avatar liedekef commented on August 13, 2024

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.

liedekef avatar liedekef commented on August 13, 2024

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.

refugeindhamma avatar refugeindhamma commented on August 13, 2024

I will report this issue to Polylang and see if they can do anything about it.

from events-made-easy.

refugeindhamma avatar refugeindhamma commented on August 13, 2024

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:
image

The email I receive will also be First + Last:
image

But if I put the language tags like this:
image

Then, the name for Chinese can be displayed correctly, i.e. Last + First:
image

Is this what you are asking?

Edit:
This is from "Sent Emails":
Screenshot 2023-02-07 at 08-52-45 Email management ‹ Refuge In Dhamma — WordPress

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.

liedekef avatar liedekef commented on August 13, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.