Localize appliance course labels

This commit is contained in:
galaxysj committed 2026-08-06 23:24:16 +09:00
1 parent 71f2101d11
commit d24c94e303
3 files changed
+86 -40

No files matched your search

@@ -281,12 +281,12 @@
"8d": "Hrnce a pánve", "8d": "Hrnce a pánve",
"8e": "Plast", "8e": "Plast",
"8f": "Dětské potřeby", "8f": "Dětské potřeby",
"82": "Auto", "82": "Automatický",
"8a": "Normal", "8a": "Normální",
"a7": "Heavy", "a7": "Intenzivní",
"a8": "Express", "a8": "Expresní",
"8c": "Extra Silence", "8c": "Extra tichý",
"88": "Self Clean" "88": "Samočištění"
} }
}, },
"dispense_type": { "dispense_type": {
@@ -597,29 +597,29 @@
"65": "Barevné prádlo", "65": "Barevné prádlo",
"66": "Džíny", "66": "Džíny",
"69": "AI praní", "69": "AI praní",
"6a": "Wool", "6a": "Vlna",
"6b": "Denim", "6b": "Džíny",
"6c": "Blouses", "6c": "Halenky",
"6d": "Delicates", "6d": "Jemné prádlo",
"6e": "Active Wear", "6e": "Sportovní oblečení",
"6f": "Bedding", "6f": "Ložní prádlo",
"70": "Towels", "70": "Ručníky",
"71": "Quick Wash", "71": "Rychlé praní",
"72": "Shirts", "72": "Košile",
"73": "Sanitize", "73": "Dezinfekce",
"74": "Drum Clean", "74": "Čištění bubnu",
"75": "Outdoor", "75": "Outdoor",
"76": "Baby Care", "76": "Dětské potřeby",
"77": "Cottons", "77": "Bavlna",
"78": "Rinse + Spin", "78": "Máchání + odstřeďování",
"79": "Spin Only", "79": "Pouze odstřeďování",
"7c": "Bílé prádlo", "7c": "Bílé prádlo",
"7d": "Ložní prádlo/nepromokavé", "7d": "Ložní prádlo/nepromokavé",
"7e": "Samočištění", "7e": "Samočištění",
"7f": "Vlna/jemné", "7f": "Vlna/jemné",
"86": "Hloubkové praní", "86": "Hloubkové praní",
"87": "Stažený program", "87": "Stažený program",
"88": "Pet Care", "88": "Péče o domácí mazlíčky",
"8f": "Intenzivní studená", "8f": "Intenzivní studená",
"96": "Méně mikrovláken" "96": "Méně mikrovláken"
} }
@@ -282,11 +282,11 @@
"8e": "Kunststof", "8e": "Kunststof",
"8f": "Babyverzorging", "8f": "Babyverzorging",
"82": "Auto", "82": "Auto",
"8a": "Normal", "8a": "Normaal",
"a7": "Heavy", "a7": "Intensief",
"a8": "Express", "a8": "Express",
"8c": "Extra Silence", "8c": "Extra stil",
"88": "Self Clean" "88": "Zelfreiniging"
} }
}, },
"dispense_type": { "dispense_type": {
@@ -597,22 +597,22 @@
"65": "Bonte was", "65": "Bonte was",
"66": "Spijkergoed", "66": "Spijkergoed",
"69": "AI Wash", "69": "AI Wash",
"6a": "Wool", "6a": "Wol",
"6b": "Denim", "6b": "Spijkergoed",
"6c": "Blouses", "6c": "Blouses",
"6d": "Delicates", "6d": "Fijne was",
"6e": "Active Wear", "6e": "Sportkleding",
"6f": "Bedding", "6f": "Beddengoed",
"70": "Towels", "70": "Handdoeken",
"71": "Quick Wash", "71": "Snelle was",
"72": "Shirts", "72": "Overhemden",
"73": "Sanitize", "73": "Hygiëne",
"74": "Drum Clean", "74": "Trommel reinigen",
"75": "Outdoor", "75": "Outdoor",
"76": "Baby Care", "76": "Babyverzorging",
"77": "Cottons", "77": "Katoen",
"78": "Rinse + Spin", "78": "Spoelen + centrifugeren",
"79": "Spin Only", "79": "Alleen centrifugeren",
"7c": "Witte was", "7c": "Witte was",
"7d": "Beddengoed/waterdicht", "7d": "Beddengoed/waterdicht",
"7e": "Self Clean", "7e": "Self Clean",
+46
View File
@@ -166,6 +166,52 @@ def test_confirmed_dishwasher_course_names():
} }
def test_confirmed_course_names_are_localized():
washer_codes = (
'69', '6a', '6b', '6c', '6d', '6e', '6f', '70', '71',
'72', '73', '74', '75', '76', '77', '78', '79', '88',
)
dishwasher_codes = ('82', '8a', 'a7', 'a8', '8c', '88')
expected = {
'cs': {
'washer': (
'AI praní', 'Vlna', 'Džíny', 'Halenky', 'Jemné prádlo',
'Sportovní oblečení', 'Ložní prádlo', 'Ručníky',
'Rychlé praní', 'Košile', 'Dezinfekce', 'Čištění bubnu',
'Outdoor', 'Dětské potřeby', 'Bavlna',
'Máchání + odstřeďování', 'Pouze odstřeďování',
'Péče o domácí mazlíčky',
),
'dishwasher': (
'Automatický', 'Normální', 'Intenzivní', 'Expresní',
'Extra tichý', 'Samočištění',
),
},
'nl': {
'washer': (
'AI Wash', 'Wol', 'Spijkergoed', 'Blouses', 'Fijne was',
'Sportkleding', 'Beddengoed', 'Handdoeken', 'Snelle was',
'Overhemden', 'Hygiëne', 'Trommel reinigen', 'Outdoor',
'Babyverzorging', 'Katoen', 'Spoelen + centrifugeren',
'Alleen centrifugeren', 'Pet Care',
),
'dishwasher': (
'Auto', 'Normaal', 'Intensief', 'Express', 'Extra stil',
'Zelfreiniging',
),
},
}
for language, translations in expected.items():
catalog = _load(language)['entity']['select']
washer = catalog['washer_cycle_table_02']['state']
dishwasher = catalog['dishwasher_cycle']['state']
assert tuple(washer[code] for code in washer_codes) == translations['washer']
assert tuple(dishwasher[code] for code in dishwasher_codes) == (
translations['dishwasher']
)
# The hood fan is its device's primary feature: fan.py sets _attr_name = None # The hood fan is its device's primary feature: fan.py sets _attr_name = None
# so it presents as the device itself, and never reads a catalog name. Same # so it presents as the device itself, and never reads a catalog name. Same
# for the ARTIK051 air-purifier's airflow_fan (issue #56) -- ordered speed # for the ARTIK051 air-purifier's airflow_fan (issue #56) -- ordered speed