It is currently February 23rd, 2024, 3:07 am

Translation of weather skin

Get help with creating, editing & fixing problems with skins
The Co
Posts: 6
Joined: April 15th, 2022, 1:41 pm

Re: Translation of weather skin

Post by The Co »

I've seen the substitute command for the Alerts file and the 7 day forecast file the skin has, not with date though. The

Code: Select all

Substitute=#Date#
was already here on the other skin, the document was made specially for translating (there was also a similar command

Code: Select all

Conditions="Thunderstorms":"[translated]"
, I just didn't like the weather skin the suite had so I didn't use it). I will hunt the

Code: Select all

Measure=WebParser
that has the text I want to translate tomorrow to use the substitute command.
User avatar
balala
Rainmeter Sage
Posts: 16007
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Translation of weather skin

Post by balala »

The Co wrote: April 17th, 2022, 7:38 pm I will hunt the

Code: Select all

Measure=WebParser
that has the text I want to translate tomorrow to use the substitute command.
Alright. If you have further questions, feel free to come back with them.
aquaxetinez
Posts: 7
Joined: December 10th, 2023, 9:59 pm

Re: Translation of weather skin

Post by aquaxetinez »

balala wrote: April 17th, 2022, 7:51 pm Alright. If you have further questions, feel free to come back with them.
Hi! i`m using this skin (https://www.reddit.com/r/Rainmeter/comments/hf1m06/small_clean_weather_animated/) small_clean_weather_animated

Trying to translate weather status, where i need to put this to work? Already tried all files
Substitute="Drizzle":"Drizzle1","Light freezing drizzle":"Drizzle2"
User avatar
balala
Rainmeter Sage
Posts: 16007
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Translation of weather skin

Post by balala »

aquaxetinez wrote: December 10th, 2023, 10:02 pm Trying to translate weather status, where i need to put this to work? Already tried all files
Substitute="Drizzle":"Drizzle1","Light freezing drizzle":"Drizzle2"
I think you don1t have to translate. The skin (as all skins using Weather.com) can translate at least the weather conditions. Just open the @Resources\WeatherComJSONVariables.inc file and replace the Language=en-US variable with the language code you want to use, as described here.
aquaxetinez
Posts: 7
Joined: December 10th, 2023, 9:59 pm

Re: Translation of weather skin

Post by aquaxetinez »

Yeah but i want to Substitute weather conditions, not lang at all.

For example change "Light freezing drizzle" to simply "Drizzle", is there are any way to do that whithin Rainmeter?

Don`t like long strings :D
User avatar
balala
Rainmeter Sage
Posts: 16007
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Translation of weather skin

Post by balala »

aquaxetinez wrote: December 11th, 2023, 7:41 pm For example change "Light freezing drizzle" to simply "Drizzle", is there are any way to do that whithin Rainmeter?
There is, definitely. Add the Substitute option to the [@CurrentConditions] measure, existing in the @Resources\WeatherComJSONMeasures.inc file.
However, is the linked skin working for you? Because I can't get it to work.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2565
Joined: March 23rd, 2015, 5:26 pm

Re: Translation of weather skin

Post by SilverAzide »

aquaxetinez wrote: December 11th, 2023, 7:41 pm Yeah but i want to Substitute weather conditions, not lang at all.

For example change "Light freezing drizzle" to simply "Drizzle", is there are any way to do that whithin Rainmeter?

Don`t like long strings :D
If you want short strings for the current weather conditions, instead of using the @CurrentConditions measure, use @CurrentConditionsMedium or @CurrentConditionsShort. Trying to shorten the weather.com weather description based on the text is a bit hit-and-miss, because they don't always use consistent values. I would suggest you not change any WeatherComJSONxxxx files because these are a set of templates that may need to change if weather.com alters their API.
Gadgets Wiki GitHub More Gadgets...
User avatar
Yincognito
Rainmeter Sage
Posts: 6781
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Translation of weather skin

Post by Yincognito »

aquaxetinez wrote: December 11th, 2023, 7:41 pm Yeah but i want to Substitute weather conditions, not lang at all.

For example change "Light freezing drizzle" to simply "Drizzle", is there are any way to do that whithin Rainmeter?

Don`t like long strings :D
balala wrote: December 11th, 2023, 8:09 pm However, is the linked skin working for you? Because I can't get it to work.
Besides that skin not working, it's also updating weather once every... 18 SECONDS (Update=30 × UpdateRate=600) !!!

Something like this is frankly equivalent to that Nominatim complaint about polling such sites excessively, and should be IMMEDIATELY corrected by its author or else deleted from DeviantArt and other locations entirely, because is putting ALL of us that use weather.com to get weather data at DECENT rates in danger of losing such access - just because of one or a few skin designers who don't adjust their code properly in such cases.

So, apart from the string shortening solutions detailed above (balala's one can be slightly altered by creating a String measure taking the value of [@CurrentConditions] in the main skin and perform the substitute there instead of in the .inc files), ANYONE using this ... improperly configured skin (to put it gently) should set UpdateRate from ...\@Resources\WeatherComJSONVariables.inc to at least 20000 in order to replicate the reasonable 10 minute weather update frequency, while keeping whatever animation in that skin intact (if it's working in the first place, that is).

P.S. Even better, jsmorley's .inc files themselves could use a safe UpdateDivider (or some formula that translates to a real time reasonable rate) on the superparent WebParser in the future. This won't correct badly written existing skins that update too often, but at least it would avoid such situations in the future since most folks would then just modify the UpdateRate in WeatherComJSONVariables.inc to multiples of 10 minutes...
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
aquaxetinez
Posts: 7
Joined: December 10th, 2023, 9:59 pm

Re: Translation of weather skin

Post by aquaxetinez »

WeatherComJSONVariables.inc file , update rate there is 600 seconds why should it update is 18 seconds? so each 5 mins we take data from weather.com


and Update=1000 (i`m using SmallCleanWeather Static.ini) meants update rate of widget itself , or i`m wrong?
User avatar
Yincognito
Rainmeter Sage
Posts: 6781
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Translation of weather skin

Post by Yincognito »

aquaxetinez wrote: December 12th, 2023, 4:02 am WeatherComJSONVariables.inc file , update rate there is 600 seconds why should it update is 18 seconds? so each 5 mins we take data from weather.com


and Update=1000 (i`m using SmallCleanWeather Static.ini) meants update rate of widget itself , or i`m wrong?
If you're using the Static variant, then everything is fine, since the actual frequency of weather data retrieval would be 600 × 1000 = 600000 ms = 600 s = 10 minutes in that case.

In the other variants from that skin though, the Update is set to 30 instead of 1000 for the animations to work, and that's what is driving taking data from weather.com to that insane interval of 600 × 30 = 18000 ms = 18 seconds, which is not only preposterous (weather doesn't change every 18 seconds, not even on the surface of the Sun, if we disregard flares), but could lead the site to ban either such skins or the Rainmeter's WebParser plugin header as a whole from accessing the site or the JSON. Just 1000 users of those variants would make up roughly 5000000 requests per day...

By the way, this is how a WebParser measure update frequency is computed:
https://docs.rainmeter.net/manual/measures/webparser/#UpdateRate
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth