i18n for file type descriptors (see #7798)

This commit is contained in:
Ingo Schommer 2012-08-27 00:02:52 +02:00
parent 8dccb7f7d7
commit 0a6a3fa936
2 changed files with 40 additions and 21 deletions

View File

@ -749,27 +749,27 @@ class File extends DataObject {
*/
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();

View File

@ -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.'