diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b31136e2..35d89591b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ All notable changes to homebridge-config-ui-x will be documented in this file. +## 4.52.1 (2023-11-04) + +### Other Changes + +- **i18n:** Update de.json ([1627](https://github.com/homebridge/homebridge-config-ui-x/pull/1627)) + +### Bug Fixes + +- Fix text in post-plugin-update modal which wasn't showing translated strings properly +- Revert HomeKit code formatting change + ## 4.52.0 (2023-11-04) ### Notable Changes diff --git a/config.schema.json b/config.schema.json index 997182386..4dfad1efd 100644 --- a/config.schema.json +++ b/config.schema.json @@ -268,6 +268,18 @@ "ca" ] }, + { + "title": "Chinese - Simplified (zh-CN)", + "enum": [ + "zh-CN" + ] + }, + { + "title": "Chinese - Traditional (zh-TW)", + "enum": [ + "zh-TW" + ] + }, { "title": "Czech (cs)", "enum": [ @@ -275,9 +287,9 @@ ] }, { - "title": "German (de)", + "title": "Dutch (nl)", "enum": [ - "de" + "nl" ] }, { @@ -287,15 +299,22 @@ ] }, { - "title": "Spanish (es)", + "title": "French (fr)", "enum": [ - "es" + "fr" ] }, { - "title": "French (fr)", + "title": "German (de)", "enum": [ - "fr" + "de" + ] + }, + + { + "title": "Hebrew (he)", + "enum": [ + "he" ] }, { @@ -328,12 +347,6 @@ "ko" ] }, - { - "title": "Dutch (nl)", - "enum": [ - "nl" - ] - }, { "title": "Macedonian (mk)", "enum": [ @@ -347,21 +360,21 @@ ] }, { - "title": "Portuguese (pt-BR)", + "title": "Polish (pl)", "enum": [ - "pt-BR" + "pl" ] }, { - "title": "Portuguese (pt)", + "title": "Portuguese (Brazil)", "enum": [ - "pt" + "pt-BR" ] }, { - "title": "Polish (pl)", + "title": "Portuguese (Portugal)", "enum": [ - "pl" + "pt" ] }, { @@ -376,6 +389,12 @@ "sl" ] }, + { + "title": "Spanish (es)", + "enum": [ + "es" + ] + }, { "title": "Swedish (sv)", "enum": [ @@ -399,24 +418,6 @@ "enum": [ "uk" ] - }, - { - "title": "Chinese - Simplified (zh-CN)", - "enum": [ - "zh-CN" - ] - }, - { - "title": "Chinese - Traditional (zh-TW)", - "enum": [ - "zh-TW" - ] - }, - { - "title": "Hebrew", - "enum": [ - "he" - ] } ] }, @@ -433,7 +434,7 @@ "type": "string" }, "noFork": { - "title": "Do not run the Config UI web server in a seperate process/thread", + "title": "Do not run the Config UI web server in a separate process/thread", "type": "boolean" }, "host": { @@ -700,4 +701,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/package-lock.json b/package-lock.json index 06450f590..ea17967f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "homebridge-config-ui-x", - "version": "4.52.0", + "version": "4.52.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "homebridge-config-ui-x", - "version": "4.52.0", + "version": "4.52.1", "funding": [ { "type": "github", @@ -23,8 +23,8 @@ "@fastify/multipart": "8.0.0", "@fastify/static": "6.12.0", "@fastify/swagger": "8.12.0", - "@homebridge/node-pty-prebuilt-multiarch": "^0.11.8", - "@nestjs/axios": "^3.0.1", + "@homebridge/node-pty-prebuilt-multiarch": "0.11.8", + "@nestjs/axios": "3.0.1", "@nestjs/common": "10.2.7", "@nestjs/core": "10.2.7", "@nestjs/jwt": "10.1.1", @@ -39,7 +39,7 @@ "class-validator": "0.14.0", "commander": "7.2.0", "dayjs": "1.11.10", - "emoji-js": "^3.7.0", + "emoji-js": "3.7.0", "fastify": "4.23.2", "fs-extra": "10.1.0", "node-cache": "5.1.2", @@ -823,9 +823,9 @@ "integrity": "sha512-J8TOSBq3SoZbDhM9+R/u77hP93gz/rajSA+K2kGyijPpORPWUXHUpTaleoj+92As0S9uPRP7Oi8IqMf0u+ro6A==" }, "node_modules/@fastify/error": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/@fastify/error/-/error-3.4.0.tgz", - "integrity": "sha512-e/mafFwbK3MNqxUcFBLgHhgxsF8UT1m8aj0dAlqEa2nJEgPsRtpHTZ3ObgrgkZ2M1eJHPTwgyUl/tXkvabsZdQ==" + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@fastify/error/-/error-3.4.1.tgz", + "integrity": "sha512-wWSvph+29GR783IhmvdwWnN4bUxTD01Vm5Xad4i7i1VuAOItLvbPAb69sb0IQ2N57yprvhNIwAP5B6xfKTmjmQ==" }, "node_modules/@fastify/fast-json-stringify-compiler": { "version": "4.3.0", diff --git a/package.json b/package.json index 211ef4df4..f9ef9ce07 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "homebridge-config-ui-x", "displayName": "Homebridge UI", - "version": "4.52.0", + "version": "4.52.1", "description": "A web based management, configuration and control platform for Homebridge.", "license": "MIT", "author": "oznu ", @@ -56,8 +56,8 @@ "@fastify/multipart": "8.0.0", "@fastify/static": "6.12.0", "@fastify/swagger": "8.12.0", - "@homebridge/node-pty-prebuilt-multiarch": "^0.11.8", - "@nestjs/axios": "^3.0.1", + "@homebridge/node-pty-prebuilt-multiarch": "0.11.8", + "@nestjs/axios": "3.0.1", "@nestjs/common": "10.2.7", "@nestjs/core": "10.2.7", "@nestjs/jwt": "10.1.1", @@ -72,7 +72,7 @@ "class-validator": "0.14.0", "commander": "7.2.0", "dayjs": "1.11.10", - "emoji-js": "^3.7.0", + "emoji-js": "3.7.0", "fastify": "4.23.2", "fs-extra": "10.1.0", "node-cache": "5.1.2", diff --git a/src/modules/config-editor/config-editor.service.ts b/src/modules/config-editor/config-editor.service.ts index c0b68056c..f8ffc8883 100644 --- a/src/modules/config-editor/config-editor.service.ts +++ b/src/modules/config-editor/config-editor.service.ts @@ -113,7 +113,7 @@ export class ConfigEditorService { } // ensure the pin matches the required pattern - const pinPattern = /^([0-9]{4}-[0-9]{4})$/; + const pinPattern = /^([0-9]{3}-[0-9]{2}-[0-9]{3})$/; if (!pinPattern.test(config.bridge.pin)) { if (pinPattern.test(this.configService.homebridgeConfig.bridge.pin)) { config.bridge.pin = this.configService.homebridgeConfig.bridge.pin; @@ -418,7 +418,8 @@ export class ConfigEditorService { public generatePin() { let code: string | Array = Math.floor(10000000 + Math.random() * 90000000) + ''; code = code.split(''); - code.splice(4, 0, '-'); + code.splice(3, 0, '-'); + code.splice(6, 0, '-'); code = code.join(''); return code; } diff --git a/test/e2e/config-editor.e2e-spec.ts b/test/e2e/config-editor.e2e-spec.ts index 675987a87..6108806ec 100644 --- a/test/e2e/config-editor.e2e-spec.ts +++ b/test/e2e/config-editor.e2e-spec.ts @@ -351,7 +351,7 @@ describe('ConfigEditorController (e2e)', () => { it('POST /config-editor (accept bridge.pin if a valid value is provided)', async () => { const currentConfig = await fs.readJson(configFilePath); - currentConfig.bridge.pin = '1111-1111'; + currentConfig.bridge.pin = '111-11-111'; const res = await app.inject({ method: 'POST', @@ -366,7 +366,7 @@ describe('ConfigEditorController (e2e)', () => { // check the updates were saved to disk and mistakes corrected const savedConfig: HomebridgeConfig = await fs.readJson(configFilePath); - expect(savedConfig.bridge.pin).toBe('1111-1111'); + expect(savedConfig.bridge.pin).toBe('111-11-111'); }); it('POST /config-editor (correct bridge.name if an invalid value is provided)', async () => { diff --git a/test/e2e/server.e2e-spec.ts b/test/e2e/server.e2e-spec.ts index 674cb5d91..a2e608930 100644 --- a/test/e2e/server.e2e-spec.ts +++ b/test/e2e/server.e2e-spec.ts @@ -106,7 +106,7 @@ describe('ServerController (e2e)', () => { expect(res.json()).toEqual({ displayName: 'Homebridge Test', isPaired: false, - pincode: '8749-9441', + pincode: '874-99-441', setupCode: 'X-HM://0024X0Z3L1FAP', }); }); diff --git a/test/mocks/config.json b/test/mocks/config.json index 7af1d1abc..a0efc63ed 100644 --- a/test/mocks/config.json +++ b/test/mocks/config.json @@ -2,7 +2,7 @@ "bridge": { "name": "Homebridge Test", "port": 51826, - "pin": "8749-9441", + "pin": "874-99-441", "username": "67:E4:1F:0E:A0:5D" }, "accessories": [], diff --git a/test/mocks/persist/AccessoryInfo.67E41F0EA05D.json b/test/mocks/persist/AccessoryInfo.67E41F0EA05D.json index 97ea2bdeb..efea7ea10 100644 --- a/test/mocks/persist/AccessoryInfo.67E41F0EA05D.json +++ b/test/mocks/persist/AccessoryInfo.67E41F0EA05D.json @@ -1,7 +1,7 @@ { "displayName": "Homebridge Test", "category": 2, - "pincode": "8749-9441", + "pincode": "874-99-441", "signSk": "fb7ecc3daa9b495d5867b49268af7568d52c4ab708e334809932976340d7a11f25e05221aa6ad3dbf4d7213e112db08752e6d94820e49038c58bc564b688626f", "signPk": "25e05221aa6ad3dbf4d7213e112db08752e6d94820e49038c58bc564b688626f", "pairedClients": {}, diff --git a/ui/src/app/core/manage-plugins/manage-plugins-modal/manage-plugins-modal.component.html b/ui/src/app/core/manage-plugins/manage-plugins-modal/manage-plugins-modal.component.html index 691870cf3..120ed04e7 100644 --- a/ui/src/app/core/manage-plugins/manage-plugins-modal/manage-plugins-modal.component.html +++ b/ui/src/app/core/manage-plugins/manage-plugins-modal/manage-plugins-modal.component.html @@ -8,9 +8,7 @@

