Make dropzone translatable

This commit is contained in:
Joshua Dwire 2016-03-24 18:45:00 -04:00
parent b7f0d2a33f
commit bb6e0b5186
3 changed files with 17 additions and 3 deletions

View File

@ -1104,12 +1104,22 @@ $LANG = array(
'email_documents_example_2' => 'Final Deliverable.zip',
'invoice_documents' => 'Attached Documents',
'expense_documents' => 'Attached Documents',
'document_upload_message' => 'Drop files here or click to upload.',
'invoice_embed_documents' => 'Embed Documents',
'invoice_embed_documents_help' => 'Include attached images in the invoice.',
'document_email_attachment' => 'Attach Documents',
'download_documents' => 'Download Documents (:size)',
'documents_from_expenses' => 'From Expenses:',
'dropzone' => array(// See http://www.dropzonejs.com/#config-dictDefaultMessage
'DefaultMessage' => 'Drop files or click to upload',
'FallbackMessage' => 'Your browser does not support drag\'n\'drop file uploads.',
'FallbackText' => 'Please use the fallback form below to upload your files like in the olden days.',
'FileTooBig' => 'File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.',
'InvalidFileType' => 'You can\'t upload files of this type.',
'ResponseError' => 'Server responded with {{statusCode}} code.',
'CancelUpload' => 'Cancel upload',
'CancelUploadConfirmation' => 'Are you sure you want to cancel this upload?',
'RemoveFile' => 'Remove file',
),
'documents' => 'Documents',
'document_date' => 'Document Date',
'document_size' => 'Size',

View File

@ -231,8 +231,10 @@
},
acceptedFiles:{!! json_encode(implode(',',\App\Models\Document::$allowedMimes)) !!},
addRemoveLinks:true,
@foreach(trans('texts.dropzone') as $key=>$text)
"dict{{strval($key)}}":"{{strval($text)}}",
@endforeach
maxFileSize:{{floatval(MAX_DOCUMENT_SIZE/1000)}},
dictDefaultMessage:{!! json_encode(trans('texts.document_upload_message')) !!}
});
if(dropzone instanceof Dropzone){
dropzone.on("addedfile",handleDocumentAdded);

View File

@ -951,8 +951,10 @@
},
acceptedFiles:{!! json_encode(implode(',',\App\Models\Document::$allowedMimes)) !!},
addRemoveLinks:true,
@foreach(trans('texts.dropzone') as $key=>$text)
"dict{{strval($key)}}":"{{strval($text)}}",
@endforeach
maxFileSize:{{floatval(MAX_DOCUMENT_SIZE/1000)}},
dictDefaultMessage:{!! json_encode(trans('texts.document_upload_message')) !!}
});
if(dropzone instanceof Dropzone){
dropzone.on("addedfile",handleDocumentAdded);