Esempio n. 1
0
 /**
  * @param $child
  * @param $xmlNS
  * @param $about
  * @param $tus
  * @return array
  */
 protected function processUnit($child, $xmlNS, $about, $tus)
 {
     if ($child->hasAttributeNS($xmlNS, 'lang')) {
         $sourceLanguage = 'en-US';
         $targetLanguage = $child->getAttributeNodeNS($xmlNS, 'lang')->value;
         $source = $child->nodeValue;
         $target = '';
         //$child->nodeValue;
         $tu = new tao_helpers_translation_POTranslationUnit();
         $tu->setSource($source);
         $tu->setTarget($target);
         $tu->setSourceLanguage($sourceLanguage);
         $tu->setTargetLanguage($targetLanguage);
         $tu->setAnnotations(array($about));
         $tu->setContext($child->namespaceURI . $child->localName);
         $tus[] = $tu;
         return $tus;
     }
     return $tus;
 }