Issue #2188715 by penyaskito, amanshukla6158, mrinalini9, smustgrave, YesCT, quietone: Document return value in \Drupal\locale\LocaleTranslation::getStringTranslation
parent
f0723652ef
commit
aa306d7cbf
|
@ -119,6 +119,11 @@ class LocaleTranslation implements TranslatorInterface, DestructableInterface {
|
||||||
$this->translations[$langcode][$context] = new LocaleLookup($langcode, $context, $this->storage, $this->cache, $this->lock, $this->configFactory, $this->languageManager, $this->requestStack);
|
$this->translations[$langcode][$context] = new LocaleLookup($langcode, $context, $this->storage, $this->cache, $this->lock, $this->configFactory, $this->languageManager, $this->requestStack);
|
||||||
}
|
}
|
||||||
$translation = $this->translations[$langcode][$context]->get($string);
|
$translation = $this->translations[$langcode][$context]->get($string);
|
||||||
|
// If the translation is TRUE, no translation exists, but that string needs
|
||||||
|
// to be stored in the persistent cache for performance reasons (so for
|
||||||
|
// example, we don't have hundreds of queries to locale tables on each
|
||||||
|
// request). That cache is persisted when the request ends, and the lookup
|
||||||
|
// service is destroyed.
|
||||||
return $translation === TRUE ? FALSE : $translation;
|
return $translation === TRUE ? FALSE : $translation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue