Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Months names in English instead of my language #24

Closed
stalkerGH opened this issue Jul 24, 2023 · 6 comments
Closed

Months names in English instead of my language #24

stalkerGH opened this issue Jul 24, 2023 · 6 comments

Comments

@stalkerGH
Copy link

Hello seehase.

Thank you for your improvement of NeoWX skin for Weewx! I've updated my Weewx installation, translated string in history.html.tmpl but months names abbreviations are still generated in English. How/where can I change them?

@W0CHP
Copy link
Collaborator

W0CHP commented Jul 24, 2023

  1. Have you deleted the rendered HTML file and re-generated the reports?
  2. Month/day, etc. names for WeeWX are actually derived from the host/server operating system, not WeeWX itself; and certainly not the skin. So you will need to change the locale/i18n setting to your locale on the server itself, if it is not already,

@stalkerGH
Copy link
Author

  1. Yes, I've removed all files from /var/www/html/weewx. Didn't re-generated reports because Weewx does it on every run (I think so).
  2. I got my locale set, it's visible in Weewx log (OS name, Python version etc.).

@W0CHP
Copy link
Collaborator

W0CHP commented Jul 24, 2023

OK cool, sounds like you have most things sorted.

When I work on/develop this skin, I stop WeeWX entirely, delete all rendered html, and manually re-gen. the reports to validate:

sudo systemctl stop weewx && sudo rm -rf /path-to-your-html-reports/* && sudo wee_reports

(running wee_reports directly also allows you to see any parsing/generation/etc. errors.)

From the OS and its env. standpoint, there may be a couple of other options for you:

@stalkerGH
Copy link
Author

OK, I got the solution. First I have done things you recommend - stopped Weewx, cleared WWW directory, re-created reports, checked locale settings (they were perfectly correct - locale -k LC_TIME has proven that month names are translated), finally started Weewx again. But it failed, month names are still in English.

So I looked into the skin's code and found it - in skin.conf :) There is a section named [HistoryReport] with monthnames directive. I had to translate it - 30 seconds of work - and everything is working as expected.

:)

@stalkerGH
Copy link
Author

Thanks for help. Problem is now solved so I close the issue.

@W0CHP
Copy link
Collaborator

W0CHP commented Jul 24, 2023

@stalkerGH awesome! Nice work. Cheers 🥂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants