Skip to content

Commit

Permalink
refactor LitMessages > LatinUtils, LitFunc > Utilities
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRDOrazio committed Oct 4, 2024
1 parent a3b851a commit 4b37cb8
Show file tree
Hide file tree
Showing 22 changed files with 376 additions and 351 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
id: update_pot
run: |
sudo apt-get install -y gettext
xgettext --from-code=UTF-8 --add-comments='translators:' --keyword="pgettext:1c,2" -o i18n/litcal.pot src/Paths/Calendar.php src/LitMessages.php src/FestivityCollection.php src/Enum/LitColor.php src/Enum/LitCommon.php src/Enum/LitGrade.php src/Enum/LitSeason.php
xgettext --from-code=UTF-8 --add-comments='translators:' --keyword="pgettext:1c,2" -o i18n/litcal.pot src/Paths/Calendar.php src/LatinUtils.php src/FestivityCollection.php src/Enum/LitColor.php src/Enum/LitCommon.php src/Enum/LitGrade.php src/Enum/LitSeason.php
echo "POT_LINES_CHANGED=$(git diff -U0 | grep '^[+|-][^+|-]' | grep -Ev '^[+-]"POT-Creation-Date' | wc -l)" >> $GITHUB_OUTPUT
# push the output folder to your repo
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"keywords": ["api","rest","restful","liturgy","calendar","liturgical","universal","roman","catholic"],
"homepage": "https://litcal.johnromanodorazio.com",
"require": {
"php": ">=7.4",
"php": ">=8.1",
"swaggest/json-schema": "~0.12",
"cboden/ratchet": "~0.4",
"sabre/vobject": "^4.5.1"
Expand All @@ -29,10 +29,10 @@
"minimum-stability": "stable",
"scripts": {
"post-install-cmd": [
"LiturgicalCalendar\\Api\\LitMessages::postInstall"
"LiturgicalCalendar\\Api\\Utilities::postInstall"
],
"post-update-cmd": [
"LiturgicalCalendar\\Api\\LitMessages::postInstall"
"LiturgicalCalendar\\Api\\Utilities::postInstall"
]
}
}
2 changes: 1 addition & 1 deletion i18n/de/LC_MESSAGES/litcal.po
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ msgstr "%s - Wochentag in der Weihnachtszeit"

#. translators: context alternate name for a liturgical event, e.g. Second Sunday of Easter `or` Divine Mercy Sunday
#. translators: when there are multiple possible commons, this will be the glue "or from the common of..."
#: src/Paths/Calendar.php:1296 src/LitMessages.php:149 src/LitMessages.php:154
#: src/Paths/Calendar.php:1296 src/LatinUtils.php:149 src/LatinUtils.php:154
#: src/Enum/LitCommon.php:385
msgid "or"
msgstr "oder"
Expand Down
2 changes: 1 addition & 1 deletion i18n/es/LC_MESSAGES/litcal.po
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ msgstr "%s - Día de la Semana de Navidad"

#. translators: context alternate name for a liturgical event, e.g. Second Sunday of Easter `or` Divine Mercy Sunday
#. translators: when there are multiple possible commons, this will be the glue "or from the common of..."
#: src/Paths/Calendar.php:1296 src/LitMessages.php:149 src/LitMessages.php:154
#: src/Paths/Calendar.php:1296 src/LatinUtils.php:149 src/LatinUtils.php:154
#: src/Enum/LitCommon.php:385
msgid "or"
msgstr "o"
Expand Down
2 changes: 1 addition & 1 deletion i18n/fr/LC_MESSAGES/litcal.po
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ msgstr "%s - Férie de Noël"

#. translators: context alternate name for a liturgical event, e.g. Second Sunday of Easter `or` Divine Mercy Sunday
#. translators: when there are multiple possible commons, this will be the glue "or from the common of..."
#: src/Paths/Calendar.php:1296 src/LitMessages.php:149 src/LitMessages.php:154
#: src/Paths/Calendar.php:1296 src/LatinUtils.php:149 src/LatinUtils.php:154
#: src/Enum/LitCommon.php:385
msgid "or"
msgstr "ou"
Expand Down
2 changes: 1 addition & 1 deletion i18n/hu/LC_MESSAGES/litcal.po
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ msgstr ""

