diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index dda604a08..ef758c705 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1904,7 +1904,7 @@ menu.hint_volume_size Wählen Sie die Höhe der Lautstärkeanzeige menu.hint_weather_api_key Geben Sie den OpenWeather API Schlüssel ein. Eine leere Eingabe schaltet die Wetter-Unterstützung aus menu.hint_weather_enabled Schaltet die Wetter-Unterstützung (openweathermap.org) ein bzw. aus menu.hint_weather_location Wählen Sie eine Stadt in ihrer Nähe zur Anzeige der Wetterdaten aus -menu.hint_weather_location_postcode Geben Sie ihre Postleitzahl zur Anzeige der Wetterdaten an +menu.hint_weather_postalcode Geben Sie ihre Postleitzahl zur Anzeige der Wetterdaten an menu.hint_webradio_setup Hier konfigurierte WebRadio-Kanäle finden Sie in der Kanalverwaltung. menu.hint_webradio_xml_auto Lädt automatisch alle WebRadio-Dateien aus %s/ und %s/ menu.hint_webtv_setup Hier konfigurierte WebTV-Kanäle finden Sie in der Kanalverwaltung. @@ -3039,7 +3039,7 @@ videomenu.zappingmode_hold Standbild weather.api_key Wetter API Schlüssel (OpenWeather) weather.enabled Wetter-Unterstützung weather.location Wetter-Standort -weather.location_postcode Wetter-Standort per Postleitzahl +weather.postalcode Wetter-Standort per Postleitzahl webchannels.xml.add Hinzufügen webchannels.xml.del Entfernen webchannels.xml.enter Eintragen diff --git a/data/locale/english.locale b/data/locale/english.locale index 16f5e3f7d..2d1a4e4f2 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1904,7 +1904,7 @@ menu.hint_volume_size Select volume indicator height menu.hint_weather_api_key Type your OpenWeather API key. An empty input disables Weather support menu.hint_weather_enabled Enable or disable Weather support (openweathermap.org) menu.hint_weather_location Select your weather location -menu.hint_weather_location_postcode Select your weather location by postcode +menu.hint_weather_postalcode Select your weather location by postal code menu.hint_webradio_setup WebRadio channels configured here will be available in the standard channel lists. menu.hint_webradio_xml_auto Auto-load all existing WebRadio files from %s/ and %s/ menu.hint_webtv_setup WebTV channels configured here will be available in the standard channel lists. @@ -3039,7 +3039,7 @@ videomenu.zappingmode_hold Hold screen weather.api_key Weather API key (OpenWeather) weather.enabled Weather support weather.location Weather location -weather.location_postcode Weather location by postcode +weather.postalcode Weather location by postal code webchannels.xml.add Add webchannels.xml.del Remove webchannels.xml.enter Enter diff --git a/src/gui/weather.cpp b/src/gui/weather.cpp index 1e9e0bdfd..b5d858a48 100644 --- a/src/gui/weather.cpp +++ b/src/gui/weather.cpp @@ -182,9 +182,9 @@ bool CWeather::GetWeatherDetails() return false; } -bool CWeather::FindCoords(std::string postcode, std::string country) +bool CWeather::FindCoords(std::string postalcode, std::string country) { - std::string data = "http://api.openweathermap.org/geo/1.0/zip?zip=" + postcode + "," + country + "&appid=" + key; + std::string data = "http://api.openweathermap.org/geo/1.0/zip?zip=" + postalcode + "," + country + "&appid=" + key; JSONCPP_STRING answer; JSONCPP_STRING formattedErrors; Json::CharReaderBuilder builder; diff --git a/src/gui/weather.h b/src/gui/weather.h index 4b1091cba..91ca0695d 100644 --- a/src/gui/weather.h +++ b/src/gui/weather.h @@ -91,7 +91,7 @@ class CWeather ~CWeather(); bool checkUpdate(bool forceUpdate = false); void setCoords(std::string new_coords, std::string new_city = "Unknown"); - bool FindCoords(std::string postcode, std::string country = "DE"); + bool FindCoords(std::string postalcode, std::string country = "DE"); // globals std::string getCity() diff --git a/src/gui/weather_setup.cpp b/src/gui/weather_setup.cpp index 80a1210f4..81c1fd5d0 100644 --- a/src/gui/weather_setup.cpp +++ b/src/gui/weather_setup.cpp @@ -94,8 +94,8 @@ int CWeatherSetup::showWeatherSetup() mf_wl->setHint(NEUTRINO_ICON_HINT_SETTINGS, LOCALE_MENU_HINT_WEATHER_LOCATION); ms_oservices->addItem(mf_wl); - CMenuForwarder *mf_zip = new CMenuForwarder(LOCALE_WEATHER_LOCATION_POSTCODE, g_settings.weather_enabled, g_settings.weather_postcode, this, "find_location"); - mf_zip->setHint(NEUTRINO_ICON_HINT_SETTINGS, LOCALE_MENU_HINT_WEATHER_LOCATION_POSTCODE); + CMenuForwarder *mf_zip = new CMenuForwarder(LOCALE_WEATHER_POSTALCODE, g_settings.weather_enabled, g_settings.weather_postalcode, this, "find_location"); + mf_zip->setHint(NEUTRINO_ICON_HINT_SETTINGS, LOCALE_MENU_HINT_WEATHER_POSTALCODE); ms_oservices->addItem(mf_zip); int res = ms_oservices->exec(NULL, ""); @@ -158,11 +158,11 @@ int CWeatherSetup::findLocation() { int ret = menu_return::RETURN_REPAINT; - CStringInput zipcode(LOCALE_WEATHER_LOCATION_POSTCODE, &g_settings.weather_postcode, 5); + CStringInput zipcode(LOCALE_WEATHER_POSTALCODE, &g_settings.weather_postalcode, 5); ret = zipcode.exec(NULL, ""); zipcode.hide(); - if (CWeather::getInstance()->FindCoords(g_settings.weather_postcode)) + if (CWeather::getInstance()->FindCoords(g_settings.weather_postalcode)) { CWeather::getInstance()->setCoords(g_settings.weather_location, g_settings.weather_city); } diff --git a/src/gui/weather_setup.h b/src/gui/weather_setup.h index e0891273e..9762fdfac 100644 --- a/src/gui/weather_setup.h +++ b/src/gui/weather_setup.h @@ -23,7 +23,7 @@ #define WEATHER_DEFAULT_CITY "Berlin" #define WEATHER_DEFAULT_LOCATION "52.52,13.40" -#define WEATHER_DEFAULT_POSTCODE "10178" +#define WEATHER_DEFAULT_POSTALCODE "10178" #include diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 876537a2d..22679d1ca 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -1116,7 +1116,7 @@ int CNeutrinoApp::loadSetup(const char *fname) g_settings.weather_city = configfile.getString("weather_city", WEATHER_DEFAULT_CITY); g_settings.weather_location = configfile.getString("weather_location", WEATHER_DEFAULT_LOCATION); - g_settings.weather_postcode = configfile.getString("weather_postcode", WEATHER_DEFAULT_POSTCODE); + g_settings.weather_postalcode = configfile.getString("weather_postalcode", WEATHER_DEFAULT_POSTALCODE); g_settings.youtube_dev_id = YT_DEV_KEY; #if ENABLE_YOUTUBE_KEY_MANAGE @@ -2148,7 +2148,7 @@ void CNeutrinoApp::saveSetup(const char *fname) configfile.setString("weather_city", g_settings.weather_city); configfile.setString("weather_location", g_settings.weather_location); - configfile.setString("weather_postcode", g_settings.weather_postcode); + configfile.setString("weather_postalcode", g_settings.weather_postalcode); #if ENABLE_YOUTUBE_KEY_MANAGE configfile.setString("youtube_dev_id", g_settings.youtube_dev_id); diff --git a/src/system/locals.h b/src/system/locals.h index 559e5d8d8..acdb12eae 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1931,7 +1931,7 @@ typedef enum LOCALE_MENU_HINT_WEATHER_API_KEY, LOCALE_MENU_HINT_WEATHER_ENABLED, LOCALE_MENU_HINT_WEATHER_LOCATION, - LOCALE_MENU_HINT_WEATHER_LOCATION_POSTCODE, + LOCALE_MENU_HINT_WEATHER_POSTALCODE, LOCALE_MENU_HINT_WEBRADIO_SETUP, LOCALE_MENU_HINT_WEBRADIO_XML_AUTO, LOCALE_MENU_HINT_WEBTV_SETUP, @@ -3066,7 +3066,7 @@ typedef enum LOCALE_WEATHER_API_KEY, LOCALE_WEATHER_ENABLED, LOCALE_WEATHER_LOCATION, - LOCALE_WEATHER_LOCATION_POSTCODE, + LOCALE_WEATHER_POSTALCODE, LOCALE_WEBCHANNELS_XML_ADD, LOCALE_WEBCHANNELS_XML_DEL, LOCALE_WEBCHANNELS_XML_ENTER, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 4a7df7739..ee6d4694c 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1931,7 +1931,7 @@ const char * locale_real_names[] = "menu.hint_weather_api_key", "menu.hint_weather_enabled", "menu.hint_weather_location", - "menu.hint_weather_location_postcode", + "menu.hint_weather_postalcode", "menu.hint_webradio_setup", "menu.hint_webradio_xml_auto", "menu.hint_webtv_setup", @@ -3066,7 +3066,7 @@ const char * locale_real_names[] = "weather.api_key", "weather.enabled", "weather.location", - "weather.location_postcode", + "weather.postalcode", "webchannels.xml.add", "webchannels.xml.del", "webchannels.xml.enter", diff --git a/src/system/settings.h b/src/system/settings.h index 93189ab33..bea942ad1 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -915,7 +915,7 @@ struct SNeutrinoSettings std::string weather_city; std::string weather_location; - std::string weather_postcode; + std::string weather_postalcode; std::string youtube_dev_id; int youtube_enabled;