idaho / hassio-trash-card

TrashCard - indicates what type of trash will be picked up next based on your calendar entries 🗑️
Apache License 2.0
137 stars 19 forks source link

[Bug]: czech translations - dní do (days to) not working properly #443

Open froxic opened 1 week ago

froxic commented 1 week ago

Requirements

Current Behavior

There is issue in displaying days to waste pickup, for example instead of "za 5 dní" there is only "za dní" displayed. "Zítra" is working properly, tomorrow Ill check if the current day.

image

Expected Behavior

Display number instead of text

Also according czech gramar rules correct translation should be for 2-4 days - "dny" za 2 dny za 3 dny za 4 dny --------- for more then 4 its always "dní"... za 5 dní za 6 dní ....

Steps To Reproduce

No response

Context

event_grouping: true drop_todayevents_from: "10:00:00" next_days: 40 pattern:

Environment

- Browser: Brave Version 1.70.126 Chromium: 129.0.6668.100 (Official Build) (arm64)
- HA Version: Core 2024.10.2 / 20241002.3
- TrashCard: 2.4.2

Debug data

No response

Anything else?

No response

tbowmo commented 1 week ago

as to the part of dni vs dny, that is hard to do properly in a simple translation system. In English language they only distinguish between one and multiple, and the translation is built around English, but that is also kind of broken here, as it should be something like

0 days
1 day
2 days
3 days

but from looking at the code, it only says "days" if it's more than 1 days to the end (should also be 0)

the above is also true in most (if not all) northern languages (Danish, Swedish, Norwegian etc)