User tests: Successful: Unsuccessful:
Pull Request resolves #48016 .
The "Authentication - Cookie" plugin wrote two log messages as hardcoded English strings in PHP instead of using language constants. As a result they could not be maintained through the
language files and were not available to translators on Crowdin.
In plugins/authentication/cookie/src/Extension/Cookie.php:
In administrator/language/en-GB/plg_authentication_cookie.ini, two new keys were added (alphabetically sorted):
Numbered placeholders (%1$s / %2$s) are used so translators can reorder the user ID and error message as needed. Both strings are used inside onUserAuthenticate(), where $this->loadLanguage()
is already called, so the language keys are available at runtime. This brings the two messages in line with the already-correct PLG_AUTHENTICATION_COOKIE_ERROR_LOG_LOGIN_FAILED.
The log messages "Invalid cookie detected." and "Failed to delete cookie token for user … with the following error: …" are hardcoded in English in Cookie.php, are not present in the plugin's
.ini file, and are therefore not translatable via Crowdin.
Both log messages are loaded from language constants defined in plg_authentication_cookie.ini and are fully translatable, consistent with the rest of the plugin.
Please select:
Documentation link for guide.joomla.org:
No documentation changes for guide.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | Administration Language & Strings Front End Plugins |
I agree with Georg. I would also prefer a clear separation between user experience (UX) and development (DX) considerations. As a developer, a consistent and readily understandable logging system, regardless of the triggering account, is essential for effective debugging.
I agree with George. I would also prefer a clear separation between user experience (UX) and development (DX) considerations. As a developer, a consistent and readily understandable logging system, regardless of the triggering account, is essential for effective debugging.
Generally speaking our log messages are English only (the exception being those in the jerror category as they get queued up into the UI for end users too).