From 34e06351fbc44f1b0d6ee5b46cf029a6ea190c76 Mon Sep 17 00:00:00 2001 From: Maciej Bieniek Date: Fri, 22 May 2020 14:44:06 +0200 Subject: [PATCH] Add translations for buttons and error string on the auth page (#5933) --- src/auth/ha-auth-flow.ts | 16 ++++++++++++++-- src/translations/en.json | 3 +++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/auth/ha-auth-flow.ts b/src/auth/ha-auth-flow.ts index 05f48449f7..88afcbedae 100644 --- a/src/auth/ha-auth-flow.ts +++ b/src/auth/ha-auth-flow.ts @@ -83,12 +83,24 @@ class HaAuthFlow extends litLocalizeLiteMixin(LitElement) { ${this._renderStep(this._step)}
${this._step.type === "form" ? "Next" : "Start over"}${this._step.type === "form" + ? this.localize("ui.panel.page-authorize.form.next") + : this.localize( + "ui.panel.page-authorize.form.start_over" + )}
`; case "error": - return html`
Error: ${this._errorMessage}
`; + return html` +
+ ${this.localize( + "ui.panel.page-authorize.form.error", + "error", + this._errorMessage + )} +
+ `; case "loading": return html` ${this.localize("ui.panel.page-authorize.form.working")} `; default: diff --git a/src/translations/en.json b/src/translations/en.json index b1414fcdd5..c3791de3ef 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -2045,6 +2045,9 @@ "form": { "working": "Please wait", "unknown_error": "Something went wrong", + "next": "Next", + "start_over": "Start over", + "error": "Error: {error}", "providers": { "command_line": { "step": {