question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect case of month names

See original GitHub issue

Month 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: out-de
  • --language en_US: out-en
  • --language fi_FI: out-fi
  • --language fr_FR: out-fr
  • --language ru_RU: out-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:closed
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
floppcommented, Sep 10, 2020

@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.

1reaction
floppcommented, Sep 2, 2020

@sikmir for now, I’ve added localization.py with functions localized_day_of_week_name and localized_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 extend localized_month_name with the special cases for Russian.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found