Some strings do not get translated

WordPress Event Management, Calendars & Registration Forums Report A Bug Some strings do not get translated

This topic contains 9 replies, has 2 voices, and was last updated by  Stephen Harris 10 years, 7 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #6726

    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
    #6733

    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
    #6734

    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
    #6737

    I’m afraid this patch is already present in my event-organiser-pro.php (line 190) in version 1.3

    Markus
    #6738

    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
    #6739

    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
    #6740

    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
    #6741

    I see. That will work fine too. Looking forward to the fixes. 🙂

    Markus
    #7423

    “thank you for registering” and email tag appear to be still buggy in EO pro 1.4 Beta. A fix would be appreciated.

    Markus
    #7428

    Thanks for flagging this. I’ve just updated the beta version to fix those bugs.

    Stephen Harris
Viewing 10 posts - 1 through 10 (of 10 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.