scheduler-card icon indicating copy to clipboard operation
scheduler-card copied to clipboard

Weird (German) translation

Open Ro4cHii opened this issue 2 years ago • 7 comments

Checklist

  • [X] I checked for similar existing issues (both open and closed) before posting.
  • [X] I will participate in further discussion about this issue and can help by testing (if requested).

Card Version

v2.3.5

Component Version

v3.2.10

Bug description

Since some versions, the German translation of sunrise/sunset is looking weird.

The last character of the preposition is cut and the noun lost its capital letter:

image

I checked the localize files of the scheduler card. In earlier versions, these words were contained in there but in the current one they are not. So I guess the words are being extracted from another card/integration. Unfortunately, I wasn't able to find their origin searching my whole Home Assistant directory.

Do you have an idea where this information gets extracted?

Steps to reproduce

Use the German translation of the scheduler card.

Additional info

No response

Ro4cHii avatar Jul 04 '22 20:07 Ro4cHii

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Aug 04 '22 01:08 github-actions[bot]

Still valid.

Ro4cHii avatar Aug 04 '22 05:08 Ro4cHii

This is caused due to changes in the translation files of HA. I made a fix for it: https://github.com/nielsfaber/scheduler-card/commit/41a562695476d9f875f2c469aa5429f0492da589 I will include this fix in the upcoming release. Thanks for reporting the issue 👍

nielsfaber avatar Aug 08 '22 15:08 nielsfaber

Great, thanks a lot! 😃

Ro4cHii avatar Aug 08 '22 20:08 Ro4cHii

This is added in the v3.2.6 release.

nielsfaber avatar Aug 21 '22 05:08 nielsfaber

Thank you very much, this is only solved partially though.

The first letter of the noun is still without capital letter (e. g. sonnenaufgang instead of Sonnenaufgang).

Maybe another minor fix for the next release? :)

Ro4cHii avatar Aug 22 '22 14:08 Ro4cHii

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Sep 22 '22 01:09 github-actions[bot]

See above.

Ro4cHii avatar Sep 29 '22 11:09 Ro4cHii

Sorry for not following up on this.

I see that the code of scheduler card forces the translation to lower-case: https://github.com/nielsfaber/scheduler-card/blob/59bac93be453c638b192c4472ab574f3436dd9ce/src/data/item_display/compute_time_display.ts#L16-L17

It was done because in HA the translations (for all languages) are capitalized, but it doesn't make sense (in all languages except german) unless its the first word of a sentence. https://github.com/home-assistant/frontend/blob/0b637fc9bdb5a7c517bcf990cdb326d94145ad70/translations/frontend/en.json#L1611-L1612

It's hard to combine both worlds together. If I solve things for you it would make things worse for other languages. Perhaps I could implement an exception for the german language, but the code doesn't become prettier. I will give it some thought.

nielsfaber avatar Sep 29 '22 19:09 nielsfaber

No worries, thank you for considering!

I know that it's probably not due to you but some versions ago nouns were capitalized. Of course, in the end it's just "cosmetics" but for Germans no capitalization looks indeed really weird and simply wrong.

Ro4cHii avatar Sep 29 '22 22:09 Ro4cHii

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Oct 31 '22 01:10 github-actions[bot]

This is finally fixed now.

nielsfaber avatar Nov 17 '22 08:11 nielsfaber

Unfortunately, it is still not fixed for me. I even tried to create a new automation - the capital letter is still small.

Ro4cHii avatar Nov 17 '22 11:11 Ro4cHii

You should update the card to v2.3.8 (and clear the cache if HACS doesn't do it for you) to see the change.

nielsfaber avatar Nov 17 '22 11:11 nielsfaber

I updated both the card and the scheduler component, cleared my browser's cache, restarted HA, added a new schedule - no effect.

Ro4cHii avatar Nov 17 '22 13:11 Ro4cHii