Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions homeassistant/components/zha/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]"
}
},
"config_panel": {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that this makes sense as long as the actual panel code lives in the frontend. Or are these strings passed to the frontend from the backend?

CC @bramkragten

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They use ha-form and get the actual data/fields from the backend, so I think it makes sense to have the translations on the backend.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@balloob are we good with this now?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

"zha_options": {
"title": "Global Options",
"enable_identify_on_join": "Enable identify effect when devices join the network",
"default_light_transition": "Default light transition time (seconds)"
},
"zha_alarm_options": {
"title": "Alarm Control Panel Options",
"alarm_master_code": "Master code for the alarm control panel(s)",
"alarm_failed_tries": "The number of consecutive failed code entries to trigger an alarm",
"alarm_arm_requires_code": "Code required for arming actions"
}
},
"device_automation": {
"action_type": { "squawk": "Squawk", "warn": "Warn" },
"trigger_type": {
Expand Down
13 changes: 13 additions & 0 deletions homeassistant/components/zha/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@
}
}
},
"config_panel": {
"zha_alarm_options": {
"alarm_arm_requires_code": "Code required for arming actions",
"alarm_failed_tries": "The number of consecutive failed code entries to trigger an alarm",
"alarm_master_code": "Master code for the alarm control panel(s)",
"title": "Alarm Control Panel Options"
},
"zha_options": {
"default_light_transition": "Default light transition time (seconds)",
"enable_identify_on_join": "Enable identify effect when devices join the network",
"title": "Global Options"
}
},
"device_automation": {
"action_type": {
"squawk": "Squawk",
Expand Down
6 changes: 6 additions & 0 deletions script/hassfest/translations.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ def gen_strings_schema(config: Config, integration: Integration):
vol.Optional("system_health"): {
vol.Optional("info"): {str: cv.string_with_no_html}
},
vol.Optional("config_panel"): cv.schema_with_slug_keys(
cv.schema_with_slug_keys(
cv.string_with_no_html, slug_validator=lowercase_validator
),
slug_validator=vol.Any("_", cv.slug),
),
}
)

Expand Down