Certificate errors on the settings form show raw placeholders
Part of #3596034 (closed).
Problem/motivation
SettingsForm::validateForm() passes the placeholders of the certificate errors as a third argument to setErrorByName(), which takes two, and as the $repeat flag of addWarning(). The admin sees No PEM files in %directory or environment variables. with the literal %directory, and the text is not translatable.
Steps to reproduce
- Enter a certificate directory that has no PEM files.
- Save the settings form.
Proposed resolution
Wrap the error text in $this->t($error['text'], $error['args'] ?? []) in both calls.
AI Compliance
🤖 Generated with the help of an LLM, reviewed and approved by me before posting.