Skip to content
This repository
Browse code

i18n for file type descriptors (see #7798)

  • Loading branch information...
commit 0a6a3fa9363bf1d8b20d1551b7f40105af6870e8 1 parent 8dccb7f
Ingo Schommer authored August 27, 2012
42  filesystem/File.php
@@ -749,27 +749,27 @@ public static function get_file_extension($filename) {
749 749
 	 */
750 750
 	function getFileType() {
751 751
 		$types = array(
752  
-			'gif' => 'GIF image - good for diagrams',
753  
-			'jpg' => 'JPEG image - good for photos',
754  
-			'jpeg' => 'JPEG image - good for photos',
755  
-			'png' => 'PNG image - good general-purpose format',
756  
-			'ico' => 'Icon image',
757  
-			'tiff' => 'Tagged image format',
758  
-			'doc' => 'Word document',
759  
-			'xls' => 'Excel spreadsheet',
760  
-			'zip' => 'ZIP compressed file',
761  
-			'gz' => 'GZIP compressed file',
762  
-			'dmg' => 'Apple disk image',
763  
-			'pdf' => 'Adobe Acrobat PDF file',
764  
-			'mp3' => 'MP3 audio file',
765  
-			'wav' => 'WAV audo file',
766  
-			'avi' => 'AVI video file',
767  
-			'mpg' => 'MPEG video file',
768  
-			'mpeg' => 'MPEG video file',
769  
-			'js' => 'Javascript file',
770  
-			'css' => 'CSS file',
771  
-			'html' => 'HTML file',
772  
-			'htm' => 'HTML file'
  752
+			'gif' => _t('File.GifType', 'GIF image - good for diagrams'),
  753
+			'jpg' => _t('File.JpgType', 'JPEG image - good for photos'),
  754
+			'jpeg' => _t('File.JpgType', 'JPEG image - good for photos'),
  755
+			'png' => _t('File.PngType', 'PNG image - good general-purpose format'),
  756
+			'ico' => _t('File.IcoType', 'Icon image'),
  757
+			'tiff' => _t('File.TiffType', 'Tagged image format'),
  758
+			'doc' => _t('File.DocType', 'Word document'),
  759
+			'xls' => _t('File.XlsType', 'Excel spreadsheet'),
  760
+			'zip' => _t('File.ZipType', 'ZIP compressed file'),
  761
+			'gz' => _t('File.GzType', 'GZIP compressed file'),
  762
+			'dmg' => _t('File.DmgType', 'Apple disk image'),
  763
+			'pdf' => _t('File.PdfType', 'Adobe Acrobat PDF file'),
  764
+			'mp3' => _t('File.Mp3Type', 'MP3 audio file'),
  765
+			'wav' => _t('File.WavType', 'WAV audo file'),
  766
+			'avi' => _t('File.AviType', 'AVI video file'),
  767
+			'mpg' => _t('File.MpgType', 'MPEG video file'),
  768
+			'mpeg' => _t('File.MpgType', 'MPEG video file'),
  769
+			'js' => _t('File.JsType', 'Javascript file'),
  770
+			'css' => _t('File.CssType', 'CSS file'),
  771
+			'html' => _t('File.HtmlType', 'HTML file'),
  772
+			'htm' => _t('File.HtlType', 'HTML file')
773 773
 		);
774 774
 		
775 775
 		$ext = $this->getExtension();
19  lang/en.yml
@@ -144,18 +144,37 @@ en:
144 144
   Enum:
145 145
     ANY: Any
146 146
   File:
  147
+    AviType: 'AVI video file'
147 148
     Content: Content
  149
+    CssType: 'CSS file'
  150
+    DmgType: 'Apple disk image'
  151
+    DocType: 'Word document'
148 152
     Filename: Filename
  153
+    GifType: 'GIF image - good for diagrams'
  154
+    GzType: 'GZIP compressed file'
  155
+    HtlType: 'HTML file'
  156
+    HtmlType: 'HTML file'
149 157
     INVALIDEXTENSION: 'Extension is not allowed (valid: {extensions})'
150 158
     INVALIDEXTENSIONSHORT: 'Extension is not allowed'
  159
+    IcoType: 'Icon image'
  160
+    JpgType: 'JPEG image - good for photos'
  161
+    JsType: 'Javascript file'
  162
+    Mp3Type: 'MP3 audio file'
  163
+    MpgType: 'MPEG video file'
151 164
     NOFILESIZE: 'Filesize is zero bytes.'
152 165
     NOVALIDUPLOAD: 'File is not a valid upload'
153 166
     Name: Name
154 167
     PLURALNAME: Files
  168
+    PdfType: 'Adobe Acrobat PDF file'
  169
+    PngType: 'PNG image - good general-purpose format'
155 170
     SINGULARNAME: File
156 171
     TOOLARGE: 'Filesize is too large, maximum {size} allowed'
157 172
     TOOLARGESHORT: 'Filesize exceeds {size}'
  173
+    TiffType: 'Tagged image format'
158 174
     Title: Title
  175
+    WavType: 'WAV audo file'
  176
+    XlsType: 'Excel spreadsheet'
  177
+    ZipType: 'ZIP compressed file'
159 178
   FileIFrameField:
160 179
     ATTACH: 'Attach {type}'
161 180
     ATTACHONCESAVED: '{type}s can be attached once you have saved the record for the first time.'

0 notes on commit 0a6a3fa

Please sign in to comment.
Something went wrong with that request. Please try again.