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

Translation of combined diagram labels #149

Closed
Wooza opened this issue Apr 2, 2023 · 4 comments
Closed

Translation of combined diagram labels #149

Wooza opened this issue Apr 2, 2023 · 4 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation support
Milestone

Comments

@Wooza
Copy link

Wooza commented Apr 2, 2023

Describe the bug
I'm using WeeWX 4.10.2 and this skin in version 3.1.1. Even though there are translations available, there seem to be some locations where the English text is hard-coded. Some charts are correctly translated on some pages, not but on others, for example, the Outside Humidity chart uses the configured language on the index.html but not on month-yyyy-mm.html

To Reproduce
Steps to reproduce the behavior:

  1. Set report language to de
  2. Generate report
  3. Some parts of some pages are still rendered in English, see screenshot.

Expected behavior
There are existing translations in de.conf, but they are seemingly not used.
I would expect that the skin uses the configured language.

Screenshots
image

@Wooza Wooza added the bug Something isn't working label Apr 2, 2023
@Daveiano
Copy link
Owner

Daveiano commented Apr 2, 2023

Some charts are correctly translated on some pages, not but on others

You are talking about the labels of the combined graphs ("Temperature/Dewpoint", "Windchill/Heatindex", etc), right? Yes, that's the current behaviour of the skin, you need to translate the labels for these by yourself.

There is also an entry about this in the wiki, FAQ, see "Q: The labels of the combined diagrams "Temperature / Dewpoint" or "Windchill / Heatindex" are not translated."

But you are right, the skin should use the configured default translations, I will have a look! Please use the described workaround in the meantime.

@Daveiano Daveiano added this to the 3.2.0 milestone Apr 2, 2023
@Daveiano Daveiano added the documentation Improvements or additions to documentation label Apr 7, 2023
@Wooza
Copy link
Author

Wooza commented Apr 8, 2023

Yes, the examples that I posted were related to combined diagrams, so the mentioned fix should work.
However, there also diagrams which are not combined but do not use the configured language. For example on the monthly page (month-yyyy-mm.html), see screenshot:
image

@Daveiano
Copy link
Owner

Daveiano commented Apr 8, 2023

Ok thats very strange. You are sure about you set the language to de?

You need to have something like this in weewx.conf:

[[WdcReport]]
      skin = weewx-wdc
      enable = true
      lang = de
      unit_system = metric

The labels of "single diagrams" like rain rate or rain should definitely be translated, if not there is something strange going on. Could you provide a full-page screenshot of the page? Are there actually parts translated from the month page or is it just en?

Edit: I just noticed you mentioned the month-yyyy-mm.html templates. These pages will NOT get generated again if they are present and the time is in the past. So once a file, eg. month-2021-10.html (which is in the past) was generated, it will not get regenerated. I suspect you changed the language from en to de after the first report run, so the files are initially generated in en.

To solve this, just remove them and wait for the next report run.

rm -rf /var/www/html/weewx/month*
rm -rf /var/www/html/weewx/year*

@Wooza
Copy link
Author

Wooza commented Apr 9, 2023

Yes, that makes sense. Again, thanks for your quick help. Really appreciate it :)

@Daveiano Daveiano changed the title Translation not working for all components. Translation of combined diagram labels Apr 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation support
Projects
None yet
Development

No branches or pull requests

2 participants