poblabs / weewx-belchertown

A clean and modern weewx skin with real time streaming updates, forecast data and interactive charts. View it in action at BelchertownWeather.com
https://belchertownweather.com
GNU General Public License v3.0
211 stars 112 forks source link

Locale date time format wrong in Almanac modal #242

Closed cinadr closed 4 years ago

cinadr commented 4 years ago

Hi!

I have hungarian locale in the skin and it works on every page (even in graphs). But I cannot change alamanac info to my locale. It displays a weird format which is not in moment.js database. The format uses dashes for date separator and dots for time separator.

How can I change this? Is it a bug? Weewx 3.9.2 Belcher 1.0.1

Thank you.

cinadr commented 4 years ago

Do you need more info with this?

poblabs commented 4 years ago

Yes, I need more time in the day. 😄 I'll try to help as quick as I can but since this is my hobby it can be slow sometimes.

What is the URL to your website and what is the locale you want?

cinadr commented 4 years ago

Hi!

Thank you for answering, and I didn't want to disturb you with my question. I really need more of my free time too, I really understand that.

The site is Toszeg weather It is a small village in Hungary near Szolnok. The locale is Hungarian (hu_HU.UTF-8)

Thank you for helping me out. The locale definition of time fpr Hungarian is HH:MM:SS, but the almanac displays HH.MM.SS. The date is incorrect also as for Hungarian it should be YYYY.MM.DD but it shows YYYY-MM-DD. Nowhere in my configs I declared such a thing and I cannot find where it is coming from. I even parsed some of your python code files but I'm not good at that. I assume that the $almanac record (or what it is called in python) is coming from weewx libraries? So it might be a weewx issue? My weewx version is 3.9.2.

