Skip to content

Commit 2440c2b

Browse files
Merge branch 'simshaun:master' into codespace-improved-broccoli-gxwg779x54c9q6j
2 parents 61df55a + 999b117 commit 2440c2b

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ echo $textTransformer->transform($rule);
131131
Warnings
132132
---------------
133133

134-
- **Monthly recurring rules **
134+
- **Monthly recurring rules**
135135
By default, if your start date is on the 29th, 30th, or 31st, Recurr will skip following months that don't have at least that many days.
136136
*(e.g. Jan 31 + 1 month = March)*
137137

src/Recurr/Rule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ public function parseString(string $rrule): array
316316
$pieces = explode(':', $rrule);
317317

318318
if (count($pieces) !== 2) {
319-
throw new InvalidRRule('DSTART is not valid');
319+
throw new InvalidRRule('DTSTART is not valid');
320320
}
321321

322322
return ['DTSTART' => $pieces[1]];
@@ -465,7 +465,7 @@ public function loadFromArray(array $parts): static
465465
}
466466

467467
/**
468-
* Conver the model to an RRULE string.
468+
* Convert the model to an RRULE string.
469469
*/
470470
public function getString(string $timezoneType = self::TZ_FLOAT): string
471471
{

src/Recurr/Transformer/Translator.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ class Translator implements TranslatorInterface
1111

1212
public function __construct(string $locale = 'en', string $fallbackLocale = 'en')
1313
{
14-
$this->loadLocale($fallbackLocale);
15-
if ($locale !== $fallbackLocale) {
16-
$this->loadLocale($locale);
14+
$lowercasedLocale = strtolower($locale);
15+
$lowercasedFallbackLocale = strtolower($fallbackLocale);
16+
17+
$this->loadLocale($lowercasedFallbackLocale);
18+
if ($lowercasedLocale !== $lowercasedFallbackLocale) {
19+
$this->loadLocale($lowercasedLocale);
1720
}
1821
}
1922

translations/da.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
'every %count% months' => 'hver %count% måned',
5555
'every month' => 'månedsvis',
5656
'every %count% weeks' => 'hver %count% uge',
57-
'every week' => 'ugenligt',
57+
'every week' => 'ugentligt',
5858
'every %count% days' => 'hver %count% dag',
5959
'every day' => 'dagligt',
6060
'last' => 'sidste', // e.g. 2nd last Friday

0 commit comments

Comments
 (0)