#. translators: context alternate name for a liturgical event, e.g. Second Sunday of Easter `or` Divine Mercy Sunday
#. translators: when there are multiple possible commons, this will be the glue "or from the common of..."
#: src/Paths/Calendar.php:1296 src/LitMessages.php:149 src/LitMessages.php:154
#: src/Paths/Calendar.php:1296 src/LatinUtils.php:149 src/LatinUtils.php:154
#: src/Enum/LitCommon.php:385
msgid "or"
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion i18n/id/LC_MESSAGES/litcal.po
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ msgstr ""

#. translators: context alternate name for a liturgical event, e.g. Second Sunday of Easter `or` Divine Mercy Sunday
#. translators: when there are multiple possible commons, this will be the glue "or from the common of..."
#: src/Paths/Calendar.php:1296 src/LitMessages.php:149 src/LitMessages.php:154
#: src/Paths/Calendar.php:1296 src/LatinUtils.php:149 src/LatinUtils.php:154
#: src/Enum/LitCommon.php:385
msgid "or"
msgstr "atau"
Expand Down
2 changes: 1 addition & 1 deletion i18n/it/LC_MESSAGES/litcal.po
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ msgstr "%s - Giorno feriale di Natale"

#. translators: context alternate name for a liturgical event, e.g. Second Sunday of Easter `or` Divine Mercy Sunday
#. translators: when there are multiple possible commons, this will be the glue "or from the common of..."
#: src/Paths/Calendar.php:1296 src/LitMessages.php:149 src/LitMessages.php:154
#: src/Paths/Calendar.php:1296 src/LatinUtils.php:149 src/LatinUtils.php:154
#: src/Enum/LitCommon.php:385
msgid "or"
msgstr "oppure"
Expand Down
2 changes: 1 addition & 1 deletion i18n/la/LC_MESSAGES/litcal.po
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ msgstr ""

#. translators: context alternate name for a liturgical event, e.g. Second Sunday of Easter `or` Divine Mercy Sunday
#. translators: when there are multiple possible commons, this will be the glue "or from the common of..."
#: src/Paths/Calendar.php:1296 src/LitMessages.php:149 src/LitMessages.php:154
#: src/Paths/Calendar.php:1296 src/LatinUtils.php:149 src/LatinUtils.php:154
#: src/Enum/LitCommon.php:385
msgid "or"
msgstr "vel"
Expand Down
2 changes: 1 addition & 1 deletion i18n/litcal.pot
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ msgstr ""

#. translators: context alternate name for a liturgical event, e.g. Second Sunday of Easter `or` Divine Mercy Sunday
#. translators: when there are multiple possible commons, this will be the glue "or from the common of..."
#: src/Paths/Calendar.php:1296 src/LitMessages.php:148 src/LitMessages.php:153
#: src/Paths/Calendar.php:1296 src/LatinUtils.php:148 src/LatinUtils.php:153
#: src/Enum/LitCommon.php:385
msgid "or"
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion i18n/nl/LC_MESSAGES/litcal.po
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ msgstr "%s van de kersttijd"

#. translators: context alternate name for a liturgical event, e.g. Second Sunday of Easter `or` Divine Mercy Sunday
#. translators: when there are multiple possible commons, this will be the glue "or from the common of..."
#: src/Paths/Calendar.php:1296 src/LitMessages.php:149 src/LitMessages.php:154
#: src/Paths/Calendar.php:1296 src/LatinUtils.php:149 src/LatinUtils.php:154
#: src/Enum/LitCommon.php:385
msgid "or"
msgstr "of"
Expand Down
2 changes: 1 addition & 1 deletion i18n/pt/LC_MESSAGES/litcal.po
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ msgstr "%s - Dia de Semana do Natal"

#. translators: context alternate name for a liturgical event, e.g. Second Sunday of Easter `or` Divine Mercy Sunday
#. translators: when there are multiple possible commons, this will be the glue "or from the common of..."
#: src/Paths/Calendar.php:1296 src/LitMessages.php:149 src/LitMessages.php:154
#: src/Paths/Calendar.php:1296 src/LatinUtils.php:149 src/LatinUtils.php:154
#: src/Enum/LitCommon.php:385
msgid "or"
msgstr "ou"
Expand Down
2 changes: 1 addition & 1 deletion i18n/sk/LC_MESSAGES/litcal.po
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ msgstr "%s - Vianočný všedný deň"

