Universal translator for the condition weather

Tips and Tricks from the Rainmeter Community
User avatar

Universal translator for the condition weather

February 21st, 2018, 11:42 am
ZerOverdriver
   [30 posts]

I often encounter such a problem that I can not find a complete list of phrases that use weather sites to describe the words of current condition weather.
Of course, I need to do this in order to translate these words into different languages in the skin.
So I decided to make a complete list of words and the appropriate measure and substitute for these words.

It works like this:
The measure finds phrase the current condition weather, and whether it is upper or lower letters, whether it has alphabetic characters before or after them, or not, if the measure finds those words, it will translate them.

Code: Select all

;---   Translation weather ------------------------------

Sun=Sun
Rain=Rain
Snow=Snow
Shower=Showe
Thunder=Thunder
Drizzle=Drizzle
Clear=Clear
Cloudy=Cloudy
Clouds=Clouds
Overcast=Overcast
Wind=Wind
Breeze=Breeze
Storm=Storm
Blizzard=Blizzard
Rainstorm=Rainstorm
Windstorm=Windstorm
Snowstorm=Snowstorm
Thunderstorm=Thunderstorm
Snowshower=Snowshower
Thundershower=Thundershower
Lightning=Lightning
Sleet=Lightning
Ice=Ice
Icy condition=Icy condition
Dew=Dew
Fog=Fog
Smoke=Smoke
Mist=Mist
Squall=Squall
Flurry=Flurry
Dust=Dust
Fair=Fair
Hail=Hail
Sand=Sand
Frost=Frost
Heat=Heat
Tornado=Tornado
Hurricane=Hurricane
Snowfall=Snowfall
Smoky=Smoky
Cold=Cold

Light=Light
Medium=Medium
Moderate=Moderate
Heavy=Heavy
Gusty=Gusty
Mostly=Mostly
Windy=Windy
Foggy=Foggy
Sunny=Sunny
Vicinity=Vicinity
Some=Some
Partly=Partly
Tropical=Tropical
Severe=Severe
Mixed=Mixed
Flurries=Flurries
Blustery=Blustery
Windy=Windy

Dry=Dry
Wet=Wet
Freezing=Freezing
Frosty=Frosty
Thick=Thick
Dense=Dense
Hot=Hot
Cold=Cold
Warm=Warm
Blowing=Blowing
Drifting=Drifting
Widespread=Widespread
Sprinkles=Sprinkles
Cleavages=Cleavages
Isolated=Isolated
Scattered=Scattered

and=and
&=&
with=with

;--------------------------------------------------------------

; ,"(?i)":"##"

SubstituteWeather="(?i)Sun":"#Sun#","(?i)Rain":"#Rain#","(?i)Snow":"#Snow#","(?i)Showers":"#Showers#","(?i)Thunder":"#Thunder#","(?i)Drizzle":"#Drizzle#","(?i)Clear":"#Clear#","(?i)Cloudy":"#Cloudy#","(?i)Clouds":"#Clouds#","(?i)Overcast":"#Overcast#","(?i)Wind":"#Wind#","(?i)Breeze":"#Breeze#","(?i)Storm":"#Storm#","(?i)Blizzard":"#Blizzard#","(?i)Rainstorm":"#Rainstorm#","(?i)Windstorm":"#Windstorm#","(?i)Snowstorm":"#Snowstorm#","(?i)Thunderstorm":"#Thunderstorm#","(?i)Snowshowers":"#Snowshowers#","(?i)Partly":"#Partly#","(?i)Thundershowers":"#Thundershowers#","(?i)Lightning":"#Lightning#","(?i)Sleet":"#Sleet#","(?i)Ice":"#Ice#","(?i)Icy condition":"#Icy condition#","(?i)Dew":"#Dew#","(?i)Fog":"#Fog#","(?i)Smoke":"#Smoke#","(?i)Mist":"#Mist#","(?i)Squall":"#Squall#","(?i)Flurry":"#Flurry#","(?i)Dust":"#Dust#","(?i)Fair":"#Fair#","(?i)Hail":"#Hail#","(?i)Sand":"#Sand#","(?i)Frost":"#Frost#","(?i)Heat":"#Heat#","(?i)Partly":"#Partly#","(?i)Light":"#Light#","(?i)Medium":"#Medium#","(?i)Moderate":"#Moderate#","(?i)Heavy":"#Heavy#","(?i)Gusty":"#Gusty#","(?i)Mostly":"#Mostly#","(?i)Windy":"#Windy#","(?i)Foggy":"#Foggy#","(?i)Sunny":"#Sunny#","(?i)Vicinity":"#Vicinity#","(?i)Some":"#Some#","(?i)Dry":"#Dry#","(?i)Wet":"#Wet#","(?i)Freezing":"#Freezing#","(?i)Frosty":"#Frosty#","(?i)Thick":"#Thick#","(?i)Dense":"#Dense#","(?i)Hot":"#Hot#","(?i)Cold":"#Cold#","(?i)Warm":"#Warm#","(?i)Blowing":"#Blowing#","(?i)Drifting":"#Drifting#","(?i)Widespread":"#Widespread#","(?i)Sprinkles":"#Sprinkles#","(?i)Cleavages":"#Cleavages#","(?i)and":"#and#","(?i)&":"#&#","(?i)with":"#with#" ,"(?i)Tornado":"#Tornado#","(?i)Tropical":"#Tropical#","(?i)Hurricane":"#Hurricane#" ,"(?i)Severe":"#Severe#","(?i)Mixed":"#Mixed#","(?i)Flurries":"#Flurries#","(?i)Snowfall":"#Snowfall#" ,"(?i)Smoky":"#Smoky#" ,"(?i)Blustery":"#Blustery#","(?i)Windy":"#Windy#" ,"(?i)Isolated":"#Isolated#","(?i)Scattered":"#Scattered#"


