Allow translating select selector options (#85531)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
096ef5da47
commit
25392655e7
6 changed files with 48 additions and 0 deletions
|
@ -419,6 +419,25 @@ def test_text_selector_schema(schema, valid_selections, invalid_selections):
|
|||
("red", "green"),
|
||||
("cat", 0, None, ["red"]),
|
||||
),
|
||||
(
|
||||
{
|
||||
"options": ["red", "green", "blue"],
|
||||
"translation_key": "color",
|
||||
},
|
||||
("red", "green", "blue"),
|
||||
("cat", 0, None, ["red"]),
|
||||
),
|
||||
(
|
||||
{
|
||||
"options": [
|
||||
{"value": "red", "label": "Ruby Red"},
|
||||
{"value": "green", "label": "Emerald Green"},
|
||||
],
|
||||
"translation_key": "color",
|
||||
},
|
||||
("red", "green"),
|
||||
("cat", 0, None, ["red"]),
|
||||
),
|
||||
(
|
||||
{"options": ["red", "green", "blue"], "multiple": True},
|
||||
(["red"], ["green", "blue"], []),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue