DmitrMakeev commited on
Commit
d02116f
·
verified ·
1 Parent(s): 8fc9233

Create rus.js

Browse files
Files changed (1) hide show
  1. js/rus/rus.js +97 -0
js/rus/rus.js ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Добавление русского языка
2
+ editor.I18n.addMessages({
3
+ ru: {
4
+ styleManager: {
5
+ sectors: {
6
+ 'general': 'Общие',
7
+ 'dimension': 'Размер',
8
+ 'typography': 'Типографика',
9
+ 'decorations': 'Оформление',
10
+ 'extra': 'Ещё больше',
11
+ 'flex': 'Flex',
12
+
13
+ },
14
+ properties: {
15
+ 'background-repeat': 'Повторение',
16
+ 'background-position': 'Позиция',
17
+ 'width': 'Ширина',
18
+ 'height': 'Высота',
19
+ 'max-width': 'Макс. ширина',
20
+ 'min-height': 'Мин. высота',
21
+ 'margin': 'Отступ',
22
+ 'padding': 'Внутр.отступ',
23
+ 'font-family': 'Шрифт',
24
+ 'font-size': 'Размер шрифта',
25
+ 'font-weight': 'Толщина шрифта',
26
+ 'color': 'Цвет текста',
27
+ 'text-align': 'Вырав. текста',
28
+ 'text-decoration': 'Оформ. текста',
29
+ 'text-shadow': 'Текст. тень',
30
+ 'opacity': 'Прозрачность',
31
+ 'border-radius': 'Радиус скруг.',
32
+ 'border': 'Граница',
33
+ 'box-shadow': 'Тень блока',
34
+ 'background': 'Фон',
35
+ }
36
+ },
37
+ blockManager: {
38
+ labels: {
39
+ 'responsive-image': 'Адаптивное изображение',
40
+ 'centered-text': 'Центрированный текст',
41
+ }
42
+ },
43
+ panels: {
44
+ buttons: {
45
+ 'open-code': 'Открыть код',
46
+ 'gjs-open-import-webpage': 'Импортировать',
47
+ }
48
+ },
49
+ commands: {
50
+ 'gjs-open-import-webpage': {
51
+ title: 'Импортировать шаблон',
52
+ label: '<div style="margin-bottom: 10px; font-size: 13px;">Вставьте здесь ваш HTML/CSS и нажмите Импортировать</div>',
53
+ }
54
+ }
55
+ }
56
+ });
57
+ // Установка русского языка по умолчанию
58
+ editor.I18n.setLocale('ru');
59
+ // Удаление ненужных блоков
60
+ const unwantedBlocks = ['video', 'link', 'image'];
61
+ unwantedBlocks.forEach(blockId => {
62
+ editor.BlockManager.remove(blockId);
63
+ });
64
+ // Добавление блока адаптивной картинки
65
+ editor.BlockManager.add('responsive-image', {
66
+ label: editor.I18n.t('blockManager.labels.responsive-image'),
67
+ content: {
68
+ type: 'image',
69
+ style: {
70
+ display: 'block',
71
+ margin: 'auto',
72
+ maxWidth: '100%',
73
+ height: 'auto',
74
+ objectFit: 'cover'
75
+ },
76
+ attributes: {
77
+ alt: 'Responsive Image'
78
+ }
79
+ },
80
+ attributes: {
81
+ class: 'fa fa-image'
82
+ }
83
+ });
84
+ // Добавление блока центрированного текста
85
+ editor.BlockManager.add('centered-text', {
86
+ label: editor.I18n.t('blockManager.labels.centered-text'),
87
+ content: {
88
+ type: 'text',
89
+ style: {
90
+ textAlign: 'center'
91
+ },
92
+ content: 'Centered Text'
93
+ },
94
+ attributes: {
95
+ class: 'fa fa-align-center'
96
+ }
97
+ });