Commit 43d5ed1c authored by dunin's avatar dunin Committed by Fabiano Sant'Ana
Browse files

Issue #2600394 by dunin, giancarlosotelo: Incorrect use t() in CaptchaSettingsForm class

parent 3a0996ab
......@@ -163,7 +163,7 @@ class CaptchaSettingsForm extends ConfigFormBase {
$form['enable_stats'] = [
'#type' => 'checkbox',
'#title' => $this->t('Enable statistics'),
'#description' => $this->t('Keep CAPTCHA related counters in the <a href="!statusreport">status report</a>. Note that this comes with a performance penalty as updating the counters results in clearing the variable cache.', ['!statusreport' => Url::fromRoute('system.status')->toString()]),
'#description' => $this->t('Keep CAPTCHA related counters in the <a href=":statusreport">status report</a>. Note that this comes with a performance penalty as updating the counters results in clearing the variable cache.', [':statusreport' => Url::fromRoute('system.status')->toString()]),
'#default_value' => $config->get('enable_stats'),
];
......@@ -174,9 +174,10 @@ class CaptchaSettingsForm extends ConfigFormBase {
'#description' => $this->t('Report information about wrong responses to the log.'),
'#default_value' => $config->get('log_wrong_responses'),
];
// Replace the description with a link if dblog.module is enabled.
if (\Drupal::moduleHandler()->moduleExists('dblog')) {
$form['#description'] = $this->t('Report information about wrong responses to the <a href="!dblog">log</a>.', ['!dblog' => Url::fromRoute('dblog.overview')->toString()]);
$form['log_wrong_responses']['#description'] = $this->t('Report information about wrong responses to the <a href=":dblog">log</a>.', [':dblog' => Url::fromRoute('dblog.overview')->toString()]);
}
// Submit button.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment