Skip to content

Commit 33be205

Browse files
authored
Improvements: more translations added to the i18n example (#1250)
1 parent 52d919c commit 33be205

File tree

19 files changed

+57
-20
lines changed

19 files changed

+57
-20
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,6 @@
4646
[submodule "example/tools/warning"]
4747
path = example/tools/warning
4848
url = https://github.com/editor-js/warning
49+
[submodule "example/tools/underline"]
50+
path = example/tools/underline
51+
url = https://github.com/editor-js/underline

dist/editor.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/example-i18n.html

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
<!-- Load Tools -->
4646
<script src="https://cdn.jsdelivr.net/npm/@editorjs/header@latest"></script><!-- Header -->
47-
<script src="https://cdn.jsdelivr.net/npm/@editorjs/simple-image@latest"></script><!-- Image -->
47+
<script src="https://cdn.jsdelivr.net/npm/@editorjs/image@latest"></script><!-- Image -->
4848
<script src="https://cdn.jsdelivr.net/npm/@editorjs/delimiter@latest"></script><!-- Delimiter -->
4949
<script src="https://cdn.jsdelivr.net/npm/@editorjs/list@latest"></script><!-- List -->
5050
<script src="https://cdn.jsdelivr.net/npm/@editorjs/checklist@latest"></script><!-- Checklist -->
@@ -81,6 +81,11 @@
8181
* Tools list
8282
*/
8383
tools: {
84+
paragraph: {
85+
config: {
86+
placeholder: "Enter something"
87+
}
88+
},
8489
/**
8590
* Each Tool is a Plugin. Pass them via 'class' option with necessary settings {@link docs/tools.md}
8691
*/
@@ -96,7 +101,7 @@
96101
/**
97102
* Or pass class directly without any configuration
98103
*/
99-
image: SimpleImage,
104+
image: ImageTool,
100105

101106
list: {
102107
class: List,
@@ -209,6 +214,7 @@
209214
"Bold": "Полужирный",
210215
"Italic": "Курсив",
211216
"InlineCode": "Моноширинный",
217+
"Image": "Картинка"
212218
},
213219

214220
/**
@@ -235,6 +241,32 @@
235241
*/
236242
"stub": {
237243
'The block can not be displayed correctly.': 'Блок не может быть отображен'
244+
},
245+
"image": {
246+
"Caption": "Подпись",
247+
"Select an Image": "Выберите файл",
248+
"With border": "Добавить рамку",
249+
"Stretch image": "Растянуть",
250+
"With background": "Добавить подложку",
251+
},
252+
"code": {
253+
"Enter a code": "Код",
254+
},
255+
"linkTool": {
256+
"Link": "Ссылка",
257+
"Couldn't fetch the link data": "Не удалось получить данные",
258+
"Couldn't get this link data, try the other one": "Не удалось получить данные по ссылке, попробуйте другую",
259+
"Wrong response format from the server": "Неполадки на сервере",
260+
},
261+
"header": {
262+
"Header": "Заголовок",
263+
},
264+
"paragraph": {
265+
"Enter something": "Введите текст"
266+
},
267+
"list": {
268+
"Ordered": "Нумерованный",
269+
"Unordered": "Маркированный",
238270
}
239271
},
240272

@@ -354,7 +386,9 @@
354386
{
355387
type: 'image',
356388
data: {
357-
url: 'assets/codex2x.png',
389+
file : {
390+
url: 'assets/codex2x.png',
391+
},
358392
caption: '',
359393
stretched: false,
360394
withBorder: true,

example/tools/checklist

example/tools/delimiter

example/tools/embed

example/tools/inline-code

0 commit comments

Comments
 (0)