Pārlūkot izejas kodu

[Translation] renamed hasStrict() to defines()

Fabien Potencier 14 gadi atpakaļ
vecāks
revīzija
9ffd8ca99c

+ 1 - 1
src/Symfony/Component/Translation/MessageCatalogue.php

@@ -107,7 +107,7 @@ class MessageCatalogue implements MessageCatalogueInterface
     /**
      * {@inheritdoc}
      */
-    public function hasStrict($id, $domain = 'messages')
+    public function defines($id, $domain = 'messages')
     {
         return isset($this->messages[$domain][$id]);
     }

+ 1 - 1
src/Symfony/Component/Translation/MessageCatalogueInterface.php

@@ -86,7 +86,7 @@ interface MessageCatalogueInterface
      *
      * @api
      */
-    function hasStrict($id, $domain = 'messages');
+    function defines($id, $domain = 'messages');
 
     /**
      * Gets a message translation.

+ 1 - 1
src/Symfony/Component/Translation/Translator.php

@@ -142,7 +142,7 @@ class Translator implements TranslatorInterface
             $this->loadCatalogue($locale);
         }
 
-        if (!$this->catalogues[$locale]->hasStrict((string) $id, $domain)) {
+        if (!$this->catalogues[$locale]->defines((string) $id, $domain)) {
             // we will use the fallback
             $locale = $this->computeFallbackLocale($locale);
         }