Skip to content

Commit

Permalink
PR suggestion
Browse files Browse the repository at this point in the history
Co-authored-by: Arkadii Yakovets <[email protected]>
  • Loading branch information
KJhellico and arkid15r committed Aug 15, 2023
1 parent 6a2ff3f commit c46a733
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions holidays/holiday_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,14 +327,11 @@ def __init__(

name: Optional[str] = getattr(self, "country", getattr(self, "market", None))
if name:
locale_path = Path(__file__).with_name("locale")
translator: NullTranslations = translation(
name,
fallback=True,
languages=[language]
if language and language in self.supported_languages
else None,
localedir=str(locale_path),
fallback=language is None,
languages=[language] if language in self.supported_languages else None,
localedir=str(Path(__file__).with_name("locale")),
)
self.tr = translator.gettext

Expand Down

0 comments on commit c46a733

Please sign in to comment.