Simple Machines Community Forum

SMF Development => Bug Reports => Topic started by: Pyrhel on March 14, 2022, 09:12:20 AM

Title: Calendar selection is not properly fitted
Post by: Pyrhel on March 14, 2022, 09:12:20 AM
Hello,
While I was translating the forum, I found that the calendar selection does not properly fit when the week days are not in english:
calendar.png

The strings are exactly the same length:
$txt['days_short'] = array('Нед', 'Пон', 'Вто', 'Сря', 'Чет', 'Пет', 'Съб');
$txt['days_short'] = array('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');

SMF VERSION: 2.1.1
Title: Re: Calendar selection is not properly fitted
Post by: Arantor on March 14, 2022, 09:43:54 AM
They're not the same length though. The Cyrillic letters on average are wider, similar to how w is wider than i in most sans-serif fonts, and the CSS just fits a fixed width in it.
Title: Re: Calendar selection is not properly fitted
Post by: Pyrhel on March 15, 2022, 03:03:20 AM
Hm, you're right, I didn't know that - it depends on the font - I checked what is used (Arial), pasted the translations in Word and format them into Arial, so here is the result - slightly longer string:
Screenshot 2022-03-15 082457.png

Is the misfit of the calendar considered as a bug?
Title: Re: Calendar selection is not properly fitted
Post by: @rjen on March 15, 2022, 03:12:30 AM
I believe it's definitely something that's worth fixing. After all, SMF is available in many languages, and it should be prepared for these cases..
Title: Re: Calendar selection is not properly fitted
Post by: Aleksi "Lex" Kilpinen on March 15, 2022, 03:25:27 AM
Yup, I'd call that a bug. Minor one, but a bug none the less.

Edit:
This has been tracked as #7401 (https://github.com/SimpleMachines/SMF2.1/issues/7401)
Title: Re: Calendar selection is not properly fitted
Post by: Max22 on December 23, 2022, 05:59:07 PM
Does this still happen in v2.1.3?
Title: Re: Calendar selection is not properly fitted
Post by: Speed King on December 23, 2022, 11:15:36 PM
Quote from: Max22 on December 23, 2022, 05:59:07 PMDoes this still happen in v2.1.3?

Yes, this issue is not fixed yet.
Title: Re: Calendar selection is not properly fitted
Post by: Diego Andrés on May 21, 2024, 09:30:31 PM
Fixed in #7771 (https://github.com/SimpleMachines/SMF/pull/7771)
Will be included in 2.1.5 patch.