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

Improve "ago" translation to Greek #1184

Merged
merged 1 commit into from
Aug 26, 2024
Merged
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
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] == "Μαΐ"
Loading