eZ Publish  [4.0]
ezchecktranslation.php File Reference

Go to the source code of this file.

Functions

 handleContextNode ($context, $cli, $data)
 handleMessageNode ($contextName, $message, $cli, $data, $requireTranslation)

Variables

 $children = $treeRoot->childNodes
 $cli = eZCLI::instance()
 $data
 $data ['ignored_context_list'] = array()
 $fd = fopen( $translationFile, "rb" )
 $options
 $script
 $success = $tree->loadXML( $transXML )
 $totalCount = $data['translated_element_count'] + $data['untranslated_element_count']
 $translationFile = $options['arguments'][0]
 $translationName = false
 $transXML = fread( $fd, filesize( $translationFile ) )
 $tree = new DOMDOcument()
if($options['ignore-tr-setup']) $treeRoot = $tree->documentElement
if(!file_exists($translationFile))
if(!file_exists($translationFile))
$script->shutdown(1
Translation file
$translationFile does not 
exist
if(count($options['arguments'])
< 1) $script->shutdown(1 No
translation 
specified
if(!eZTSTranslator::validateDOMTree($tree))
$script->shutdown(1 XML text
for file $translationFile did
not 
validate

Function Documentation

handleContextNode ( context,
cli,
data 
)

Definition at line 83 of file ezchecktranslation.php.

handleMessageNode ( contextName,
message,
cli,
data,
requireTranslation 
)

Definition at line 123 of file ezchecktranslation.php.

Referenced by handleContextNode().


Variable Documentation

$children = $treeRoot->childNodes

Definition at line 197 of file ezchecktranslation.php.

Referenced by eZDOMNode\__clone(), eZTemplateCompiler\calculateVariableStatistics(), eZTemplateCompiler\calculateVariableStatisticsChildren(), eZContentStructureTreeOperator\children(), eZTemplateNodeTool\deflateFunctionNode(), eZDOMNode\elementChildrenByName(), eZModuleOperationInfo\executeBody(), eZTemplateFunctionElement\eZTemplateFunctionElement(), eZTemplateRoot\eZTemplateRoot(), eZTemplateCompiler\generatePHPCode(), eZTOCOperator\handleSection(), eZTSTranslator\loadTranslationFile(), eZDOMNode\nextSibling(), eZContentStructureTreeOperator\oneLevelChildren(), eZImageAliasHandler\parseInformationNode(), eZDOMNode\previousSibling(), eZSchema\printTree(), eZTemplateBlockFunction\process(), eZTemplateSwitchFunction\process(), eZTemplateDebugFunction\process(), eZTemplateSetFunction\process(), eZTemplateSectionFunction\process(), eZTemplateCompiledLoop\processChildren(), eZTemplateSectionFunction\processChildren(), eZTemplateSectionFunction\processChildrenOnce(), eZTemplate\processNode(), eZTemplateCompiler\processNodeCombining(), eZTemplateCompiler\processNodeCombiningChildren(), eZTemplateCompiler\processNodeTransformationChildren(), eZTemplateCompiler\processNodeTransformationRoot(), eZSOAPServer\processRequest(), eZTemplateCompiler\processStaticOptimizations(), eZXMLInputParser\processSubtree(), eZTemplateCacheFunction\processUncached(), eZContentObjectTreeNode\removeSubtrees(), eZTemplateSwitchFunction\templateNodeCaseTransformation(), eZTemplateCacheFunction\templateNodeTransformation(), eZTemplateIfFunction\templateNodeTransformation(), eZTemplateBlockFunction\templateNodeTransformation(), eZTemplateDebugFunction\templateNodeTransformation(), eZTemplateSwitchFunction\templateNodeTransformation(), and eZTemplateSectionFunction\templateNodeTransformation().

$cli = eZCLI::instance()

Definition at line 35 of file ezchecktranslation.php.

$data
Initial value:
 array( 'element_count' => 0,
               'context_count' => 0,
               'translated_element_count' => 0,
               'untranslated_element_count' => 0,
               'obsolete_element_count' => 0 )

Definition at line 177 of file ezchecktranslation.php.

Referenced by eZDBFileHandlerMysqlBackend\_exclusiveLock(), Cpdf\addImage(), Cpdf\addJpegFromFile(), Cpdf\addJpegImage_common(), eZContentObject\addLocation(), Cpdf\addPngFromFile(), eZPackage\appendDocument(), eZTemplate\attributeValue(), eZSimplifiedXMLInputParser\breakInlineFlow(), eZAutoloadGenerator\buildAutoloadArrays(), eZURI\codecURL(), eZImageHandler\convertFilterToText(), convertSerializedData(), eZFileHandler\copy(), eZFile\create(), eZOperationMemento\create(), eZDBSchemaInterface\data(), eZContentObjectVersion\dataMap(), eZForwardCompressionHandler\doWrite(), eZGZIPZLIBCompressionHandler\doWrite(), eZFileHandler\doWrite(), eZCodeMapper\extractUnicodeValue(), eZCodeMapper\extractUnicodeValues(), eZPDFTable\ezTable(), eZTemplateVariableElement\eZTemplateVariableElement(), eZBooleanType\fetchClassAttributeHTTPInput(), eZProductCategoryType\fetchCollectionAttributeHTTPInput(), eZBooleanType\fetchCollectionAttributeHTTPInput(), eZIntegerType\fetchCollectionAttributeHTTPInput(), eZContentObject\fetchDataMap(), eZPackageType\fetchObjectAttributeHTTPInput(), eZFloatType\fetchObjectAttributeHTTPInput(), eZProductCategoryType\fetchObjectAttributeHTTPInput(), eZSubtreeSubscriptionType\fetchObjectAttributeHTTPInput(), eZKeywordType\fetchObjectAttributeHTTPInput(), eZEmailType\fetchObjectAttributeHTTPInput(), eZBooleanType\fetchObjectAttributeHTTPInput(), eZTextType\fetchObjectAttributeHTTPInput(), eZPriceType\fetchObjectAttributeHTTPInput(), eZStringType\fetchObjectAttributeHTTPInput(), eZIntegerType\fetchObjectAttributeHTTPInput(), eZCountryType\fetchObjectAttributeHTTPInput(), eZIniSettingType\fetchObjectAttributeHTTPInput(), eZArchiveHandler\fileWrite(), eZObjectForwarder\functionTemplateHints(), eZLintSchema\generateDataFile(), eZDBSchemaInterface\generateDataFile(), eZHTTPTool\getDataByURL(), handleContextNode(), handleMessageNode(), eZDBPackageHandler\handleParameters(), eZFilePackageHandler\handleParameters(), eZIniSettingType\initializeObjectAttribute(), eZDBSchemaInterface\insertSchema(), eZPackage\md5sum(), eZAuthor\metaData(), eZISBNType\objectAttributeContent(), eZIniSettingType\objectAttributeContent(), Cpdf\openFont(), eZTemplateOptimizer\optimizeResourceAcquisition(), eZTemplateOptimizer\optimizeVariable(), eZImageAliasHandler\parseInformationNode(), eZTemplateMultiPassParser\parseIntoTextElements(), eZXMLInputParser\parseTag(), eZSimplifiedXMLInputParser\parsingHandlerLiteral(), eZXMLInputParser\performPass1(), eZGIFImageAnalyzer\process(), eZWebDAVServer\processClientRequest(), Cpdf\PRVT_getBytes(), eZMySQLiDB\query(), eZMySQLDB\query(), eZDbSchema\read(), eZFileHandler\read(), eZINI\saveCache(), Cpdf\selectFont(), eZSOAPClient\send(), smtp\send_data(), eZHTTPTool\sendHTTPRequest(), eZFileTransport\sendMail(), eZDiffContent\setChanges(), eZOperationMemento\setData(), eZDiffContent\setNewContent(), eZDiffContent\setOldContent(), eZTemplateCompiler\staticNodeData(), eZPackage\storeString(), eZSOAPServer\stripHTTPHeader(), eZSOAPResponse\stripHTTPHeader(), eZTemplateBlockFunction\templateNodeTransformation(), Cpdf\transaction(), eZDBSchemaInterface\transformData(), eZMultiOption2Type\validateAddToBasket(), eZContentObjectAttribute\validateAddToBasket(), eZBooleanType\validateCollectionAttributeHTTPInput(), eZTextType\validateCollectionAttributeHTTPInput(), eZStringType\validateCollectionAttributeHTTPInput(), eZIntegerType\validateCollectionAttributeHTTPInput(), eZSelectionType\validateCollectionAttributeHTTPInput(), eZCountryType\validateCollectionAttributeHTTPInput(), eZSimplifiedXMLInput\validateInput(), eZIntegerType\validateIntegerHTTPInput(), eZPriceType\validateObjectAttributeHTTPInput(), eZMatrixType\validateObjectAttributeHTTPInput(), eZProductCategoryType\validateObjectAttributeHTTPInput(), eZBooleanType\validateObjectAttributeHTTPInput(), eZKeywordType\validateObjectAttributeHTTPInput(), eZTextType\validateObjectAttributeHTTPInput(), eZStringType\validateObjectAttributeHTTPInput(), eZFloatType\validateObjectAttributeHTTPInput(), eZIntegerType\validateObjectAttributeHTTPInput(), eZSelectionType\validateObjectAttributeHTTPInput(), eZCountryType\validateObjectAttributeHTTPInput(), eZStringType\validateStringHTTPInput(), eZFileHandler\write(), eZDBSchemaInterface\writeArraySchemaFile(), and eZDBSchemaInterface\writeSQLSchemaFile().

$data['ignored_context_list'] = array()

Definition at line 182 of file ezchecktranslation.php.

$fd = fopen( $translationFile, "rb" )

Definition at line 67 of file ezchecktranslation.php.

$options
Initial value:
 $script->getOptions( "[ignore-tr-setup]",
                                "[translation]",
                                array( 'ignore-tr-setup' => 'Tells the analyzer to skip all translations regarding the setup' ) )

Definition at line 46 of file ezchecktranslation.php.

Initial value:
 eZScript::instance( array( 'description' => ( "eZ Publish Translation Checker\n\n" .
                                                        "Will display some statistics on a given translation" .
                                                        "\n" .
                                                        "ezchecktranslation.php ita-IT" ),
                                     'use-session' => false,
                                     'use-modules' => true,
                                     'use-extensions' => true ) )

Definition at line 36 of file ezchecktranslation.php.

$success = $tree->loadXML( $transXML )

Definition at line 75 of file ezchecktranslation.php.

Referenced by eZUserShopAccountHandler\accountInformation(), eZSimpleShopAccountHandler\accountInformation(), eZUserShopAccountHandler\accountName(), eZSimpleShopAccountHandler\accountName(), eZImageAliasHandler\aliasList(), eZXMLText\attribute(), eZImageHandler\changeFilePermissions(), eZSelectionType\classAttributeContent(), eZMatrixDefinition\decodeClassAttribute(), eZRangeOption\decodeXML(), eZOption\decodeXML(), eZAuthor\decodeXML(), eZMultiOption\decodeXML(), eZMultiOption2\decodeXML(), eZMatrix\decodeXML(), eZImageAliasHandler\domTree(), eZSimpleShopAccountHandler\email(), eZUserShopAccountHandler\email(), eZPackage\fetchDOMFromFile(), eZRSSImport\getRSSVersion(), eZSimplifiedXMLInput\inputXML(), eZTSTranslator\loadTranslationFile(), eZXMLTextType\metaData(), eZTOCOperator\modify(), eZXMLTextType\onPublish(), eZWebDAVServer\outputCollectionContent(), eZXMLOutputHandler\outputText(), eZDateTimeType\parseXML(), eZXMLTextType\postUnserializeContentObjectAttribute(), ezpUrlObjectLinkUpdate\processData(), eZSOAPServer\processRequest(), eZSelectionType\serializeContentClassAttribute(), eZDateTimeType\serializeContentClassAttribute(), eZRangeOptionType\serializeContentObjectAttribute(), eZAuthorType\serializeContentObjectAttribute(), eZOptionType\serializeContentObjectAttribute(), eZMultiOptionType\serializeContentObjectAttribute(), eZMatrixType\serializeContentObjectAttribute(), eZXMLTextType\serializeContentObjectAttribute(), eZMultiOption2Type\serializeContentObjectAttribute(), eZObjectRelationListType\serializeContentObjectAttribute(), and eZXMLTextType\title().

$totalCount = $data['translated_element_count'] + $data['untranslated_element_count']

Definition at line 222 of file ezchecktranslation.php.

Referenced by displayProgress().

$translationFile = $options['arguments'][0]

Definition at line 55 of file ezchecktranslation.php.

Referenced by eZTSTranslator\fetchList().

$translationName = false

Definition at line 54 of file ezchecktranslation.php.

Referenced by eZContentObject\unserialize().

$transXML = fread( $fd, filesize( $translationFile ) )

Definition at line 68 of file ezchecktranslation.php.

$tree = new DOMDOcument()
if ($options['ignore-tr-setup']) $treeRoot = $tree->documentElement
if (!file_exists($translationFile)) if (!file_exists($translationFile)) $script->shutdown(1 Translation file $translationFile does not exist

Definition at line 62 of file ezchecktranslation.php.

if (count($options['arguments'])< 1) $script->shutdown(1 No translation specified

Definition at line 51 of file ezchecktranslation.php.

if (!eZTSTranslator::validateDOMTree($tree)) $script->shutdown(1 XML text for file $translationFile did not validate