00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 class Mage_Adminhtml_Helper_Media_Js extends Mage_Core_Helper_Js
00036 {
00037
00038 public function __construct()
00039 {
00040 $this->_translateData = array(
00041 'Complete' => $this->__('Complete'),
00042 'File size should be more than 0 bytes' => $this->__('File size should be more than 0 bytes'),
00043 'Upload Security Error' => $this->__('Upload Security Error'),
00044 'Upload HTTP Error' => $this->__('Upload HTTP Error'),
00045 'Upload I/O Error' => $this->__('Upload I/O Error'),
00046 'SSL Error: Invalid or self-signed certificate' => $this->__('SSL Error: Invalid or self-signed certificate'),
00047 'Tb' => $this->__('Tb'),
00048 'Gb' => $this->__('Gb'),
00049 'Mb' => $this->__('Mb'),
00050 'Kb' => $this->__('Kb'),
00051 'b' => $this->__('b')
00052 );
00053 }
00054
00055
00056
00057
00058
00059
00060 public function getTranslatorScript()
00061 {
00062 $script = 'if (!window.Translator) {'
00063 . ' var Translator = new Translate('.$this->getTranslateJson().');'
00064 . '} else {'
00065 . ' Translator.add('.$this->getTranslateJson().');'
00066 . '}';
00067 return $this->getScript($script);
00068 }
00069
00070 }