Incorrect case of month names
See original GitHub issueMonth names are printed in the nominative case for all languages except Russian, where it should be январь
instead of января
in the example bellow, compare:
--language de_DE
:--language en_US
:--language fi_FI
:--language fr_FR
:--language ru_RU
:
That’s caused by: https://github.com/flopp/GpxTrackPoster/blob/2a405da9dbdb153c584beed055fd84879724a075/gpxtrackposter/calendar_drawer.py#L105 Let’s check it:
$ python
>>> from datetime import datetime
>>> import locale
>>> locale.setlocale(locale.LC_ALL, 'ru_RU.UTF-8')
'ru_RU.UTF-8'
>>> datetime.today().strftime('%B')
'сентября'
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Names of some months don't make sense [closed]
2 Answers 2 · Martius - Named after Mars, the Roman God of War · Aprilis - Uncertain (see Wikipedia: Aprilis) · Maius...
Read more >Flash Fill - Wrong Pattern for Filling Month Names
Hi all, This is what the Flash Fill suggests to fill the full month names! It should be smart in this regard to...
Read more >128314 – Obscure and unmanageable long month name ...
I suppose it's OK to keep it capitalized, and the '[NatNum12 MMMM=lower]' is fine when one wants to have it not capitalized. This...
Read more >Wrong month names in the years view · Issue #209 - GitHub
The month names are displayed incorrectly on load. It displays correctly only after I click any month and then reload.
Read more >Months not being combined in Count Case When statement
My query is splitting the months up and I cannot figure out what I am doing wrong. SELECT DATENAME(MONTH, hb_Disputes.OPENED) AS MonthName, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@sikmir I’ve just added explicit month translations (with initial translations based on
strftime('%B')
).I would be great if you could fix the Russian translation file (
locale/ru_RU/LC_MESSAGES/gpxposter.po
) such that the month names are correct.@sikmir for now, I’ve added
localization.py
with functionslocalized_day_of_week_name
andlocalized_month_name
that use the day/month names of the current locale by default. If a language (like Russian) requires some special treatment, the functions can be adapted accordingly; I’ve already done this for Chinese short day names. You can now extendlocalized_month_name
with the special cases for Russian.