Skip to content

Commit

Permalink
Add Catalan translations (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
c960657 authored and stelgenhof committed Jan 2, 2020
1 parent 67cc029 commit b011860
Show file tree
Hide file tree
Showing 22 changed files with 46 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this
## [Unreleased]

### Added
- Catalan translations for holidays in Catalonia, Valencian Community, Balearic Islands and Aragon [\#189](https:/azuyalabs/yasumi/pull/189) ([c960657](https:/c960657))
- Additional Dates for Australia/Victoria:AFL Grand Final Friday [\#190](https:/azuyalabs/yasumi/pull/190) ([brucealdridge](https:/brucealdridge))

### Changed
Expand Down
10 changes: 8 additions & 2 deletions src/Yasumi/Provider/Spain.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ private function calculateNationalDay(): void
if ($this->year >= 1981) {
$this->addHoliday(new Holiday(
'nationalDay',
['es' => 'Fiesta Nacional de España'],
[
'ca' => 'Festa Nacional d\'Espanya',
'es' => 'Fiesta Nacional de España',
],
new DateTime("$this->year-10-12", new DateTimeZone($this->timezone)),
$this->locale
));
Expand All @@ -109,7 +112,10 @@ private function calculateConstitutionDay(): void
if ($this->year >= 1978) {
$this->addHoliday(new Holiday(
'constitutionDay',
['es' => 'Día de la Constitución'],
[
'ca' => 'Dia de la Constitució',
'es' => 'Día de la Constitución',
],
new DateTime("$this->year-12-6", new DateTimeZone($this->timezone)),
$this->locale
));
Expand Down
5 changes: 4 additions & 1 deletion src/Yasumi/Provider/Spain/BalearicIslands.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ private function calculateBalearicIslandsDay(): void
if ($this->year >= 1983) {
$this->addHoliday(new Holiday(
'balearicIslandsDay',
['es' => 'Día de les Illes Balears'],
[
'ca' => 'Diada de les Illes Balears',
'es' => 'Día de les Illes Balears',
],
new DateTime("$this->year-3-1", new DateTimeZone($this->timezone)),
$this->locale
));
Expand Down
5 changes: 4 additions & 1 deletion src/Yasumi/Provider/Spain/Catalonia.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ private function calculateNationalDayOfCatalonia(): void
if ($this->year >= 1886) {
$this->addHoliday(new Holiday(
'nationalCataloniaDay',
['es' => 'Diada Nacional de Catalunya'],
[
'ca' => 'Diada Nacional de Catalunya',
'es' => 'Diada Nacional de Cataluña',
],
new DateTime("$this->year-9-11", new DateTimeZone($this->timezone)),
$this->locale
));
Expand Down
12 changes: 9 additions & 3 deletions src/Yasumi/Provider/Spain/ValencianCommunity.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,15 @@ public function initialize(): void
private function calculateValencianCommunityDay(): void
{
if ($this->year >= 1239) {
$this->addHoliday(new Holiday('valencianCommunityDay', [
'es' => 'Día de la Comunidad Valenciana',
], new DateTime("$this->year-10-9", new DateTimeZone($this->timezone)), $this->locale));
$this->addHoliday(new Holiday(
'valencianCommunityDay',
[
'ca' => 'Diada Nacional del País Valencià',
'es' => 'Día de la Comunidad Valenciana',
],
new DateTime("$this->year-10-9", new DateTimeZone($this->timezone)),
$this->locale
));
}
}
}
1 change: 1 addition & 0 deletions src/Yasumi/data/translations/allSaintsDay.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

// Translations for All Saints' Day
return [
'ca' => 'Dia de Tots Sants',
'de' => 'Allerheiligen',
'el' => 'Άγιοι Πάντες',
'en' => 'All Saints\' Day',
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/data/translations/assumptionOfMary.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

// Translations for Assumption of Mary
return [
'ca' => 'l\'Assumpció',
'de' => 'Mariä Himmelfahrt',
'el' => 'Κοίμηση της Θεοτόκου',
'en' => 'Assumption of Mary',
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/data/translations/christmasDay.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// Translations for Christmas
return [
'bs_Latn' => 'Božić',
'ca' => 'Nadal',
'cs' => '1. svátek vánoční',
'cy' => 'Nadolig',
'da' => 'juledag',
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/data/translations/easter.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// Translations for Easter Sunday
return [
'bs_Latn' => 'Uskrs',
'ca' => 'Pasqua',
'cy' => 'Sul y Pasg',
'da' => 'påskedag',
'de' => 'Ostersonntag',
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/data/translations/easterMonday.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

// Translations for Easter Monday
return [
'ca' => 'dilluns de Pasqua',
'cs' => 'Velikonoční pondělí',
'cy' => 'Llun y Pasg',
'da' => '2. påskedag',
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/data/translations/epiphany.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

// Translations for Epiphany
return [
'ca' => 'Epifania',
'de_AT' => 'Heilige Drei Könige',
'de_CH' => 'Heilige Drei Könige',
'de' => 'Heilige 3 Könige',
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/data/translations/goodFriday.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

// Translations for Good Friday
return [
'ca' => 'Divendres Sant',
'cs' => 'Velký pátek',
'cy' => 'Gwener y Groglith',
'da' => 'langfredag',
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/data/translations/immaculateConception.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

// Translations for Immaculate Conception
return [
'ca' => 'Immaculada Concepció',
'de' => 'Mariä Empfängnis',
'el' => 'Ευαγγελισμός της Θεοτόκου',
'en' => 'Immaculate Conception',
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/data/translations/internationalWorkersDay.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// Translations for International Workers' Day
return [
'bs_Latn' => 'Praznik rada',
'ca' => 'Dia del Treball',
'cs' => 'Svátek práce',
'da' => 'første maj',
'de' => 'Tag der Arbeit',
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/data/translations/maundyThursday.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

// Translations for Maundy Thursday
return [
'ca' => 'dijous Sant',
'da' => 'skærtorsdag',
'el' => 'Μεγάλη Πέμπτη',
'en' => 'Maundy Thursday',
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/data/translations/newYearsDay.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// Translations for New Year's Day
return [
'bs_Latn' => 'Nova godina',
'ca' => 'Cap d\'any',
'cs' => 'Nový rok',
'cy' => 'Dydd Calan',
'da' => 'nytårsdag',
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/data/translations/stGeorgesDay.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

// Translations for St. George's Day
return [
'ca' => 'Sant Jordi',
'el' => 'Αγίου Γεωργίου',
'en' => 'St. George\'s Day',
'es' => 'San Jorge',
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/data/translations/stJohnsDay.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

// Translations for St. John's Day
return [
'ca' => 'Sant Joan',
'da' => 'sankthansaften',
'el' => 'Σύναξις Προφήτου Προδρόμου και Βαπτιστού Ιωάννου',
'en' => 'St. John\'s Day',
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/data/translations/stJosephsDay.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

// Translations for St. Joseph's Day
return [
'ca' => 'Sant Josep',
'de' => 'Josephstag',
'en' => 'St. Joseph\'s Day',
'es' => 'San José',
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/data/translations/stStephensDay.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

// Translations for St. Stephen's Day
return [
'ca' => 'Sant Esteve',
'cy' => 'Gŵyl San Steffan',
'de' => 'Stephanstag',
'en' => 'St. Stephen\'s Day',
Expand Down
1 change: 1 addition & 0 deletions src/Yasumi/data/translations/valentinesDay.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

// Translations for Valentine's Day
return [
'ca' => 'Dia de Sant Valentí',
'de' => 'Valentinstag',
'el' => 'Αγίου Βαλεντίνου',
'en' => 'Valentine\'s Day',
Expand Down
5 changes: 4 additions & 1 deletion tests/Spain/Catalonia/nationalCataloniaDayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ public function testTranslation(): void
self::REGION,
self::HOLIDAY,
$this->generateRandomYear(self::ESTABLISHMENT_YEAR),
[self::LOCALE => 'Diada Nacional de Catalunya']
[
'es' => 'Diada Nacional de Cataluña',
'ca' => 'Diada Nacional de Catalunya',
]
);
}

Expand Down

0 comments on commit b011860

Please sign in to comment.