Hello again,
it appears that some of the booking messages are not being localised. For example, when submitting a booking without selecting a ticket, it will state in a friendly red box: “Please select a Ticket.” rather than using the translation.
A couple of notes:
There are a couple of other occurences of this, such as other form errors or the message box stating that the user is currently logged in.
Other translated strings, e.g. the “book” button or the headline do translate properly.
Updating the mo file correctly changes affected strings – except the ones in question.
The message box stating that I have already booked an event is, unlike the others, properly translated.
The problem persists despite having most other plugins disabled.
Could this be a bug? What is different about these messages that could be causing this behavior?
Markus
Another two cases of localisation not working: The “thank you for your booking” mail does not have a translated subject nor a localised %event_date%
.
Markus
Hi Markus,
Yes, these are bugs. The translation domain is being registered too late for some of the string, and the “You are logged in as…” has the wrong translation domain. 1.3.1 will be released later in the week to fix this – and another bugs found.
Feel free to post here if you find some strings are not being translated, but hopefully changing
add_action( 'plugins_loaded', 'eventorganiser_pro_load_textdomain', 5 );
to
add_action( 'init', 'eventorganiser_pro_load_textdomain' );
in event-organiser-pro.php
should resolve most of these. (This is – in part – what will be included in the bug-fix update 1.3.1).
Stephen Harris
I’m afraid this patch is already present in my event-organiser-pro.php (line 190) in version 1.3
Markus
Sorry Markus,
I posted it the wrong way round, please change line 190 from
add_action( 'init', 'eventorganiser_pro_load_textdomain' );
to
add_action( 'plugins_loaded', 'eventorganiser_pro_load_textdomain', 5 );
Apologies for the mistake!
Stephen Harris
Thanks and no worries. The error messages are now properly translated.
Things still not being properly localised:
Upon successfully booking a free ticket it says “Thank you for registering”
The dates in the confirmation mail are not localised. A simple fix would be to add the format string (‘jS F Y’) from includes/email.php to the po files. However, there seems to be a lack of general consensus throughout the template files as well as to how to deal with date and time format strings. Might be nice to have that streamlined, e.g. by adding an option for DateTime output format to your plugin settings and defaut to the format set in the WP general settings.
Best,
Markus
Markus
Cool, if there are any other strings feel free to post them here.
Typically dates are formatted according to the date/time options in WordPress’ General Settings. (Email tag being an anomaly there which I’ll fix).
As for date/time option, I’m reluctant to add one (want to keep admin/ options pages clutter free). Date and time formats default to the WP options and can be changed via
- shortcode attributes with shortcodes
- widget settings for widgets
- editing the templates
which means dates can be formatted by context.
Stephen Harris
I see. That will work fine too. Looking forward to the fixes. 🙂
Markus
“thank you for registering” and email tag appear to be still buggy in EO pro 1.4 Beta. A fix would be appreciated.
Markus
Thanks for flagging this. I’ve just updated the beta version to fix those bugs.
Stephen Harris