It is currently April 25th, 2024, 12:09 pm

Weather not working?

Get help with creating, editing & fixing problems with skins
dasxardas
Posts: 25
Joined: March 6th, 2020, 9:38 am

Re: Weather not working?

Post by dasxardas »

You're the best guys :) Thanks a lot.

I think that now it is fully working. If you want, you can try.
You do not have the required permissions to view the files attached to this post.
dasxardas
Posts: 25
Joined: March 6th, 2020, 9:38 am

Re: Weather not working?

Post by dasxardas »

dvo wrote: March 10th, 2020, 9:46 am i see still two bugs to go .... @today it's in english instead of polish what i set as language this time .... :Whistle
and your days are still in english instead of the language you picked :welcome:
You must change language to Polish and in Variables set language=pl-PL. Thats bad but you must change language twice.
dasxardas
Posts: 25
Joined: March 6th, 2020, 9:38 am

Re: Weather not working?

Post by dasxardas »

dvo wrote: March 10th, 2020, 9:59 am nope did that and it doesn't change a bit... :-( and try to use celcius and fahrenheit it's switching back to en-BG
Hmm, I tried that and everything seems to be ok, with fahrenheits you were right. If you choose °F, so days are in english. I try to fix that but maybe in the evening, now I have no free time, but thanks for notification. :)
You do not have the required permissions to view the files attached to this post.
Last edited by dasxardas on March 10th, 2020, 10:11 am, edited 1 time in total.
dasxardas
Posts: 25
Joined: March 6th, 2020, 9:38 am

Re: Weather not working?

Post by dasxardas »

dvo wrote: March 10th, 2020, 10:09 am just press the celcius and ... you will see a switch in the url of the parrent is set en-GB or en-US both will switch back to english because it's set so..
this had to be a #Language#
Best solution will be if you choose language for example Polish, so it change automaticaly also language parameter in Variables to pl-PL etc... because make it twice is no so good, that can be good improvement.
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Weather not working?

Post by balala »

dvo wrote: March 10th, 2020, 9:59 am switching back to en-BG
And what language the en-BG code is for?
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Weather not working?

Post by balala »

dvo wrote: March 10th, 2020, 10:30 am en-GB = english great brittain
en-US = english US
pl-PL = Polish
dvo wrote: March 10th, 2020, 9:59 am switching back to en-BG
Now I see that had to be not en-BG but en-GB. This is what have to thought to, right? Just a typo, probably.
dvo wrote: March 10th, 2020, 10:30 am btw mine still doesn't have your moon fase part in it , instead i was writing a sub for the moon...
Elegant solution by eclectic-tech.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather not working?

Post by jsmorley »

Somebody needs to fully correct this skin and post it, so we can put this one to bed. I don't have the bandwidth at the moment, but if someone could step up, it would be helpful.

1) Directly use the @MeasureName measures provided in WeatherComJSONMeasures.inc. I really don't think it serves any purpose, and only makes the skin slightly more resource-intensive and confusing, to avoid changing the "meters" by duplicating all the "measures". I understand the charm for a "quick fix" of this skin, but I think this has aroused enough interest to do it right.

2) Correct the "high" temperature values in both the "current" section and the "Today/Tonight" section. They are wrong.

3) Use the Language Code approach, i.e. fr-FR, and let the site do the translations of all the strings and units of measure it returns. Do NOT use "French" and then try to brute-force your own translations. That is pointless and doomed to failure. Why in the world would you force the site to English, and then brute-force that to French? Weather.com is perfectly happy to return it all in French and Metric for you. You simply can't know all the possible "conditions" text the site might return. It's a fool's errand.

Brute-forcing "Monday" to "Lundi"? Come on... That is what FormatLocale is for.

4) Provide a way to set variables to translate just the local "labels" you use in the skin. I don't think it makes sense to have this be a huge, but incomplete list of languages that the user somehow "chooses" from some "settings" skin, but just a single variable .inc file that any given user can edit to have the labels they want, in the language they want. Any given single user is going to only need one single translation of the labels, and it would take them 2 minutes to translate a dozen or so strings. Weather.com supports over 180 country/language variants, and it just doesn't make sense to try to bake them all in. Don't try to "distribute" the skin with support for Arabic, just have a simple way for the user to change "Feels Like" to whatever that would be in Arabic. It's just for them anyway, right?

Again, this will just be for the local "labels" used in the skin, probably a dozen or less. Do not try to translate any values the site returns.

