Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

i18n for file type descriptors (see #7798)

  • Loading branch information...
commit 0a6a3fa9363bf1d8b20d1551b7f40105af6870e8 1 parent 8dccb7f
Ingo Schommer chillu authored
Showing with 40 additions and 21 deletions.
  1. +21 −21 filesystem/File.php
  2. +19 −0 lang/en.yml
42 filesystem/File.php
View
@@ -749,27 +749,27 @@ public static function get_file_extension($filename) {
*/
function getFileType() {
$types = array(
- 'gif' => 'GIF image - good for diagrams',
- 'jpg' => 'JPEG image - good for photos',
- 'jpeg' => 'JPEG image - good for photos',
- 'png' => 'PNG image - good general-purpose format',
- 'ico' => 'Icon image',
- 'tiff' => 'Tagged image format',
- 'doc' => 'Word document',
- 'xls' => 'Excel spreadsheet',
- 'zip' => 'ZIP compressed file',
- 'gz' => 'GZIP compressed file',
- 'dmg' => 'Apple disk image',
- 'pdf' => 'Adobe Acrobat PDF file',
- 'mp3' => 'MP3 audio file',
- 'wav' => 'WAV audo file',
- 'avi' => 'AVI video file',
- 'mpg' => 'MPEG video file',
- 'mpeg' => 'MPEG video file',
- 'js' => 'Javascript file',
- 'css' => 'CSS file',
- 'html' => 'HTML file',
- 'htm' => 'HTML file'
+ 'gif' => _t('File.GifType', 'GIF image - good for diagrams'),
+ 'jpg' => _t('File.JpgType', 'JPEG image - good for photos'),
+ 'jpeg' => _t('File.JpgType', 'JPEG image - good for photos'),
+ 'png' => _t('File.PngType', 'PNG image - good general-purpose format'),
+ 'ico' => _t('File.IcoType', 'Icon image'),
+ 'tiff' => _t('File.TiffType', 'Tagged image format'),
+ 'doc' => _t('File.DocType', 'Word document'),
+ 'xls' => _t('File.XlsType', 'Excel spreadsheet'),
+ 'zip' => _t('File.ZipType', 'ZIP compressed file'),
+ 'gz' => _t('File.GzType', 'GZIP compressed file'),
+ 'dmg' => _t('File.DmgType', 'Apple disk image'),
+ 'pdf' => _t('File.PdfType', 'Adobe Acrobat PDF file'),
+ 'mp3' => _t('File.Mp3Type', 'MP3 audio file'),
+ 'wav' => _t('File.WavType', 'WAV audo file'),
+ 'avi' => _t('File.AviType', 'AVI video file'),
+ 'mpg' => _t('File.MpgType', 'MPEG video file'),
+ 'mpeg' => _t('File.MpgType', 'MPEG video file'),
+ 'js' => _t('File.JsType', 'Javascript file'),
+ 'css' => _t('File.CssType', 'CSS file'),
+ 'html' => _t('File.HtmlType', 'HTML file'),
+ 'htm' => _t('File.HtlType', 'HTML file')
);
$ext = $this->getExtension();
19 lang/en.yml
View
@@ -144,18 +144,37 @@ en:
Enum:
ANY: Any
File:
+ AviType: 'AVI video file'
Content: Content
+ CssType: 'CSS file'
+ DmgType: 'Apple disk image'
+ DocType: 'Word document'
Filename: Filename
+ GifType: 'GIF image - good for diagrams'
+ GzType: 'GZIP compressed file'
+ HtlType: 'HTML file'
+ HtmlType: 'HTML file'
INVALIDEXTENSION: 'Extension is not allowed (valid: {extensions})'
INVALIDEXTENSIONSHORT: 'Extension is not allowed'
+ IcoType: 'Icon image'
+ JpgType: 'JPEG image - good for photos'
+ JsType: 'Javascript file'
+ Mp3Type: 'MP3 audio file'
+ MpgType: 'MPEG video file'
NOFILESIZE: 'Filesize is zero bytes.'
NOVALIDUPLOAD: 'File is not a valid upload'
Name: Name
PLURALNAME: Files
+ PdfType: 'Adobe Acrobat PDF file'
+ PngType: 'PNG image - good general-purpose format'
SINGULARNAME: File
TOOLARGE: 'Filesize is too large, maximum {size} allowed'
TOOLARGESHORT: 'Filesize exceeds {size}'
+ TiffType: 'Tagged image format'
Title: Title
+ WavType: 'WAV audo file'
+ XlsType: 'Excel spreadsheet'
+ ZipType: 'ZIP compressed file'
FileIFrameField:
ATTACH: 'Attach {type}'
ATTACHONCESAVED: '{type}s can be attached once you have saved the record for the first time.'
Please sign in to comment.
Something went wrong with that request. Please try again.