New Bootstrap issue for multi-language

94 views
Skip to first unread message

Yves Martin

unread,
Jul 10, 2023, 5:06:03 PM7/10/23
to weewx-user
Hi,

I am trying the new Boostrap and I have a lot of trouble...

I want to use the multi-language option so I set as the documentation says in weewx.conf:

    [[StandardReport]]
        # 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.

        # The StandardReport uses the 'Standard' skin, which contains the
        # images, templates and plots for the report.
        skin = Bootstrap

    [[Bootstrap-fr]]
        skin = Bootstrap
        HTML_ROOT = /var/www/weewx/fr
        lang = fr
        enable = true

    [[Bootstrap-en]]
        skin = Bootstrap
        HTML_ROOT = /var/www/weewx/en
        lang = en
        enable = true

    [[Bootstrap-es]]
        skin = Bootstrap
        HTML_ROOT = /var/www/weewx/es
        lang = es
        enable = true

But I have this error :

Jul 10 16:56:46 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: Evaluation of template /etc/weewx/skins/Bootstrap/history.html.tmpl failed.
Jul 10 16:56:46 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/Bootstrap/history.html.tmpl
Jul 10 16:56:46 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: **** Reason: cannot find 'locale'
Jul 10 16:56:46 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: **** To debug, try inserting '#errorCatcher Echo' at top of template
Jul 10 16:56:46 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: Evaluation of template /etc/weewx/skins/Bootstrap/stats.html.tmpl failed.
Jul 10 16:56:46 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/Bootstrap/stats.html.tmpl
Jul 10 16:56:46 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: **** Reason: cannot find 'locale'
Jul 10 16:56:46 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: **** To debug, try inserting '#errorCatcher Echo' at top of template
Jul 10 16:56:46 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: Evaluation of template /etc/weewx/skins/Bootstrap/history.html.tmpl failed.
Jul 10 16:56:46 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/Bootstrap/history.html.tmpl
Jul 10 16:56:46 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: **** Reason: cannot find 'locale'
Jul 10 16:56:46 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: **** To debug, try inserting '#errorCatcher Echo' at top of template
Jul 10 16:56:47 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: Evaluation of template /etc/weewx/skins/Bootstrap/indiceUV.html.tmpl failed.
Jul 10 16:56:47 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/Bootstrap/indiceUV.html.tmpl
Jul 10 16:56:47 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: **** Reason: cannot find 'time_since_last_rain'
Jul 10 16:56:47 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: **** To debug, try inserting '#errorCatcher Echo' at top of template
Jul 10 16:56:47 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: Evaluation of template /etc/weewx/skins/Bootstrap/day.html.tmpl failed.
Jul 10 16:56:47 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/Bootstrap/day.html.tmpl
Jul 10 16:56:47 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: **** Reason: cannot find 'locale'
Jul 10 16:56:47 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: **** To debug, try inserting '#errorCatcher Echo' at top of template
Jul 10 16:56:47 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: Evaluation of template /etc/weewx/skins/Bootstrap/week.html.tmpl failed.
Jul 10 16:56:47 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/Bootstrap/week.html.tmpl
Jul 10 16:56:47 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: **** Reason: cannot find 'locale'
Jul 10 16:56:47 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: **** To debug, try inserting '#errorCatcher Echo' at top of template
Jul 10 16:56:47 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: Evaluation of template /etc/weewx/skins/Bootstrap/month.html.tmpl failed.
Jul 10 16:56:47 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/Bootstrap/month.html.tmpl
Jul 10 16:56:47 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: **** Reason: cannot find 'locale'
Jul 10 16:56:47 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: **** To debug, try inserting '#errorCatcher Echo' at top of template
Jul 10 16:56:47 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: Evaluation of template /etc/weewx/skins/Bootstrap/year.html.tmpl failed.
Jul 10 16:56:47 meteo-raspi weewx[1797] ERROR weewx.cheetahgenerator: **** Ignoring template /etc/weewx/skins/Bootstrap/year.html.tmpl

(...)

YM
Message has been deleted

michael.k...@gmx.at

unread,
Jul 11, 2023, 7:14:00 AM7/11/23
to weewx-user
You also use Bootstrap in [[StandardReport]] and need to specify a lang:

[[StandardReport]]
        # 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.

        # The StandardReport uses the 'Standard' skin, which contains the
        # images, templates and plots for the report.
        skin = Bootstrap
        lang = {one_of_the_available_languages}

Without the lang, there is no locale

Yves Martin

unread,
Jul 11, 2023, 7:20:41 AM7/11/23
to weewx-user
OK, but how to use a "multi-language" option?

YM

michael.k...@gmx.at

unread,
Jul 11, 2023, 7:24:18 AM7/11/23
to weewx-user
Like this:

 [[StandardReport]]
        # 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.

        # The StandardReport uses the 'Standard' skin, which contains the
        # images, templates and plots for the report.
        skin = Bootstrap
        lang = de

    [[Bootstrap-fr]]
        skin = Bootstrap
        HTML_ROOT = /var/www/weewx/fr
        lang = fr
        enable = true

    [[Bootstrap-en]]
        skin = Bootstrap
        HTML_ROOT = /var/www/weewx/en
        lang = en
        enable = true

    [[Bootstrap-es]]
        skin = Bootstrap
        HTML_ROOT = /var/www/weewx/es
        lang = es
        enable = true

The files for "de" ([[StandardReport]]) will be in /var/www/weewx
"fr" in /var/www/weewx/fr,
"en" in/var/www/weewx/en,
"es" /var/www/weewx/es

Yves Martin

unread,
Jul 11, 2023, 8:07:52 AM7/11/23
to weewx-user
OK, I already did that.
I have a lot o errors, I have to check now.
Tks.

Yves

Reply all
Reply to author
Forward
0 new messages