Commit Graph

5 Commits (702488062b1aa773cd2101d0f6bac48489a30f0d)

Author SHA1 Message Date
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
Erik Montnemery 56a58f9285
Improve tests of inheriting entity descriptions (#106647) 2023-12-29 13:22:52 +01:00
Erik Montnemery 22c3847c0e
Allow inheriting `FrozenOrThawed` with custom init (#105624) 2023-12-13 10:13:34 +01:00
Erik Montnemery 5bd0833f49
Improve FrozenOrThawed (#105541) 2023-12-12 21:19:41 +01:00
Erik Montnemery dd338799d4
Make it possible to inherit EntityDescription in frozen and mutable dataclasses (#105211) 2023-12-11 20:00:55 +01:00