Skip to content

Commit c560ad7

Browse files
authored
Correct JSON terminology in core translations docs (#1712)
1 parent 84c607f commit c560ad7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/internationalization/core.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ The translation strings for repairs issues are defined under the `issues` key. A
151151

152152
#### State of entities
153153

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.
155155

156156
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`:
157157

@@ -174,7 +174,7 @@ To differentiate entities and their translations, provide different translation
174174

175175
#### State of entity components
176176

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.
178178

179179
```json
180180
{
@@ -201,7 +201,7 @@ If your integration provides entities under its domain, you will want to transla
201201
Translation of entity state attributes also requires frontend support, which is currently only available for `climate` entities.
202202
:::
203203

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.
205205

206206
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:
207207

@@ -242,7 +242,7 @@ To differentiate entities and their translations, provide different translation
242242
Translation of entity attribute names and states also requires frontend support, which is currently only available for `climate` entities.
243243
:::
244244

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.
246246

247247
```json
248248
{

0 commit comments

Comments
 (0)