eZPublish  4.5
ezchecktranslation.php File Reference

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
 
 $percentText = number_format( $percent, 2 ) . "%"
 
 $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($totalCount==0) else
 

Function Documentation

handleContextNode (   $context,
  $cli,
  $data 
) -> shutdown( 1, "XML text for file $translationFile did not validate" )
handleMessageNode (   $contextName,
  $message,
  $cli,
  $data,
  $requireTranslation 
)

Referenced by handleContextNode().

Variable Documentation

$children = $treeRoot->childNodes

Referenced by eZTemplateCompiler\calculateVariableStatistics(), eZTemplateCompiler\calculateVariableStatisticsChildren(), eZContentFunctionCollection\calendar(), eZContentStructureTreeOperator\children(), eZTemplateNodeTool\deflateFunctionNode(), eZModuleOperationInfo\executeBody(), eZTemplateFunctionElement\eZTemplateFunctionElement(), eZTemplateRoot\eZTemplateRoot(), eZCollaborationFunctionCollection\fetchGroupTree(), eZCollaborationFunctionCollection\fetchItemList(), eZCollaborationFunctionCollection\fetchMessageList(), eZContentFunctionCollection\fetchObjectTree(), eZCollaborationFunctionCollection\fetchParticipantList(), eZCollaborationFunctionCollection\fetchParticipantMap(), eZTemplateCompiler\generatePHPCode(), eZWebDAVContentBackend\getNodes(), eZTOCOperator\handleSection(), eZTSTranslator\loadTranslationFile(), eZContentStructureTreeOperator\oneLevelChildren(), eZImageAliasHandler\parseInformationNode(), 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()
$data
Initial value:
= array( 'element_count' => 0,
'context_count' => 0,
'translated_element_count' => 0,
'untranslated_element_count' => 0,
'obsolete_element_count' => 0 )

Referenced by eZDBFileHandlerMysqlBackend\_exclusiveLock(), eZDBFileHandlerMysqliBackend\_exclusiveLock(), eZExtension\activeExtensions(), Cpdf\addImage(), Cpdf\addJpegFromFile(), Cpdf\addJpegImage_common(), eZContentObject\addLocation(), Cpdf\addPngFromFile(), eZPackage\appendDocument(), eZTemplate\attributeValue(), eZSimplifiedXMLInputParser\breakInlineFlow(), eZMultiPriceData\changeCurrency(), eZURI\codecURL(), eZImageHandler\convertFilterToText(), convertSerializedData(), eZFileHandler\copy(), eZFile\create(), eZOperationMemento\create(), eZPaymentCallbackChecker\createDataFromGET(), eZMultiPriceData\createPriceListForCurrency(), eZDBSchemaInterface\data(), eZContentObjectVersion\dataMap(), ezpRestAtomDecorator\decorateFeedItem(), eZForwardCompressionHandler\doWrite(), eZGZIPZLIBCompressionHandler\doWrite(), eZFileHandler\doWrite(), eZModuleOperationInfo\execute(), 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(), eZObjectForwarder\functionTemplateHints(), eZLintSchema\generateDataFile(), eZDBSchemaInterface\generateDataFile(), eZUser\generateUserCacheForFile(), eZHTTPTool\getDataByURL(), eZWebDAVContentBackend\getNodeInfo(), eZWebDAVContentBackend\getResourceContents(), handleContextNode(), handleMessageNode(), handleNodeTemplate(), eZDBPackageHandler\handleParameters(), eZFilePackageHandler\handleParameters(), eZStepSecurity\init(), eZStepDatabaseChoice\init(), eZStepEmailSettings\init(), eZStepSiteAccess\init(), eZStepSitePackages\init(), eZStepSiteAdmin\init(), eZStepDatabaseInit\init(), eZStepLanguageOptions\init(), eZStepRegistration\init(), eZStepSiteDetails\init(), eZStepSiteTypes\init(), eZIniSettingType\initializeObjectAttribute(), eZContentClassAttribute\initializeObjectAttributes(), eZDBSchemaInterface\insertSchema(), eZINI\loadCache(), eZPackage\md5sum(), eZAuthor\metaData(), eZISBNType\objectAttributeContent(), eZIniSettingType\objectAttributeContent(), Cpdf\openFont(), eZTemplateOptimizer\optimizeResourceAcquisition(), eZTemplateOptimizer\optimizeVariable(), eZImageAliasHandler\parseInformationNode(), eZTemplateMultiPassParser\parseIntoTextElements(), eZXMLInputParser\parseTag(), eZSimplifiedXMLInputParser\parsingHandlerLiteral(), eZDFSFileHandlerDFSBackend\passthrough(), eZXMLInputParser\performPass1(), ezpRestCacheStorageClusterObject\prepareData(), eZGIFImageAnalyzer\process(), eZWebDAVServer\processClientRequest(), Cpdf\PRVT_getBytes(), eZMySQLiDB\query(), eZMySQLDB\query(), eZDbSchema\read(), eZFileHandler\read(), eZMultiPriceData\removePriceListForCurrency(), Cpdf\selectFont(), eZSOAPClient\send(), eZHTTPTool\sendHTTPRequest(), eZFileTransport\sendMail(), eZDiffContent\setChanges(), eZOperationMemento\setData(), eZDiffContent\setNewContent(), eZDiffContent\setOldContent(), eZAutoloadGenerator\setStatArray(), eZTemplateCompiler\staticNodeData(), ezpRestCacheStorageCluster\store(), ezpRestCacheStorageApcCluster\store(), eZPackage\storeString(), eZSOAPServer\stripHTTPHeader(), eZSOAPResponse\stripHTTPHeader(), eZTemplateBlockFunction\templateNodeTransformation(), Cpdf\transaction(), eZDBSchemaInterface\transformData(), eZMultiOption2Type\validateAddToBasket(), eZContentObjectAttribute\validateAddToBasket(), eZBooleanType\validateCollectionAttributeHTTPInput(), eZTextType\validateCollectionAttributeHTTPInput(), eZStringType\validateCollectionAttributeHTTPInput(), eZSelectionType\validateCollectionAttributeHTTPInput(), eZIntegerType\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(), eZAutoloadGenerator\writeAutoloadFiles(), and eZDBSchemaInterface\writeSQLSchemaFile().

