Ask specific translations (#5560)

This commit is contained in:
Paulus Schoutsen
2020-04-18 17:14:25 -07:00
committed by GitHub
parent f91b46e88c
commit d45a674652
23 changed files with 397 additions and 523 deletions

View File

@@ -25,8 +25,20 @@ export const showOptionsFlowDialog = (
},
{
loadDevicesAndAreas: false,
createFlow: createOptionsFlow,
fetchFlow: fetchOptionsFlow,
createFlow: async (hass, handler) => {
const [step] = await Promise.all([
createOptionsFlow(hass, handler),
hass.loadBackendTranslation("options", configEntry.domain),
]);
return step;
},
fetchFlow: async (hass, flowId) => {
const [step] = await Promise.all([
fetchOptionsFlow(hass, flowId),
hass.loadBackendTranslation("options", configEntry.domain),
]);
return step;
},
handleFlowStep: handleOptionsFlowStep,
deleteFlow: deleteOptionsFlow,