Closed bramley closed 1 year ago
Looks quite drastic the removal, but I've done a quick smoke test, switching to Dutch and translations continue to work fine.
I also can't find anything in the resources wiki on how we intended plugin translations to work. I guess it would be good to find some time to add plugins to the translation site at some point, so that they make it into the central translation system.
Looks fine to apply this.
This pull request has been mentioned on phpList Discuss. There might be relevant details there:
https://discuss.phplist.org/t/3-6-14-release-candidate-ready-for-testing/9109/1
This pull request has been mentioned on phpList Discuss. There might be relevant details there:
https://discuss.phplist.org/t/phplist-3-6-14-released-security-release/9158/1
Description
A few commits to tidy-up the languages.php file by removing redundant or obsolete code.
With open_basedir() in effect, I noticed warnings about trying to access the root directory
Looking into this, it was caused by trying to derive a plugin's own language directory, which I think is now obsolete. For clarity, there are four commits each removing some code that I think is not needed now.
1) Plugins have not yet been created when the
phplist_I18N
constructor is called. So the chunk of code trying to derive the plugins basedir is redundant.2) The code in the constructor looking for common.php, frontend.php etc is now obsolete. Those files have not existed for quite a while. Removing that chunk of code allows all other references to
$this->lan
to be removed as well.3) The method getTranslation() takes a
$basedir
parameter that isn't used. Removing that parameter allows code that sets-up the parameter to be removed as well, particularly thegetPluginBasedir
() method.4) The method getTranslation() takes a
$page
parameter that also isn't used. Removing that parameter allows code that sets-up the parameter to be removed as well.Related Issue
Screenshots (if appropriate):