iobroker.ring 6.3.0 → 7.0.0

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 (50) hide show
  1. package/LICENSE +2 -1
  2. package/README.md +34 -419
  3. package/admin/assets/index-QX4NxbDg.js +693 -0
  4. package/admin/i18n/de.json +3 -1
  5. package/admin/i18n/en.json +3 -1
  6. package/admin/i18n/es.json +3 -2
  7. package/admin/i18n/fr.json +3 -1
  8. package/admin/i18n/it.json +3 -1
  9. package/admin/i18n/nl.json +5 -3
  10. package/admin/i18n/pl.json +3 -1
  11. package/admin/i18n/pt.json +3 -1
  12. package/admin/i18n/ru.json +3 -1
  13. package/admin/i18n/uk.json +3 -1
  14. package/admin/i18n/zh-cn.json +3 -1
  15. package/admin/tab_m.html +13 -34
  16. package/build/lib/constants.js +204 -204
  17. package/build/lib/constants.js.map +1 -1
  18. package/build/lib/lastAction.js +2 -0
  19. package/build/lib/lastAction.js.map +1 -1
  20. package/build/lib/ownRingCamera.js +286 -244
  21. package/build/lib/ownRingCamera.js.map +1 -1
  22. package/build/lib/ownRingDevice.js +57 -44
  23. package/build/lib/ownRingDevice.js.map +1 -1
  24. package/build/lib/ownRingIntercom.js +45 -40
  25. package/build/lib/ownRingIntercom.js.map +1 -1
  26. package/build/lib/ownRingLocation.js +27 -19
  27. package/build/lib/ownRingLocation.js.map +1 -1
  28. package/build/lib/ringApiClient.js +61 -49
  29. package/build/lib/ringApiClient.js.map +1 -1
  30. package/build/lib/services/event-blocker.js +13 -10
  31. package/build/lib/services/event-blocker.js.map +1 -1
  32. package/build/lib/services/file-service.js +29 -27
  33. package/build/lib/services/file-service.js.map +1 -1
  34. package/build/lib/services/image-service.js +8 -4
  35. package/build/lib/services/image-service.js.map +1 -1
  36. package/build/lib/services/text-service.js +169 -85
  37. package/build/lib/services/text-service.js.map +1 -1
  38. package/build/main.js +84 -90
  39. package/build/main.js.map +1 -1
  40. package/io-package.json +39 -38
  41. package/package.json +43 -90
  42. package/admin/admin.d.ts +0 -112
  43. package/admin/convert.js +0 -447
  44. package/admin/index_m.html +0 -318
  45. package/admin/style.css +0 -33
  46. package/admin/tab_m.js +0 -154
  47. package/admin/tsconfig.json +0 -11
  48. package/admin/words.js +0 -470
  49. package/build/lib/tools.js +0 -98
  50. package/build/lib/tools.js.map +0 -1
