diff options
author | George Hazan <ghazan@miranda.im> | 2021-05-01 19:07:11 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-05-01 19:07:11 +0300 |
commit | b2ede364067e1317b34c9227f3de3e5f1451202e (patch) | |
tree | 12b34deba18e7ccfbba5dc1e71d1e40f4338d8b3 /protocols/Weather | |
parent | 1cd75c5336a5ecdea2003bd45fb1875f021b1c6b (diff) |
Weather:
fixes #2853 (Weather: разобраться с переменными)
fixes #2852 (Weather: some strings cannot be translated)
Diffstat (limited to 'protocols/Weather')
-rw-r--r-- | protocols/Weather/docs/weather/gismeteo.ini | 14 | ||||
-rw-r--r-- | protocols/Weather/docs/weather/msn.ini | 10 | ||||
-rw-r--r-- | protocols/Weather/docs/weather/weatherxml.ini | 10 | ||||
-rw-r--r-- | protocols/Weather/src/weather_data.cpp | 6 |
4 files changed, 15 insertions, 25 deletions
diff --git a/protocols/Weather/docs/weather/gismeteo.ini b/protocols/Weather/docs/weather/gismeteo.ini index eb1d38231d..aa4403d8d5 100644 --- a/protocols/Weather/docs/weather/gismeteo.ini +++ b/protocols/Weather/docs/weather/gismeteo.ini @@ -15,7 +15,6 @@ ; ->->-> "" ( ) ; : - ; %[CityName] %u ; ---------------------------------------------------------------- ; : %c @@ -73,11 +72,6 @@ Update URL=http://www.gismeteo.ua/city/daily/%s/ ;[/nodata] ;----------------------------------------------------- -[CityName] -Start= -End= -[/CityName] - [Condition] Start=<dd> End=</dd> @@ -93,16 +87,16 @@ Unit=C ;Set Data=[Condition] ;[/Visibility] -[Wind Direction] +[Wind direction] Start=<dl title=" End=" -[/Wind Direction] +[/Wind direction] -[Wind Speed] +[Wind speed] Start=<dd class='value m_wind ms' style='display:inline'> End=<span class="unit"> Unit=m/s -[/Wind Speed] +[/Wind speed] [Pressure] diff --git a/protocols/Weather/docs/weather/msn.ini b/protocols/Weather/docs/weather/msn.ini index ca65928084..00fbc7bba8 100644 --- a/protocols/Weather/docs/weather/msn.ini +++ b/protocols/Weather/docs/weather/msn.ini @@ -14,7 +14,6 @@ Default Map=https://www.msn.com/en-us/weather/maps/x/we-city?q=%s Update URL=https://www.msn.com/en-us/weather/today/x/we-city?q=%s&weadegreetype=C UserAgent=Mozilla/5.0 (Windows NT 6.3; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0 - ;current Weather [Ignore] Start=<div class="current-info"> @@ -38,12 +37,12 @@ End=° Unit=C Url=1 -[Wind Direction] +[Wind direction] Start=title=" End=" Url=1 -[Wind Speed] +[Wind speed] Start=</div> End=km/h Url=1 @@ -67,13 +66,12 @@ End=% Url=1 Unit=% -[Dewpoint] +[Dew point] Start=<span>Dew Point</span> End=° Url=1 unit=C - ;First entry is still today [Sunrise] Start="sunrise":" @@ -128,8 +126,6 @@ End=° Url=1 Unit=C - - ;Forecast ;[Forecast Day 1 Sunrise] diff --git a/protocols/Weather/docs/weather/weatherxml.ini b/protocols/Weather/docs/weather/weatherxml.ini index d2e69f2288..288d4cff61 100644 --- a/protocols/Weather/docs/weather/weatherxml.ini +++ b/protocols/Weather/docs/weather/weatherxml.ini @@ -57,7 +57,7 @@ Unit=in [Pressure Tendency] Start=<d> End=< -[Wind Speed] +[Wind speed] Start=<s> End=< Unit=mph @@ -65,14 +65,14 @@ Unit=mph Start=<gust> End=< Unit=mph -[Wind Direction DEG] +[Wind direction DEG] Start=<d> End=< [WindDir] Start=<t> End=< -[Wind Direction] -Set Data=[Wind Direction DEG] & " [" & [WindDir] & "]" +[Wind direction] +Set Data=[Wind direction DEG] & " [" & [WindDir] & "]" [Humidity] Start=<hmid> End=< @@ -89,7 +89,7 @@ Start=<t> End=< [UV Index] Set Data=[UVI] & " " & [UV] -[Dewpoint] +[Dew point] Start=<dewp> End=< Unit=F diff --git a/protocols/Weather/src/weather_data.cpp b/protocols/Weather/src/weather_data.cpp index 2ba284d2fa..472cf3073c 100644 --- a/protocols/Weather/src/weather_data.cpp +++ b/protocols/Weather/src/weather_data.cpp @@ -65,11 +65,11 @@ WEATHERINFO LoadWeatherInfo(MCONTACT hContact) wcsncpy(winfo.sunset, NODATA, _countof(winfo.sunset) - 1); if (db_get_wstatic(hContact, WEATHERCONDITION, "Sunrise", winfo.sunrise, _countof(winfo.sunrise))) wcsncpy(winfo.sunrise, NODATA, _countof(winfo.sunrise) - 1); - if (db_get_wstatic(hContact, WEATHERCONDITION, "Wind Speed", winfo.wind, _countof(winfo.wind))) + if (db_get_wstatic(hContact, WEATHERCONDITION, "Wind speed", winfo.wind, _countof(winfo.wind))) wcsncpy(winfo.wind, NODATA, _countof(winfo.wind) - 1); - if (db_get_wstatic(hContact, WEATHERCONDITION, "Wind Direction", winfo.winddir, _countof(winfo.winddir))) + if (db_get_wstatic(hContact, WEATHERCONDITION, "Wind direction", winfo.winddir, _countof(winfo.winddir))) wcsncpy(winfo.winddir, NODATA, _countof(winfo.winddir) - 1); - if (db_get_wstatic(hContact, WEATHERCONDITION, "Dewpoint", winfo.dewpoint, _countof(winfo.dewpoint))) + if (db_get_wstatic(hContact, WEATHERCONDITION, "Dew point", winfo.dewpoint, _countof(winfo.dewpoint))) wcsncpy(winfo.dewpoint, NODATA, _countof(winfo.dewpoint) - 1); if (db_get_wstatic(hContact, WEATHERCONDITION, "Pressure", winfo.pressure, _countof(winfo.pressure))) wcsncpy(winfo.pressure, NODATA, _countof(winfo.pressure) - 1); |