[MeasureConditionWeather]
Measure=WebParser
Url=http://WeatherSite
RegExp="(?siU)Part of a line of code before the data\W{1,}+(.*)Part of a line of code after the data.*"
UpdateRate=1800
StringIndex=1
RegExpSubstitute=1
Substitute=#SubstituteWeather#

If you know more words that are used on different weather sites, you can add them to the list and you need to add a word to SubstituteWeather in this way: ,"(?i)Word":"#Word#"

Made a translation into Russian, and you can immediately below, to offer translations into other languages for General use.

Code: Select all

Sun=Солнце
Rain=Дождь
Snow=Снег
Showers=Ливень
Thunder=Гром
Drizzle=Изморось
Clear=Ясно
Cloudy=Облачно
Clouds=Тучи
Overcast=Пасмурно
Wind=Ветер
Breeze=Ветерок
Storm=Шторм
Blizzard=Вьюга
Rainstorm=Ливень
Windstorm=Буря
Snowstorm=Метель
Thunderstorm=Гроза
Snowshowers=Снегопад
Thundershowers=Грозовой ливень
Lightning=Молния
Sleet=Мокрый снег
Ice=Лёд
Icy condition=Гололёд
Dew=Роса
Fog=Туман
Smoke=Густой туман
Mist=Дымка
Squall=Шквал
Flurry=Шквал
Dust=Пыль
Fair=Прояснения
Hail=Град
Sand=Песок
Frost=Мороз
Heat=Жара
Tornado=Торнадо
Hurricane=Ураган
Snowfall=Снегопад
Smoky=Туманность
Cold=Холод

Light=Немного
Medium=Несильно
Moderate=Умеренно
Heavy=Сильно
Gusty=Порывисто
Mostly=Преимущественно
Windy=Ветренно
Foggy=Туманно
Sunny=Солнечно
Vicinity=Местами
Some=Небольшой
Partly=Переменно
Tropical=Тропический
Severe=Суровый
Mixed=Смешанный
Flurries=Шквальный
Blustery=Ветренно
Windy=Ветренно

Dry=Сухой
Wet=Мокрый
Freezing=Ледяной
Frosty=Морозный
Thick=Густой
Dense=Плотный
Hot=Жаркий
Warm=Тёплый
Blowing=Сдувающий
Drifting=Дрейфующий
Widespread=Везде
Sprinkles=Сыпящий
Cleavages=Прояснения
Isolated=Местами
Scattered=Разрозненно

and=и
&=и
with=и
User avatar

Re: Universal translator for the condition weather

February 21st, 2018, 2:36 pm
balala
Rainmeter Sage   [6281 posts]

Just note that if you're using weather.com, there is no need of translation. This provider can return the descriptions already translated.
Eg the http://wxdata.weather.com/wxdata/weather/local/#WeatherLocation1#?cc=*&unit=#Unit1#&dayf=4 URL returns those descriptions in English, but the http://wxdata.weather.com/wxdata/weather/local/#WeatherLocation1#?cc=*&unit=#Unit1#&dayf=4&locale=ru_RU URL, returns them in Russian. No need of translations. Much simpler.
But yes, probably a such kind of option isn't available for all weather forecast providers.
User avatar

Re: Universal translator for the condition weather

February 21st, 2018, 3:28 pm
ZerOverdriver
   [30 posts]

balala wrote:Just note that if you're using weather.com, there is no need of translation. This provider can return the descriptions already translated.
Eg the http://wxdata.weather.com/wxdata/weather/local/#WeatherLocation1#?cc=*&unit=#Unit1#&dayf=4 URL returns those descriptions in English, but the http://wxdata.weather.com/wxdata/weather/local/#WeatherLocation1#?cc=*&unit=#Unit1#&dayf=4&locale=ru_RU URL, returns them in Russian. No need of translations. Much simpler.
But yes, probably a such kind of option isn't available for all weather forecast providers.

Thanks, I know that. It was necessary to mention this of course.
I have already made a skin that used the information from this site:
viewtopic.php?f=27&t=26447
User avatar

Re: Universal translator for the condition weather

February 21st, 2018, 4:31 pm
balala
Rainmeter Sage   [6281 posts]

ZerOverdriver wrote:Thanks, I know that. It was necessary to mention this of course.
I have already made a skin that used the information from this site:
viewtopic.php?f=27&t=26447

:17good

Return to “Community Tips and Tricks”



Who is online

Users browsing this forum: No registered users and 1 guest