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

  1. Daedalon
    Posted 3 years 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;


  2. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    will look into that

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.