Skip to content
Snippets Groups Projects
Commit 7d3e205b authored by Alex Pott's avatar Alex Pott
Browse files

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
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment