Skip to content

Commit

Permalink
Merge branch 'TMS-1024' into stage
Browse files Browse the repository at this point in the history
  • Loading branch information
eebbi committed Apr 8, 2024
2 parents 37eba81 + f0dc598 commit 0a6029c
Show file tree
Hide file tree
Showing 5 changed files with 245 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Binary file added languages/tms-plugin-manual-events-fi.mo
Binary file not shown.
112 changes: 112 additions & 0 deletions languages/tms-plugin-manual-events-fi.po
Original file line number Diff line number Diff line change
@@ -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 ""
112 changes: 112 additions & 0 deletions languages/tms-plugin-manual-events.pot
Original file line number Diff line number Diff line change
@@ -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 ""
19 changes: 19 additions & 0 deletions src/PostType/ManualEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -605,13 +605,32 @@ 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 ),
$end_time->format( $date_format )
);
}

// 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 );
}

Expand Down

0 comments on commit 0a6029c

Please sign in to comment.