$data['ignored_context_list'] = array()
$options
Initial value:
= $script->getOptions( "[ignore-tr-setup]",
"[translation]",
array( 'ignore-tr-setup' => 'Tells the analyzer to skip all translations regarding the setup' ) )
$script
Definition: adddefaultstates.php:14
$percentText = number_format( $percent, 2 ) . "%"

Referenced by eZScript\iterate().

$script
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 ) )
static instance($settings=array())
Returns a shared instance of the eZScript class.
Definition: ezscript.php:1056
$success = $tree->loadXML( $transXML )

Referenced by eZUserShopAccountHandler\accountInformation(), eZSimpleShopAccountHandler\accountInformation(), eZUserShopAccountHandler\accountName(), eZSimpleShopAccountHandler\accountName(), eZImageAliasHandler\aliasList(), eZXMLText\attribute(), eZImageHandler\changeFilePermissions(), eZSelectionType\classAttributeContent(), eZMatrixDefinition\decodeClassAttribute(), eZSOAPResponse\decodeStream(), eZRangeOption\decodeXML(), eZOption\decodeXML(), eZAuthor\decodeXML(), eZMultiOption\decodeXML(), eZMultiOption2\decodeXML(), eZMatrix\decodeXML(), eZDir\doMkdir(), eZImageAliasHandler\domTree(), eZUserShopAccountHandler\email(), eZSimpleShopAccountHandler\email(), eZPackage\fetchDOMFromFile(), eZRSSImport\getRSSVersion(), eZSimplifiedXMLInput\inputXML(), eZTSTranslator\loadTranslationFile(), eZXMLTextType\metaData(), eZDir\mkdir(), eZTOCOperator\modify(), eZXMLTextType\onPublish(), eZWebDAVServer\outputCollectionContent(), eZXMLOutputHandler\outputText(), eZDateTimeType\parseXML(), eZXMLTextType\postUnserializeContentObjectAttribute(), ezpUrlObjectLinkUpdate\processData(), eZSOAPServer\processRequest(), eZECBHandler\requestRates(), eZStepSiteTypes\retrieveRemotePackagesList(), 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']

Referenced by displayProgress().

$translationFile = $options['arguments'][0]
$transXML = fread( $fd, filesize( $translationFile ) )
$tree = new DOMDOcument()
if ($options['ignore-tr-setup']) $treeRoot = $tree->documentElement
if ($totalCount==0) else
Initial value:
{
$percent = ( $data['translated_element_count'] * 100 ) / $totalCount
$totalCount
Definition: ezchecktranslation.php:215
$data
Definition: ezchecktranslation.php:170