Localize config flow title (#11358)

This commit is contained in:
Paulus Schoutsen 2022-01-18 14:18:22 -08:00 committed by GitHub
parent 27cae037ce
commit 50bea33a19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,5 +114,8 @@ export const localizeConfigFlowTitle = (
args.push(key);
args.push(placeholders[key]);
});
return localize(`component.${flow.handler}.config.flow_title`, ...args);
return localize(`component.${flow.handler}.config.flow_title`, ...args) ||
"name" in placeholders
? placeholders.name
: domainToName(localize, flow.handler);
};