Fix #539 "Drop files here to upload" text not translated. Also translate Insert and Delete buttons

This commit is contained in:
Flavio Copes
2016-05-03 11:10:54 +02:00
parent 473487bbca
commit 38d3a70cb7
5 changed files with 39 additions and 33 deletions

View File

@@ -684,7 +684,10 @@ class AdminPlugin extends Plugin
'NOTHING_TO_SAVE',
'FILE_UNSUPPORTED',
'FILE_ERROR_ADD',
'FILE_ERROR_UPLOAD'
'FILE_ERROR_UPLOAD',
'DROP_FILES_HERE_TO_UPLOAD',
'DELETE',
'INSERT'
];
foreach($strings as $string) {

View File

@@ -527,4 +527,6 @@ PLUGIN_ADMIN:
ORDERING_DISABLED_BECAUSE_PARENT_SETTING_ORDER: "Parent setting order, ordering disabled"
ORDERING_DISABLED_BECAUSE_PAGE_NOT_VISIBLE: "Page is not visible, ordering disabled"
ORDERING_DISABLED_BECAUSE_TOO_MANY_SIBLINGS: "Ordering via the admin is unsupported because there are more than 200 siblings"
CANNOT_ADD_MEDIA_FILES_PAGE_NOT_SAVED: "You cannot add media files until you save the page. Just click 'Save' on top"
CANNOT_ADD_MEDIA_FILES_PAGE_NOT_SAVED: "You cannot add media files until you save the page. Just click 'Save' on top"
DROP_FILES_HERE_TO_UPLOAD: "Drop files here to upload"
INSERT: "Insert"

View File

@@ -33,6 +33,7 @@ Dropzone.confirm = (question, accepted, rejected) => {
const DropzoneMediaConfig = {
createImageThumbnails: { thumbnailWidth: 150 },
addRemoveLinks: false,
dictDefaultMessage: translations.PLUGIN_ADMIN.DROP_FILES_HERE_TO_UPLOAD,
dictRemoveFileConfirmation: '[placeholder]',
previewTemplate: `
<div class="dz-preview dz-file-preview">
@@ -45,8 +46,8 @@ const DropzoneMediaConfig = {
<div class="dz-success-mark"><span>✔</span></div>
<div class="dz-error-mark"><span>✘</span></div>
<div class="dz-error-message"><span data-dz-errormessage></span></div>
<a class="dz-remove" href="javascript:undefined;" data-dz-remove>Delete</a>
<a class="dz-insert" href="javascript:undefined;" data-dz-insert>Insert</a>
<a class="dz-remove" href="javascript:undefined;" data-dz-remove>${translations.PLUGIN_ADMIN.DELETE}</a>
<a class="dz-insert" href="javascript:undefined;" data-dz-insert>${translations.PLUGIN_ADMIN.INSERT}</a>
</div>`.trim()
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long