mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-02 03:16:11 +01:00
Fix #539 "Drop files here to upload" text not translated. Also translate Insert and Delete buttons
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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()
|
||||
};
|
||||
|
||||
|
||||
28
themes/grav/js/admin.min.js
vendored
28
themes/grav/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
30
themes/grav/js/vendor.min.js
vendored
30
themes/grav/js/vendor.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user