iobroker.telegram 3.5.3 → 3.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/README.md +13 -10
  2. package/admin/blockly.js +0 -5
  3. package/admin/custom/customComponents.js +3 -3
  4. package/admin/custom/customComponents.js.map +1 -1
  5. package/admin/custom/static/js/main.a1ea6653.js +5 -0
  6. package/admin/custom/static/js/main.a1ea6653.js.map +1 -0
  7. package/admin/custom/static/js/node_modules_iobroker_adapter-react-v5_node_modules_mui_styles_index_js-node_modules_babel_ru-9901bb.ca01f6eb.chunk.js +35 -0
  8. package/admin/custom/static/js/node_modules_iobroker_adapter-react-v5_node_modules_mui_styles_index_js-node_modules_babel_ru-9901bb.ca01f6eb.chunk.js.map +1 -0
  9. package/admin/i18n/de/translations.json +3 -1
  10. package/admin/i18n/en/translations.json +3 -1
  11. package/admin/i18n/es/translations.json +3 -1
  12. package/admin/i18n/fr/translations.json +3 -1
  13. package/admin/i18n/it/translations.json +3 -1
  14. package/admin/i18n/nl/translations.json +3 -1
  15. package/admin/i18n/pl/translations.json +3 -1
  16. package/admin/i18n/pt/translations.json +3 -1
  17. package/admin/i18n/ru/translations.json +3 -1
  18. package/admin/i18n/uk/translations.json +3 -1
  19. package/admin/i18n/zh-cn/translations.json +3 -1
  20. package/admin/jsonConfig.json +10 -0
  21. package/admin/jsonCustom.json +65 -5
  22. package/admin/rules/asset-manifest.json +5 -5
  23. package/admin/rules/customRuleBlocks.js +1 -1
  24. package/admin/rules/customRuleBlocks.js.map +1 -1
  25. package/admin/rules/static/js/{main.cdc49909.js → main.44f1f861.js} +2 -2
  26. package/admin/rules/static/js/{main.cdc49909.js.map → main.44f1f861.js.map} +1 -1
  27. package/io-package.json +146 -44
  28. package/lib/words.js +264 -25
  29. package/main.js +125 -71
  30. package/package.json +7 -7
  31. package/admin/custom/static/js/main.b6b3353e.js +0 -5
  32. package/admin/custom/static/js/main.b6b3353e.js.map +0 -1
  33. package/admin/custom/static/js/node_modules_iobroker_adapter-react-v5_node_modules_mui_styles_index_js-node_modules_babel_ru-5d81ef.a994e170.chunk.js +0 -35
  34. package/admin/custom/static/js/node_modules_iobroker_adapter-react-v5_node_modules_mui_styles_index_js-node_modules_babel_ru-5d81ef.a994e170.chunk.js.map +0 -1
