Bug in skin localization / units

70 views
Skip to first unread message

itec

unread,
Nov 10, 2021, 7:41:46 AM11/10/21
to weewx-user
Hi.
I'm testing weewx developement.
In weewx.conf file, when I set unit_system = metric, units doesn't change.
I have to set lang = it.
It seems that unit_system is overridden by lang setting.
Could you please check?

itec

Tom Keffer

unread,
Nov 10, 2021, 11:21:26 AM11/10/21
to weewx-user
1. What version of the code are you using? Straight out of the git repository? Or, one of the beta versions?

2. Please post your [StdReport] section from weewx.conf.



--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/10c587ca-1e30-47a6-a5ba-c6d620606c57n%40googlegroups.com.

itec

unread,
Nov 10, 2021, 11:28:41 AM11/10/21
to weewx-user
Hi.
I cloned and installed the developement repository from git.
version = 4.6.0b7

[StdReport]

    # Which language to use. Not all skins support all languages.
    # You can override this for individual skins.
    lang = en

    # Which unit system to use. Choices are 'us', 'metric', or 'metricwx'.
    # You can override this for individual skins.
    unit_system = metric


Thanks
itec

Tom Keffer

unread,
Nov 10, 2021, 11:31:25 AM11/10/21
to weewx-user
Please post the entire section [StdReport].



itec

unread,
Nov 10, 2021, 6:10:01 PM11/10/21
to weewx-user
I used the default settings during installation, changing units to metric only.
This is my entire section [StdReport]

##############################################################################

#   This section specifies what reports, using which skins, to generate.


[StdReport]
    
    # Which language to use. Not all skins support all languages.
    # You can override this for individual skins.
    lang = en
    
    # Which unit system to use. Choices are 'us', 'metric', or 'metricwx'.
    # You can override this for individual skins.
    unit_system = metric
    
    # Where the skins reside, relative to WEEWX_ROOT
    SKIN_ROOT = skins
    
    # Where the generated reports should go, relative to WEEWX_ROOT
    HTML_ROOT = public_html
    
    # The database binding indicates which data should be used in reports.
    data_binding = wx_binding
    
    # Whether to log a successful operation
    log_success = True
    
    # Whether to log an unsuccessful operation
    log_failure = True
    
    # Each of the following subsections defines a report that will be run.
    # See the customizing guide to change the units, plot types and line
    # colors, modify the fonts, display additional sensor data, and other
    # customizations. Many of those changes can be made here by overriding
    # parameters, or by modifying templates within the skin itself.
    
    [[SeasonsReport]]
        # The SeasonsReport uses the 'Seasons' skin, which contains the
        # images, templates and plots for the report.
        skin = Seasons
        enable = true
    
    [[SmartphoneReport]]
        # The SmartphoneReport uses the 'Smartphone' skin, and the images and
        # files are placed in a dedicated subdirectory.
        skin = Smartphone
        enable = false
        HTML_ROOT = public_html/smartphone
    
    [[MobileReport]]
        # The MobileReport uses the 'Mobile' skin, and the images and files
        # are placed in a dedicated subdirectory.
        skin = Mobile
        enable = false
        HTML_ROOT = public_html/mobile
    
    [[StandardReport]]
        # This is the old "Standard" skin. By default, it is not enabled.
        skin = Standard
        enable = false
    
    [[FTP]]
        # FTP'ing the results to a webserver is treated as just another report,
        # albeit one with an unusual report generator!
        skin = Ftp
        
        # If you wish to use FTP, set "enable" to "true", then
        # fill out the next four lines.
        # Use quotes around passwords to guard against parsing errors.
        enable = false
        user = replace_me
        password = replace_me
        server = replace_me    # The ftp server name, e.g, www.myserver.org
        path = replace_me    # The destination directory, e.g., /weather
        
        # Set to True for an FTP over TLS (FTPS) connection. Not all servers
        # support this.
        secure_ftp = False
        
        # To upload files from something other than what HTML_ROOT is set
        # to above, specify a different HTML_ROOT here.
        #HTML_ROOT = public_html
        
        # Most FTP servers use port 21
        port = 21
        
        # Set to 1 to use passive mode, zero for active mode
        passive = 1
    
    [[RSYNC]]
        # rsync'ing to a webserver is treated as just another report
        skin = Rsync
        
        # If you wish to use rsync, you must configure passwordless ssh using
        # public/private key authentication from the user account that weewx
        # runs to the user account on the remote machine where the files
        # will be copied.
        #
        # If you wish to use rsync, set "enable" to "true", then
        # fill out server, user, and path.
        # The server should appear in your .ssh/config file.
        # The user is the username used in the identity file.
        # The path is the destination directory, such as /var/www/html/weather.
        # Be sure that the user has write permissions on the destination!
        enable = false
        server = replace_me
        user = replace_me
        path = replace_me
        
        # To upload files from something other than what HTML_ROOT is set
        # to above, specify a different HTML_ROOT here.
        #HTML_ROOT = public_html
        
        # Rsync can be configured to remove files from the remote server if
        # they don't exist under HTML_ROOT locally. USE WITH CAUTION: if you
        # make a mistake in the remote path, you could could unintentionally
        # cause unrelated files to be deleted. Set to 1 to enable remote file
        # deletion, zero to allow files to accumulate remotely.
        delete = 0
    
    # Options in the [[Defaults]] section below will apply to all reports.
    # What follows are a few of the more popular options you may want to
    # uncomment, then change.
    [[Defaults]]
        
        [[[Units]]]
            # Uncommenting the following section frequently results in more
            # attractive formatting of times and dates, but may not work in
            # your locale.
            [[[[TimeFormats]]]]
        # day        = %H:%M
        # week       = %H:%M on %A
        # month      = %d-%b-%Y %H:%M
        # year       = %d-%b-%Y %H:%M
        # rainyear   = %d-%b-%Y %H:%M
        # current    = %d-%b-%Y %H:%M
        # ephem_day  = %H:%M
        # ephem_year = %d-%b-%Y %H:%M
        
        [[[Labels]]]
            # Users frequently change the labels for these observation types
            [[[[Generic]]]]
# inHumidity     = Inside Humidity
# inTemp         = Inside Temperature
# outHumidity    = Outside Humidity
# outTemp        = Outside Temperature
# extraTemp1     = Temperature1
# extraTemp2     = Temperature2
# extraTemp3     = Temperature3

##############################################################################

Tom Keffer

unread,
Nov 10, 2021, 6:31:58 PM11/10/21
to weewx-user
Yes, that is a bug! Thanks for finding it.

Fixed in commit f1afbab.

itec

unread,
Nov 10, 2021, 7:12:53 PM11/10/21
to weewx-user
Thanks to you for fixing it immediately!
It would be nice to modify the configuration wizard (wee_config --reconfigure) also.
Do you think it makes sense to prompt user for language instead of (in addition to) prompting for units?

itec

Tom Keffer

unread,
Nov 10, 2021, 7:33:32 PM11/10/21
to weewx-user
Thought about it, but got bogged down in the implementation and never finished it. The problem is that not all skins offer all languages, yet wee_config needs to work when skins other than the Seasons skin are activated. 

Not impossible, just messy and I may get back to it. In the meantime, that feature didn't make the cut.

Reply all
Reply to author
Forward
0 new messages