Procházet zdrojové kódy

Wouej EV charger: add translations for currency select

Issue #1708
Jason Rumney před 1 rokem
rodič
revize
f77dbb543e

+ 6 - 11
custom_components/tuya_local/devices/wouej_evcharger.yaml

@@ -213,7 +213,7 @@ entities:
         mapping:
           - scale: 10
   - entity: select
-    name: Currency
+    translation_key: currency
     category: config
     dps:
       - id: 116
@@ -221,20 +221,15 @@ entities:
         name: option
         mapping:
           - dps_val: USD
-            value: USD
-            icon: "mdi:currency-usd"
+            value: usd
           - dps_val: CAD
-            value: CAD
-            icon: "mdi:currency-usd"
+            value: cad
           - dps_val: EUR
-            value: EUR
-            icon: "mdi:currency-eur"
+            value: eur
           - dps_val: GBP
-            value: GBP
-            icon: "mdi:currency-gbp"
+            value: gbp
           - dps_val: CNY
-            value: CNY
-            icon: "mdi:currency-cny"
+            value: cny
   - entity: number
     name: Unit cost
     category: config

+ 10 - 0
custom_components/tuya_local/icons.json

@@ -142,6 +142,16 @@
             }
         },
         "select": {
+            "currency": {
+                "default": "mdi:cash",
+                "state": {
+                    "usd": "mdi:currency-usd",
+                    "eur": "mdi:currency-eur",
+                    "cny": "mdi:currency-cny",
+                    "cad": "mdi:currency-usd",
+                    "gbp": "mdi:currency-gbp"
+                }
+            },
             "initial_state": {
                 "default": "mdi:toggle-switch"
             },

+ 10 - 0
custom_components/tuya_local/translations/bg.json

@@ -395,6 +395,16 @@
             }
         },
         "select": {
+            "currency": {
+                "name": "Валута",
+                "state": {
+                    "usd": "USD",
+                    "eur": "EUR",
+                    "cny": "CNY",
+                    "cad": "CAD",
+                    "gbp": "GBP"
+                }
+            },
             "initial_state": {
                 "name": "Начално състояние",
                 "state": {

+ 10 - 0
custom_components/tuya_local/translations/cz.json

@@ -395,6 +395,16 @@
             }
         },
         "select": {
+            "currency": {
+                "name": "Měna",
+                "state": {
+                    "usd": "USD",
+                    "eur": "EUR",
+                    "cny": "CNY",
+                    "cad": "CAD",
+                    "gbp": "GBP"
+                }
+            },
             "initial_state": {
                 "name": "Počáteční stav",
                 "state": {

+ 10 - 0
custom_components/tuya_local/translations/de.json

@@ -394,6 +394,16 @@
             }
         },
         "select": {
+            "currency": {
+                "name": "Währung",
+                "state": {
+                    "usd": "USD",
+                    "eur": "EUR",
+                    "cny": "CNY",
+                    "cad": "CAD",
+                    "gbp": "GBP"
+                }
+            },
             "initial_state": {
                 "name": "Startzustand",
                 "state": {

+ 10 - 0
custom_components/tuya_local/translations/el.json

@@ -395,6 +395,16 @@
             }
         },
         "select": {
+            "currency": {
+                "name": "Νόμισμα",
+                "state": {
+                    "usd": "Δολάριο ΗΠΑ",
+                    "eur": "Ευρώ",
+                    "cny": "Γουάν",
+                    "cad": "Δολάριο Καναδά",
+                    "gbp": "Λίρα Στερλίνα"
+                }
+            },
             "initial_state": {
                 "name": "Αρχική κατάσταση",
                 "state": {

+ 10 - 0
custom_components/tuya_local/translations/en.json

@@ -395,6 +395,16 @@
             }
         },
         "select": {
+            "currency": {
+                "name": "Currency",
+                "state": {
+                    "usd": "USD",
+                    "eur": "EUR",
+                    "cny": "CNY",
+                    "cad": "CAD",
+                    "gbp": "GBP"
+                }
+            },
             "initial_state": {
                 "name": "Initial state",
                 "state": {

+ 10 - 0
custom_components/tuya_local/translations/es.json

@@ -395,6 +395,16 @@
             }
         },
         "select": {
+            "currency": {
+                "name": "Moneda",
+                "state": {
+                    "usd": "USD",
+                    "eur": "EUR",
+                    "cny": "CNY",
+                    "cad": "CAD",
+                    "gbp": "GBP"
+                }
+            },
             "initial_state": {
                 "name": "Estado inicial",
                 "state": {

+ 10 - 0
custom_components/tuya_local/translations/fr.json

@@ -395,6 +395,16 @@
             }
         },
         "select": {
+            "currency": {
+                "name": "Devise",
+                "state": {
+                    "usd": "USD",
+                    "eur": "EUR",
+                    "cny": "CNY",
+                    "cad": "CAD",
+                    "gbp": "GBP"
+                }
+            },
             "initial_state": {
                 "name": "État initial",
                 "state": {

+ 10 - 0
custom_components/tuya_local/translations/hu.json

@@ -396,6 +396,16 @@
             }
         },
         "select": {
+            "currency": {
+                "name": "Pénznem",
+                "state": {
+                    "usd": "USD",
+                    "eur": "EUR",
+                    "cny": "CNY",
+                    "cad": "CAD",
+                    "gbp": "GBP"
+                }
+            },
             "initial_state": {
                 "name": "Kezdeti állapot",
                 "state": {

+ 10 - 0
custom_components/tuya_local/translations/id.json

@@ -395,6 +395,16 @@
             }
         },
         "select": {
+            "currency": {
+                "name": "Mata uang",
+                "state": {
+                    "usd": "USD",
+                    "eur": "EUR",
+                    "cny": "CNY",
+                    "cad": "CAD",
+                    "gbp": "GBP"
+                }
+            },
             "initial_state": {
                 "name": "Status awal",
                 "state": {

+ 10 - 0
custom_components/tuya_local/translations/it.json

@@ -396,6 +396,16 @@
             }
         },
         "select": {
+            "currency": {
+                "name": "Valuta",
+                "state": {
+                    "usd": "USD",
+                    "eur": "EUR",
+                    "cny": "CNY",
+                    "cad": "CAD",
+                    "gbp": "GBP"
+                }
+            },
             "initial_state": {
                 "name": "Stato iniziale",
                 "state": {

+ 10 - 0
custom_components/tuya_local/translations/ja.json

@@ -395,6 +395,16 @@
             }
         },
         "select": {
+            "currency": {
+                "name": "通貨",
+                "state": {
+                    "usd": "米ドル",
+                    "eur": "ユーロ",
+                    "cny": "人民元",
+                    "cad": "カナダドル",
+                    "gbp": "英国ポンド"
+                }
+            },
             "initial_state": {
                 "name": "初期状態",
                 "state": {

+ 10 - 0
custom_components/tuya_local/translations/no-NB.json

@@ -396,6 +396,16 @@
             }
         },
         "select": {
+            "currency": {
+                "name": "Valuta",
+                "state": {
+                    "usd": "USD",
+                    "eur": "EUR",
+                    "cny": "CNY",
+                    "cad": "CAD",
+                    "gbp": "GBP"
+                }
+            },
             "initial_state": {
                 "name": "Starttilstand",
                 "state": {

+ 10 - 0
custom_components/tuya_local/translations/pl.json

@@ -395,6 +395,16 @@
             }
         },
         "select": {
+            "currency": {
+                "name": "Waluta",
+                "state": {
+                    "usd": "USD",
+                    "eur": "EUR",
+                    "cny": "CNY",
+                    "cad": "CAD",
+                    "gbp": "GBP"
+                }
+            },
             "initial_state": {
                 "name": "Stan początkowy",
                 "state": {

+ 10 - 0
custom_components/tuya_local/translations/pt-BR.json

@@ -395,6 +395,16 @@
             }
         },
         "select": {
+            "currency": {
+                "name": "Moeda",
+                "state": {
+                    "usd": "USD",
+                    "eur": "EUR",
+                    "cny": "CNY",
+                    "cad": "CAD",
+                    "gbp": "GBP"
+                }
+            },
             "initial_state": {
                 "name": "Estado inicial",
                 "state": {

+ 10 - 0
custom_components/tuya_local/translations/ru.json

@@ -395,6 +395,16 @@
             }
         },
         "select": {
+            "currency": {
+                "name": "Валюта",
+                "state": {
+                    "usd": "USD",
+                    "eur": "EUR",
+                    "cny": "CNY",
+                    "cad": "CAD",
+                    "gbp": "GBP"
+                }
+            },
             "initial_state": {
                 "name": "Начальное состояние",
                 "state": {

+ 10 - 0
custom_components/tuya_local/translations/uk.json

@@ -398,6 +398,16 @@
             }
         },
         "select": {
+            "currency": {
+                "name": "Валюта",
+                "state": {
+                    "usd": "USD",
+                    "eur": "EUR",
+                    "cny": "CNY",
+                    "cad": "CAD",
+                    "gbp": "GBP"
+                }
+            },
             "initial_state": {
                 "name": "Початковий стан",
                 "state": {

+ 10 - 0
custom_components/tuya_local/translations/ur.json

@@ -398,6 +398,16 @@
             }
         },
         "select": {
+            "currency": {
+                "name": "کرنسی"
+                "state": {
+                    "usd": "یو ایس ڈی",
+                    "eur": "یورو",
+                    "cny": "چینی یوان",
+                    "cad": "کینیڈین ڈالر",
+                    "gbp": "برطانوی پاؤنڈ"
+                }
+            },
             "initial_state": {
                 "name": "ابتدائی حالت",
                 "state": {

+ 10 - 0
custom_components/tuya_local/translations/zh-Hans.json

@@ -395,6 +395,16 @@
             }
         },
         "select": {
+            "currency": {
+                "name": "货币",
+                "state": {
+                    "usd": "美元",
+                    "eur": "欧元",
+                    "cny": "人民币",
+                    "cad": "加元",
+                    "gbp": "英镑"
+                }
+            },
             "initial_state": {
                 "name": "初始状态",
                 "state": {

+ 10 - 0
custom_components/tuya_local/translations/zh-Hant.json

@@ -396,6 +396,16 @@
             }
         },
         "select": {
+            "currency": {
+                "name": "貨幣",
+                "state": {
+                    "usd": "美元",
+                    "eur": "歐元",
+                    "cny": "人民幣",
+                    "cad": "加拿大元",
+                    "gbp": "英鎊"
+                }
+            },
             "initial_state": {
                 "name": "初始狀態",
                 "state": {