// Ensure that the Spanish translation of anonymous is the one from
// configuration and not the PO file.
// cspell:disable-next-line
$this->
assertSame('AnĂ³nimo', \Drupal::
languageManager()->
getLanguageConfigOverride('es', 'user.settings'
)->
get('anonymous'
));
/** @var \Drupal\locale\StringStorageInterface $locale_storage */
$locale_storage = \Drupal::
service('locale.storage'
);
// If configuration contains a translation that is not in the po file then
// _install_config_locale_overrides_process_batch() will create a customized
// translation.
$translation =
$locale_storage->
findTranslation(['source' => 'Anonymous', 'language' => 'es'
]);
$this->
assertSame('AnĂ³nimo',
$translation->
getString());
$this->
assertTrue((bool) $translation->customized, "A customized translation has been created for Anonymous"
);
// If configuration contains a translation that is in the po file then
// _install_config_locale_overrides_process_batch() will not create a
// customized translation.
$translation =
$locale_storage->
findTranslation(['source' => 'Apply', 'language' => 'es'
]);
$this->
assertSame('Aplicar',
$translation->
getString());
$this->
assertFalse((bool) $translation->customized, "A non-customized translation has been created for Apply"
);
/** @var \Drupal\language\Config\LanguageConfigOverride $view_config */