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() { function getFileType() {
$types = array( $types = array(
'gif' => 'GIF image - good for diagrams', 'gif' => _t('File.GifType', 'GIF image - good for diagrams'),
'jpg' => 'JPEG image - good for photos', 'jpg' => _t('File.JpgType', 'JPEG image - good for photos'),
'jpeg' => 'JPEG image - good for photos', 'jpeg' => _t('File.JpgType', 'JPEG image - good for photos'),
'png' => 'PNG image - good general-purpose format', 'png' => _t('File.PngType', 'PNG image - good general-purpose format'),
'ico' => 'Icon image', 'ico' => _t('File.IcoType', 'Icon image'),
'tiff' => 'Tagged image format', 'tiff' => _t('File.TiffType', 'Tagged image format'),
'doc' => 'Word document', 'doc' => _t('File.DocType', 'Word document'),
'xls' => 'Excel spreadsheet', 'xls' => _t('File.XlsType', 'Excel spreadsheet'),
'zip' => 'ZIP compressed file', 'zip' => _t('File.ZipType', 'ZIP compressed file'),
'gz' => 'GZIP compressed file', 'gz' => _t('File.GzType', 'GZIP compressed file'),
'dmg' => 'Apple disk image', 'dmg' => _t('File.DmgType', 'Apple disk image'),
'pdf' => 'Adobe Acrobat PDF file', 'pdf' => _t('File.PdfType', 'Adobe Acrobat PDF file'),
'mp3' => 'MP3 audio file', 'mp3' => _t('File.Mp3Type', 'MP3 audio file'),
'wav' => 'WAV audo file', 'wav' => _t('File.WavType', 'WAV audo file'),
'avi' => 'AVI video file', 'avi' => _t('File.AviType', 'AVI video file'),
'mpg' => 'MPEG video file', 'mpg' => _t('File.MpgType', 'MPEG video file'),
'mpeg' => 'MPEG video file', 'mpeg' => _t('File.MpgType', 'MPEG video file'),
'js' => 'Javascript file', 'js' => _t('File.JsType', 'Javascript file'),
'css' => 'CSS file', 'css' => _t('File.CssType', 'CSS file'),
'html' => 'HTML file', 'html' => _t('File.HtmlType', 'HTML file'),
'htm' => 'HTML file' 'htm' => _t('File.HtlType', 'HTML file')
); );
$ext = $this->getExtension(); $ext = $this->getExtension();

View File

@ -144,18 +144,37 @@ en:
Enum: Enum:
ANY: Any ANY: Any
File: File:
AviType: 'AVI video file'
Content: Content Content: Content
CssType: 'CSS file'
DmgType: 'Apple disk image'
DocType: 'Word document'
Filename: Filename 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})' INVALIDEXTENSION: 'Extension is not allowed (valid: {extensions})'
INVALIDEXTENSIONSHORT: 'Extension is not allowed' 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.' NOFILESIZE: 'Filesize is zero bytes.'
NOVALIDUPLOAD: 'File is not a valid upload' NOVALIDUPLOAD: 'File is not a valid upload'
Name: Name Name: Name
PLURALNAME: Files PLURALNAME: Files
PdfType: 'Adobe Acrobat PDF file'
PngType: 'PNG image - good general-purpose format'
SINGULARNAME: File SINGULARNAME: File
TOOLARGE: 'Filesize is too large, maximum {size} allowed' TOOLARGE: 'Filesize is too large, maximum {size} allowed'
TOOLARGESHORT: 'Filesize exceeds {size}' TOOLARGESHORT: 'Filesize exceeds {size}'
TiffType: 'Tagged image format'
Title: Title Title: Title
WavType: 'WAV audo file'
XlsType: 'Excel spreadsheet'
ZipType: 'ZIP compressed file'
FileIFrameField: FileIFrameField:
ATTACH: 'Attach {type}' ATTACH: 'Attach {type}'
ATTACHONCESAVED: '{type}s can be attached once you have saved the record for the first time.' ATTACHONCESAVED: '{type}s can be attached once you have saved the record for the first time.'