From a7ea6d0bc67b22a7c2a8e5a534ce455099fdfa9c Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Mon, 30 Nov 2020 12:47:05 +0100 Subject: [PATCH 1/3] Fix broken tests As day is always set to midnight, an existing test did not work anymore. This was now split up into two separate more explicit tests. --- Tests/Unit/Domain/Model/DayTest.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Tests/Unit/Domain/Model/DayTest.php b/Tests/Unit/Domain/Model/DayTest.php index 961932b..df211d6 100644 --- a/Tests/Unit/Domain/Model/DayTest.php +++ b/Tests/Unit/Domain/Model/DayTest.php @@ -70,7 +70,19 @@ class DayTest extends TestCase ); self::assertInstanceOf(\DateTimeImmutable::class, $subject->getDateTimeInstance()); - self::assertSame($dateTimeInstance->format('U'), $subject->getDateTimeInstance()->format('U')); + } + + /** + * @test + */ + public function providedDateTimeInstanceHasExpectedDay(): void + { + $dateTimeInstance = new \DateTime(); + $subject = new Day( + $dateTimeInstance + ); + + self::assertSame($dateTimeInstance->format('d.m.Y'), $subject->getDateTimeInstance()->format('d.m.Y')); } /** From 9cc40755681796bc7a45c0901b50e597cf07f70d Mon Sep 17 00:00:00 2001 From: Dirk Koritnik Date: Wed, 18 Nov 2020 10:47:37 +0100 Subject: [PATCH 2/3] Add l10n files --- Resources/Private/Language/de.locallang.xlf | 108 ++++++++++++++++++++ Resources/Private/Language/locallang.xlf | 83 +++++++++++++++ 2 files changed, 191 insertions(+) create mode 100644 Resources/Private/Language/de.locallang.xlf create mode 100644 Resources/Private/Language/locallang.xlf diff --git a/Resources/Private/Language/de.locallang.xlf b/Resources/Private/Language/de.locallang.xlf new file mode 100644 index 0000000..654447c --- /dev/null +++ b/Resources/Private/Language/de.locallang.xlf @@ -0,0 +1,108 @@ + + + +
+ + + Previous month + Voheriger Monat + + + Next month + Nächster Monat + + + Previous week + Voherige Woche + + + Next week + Nächste Woche + + + Previous day + Voheriger Tag + + + Next day + Nächster Tag + + + Monthly + Monat + + + Weekly + Woche + + + Day + Tagesansicht + + + Calender week + Kalenderwoche + + + CW + KW + + + Monday + Montag + + + Tuesday + Dienstag + + + Wednesday + Mittwoch + + + Thursday + Donnerstag + + + Friday + Freitag + + + Saturday + Samstag + + + Sunday + Sonntag + + + Mon + Mo + + + Tue + Di + + + Wed + Mi + + + Thu + Do + + + Fri + Fr + + + Sat + Sa + + + Sun + So + + + + diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf new file mode 100644 index 0000000..746acd2 --- /dev/null +++ b/Resources/Private/Language/locallang.xlf @@ -0,0 +1,83 @@ + + + +
+ + + Previous month + + + Next month + + + Previous week + + + Next week + + + Previous day + + + Next day + + + Calender week + + + CW + + + Monthly + + + Weekly + + + Day + + + Monday + + + Tuesday + + + Wednesday + + + Thursday + + + Friday + + + Saturday + + + Sunday + + + Mon + + + Tue + + + Wed + + + Thu + + + Fri + + + Sat + + + Sun + + + + From 796bd80e4e96d5fe9062f89ac4bca718db87a0f9 Mon Sep 17 00:00:00 2001 From: Dirk Koritnik Date: Wed, 18 Nov 2020 14:29:07 +0100 Subject: [PATCH 3/3] Add l10n to templates --- .../Templates/Frontend/Calendar/Month.html | 26 +++++++++---------- .../Templates/Frontend/Calendar/Week.html | 24 ++++++++--------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Resources/Private/Templates/Frontend/Calendar/Month.html b/Resources/Private/Templates/Frontend/Calendar/Month.html index 9016deb..f9f67f1 100644 --- a/Resources/Private/Templates/Frontend/Calendar/Month.html +++ b/Resources/Private/Templates/Frontend/Calendar/Month.html @@ -3,23 +3,23 @@

{month.dateTimeInstance -> f:format.date(format: '%B %Y')}

- - Prev Month + + {f:translate(key: 'browse.month.previous', extensionName: 'calendar')} - - Next Month + + {f:translate(key: 'browse.month.next', extensionName: 'calendar')} - +
- - - - - - - - + + + + + + + + diff --git a/Resources/Private/Templates/Frontend/Calendar/Week.html b/Resources/Private/Templates/Frontend/Calendar/Week.html index e3357e0..368dee9 100644 --- a/Resources/Private/Templates/Frontend/Calendar/Week.html +++ b/Resources/Private/Templates/Frontend/Calendar/Week.html @@ -3,22 +3,22 @@

{week.dateTimeInstance -> f:format.date(format: '%V %Y')}

- - Prev Week + + {f:translate(key: 'browse.week.previous', extensionName: 'calendar')} - - Next Week + + {f:translate(key: 'browse.month.next', extensionName: 'calendar')} -
KWMoDiMiDoFrSaSo{f:translate(key: 'calendar_week.shorthand', extensionName: 'calendar')}{f:translate(key: 'weekday.monday.shorthand', extensionName: 'calendar')}{f:translate(key: 'weekday.tuesday.shorthand', extensionName: 'calendar')}{f:translate(key: 'weekday.wednesday.shorthand', extensionName: 'calendar')}{f:translate(key: 'weekday.thursday.shorthand', extensionName: 'calendar')}{f:translate(key: 'weekday.friday.shorthand', extensionName: 'calendar')}{f:translate(key: 'weekday.saturday.shorthand', extensionName: 'calendar')}{f:translate(key: 'weekday.sunday.shorthand', extensionName: 'calendar')}
+
- - - - - - - + + + + + + +
MoDiMiDoFrSaSo{f:translate(key: 'weekday.monday.shorthand', extensionName: 'calendar')}{f:translate(key: 'weekday.tuesday.shorthand', extensionName: 'calendar')}{f:translate(key: 'weekday.wednesday.shorthand', extensionName: 'calendar')}{f:translate(key: 'weekday.thursday.shorthand', extensionName: 'calendar')}{f:translate(key: 'weekday.friday.shorthand', extensionName: 'calendar')}{f:translate(key: 'weekday.saturday.shorthand', extensionName: 'calendar')}{f:translate(key: 'weekday.sunday.shorthand', extensionName: 'calendar')}