示例#1
0
 function genTranslatableField_onTextValue($oRootNode, $sInputName)
 {
     $sContent = AnwXml::xmlGetUntranslatedTxt($oRootNode->nodeValue, false);
     //strip out untranslated flags
     $sContentOriginal = $this->originalStrings[$sInputName];
     $this->genTranslatableField_html .= $this->tpl()->translationSpan($sInputName);
     $bTranslated = !AnwXml::xmlIsUntranslated($oRootNode);
     if (trim($sContent) == "" || trim($sContent) == self::EMPTY_VALUE) {
         $sContent = "";
         //hide ugly empty_value to translators
     }
     $sSafeContent = AnwXml::trimOneSpaceMax($sContent);
     $sSafeContentOriginal = AnwXml::trimOneSpaceMax($sContentOriginal);
     AnwDebug::log(" --> " . $sInputName . " : " . ($bTranslated ? "TRANSLATED" : "UNTRANSLATED") . " : " . $sSafeContent . " ( was " . $sSafeContentOriginal . ")");
     $this->hiddenTags .= $this->tpl()->hiddenTags($sInputName, $sSafeContent, $sSafeContentOriginal, $bTranslated);
 }