Kdyby\Translation\Diagnostics\Panel::markUntranslated PHP Method

markUntranslated() public method

public markUntranslated ( string $id, string $domain )
$id string
$domain string
    public function markUntranslated($id, $domain)
    {
        $this->untranslated[] = ['message' => $id, 'domain' => $domain];
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function transChoice($message, $number, array $parameters = array(), $domain = NULL, $locale = NULL)
 {
     if ($message instanceof Phrase) {
         return $message->translate($this);
     }
     if ($domain === NULL) {
         list($domain, $id) = $this->extractMessageDomain($message);
     } else {
         $id = $message;
     }
     try {
         $result = parent::transChoice($id, $number, $parameters, $domain, $locale);
     } catch (\Exception $e) {
         $result = $id;
         if ($this->panel !== NULL) {
             $this->panel->choiceError($e);
         }
     }
     if ($result === "") {
         if (!empty($this->onUntranslated)) {
             $this->onUntranslated($message);
         }
         if ($this->panel !== NULL) {
             $this->panel->markUntranslated($message);
         }
         $result = strtr($message, $parameters);
     }
     return $result;
 }