1
mirror of https://github.com/home-assistant/core synced 2024-09-25 00:41:32 +02:00
ha-core/tests/testing_config/custom_components/test/translations/de.json
Michael eb01998395
Add support for placeholders in entity name translations (#104453)
* add placeholder support to entity name translation

* add negativ tests

* make property also available via description

* fix doc string in translation_placeholders()

* fix detection of placeholder

* validate placeholders for localized strings

* add test

* Cache translation_placeholders property

* Make translation_placeholders uncondotionally return dict

* Fall back to unsubstituted name in case of mismatch

* Only replace failing translations with English

* Update snapshots

* Blow up on non stable releases

* Fix test

* Update entity.py

---------

Co-authored-by: Erik <erik@montnemery.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-01-03 17:34:47 +01:00

11 lines
224 B
JSON

{
"entity": {
"switch": {
"other1": { "name": "Anderes 1" },
"other2": { "name": "Anderes 2 {placeholder}" },
"other3": { "name": "" },
"outlet": { "name": "Steckdose {something}" }
}
}
}