It is currently March 28th, 2024, 3:40 pm

Universal translator for the condition weather

Tips and Tricks from the Rainmeter Community
Post Reply
User avatar
ZerOverdriver
Posts: 29
Joined: February 13th, 2017, 8:57 pm

Universal translator for the condition weather

Post by ZerOverdriver »

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
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Universal translator for the condition weather

Post by balala »

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[color=#FF0000]&locale=ru_RU[/color] 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
ZerOverdriver
Posts: 29
Joined: February 13th, 2017, 8:57 pm

Re: Universal translator for the condition weather

Post by ZerOverdriver »

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[color=#FF0000]&locale=ru_RU[/color] 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:
https://forum.rainmeter.net/viewtopic.php?f=27&t=26447
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Universal translator for the condition weather

Post by balala »

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:
https://forum.rainmeter.net/viewtopic.php?f=27&t=26447
:17good
Post Reply