Commit 9f27136c authored by NickWilde's avatar NickWilde

Fix: Issue #2824501 by NickWilde: !placeholder removed from t() and format_string() in Drupal 8.x

parent 10b82ba0
......@@ -473,7 +473,7 @@
// If it gets here it's because it's an invalid action.
default:
status.value = false;
status.text = Drupal.t('An invalid action "!action" was specified.', {"!action": options.action});
status.text = Drupal.t('An invalid action "@action" was specified.', {"@action": options.action});
}
return status;
};
......
......@@ -523,18 +523,18 @@ class Cycle extends ViewsSlideshowTypeBase {
*/
public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
if (!is_numeric($form_state->getValue(['style_options', 'views_slideshow_cycle', 'timeout']))) {
$form_state->setErrorByName('style_options][views_slideshow_cycle][timeout', t('!setting must be numeric!',
['!setting' => t('Timeout')]
$form_state->setErrorByName('style_options][views_slideshow_cycle][timeout', t('@setting must be numeric!',
['@setting' => t('Timeout')]
));
}
if (!is_numeric($form_state->getValue(['style_options', 'views_slideshow_cycle', 'speed']))) {
$form_state->setErrorByName('style_options][views_slideshow_cycle][speed', t('!setting must be numeric!',
['!setting' => t('Speed')]
$form_state->setErrorByName('style_options][views_slideshow_cycle][speed', t('@setting must be numeric!',
['@setting' => t('Speed')]
));
}
if (!is_numeric($form_state->getValue(['style_options', 'views_slideshow_cycle', 'remember_slide_days']))) {
$form_state->setErrorByName('style_options][views_slideshow_cycle][remember_slide_days', t('!setting must be numeric!',
['!setting' => t('Slide days')]
$form_state->setErrorByName('style_options][views_slideshow_cycle][remember_slide_days', t('@setting must be numeric!',
['@setting' => t('Slide days')]
));
}
}
......
......@@ -19,7 +19,7 @@ function views_slideshow_cycle_help($route_name, RouteMatchInterface $route_matc
$output = '<p>' . Link::fromTextAndUrl('Click here to view the documentation for Views Slideshow Cycle.', Url::fromRoute('advanced_help.module_index', ['module' => 'views_slideshow_cycle'])->toString()) . '</p>';
}
else {
$output = '<p>' . t('Views Slideshow Cycle help can be found by installing and enabling the !advanced_help', ['!advanced_help' => Link::fromTextAndUrl(t('Advanced Help module'), Url::fromUri('http://drupal.org/project/advanced_help'))->toString()]) . '</p>';
$output = '<p>' . t('Views Slideshow Cycle help can be found by installing and enabling the @advanced_help', ['@advanced_help' => Link::fromTextAndUrl(t('Advanced Help module'), Url::fromUri('http://drupal.org/project/advanced_help'))->toString()]) . '</p>';
}
return $output;
}
......
Markdown is supported
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