Skip to content

Commit

Permalink
beta -> latest (#1626)
Browse files Browse the repository at this point in the history
### Other Changes

- **i18n:** Update de.json ([1627](#1627))

### Bug Fixes

- Fix text in post-plugin-update modal which wasn't showing translated strings properly
- Revert HomeKit code formatting change

---------

Co-authored-by: Ben <43026681+bwp91@users.noreply.github.com>
Co-authored-by: Staubgeborener <eric.schroeder@protonmail.com>
  • Loading branch information
3 people committed Nov 4, 2023
1 parent e009cf2 commit 0eaca8f
Show file tree
Hide file tree
Showing 13 changed files with 81 additions and 70 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
77 changes: 39 additions & 38 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,16 +268,28 @@
"ca"
]
},
{
"title": "Chinese - Simplified (zh-CN)",
"enum": [
"zh-CN"
]
},
{
"title": "Chinese - Traditional (zh-TW)",
"enum": [
"zh-TW"
]
},
{
"title": "Czech (cs)",
"enum": [
"cs"
]
},
{
"title": "German (de)",
"title": "Dutch (nl)",
"enum": [
"de"
"nl"
]
},
{
Expand All @@ -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"
]
},
{
Expand Down Expand Up @@ -328,12 +347,6 @@
"ko"
]
},
{
"title": "Dutch (nl)",
"enum": [
"nl"
]
},
{
"title": "Macedonian (mk)",
"enum": [
Expand All @@ -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"
]
},
{
Expand All @@ -376,6 +389,12 @@
"sl"
]
},
{
"title": "Spanish (es)",
"enum": [
"es"
]
},
{
"title": "Swedish (sv)",
"enum": [
Expand All @@ -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"
]
}
]
},
Expand All @@ -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": {
Expand Down Expand Up @@ -700,4 +701,4 @@
]
}
]
}
}
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -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 <dev@oz.nu>",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down
5 changes: 3 additions & 2 deletions src/modules/config-editor/config-editor.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -418,7 +418,8 @@ export class ConfigEditorService {
public generatePin() {
let code: string | Array<any> = 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;
}
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/config-editor.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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 () => {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/server.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/mocks/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [],
Expand Down
2 changes: 1 addition & 1 deletion test/mocks/persist/AccessoryInfo.67E41F0EA05D.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"displayName": "Homebridge Test",
"category": 2,
"pincode": "8749-9441",
"pincode": "874-99-441",
"signSk": "fb7ecc3daa9b495d5867b49268af7568d52c4ab708e334809932976340d7a11f25e05221aa6ad3dbf4d7213e112db08752e6d94820e49038c58bc564b688626f",
"signPk": "25e05221aa6ad3dbf4d7213e112db08752e6d94820e49038c58bc564b688626f",
"pairedClients": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ <h5 class="modal-title">{{ presentTenseVerb }}: {{ pluginName }}</h5>
<h3 class="text-center primary-text" [translate]="'platform.version.title_service_restart_required'">
Restart Required
</h3>
<p class="text-center grey-text" [translate]="'plugins.manage.message_thanks_for_updating'">
Thanks for installing the {{ targetVersion }} version of {{ pluginName }}.
</p>
<p class="text-center grey-text" translate="plugins.manage.message_thanks_for_updating" [translateParams]="{ pluginName: pluginName, targetVersion: targetVersion }"></p>
<p *ngIf="!['homebridge', 'homebridge-config-ui-x'].includes(pluginName)" class="text-center grey-text" [translate]="'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.
</p>
Expand Down
6 changes: 3 additions & 3 deletions ui/src/app/modules/config-editor/config-editor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions ui/src/i18n/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}?",
Expand Down Expand Up @@ -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",
Expand Down
10 changes: 5 additions & 5 deletions ui/src/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -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",
Expand All @@ -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?",
Expand All @@ -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.",
Expand Down

0 comments on commit 0eaca8f

Please sign in to comment.