Restart Required

-

- Thanks for installing the {{ targetVersion }} version of {{ pluginName }}. -

+

Please restart Homebridge for the changes to apply. Alternatively, if you have this plugin running in child bridges, you can close this modal and restart these instead.

diff --git a/ui/src/app/modules/config-editor/config-editor.component.ts b/ui/src/app/modules/config-editor/config-editor.component.ts index f54f5ad8f..2905c8457 100644 --- a/ui/src/app/modules/config-editor/config-editor.component.ts +++ b/ui/src/app/modules/config-editor/config-editor.component.ts @@ -400,9 +400,9 @@ export class ConfigEditorComponent implements OnInit, OnDestroy { }, pin: { type: 'string', - description: 'The Homebridge instance pin.\nThis is used when pairing Homebridge to HomeKit.\nExample: 6302-7655', - default: '6302-7655', - pattern: '^([0-9]{4}-[0-9]{4})$', + description: 'The Homebridge instance pin.\nThis is used when pairing Homebridge to HomeKit.\nExample: 630-27-655', + default: '630-27-655', + pattern: '^([0-9]{3}-[0-9]{2}-[0-9]{3})$', }, manufacturer: { type: 'string', diff --git a/ui/src/i18n/ca.json b/ui/src/i18n/ca.json index 149ffe74c..06629da5c 100644 --- a/ui/src/i18n/ca.json +++ b/ui/src/i18n/ca.json @@ -190,7 +190,7 @@ "plugins.manage.message_confirm_enable": "Estàs segur que vols activar {{ pluginName }}?", "plugins.manage.message_install_alternate_version": "Instal·lar versió anterior", "plugins.manage.message_select_version_to_install": "Tria la versió que vols instal·lar", - "plugins.manage.message_thanks_for_updating": "Gràcies per instal·lar l'última versió de {{ pluginName }}.", + "plugins.manage.message_thanks_for_updating": "Gràcies per instal·lar la versió {{ targetVersion }} de {{ pluginName }}.", "plugins.manage.message_thanks_for_updating_restart": "Reinici Homebridge perquè s'apliquin els canvis. Alternativament, si tens aquest plugin executant-se en ponts fills, pots tancar aquest modal i reiniciar-los.", "plugins.manage.message_uninstall_remove_config_required": "Si eliminaràs aquest plugin de forma permanent, assegura't de treure qualsevol configuració d'aquest plugin a l'arxiu config.json abans de reiniciar Homebridge.", "plugins.manage.message_uninstall_remove_confirmation": "Estàs segur que vols desinstal·lar {{ pluginName }}?", @@ -286,7 +286,7 @@ "status.cpu.title_cpu": "CPU", "status.homebridge.label_checking_for_updates": "Buscant actualitzacions…", "status.homebridge.label_up_to_date": "Actualitzat", - "status.homebridge.label_update_available": "{{latestVersion}} actualització disponible", + "status.homebridge.label_update_available": "v{{latestVersion}} actualització disponible", "status.memory.label_available": "Lliure", "status.memory.label_total": "Total", "status.memory.title_memory": "Memòria", diff --git a/ui/src/i18n/de.json b/ui/src/i18n/de.json index b33aede74..f49c961ab 100644 --- a/ui/src/i18n/de.json +++ b/ui/src/i18n/de.json @@ -77,7 +77,7 @@ "backup.title_scheduled_backups": "Geplante Backups", "child_bridge.label_bridge_connect_to_homekit": "Verbinde zu HomeKit", "child_bridge.label_bridge_paired": "Gekoppelte Bridge", - "child_bridge.label_bridge_restart_child_bridges": "Restart Child Bridges", + "child_bridge.label_bridge_restart_child_bridges": "Unter-Bridges neustarten", "child_bridge.label_bridge_settings": "Bridge Einstellungen", "child_bridge.label_child_bridges": "Unter-Bridges", "child_bridge.message_about": "Homebridge erlaubt es dir, die Plattform oder Geräte deiner Plugins als eine isolierten Unter-Bridge zu betreiben. Das kann die allgemeine Reaktionsfähigkeit und Zuverlässigkeit von Homebridge verbessern.", @@ -180,7 +180,7 @@ "plugins.manage.label_installed": "Installiert", "plugins.manage.label_manual_update_required": "Manuelles Update erforderlich", "plugins.manage.label_online_updates_not_supported_on_windows": "Online-Updates werden unter Windows nicht unterstützt. Du musst Homebridge UI manuell aktualisieren, nachdem du den Homebridge-Dienst beendet hast", - "plugins.manage.label_release_notes": "Release Notes", + "plugins.manage.label_release_notes": "Versionshinweise", "plugins.manage.label_release_notes_beta": "Beta Information", "plugins.manage.label_uninstall": "Deinstallieren", "plugins.manage.label_uninstalled": "Entfernt", @@ -190,8 +190,8 @@ "plugins.manage.message_confirm_enable": "Bist du sicher, dass du {{ pluginName }} aktivieren möchtest?", "plugins.manage.message_install_alternate_version": "Vorherige Version installieren", "plugins.manage.message_select_version_to_install": "Zu installierende Version auswählen", - "plugins.manage.message_thanks_for_updating": "Vielen Dank für die Installation der neuesten Version von {{ pluginName }}.", - "plugins.manage.message_thanks_for_updating_restart": "Please restart Homebridge for the changes to apply. Alternatively, if you have this plugin running in child bridges, you can close this modal and restart these instead.", + "plugins.manage.message_thanks_for_updating": "Vielen Dank für die Installation der {{ targetVersion }} Version von {{ pluginName }}.", + "plugins.manage.message_thanks_for_updating_restart": "Bitte starte Homebridge neu, damit die Änderungen wirksam werden. Wenn du dieses Plugin in Unter-Bridges ausführst, kannst du alternativ diesen Hinweis auch schließen und stattdessen diese neu starten.", "plugins.manage.message_uninstall_remove_config_required": "Stelle sicher, dass wenn du dieses Plugin dauerhaft entfernst, jede Konfiguration für dieses Plugin in der config.json entfernt hast, bevor du Homebridge neu startest.", "plugins.manage.message_uninstall_remove_confirmation": "Bist du sicher, dass du {{ pluginName }} entfernen möchtest?", "plugins.manage.message_uninstall_remove_plugin_config": "Plugin Konfiguration entfernen?", @@ -218,7 +218,7 @@ "plugins.status_installed": "Installiert", "plugins.status_not_installed": "Nicht installiert", "plugins.status_update_available": "Aktualisierung verfügbar", - "plugins.status_update_beta_available": "Beta Update Available", + "plugins.status_update_beta_available": "Beta Update verfügbar", "plugins.toast_failed_to_load_plugins": "Fehler beim Laden der Plugins", "plugins.tooltip_update_plugin_to": "Plugin auf v{{latestVersion}} aktualisieren", "reset.accessories_will_may_need_to_be_reconfigured": "Nachdem diese Aktion durchgeführt wurde, müssen eventuell einige HomeKit-Geräte neu eingerichtet oder neu zur Automation hinzugefühgt werden.",