-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove add_reasons_to_defaults()
from general initialization
#627
Conversation
I think this re-introduces #508.
Query Monitor screenshot: Translation-wise it looks fine though. |
@swissspidy great catch! I first wondered on how/where the Oh boy! Time to get this old code gone and My new commit should fix it. It now loads the "reasons" in an |
The `add_reasons_to_defaults()` adds the translatable strings to the `$default`. Those `reasons` are only needed inside the `send_mail_notification()` method, which also calls the `add_reasons_to_defaults()` function. Therefore, the function call can be removed from the general `init()` function.
…st_in_time()` This function is calling the `load_plugin_textdomain()`, which eventually become deprecated soon. Since this plugin is also using the "Text Domain" plugin header, it is not necessary to call this function at all. By removing this function, the `_load_textdomain_just_in_time()` function will be used, when the first string needs to be translated.
Since we don't explicitly load the translation files anymore this will make sure that the necessary function is there.
be234e8
to
f083959
Compare
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The
add_reasons_to_defaults()
adds the translatable strings to the$default
. Thosereasons
are only needed inside thesend_mail_notification()
method, which also calls theadd_reasons_to_defaults()
function. Therefore, the function call can be removed from the generalinit()
function.Fixes #625