Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
14 changes: 12 additions & 2 deletions arrow/locales.py
Original file line number Diff line number Diff line change
Expand Up @@ -1757,8 +1757,12 @@ class UkrainianLocale(SlavicBaseLocale):

timeframes: ClassVar[Mapping[TimeFrameLiteral, Union[str, Mapping[str, str]]]] = {
"now": "зараз",
"second": "секунда",
"seconds": "{0} кілька секунд",
"second": "секунду",
"seconds": {
"singular": "{0} секунду",
"dual": "{0} секунди",
"plural": "{0} секунд",
},
"minute": "хвилину",
"minutes": {
"singular": "{0} хвилину",
Expand All @@ -1773,6 +1777,12 @@ class UkrainianLocale(SlavicBaseLocale):
},
"day": "день",
"days": {"singular": "{0} день", "dual": "{0} дні", "plural": "{0} днів"},
"week": "тиждень",
"weeks": {
"singular": "{0} тиждень",
"dual": "{0} тижні",
"plural": "{0} тижнів",
},
"month": "місяць",
"months": {
"singular": "{0} місяць",
Expand Down
9 changes: 6 additions & 3 deletions tests/test_locales.py
Original file line number Diff line number Diff line change
Expand Up @@ -3665,24 +3665,27 @@ def test_format_relative_future(self):
class TestUkrainianLocale:
def test_timeframes(self):
assert self.locale._format_timeframe("now", 0) == "зараз"
assert self.locale._format_timeframe("second", 1) == "секунда"
assert self.locale._format_timeframe("second", 1) == "секунду"
assert self.locale._format_timeframe("minute", 1) == "хвилину"
assert self.locale._format_timeframe("hour", 1) == "годину"
assert self.locale._format_timeframe("week", 1) == "тиждень"
assert self.locale._format_timeframe("day", 1) == "день"
assert self.locale._format_timeframe("month", 1) == "місяць"
assert self.locale._format_timeframe("year", 1) == "рік"

assert self.locale._format_timeframe("seconds", 2) == "2 кілька секунд"
assert self.locale._format_timeframe("seconds", 2) == "2 секунди"
assert self.locale._format_timeframe("minutes", 2) == "2 хвилини"
assert self.locale._format_timeframe("hours", 2) == "2 години"
assert self.locale._format_timeframe("days", 2) == "2 дні"
assert self.locale._format_timeframe("weeks", 2) == "2 тижні"
assert self.locale._format_timeframe("months", 2) == "2 місяці"
assert self.locale._format_timeframe("years", 2) == "2 роки"

assert self.locale._format_timeframe("seconds", 5) == "5 кілька секунд"
assert self.locale._format_timeframe("seconds", 5) == "5 секунд"
assert self.locale._format_timeframe("minutes", 5) == "5 хвилин"
assert self.locale._format_timeframe("hours", 5) == "5 годин"
assert self.locale._format_timeframe("days", 5) == "5 днів"
assert self.locale._format_timeframe("weeks", 5) == "5 тижнів"
assert self.locale._format_timeframe("months", 5) == "5 місяців"
assert self.locale._format_timeframe("years", 5) == "5 років"

Expand Down
Loading