package/admin/words.js DELETED
@@ -1,470 +0,0 @@
1
- /* global systemDictionary:true */
2
- 'use strict';
3
-
4
- systemDictionary = {
5
- "Auto": {
6
- "en": "Auto",
7
- "de": "Auto",
8
- "ru": "Автоматически",
9
- "pt": "Auto",
10
- "nl": "Auto",
11
- "fr": "Auto",
12
- "it": "Auto",
13
- "es": "Auto",
14
- "pl": "Auto"
15
- },
16
- "Manual": {
17
- "en": "Manual",
18
- "de": "Manual",
19
- "ru": "Вручную",
20
- "pt": "Manual",
21
- "nl": "Met de hand",
22
- "fr": "Manuel",
23
- "it": "Manuale",
24
- "es": "Manual",
25
- "pl": "Manual"
26
- },
27
- "on save adapter restarts with new config immediately": {
28
- "en": "on save adapter restarts with new config immediately",
29
- "de": "Beim Speichern von Einstellungen der Adapter wird sofort neu gestartet.",
30
- "ru": "При сохранении настроек адаптера он сразу же перезапускается",
31
- "pt": "no adaptador de salvar reinicia com nova configuração imediatamente",
32
- "nl": "on save-adapter wordt onmiddellijk opnieuw opgestart met nieuwe config",
33
- "fr": "sur l'adaptateur de sauvegarde redémarre avec la nouvelle config immédiatement",
34
- "it": "su save adapter si riavvia immediatamente con la nuova configurazione",
35
- "es": "en el adaptador de guardar se reinicia con nueva configuración de inmediato",
36
- "pl": "on save adapter restarts with new config immediately"
37
- },
38
- "ring-description": {
39
- "en": "This adapter needs a valid token. To generate it, follow the description in the readme.",
40
- "de": "Dieser Adapter benötigt einen gültigen Token. Um es zu erzeugen, folgen Sie der Beschreibung im Readme.",
41
- "ru": "Этот адаптер нужен действительный токен. Чтобы сгенерировать его, следуйте описанию в читаю.",
42
- "pt": "Este adaptador precisa de um token válido. Para gerenciá-lo, siga a descrição no readme.",
43
- "nl": "Deze adapter heeft een geldig teken nodig. Om het te genereren, de beschrijving in de lezing te volgen.",
44
- "fr": "Cet adaptateur a besoin d'un jeton valide. Pour le générer, suivez la description dans le readme.",
45
- "it": "Questo adattatore ha bisogno di un token valido. Per generarlo, seguire la descrizione nel testo.",
46
- "es": "Este adaptador necesita un token válido. Para generarlo, siga la descripción en el readme.",
47
- "pl": "Ta adapter potrzebuje odpowiedniego symbolu. W celu generowania go, podąża za opisem w gotowości.",
48
- "uk": "Цей адаптер потребує дійсного токену. Щоб створити його, слідуйте опису в чителю.",
49
- "zh-cn": "这种适应者需要一个有效的基础。 为产生这一趋势,在读者说明之后。."
50
- },
51
- "HDInfo": {
52
- "en": "<br>Important information!<br>The settings \"Overlaying text\", \"Picture sharpening\" and \"Picture contrast\" are time consuming (up to a few Seconds).<br>If a fast display time is important, please turn them all off.",
53
- "de": "<br>Wichtige Informationen!<br>Die Einstellungen \"Überlagerungstext\", \"Bildschärfe\" und \"Bildkontrast\" sind zeitaufwendig (bis zu einigen Sekunden).<br>Wenn eine schnelle Anzeigezeit wichtig ist, bitte abschalten.",
54
- "ru": "<br>Важная информация!<br>Настройки \"Overlaying текст\", \"Заточка изображения\" и \"Рисунок контраст\" теряют время (до нескольких секунд).<br>Если быстрое время отображения важно, пожалуйста, выключите их все.",
55
- "pt": "<br>Informação Importante!<br>As definições \"Sobreposição de texto\", \"Afiar imagem\" e \"Contraste de imagem\" são demorados (até alguns segundos).<br>Se um tempo de exibição rápido é importante, por favor, desligue todos.",
56
- "nl": "<br>Belangrijke informatie!<br>De setting \"Vertaling:, \"Picture scherp\" en \"In tegenstelling tot\" het is tijd voor een paar seconden.<br>Als een snelle tijd belangrijk is, zet ze dan allemaal uit.",
57
- "fr": "<br>Informations importantes !<br>Les paramètres \"Remplacer le texte\", \"Aiguillage de la photo\" et \"Contraste visuel\" consomme du temps (jusqu'à quelques secondes).<br>Si un temps d'affichage rapide est important, veuillez les éteindre.",
58
- "it": "<br>Informazioni importanti!<br>Le impostazioni \"Testo di sovrapposizione\", \"Immagine affilare\" e \"Contrasto immagine\" consumano tempo (fino a pochi secondi).<br>Se un tempo di visualizzazione veloce è importante, si prega di spegnerli tutti.",
59
- "es": "<br>¡Información importante!<br>La configuración \"Texto superpuesto\", \"Afilado de la imagen\" y \"Contraste de imagen\" son el consumo de tiempo (hasta unos segundos).<br>Si un tiempo de visualización rápido es importante, por favor apague todos.",
60
- "pl": "<br>Important information!<br>Ustawienia \"Tekst Overlaying\", \"Zdjęcie ostrym\" i \"Kontrast\" czas spędzania czasu (do kilku sekund).<br>Jeśli czas szybkiego wyświetlania jest bardzo ważny, to wszystko się odwraca.<br>Tip: ostry film i film kontrastują w nocy.",
61
- "uk": "<br>Головна!<br>Налаштування \"Налаштування тексту\", \"Заточування зображень\" і \"Фото контраст\" час споживання (до декількох секунд).<br>Якщо час швидкого відображення важливо, будь ласка, ввімкніть їх всі.",
62
- "zh-cn": "<br>重要信息!<br>环境 \"全文\", \"B. 加剧和加剧\" A. \"形状\" 现在耗费时间(几秒)。.<br>如果快速展示时间很重要,请将其赶出。.<br><br>参与:在夜间最好地进行紧张和紧张关系。."
63
- },
64
- "HDInfoTip": {
65
- "en": "Tip: Picture sharpening and Picture contrast working best at night.",
66
- "de": "Tipp: Bildschärfe und Bildkontrast arbeiten am Besten in der Nacht.",
67
- "ru": "Совет: заточка изображения и контраст изображения работают лучше всего ночью.",
68
- "pt": "Dica: Afiação de imagem e contraste de imagem que funcionam melhor à noite.",
69
- "nl": "Tip: Foto's slijpend en Picture contrast werkt 's nachts het beste.",
70
- "fr": "Astuce: Aiguillage d'image et contraste d'image fonctionne le mieux la nuit.",
71
- "it": "Suggerimento: Immagine affilare e Immagine contrasto funziona meglio di notte.",
72
- "es": "Consejo: Afilado de imágenes y contraste de imagen trabajando mejor por la noche.",
73
- "pl": "Tip: ostry film i film kontrastują w nocy.",
74
- "uk": "Порада: малюнок заточування і контрастність зображень найкраще працює вночі.",
75
- "zh-cn": "参与:在夜间最好地进行紧张和紧张关系。."
76
- },
77
- "User": {
78
- "en": "User",
79
- "de": "Benutzer",
80
- "ru": "пользователь",
81
- "pt": "Do utilizador",
82
- "nl": "Gebruiker",
83
- "fr": "Utilisateur",
84
- "it": "Utente",
85
- "es": "Usuario",
86
- "pl": "Użytkownik"
87
- },
88
- "Confirm Password": {
89
- "en": "Confim Password",
90
- "de": "Bestätige das Passwort",
91
- "ru": "Подтвердите Пароль",
92
- "pt": "Confirme a Senha",
93
- "nl": "bevestig wachtwoord",
94
- "fr": "Confirmez le mot de passe",
95
- "it": "conferma password",
96
- "es": "Confirmar contraseña",
97
- "pl": "Potwierdź hasło"
98
- },
99
- "Password Enable": {
100
- "en": "Login with password",
101
- "de": "Einloggen mit Passwort",
102
- "ru": "Вход с паролем",
103
- "pt": "Login com senha",
104
- "nl": "Inloggen met wachtwoord",
105
- "fr": "Se connecter avec mot de passe",
106
- "it": "Accedi con password",
107
- "es": "Iniciar sesión con contraseña",
108
- "pl": "Zaloguj się za pomocą hasła"
109
- },
110
- "ring-api": {
111
- "en": "RING-API (Default)",
112
- "de": "RING-API (Stanard Einstellung)",
113
- "ru": "RING-API (по умолчанию)",
114
- "pt": "RING-API (padrão)",
115
- "nl": "RING-API (standaard)",
116
- "fr": "RING-API (par défaut)",
117
- "it": "RING-API (predefinito)",
118
- "es": "RING-API (por defecto)",
119
- "pl": "RING-API (domyślnie)",
120
- "zh-cn": "RING-API(默认)"
121
- },
122
- "ring-access": {
123
- "en": "Access your Ring cameras and doorbell",
124
- "de": "Zugriff auf Ihre Ring-Kameras und Türklingel",
125
- "ru": "Доступ к вашим Кольцам и дверным звонкам",
126
- "pt": "Acesse suas câmeras Ring e campainha",
127
- "nl": "Beschuldig je Ring camera's en deurbel",
128
- "fr": "Accédez à vos caméras Ring et à votre porte",
129
- "it": "Accedere alle telecamere e al campanello",
130
- "es": "Accede a tus cámaras de anillo y timbre",
131
- "pl": "Dostęp do kamery Pierścień i drzwi dzwonów",
132
- "uk": "Доступ до камери та дверної панелі",
133
- "zh-cn": "进入你的摄像机和大门bell"
134
- },
135
- "ring-adapter": {
136
- "en": "Ring Adapter",
137
- "de": "Ring Adapter",
138
- "ru": "Кольцо адаптер",
139
- "pt": "Adaptador de anel",
140
- "nl": "Ring Adapter",
141
- "fr": "Adaptateur de réglage",
142
- "it": "Adattatore di anelli",
143
- "es": "Adaptador de anillos",
144
- "pl": "Pierścień",
145
- "uk": "Кільковий адаптер",
146
- "zh-cn": "导 言"
147
- },
148
- "Livestream": {
149
- "en": "Live stream",
150
- "de": "Live-Stream",
151
- "ru": "Прямой эфир",
152
- "pt": "Córrego ao vivo",
153
- "nl": "Livestream",
154
- "fr": "Live stream",
155
- "it": "Live streaming",
156
- "es": "Transmisión en vivo",
157
- "pl": "Live stream",
158
- "uk": "Живий потік",
159
- "zh-cn": "流动"
160
- },
161
- "Snapshot": {
162
- "en": "Snapshot",
163
- "de": "Schnappschuss",
164
- "ru": "Снимки",
165
- "pt": "Instantâneo",
166
- "nl": "Snapshot",
167
- "fr": "Snapshot",
168
- "it": "Istantanea",
169
- "es": "Captura",
170
- "pl": "Snapshot",
171
- "uk": "Знімок екрана",
172
- "zh-cn": "绑架"
173
- },
174
- "HDSnapshot": {
175
- "en": "HD Snapshot",
176
- "de": "HD Schnappschuss",
177
- "ru": "HD Снимки",
178
- "pt": "Instantâneo de HD",
179
- "nl": "HD Snapshot",
180
- "fr": "HD Snapshot",
181
- "it": "Istantanee HD",
182
- "es": "HD Snapshot",
183
- "pl": "HD Snapshot",
184
- "uk": "HD знімок",
185
- "zh-cn": "人权观察社"
186
- },
187
- "ChooseDate": {
188
- "en": "Please choose a date",
189
- "de": "Bitte wählen Sie ein Datum",
190
- "ru": "Выберите дату",
191
- "pt": "Por favor, escolha uma data",
192
- "nl": "Kies alsjeblieft een date",
193
- "fr": "Veuillez choisir une date",
194
- "it": "Si prega di scegliere una data",
195
- "es": "Por favor elija una fecha",
196
- "pl": "Wybieram datę",
197
- "uk": "Будь ласка, оберіть дату",
198
- "zh-cn": "请选择日期"
199
- },
200
- "Filename": {
201
- "en": "Filename",
202
- "de": "Dateiname",
203
- "ru": "Имя файла",
204
- "pt": "Nome do arquivo",
205
- "nl": "Veldnaam",
206
- "fr": "Nom du fichier",
207
- "it": "Nome del file",
208
- "es": "Nombre de archivo",
209
- "pl": "Filename",
210
- "uk": "Назва файлу",
211
- "zh-cn": "导 言"
212
- },
213
- "Automatic recording time in seconds": {
214
- "en": "Automatic recording time in seconds",
215
- "de": "Automatische Aufnahmezeit in Sekunden",
216
- "ru": "Автоматическое время записи в секундах",
217
- "pt": "Tempo automático de gravação em segundos",
218
- "nl": "Automatische opnametijd in seconden",
219
- "fr": "Temps d'enregistrement automatique en secondes",
220
- "it": "Tempo di registrazione automatico in secondi",
221
- "es": "Tiempo de grabación automático en segundos",
222
- "pl": "Czas nagrywania automatycznego na sekundę",
223
- "uk": "Автоматичний час запису в секундах",
224
- "zh-cn": "第二期自动记录时间"
225
- },
226
- "Recording time in seconds": {
227
- "en": "Recording time on manual trigger in seconds",
228
- "de": "Aufnahmezeit auf manuellem Trigger in Sekunden",
229
- "ru": "Время записи на ручный триггер за считанные секунды",
230
- "pt": "Tempo de gravação no gatilho manual em segundos",
231
- "nl": "De tijd van de handleiding in seconden",
232
- "fr": "Temps d'enregistrement sur le déclencheur manuel en quelques secondes",
233
- "it": "Tempo di registrazione sul trigger manuale in pochi secondi",
234
- "es": "Tiempo de grabación en el gatillo manual en segundos",
235
- "pl": "Czas nagrywania ręcznego spustu w sekundach",
236
- "uk": "Час запису на ручний тригер за секундами",
237
- "zh-cn": "二. 第二期机的录音时间"
238
- },
239
- "Auto event": {
240
- "en": "React on Event automatically",
241
- "de": "Auf Ereignisse automatisch reagieren",
242
- "ru": "Реагировать на событие автоматически",
243
- "pt": "Reagir no Evento automaticamente",
244
- "nl": "Reageer automatisch",
245
- "fr": "Réagir sur Event automatiquement",
246
- "it": "Reagisci automaticamente su Event",
247
- "es": "Reaccionar en el evento automáticamente",
248
- "pl": "Reaktywacja zdarzeń automatycznie",
249
- "uk": "React на заході автоматично",
250
- "zh-cn": "对活动的反应"
251
- },
252
- "Auto save": {
253
- "en": "Automatically save every x minutes",
254
- "de": "Alle x Minuten automatisch speichern",
255
- "ru": "Автоматически экономить каждые x минуты",
256
- "pt": "Salvar automaticamente a cada minuto x",
257
- "nl": "Automatisch elke X minuten redden",
258
- "fr": "Économisez automatiquement toutes les x minutes",
259
- "it": "Salva automaticamente ogni x minuti",
260
- "es": "Guarde automáticamente cada x minutos",
261
- "pl": "Automatycznie oszczędza każde x minuty",
262
- "uk": "Автоматично зберігайте всі х хвилини",
263
- "zh-cn": "自动节约每分钟"
264
- },
265
- "NoSub": {
266
- "en": "Usage without a subscription!",
267
- "de": "Nutzung ohne Abonnement!",
268
- "ru": "Использование без подписки!",
269
- "pt": "Uso sem uma assinatura!",
270
- "nl": "Gebruik zonder abonnement!",
271
- "fr": "Utilisation sans abonnement !",
272
- "it": "Utilizzo senza abbonamento!",
273
- "es": "Uso sin suscripción!",
274
- "pl": "Użycie bez poboru!",
275
- "uk": "Використання без підписки!",
276
- "zh-cn": "无订阅!"
277
- },
278
- "Path": {
279
- "en": "Path",
280
- "de": "Pfad",
281
- "ru": "Путь",
282
- "pt": "Caminho",
283
- "nl": "Path",
284
- "fr": "Sentier",
285
- "it": "Sentiero",
286
- "es": "Camino",
287
- "pl": "Path Path",
288
- "uk": "Патент",
289
- "zh-cn": "Path"
290
- },
291
- "Overlay": {
292
- "en": "Overlaying text",
293
- "de": "Überlagerungstext",
294
- "ru": "Overlaying текст",
295
- "pt": "Sobreposição de texto",
296
- "nl": "Vertaling:",
297
- "fr": "Remplacer le texte",
298
- "it": "Testo di sovrapposizione",
299
- "es": "Texto superpuesto",
300
- "pl": "Tekst Overlaying",
301
- "uk": "Налаштування тексту",
302
- "zh-cn": "全文"
303
- },
304
- "Sharpening": {
305
- "en": "Picture sharpening",
306
- "de": "Bildschärfe",
307
- "ru": "Заточка изображения",
308
- "pt": "Afiação de imagem",
309
- "nl": "Foto slijpen",
310
- "fr": "Aiguillage photo",
311
- "it": "Affilare l'immagine",
312
- "es": "Afilado de la imagen",
313
- "pl": "Zdjęcie ostrym",
314
- "uk": "Заточування зображень",
315
- "zh-cn": "急诊"
316
- },
317
- "wo": {
318
- "en": "without",
319
- "de": "ohne",
320
- "ru": "без",
321
- "pt": "sem",
322
- "nl": "zonder",
323
- "fr": "sans",
324
- "it": "senza",
325
- "es": "sin",
326
- "pl": "bezpłodnie",
327
- "uk": "без",
328
- "zh-cn": "无"
329
- },
330
- "less": {
331
- "en": "less",
332
- "de": "weniger",
333
- "ru": "меньше",
334
- "pt": "menos",
335
- "nl": "minder minder",
336
- "fr": "moins",
337
- "it": "meno",
338
- "es": "menos",
339
- "pl": "mniej",
340
- "uk": "менше",
341
- "zh-cn": "减少"
342
- },
343
- "more": {
344
- "en": "more",
345
- "de": "mehr",
346
- "ru": "больше",
347
- "pt": "mais",
348
- "nl": "meer meer",
349
- "fr": "plus",
350
- "it": "più",
351
- "es": "más",
352
- "pl": "bardziej",
353
- "uk": "більше",
354
- "zh-cn": "更多"
355
- },
356
- "much": {
357
- "en": "much",
358
- "de": "viel",
359
- "ru": "много",
360
- "pt": "muito",
361
- "nl": "veel",
362
- "fr": "beaucoup",
363
- "it": "molto",
364
- "es": "mucho",
365
- "pl": "dużo",
366
- "uk": "багато",
367
- "zh-cn": "很多"
368
- },
369
- "most": {
370
- "en": "most",
371
- "de": "am meisten",
372
- "ru": "наиболее",
373
- "pt": "o mais",
374
- "nl": "het meest",
375
- "fr": "le plus",
376
- "it": "il più",
377
- "es": "el más",
378
- "pl": "najbardziej",
379
- "uk": "найпопулярніші",
380
- "zh-cn": "最主要的是"
381
- },
382
- "Contrast": {
383
- "en": "Picture contrast",
384
- "de": "Bildkontrast",
385
- "ru": "Рисунок контраст",
386
- "pt": "Contraste de imagem",
387
- "nl": "In tegenstelling tot",
388
- "fr": "Contraste visuel",
389
- "it": "Contrasto immagine",
390
- "es": "Contraste de imagen",
391
- "pl": "Kontrast",
392
- "uk": "Фото контраст",
393
- "zh-cn": "A. 形状"
394
- },
395
- "only at Night": {
396
- "en": "Active only at night.",
397
- "de": "Nur nachts aktiv.",
398
- "ru": "Активно только ночью.",
399
- "pt": "Ativa apenas à noite.",
400
- "nl": "Alleen 's nachts actief.",
401
- "fr": "Active seulement la nuit.",
402
- "it": "Attivo solo di notte.",
403
- "es": "Activo sólo por la noche.",
404
- "pl": "Działa tylko w nocy.",
405
- "uk": "Активний тільки вночі.",
406
- "zh-cn": "只在夜间采取行动。."
407
- },
408
- "Set two face auth (once)": {
409
- "en": "Set two face auth (once)",
410
- "de": "Setze Tow Face Authentification (einmal)",
411
- "ru": "Установить два лица аутентификации (один раз)",
412
- "pt": "Definir autenticação de duas faces (uma vez)",
413
- "nl": "Stel twee gezichtsverificatie in (eenmalig)",
414
- "fr": "Définir l'authentification à deux faces (une fois)",
415
- "it": "Imposta un'autenticazione a due volti (una volta)",
416
- "es": "Establecer dos caras de autenticación (una vez)",
417
- "pl": "Ustaw dwa uwierzytelnianie twarzy (raz)",
418
- "zh-cn": "设置两张面孔身份验证(一次)"
419
- },
420
- "Refreshtoken (Two Face Auth)": {
421
- "en": "Refreshtoken (Two Face Auth)",
422
- "de": "Refreshtoken (Two Face Auth)",
423
- "ru": "Refreshtoken (аутентификация двух лиц)",
424
- "pt": "Atualizar atualização (autenticação de duas faces)",
425
- "nl": "Refreshtoken (Two Face Auth)",
426
- "fr": "Refreshtoken (authentification à deux faces)",
427
- "it": "Refreshtoken (Two Face Auth)",
428
- "es": "Refreshtoken (autenticación de dos caras)",
429
- "pl": "Refreshtoken (uwierzytelnianie dwóch twarzy)",
430
- "zh-cn": "刷新令牌(两面验证)"
431
- },
432
- "Renew registration": {
433
- "en": "Renew registration",
434
- "de": "Anmeldung erneuern",
435
- "ru": "Продлить регистрацию",
436
- "pt": "Renovar registro",
437
- "nl": "Registratie verlengen",
438
- "fr": "Renouveler l'inscription",
439
- "it": "Rinnova la registrazione",
440
- "es": "Renovar registro",
441
- "pl": "Odnów rejestrację",
442
- "uk": "Відновити реєстрацію",
443
- "zh-cn": "更新注册"
444
- },
445
- "Delete old one": {
446
- "en": "Delete old files",
447
- "de": "Alte Dateien löschen",
448
- "ru": "Удалить старые файлы",
449
- "pt": "Excluir arquivos antigos",
450
- "nl": "Verwijder oude dossiers",
451
- "fr": "Supprimer les vieux fichiers",
452
- "it": "Eliminare vecchi file",
453
- "es": "Eliminar archivos antiguos",
454
- "pl": "Delete stare pliki",
455
- "uk": "Видалити старі файли",
456
- "zh-cn": "删除旧档案"
457
- },
458
- "Allow to transfer errors if the adapter crash. Private data like usernames, passwords, tokens, ... will be NOT be transferd.": {
459
- "en": "Allow to transfer errors if the adapter crash. Private data like usernames, passwords, tokens, ... will be NOT be transferd.",
460
- "de": "Erlaube das weiterleiten von Fehlern wenn der Adapter abstürtzt. Private Daten wie z.B. Benutzername, Passwort, Token, ... werden NICHT übertragen.",
461
- "ru": "Разрешить передавать ошибки в случае сбоя адаптера. Личные данные, такие как имена пользователей, пароли, токены, ... НЕ будут передаваться.",
462
- "pt": "Permitir a transferência de erros se o adaptador travar. Dados privados como nomes de usuário, senhas, tokens, ... NÃO serão transferidos.",
463
- "nl": "Sta toe om fouten over te dragen als de adapter crasht. Privégegevens zoals gebruikersnamen, wachtwoorden, tokens, ... worden NIET overgedragen.",
464
- "fr": "Permet de transférer des erreurs en cas de panne de l'adaptateur. Les données privées comme les noms d'utilisateur, les mots de passe, les jetons, ... ne seront PAS transférées.",
465
- "it": "Consentire il trasferimento degli errori in caso di arresto anomalo dell'adattatore. I dati privati come nomi utente, password, token, ... NON saranno trasferiti.",
466
- "es": "Permita transferir errores si el adaptador falla. NO se transferirán datos privados como nombres de usuario, contraseñas, tokens, ...",
467
- "pl": "Zezwól na przesyłanie błędów w przypadku awarii adaptera. Prywatne dane, takie jak nazwy użytkowników, hasła, tokeny, ... NIE zostaną przeniesione.",
468
- "zh-cn": "如果适配器崩溃,则允许传输错误。用户名,密码,令牌等私密数据将不会被传输。"
469
- }
470
- };
@@ -1,98 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.isObject = isObject;
7
- exports.isArray = isArray;
8
- exports.translateText = translateText;
9
- const axios_1 = __importDefault(require("axios"));
10
- /**
11
- * Tests whether the given variable is a real object and not an Array
12
- * @param it The variable to test
13
- */
14
- function isObject(it) {
15
- // This is necessary because:
16
- // typeof null === 'object'
17
- // typeof [] === 'object'
18
- // [] instanceof Object === true
19
- return Object.prototype.toString.call(it) === "[object Object]";
20
- }
21
- /**
22
- * Tests whether the given variable is really an Array
23
- * @param it The variable to test
24
- */
25
- function isArray(it) {
26
- if (Array.isArray != null)
27
- return Array.isArray(it);
28
- return Object.prototype.toString.call(it) === "[object Array]";
29
- }
30
- /**
31
- * Translates text using the Google Translate API
32
- * @param text The text to translate
33
- * @param targetLang The target language
34
- * @param yandexApiKey The yandex API key. You can create one for free at https://translate.yandex.com/developers
35
- */
36
- async function translateText(text, targetLang, yandexApiKey) {
37
- if (targetLang === "en") {
38
- return text;
39
- }
40
- else if (!text) {
41
- return "";
42
- }
43
- if (yandexApiKey) {
44
- return translateYandex(text, targetLang, yandexApiKey);
45
- }
46
- else {
47
- return translateGoogle(text, targetLang);
48
- }
49
- }
50
- /**
51
- * Translates text with Yandex API
52
- * @param text The text to translate
53
- * @param targetLang The target language
54
- * @param apiKey The yandex API key. You can create one for free at https://translate.yandex.com/developers
55
- */
56
- async function translateYandex(text, targetLang, apiKey) {
57
- var _a;
58
- if (targetLang === "zh-cn") {
59
- targetLang = "zh";
60
- }
61
- try {
62
- const url = `https://translate.yandex.net/api/v1.5/tr.json/translate?key=${apiKey}&text=${encodeURIComponent(text)}&lang=en-${targetLang}`;
63
- const response = await (0, axios_1.default)({ url, timeout: 15000 });
64
- if (isArray((_a = response.data) === null || _a === void 0 ? void 0 : _a.text)) {
65
- return response.data.text[0];
66
- }
67
- throw new Error("Invalid response for translate request");
68
- }
69
- catch (e) {
70
- throw new Error(`Could not translate to "${targetLang}": ${e}`);
71
- }
72
- }
73
- /**
74
- * Translates text with Google API
75
- * @param text The text to translate
76
- * @param targetLang The target language
77
- */
78
- async function translateGoogle(text, targetLang) {
79
- var _a;
80
- try {
81
- const url = `http://translate.googleapis.com/translate_a/single?client=gtx&sl=en&tl=${targetLang}&dt=t&q=${encodeURIComponent(text)}&ie=UTF-8&oe=UTF-8`;
82
- const response = await (0, axios_1.default)({ url, timeout: 15000 });
83
- if (isArray(response.data)) {
84
- // we got a valid response
85
- return response.data[0][0][0];
86
- }
87
- throw new Error("Invalid response for translate request");
88
- }
89
- catch (e) {
90
- if (((_a = e === null || e === void 0 ? void 0 : e.response) === null || _a === void 0 ? void 0 : _a.status) === 429) {
91
- throw new Error(`Could not translate to "${targetLang}": Rate-limited by Google Translate`);
92
- }
93
- else {
94
- throw new Error(`Could not translate to "${targetLang}": ${e}`);
95
- }
96
- }
97
- }
98
- //# sourceMappingURL=tools.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/lib/tools.ts"],"names":[],"mappings":";;;;;AAMA,4BAMC;AAMD,0BAGC;AAQD,sCAWC;AAxCD,kDAA6C;AAE7C;;;GAGG;AACH,SAAgB,QAAQ,CAAC,EAAW;IAClC,6BAA6B;IAC7B,2BAA2B;IAC3B,yBAAyB;IACzB,gCAAgC;IAChC,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,iBAAiB,CAAC;AAClE,CAAC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,EAAW;IACjC,IAAI,KAAK,CAAC,OAAO,IAAI,IAAI;QAAE,OAAO,KAAK,CAAC,OAA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