This is my skin.conf (included in weewx.conf)

    [[Belchertown]]
        HTML_ROOT = /var/www/weewx
        skin = Belchertown
        [[[Extras]]]
           belchertown_root_url = "https://toszeg.cina.hu"
           belchertown_locale = "hu_HU.UTF-8"
           site_title = "Tószeg idƑjárása"
           logo_image = "/images/Toszeg.png"
           radar_html = ""
           station_observations = "barometer", "dewpoint", "outHumidity", "rainWithRainRate", "UV", "radiation", "windchill", "cloudbase"
           manifest_name = "Tószeg IdƑjárása"
           manifest_short_name = "TI"
           mqtt_websockets_enabled = 1
           mqtt_websockets_host = "hive.cina.hu"
           mqtt_websockets_port = 9001
           mqtt_websockets_ssl = 1
           mqtt_websockets_topic = "toszeg73/loop"
           forecast_enabled = 1
           darksky_secret_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
           darksky_lang = "en"
           highcharts_enabled = 1
           graph_page_show_all_button = 0
           graph_page_default_graphgroup = "day"
           highcharts_homepage_graphgroup = "day"
        [[[Labels]]]
           [[[[Generic]]]]
               footer_copyright_text = "Tószeg idƑjárás - Zimmermann Zsolt"
               footer_disclaimer_text = "Fontos döntéseket ne alapozzon az itt låtható adatokra!"
               rainWithRainRate = EsƑ
               # Navigation Menu
               nav_home        = "FƑoldal"
               nav_graphs      = "Grafikonok"
               nav_records     = "CsĂșcsĂ©rtĂ©kek"
               nav_reports     = "Jelentések"
               nav_about       = "NĂ©vjegy"
               # Default page headers
               home_page_header        = "IdƑjárás adatok"
               graphs_page_header      = "Grafikonok"
               records_page_header     = "CsĂșcsĂ©rtĂ©kek"
               reports_page_header     = "Jelentések"
               about_page_header       = "NĂ©vjegy"
               powered_by              = "Adatforrás: <a href="https://www.conrad.hu/hu/vezetek-nelkueli-idojarasjelzo-allomas-lan-porttal-renkforce-wh2600-1267654.html">Renkforce WH2600 </a> idƑjárás állomás"
               # DarkSky translations
               alert_in_effect             = "ÉrvĂ©nyes: "
               forecast_last_updated       = "Frissítéve: "
               clear                       = "Tiszta"
               darksky_rain                = "EsƑ"
               snow                        = "HĂł"
               sleet                       = "Havas esƑ"
               windy                       = "Szeles"
               fog                         = "Ködös"
               overcast                    = "Borult"
               partly_cloudy               = "EnyhĂ©n felhƑs"
               hail                        = "JĂ©gesƑ"
               thunderstorm                = "Vihar"
               tornado                     = "TornĂĄdĂł"

               # Home Page Text and Titles
               second                      = "mĂĄsodperc", "mĂĄsodperc"
               minute                      = "perc", "perc"
               hour                        = "Ăłra", "Ăłra"
               sun                         = "Nap"
               moon                        = "Hold"
               sun_and_moon                = "Nap Ă©s Hold"
               moon_visible                = "megvilĂĄgĂ­tva"
               daily_forecast              = "részletek"
               wind_speed                  = "sebesség"
               wind_gust                   = "lökés"
               feels_like                  = "Érzet"
               highest_temperature         = "Magas"
               lowest_temperature          = "Alacsony"
               forecast_header             = "8 napos elƑrejelzĂ©s"
               header_last_updated_alert   = "Megjegyzés: Az oldal nem volt mostanåban frissítve, elavult adatokat mutathat!"
               header_last_updated         = "Utolsó frissítés:"
               mqtt_websockets_connecting  = "ÉlƑ kapcsolat az idƑjárás állomással."
               mqtt_websockets_waiting     = "Kapcsolat létrehozva."
               mqtt_websockets_connected   = "Kapcsolatban. UtolsĂł adatcsomag: "
               mqtt_websockets_stopped     = "Az Ă©lƑ kapcsolat megszƱnt."
               mqtt_websockets_continue    = "ÉlƑ kapcsolat indítása."
               mqtt_websockets_failed      = "Hiba a kapcsolĂłdĂĄsban. PrĂłbĂĄlja kĂ©sƑbb!"
               mqtt_websockets_lost        = "Hiba a kapcsolĂłdĂĄsban. PrĂłbĂĄlja kĂ©sƑbb!"
               weather_snapshots           = "IdƑjĂĄrĂĄs szĂ©lsƑsĂ©gek"
               weather_snapshots_link      = "Összes szĂ©lsƑsĂ©ges adat megtekintĂ©se"
               snapshot_high               = "Magas"
               snapshot_low                = "Alacsony"
               snapshot_today_avg_wind     = "Átlagos szél"
               snapshot_today_high_wind    = "LegerƑsebb szĂ©l"
               snapshot_today_high_uv      = "LegerƑsebb UV"
               snapshot_today_rain         = "Mai csapadék"
               snapshot_today_rainrate     = "IntenzitĂĄs"
               snapshot_month_avg_wind     = "Átlagos szél"
               snapshot_month_high_wind    = "LegerƑsebb szĂ©l"
               snapshot_month_high_uv      = "LegerƑsebb UV"
               snapshot_month_rain         = "Csapadék"
               snapshot_month_rainrate     = "IntenzitĂĄs"
               earthquake_title            = "Legutóbbi helyi földrengés"
               earthquake_magnitude        = "MagnitĂșdĂł"
               homepage_graphs_link        = "RĂ©szletek"
               copyright                   = "SzerzƑi jog"
               # Almanac Popup
               close                       = "Rendben"
               almanac_more_details        = "Tovåbbi részletek"
               almanac_modal_title         = "CsillagĂĄszati informĂĄciĂłk"
               sun_always_down             = "<a href="https://hu.wikipedia.org/wiki/%C3%89jf%C3%A9li_nap" _target="blank">Teljes Ă©jszaka</a>"
               sun_always_up               = "<a href="https://hu.wikipedia.org/wiki/%C3%89jf%C3%A9li_nap" _target="blank">ÉjfĂ©li nap</a>"
               more_than_yesterday         = "több, mint tegnap"
               less_than_yesterday         = "kevesebb, mint tegnap"
               start_civil_twilight        = "<a href="https://hu.wikipedia.org/wiki/Sz%C3%BCrk%C3%BClet#Polg%C3%A1ri_sz%C3%BCrk%C3%BClet" _target="blank">PolgĂĄri szĂŒrkĂŒlet</a> kezdete"
               rise                        = "Felkel"
               transit                     = "Áthaladási idƑ"
               set                         = "Lenyugszik"
               end_civil_twilight          = "<a href="https://hu.wikipedia.org/wiki/Sz%C3%BCrk%C3%BClet#Polg%C3%A1ri_sz%C3%BCrk%C3%BClet" _target="blank">PolgĂĄri szĂŒrkĂŒlet</a> vĂ©ge"
               azimuth                     = "<a href="https://hu.wikipedia.org/wiki/Azimut" target="_blank">Irånyszög</a>"
               altitude                    = "<a href="https://hu.wikipedia.org/wiki/Magass%C3%A1g#Csillag%C3%A1szat" target="_blank">MagassĂĄg</a>"
               right_ascension             = "<a href="https://hu.wikipedia.org/wiki/Rektaszcenzi%C3%B3" target="_blank">RektaszcenziĂł</a>"
               declination                 = "<a href="https://hu.wikipedia.org/wiki/Deklin%C3%A1ci%C3%B3_(csillag%C3%A1szat)" target="_blank">DeklinĂĄciĂł</a>"
               equinox                     = "<a href="https://hu.wikipedia.org/wiki/Nap-%C3%A9j_egyenl%C5%91s%C3%A9g" target="_blank">NapĂ©jegyenlƑsĂ©g</a>"
               solstice                    = "<a href="https://hu.wikipedia.org/wiki/Napfordul%C3%B3" target="_blank">NapfordulĂł</a>"
               total_daylight              = "Teljes nappali fény"
               full_moon                   = "Telihold"
               new_moon                    = "Újhold"
               phase                       = "HoldfĂĄzis"
               full                        = "telítettség"
               install_pyephem             = "A rĂ©szletes csillagĂĄszati adatok megjelnĂ­tĂ©sĂ©hez a pyephem modul telepĂ­tĂ©se szĂŒksĂ©ges."
               # Graphs Page Text and Titles
               graphs_page_all_button      = "Összes"
               graphs_windrose_frequency   = "Frekvencia"
               graphs_windDir_ordinals     = '{ 0: "E", 90: "K", 180: "D", 270: "Ny", 360: "E" }'
               # Records Page Text and Titles
               records_ending                      = "utolsĂł nap:"
               records_days_text                   = "nap"
               records_all_time                    = "Teljes idƑtartam"
               records_temperature_records         = "HƑmĂ©rsĂ©kleti csĂșcsok"
               records_high_temp                   = "Legmagasabb hƑmĂ©rsĂ©klet"
               records_low_temp                    = "Legalacsonyabb hƑmĂ©rsĂ©klet"
               records_high_apptemp                = "Legmagasabb lĂĄtszĂłlagos hƑmĂ©rsĂ©klet"
               records_low_apptemp                 = "Legalacsonyabb lĂĄtszĂłlagos hƑmĂ©rsĂ©klet"
               records_high_heatindex              = "Legmagasabb hƑindex"
               records_low_windchill               = "Legalacsonyabb hƑérzet"
               records_largest_temp_range          = "Legnagyobb napi hƑingadozás"
               records_smallest_temp_range         = "Legkisebb napi hƑingadozás"
               records_wind_records                = "SzĂ©lsebessĂ©g csĂșcsok"
               records_strongest_wind              = "LegerƑsebb szĂ©llökĂ©s"
               records_daily_windrun               = "Leggyorsabb napi szélsebesség"
               records_rain_records                = "CsapadĂ©k csĂșcsok"
               records_highest_daily_rainfall      = "Legtöbb napi csapadék"
               records_highest_daily_rainrate      = "LegerƑsebb napi intenzitás"
               records_month_high_rainfall         = "Legtöbb havi csapadék"
               records_total_rainfall              = "Teljes csapadék mennyiség"
               records_consec_days_with_rain       = "Leghosszabb csapadĂ©kos idƑszak"
               records_consec_days_without_rain    = "Leghosszabb csapadĂ©kmentes idƑszak"
               records_humidity_records            = "PĂĄratartalom csĂșcsok"
               records_high_humidity               = "Legnagyobb pĂĄratartalom"
               records_lowest_humidity             = "Legkisebb pĂĄratartalom"
               records_highest_dewpoint            = "Legmagasabb harmatpont"
               records_lowest_dewpoint             = "Legalacsonyabb harmatpont"
               records_barometer_records           = "LĂ©gnyomĂĄs csĂșcsok"
               records_high_barometer              = "Legmagasabb légnyomås"
               records_low_barometer               = "Legalacsonyabb légnyomås"
               records_sun_records                 = "NapsugĂĄrzĂĄs csĂșcsok"
               records_high_solar_rad              = "LegintezĂ­vebb napsugĂĄrzĂĄs"
               records_high_uv                     = "Legmagasabb UV index"
               # NOAA Reports Page Text and Titles
               reports_title               = "NOAA jelentések"
               reports_click_here_link     = "Itt"
               reports_view_more           = "megnézheti a közvetlen jelentést vagy a hónap/év neve alatt a többi NOAA adatot."
               # moment.js default labels formats
               time_earthquake                         = "LLL"
               time_lastUpdated                        = "LLL"
               time_snapshot_records_today_header      = "LL, dddd"
               time_snapshot_records_month_header      = "YYYY. MMMM"
               time_sunrise                            = "LT"
               time_sunset                             = "LT"
               time_darksky_alert_expires              = "LLL"
               time_darksky_forecast_date              = "MM.DD. ddd"
               time_forecast_last_updated              = "LLL"
               time_mqtt_websockets_last_updated       = "LL, LTS"
               time_records_page_full_date             = "LL"
               time_records_page_month_day_year        = "LL"
               time_records_page_rainfall_range_begin  = "YYYY.MM.DD"
               time_records_page_rainfall_range_end    = "MM.DD"
         [[[Units]]]
             [[[[Labels]]]]
               # This section sets a label to be used for each type of unit.
               centibar          = " cb"
               cm                = " cm"
               cm_per_hour       = " cm/h"
               degree_C          = " °C"
               degree_F          = " °F"
               degree_compass    = "°"
               foot              = " lĂĄb"
               hPa               = " hPa"
               inHg              = " inHg"
               inch              = " in"
               inch_per_hour     = " in/h"
               km                = " km"
               km_per_hour       = " km/h"
               km_per_hour2      = " km/h"
               knot              = " csomĂł"
               knot2             = " csomĂł"
               mbar              = " mbar"
               meter             = " méter"
               meter_per_second  = " m/s"
               meter_per_second2 = " m/s"
               mile              = " mérföld"
               mile_per_hour     = " mph"
               mile_per_hour2    = " mph"
               mm                = " mm"
               mmHg              = " Hgmm"
               mm_per_hour       = " mm/h"
               percent           = " %"
               volt              = " V"
               watt_per_meter_squared = " W/mÂČ"
               day               = " nap", " map"
               hour              = " Ăłra", " Ăłra"
               minute            = " perc", " perc"
               second            = " mĂĄsodperc", " mĂĄsodperc"
               NONE              = ""    
jult commented 3 years ago

Has this been solved? If so, how and where do we set it? For me the issue is that the Almanac popup shows me AM-PM time formats, while I've set weewx and skin.conf to use military time, i.e. HH:mm:ss etc.

Thanks in advance!