diff --git a/custom_components/localthings/translations/cs.json b/custom_components/localthings/translations/cs.json index fe1a0d3..1c6985c 100644 --- a/custom_components/localthings/translations/cs.json +++ b/custom_components/localthings/translations/cs.json @@ -281,12 +281,12 @@ "8d": "Hrnce a pánve", "8e": "Plast", "8f": "Dětské potřeby", - "82": "Auto", - "8a": "Normal", - "a7": "Heavy", - "a8": "Express", - "8c": "Extra Silence", - "88": "Self Clean" + "82": "Automatický", + "8a": "Normální", + "a7": "Intenzivní", + "a8": "Expresní", + "8c": "Extra tichý", + "88": "Samočištění" } }, "dispense_type": { @@ -597,29 +597,29 @@ "65": "Barevné prádlo", "66": "Džíny", "69": "AI praní", - "6a": "Wool", - "6b": "Denim", - "6c": "Blouses", - "6d": "Delicates", - "6e": "Active Wear", - "6f": "Bedding", - "70": "Towels", - "71": "Quick Wash", - "72": "Shirts", - "73": "Sanitize", - "74": "Drum Clean", + "6a": "Vlna", + "6b": "Džíny", + "6c": "Halenky", + "6d": "Jemné prádlo", + "6e": "Sportovní oblečení", + "6f": "Ložní prádlo", + "70": "Ručníky", + "71": "Rychlé praní", + "72": "Košile", + "73": "Dezinfekce", + "74": "Čištění bubnu", "75": "Outdoor", - "76": "Baby Care", - "77": "Cottons", - "78": "Rinse + Spin", - "79": "Spin Only", + "76": "Dětské potřeby", + "77": "Bavlna", + "78": "Máchání + odstřeďování", + "79": "Pouze odstřeďování", "7c": "Bílé prádlo", "7d": "Ložní prádlo/nepromokavé", "7e": "Samočištění", "7f": "Vlna/jemné", "86": "Hloubkové praní", "87": "Stažený program", - "88": "Pet Care", + "88": "Péče o domácí mazlíčky", "8f": "Intenzivní studená", "96": "Méně mikrovláken" } diff --git a/custom_components/localthings/translations/nl.json b/custom_components/localthings/translations/nl.json index 624059d..8dc0a2f 100644 --- a/custom_components/localthings/translations/nl.json +++ b/custom_components/localthings/translations/nl.json @@ -282,11 +282,11 @@ "8e": "Kunststof", "8f": "Babyverzorging", "82": "Auto", - "8a": "Normal", - "a7": "Heavy", + "8a": "Normaal", + "a7": "Intensief", "a8": "Express", - "8c": "Extra Silence", - "88": "Self Clean" + "8c": "Extra stil", + "88": "Zelfreiniging" } }, "dispense_type": { @@ -597,22 +597,22 @@ "65": "Bonte was", "66": "Spijkergoed", "69": "AI Wash", - "6a": "Wool", - "6b": "Denim", + "6a": "Wol", + "6b": "Spijkergoed", "6c": "Blouses", - "6d": "Delicates", - "6e": "Active Wear", - "6f": "Bedding", - "70": "Towels", - "71": "Quick Wash", - "72": "Shirts", - "73": "Sanitize", - "74": "Drum Clean", + "6d": "Fijne was", + "6e": "Sportkleding", + "6f": "Beddengoed", + "70": "Handdoeken", + "71": "Snelle was", + "72": "Overhemden", + "73": "Hygiëne", + "74": "Trommel reinigen", "75": "Outdoor", - "76": "Baby Care", - "77": "Cottons", - "78": "Rinse + Spin", - "79": "Spin Only", + "76": "Babyverzorging", + "77": "Katoen", + "78": "Spoelen + centrifugeren", + "79": "Alleen centrifugeren", "7c": "Witte was", "7d": "Beddengoed/waterdicht", "7e": "Self Clean", diff --git a/tests/test_translations.py b/tests/test_translations.py index 772546e..c4bad81 100644 --- a/tests/test_translations.py +++ b/tests/test_translations.py @@ -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 # 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