You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/internationalization/core.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,7 +151,7 @@ The translation strings for repairs issues are defined under the `issues` key. A
151
151
152
152
#### State of entities
153
153
154
-
Integrations can provide translations for states of its entities under other integrations like sensor if the base entity component does not provide translations, or if the translation provided by the base entity component do not match the integration's entity. To do this, provide an `entity`dictionary, that contains translations for states and set the entity's `translation_key` property to a key under a domain in the `entity`dictionary.
154
+
Integrations can provide translations for states of its entities under other integrations like sensor if the base entity component does not provide translations, or if the translation provided by the base entity component do not match the integration's entity. To do this, provide an `entity`object, that contains translations for states and set the entity's `translation_key` property to a key under a domain in the `entity`object.
155
155
156
156
To differentiate entities and their translations, provide different translation keys. The following example `strings.json` is for a Moon domain `sensor` entity with its `translation_key` property set to `phase`:
157
157
@@ -174,7 +174,7 @@ To differentiate entities and their translations, provide different translation
174
174
175
175
#### State of entity components
176
176
177
-
If your integration provides entities under its domain, you will want to translate the states. You do this by offering a `state`dictionary, that contains translations for states with different device classes. The key `_` is used for entities without a device class.
177
+
If your integration provides entities under its domain, you will want to translate the states. You do this by offering a `state`object, that contains translations for states with different device classes. The key `_` is used for entities without a device class.
178
178
179
179
```json
180
180
{
@@ -201,7 +201,7 @@ If your integration provides entities under its domain, you will want to transla
201
201
Translation of entity state attributes also requires frontend support, which is currently only available for `climate` entities.
202
202
:::
203
203
204
-
Integrations can provide translations for its entities' state attributes under other integrations like sensor if the base entity component does not provide translations, or if the translation provided by the base entity component do not match the integration's entity. To do this, provide an `entity`dictionary, that contains translations for entity state attributes and set the entity's `translation_key` property to a key under a domain in the `entity`dictionary.
204
+
Integrations can provide translations for its entities' state attributes under other integrations like sensor if the base entity component does not provide translations, or if the translation provided by the base entity component do not match the integration's entity. To do this, provide an `entity`object, that contains translations for entity state attributes and set the entity's `translation_key` property to a key under a domain in the `entity`object.
205
205
206
206
To differentiate entities and their translations, provide different translation keys. The following example `strings.json` is for a `demo` domain `climate` entity with its `translation_key` property set to `ubercool`, which has custom `fan_mode` and `swing_mode` settings:
207
207
@@ -242,7 +242,7 @@ To differentiate entities and their translations, provide different translation
242
242
Translation of entity attribute names and states also requires frontend support, which is currently only available for `climate` entities.
243
243
:::
244
244
245
-
If your integration provides entities under its domain, you will want to translate the name of entity attributes and also entity state attributes. You do this by offering a `state_attributes`dictionary, that contains translations for entity attributes with different device classes. The key `_` is used for entities without a device class.
245
+
If your integration provides entities under its domain, you will want to translate the name of entity attributes and also entity state attributes. You do this by offering a `state_attributes`object, that contains translations for entity attributes with different device classes. The key `_` is used for entities without a device class.
0 commit comments