WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] [PATCH] Fix untranslated "and" in event recurrence description, use commas (2 posts)

  1. Daedalon
    Member
    Posted 1 year ago #

    I hope this is welcome as a straight patch instead of a plugin/filter solution, as I'm not yet familiar with using filters and this one wouldn't warrant creating a plugin in any case.

    When there's a recurrence description for a weekly event, it prints a string with "and" used as a separator of the weekdays, without it being translated. In English you get "Monday and Tuesday and Wednesday" and in Finnish "maanantai and tiistai and keskiviikko". To fix both the translation and to make all the separators except the last one be a comma to get "maanantai, tiistai ja keskiviikko", find in classes/em-event.php line 2062:

    $output .= implode(" and ", $natural_days);

    and replace it with:

    $recurrence_days = implode(', ', $natural_days);
    			if (strstr($recurrence_days, ',')) {
    				$recurrence_days = substr_replace($recurrence_days, ' '.__('and',  'dbem'), strrpos($recurrence_days, ','), 1);
    			}
    			$output .= $recurrence_days;

    http://wordpress.org/extend/plugins/events-manager/

  2. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    will look into that

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.