Well, alltimeSeasons was not changed since 3 years now, so there is no internationalization. And, as according to the instruction, the integration has to be done manually. So, I still would have an extra job to merge my german version of it with the actual seasons version. At least, I could replace those files, which are not touched by alltimeSeasons. And, well, I also have the forecast including Zambretti ingested, forked by ChounceyGardiner, with last minor editing 8 months ago. All of it I translated into german separately. I don't have the skills to adopt these according to the new seasons localization process. So, I try to merge the latest files into my construct as good as I can.
Peter Tom Keffer schrieb am Sonntag, 2. Juli 2023 um 21:29:39 UTC+2: > The current version of Seasons has been internationalized, with a German > version available. Why not try it? > > On Sun, Jul 2, 2023 at 12:22 PM Vetti52 <[email protected]> wrote: > >> Of course ephem is installed, thanks. And, yes, you are right with your >> conclusion. So I am missing $sun_visible_change. >> My top of celestical.inc looks like: >> ## If extended almanac information is available, do extra calculations. >> #if $almanac.hasExtras >> >> #set $sun_altitude = $almanac.sun.alt >> #if $sun_altitude < 0 >> #set $sun_None="<i>(Always down)</i>" >> #set $daylight_str = "00:00" >> #else >> #set $sun_None="<i>(Always up)</i>" >> #set $daylight_str = "24:00" >> #end if >> >> #set $sunrise_ts = $almanac.sun.rise.raw >> #set $sunset_ts = $almanac.sun.set.raw >> #if $sunrise_ts and $sunset_ts >> >> #set $now = $current.dateTime.raw >> #set $today_daylight = $sunset_ts - $sunrise_ts >> >> #set $seconds = $today_daylight >> #set $hours = $seconds //3600 >> #set $seconds %= 3600 >> #set $minutes = $seconds//60 >> #set $seconds %= 60 >> #set $daylight_str = "%d Stunden, %d Minuten, %d Sekunden" % ($hours, >> $minutes, $seconds) >> >> #set $yesterday = $now - 24*3600 >> #set $yesterday_daylight = >> $almanac($almanac_time=$yesterday).sun.set.raw - >> $almanac($almanac_time=$yesterday).sun.rise.raw >> #set $difference = $today_daylight - $yesterday_daylight >> #if $difference >> #set $delta = abs($difference) >> #set $amt_str = "%s%d Sekunden" % (str(int($delta) // 60) + ' >> Minuten, ' if ($delta // 60) > 0 else '', $delta % 60 if ($delta // 60) > 0 >> else $delta) >> #if $difference > 0 >> #set $delta_str = "%s mehr als gestern" % $amt_str >> #else >> #set $delta_str = "%s weniger als gestern" % $amt_str >> #end if >> #set $daylight_str = "%s<br/>%s" % ($daylight_str, $delta_str) >> #end if >> >> #end if >> #end if >> >> I am still in my own german translation version. I maintain this since >> many years and don't dare to replace it strictly. That is also, because I >> use https://github.com/gedger/alltimeSeasons instead of the original >> Seasons skin, which also needed to be translated. So, I do not update Weewx >> very often, because I always have to diff most of the files changed. Which >> sometimes is not as completely adopted as it should. As you can see here. >> The text you mentioned is much shorter in celestial.inc.tmpl-dist, which >> should be the correct version, I think. I must confess, that I have ignored >> it. >> So, where should I insert or replace your insert? >> >> BTW, In sunmoon.inc, there is also a $daylight_str. >> <div id="sunmoon_widget" class="widget"> >> ... >> <div class="widget_contents"> >> <div id="celestial_summary"> >> ... >> <td class="label">Tageslicht</td> >> <td class="data">$daylight_str</td> >> >> It looks like 17:05 now. May be, there is also a change needed? The diff >> with the new version does not tell any differences. >> >> Peter >> >> Tom Keffer schrieb am Sonntag, 2. Juli 2023 um 15:42:29 UTC+2: >> >>> I could not quite understand your question, but it sounds like you are >>> getting something like this: >>> >>> Total daylight 15 hours, 38 minutes, 35 seconds >>> $sun_visible_change.long_form >>> >>> >>> Instead of this: >>> >>> Total daylight 15 hours, 38 minutes, 35 seconds >>> 0 minutes, 48 seconds less than yesterday >>> >>> >>> Is that correct? >>> >>> If so, you are missing the definition for $sun_visible_change. Make >>> sure you have the full file celestial.inc. Up at the top it should have >>> >>> ## For the change in daylight, pick a string to indicate whether it is >>> more or >>> ## less than yesterday: >>> #set $sun_visible_change = $almanac.sun.visible_change >>> #if $sun_visible_change.raw < 0 >>> #set $change_str = $gettext("less than yesterday") >>> #else >>> #set $change_str = $gettext("more than yesterday") >>> #end if >>> >>> Is it missing? >>> >>> Also, make sure you have the module ephem installed. >>> >>> -tk >>> >>> >>> On Sun, Jul 2, 2023 at 2:50 AM Vetti52 <[email protected]> wrote: >>> >>>> According to the upgrade guide, the format of the delta time string, >>>> such as in celestial,inc should read, which does result in the correct >>>> long_form, but after the new line the text is shown as >>>> „$sun_visible_change….“ istead of it‘S value. What did I miss here? >>>> <td class="label">$gettext("Total daylight")</td> <td >>>> class="data">$almanac.sun.visible.long_form<br/>$sun_visible_change >>>> .long_form $change_str</td> >>>> >>>> Thanks >>>> Peter >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "weewx-user" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/weewx-user/e45deba8-a12b-4ef7-a9ae-1eff406e3c88n%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/weewx-user/e45deba8-a12b-4ef7-a9ae-1eff406e3c88n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "weewx-user" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/weewx-user/a1740a45-3417-466d-ace0-fb566ca39d5fn%40googlegroups.com >> >> <https://groups.google.com/d/msgid/weewx-user/a1740a45-3417-466d-ace0-fb566ca39d5fn%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/199f5849-7b51-4ec9-9378-ec8cf7408d5cn%40googlegroups.com.