5) Change the names of the image files for the moon phases to what is returned by the site, i.e. WXG.png and not 1.png. What is the value in Substituting the value from the site to a number?

6) Lose the Settings skin entirely. It's far more trouble than it is worth. Just have them set their Location Code and Language Code in a .inc file, let them edit some translation .inc file as desired, and done... The only thing I would be tempted to provide is an automated way to set the Location Code, as that can be any of over a million codes, and not that easy for a user to find on their own.

https://forum.rainmeter.net/viewtopic.php?f=27&t=34734
User avatar
Yincognito
Rainmeter Sage
Posts: 7160
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Weather not working?

Post by Yincognito »

jsmorley wrote: March 10th, 2020, 1:56 pm Somebody needs to fully correct this skin and post it, so we can put this one to bed. I don't have the bandwidth at the moment, but if someone could step up, it would be helpful. [...] I understand the charm for a "quick fix" of this skin, but I think this has aroused enough interest to do it right. [...]
I doubt those interested in it would pay attention to anything other than "quick fixes". Otherwise, they would have just done it like SilverAzide recommended in a related thread (i.e. slightly more work but a "bulletproof" result). Just saying.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Weather not working?

Post by eclectic-tech »

Yes, the "quick fix" seems to have created a lot of issues, so here is my last attempt at a working version.
jsmorley wrote: March 10th, 2020, 1:56 pm Somebody needs to fully correct this skin and post it, so we can put this one to bed. I don't have the bandwidth at the moment, but if someone could step up, it would be helpful.

1) Directly use the @MeasureName measures provided in WeatherComJSONMeasures.inc. I really don't think it serves any purpose, and only makes the skin slightly more resource-intensive and confusing, to avoid changing the "meters" by duplicating all the "measures". I understand the charm for a "quick fix" of this skin, but I think this has aroused enough interest to do it right.
Replaced String Measures with direct links to all JSON measures.
jsmorley wrote:2) Correct the "high" temperature values in both the "current" section and the "Today/Tonight" section. They are wrong.
Found a TYPO in my measure. Should be working now.
jsmorley wrote:3) Use the Language Code approach, i.e. fr-FR, and let the site do the translations of all the strings and units of measure it returns. Do NOT use "French" and then try to brute-force your own translations. That is pointless and doomed to failure. Why in the world would you force the site to English, and then brute-force that to French? Weather.com is perfectly happy to return it all in French and Metric for you. You simply can't know all the possible "conditions" text the site might return. It's a fool's errand.

Brute-forcing "Monday" to "Lundi"? Come on... That is what FormatLocale is for.
Removed options to set language separately. (See below)
jsmorley wrote:4) Provide a way to set variables to translate just the local "labels" you use in the skin. I don't think it makes sense to have this be a huge, but incomplete list of languages that the user somehow "chooses" from some "settings" skin, but just a single variable .inc file that any given user can edit to have the labels they want, in the language they want. Any given single user is going to only need one single translation of the labels, and it would take them 2 minutes to translate a dozen or so strings. Weather.com supports over 180 country/language variants, and it just doesn't make sense to try to bake them all in. Don't try to "distribute" the skin with support for Arabic, just have a simple way for the user to change "Feels Like" to whatever that would be in Arabic. It's just for them anyway, right?

Again, this will just be for the local "labels" used in the skin, probably a dozen or less. Do not try to translate any values the site returns.
Added skin specific terms translation to WeatherComJSONLanguage.inc and added context menu to open for editing. Included English, Spanish, French, and German with instructions on how to add new languages and select them.
jsmorley wrote:5) Change the names of the image files for the moon phases to what is returned by the site, i.e. WXG.png and not 1.png. What is the value in Substituting the value from the site to a number?
Done!

SUMMARY
Removed Settings skin
Instead use 'Language' code (en-US, etc.) and edit skin specific terms in #@#WeatherComJSONLanguage.inc for you language
Corrected TYPO in day/night test
Added context options to edit variables, language, and find weather codes (JSMorley's skin :D )
Reworked moon to match forecast day format and added moon rise/moon set times

Should be working for any TWC supported language. Renamed folder in package to "Realistic Weather Forecast"...

EDIT: Corrected missing Day1 evening conditions. (I wish I was perfect!)
EDIT2: V 5a.2020.03.10 Updated JSON measures, Updated WeatherComCodes (by JSMorley), added LANG variable, and new context menus | 5b - corrected invalid 'Date' substitution error message
Realistic Weather Forecast (5b)_5b.2020.03.10.rmskin
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather not working?

Post by jsmorley »

Yay! Thanks so much!