-
Bug
-
Resolution: Fixed
-
Minor
-
4.1.14, 4.5.1
There is a problem with month cases in the calendar.
Moodle currently does not have any mechanisms of taking cases into account.
In regular language strings, the problem with cases is usually solved by specifying local translations of the strings. But the calendar displays month names that are taken not from translated language strings, but from the server locales, and language strings are used to specify the date format.
There are strings in the language pack configs:
$string['strftimemonth'] = '%B'; - used only to go to the previous and next months in the calendar.
$string['strftimemonthyear'] = '%B %Y'; - Used only in the calendar as a header where the month is displayed, as text for links to the calendar, and in breadcrumbs.
The problem is in using '%B' in the month format. This format means the full spelling of the month. In the locale, the full month name is set so that it looks correct in the full date (formats containing the day before the month, '%d %B %Y'). However, if there is no day before the month name, the date becomes incorrect. Something like 'of October' and 'of October 2024'.
The problem can be solved by using the abbreviated month format '%b' in the specified strings. In this case, the abbreviated month format will be used, in which case will not matter.
*For languages with this problem, we suggest changing the strftimemonth and strftimemonthyear strings as follows:*
$string['strftimemonth'] = '%b';
$string['strftimemonthyear'] = '%b %Y';
Presumably, such a problem can arise in many languages where there are cases, for example, in all Cyrillic languages (Ukrainian, Czech, Bulgarian, Serbian, Belarusian, etc.), so it makes sense to solve this problem systematically by developing appropriate mechanisms.
The screenshots are given in English with slight modifications to make the problem clearer to the English speaker, even though there is no problem with English itself due to lack of cases in the monthes.
- has been marked as being related by
-
MDLSITE-7370 Finnish langconfig error
-
- Development in progress
-