MagicMirror icon indicating copy to clipboard operation
MagicMirror copied to clipboard

Remove unneeded (and unwanted) '.' after the year in calendar repeatingCountTitle

Open mcavoya opened this issue 3 years ago • 1 comments

Platform: Raspberry Pi 3 (browser/Electron version agnostic) Node Version: 16.16.0 MagicMirror² Version: 2.20.0 Description: Calendar shows a '. ' after the year in repeatingCountTitle Steps to Reproduce: Load a calendar with repeating events. e.g. Joe's birthday, with a start date seven years ago, that repeats yearly. Expected Results: "Joe's Birthday, 7 years" Actual Results: "Joe's Birthday, 7. years" Configuration: see attached config.zip Additional Notes: The fix is simple. Change line 265 in calendar.js

from: repeatingCountTitle = ", " + yearDiff + ". " + repeatingCountTitle;
to:   repeatingCountTitle = ", " + yearDiff + repeatingCountTitle;

In cases where puncutation is desired after yearDiff, the config file can simply add it in the repeatingCountTitle.

mcavoya avatar Aug 05 '22 13:08 mcavoya

Thx for the report @mcavoya It indeed seems a little off when looking at the result in english. Since @MichMich wrote that line (way back in 2016) maybe he had some other i18n format in mind?

rejas avatar Aug 09 '22 07:08 rejas

I think this should be fixed if there comes no veto by @MichMich

khassel avatar Jan 13 '23 21:01 khassel

All fine by me. Not emotionally attached to the .. ;)

MichMich avatar Jan 14 '23 05:01 MichMich

I do not believe this topic should be marked Closed.

The code was refactored, but the offending '.' character remains. It appears right after {yearDiff}.

repeatingCountTitle = ', ${yearDiff}. ${repeatingCountTitle}';

And it can be seen here as "31. Years"

Screenshot 2023-04-07 070457

mcavoya avatar Apr 07 '23 12:04 mcavoya

you are right, sadly it was reintroduced by another PR:

grafik

So I will reopen this issue and fix it again with a new PR ...

khassel avatar Apr 07 '23 12:04 khassel

Thanks. I can only imagine that's a frequent squence of events.

mcavoya avatar Apr 07 '23 12:04 mcavoya

fixed with new release v2.24.0

khassel avatar Jul 01 '23 19:07 khassel