if (!
isset($this->translations
[$name][$langcode][$context][$source])) { // There is no translation of the source string in this config location
// to this language for this context.
if ($translation =
$this->localeStorage->
findTranslation(['source' =>
$source, 'context' =>
$context, 'language' =>
$langcode])) { // Look for a translation of the string. It might have one, but not
// be saved in this configuration location yet.
// If the string has a translation for this context to this language,
// save it in the configuration location so it can be looked up faster
// next time.
$this->localeStorage->
createString((array) $translation) ->
addLocation('configuration',
$name) ->
save();
} else { // No translation was found. Add the source to the configuration
// location so it can be translated, and the string is faster to look
// for next time.
$translation =
$this->localeStorage
->
createString(['source' =>
$source, 'context' =>
$context]) ->
addLocation('configuration',
$name) ->
save();
}