#. translators: context alternate name for a liturgical event, e.g. Second Sunday of Easter `or` Divine Mercy Sunday
#. translators: when there are multiple possible commons, this will be the glue "or from the common of..."
#: src/Paths/Calendar.php:1296 src/LitMessages.php:149 src/LitMessages.php:154
#: src/Paths/Calendar.php:1296 src/LatinUtils.php:149 src/LatinUtils.php:154
#: src/Enum/LitCommon.php:385
msgid "or"
msgstr "alebo"
Expand Down
2 changes: 1 addition & 1 deletion i18n/vi/LC_MESSAGES/litcal.po
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ msgstr "%s - Ngày trong tuần Giáng Sinh"

#. translators: context alternate name for a liturgical event, e.g. Second Sunday of Easter `or` Divine Mercy Sunday
#. translators: when there are multiple possible commons, this will be the glue "or from the common of..."
#: src/Paths/Calendar.php:1296 src/LitMessages.php:149 src/LitMessages.php:154
#: src/Paths/Calendar.php:1296 src/LatinUtils.php:149 src/LatinUtils.php:154
#: src/Enum/LitCommon.php:385
msgid "or"
msgstr "hoặc"
Expand Down
10 changes: 10 additions & 0 deletions src/Enum/DioceseIndexAction.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace LiturgicalCalendar\Api\Enum;

enum DioceseIndexAction: string
{
case DELETE = 'delete';
case UPDATE = 'update';
case CREATE = 'create';
}
110 changes: 110 additions & 0 deletions src/LatinUtils.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
<?php

namespace LiturgicalCalendar\Api;

use LiturgicalCalendar\Api\Enum\LitColor;

class LatinUtils
{
public const LATIN_ORDINAL = [
"",
"primus",
"secundus",
"tertius",
"quartus",
"quintus",
"sextus",
"septimus",
"octavus",
"nonus",
"decimus",
"undecimus",
"duodecimus",
"decimus tertius",
"decimus quartus",
"decimus quintus",
"decimus sextus",
"decimus septimus",
"duodevicesimus",
"undevicesimus",
"vigesimus",
"vigesimus primus",
"vigesimus secundus",
"vigesimus tertius",
"vigesimus quartus",
"vigesimus quintus",
"vigesimus sextus",
"vigesimus septimus",
"vigesimus octavus",
"vigesimus nonus",
"trigesimus",
"trigesimus primus",
"trigesimus secundus",
"trigesimus tertius",
"trigesimus quartus",
];

public const LATIN_ORDINAL_FEM_GEN = [
"",
"primæ",
"secundæ",
"tertiæ",
"quartæ",
"quintæ",
"sextæ",
"septimæ",
"octavæ",
"nonæ",
"decimæ",
"undecimæ",
"duodecimæ",
"decimæ tertiæ",
"decimæ quartæ",
"decimæ quintæ",
"decimæ sextæ",
"decimæ septimæ",
"duodevicesimæ",
"undevicesimæ",
"vigesimæ",
"vigesimæ primæ",
"vigesimæ secundæ",
"vigesimæ tertiæ",
"vigesimæ quartæ",
"vigesimæ quintæ",
"vigesimæ sextæ",
"vigesimæ septimæ",
"vigesimæ octavæ",
"vigesimæ nonæ",
"trigesimæ",
"trigesimæ primæ",
"trigesimæ secundæ",
"trigesimæ tertiæ",
"trigesimæ quartæ",
];

public const LATIN_DAYOFTHEWEEK = [
"Feria I", //0=Sunday
"Feria II", //1=Monday
"Feria III", //2=Tuesday
"Feria IV", //3=Wednesday
"Feria V", //4=Thursday
"Feria VI", //5=Friday
"Feria VII" //6=Saturday
];

public const LATIN_MONTHS = [
"",
"Ianuarius",
"Februarius",
"Martius",
"Aprilis",
"Maius",
"Iunius",
"Iulius",
"Augustus",
"September",
"October",
"November",
"December"
];
}
Loading

0 comments on commit 4b37cb8

Please sign in to comment.