From e5d010f093da4599d9b378396a0b89e7d2763a1f Mon Sep 17 00:00:00 2001 From: John D'Orazio Date: Mon, 9 May 2022 15:39:24 +0200 Subject: [PATCH] move Our Lady of Guadalupe to Wider Region --- LitCalNationalAndRegionalData.php | 11 +++++++++++ .../propriumdesanctis_USA_2011.json | 18 ------------------ nations/AMERICAS/en.json | 3 +++ nations/AMERICAS/es.json | 3 +++ nations/AMERICAS/fr.json | 3 +++ nations/AMERICAS/pt.json | 3 +++ nations/Americas.json | 5 +++-- 7 files changed, 26 insertions(+), 20 deletions(-) create mode 100644 nations/AMERICAS/en.json create mode 100644 nations/AMERICAS/es.json create mode 100644 nations/AMERICAS/fr.json create mode 100644 nations/AMERICAS/pt.json diff --git a/LitCalNationalAndRegionalData.php b/LitCalNationalAndRegionalData.php index 7882fef3..e917d1db 100644 --- a/LitCalNationalAndRegionalData.php +++ b/LitCalNationalAndRegionalData.php @@ -160,6 +160,17 @@ private function writeNationalCalendar() { if( !file_exists( $path ) ) { mkdir( $path, 0755, true ); } + $translationJSON = new stdClass(); + foreach( $this->DATA->LitCal as $CalEvent ) { + $translationJSON->{ $CalEvent->Festivity->tag } = ''; + } + if( count( $this->DATA->Metadata->Languages ) > 0 ) { + foreach( $this->DATA->Metadata->Languages as $iso ) { + if( !file_exists( "nations/{$widerRegion}/{$iso}.json" ) ) { + file_put_contents( "nations/{$widerRegion}/{$iso}.json", json_encode( $translationJSON, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE ) ); + } + } + } } $data = json_encode( $this->DATA, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE ); file_put_contents( "nations/{$this->DATA->Metadata->WiderRegion}.json", $data . PHP_EOL ); diff --git a/data/propriumdesanctis_USA_2011/propriumdesanctis_USA_2011.json b/data/propriumdesanctis_USA_2011/propriumdesanctis_USA_2011.json index 9e1edd3d..393b5d2e 100644 --- a/data/propriumdesanctis_USA_2011/propriumdesanctis_USA_2011.json +++ b/data/propriumdesanctis_USA_2011/propriumdesanctis_USA_2011.json @@ -268,23 +268,5 @@ "ALLELUIA_VERSE": "", "GOSPEL": "" } - }, - { - "MONTH": 12, - "DAY": 12, - "TAG": "LadyGuadalupe", - "NAME": "Our Lady of Guadalupe", - "GRADE": 4, - "DISPLAYGRADE": "", - "COMMON": "Proper", - "CALENDAR": "", - "COLOR": "white", - "READINGS": { - "FIRST_READING": "", - "RESPONSORIAL_PSALM": "", - "SECOND_READING": "", - "ALLELUIA_VERSE": "", - "GOSPEL": "" - } } ] diff --git a/nations/AMERICAS/en.json b/nations/AMERICAS/en.json new file mode 100644 index 00000000..ef98ecb7 --- /dev/null +++ b/nations/AMERICAS/en.json @@ -0,0 +1,3 @@ +{ + "LadyGuadalupe": "[ USA ] Our Lady of Guadalupe" +} diff --git a/nations/AMERICAS/es.json b/nations/AMERICAS/es.json new file mode 100644 index 00000000..41fcf9a0 --- /dev/null +++ b/nations/AMERICAS/es.json @@ -0,0 +1,3 @@ +{ + "LadyGuadalupe": "" +} \ No newline at end of file diff --git a/nations/AMERICAS/fr.json b/nations/AMERICAS/fr.json new file mode 100644 index 00000000..41fcf9a0 --- /dev/null +++ b/nations/AMERICAS/fr.json @@ -0,0 +1,3 @@ +{ + "LadyGuadalupe": "" +} \ No newline at end of file diff --git a/nations/AMERICAS/pt.json b/nations/AMERICAS/pt.json new file mode 100644 index 00000000..41fcf9a0 --- /dev/null +++ b/nations/AMERICAS/pt.json @@ -0,0 +1,3 @@ +{ + "LadyGuadalupe": "" +} \ No newline at end of file diff --git a/nations/Americas.json b/nations/Americas.json index f856b1c5..f92221ed 100644 --- a/nations/Americas.json +++ b/nations/Americas.json @@ -31,8 +31,9 @@ "IsMultilingual": true, "Languages": [ "en", - "es", - "pt" + "fr", + "pt", + "es" ], "WiderRegion": "Americas" }