diff options
Diffstat (limited to 'includes/resourceloader/ResourceLoaderLanguageDataModule.php')
-rw-r--r-- | includes/resourceloader/ResourceLoaderLanguageDataModule.php | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/includes/resourceloader/ResourceLoaderLanguageDataModule.php b/includes/resourceloader/ResourceLoaderLanguageDataModule.php index c916c4a5..0f8e54ce 100644 --- a/includes/resourceloader/ResourceLoaderLanguageDataModule.php +++ b/includes/resourceloader/ResourceLoaderLanguageDataModule.php @@ -28,6 +28,7 @@ class ResourceLoaderLanguageDataModule extends ResourceLoaderModule { protected $language; + protected $targets = array( 'desktop', 'mobile' ); /** * Get the grammar forms for the site content language. * @@ -47,24 +48,35 @@ class ResourceLoaderLanguageDataModule extends ResourceLoaderModule { } /** + * Get the digit groupin Pattern for the site content language. + * + * @return array + */ + protected function getDigitGroupingPattern() { + return $this->language->digitGroupingPattern(); + } + + /** * Get the digit transform table for the content language - * Seperator transform table also required here to convert - * the . and , sign to appropriate forms in content language. * * @return array */ protected function getDigitTransformTable() { - $digitTransformTable = $this->language->digitTransformTable(); - $separatorTransformTable = $this->language->separatorTransformTable(); - if ( $digitTransformTable ) { - array_merge( $digitTransformTable, (array)$separatorTransformTable ); - } else { - return $separatorTransformTable; - } - return $digitTransformTable; + return $this->language->digitTransformTable(); } /** + * Get seperator transform table required for converting + * the . and , sign to appropriate forms in site content language. + * + * @return array + */ + protected function getSeparatorTransformTable() { + return $this->language->separatorTransformTable(); + } + + + /** * Get all the dynamic data for the content language to an array * * @return array @@ -72,8 +84,10 @@ class ResourceLoaderLanguageDataModule extends ResourceLoaderModule { protected function getData() { return array( 'digitTransformTable' => $this->getDigitTransformTable(), + 'separatorTransformTable' => $this->getSeparatorTransformTable(), 'grammarForms' => $this->getSiteLangGrammarForms(), 'pluralRules' => $this->getPluralRules(), + 'digitGroupingPattern' => $this->getDigitGroupingPattern(), ); } |