Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UA locale #793

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
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
Empty file.
23 changes: 23 additions & 0 deletions src/pendulum/locales/ua/custom.py
Original file line number Diff line number Diff line change
@@ -0,0 +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",
},
}
281 changes: 281 additions & 0 deletions src/pendulum/locales/ua/locale.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,281 @@
from __future__ import annotations

from pendulum.locales.ua.custom import translations as custom_translations


"""
ua locale file.

It has been generated automatically and must not be modified directly.
"""


locale = {
"plural": lambda n: "few"
if (
(
(0 == 0 and (0 == 0))
and ((n % 10) == (n % 10) and ((n % 10) >= 2 and (n % 10) <= 4))
)
and (not ((n % 100) == (n % 100) and ((n % 100) >= 12 and (n % 100) <= 14)))
)
else "many"
if (
(
((0 == 0 and (0 == 0)) and ((n % 10) == (n % 10) and ((n % 10) == 0)))
or (
(0 == 0 and (0 == 0))
and ((n % 10) == (n % 10) and ((n % 10) >= 5 and (n % 10) <= 9))
)
)
or (
(0 == 0 and (0 == 0))
and ((n % 100) == (n % 100) and ((n % 100) >= 11 and (n % 100) <= 14))
)
)
else "one"
if (
((0 == 0 and (0 == 0)) and ((n % 10) == (n % 10) and ((n % 10) == 1)))
and (not ((n % 100) == (n % 100) and ((n % 100) == 11)))
)
else "other",
"ordinal": lambda n: "other",
"translations": {
"days": {
"abbreviated": {
0: "пн",
1: "вт",
2: "ср",
3: "чт",
4: "пт",
5: "сб",
6: "нд",
},
"narrow": {0: "пн", 1: "вт", 2: "ср", 3: "чт", 4: "пт", 5: "сб", 6: "нд"},
"short": {0: "пн", 1: "вт", 2: "ср", 3: "чт", 4: "пт", 5: "сб", 6: "нд"},
"wide": {
0: "понеділок",
1: "вівторок",
2: "середа",
3: "четвер",
4: "п'ятниця",
5: "субота",
6: "неділя",
},
},
"months": {
"abbreviated": {
1: "січ.",
2: "лют.",
3: "бер.",
4: "квіт.",
5: "трав.",
6: "черв.",
7: "лип.",
8: "серп.",
9: "вер.",
10: "жовт.",
11: "лист.",
12: "груд.",
},
"narrow": {
1: "С",
2: "Л",
3: "Б",
4: "К",
5: "Т",
6: "Ч",
7: "Л",
8: "С",
9: "В",
10: "Ж",
11: "Л",
12: "Г",
},
"wide": {
1: "січня",
2: "лютого",
3: "березня",
4: "квітня",
5: "травня",
6: "червня",
7: "липня",
8: "серпня",
9: "вересня",
10: "жовтня",
11: "листопада",
12: "грудня",
},
},
"units": {
"year": {
"one": "{0} рік",
"few": "{0} роки",
"many": "{0} років",
"other": "{0} роки",
},
"month": {
"one": "{0} місяць",
"few": "{0} місяця",
"many": "{0} місяців",
"other": "{0} місяці",
},
"week": {
"one": "{0} тиждень",
"few": "{0} тижня",
"many": "{0} тижнів",
"other": "{0} тижні",
},
"day": {
"one": "{0} день",
"few": "{0} дні",
"many": "{0} днів",
"other": "{0} дні",
},
"hour": {
"one": "{0} година",
"few": "{0} години",
"many": "{0} годин",
"other": "{0} години",
},
"minute": {
"one": "{0} хвилина",
"few": "{0} хвилини",
"many": "{0} хвилин",
"other": "{0} хвилини",
},
"second": {
"one": "{0} секунда",
"few": "{0} секунди",
"many": "{0} секунд",
"other": "{0} секунди",
},
"microsecond": {
"one": "{0} мікросекунда",
"few": "{0} мікросекунди",
"many": "{0} мікросекунд",
"other": "{0} мікросекунд",
},
},
"relative": {
"year": {
"future": {
"other": "за {0} роки",
"one": "за {0} рік",
"few": "за {0} роки",
"many": "за {0} років",
},
"past": {
"other": "{0} роки тому",
"one": "{0} рік тому",
"few": "{0} роки тому",
"many": "{0} років тому",
},
},
"month": {
"future": {
"other": "за {0} місяці",
"one": "за {0} місяць",
"few": "за {0} місяця",
"many": "за {0} місяців",
},
"past": {
"other": "{0} місяці тому",
"one": "{0} місяц тому",
"few": "{0} місяця тому",
"many": "{0} місяців тому",
},
},
"week": {
"future": {
"other": "за {0} тижні",
"one": "за {0} тиждень",
"few": "за {0} тижня",
"many": "за {0} тижднів",
},
"past": {
"other": "{0} тижні тому",
"one": "{0} тиждень тому",
"few": "{0} тижня тому",
"many": "{0} тижнів тому",
},
},
"day": {
"future": {
"other": "за {0} дні",
"one": "за {0} день",
"few": "за {0} дні",
"many": "за {0} днів",
},
"past": {
"other": "{0} дні тому",
"one": "{0} день тому",
"few": "{0} дні тому",
"many": "{0} днів тому",
},
},
"hour": {
"future": {
"other": "за {0} години",
"one": "за {0} година",
"few": "за {0} години",
"many": "за {0} годин",
},
"past": {
"other": "{0} години тому",
"one": "{0} година тому",
"few": "{0} години тому",
"many": "{0} годин тому",
},
},
"minute": {
"future": {
"other": "за {0} хвилини",
"one": "за {0} хвилина",
"few": "за {0} хвилини",
"many": "за {0} хвилин",
},
"past": {
"other": "{0} хвилини тому",
"one": "{0} хвилина тому",
"few": "{0} хвилини тому",
"many": "{0} хвилин тому",
},
},
"second": {
"future": {
"other": "за {0} секунди",
"one": "за {0} секунду",
"few": "за {0} секунди",
"many": "за {0} секунд",
},
"past": {
"other": "{0} секунди тому",
"one": "{0} секунду тому",
"few": "{0} секунди тому",
"many": "{0} секунд тому",
},
},
},
"day_periods": {
"midnight": "опівночі",
"am": "AM",
"noon": "полудень",
"pm": "PM",
"morning1": "ранку",
"morning2": "до півдня",
"afternoon1": "дня",
"afternoon2": "пополуднє",
"evening1": "ввечері",
"evening2": "увечері",
"night1": "в ніч",
},
"week_data": {
"min_days": 1,
"first_day": 0,
"weekend_start": 5,
"weekend_end": 6,
},
},
"custom": custom_translations,
}