mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-17 18:50:57 +01:00
Fix #556 translate email buttons titles
This commit is contained in:
18
admin.php
18
admin.php
@@ -687,7 +687,23 @@ class AdminPlugin extends Plugin
|
||||
'FILE_ERROR_UPLOAD',
|
||||
'DROP_FILES_HERE_TO_UPLOAD',
|
||||
'DELETE',
|
||||
'INSERT'
|
||||
'INSERT',
|
||||
'UNDO',
|
||||
'UNDO',
|
||||
'REDO',
|
||||
'HEADERS',
|
||||
'BOLD',
|
||||
'ITALIC',
|
||||
'STRIKETHROUGH',
|
||||
'SUMMARY_DELIMITER',
|
||||
'LINK',
|
||||
'IMAGE',
|
||||
'BLOCKQUOTE',
|
||||
'UNORDERED_LIST',
|
||||
'ORDERED_LIST',
|
||||
'EDITOR',
|
||||
'PREVIEW',
|
||||
'FULLSCREEN'
|
||||
];
|
||||
|
||||
foreach($strings as $string) {
|
||||
|
||||
@@ -530,3 +530,18 @@ PLUGIN_ADMIN:
|
||||
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"
|
||||
UNDO: "Undo"
|
||||
REDO: "Redo"
|
||||
HEADERS: "Headers"
|
||||
BOLD: "Bold"
|
||||
ITALIC: "Italic"
|
||||
STRIKETHROUGH: "Strikethrough"
|
||||
SUMMARY_DELIMITER: "Summary Delimiter"
|
||||
LINK: "Link"
|
||||
IMAGE: "Image"
|
||||
BLOCKQUOTE: "Blockquote"
|
||||
UNORDERED_LIST: "Unordered List"
|
||||
ORDERED_LIST: "Ordered List"
|
||||
EDITOR: "Editor"
|
||||
PREVIEW: "Preview"
|
||||
FULLSCREEN: "Fullscreen"
|
||||
@@ -1,5 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { config } from 'grav-config';
|
||||
import { config, translations } from 'grav-config';
|
||||
import request from '../../../utils/request';
|
||||
|
||||
let replacer = ({ name, replace, codemirror, button, mode = 'replaceSelections', runner }) => {
|
||||
@@ -85,7 +85,7 @@ export default {
|
||||
{
|
||||
undo: {
|
||||
identifier: 'undo',
|
||||
title: 'Undo',
|
||||
title: translations.PLUGIN_ADMIN.UNDO,
|
||||
label: '<i class="fa fa-fw fa-undo"></i>',
|
||||
modes: [],
|
||||
action({ codemirror, button, textarea}) {
|
||||
@@ -100,7 +100,7 @@ export default {
|
||||
{
|
||||
redo: {
|
||||
identifier: 'redo',
|
||||
title: 'Redo',
|
||||
title: translations.PLUGIN_ADMIN.REDO,
|
||||
label: '<i class="fa fa-fw fa-repeat"></i>',
|
||||
modes: [],
|
||||
action({ codemirror, button, textarea}) {
|
||||
@@ -115,7 +115,7 @@ export default {
|
||||
{
|
||||
headers: {
|
||||
identifier: 'headers',
|
||||
title: 'Headers',
|
||||
title: translations.PLUGIN_ADMIN.HEADERS,
|
||||
label: '<i class="fa fa-fw fa-header"></i>',
|
||||
modes: ['gfm', 'markdown'],
|
||||
children: [
|
||||
@@ -185,7 +185,7 @@ export default {
|
||||
{
|
||||
bold: {
|
||||
identifier: 'bold',
|
||||
title: 'Bold',
|
||||
title: translations.PLUGIN_ADMIN.BOLD,
|
||||
label: '<i class="fa fa-fw fa-bold"></i>',
|
||||
modes: ['gfm', 'markdown'],
|
||||
shortcut: ['Ctrl-B', 'Cmd-B'],
|
||||
@@ -196,7 +196,7 @@ export default {
|
||||
}, {
|
||||
italic: {
|
||||
identifier: 'italic',
|
||||
title: 'Italic',
|
||||
title: translations.PLUGIN_ADMIN.ITALIC,
|
||||
label: '<i class="fa fa-fw fa-italic"></i>',
|
||||
modes: ['gfm', 'markdown'],
|
||||
shortcut: ['Ctrl-I', 'Cmd-I'],
|
||||
@@ -207,7 +207,7 @@ export default {
|
||||
}, {
|
||||
strike: {
|
||||
identifier: 'strike',
|
||||
title: 'Strikethrough',
|
||||
title: translations.PLUGIN_ADMIN.STRIKETHROUGH,
|
||||
label: '<i class="fa fa-fw fa-strikethrough"></i>',
|
||||
modes: ['gfm', 'markdown'],
|
||||
action({ codemirror, button, textarea }) {
|
||||
@@ -217,7 +217,7 @@ export default {
|
||||
}, {
|
||||
delimiter: {
|
||||
identifier: 'delimiter',
|
||||
title: 'Summary Delimiter',
|
||||
title: translations.PLUGIN_ADMIN.SUMMARY_DELIMITER,
|
||||
label: '<i class="fa fa-fw fa-minus"></i>',
|
||||
modes: ['gfm', 'markdown'],
|
||||
action({ codemirror, button, textarea }) {
|
||||
@@ -227,7 +227,7 @@ export default {
|
||||
}, {
|
||||
link: {
|
||||
identifier: 'link',
|
||||
title: 'Link',
|
||||
title: translations.PLUGIN_ADMIN.LINK,
|
||||
label: '<i class="fa fa-fw fa-link"></i>',
|
||||
modes: ['gfm', 'markdown'],
|
||||
action({ codemirror, button, textarea }) {
|
||||
@@ -237,7 +237,7 @@ export default {
|
||||
}, {
|
||||
image: {
|
||||
identifier: 'image',
|
||||
title: 'Image',
|
||||
title: translations.PLUGIN_ADMIN.IMAGE,
|
||||
label: '<i class="fa fa-fw fa-picture-o"></i>',
|
||||
modes: ['gfm', 'markdown'],
|
||||
action({ codemirror, button, textarea }) {
|
||||
@@ -247,7 +247,7 @@ export default {
|
||||
}, {
|
||||
blockquote: {
|
||||
identifier: 'blockquote',
|
||||
title: 'Blockquote',
|
||||
title: translations.PLUGIN_ADMIN.BLOCKQUOTE,
|
||||
label: '<i class="fa fa-fw fa-quote-right"></i>',
|
||||
modes: ['gfm', 'markdown'],
|
||||
action({ codemirror, button, textarea }) {
|
||||
@@ -257,7 +257,7 @@ export default {
|
||||
}, {
|
||||
listUl: {
|
||||
identifier: 'listUl',
|
||||
title: 'Unordered List',
|
||||
title: translations.PLUGIN_ADMIN.UNORDERED_LIST,
|
||||
label: '<i class="fa fa-fw fa-list-ul"></i>',
|
||||
modes: ['gfm', 'markdown'],
|
||||
action({ codemirror, button, textarea }) {
|
||||
@@ -267,7 +267,7 @@ export default {
|
||||
}, {
|
||||
listOl: {
|
||||
identifier: 'listOl',
|
||||
title: 'Ordered List',
|
||||
title: translations.PLUGIN_ADMIN.ORDERED_LIST,
|
||||
label: '<i class="fa fa-fw fa-list-ol"></i>',
|
||||
modes: ['gfm', 'markdown'],
|
||||
action({ codemirror, button, textarea }) {
|
||||
@@ -293,7 +293,7 @@ export default {
|
||||
states: [{
|
||||
code: {
|
||||
identifier: 'editor',
|
||||
title: 'Editor',
|
||||
title: translations.PLUGIN_ADMIN.EDITOR,
|
||||
label: '<i class="fa fa-fw fa-code"></i>',
|
||||
action({ codemirror, button, textarea, ui }) {
|
||||
if (textarea.data('grav-editor-mode') === 'editor') {
|
||||
@@ -318,7 +318,7 @@ export default {
|
||||
}, {
|
||||
preview: {
|
||||
identifier: 'preview',
|
||||
title: 'Preview',
|
||||
title: translations.PLUGIN_ADMIN.PREVIEW,
|
||||
label: '<i class="fa fa-fw fa-eye"></i>',
|
||||
modes: ['gfm', 'markdown'],
|
||||
action({ codemirror, button, textarea, ui }) {
|
||||
@@ -356,7 +356,7 @@ export default {
|
||||
}, {
|
||||
fullscreen: {
|
||||
identifier: 'fullscreen',
|
||||
title: 'Fullscreen',
|
||||
title: translations.PLUGIN_ADMIN.FULLSCREEN,
|
||||
label: '<i class="fa fa-fw fa-expand"></i>',
|
||||
action({ codemirror, button, textarea }) {
|
||||
button.on('click.editor.fullscreen', () => {
|
||||
|
||||
File diff suppressed because one or more lines are too long
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