Commit 9fd910a2 authored by catch's avatar catch
Browse files

Issue #2188715 by penyaskito, amanshukla6158, mrinalini9, smustgrave, YesCT,...

Issue #2188715 by penyaskito, amanshukla6158, mrinalini9, smustgrave, YesCT, quietone: Document return value in \Drupal\locale\LocaleTranslation::getStringTranslation

(cherry picked from commit aa306d7c)
parent 5bac4a0f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -119,6 +119,11 @@ public function getStringTranslation($langcode, $string, $context) {
      $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);
    // 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;
  }