Skip to content

Commit

Permalink
Move extra_fields translations to backend
Browse files Browse the repository at this point in the history
  • Loading branch information
farmio committed Apr 22, 2024
1 parent e1c32c7 commit c20bd32
Show file tree
Hide file tree
Showing 16 changed files with 74 additions and 0 deletions.
4 changes: 4 additions & 0 deletions homeassistant/components/alarm_control_panel/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
"is_armed_night": "{entity_name} is armed night",
"is_armed_vacation": "{entity_name} is armed vacation"
},
"extra_fields": {
"code": "Code",
"for": "[%key:common::device_automation::extra_fields::for%]"
},
"trigger_type": {
"triggered": "{entity_name} triggered",
"disarmed": "{entity_name} disarmed",
Expand Down
3 changes: 3 additions & 0 deletions homeassistant/components/binary_sensor/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
"is_on": "[%key:common::device_automation::condition_type::is_on%]",
"is_off": "[%key:common::device_automation::condition_type::is_off%]"
},
"extra_fields": {
"for": "[%key:common::device_automation::extra_fields::for%]"
},
"trigger_type": {
"bat_low": "{entity_name} battery low",
"not_bat_low": "{entity_name} battery normal",
Expand Down
8 changes: 8 additions & 0 deletions homeassistant/components/climate/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
"action_type": {
"set_hvac_mode": "Change HVAC mode on {entity_name}",
"set_preset_mode": "Change preset on {entity_name}"
},
"extra_fields": {
"above": "[%key:common::device_automation::extra_fields::above%]",
"below": "[%key:common::device_automation::extra_fields::below%]",
"for": "[%key:common::device_automation::extra_fields::for%]",
"to": "[%key:common::device_automation::extra_fields::to%]",
"preset_mode": "Preset mode",
"hvac_mode": "HVAC mode"
}
},
"entity_component": {
Expand Down
6 changes: 6 additions & 0 deletions homeassistant/components/cover/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
"is_position": "Current {entity_name} position is",
"is_tilt_position": "Current {entity_name} tilt position is"
},
"extra_fields": {
"above": "[%key:common::device_automation::extra_fields::above%]",
"below": "[%key:common::device_automation::extra_fields::below%]",
"for": "[%key:common::device_automation::extra_fields::for%]",
"position": "Position"
},
"trigger_type": {
"opened": "{entity_name} opened",
"closed": "{entity_name} closed",
Expand Down
3 changes: 3 additions & 0 deletions homeassistant/components/device_tracker/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"is_home": "{entity_name} is home",
"is_not_home": "{entity_name} is not home"
},
"extra_fields": {
"zone": "[%key:common::device_automation::extra_fields::zone%]"
},
"trigger_type": {
"enters": "{entity_name} enters a zone",
"leaves": "{entity_name} leaves a zone"
Expand Down
7 changes: 7 additions & 0 deletions homeassistant/components/humidifier/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
"toggle": "[%key:common::device_automation::action_type::toggle%]",
"turn_on": "[%key:common::device_automation::action_type::turn_on%]",
"turn_off": "[%key:common::device_automation::action_type::turn_off%]"
},
"extra_fields": {
"above": "[%key:common::device_automation::extra_fields::above%]",
"below": "[%key:common::device_automation::extra_fields::below%]",
"for": "[%key:common::device_automation::extra_fields::for%]",
"mode": "Mode",
"humidity": "Humidity"
}
},
"entity_component": {
Expand Down
4 changes: 4 additions & 0 deletions homeassistant/components/light/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
"changed_states": "[%key:common::device_automation::trigger_type::changed_states%]",
"turned_on": "[%key:common::device_automation::trigger_type::turned_on%]",
"turned_off": "[%key:common::device_automation::trigger_type::turned_off%]"
},
"extra_fields": {
"brightness_pct": "Brightness",
"flash": "Flash"
}
},
"entity_component": {
Expand Down
3 changes: 3 additions & 0 deletions homeassistant/components/lock/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"trigger_type": {
"locked": "{entity_name} locked",
"unlocked": "{entity_name} unlocked"
},
"extra_fields": {
"for": "[%key:common::device_automation::extra_fields::for%]"
}
},
"entity_component": {
Expand Down
3 changes: 3 additions & 0 deletions homeassistant/components/media_player/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
"paused": "{entity_name} is paused",
"playing": "{entity_name} starts playing",
"changed_states": "[%key:common::device_automation::trigger_type::changed_states%]"
},
"extra_fields": {
"for": "[%key:common::device_automation::extra_fields::for%]"
}
},
"entity_component": {
Expand Down
4 changes: 4 additions & 0 deletions homeassistant/components/mobile_app/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
"device_automation": {
"action_type": {
"notify": "Send a notification"
},
"extra_fields": {
"message": "Message",
"title": "Title"
}
}
}
3 changes: 3 additions & 0 deletions homeassistant/components/number/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"device_automation": {
"action_type": {
"set_value": "Set value for {entity_name}"
},
"extra_fields": {
"value": "[%key:common::device_automation::extra_fields::value%]"
}
},
"entity_component": {
Expand Down
7 changes: 7 additions & 0 deletions homeassistant/components/select/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
},
"condition_type": {
"selected_option": "Current {entity_name} selected option"
},
"extra_fields": {
"for": "[%key:common::device_automation::extra_fields::for%]",
"to": "[%key:common::device_automation::extra_fields::to%]",
"cycle": "Cycle",
"from": "From",
"option": "Option"
}
},
"entity_component": {
Expand Down
5 changes: 5 additions & 0 deletions homeassistant/components/sensor/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@
"water": "{entity_name} water changes",
"weight": "{entity_name} weight changes",
"wind_speed": "{entity_name} wind speed changes"
},
"extra_fields": {
"above": "[%key:common::device_automation::extra_fields::above%]",
"below": "[%key:common::device_automation::extra_fields::below%]",
"for": "[%key:common::device_automation::extra_fields::for%]"
}
},
"entity_component": {
Expand Down
3 changes: 3 additions & 0 deletions homeassistant/components/text/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"device_automation": {
"action_type": {
"set_value": "Set value for {entity_name}"
},
"extra_fields": {
"value": "[%key:common::device_automation::extra_fields::value%]"
}
},
"entity_component": {
Expand Down
3 changes: 3 additions & 0 deletions homeassistant/components/vacuum/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"action_type": {
"clean": "Let {entity_name} clean",
"dock": "Let {entity_name} return to the dock"
},
"extra_fields": {
"for": "[%key:common::device_automation::extra_fields::for%]"
}
},
"entity_component": {
Expand Down
8 changes: 8 additions & 0 deletions homeassistant/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
"is_on": "{entity_name} is on",
"is_off": "{entity_name} is off"
},
"extra_fields": {
"above": "Above",
"below": "Below",
"for": "Duration",
"to": "To",
"value": "Value",
"zone": "Zone"
},
"trigger_type": {
"changed_states": "{entity_name} turned on or off",
"turned_on": "{entity_name} turned on",
Expand Down

0 comments on commit c20bd32

Please sign in to comment.