Skip to content

fix: map locale 'uk' to 'ua' directory (Ukrainian ISO 639 code)#958

Closed
JKDasondee wants to merge 1 commit intopython-pendulum:masterfrom
JKDasondee:fix/955-ukrainian-locale-uk-alias
Closed

fix: map locale 'uk' to 'ua' directory (Ukrainian ISO 639 code)#958
JKDasondee wants to merge 1 commit intopython-pendulum:masterfrom
JKDasondee:fix/955-ukrainian-locale-uk-alias

Conversation

@JKDasondee
Copy link
Copy Markdown

Fixes #955

The Ukrainian locale directory is named ua but the correct ISO 639-1 language code is uk. Calling diff_for_humans(locale='uk') currently raises ValueError: Locale [uk] does not exist.

This adds a mapping in Locale.load() so that both uk and ua are accepted.

@Secrus
Copy link
Copy Markdown
Collaborator

Secrus commented Apr 10, 2026

There is already #957, please don't duplicate existing, active PRs.

@Secrus Secrus closed this Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ukrainian locale should be uk not ua

2 participants