]> git.basschouten.com Git - openhab-addons.git/commitdiff
[openweathermap] Added more supported languages (#9717)
authorChristoph Weitkamp <github@christophweitkamp.de>
Wed, 6 Jan 2021 21:22:52 +0000 (22:22 +0100)
committerGitHub <noreply@github.com>
Wed, 6 Jan 2021 21:22:52 +0000 (13:22 -0800)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
bundles/org.openhab.binding.openweathermap/src/main/java/org/openhab/binding/openweathermap/internal/config/OpenWeatherMapAPIConfiguration.java
bundles/org.openhab.binding.openweathermap/src/main/resources/OH-INF/config/config.xml
bundles/org.openhab.binding.openweathermap/src/main/resources/OH-INF/i18n/openweathermap_de.properties

index c63bab8cc3378c82b8f78dcd8442fcc66115240d..e28406bb0661ae4a500b2ddd06abe2712093b54e 100644 (file)
  */
 package org.openhab.binding.openweathermap.internal.config;
 
-import java.util.Collections;
 import java.util.Set;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
 
 import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.eclipse.jdt.annotation.Nullable;
@@ -30,9 +27,10 @@ import org.openhab.binding.openweathermap.internal.handler.OpenWeatherMapAPIHand
 @NonNullByDefault
 public class OpenWeatherMapAPIConfiguration {
     // supported languages (see https://openweathermap.org/current#multi)
-    public static final Set<String> SUPPORTED_LANGUAGES = Collections.unmodifiableSet(Stream.of("ar", "bg", "ca", "cz",
-            "de", "el", "en", "es", "fa", "fi", "fr", "gl", "hr", "hu", "it", "ja", "kr", "la", "lt", "mk", "nl", "pl",
-            "pt", "ro", "ru", "se", "sk", "sl", "tr", "ua", "vi", "zh_cn", "zh_tw").collect(Collectors.toSet()));
+    public static final Set<String> SUPPORTED_LANGUAGES = Set.of("af", "al", "ar", "az", "bg", "ca", "cz", "da", "de",
+            "el", "en", "es", "sp", "eu", "fa", "fi", "fr", "gl", "he", "hi", "hr", "hu", "id", "it", "ja", "kr", "la",
+            "lt", "mk", "nl", "no", "pl", "pt", "pt_br", "ro", "ru", "se", "sv", "sk", "sl", "sr", "th", "tr", "uk",
+            "ua", "vi", "zh_cn", "zh_tw", "zu");
 
     public @Nullable String apikey;
     public int refreshInterval;
index 011d64441936d2a6c87dfb474c6b7f51a83e2a68..5bdcaeb40308bb36dd5b8e0efff0a40a395d6691 100644 (file)
                        <label>Language</label>
                        <description>Language to be used by the OpenWeatherMap API.</description>
                        <options>
+                               <option value="af">Afrikaans</option>
+                               <option value="al">Albanian</option>
                                <option value="ar">Arabic</option>
+                               <option value="az">Azerbaijani</option>
+                               <option value="eu">Basque</option>
                                <option value="bg">Bulgarian</option>
                                <option value="ca">Catalan</option>
                                <option value="zh_cn">Chinese - Simplified</option>
                                <option value="zh_tw">Chinese - Traditional</option>
                                <option value="hr">Croatian</option>
                                <option value="cz">Czech</option>
+                               <option value="da">Danish</option>
                                <option value="nl">Dutch</option>
                                <option value="en">English</option>
                                <option value="fi">Finnish</option>
                                <option value="gl">Galician</option>
                                <option value="de">German</option>
                                <option value="el">Greek</option>
+                               <option value="he">Hebrew</option>
+                               <option value="hi">Hindi</option>
                                <option value="hu">Hungarian</option>
+                               <option value="id">Indonesian</option>
                                <option value="it">Italian</option>
                                <option value="ja">Japanese</option>
                                <option value="kr">Korean</option>
                                <option value="la">Latvian</option>
                                <option value="lt">Lithuanian</option>
                                <option value="mk">Macedonian</option>
+                               <option value="no">Norwegian</option>
                                <option value="fa">Persian (Farsi)</option>
                                <option value="pl">Polish</option>
+                               <option value="pt_br">Português Brasil</option>
                                <option value="pt">Portuguese</option>
                                <option value="ro">Romanian</option>
                                <option value="ru">Russian</option>
+                               <option value="sr">Serbian</option>
                                <option value="sk">Slovak</option>
-                               <option value="se">Swedish</option>
                                <option value="sl">Slovenian</option>
                                <option value="es">Spanish</option>
+                               <option value="se">Swedish</option>
+                               <option value="th">Thai</option>
                                <option value="tr">Turkish</option>
-                               <option value="ua">Ukrainian</option>
+                               <option value="uk">Ukrainian</option>
                                <option value="vi">Vietnamese</option>
+                               <option value="zu">Zulu</option>
                        </options>
                </parameter>
        </config-description>
index acbf43114865390299d11148043bc09326e04d95..524d7457cc7c399c789155bb841244b75ca7e6e3 100644 (file)
@@ -15,20 +15,28 @@ bridge-type.config.openweathermap.weather-api.refreshInterval.description = Inte
 
 bridge-type.config.openweathermap.weather-api.language.label = Sprache
 bridge-type.config.openweathermap.weather-api.language.description = Sprache zur Anzeige der Daten.
+bridge-type.config.openweathermap.weather-api.language.option.af = Afrikanisch
+bridge-type.config.openweathermap.weather-api.language.option.al = Albanisch
 bridge-type.config.openweathermap.weather-api.language.option.ar = Arabisch
+bridge-type.config.openweathermap.weather-api.language.option.az = Aserbaidschanisch
 bridge-type.config.openweathermap.weather-api.language.option.bg = Bulgarisch
 bridge-type.config.openweathermap.weather-api.language.option.ca = Katalanisch
 bridge-type.config.openweathermap.weather-api.language.option.cz = Tschechisch
+bridge-type.config.openweathermap.weather-api.language.option.da = Dänisch
 bridge-type.config.openweathermap.weather-api.language.option.de = Deutsch
 bridge-type.config.openweathermap.weather-api.language.option.el = Griechisch
 bridge-type.config.openweathermap.weather-api.language.option.en = Englisch
 bridge-type.config.openweathermap.weather-api.language.option.es = Spanisch
+bridge-type.config.openweathermap.weather-api.language.option.eu = Baskisch
 bridge-type.config.openweathermap.weather-api.language.option.fa = Persisch (Farsi)
 bridge-type.config.openweathermap.weather-api.language.option.fi = Finnisch
 bridge-type.config.openweathermap.weather-api.language.option.fr = Französisch
 bridge-type.config.openweathermap.weather-api.language.option.gl = Galizisch
+bridge-type.config.openweathermap.weather-api.language.option.he = Hebräisch
+bridge-type.config.openweathermap.weather-api.language.option.hi = Hindi
 bridge-type.config.openweathermap.weather-api.language.option.hr = Kroatisch
 bridge-type.config.openweathermap.weather-api.language.option.hu = Ungarisch
+bridge-type.config.openweathermap.weather-api.language.option.id = Indonesisch
 bridge-type.config.openweathermap.weather-api.language.option.it = Italienisch
 bridge-type.config.openweathermap.weather-api.language.option.ja = Japanisch
 bridge-type.config.openweathermap.weather-api.language.option.kr = Koreanisch
@@ -36,18 +44,23 @@ bridge-type.config.openweathermap.weather-api.language.option.la = Lettisch
 bridge-type.config.openweathermap.weather-api.language.option.lt = Litauisch
 bridge-type.config.openweathermap.weather-api.language.option.mk = Mazedonisch
 bridge-type.config.openweathermap.weather-api.language.option.nl = Holländisch
+bridge-type.config.openweathermap.weather-api.language.option.no = Norwegisch
 bridge-type.config.openweathermap.weather-api.language.option.pl = Polnisch
 bridge-type.config.openweathermap.weather-api.language.option.pt = Portugiesisch
+bridge-type.config.openweathermap.weather-api.language.option.pt_br = Português Brasilien
 bridge-type.config.openweathermap.weather-api.language.option.ro = Rumänisch
 bridge-type.config.openweathermap.weather-api.language.option.ru = Russisch
 bridge-type.config.openweathermap.weather-api.language.option.se = Schwedisch
 bridge-type.config.openweathermap.weather-api.language.option.sk = Slowakisch
 bridge-type.config.openweathermap.weather-api.language.option.sl = Slowenisch
+bridge-type.config.openweathermap.weather-api.language.option.sr = Serbisch
+bridge-type.config.openweathermap.weather-api.language.option.th = Thailändisch
 bridge-type.config.openweathermap.weather-api.language.option.tr = Türkisch
-bridge-type.config.openweathermap.weather-api.language.option.ua = Ukrainisch
+bridge-type.config.openweathermap.weather-api.language.option.uk = Ukrainisch
 bridge-type.config.openweathermap.weather-api.language.option.vi = Vietnamesisch
 bridge-type.config.openweathermap.weather-api.language.option.zh_cn = Chinesisch - Simplified
 bridge-type.config.openweathermap.weather-api.language.option.zh_tw = Chinesisch - Traditional
+bridge-type.config.openweathermap.weather-api.language.option.zu = Zulu
 
 # thing types
 thing-type.openweathermap.weather-and-forecast.label = Wetterinformationen