Skip to content

Commit aa86264

Browse files
committed
Update Finnish locale
Use the correct declension for singular second and day, and remove the "muutama" from the plural seconds (seems to be old mishap with localization).
1 parent 8d9ae23 commit aa86264

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

arrow/locales.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -867,13 +867,13 @@ class FinnishLocale(Locale):
867867

868868
timeframes: ClassVar[Mapping[TimeFrameLiteral, Union[str, Mapping[str, str]]]] = {
869869
"now": "juuri nyt",
870-
"second": "sekunti",
871-
"seconds": {"past": "{0} muutama sekunti", "future": "{0} muutaman sekunnin"},
870+
"second": {"past": "sekunti", "future": "sekunnin"},
871+
"seconds": {"past": "{0} sekuntia", "future": "{0} sekunnin"},
872872
"minute": {"past": "minuutti", "future": "minuutin"},
873873
"minutes": {"past": "{0} minuuttia", "future": "{0} minuutin"},
874874
"hour": {"past": "tunti", "future": "tunnin"},
875875
"hours": {"past": "{0} tuntia", "future": "{0} tunnin"},
876-
"day": "päivä",
876+
"day": {"past": "päivä", "future": "päivän"},
877877
"days": {"past": "{0} päivää", "future": "{0} päivän"},
878878
"month": {"past": "kuukausi", "future": "kuukauden"},
879879
"months": {"past": "{0} kuukautta", "future": "{0} kuukauden"},

tests/test_locales.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,9 +1111,9 @@ def test_format_timeframe(self):
11111111

11121112
# Second(s)
11131113
assert self.locale._format_timeframe("second", -1) == "sekunti"
1114-
assert self.locale._format_timeframe("second", 1) == "sekunti"
1115-
assert self.locale._format_timeframe("seconds", -2) == "2 muutama sekunti"
1116-
assert self.locale._format_timeframe("seconds", 2) == "2 muutaman sekunnin"
1114+
assert self.locale._format_timeframe("second", 1) == "sekunnin"
1115+
assert self.locale._format_timeframe("seconds", -2) == "2 sekuntia"
1116+
assert self.locale._format_timeframe("seconds", 2) == "2 sekunnin"
11171117

11181118
# Minute(s)
11191119
assert self.locale._format_timeframe("minute", -1) == "minuutti"
@@ -1129,7 +1129,7 @@ def test_format_timeframe(self):
11291129

11301130
# Day(s)
11311131
assert self.locale._format_timeframe("day", -1) == "päivä"
1132-
assert self.locale._format_timeframe("day", 1) == "päivä"
1132+
assert self.locale._format_timeframe("day", 1) == "päivän"
11331133
assert self.locale._format_timeframe("days", -2) == "2 päivää"
11341134
assert self.locale._format_timeframe("days", 2) == "2 päivän"
11351135

0 commit comments

Comments
 (0)