Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/pendulum/locales/locale.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ def normalize_locale(cls, locale: str) -> str:
if m:
return f"{m.group(1).lower()}_{m.group(2).lower()}"
else:
return locale.lower()
lower = locale.lower()
if lower == 'ua':
# Backward compatibility. Ukrainian was 'ua' initially.
lower = 'uk'
return lower
Comment thread
nykula marked this conversation as resolved.
Outdated

def get(self, key: str, default: Any | None = None) -> Any:
if key in self._key_cache:
Expand Down
281 changes: 0 additions & 281 deletions src/pendulum/locales/ua/locale.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
"""
ua custom locale file.
"""
from __future__ import annotations
translations = {
"units": {"few_second": "кілька секунд"},
# Relative time
"ago": "{} тому",
"from_now": "за {}",
"after": "{0} посіля",
"before": "{0} до",
# Date formats
"date_formats": {
"LTS": "HH:mm:ss",
"LT": "HH:mm",
"L": "DD.MM.YYYY",
"LL": "D MMMM YYYY р.",
"LLL": "D MMMM YYYY р., HH:mm",
"LLLL": "dddd, D MMMM YYYY р., HH:mm",
},
}
"""
uk custom locale file.
"""
from __future__ import annotations


translations = {
"units": {"few_second": "кілька секунд"},
# Relative time
"ago": "{} тому",
"from_now": "через {}",
"after": "через {0}",
"before": "{0} тому",
# Date formats
"date_formats": {
"LTS": "HH:mm:ss",
"LT": "HH:mm",
"L": "DD.MM.YYYY",
"LL": "D MMMM YYYY",
"LLL": "D MMMM YYYY, HH:mm",
"LLLL": "ddd, D MMMM YYYY, HH:mm",
},
}
Loading
Loading