It is currently January 26th, 2021, 9:04 pm

Weather not working?

Help with creating, editing & fixing problems with skins
dvo
Posts: 1029
Joined: February 7th, 2016, 6:08 am

Re: Weather not working?

Post by dvo »

land codes are included in html file next to the language xx-XX .inc files if needed ... it works only need to 'refresh all' maybe rename it to 'set all'
and i see you looked at the other version not mine.... i don't use french but fr-FR.inc and use this to translate the days.
Realistic weather forcast_1.06.rmskin
You do not have the required permissions to view the files attached to this post.
Last edited by dvo on March 10th, 2020, 9:22 pm, edited 1 time in total.
User avatar
Yincognito
Posts: 2980
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.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4224
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: 21470
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather not working?

Post by jsmorley »

Yay! Thanks so much!
User avatar
jsmorley
Developer
Posts: 21470
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather not working?

Post by jsmorley »

I think you might have zigged where you should have zagged somewhere in the "today/tonight" toggle. Seem to be missing the "conditions" text for "tonight".



1.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4224
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Weather not working?

Post by eclectic-tech »

jsmorley wrote: March 10th, 2020, 7:53 pm Yay! Thanks so much!
Thanks for the "nudge"! :rosegift:

I tried to break it, but not being a linguist, it makes it difficult to know if I "checked all the boxes". :???:

Just saw your post... looks like I forgot that one... working on an update.
dvo
Posts: 1029
Joined: February 7th, 2016, 6:08 am

Re: Weather not working?

Post by dvo »

remake? :D i guess your still buzy with it? :-( missing some translation feels like ect doesn't change with nl-NL
i see you have a old version still missing tonight text ...
Last edited by dvo on March 10th, 2020, 8:19 pm, edited 1 time in total.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4224
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Weather not working?

Post by eclectic-tech »

jsmorley wrote: March 10th, 2020, 8:01 pm I think you might have zigged where you should have zagged somewhere in the "today/tonight" toggle. Seem to be missing the "conditions" text for "tonight".
Added missing night conditions for Day1 :oops:

Updated link in previous post.
User avatar
jsmorley
Developer
Posts: 21470
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather not working?

Post by jsmorley »

Looks good eclectic-tech!

I propose that we let this marinate here for a day or two, then move it to the "Weather Skins" list under your name with credit to HipHopium.


1.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4224
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Weather not working?

Post by eclectic-tech »

dvo wrote: March 10th, 2020, 8:16 pm remake? :D i guess your still buzy with it? :-( missing some translation feels like ect doesn't change with nl-NL
i see you have a old version still missing tonight text ...
Download the updated version to correct missing night condition.

Using nl-NL will only change the details from TWC, you will need to add Dutch translations to @WeatherComLanguage.inc to see skin specific terms in your language.

Follow the instructions to add another language, or put your translations directly into the English section. The skin does not automatically convert skin specific terms.
rwf-nl.png
You do not have the required permissions to view the files attached to this post.