1
mirror of https://github.com/home-assistant/frontend synced 2024-09-25 09:39:00 +02:00

Clean up auth flow translation placeholders (#18502)

This commit is contained in:
Bram Kragten 2023-11-02 21:02:42 +01:00 committed by GitHub
parent 784f753f07
commit a60bb3ae0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -302,13 +302,7 @@ export class HaAuthFlow extends LitElement {
private _computeStepDescription(step: DataEntryFlowStepForm) {
const resourceKey =
`ui.panel.page-authorize.form.providers.${step.handler[0]}.step.${step.step_id}.description` as const;
const args: string[] = [];
const placeholders = step.description_placeholders || {};
Object.keys(placeholders).forEach((key) => {
args.push(key);
args.push(placeholders[key]);
});
return this.localize(resourceKey, ...args);
return this.localize(resourceKey, step.description_placeholders);
}
private _computeLabelCallback(step: DataEntryFlowStepForm) {