diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c32eb4..e49aafa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning][semver]. ## [Unreleased] +- TMS-1024: Add text after recurring manual event dates + ## [1.3.0] - 2024-03-26 - TMS-968: diff --git a/languages/tms-plugin-manual-events-fi.mo b/languages/tms-plugin-manual-events-fi.mo new file mode 100644 index 0000000..f7d96ed Binary files /dev/null and b/languages/tms-plugin-manual-events-fi.mo differ diff --git a/languages/tms-plugin-manual-events-fi.po b/languages/tms-plugin-manual-events-fi.po new file mode 100644 index 0000000..67154c1 --- /dev/null +++ b/languages/tms-plugin-manual-events-fi.po @@ -0,0 +1,112 @@ +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: TMS Materials\n" +"POT-Creation-Date: 2024-04-05 15:11+0300\n" +"PO-Revision-Date: 2024-04-05 15:43+0300\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: fi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.4.2\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-Flags-xgettext: --add-comments=translators:\n" +"X-Poedit-WPHeader: plugin.php\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" +"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;" +"_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n" +"X-Poedit-SearchPath-0: .\n" +"X-Poedit-SearchPathExcluded-0: *.min.js\n" +"X-Poedit-SearchPathExcluded-1: vendor\n" +"X-Poedit-SearchPathExcluded-2: node_modules\n" + +#: src/Models/page-combined-events-list.php:47 +#: src/Models/page-combined-events-search.php:80 +msgid "No results" +msgstr "" + +#: src/Models/page-combined-events-search.php:57 +msgid "Search term" +msgstr "" + +#: src/Models/page-combined-events-search.php:58 +msgid "Events from" +msgstr "" + +#: src/Models/page-combined-events-search.php:59 +msgid "Start date" +msgstr "" + +#: src/Models/page-combined-events-search.php:60 +msgid "End date" +msgstr "" + +#: src/Models/page-combined-events-search.php:79 +msgid "No search term given" +msgstr "" + +#: src/Plugin.php:247 +msgid "Tapahtumalistaus (yhdistetty)" +msgstr "" + +#: src/Plugin.php:248 +msgid "Tapahtumahaku (yhdistetty)" +msgstr "" + +#: src/PostType/ManualEvent.php:62 +msgctxt "theme CPT" +msgid "manual-event" +msgstr "" + +#: src/PostType/ManualEvent.php:155 +msgctxt "theme ACF" +msgid "Tiedot" +msgstr "" + +#: src/PostType/ManualEvent.php:525 +msgid "Dates" +msgstr "" + +#: src/PostType/ManualEvent.php:526 +msgid "Time" +msgstr "" + +#: src/PostType/ManualEvent.php:527 +msgid "Location" +msgstr "" + +#: src/PostType/ManualEvent.php:528 +msgid "Price" +msgstr "" + +#: src/PostType/ManualEvent.php:529 +msgid "Organizer" +msgstr "" + +#: src/PostType/ManualEvent.php:550 +msgid "Free" +msgstr "" + +#: src/PostType/ManualEvent.php:614 +msgid "and other event times" +msgstr "ja muita tapahtuma-aikoja" + +#. Plugin Name of the plugin/theme +#. Description of the plugin/theme +msgid "TMS Manual Events" +msgstr "" + +#. Plugin URI of the plugin/theme +msgid "https://github.com/devgeniem/tms-plugin-manual-events" +msgstr "" + +#. Author of the plugin/theme +msgid "Geniem Oy" +msgstr "" + +#. Author URI of the plugin/theme +msgid "https://geniem.com" +msgstr "" diff --git a/languages/tms-plugin-manual-events.pot b/languages/tms-plugin-manual-events.pot new file mode 100644 index 0000000..798f361 --- /dev/null +++ b/languages/tms-plugin-manual-events.pot @@ -0,0 +1,112 @@ +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: TMS Materials\n" +"POT-Creation-Date: 2024-04-05 15:11+0300\n" +"PO-Revision-Date: 2021-06-15 11:22+0300\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" +"X-Generator: Poedit 3.4.2\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-Flags-xgettext: --add-comments=translators:\n" +"X-Poedit-WPHeader: plugin.php\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" +"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;" +"_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n" +"X-Poedit-SearchPath-0: .\n" +"X-Poedit-SearchPathExcluded-0: *.min.js\n" +"X-Poedit-SearchPathExcluded-1: vendor\n" +"X-Poedit-SearchPathExcluded-2: node_modules\n" + +#: src/Models/page-combined-events-list.php:47 +#: src/Models/page-combined-events-search.php:80 +msgid "No results" +msgstr "" + +#: src/Models/page-combined-events-search.php:57 +msgid "Search term" +msgstr "" + +#: src/Models/page-combined-events-search.php:58 +msgid "Events from" +msgstr "" + +#: src/Models/page-combined-events-search.php:59 +msgid "Start date" +msgstr "" + +#: src/Models/page-combined-events-search.php:60 +msgid "End date" +msgstr "" + +#: src/Models/page-combined-events-search.php:79 +msgid "No search term given" +msgstr "" + +#: src/Plugin.php:247 +msgid "Tapahtumalistaus (yhdistetty)" +msgstr "" + +#: src/Plugin.php:248 +msgid "Tapahtumahaku (yhdistetty)" +msgstr "" + +#: src/PostType/ManualEvent.php:62 +msgctxt "theme CPT" +msgid "manual-event" +msgstr "" + +#: src/PostType/ManualEvent.php:155 +msgctxt "theme ACF" +msgid "Tiedot" +msgstr "" + +#: src/PostType/ManualEvent.php:525 +msgid "Dates" +msgstr "" + +#: src/PostType/ManualEvent.php:526 +msgid "Time" +msgstr "" + +#: src/PostType/ManualEvent.php:527 +msgid "Location" +msgstr "" + +#: src/PostType/ManualEvent.php:528 +msgid "Price" +msgstr "" + +#: src/PostType/ManualEvent.php:529 +msgid "Organizer" +msgstr "" + +#: src/PostType/ManualEvent.php:550 +msgid "Free" +msgstr "" + +#: src/PostType/ManualEvent.php:614 +msgid "and other event times" +msgstr "" + +#. Plugin Name of the plugin/theme +#. Description of the plugin/theme +msgid "TMS Manual Events" +msgstr "" + +#. Plugin URI of the plugin/theme +msgid "https://github.com/devgeniem/tms-plugin-manual-events" +msgstr "" + +#. Author of the plugin/theme +msgid "Geniem Oy" +msgstr "" + +#. Author URI of the plugin/theme +msgid "https://geniem.com" +msgstr "" diff --git a/src/PostType/ManualEvent.php b/src/PostType/ManualEvent.php index 9f123d6..0a9b819 100644 --- a/src/PostType/ManualEvent.php +++ b/src/PostType/ManualEvent.php @@ -605,6 +605,16 @@ protected static function get_event_date( $event ) { $date_format = get_option( 'date_format' ); if ( $start_time && $end_time && $start_time->diff( $end_time )->days >= 1 ) { + // Add text with dates if the event is recurring + if ( ! empty( $event->dates ) && count( $event->dates ) > 1 ) { + return sprintf( + '%s - %s %s', + $start_time->format( $date_format ), + $end_time->format( $date_format ), + __( 'and other event times', 'tms-plugin-manual-events' ) + ); + } + return sprintf( '%s - %s', $start_time->format( $date_format ), @@ -612,6 +622,15 @@ protected static function get_event_date( $event ) { ); } + // Add text with start-date if the event is recurring + if ( ! empty( $event->dates ) && count( $event->dates ) > 1 ) { + return sprintf( + '%s %s', + $start_time->format( $date_format ), + __( 'and other event times', 'tms-plugin-manual-events' ) + ); + } + return $start_time->format( $date_format ); }