Move title translation to root (#33850)
This commit is contained in:
parent
1ac8442c63
commit
d36204a968
135 changed files with 174 additions and 183 deletions
|
@ -113,8 +113,8 @@ def _custom_tasks(template, info) -> None:
|
|||
elif template == "config_flow":
|
||||
info.update_manifest(config_flow=True)
|
||||
info.update_strings(
|
||||
title=info.name,
|
||||
config={
|
||||
"title": info.name,
|
||||
"step": {
|
||||
"user": {"title": "Connect to the device", "data": {"host": "Host"}}
|
||||
},
|
||||
|
@ -124,14 +124,14 @@ def _custom_tasks(template, info) -> None:
|
|||
"unknown": "Unexpected error",
|
||||
},
|
||||
"abort": {"already_configured": "Device is already configured"},
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
elif template == "config_flow_discovery":
|
||||
info.update_manifest(config_flow=True)
|
||||
info.update_strings(
|
||||
title=info.name,
|
||||
config={
|
||||
"title": info.name,
|
||||
"step": {
|
||||
"confirm": {
|
||||
"title": info.name,
|
||||
|
@ -142,14 +142,14 @@ def _custom_tasks(template, info) -> None:
|
|||
"single_instance_allowed": f"Only a single configuration of {info.name} is possible.",
|
||||
"no_devices_found": f"No {info.name} devices found on the network.",
|
||||
},
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
elif template == "config_flow_oauth2":
|
||||
info.update_manifest(config_flow=True)
|
||||
info.update_strings(
|
||||
title=info.name,
|
||||
config={
|
||||
"title": info.name,
|
||||
"step": {
|
||||
"pick_implementation": {"title": "Pick Authentication Method"}
|
||||
},
|
||||
|
@ -159,7 +159,7 @@ def _custom_tasks(template, info) -> None:
|
|||
"create_entry": {
|
||||
"default": f"Successfully authenticated with {info.name}."
|
||||
},
|
||||
}
|
||||
},
|
||||
)
|
||||
_append(
|
||||
info.integration_dir / "const.py",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue