From 443634ecf01ce52d818bcfb1dd3ef13b3dd49820 Mon Sep 17 00:00:00 2001 From: Maciej Bieniek Date: Tue, 2 Jun 2020 17:25:30 +0200 Subject: [PATCH] Add missing translations in the users panel (#6082) * Add missing translations in the users panel * Suggested change Co-authored-by: Bram Kragten * Suggested change Co-authored-by: Bram Kragten * Suggested change Co-authored-by: Bram Kragten * Move error_required to ui.common Co-authored-by: Bram Kragten --- src/panels/config/users/dialog-add-user.ts | 13 ++++++------- src/panels/config/users/dialog-user-detail.ts | 7 +++---- src/translations/en.json | 4 +++- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/panels/config/users/dialog-add-user.ts b/src/panels/config/users/dialog-add-user.ts index 66833d4d90..568f0e6d35 100644 --- a/src/panels/config/users/dialog-add-user.ts +++ b/src/panels/config/users/dialog-add-user.ts @@ -85,7 +85,7 @@ export class DialogAddUser extends LitElement { required auto-validate autocapitalize="on" - error-message="Required" + .errorMessage=${this.hass.localize("ui.common.error_required")} @value-changed=${this._nameChanged} @blur=${this._maybePopulateUsername} > @@ -99,7 +99,7 @@ export class DialogAddUser extends LitElement { auto-validate autocapitalize="none" @value-changed=${this._usernameChanged} - error-message="Required" + .errorMessage=${this.hass.localize("ui.common.error_required")} > ${this.hass.localize("ui.panel.config.users.editor.admin")} @@ -118,10 +118,9 @@ export class DialogAddUser extends LitElement { ${!this._isAdmin ? html`
- The users group is a work in progress. The user will be unable - to administer the instance via the UI. We're still auditing all - management API endpoints to ensure that they correctly limit - access to administrators. + ${this.hass.localize( + "ui.panel.config.users.users_privileges_note" + )} ` : ""} diff --git a/src/panels/config/users/dialog-user-detail.ts b/src/panels/config/users/dialog-user-detail.ts index b0cb73f6a4..929fcdae6e 100644 --- a/src/panels/config/users/dialog-user-detail.ts +++ b/src/panels/config/users/dialog-user-detail.ts @@ -109,10 +109,9 @@ class DialogUserDetail extends LitElement { ${!this._isAdmin ? html`
- The users group is a work in progress. The user will be unable - to administer the instance via the UI. We're still auditing - all management API endpoints to ensure that they correctly - limit access to administrators. + ${this.hass.localize( + "ui.panel.config.users.users_privileges_note" + )} ` : ""} diff --git a/src/translations/en.json b/src/translations/en.json index 66b9e0441e..4c03a54ded 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -245,7 +245,8 @@ "no": "No", "successfully_saved": "Successfully saved", "successfully_deleted": "Successfully deleted", - "back": "Back" + "back": "Back", + "error_required": "Required" }, "components": { "entity": { @@ -1430,6 +1431,7 @@ "users": { "caption": "Users", "description": "Manage users", + "users_privileges_note": "The users group is a work in progress. The user will be unable to administer the instance via the UI. We're still auditing all management API endpoints to ensure that they correctly limit access to administrators.", "picker": { "headers": { "name": "Name", "group": "Group", "system": "System" } },