Skip to content

Commit 0c6c7f5

Browse files
committed
[ADD] evo links plugin
1 parent d01b369 commit 0c6c7f5

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

public/js/link-evo.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@
55
(function () {
66
'use strict';
77

8+
if (typeof tinymce !== 'undefined' && typeof tinymce.addI18n === 'function') {
9+
tinymce.addI18n('de', {
10+
'Search in EVO': 'In EVO suchen',
11+
'EVO search failed.': 'EVO-Suche fehlgeschlagen.'
12+
});
13+
tinymce.addI18n('uk', {
14+
'Search in EVO': 'Пошук в EVO',
15+
'EVO search failed.': 'Пошук в EVO не вдався.'
16+
});
17+
tinymce.addI18n('pl', {
18+
'Search in EVO': 'Szukaj w EVO',
19+
'EVO search failed.': 'Wyszukiwanie w EVO nie powiodło się.'
20+
});
21+
}
22+
823
var global$5 = tinymce.util.Tools.resolve('tinymce.PluginManager');
924

1025
/* eslint-disable @typescript-eslint/no-wrapper-object-types */
@@ -1412,8 +1427,9 @@
14121427
iconName: 'link'
14131428
};
14141429
const showEvoNotice = (text) => {
1430+
const message = editor && typeof editor.translate === 'function' ? editor.translate(text) : text;
14151431
if (editor.notificationManager && typeof editor.notificationManager.open === 'function') {
1416-
editor.notificationManager.open({ text, type: 'warning', timeout: 3000 });
1432+
editor.notificationManager.open({ text: message, type: 'warning', timeout: 3000 });
14171433
}
14181434
};
14191435
const updateEvoCache = (key, value) => {
@@ -1516,7 +1532,7 @@
15161532
{
15171533
type: 'input',
15181534
name: 'evo_search',
1519-
label: 'Search in EVO'
1535+
label: editor && typeof editor.translate === 'function' ? editor.translate('Search in EVO') : 'Search in EVO'
15201536
},
15211537
{
15221538
type: 'collection',

0 commit comments

Comments
 (0)