MIgrate adapter to Typescript

This commit is contained in:
GermanBluefox
2026-03-31 19:44:44 +02:00
parent 92140fe771
commit ebca1ad36c
39 changed files with 1176 additions and 1325 deletions
+8
View File
@@ -0,0 +1,8 @@
{
"Home assistant IP": "IP-Adresse von Home Assistant",
"Home assistant WS Port": "Home Assistant WebSocket-Port",
"Password repeat": "Passwort wiederholen",
"Password": "Passwort",
"Passwords missmatch!": "Passwörter stimmen nicht überein!",
"Secure": "HTTPS?"
}
-8
View File
@@ -1,8 +0,0 @@
{
"Home assistant IP:": "IP-Adresse von Home Assistant:",
"Home assistant WS Port:": "Home Assistant WebSocket-Port:",
"Password repeat:": "Passwort wiederholen:",
"Password:": "Passwort:",
"Passwords missmatch!": "Passwörter stimmen nicht überein!",
"Secure:": "HTTPS?"
}
+8
View File
@@ -0,0 +1,8 @@
{
"Home assistant IP": "Home assistant IP",
"Home assistant WS Port": "Home assistant WS Port",
"Password repeat": "Password repeat",
"Password": "Password",
"Passwords missmatch!": "Passwords missmatch!",
"Secure": "HTTPS?"
}
-8
View File
@@ -1,8 +0,0 @@
{
"Home assistant IP:": "Home assistant IP:",
"Home assistant WS Port:": "Home assistant WS Port:",
"Password repeat:": "Password repeat:",
"Password:": "Password:",
"Passwords missmatch!": "Passwords missmatch!",
"Secure:": "HTTPS?"
}
+8
View File
@@ -0,0 +1,8 @@
{
"Home assistant IP": "IP del asistente de hogar",
"Home assistant WS Port": "Asistente doméstico Puerto WS",
"Password repeat": "Repite la contraseña",
"Password": "Clave",
"Passwords missmatch!": "¡Las contraseñas no coinciden!",
"Secure": "¿HTTPS?"
}
-8
View File
@@ -1,8 +0,0 @@
{
"Home assistant IP:": "IP del asistente de hogar:",
"Home assistant WS Port:": "Asistente doméstico Puerto WS:",
"Password repeat:": "Repite la contraseña:",
"Password:": "Clave:",
"Passwords missmatch!": "¡Las contraseñas no coinciden!",
"Secure:": "¿HTTPS?:"
}
+8
View File
@@ -0,0 +1,8 @@
{
"Home assistant IP": "IP de l'assistant à domicile ",
"Home assistant WS Port": "Port WS de l'assistant domestique ",
"Password repeat": "Répéter le mot de passe ",
"Password": "Mot de passe",
"Passwords missmatch!": "Les mots de passe ne correspondent pas !",
"Secure": "HTTPS ?"
}
-8
View File
@@ -1,8 +0,0 @@
{
"Home assistant IP:": "IP de l'assistant à domicile :",
"Home assistant WS Port:": "Port WS de l'assistant domestique :",
"Password repeat:": "Répéter le mot de passe :",
"Password:": "Mot de passe:",
"Passwords missmatch!": "Les mots de passe ne correspondent pas !",
"Secure:": "HTTPS ?"
}
+8
View File
@@ -0,0 +1,8 @@
{
"Home assistant IP": "IP assistente domestico",
"Home assistant WS Port": "Porta WS dell'assistente domestico",
"Password repeat": "Ripeti password",
"Password": "Parola d'ordine",
"Passwords missmatch!": "Le password non corrispondono!",
"Secure": "HTTPS?"
}
-8
View File
@@ -1,8 +0,0 @@
{
"Home assistant IP:": "IP assistente domestico:",
"Home assistant WS Port:": "Porta WS dell'assistente domestico:",
"Password repeat:": "Ripeti password:",
"Password:": "Parola d'ordine:",
"Passwords missmatch!": "Le password non corrispondono!",
"Secure:": "HTTPS?"
}
+8
View File
@@ -0,0 +1,8 @@
{
"Home assistant IP": "Thuisassistent IP",
"Home assistant WS Port": "Thuisassistent WS Poort",
"Password repeat": "Wachtwoord herhalen",
"Password": "Wachtwoord",
"Passwords missmatch!": "Wachtwoorden komen niet overeen!",
"Secure": "HTTPS?"
}
-8
View File
@@ -1,8 +0,0 @@
{
"Home assistant IP:": "Thuisassistent IP:",
"Home assistant WS Port:": "Thuisassistent WS Poort:",
"Password repeat:": "Wachtwoord herhalen:",
"Password:": "Wachtwoord:",
"Passwords missmatch!": "Wachtwoorden komen niet overeen!",
"Secure:": "HTTPS?"
}
+8
View File
@@ -0,0 +1,8 @@
{
"Home assistant IP": "Adres IP asystenta domowego",
"Home assistant WS Port": "Asystent domowy Port WS",
"Password repeat": "Powtórz hasło",
"Password": "Hasło",
"Passwords missmatch!": "Niezgodność haseł!",
"Secure": "HTTPS?"
}
-8
View File
@@ -1,8 +0,0 @@
{
"Home assistant IP:": "Adres IP asystenta domowego:",
"Home assistant WS Port:": "Asystent domowy Port WS:",
"Password repeat:": "Powtórz hasło:",
"Password:": "Hasło:",
"Passwords missmatch!": "Niezgodność haseł!",
"Secure:": "HTTPS?"
}
+8
View File
@@ -0,0 +1,8 @@
{
"Home assistant IP": "IP do assistente doméstico",
"Home assistant WS Port": "Assistente doméstico Porta WS",
"Password repeat": "Repetição de senha",
"Password": "Senha",
"Passwords missmatch!": "As senhas não correspondem!",
"Secure": "HTTPS?"
}
-8
View File
@@ -1,8 +0,0 @@
{
"Home assistant IP:": "IP do assistente doméstico:",
"Home assistant WS Port:": "Assistente doméstico Porta WS:",
"Password repeat:": "Repetição de senha:",
"Password:": "Senha:",
"Passwords missmatch!": "As senhas não correspondem!",
"Secure:": "HTTPS?"
}
+8
View File
@@ -0,0 +1,8 @@
{
"Home assistant IP": "Домашний помощник IP",
"Home assistant WS Port": "Домашний помощник WS Порт",
"Password repeat": "Повтор пароля",
"Password": "Пароль",
"Passwords missmatch!": "Пароли не совпадают!",
"Secure": "HTTPS?"
}
-8
View File
@@ -1,8 +0,0 @@
{
"Home assistant IP:": "Домашний помощник IP:",
"Home assistant WS Port:": "Домашний помощник WS Порт:",
"Password repeat:": "Повтор пароля:",
"Password:": "Пароль:",
"Passwords missmatch!": "Пароли не совпадают!",
"Secure:": "HTTPS?"
}
+8
View File
@@ -0,0 +1,8 @@
{
"Home assistant IP": "Домашній помічник IP",
"Home assistant WS Port": "Домашній помічник WS Порт",
"Password repeat": "Повторення пароля",
"Password": "Пароль",
"Passwords missmatch!": "Паролі не збігаються!",
"Secure": "HTTPS?"
}
-8
View File
@@ -1,8 +0,0 @@
{
"Home assistant IP:": "Домашній помічник IP:",
"Home assistant WS Port:": "Домашній помічник WS Порт:",
"Password repeat:": "Повторення пароля:",
"Password:": "Пароль:",
"Passwords missmatch!": "Паролі не збігаються!",
"Secure:": "HTTPS?"
}
+8
View File
@@ -0,0 +1,8 @@
{
"Home assistant IP": "家庭助理IP",
"Home assistant WS Port": "家庭助理 WS 端口:",
"Password repeat": "密码重复:",
"Password": "密码:",
"Passwords missmatch!": "密码不匹配!",
"Secure": "HTTPS"
}
-8
View File
@@ -1,8 +0,0 @@
{
"Home assistant IP:": "家庭助理IP",
"Home assistant WS Port:": "家庭助理 WS 端口:",
"Password repeat:": "密码重复:",
"Password:": "密码:",
"Passwords missmatch!": "密码不匹配!",
"Secure:": "HTTPS"
}
-108
View File
@@ -1,108 +0,0 @@
<html>
<head>
<!-- Materialze style -->
<link rel="stylesheet" type="text/css" href="../../css/adapter.css"/>
<link rel="stylesheet" type="text/css" href="../../lib/css/materialize.css">
<script type="text/javascript" src="../../lib/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="../../socket.io/socket.io.js"></script>
<script type="text/javascript" src="../../js/translate.js"></script>
<script type="text/javascript" src="../../lib/js/materialize.js"></script>
<script type="text/javascript" src="../../js/adapter-settings.js"></script>
<script type="text/javascript" src="words.js"></script>
<script type="text/javascript">
function load(settings, onChange) {
if (!settings) return;
if (settings.password === undefined) settings.password = '';
settings.passwordRepeat = settings.password;
$('.value').each(function () {
var key = $(this).attr('id');
var $value = $('#' + key + '.value');
if ($value.attr('type') === 'checkbox') {
$value.prop('checked', settings[key]).change(function() {
onChange();
});
} else {
$value.val(settings[key]).change(function() {
onChange();
}).keyup(function() {
onChange();
});
}
});
// Signal to admin, that no changes yet
onChange(false);
}
function save(callback) {
var obj = {};
if ($('#password').val() !== $('#passwordRepeat').val()) {
showMessage(_('Passwords missmatch!'), _('Warning'), 'alert');
return;
}
$('.value').each(function () {
var $this = $(this);
if ($this.attr('type') === 'checkbox') {
obj[$this.attr('id')] = $this.prop('checked');
} else {
obj[$this.attr('id')] = $this.val();
}
});
delete obj.passwordRepeat;
callback(obj);
}
</script>
</head>
<body>
<div class="m adapter-container">
<div class="row">
<div class="col s12 m4 l2">
<img src="hass.png" class="logo">
</div>
</div>
<div class="row">
<div class="col s12 m8 l8">
<div class="col s4 input-field">
<input type="text" class="value" id="host" />
<label for="host" class="translate">Home assistant IP:</label>
</div>
<div class="col s4 input-field">
<input type="text" class="value" id="port" size="5" maxlength="5"/>
<label for="port" class="translate">Home assistant WS Port:</label>
</div>
</div>
</div>
<div class="row">
<div class="col s12 m8 l8">
<div class="col s6 m4 input-field">
<input type="password" class="value" id="password" />
<label for="password" class="translate">Password:</label>
</div>
<div class="col s6 m4 input-field">
<input type="password" class="value" id="passwordRepeat" />
<label for="passwordRepeat" class="translate">Password repeat:</label>
</div>
</div>
</div>
<div class="row">
<div class="col s12 m8 l8">
<div class="col s6 m4 input-field">
<input id="secure" type="checkbox" class="value" />
<span for="secure" class="translate">Secure:</span>
</div>
</div>
</div>
</div>
</body>
</html>
+44
View File
@@ -0,0 +1,44 @@
{
"i18n": true,
"type": "panel",
"items": {
"host": {
"type": "text",
"label": "Home assistant IP",
"sm": 12,
"md": 6,
"lg": 4
},
"port": {
"type": "number",
"label": "Home assistant WS Port",
"min": 1,
"max": 65535,
"sm": 12,
"md": 6,
"lg": 4
},
"_divider1": {
"type": "divider"
},
"password": {
"type": "password",
"label": "Password",
"repeat": true,
"visible": true,
"sm": 12,
"md": 6,
"lg": 4
},
"_divider2": {
"type": "divider"
},
"secure": {
"type": "checkbox",
"label": "Secure",
"sm": 12,
"md": 6,
"lg": 4
}
}
}
-17
View File
@@ -1,17 +0,0 @@
/*global systemDictionary:true */
/*
+===================== DO NOT MODIFY ======================+
| This file was generated by translate-adapter, please use |
| `translate-adapter adminLanguages2words` to update it. |
+===================== DO NOT MODIFY ======================+
*/
'use strict';
systemDictionary = {
"Home assistant IP:": { "en": "Home assistant IP:", "de": "IP-Adresse von Home Assistant:", "ru": "Домашний помощник IP:", "pt": "IP do assistente doméstico:", "nl": "Thuisassistent IP:", "fr": "IP de l'assistant à domicile :", "it": "IP assistente domestico:", "es": "IP del asistente de hogar:", "pl": "Adres IP asystenta domowego:", "uk": "Домашній помічник IP:", "zh-cn": "家庭助理IP"},
"Home assistant WS Port:": { "en": "Home assistant WS Port:", "de": "Home Assistant WebSocket-Port:", "ru": "Домашний помощник WS Порт:", "pt": "Assistente doméstico Porta WS:", "nl": "Thuisassistent WS Poort:", "fr": "Port WS de l'assistant domestique :", "it": "Porta WS dell'assistente domestico:", "es": "Asistente doméstico Puerto WS:", "pl": "Asystent domowy Port WS:", "uk": "Домашній помічник WS Порт:", "zh-cn": "家庭助理 WS 端口:"},
"Password repeat:": { "en": "Password repeat:", "de": "Passwort wiederholen:", "ru": "Повтор пароля:", "pt": "Repetição de senha:", "nl": "Wachtwoord herhalen:", "fr": "Répéter le mot de passe :", "it": "Ripeti password:", "es": "Repite la contraseña:", "pl": "Powtórz hasło:", "uk": "Повторення пароля:", "zh-cn": "密码重复:"},
"Password:": { "en": "Password:", "de": "Passwort:", "ru": "Пароль:", "pt": "Senha:", "nl": "Wachtwoord:", "fr": "Mot de passe:", "it": "Parola d'ordine:", "es": "Clave:", "pl": "Hasło:", "uk": "Пароль:", "zh-cn": "密码:"},
"Passwords missmatch!": { "en": "Passwords missmatch!", "de": "Passwörter stimmen nicht überein!", "ru": "Пароли не совпадают!", "pt": "As senhas não correspondem!", "nl": "Wachtwoorden komen niet overeen!", "fr": "Les mots de passe ne correspondent pas !", "it": "Le password non corrispondono!", "es": "¡Las contraseñas no coinciden!", "pl": "Niezgodność haseł!", "uk": "Паролі не збігаються!", "zh-cn": "密码不匹配!"},
"Secure:": { "en": "HTTPS?", "de": "HTTPS?", "ru": "HTTPS?", "pt": "HTTPS?", "nl": "HTTPS?", "fr": "HTTPS ?", "it": "HTTPS?", "es": "¿HTTPS?:", "pl": "HTTPS?", "uk": "HTTPS?", "zh-cn": "HTTPS"},
};