ePages 6.17.48 - DE_EPAGES/Test/API/TranslationJS.pm

Package DE_EPAGES::Test::API::TranslationJS

Checks translation files (de/en) for correct encoding: iso-8859-1

Base
DE_EPAGES::Test::API::StoreUnitTest

Functions

CheckGeneralUseOfDictionaries
CheckMissingTranslations
CheckUnUsedTranslations

CheckGeneralUseOfDictionaries

Check the general use of dictionaries in js modules.

Syntax
CheckGeneralUseOfDictionaries($hJS2Dict, $hDicts);
Input
$hJS2Dict (hash.refs)
hash of js modules paths as keys and values see
_GetJSDictRequire
$hDicts (hash.ref)
hash of dictionaries

CheckMissingTranslations

Check if js module and module template use unknown translation.

Syntax
CheckMissingTranslations($hJS2Dict, $hDicts, $hCompleteDicts);
Input
$hJS2Dict (hash.refs)
hash of js modules paths as keys and values see
_GetJSDictRequire
$hDicts (hash.ref)
hash of dictionaries
$hCompleteDicts (hash.ref)
hash with translations foreach dictionary

CheckUnUsedTranslations

Check if dictionaries have unnecessary translation.

Syntax
CheckUnUsedTranslations($hJS2Dict, $hDicts, $hCompleteDicts);
Input
$hDict2JSFile (hash.ref)
hash of dictionary paths as keys and values are arrays of
return value of _GetJSDictRequire
$hCompleteDictsWithOutInheritance (hash.ref)
hash with translations foreach
dictionary