Liturgical-Calendar / LiturgicalCalendarAPI

A PHP script / API endpoint that will generate the Roman Catholic liturgical calendar for any given year, calculating the mobile festivities and the precedence of solemnities, feasts, memorials...
Apache License 2.0
35 stars 9 forks source link

[Bug]: specific commons are not getting translated correctly #203

Closed JohnRDOrazio closed 2 months ago

JohnRDOrazio commented 2 months ago

What happened?

For whatever reason it seems like there is a bug in the translation of the common. The output key commonLcl does not get correctly translated for values such as Proper or For One Pastor.

Version

dev (Edge)

Which browser or browsers are you seeing the problem on? (can select more than one, or N/A if not applicable)

N/A

Relevant error messages

No response

JohnRDOrazio commented 2 months ago

so, after a bit of debugging, I have found that the $this->GTXT array does not contain translated values. It's as though the instantiated class is not aware of locale settings? Now why is that?

JohnRDOrazio commented 2 months ago

finally found the culprit. In LitCalAPI.php, the static locale value was being set in Festivity class before localization was being set up. Of course that won't work! Fixed in commit https://github.com/Liturgical-Calendar/LiturgicalCalendarAPI/commit/377f2ec8341b57cf15f643d2aa06c0582079daba