package/lib/words.js CHANGED
@@ -1,31 +1,270 @@
1
- const path = require('path');
2
- const fs = require('fs');
3
-
4
- function readWordJs() {
5
- try {
6
- let words;
7
- const fileName = path.join(__dirname, '/../admin/words.js');
8
- if (fs.existsSync(fileName)) {
9
- words = fs.readFileSync(fileName).toString();
10
- }
11
- words = words.substring(words.indexOf('{'), words.length);
12
- words = words.substring(0, words.lastIndexOf(';'));
13
-
14
- const resultFunc = new Function('return ' + words + ';');
15
-
16
- return resultFunc();
17
- } catch (e) {
18
- return {};
19
- }
20
- }
21
-
22
-
23
- const systemDictionary = readWordJs();
1
+ const systemDictionary = {
2
+ 'Restarting...': {
3
+ en: 'Restarting...',
4
+ de: 'Bot wird neu gestartet.',
5
+ ru: 'Перезапуск бота.',
6
+ pt: 'O bot será reiniciado.',
7
+ nl: 'Het opnieuw starten ...',
8
+ fr: 'Redémarrer ...',
9
+ it: 'Riavvio ...',
10
+ es: 'Reiniciando ...',
11
+ pl: 'Ponowne uruchamianie ...',
12
+ uk: 'Перезавантаження...',
13
+ 'zh-cn': '正在重新启动...',
14
+ },
15
+ 'Restarting... Reauthenticate!': {
16
+ en: 'Restarting... Re-authenticate!',
17
+ de: 'Neustart ... Erneut authentifizieren!',
18
+ ru: 'Перезапуск ... Повторно аутентифицировать!',
19
+ pt: 'Reiniciando... Autentique-se novamente!',
20
+ nl: 'Opnieuw opstarten ... Opnieuw verifiëren!',
21
+ fr: 'Redémarrer ... Ré-authentifier!',
22
+ it: 'Riavvio ... Re-authenticate!',
23
+ es: 'Reiniciando ... ¡Vuelve a autenticarte!',
24
+ pl: 'Restartowanie ... Ponownie uwierzytelnij!',
25
+ uk: 'Перезавантаження... Реабілітація!',
26
+ 'zh-cn': '正在重新启动...重新认证!',
27
+ },
28
+ 'ON-Status': {
29
+ en: 'switched on',
30
+ de: 'eingeschaltet',
31
+ ru: 'включен(о/а)',
32
+ pt: 'ligado',
33
+ nl: 'ON-Status',
34
+ fr: 'ON-Status',
35
+ it: 'ON-Stato',
36
+ es: 'Estado de encendido',
37
+ pl: 'ON-Status',
38
+ uk: 'Оф-статус',
39
+ 'zh-cn': '切换到',
40
+ },
41
+ 'OFF-Status': {
42
+ en: 'switched off',
43
+ de: 'ausgeschaltet',
44
+ ru: 'выключен(о/а)',
45
+ pt: 'apagado',
46
+ nl: 'OFF-Status',
47
+ fr: 'Statut OFF',
48
+ it: 'OFF-Stato',
49
+ es: 'Estado apagado',
50
+ pl: 'OFF-Status',
51
+ uk: 'Статус на сервери',
52
+ 'zh-cn': '关掉',
53
+ },
54
+ 'Call text': {
55
+ en: 'This is ioBroker calling. Something happened in your house.',
56
+ de: 'Das ist ioBroker. Etwas ist in Ihrem Haus passiert.',
57
+ ru: 'Это звонит ioBroker. Что-то случилось в вашем доме.',
58
+ pt: 'Isto é ioBroker a ligar. Aconteceu alguma coisa na tua casa.',
59
+ nl: 'Dit is ioBroker. Er is iets gebeurd in je huis.',
60
+ fr: 'C\'est ioBroker qui appelle. Il s\'est passé quelque chose chez toi.',
61
+ it: 'Questo è ioBroker che chiama. E\' successo qualcosa in casa tua.',
62
+ es: 'Esto es ioBroker llamando. Algo pasó en tu casa.',
63
+ pl: 'Tu JoBroker. Coś się stało w twoim domu.',
64
+ uk: 'Це ioBroker виклик. Що сталося в будинку.',
65
+ 'zh-cn': '这是ioBroker呼叫。 你家里出了点事.',
66
+ },
67
+ 'value as boolean': {
68
+ en: 'value as boolean',
69
+ de: 'Wert als Boolean',
70
+ ru: 'логическое значение',
71
+ pt: 'valor como booleano',
72
+ nl: 'waarde als Boolean',
73
+ fr: 'valeur en tant que booléen',
74
+ it: 'valore come booleano',
75
+ es: 'valor como booleano',
76
+ pl: 'wartość jako boolean',
77
+ uk: 'значення як boolean',
78
+ 'zh-cn': '布尔值',
79
+ },
80
+ 'value as number': {
81
+ en: 'value as number',
82
+ de: 'Wert als Zahl',
83
+ ru: 'значение в виде число',
84
+ pt: 'valor como numero',
85
+ nl: 'waarde als nummer',
86
+ fr: 'valeur en nombre',
87
+ it: 'valore come numero',
88
+ es: 'valor como numero',
89
+ pl: 'wartość jako liczba',
90
+ uk: 'значення як номер',
91
+ 'zh-cn': '价值作为数字',
92
+ },
93
+ 'value as string': {
94
+ en: 'value as string',
95
+ de: 'Wert als String',
96
+ ru: 'значение в виде строки',
97
+ pt: 'valor como string',
98
+ nl: 'waarde als tekenreeks',
99
+ fr: 'valeur sous forme de chaîne',
100
+ it: 'valore come stringa',
101
+ es: 'valor como cadena',
102
+ pl: 'wartość jako ciąg',
103
+ uk: 'значення як рядок',
104
+ 'zh-cn': '值作为字符串',
105
+ },
106
+ 'Select option': {
107
+ en: 'Select option',
108
+ de: 'Wähle eine Option',
109
+ ru: 'Выберите опцию',
110
+ pt: 'Selecione uma opção',
111
+ nl: 'Selecteer optie',
112
+ fr: 'Sélectionnez une option',
113
+ it: 'Selezionare l\'opzione',
114
+ es: 'Seleccionar opción',
115
+ pl: 'Wybierz opcję',
116
+ uk: 'Виберіть опцію',
117
+ 'zh-cn': '选择选项',
118
+ },
119
+ 'Message ignored: ': {
120
+ en: 'Message ignored: ',
121
+ de: 'Meldung wurde ignoriert: ',
122
+ ru: 'Сообщение проигнорировано: ',
123
+ pt: 'Mensagem foi ignorada: ',
124
+ nl: 'Bericht genegeerd: ',
125
+ fr: 'Message ignoré: ',
126
+ it: 'Messaggio ignorato: ',
127
+ es: 'Mensaje ignorado: ',
128
+ pl: 'Wiadomość została zignorowana: ',
129
+ uk: 'Повідомлення ігнорується: ',
130
+ 'zh-cn': '讯息被忽略:',
131
+ },
132
+ 'Please enter password in form "/password phrase"': {
133
+ en: 'Please enter password in form "/password phrase"',
134
+ de: 'Das Password muss in der Form "/password phrase" eingegeben werden',
135
+ ru: 'Пожалуйста введите пароль в формате: "/password phrase"',
136
+ pt: 'A senha deve ser inserida no formato "/password phrase"',
137
+ nl: 'Voer een wachtwoord in het formulier "/ wachtwoord zin"',
138
+ fr: 'Veuillez entrer le mot de passe dans le formulaire "/mot de passe"',
139
+ it: 'Per favore inserisci la password nel modulo "/ frase password"',
140
+ es: 'Por favor, introduzca la contraseña en el formulario "/frase de contraseña"',
141
+ pl: 'Proszę podać hasło w formularzu "/hasło zwrotne"',
142
+ uk: 'Будь ласка, введіть пароль у форму "/password фраза"',
143
+ 'zh-cn': '请以“ /密码短语”形式输入密码',
144
+ },
145
+ 'Too many attempts. Blocked for': {
146
+ en: 'Too many attempts. Blocked for',
147
+ de: 'Zu viele Versuche. Geblockt für',
148
+ ru: 'Слишком много попыток. Заблокировано',
149
+ pt: 'Muitas tentativas. Bloqueado para',
150
+ nl: 'Te veel pogingen. Geblokkeerd voor',
151
+ fr: 'Trop de tentatives. Bloqué pour',
152
+ it: 'Troppi tentativi. Bloccato per',
153
+ es: 'Demasiados intentos. Bloqueado para',
154
+ pl: 'Zbyt wiele prób. Zablokowany',
155
+ uk: 'Занадто багато спроб. Заблоковано',
156
+ 'zh-cn': '尝试太多。 屏蔽为',
157
+ },
158
+ 'seconds': {
159
+ en: 'seconds',
160
+ de: 'Sekunden',
161
+ ru: 'секунд',
162
+ pt: 'segundos',
163
+ nl: 'seconden',
164
+ fr: 'secondes',
165
+ it: 'secondi',
166
+ es: 'segundos',
167
+ pl: 'sekund',
168
+ uk: 'час',
169
+ 'zh-cn': '秒数',
170
+ },
171
+ 'Welcome ': {
172
+ en: 'Welcome ',
173
+ de: 'Hallo ',
174
+ ru: 'Добро пожаловать ',
175
+ pt: 'Oi ',
176
+ nl: 'Welkom ',
177
+ fr: 'Bienvenue ',
178
+ it: 'benvenuto ',
179
+ es: 'Bienvenido ',
180
+ pl: 'Witamy ',
181
+ uk: 'Про нас ',
182
+ 'zh-cn': '欢迎 ',
183
+ },
184
+ 'Invalid password': {
185
+ en: 'Invalid password!',
186
+ de: 'Ungültiges Passwort!',
187
+ ru: 'Неверный пароль!',
188
+ pt: 'Senha inválida!',
189
+ nl: 'Ongeldig wachtwoord!',
190
+ fr: 'Mot de passe incorrect!',
191
+ it: 'Password non valida!',
192
+ es: '¡Contraseña invalida!',
193
+ pl: 'Nieprawidłowe hasło!',
194
+ uk: 'Ім\'я користувача!',
195
+ 'zh-cn': '无效的密码!',
196
+ },
197
+ 'User is not in the list': {
198
+ en: 'User is not in the list',
199
+ de: 'Benutzer ist nicht in der Liste',
200
+ ru: 'Пользователь не входит в список',
201
+ pt: 'O usuário não está na lista',
202
+ nl: 'Gebruiker staat niet in de lijst',
203
+ fr: 'L\'utilisateur n\'est pas dans la liste',
204
+ it: 'L\'utente non è nella lista',
205
+ es: 'El usuario no está en la lista',
206
+ pl: 'Użytkownik nie jest na liście',
207
+ uk: 'Користувач не в списку',
208
+ 'zh-cn': '用户不在列表中',
209
+ },
210
+ 'Invalid number %s': {
211
+ en: 'Invalid number %s',
212
+ de: 'Ungültige Nummer %s',
213
+ ru: 'Неверное число %s',
214
+ pt: 'Número inválido %s',
215
+ nl: 'Ongeldig aantal %s',
216
+ fr: 'Nombre invalide %s',
217
+ it: 'Numero non valido %s',
218
+ es: 'Número inválido %s',
219
+ pl: 'Nieprawidłowy numer %s',
220
+ uk: 'Неточна кількість %s',
221
+ 'zh-cn': '无效的号码%s',
222
+ },
223
+ 'Done': {
224
+ en: 'Done',
225
+ de: 'Fertig',
226
+ ru: 'Готово',
227
+ pt: 'Pronto',
228
+ nl: 'Gedaan',
229
+ fr: 'Terminé',
230
+ it: 'Fatto',
231
+ es: 'Hecho',
232
+ pl: 'Gotowe',
233
+ uk: 'Сонце',
234
+ 'zh-cn': '完毕',
235
+ },
236
+ 'ID "%s" not found.': {
237
+ en: 'ID "%s" not found.',
238
+ de: 'ID "%s" nicht gefunden.',
239
+ ru: 'Идентификатор " %s" не найден.',
240
+ pt: 'ID "%s" não foi encontrado.',
241
+ nl: 'ID "%s" niet gevonden.',
242
+ fr: 'ID "%s" non trouvé.',
243
+ it: 'ID "%s" non trovato.',
244
+ es: 'No se encontró el ID "%s".',
245
+ pl: 'Nie znaleziono identyfikatora "%s".',
246
+ uk: 'Не знайдено ID "%s".',
247
+ 'zh-cn': '找不到ID“%s”。',
248
+ },
249
+ 'Started!': {
250
+ en: 'Started!',
251
+ de: 'Bot gestartet.',
252
+ ru: 'Бот запущен!',
253
+ pt: 'O bot foi iniciado!',
254
+ nl: 'Begonnen!',
255
+ fr: 'Commencé!',
256
+ it: 'Iniziato!',
257
+ es: '¡Empezado!',
258
+ pl: 'Rozpoczęty!',
259
+ uk: 'Почати!',
260
+ 'zh-cn': '开始!',
261
+ },
262
+ };
24
263
 
25
264
  module.exports = function (text, lang) {
26
- if (systemDictionary[text]) {
265
+ if (systemDictionary?.[text]) {
27
266
  return systemDictionary[text][lang] || systemDictionary[text].en || text;
28
267
  } else {
29
268
  return text;
30
269
  }
31
- };
270
+ };