Until we have a condition to display only on some languages I'm going to keep the functionality as it is. I'll convert this to a feature request. Otherwise we wouldn't be able to hide the message in a language that does not have translations.
The classic always displays a default translation if there is no translation to the current language.
conditional_message.module
// Send config info to JS.
foreach ($configs as $cmid => $config) {
// Get message in correct language (or do not display).
if ($config->hasTranslation($current_langcode)) {
$config = $config->getTranslation($current_langcode);
$status = $config->isPublished();
}
else {
/*WT-patch Default translation*/
//$status = FALSE;
$config = $config->getTranslation( \Drupal::languageManager()->getDefaultLanguage()->getId() );
$status = $config->isPublished();
/*<<<*/
}
Active
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Until we have a condition to display only on some languages I'm going to keep the functionality as it is. I'll convert this to a feature request. Otherwise we wouldn't be able to hide the message in a language that does not have translations.