LibreBooking / app

Repository for the last open source version of Booked Scheduler. The "develop" branch contains the most current working code of the project and should be considered beta. The "master" branch is the most current stable release of BookedScheduler. Please read doc/README.md for further details.
GNU General Public License v3.0
403 stars 241 forks source link

Limit languages for emails #416

Closed hakito closed 1 month ago

hakito commented 2 months ago

When extending the templates with additional information, it is difficult or impossible for my client to update all translations.

We came up with the idea to restrict the languages to a certain set at least for the email templates. Users with a language setting that is not within the set, will fall back to the default translation.

I will come up with a PR soon to address this issue.

lucs7 commented 1 month ago

Unfortunately, this commit seems to break the resource view causing:

PHP Fatal error: Access level to ResourceStatusChangeEmail::$email must be protected (as in class EmailMessage) or weaker in /var/www/html/lib/Email/Messages/ResourceStatusChangeEmail.php on line 5

I tried to backtrack where the current development branch breaks, and in the previous commit, it did not occur. It seems to be caused by the change from private to protected for the $email in EmailMessage.php

I guess the Email/Messages would have to be adjusted to the same visibility, but I am not really into php to be of help here

hakito commented 2 weeks ago

@lucs7 I created a new PR that addresses the issue and renames the private fields of the derived classes.