mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46:42 +00:00
Clean up auth flow translation placeholders (#18502)
This commit is contained in:
parent
784f753f07
commit
a60bb3ae0a
@ -302,13 +302,7 @@ export class HaAuthFlow extends LitElement {
|
|||||||
private _computeStepDescription(step: DataEntryFlowStepForm) {
|
private _computeStepDescription(step: DataEntryFlowStepForm) {
|
||||||
const resourceKey =
|
const resourceKey =
|
||||||
`ui.panel.page-authorize.form.providers.${step.handler[0]}.step.${step.step_id}.description` as const;
|
`ui.panel.page-authorize.form.providers.${step.handler[0]}.step.${step.step_id}.description` as const;
|
||||||
const args: string[] = [];
|
return this.localize(resourceKey, step.description_placeholders);
|
||||||
const placeholders = step.description_placeholders || {};
|
|
||||||
Object.keys(placeholders).forEach((key) => {
|
|
||||||
args.push(key);
|
|
||||||
args.push(placeholders[key]);
|
|
||||||
});
|
|
||||||
return this.localize(resourceKey, ...args);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private _computeLabelCallback(step: DataEntryFlowStepForm) {
|
private _computeLabelCallback(step: DataEntryFlowStepForm) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user