Skip to content

Commit

Permalink
Fix "ago" Greek translation and month typo (#1184)
Browse files Browse the repository at this point in the history
  • Loading branch information
pothitos authored Aug 26, 2024
1 parent 587af5f commit 02e3b1b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arrow/locales.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ class FrenchCanadianLocale(FrenchBaseLocale, Locale):
class GreekLocale(Locale):
names = ["el", "el-gr"]

past = "{0} πριν"
past = "πριν από {0}"
future = "σε {0}"
and_word = "και"

Expand Down Expand Up @@ -697,7 +697,7 @@ class GreekLocale(Locale):
"Φεβ",
"Μαρ",
"Απρ",
"Μαϊ",
"Μαΐ",
"Ιον",
"Ιολ",
"Αυγ",
Expand Down
11 changes: 11 additions & 0 deletions tests/test_locales.py
Original file line number Diff line number Diff line change
Expand Up @@ -3178,3 +3178,14 @@ def test_plurals_mk(self):
assert self.locale._format_timeframe("months", 11) == "11 oy"
assert self.locale._format_timeframe("year", 1) == "bir yil"
assert self.locale._format_timeframe("years", 12) == "12 yil"


@pytest.mark.usefixtures("lang_locale")
class TestGreekLocale:
def test_format_relative_future(self):
result = self.locale._format_relative("μία ώρα", "ώρα", -1)

assert result == "πριν από μία ώρα" # an hour ago

def test_month_abbreviation(self):
assert self.locale.month_abbreviations[5] == "Μαΐ"

0 comments on commit 02e3b1b

Please sign in to comment.