mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-17 02:31:02 +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',
|
'FILE_ERROR_UPLOAD',
|
||||||
'DROP_FILES_HERE_TO_UPLOAD',
|
'DROP_FILES_HERE_TO_UPLOAD',
|
||||||
'DELETE',
|
'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) {
|
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"
|
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"
|
DROP_FILES_HERE_TO_UPLOAD: "Drop files here to upload"
|
||||||
INSERT: "Insert"
|
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 $ from 'jquery';
|
||||||
import { config } from 'grav-config';
|
import { config, translations } from 'grav-config';
|
||||||
import request from '../../../utils/request';
|
import request from '../../../utils/request';
|
||||||
|
|
||||||
let replacer = ({ name, replace, codemirror, button, mode = 'replaceSelections', runner }) => {
|
let replacer = ({ name, replace, codemirror, button, mode = 'replaceSelections', runner }) => {
|
||||||
@@ -85,7 +85,7 @@ export default {
|
|||||||
{
|
{
|
||||||
undo: {
|
undo: {
|
||||||
identifier: 'undo',
|
identifier: 'undo',
|
||||||
title: 'Undo',
|
title: translations.PLUGIN_ADMIN.UNDO,
|
||||||
label: '<i class="fa fa-fw fa-undo"></i>',
|
label: '<i class="fa fa-fw fa-undo"></i>',
|
||||||
modes: [],
|
modes: [],
|
||||||
action({ codemirror, button, textarea}) {
|
action({ codemirror, button, textarea}) {
|
||||||
@@ -100,7 +100,7 @@ export default {
|
|||||||
{
|
{
|
||||||
redo: {
|
redo: {
|
||||||
identifier: 'redo',
|
identifier: 'redo',
|
||||||
title: 'Redo',
|
title: translations.PLUGIN_ADMIN.REDO,
|
||||||
label: '<i class="fa fa-fw fa-repeat"></i>',
|
label: '<i class="fa fa-fw fa-repeat"></i>',
|
||||||
modes: [],
|
modes: [],
|
||||||
action({ codemirror, button, textarea}) {
|
action({ codemirror, button, textarea}) {
|
||||||
@@ -115,7 +115,7 @@ export default {
|
|||||||
{
|
{
|
||||||
headers: {
|
headers: {
|
||||||
identifier: 'headers',
|
identifier: 'headers',
|
||||||
title: 'Headers',
|
title: translations.PLUGIN_ADMIN.HEADERS,
|
||||||
label: '<i class="fa fa-fw fa-header"></i>',
|
label: '<i class="fa fa-fw fa-header"></i>',
|
||||||
modes: ['gfm', 'markdown'],
|
modes: ['gfm', 'markdown'],
|
||||||
children: [
|
children: [
|
||||||
@@ -185,7 +185,7 @@ export default {
|
|||||||
{
|
{
|
||||||
bold: {
|
bold: {
|
||||||
identifier: 'bold',
|
identifier: 'bold',
|
||||||
title: 'Bold',
|
title: translations.PLUGIN_ADMIN.BOLD,
|
||||||
label: '<i class="fa fa-fw fa-bold"></i>',
|
label: '<i class="fa fa-fw fa-bold"></i>',
|
||||||
modes: ['gfm', 'markdown'],
|
modes: ['gfm', 'markdown'],
|
||||||
shortcut: ['Ctrl-B', 'Cmd-B'],
|
shortcut: ['Ctrl-B', 'Cmd-B'],
|
||||||
@@ -196,7 +196,7 @@ export default {
|
|||||||
}, {
|
}, {
|
||||||
italic: {
|
italic: {
|
||||||
identifier: 'italic',
|
identifier: 'italic',
|
||||||
title: 'Italic',
|
title: translations.PLUGIN_ADMIN.ITALIC,
|
||||||
label: '<i class="fa fa-fw fa-italic"></i>',
|
label: '<i class="fa fa-fw fa-italic"></i>',
|
||||||
modes: ['gfm', 'markdown'],
|
modes: ['gfm', 'markdown'],
|
||||||
shortcut: ['Ctrl-I', 'Cmd-I'],
|
shortcut: ['Ctrl-I', 'Cmd-I'],
|
||||||
@@ -207,7 +207,7 @@ export default {
|
|||||||
}, {
|
}, {
|
||||||
strike: {
|
strike: {
|
||||||
identifier: 'strike',
|
identifier: 'strike',
|
||||||
title: 'Strikethrough',
|
title: translations.PLUGIN_ADMIN.STRIKETHROUGH,
|
||||||
label: '<i class="fa fa-fw fa-strikethrough"></i>',
|
label: '<i class="fa fa-fw fa-strikethrough"></i>',
|
||||||
modes: ['gfm', 'markdown'],
|
modes: ['gfm', 'markdown'],
|
||||||
action({ codemirror, button, textarea }) {
|
action({ codemirror, button, textarea }) {
|
||||||
@@ -217,7 +217,7 @@ export default {
|
|||||||
}, {
|
}, {
|
||||||
delimiter: {
|
delimiter: {
|
||||||
identifier: 'delimiter',
|
identifier: 'delimiter',
|
||||||
title: 'Summary Delimiter',
|
title: translations.PLUGIN_ADMIN.SUMMARY_DELIMITER,
|
||||||
label: '<i class="fa fa-fw fa-minus"></i>',
|
label: '<i class="fa fa-fw fa-minus"></i>',
|
||||||
modes: ['gfm', 'markdown'],
|
modes: ['gfm', 'markdown'],
|
||||||
action({ codemirror, button, textarea }) {
|
action({ codemirror, button, textarea }) {
|
||||||
@@ -227,7 +227,7 @@ export default {
|
|||||||
}, {
|
}, {
|
||||||
link: {
|
link: {
|
||||||
identifier: 'link',
|
identifier: 'link',
|
||||||
title: 'Link',
|
title: translations.PLUGIN_ADMIN.LINK,
|
||||||
label: '<i class="fa fa-fw fa-link"></i>',
|
label: '<i class="fa fa-fw fa-link"></i>',
|
||||||
modes: ['gfm', 'markdown'],
|
modes: ['gfm', 'markdown'],
|
||||||
action({ codemirror, button, textarea }) {
|
action({ codemirror, button, textarea }) {
|
||||||
@@ -237,7 +237,7 @@ export default {
|
|||||||
}, {
|
}, {
|
||||||
image: {
|
image: {
|
||||||
identifier: 'image',
|
identifier: 'image',
|
||||||
title: 'Image',
|
title: translations.PLUGIN_ADMIN.IMAGE,
|
||||||
label: '<i class="fa fa-fw fa-picture-o"></i>',
|
label: '<i class="fa fa-fw fa-picture-o"></i>',
|
||||||
modes: ['gfm', 'markdown'],
|
modes: ['gfm', 'markdown'],
|
||||||
action({ codemirror, button, textarea }) {
|
action({ codemirror, button, textarea }) {
|
||||||
@@ -247,7 +247,7 @@ export default {
|
|||||||
}, {
|
}, {
|
||||||
blockquote: {
|
blockquote: {
|
||||||
identifier: 'blockquote',
|
identifier: 'blockquote',
|
||||||
title: 'Blockquote',
|
title: translations.PLUGIN_ADMIN.BLOCKQUOTE,
|
||||||
label: '<i class="fa fa-fw fa-quote-right"></i>',
|
label: '<i class="fa fa-fw fa-quote-right"></i>',
|
||||||
modes: ['gfm', 'markdown'],
|
modes: ['gfm', 'markdown'],
|
||||||
action({ codemirror, button, textarea }) {
|
action({ codemirror, button, textarea }) {
|
||||||
@@ -257,7 +257,7 @@ export default {
|
|||||||
}, {
|
}, {
|
||||||
listUl: {
|
listUl: {
|
||||||
identifier: 'listUl',
|
identifier: 'listUl',
|
||||||
title: 'Unordered List',
|
title: translations.PLUGIN_ADMIN.UNORDERED_LIST,
|
||||||
label: '<i class="fa fa-fw fa-list-ul"></i>',
|
label: '<i class="fa fa-fw fa-list-ul"></i>',
|
||||||
modes: ['gfm', 'markdown'],
|
modes: ['gfm', 'markdown'],
|
||||||
action({ codemirror, button, textarea }) {
|
action({ codemirror, button, textarea }) {
|
||||||
@@ -267,7 +267,7 @@ export default {
|
|||||||
}, {
|
}, {
|
||||||
listOl: {
|
listOl: {
|
||||||
identifier: 'listOl',
|
identifier: 'listOl',
|
||||||
title: 'Ordered List',
|
title: translations.PLUGIN_ADMIN.ORDERED_LIST,
|
||||||
label: '<i class="fa fa-fw fa-list-ol"></i>',
|
label: '<i class="fa fa-fw fa-list-ol"></i>',
|
||||||
modes: ['gfm', 'markdown'],
|
modes: ['gfm', 'markdown'],
|
||||||
action({ codemirror, button, textarea }) {
|
action({ codemirror, button, textarea }) {
|
||||||
@@ -293,7 +293,7 @@ export default {
|
|||||||
states: [{
|
states: [{
|
||||||
code: {
|
code: {
|
||||||
identifier: 'editor',
|
identifier: 'editor',
|
||||||
title: 'Editor',
|
title: translations.PLUGIN_ADMIN.EDITOR,
|
||||||
label: '<i class="fa fa-fw fa-code"></i>',
|
label: '<i class="fa fa-fw fa-code"></i>',
|
||||||
action({ codemirror, button, textarea, ui }) {
|
action({ codemirror, button, textarea, ui }) {
|
||||||
if (textarea.data('grav-editor-mode') === 'editor') {
|
if (textarea.data('grav-editor-mode') === 'editor') {
|
||||||
@@ -318,7 +318,7 @@ export default {
|
|||||||
}, {
|
}, {
|
||||||
preview: {
|
preview: {
|
||||||
identifier: 'preview',
|
identifier: 'preview',
|
||||||
title: 'Preview',
|
title: translations.PLUGIN_ADMIN.PREVIEW,
|
||||||
label: '<i class="fa fa-fw fa-eye"></i>',
|
label: '<i class="fa fa-fw fa-eye"></i>',
|
||||||
modes: ['gfm', 'markdown'],
|
modes: ['gfm', 'markdown'],
|
||||||
action({ codemirror, button, textarea, ui }) {
|
action({ codemirror, button, textarea, ui }) {
|
||||||
@@ -356,7 +356,7 @@ export default {
|
|||||||
}, {
|
}, {
|
||||||
fullscreen: {
|
fullscreen: {
|
||||||
identifier: 'fullscreen',
|
identifier: 'fullscreen',
|
||||||
title: 'Fullscreen',
|
title: translations.PLUGIN_ADMIN.FULLSCREEN,
|
||||||
label: '<i class="fa fa-fw fa-expand"></i>',
|
label: '<i class="fa fa-fw fa-expand"></i>',
|
||||||
action({ codemirror, button, textarea }) {
|
action({ codemirror, button, textarea }) {
|
||||||
button.on('click.editor.fullscreen', () => {
|
button.on('click.editor.fullscreen', () => {
|
||||||
|
|||||||
2
themes/grav/css-compiled/template.css
vendored
2
themes/grav/css-compiled/template.css
vendored
File diff suppressed because one or more lines are too long
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