Commit 7d3e205b authored by alexpott's avatar alexpott

Issue #2139185 by penyaskito, YesCT: Notify users when landing on config...

Issue #2139185 by penyaskito, YesCT: Notify users when landing on config translation page with only one language listed
parent ae86ffd5
......@@ -128,6 +128,9 @@ public function itemPage(Request $request, RouteMatchInterface $route_match, $pl
$page['#title'] = $this->t('Translations for %label', array('%label' => $mapper->getTitle()));
$languages = $this->languageManager->getLanguages();
if (count($languages) == 1) {
drupal_set_message($this->t('In order to translate configuration, the website must have at least two <a href="@url">languages</a>.', array('@url' => $this->url('entity.configurable_language.collection'))), 'warning');
}
$original_langcode = $mapper->getLangcode();
if (!isset($languages[$original_langcode])) {
// If the language is not configured on the site, create a dummy language
......
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