Skip to content

Commit

Permalink
Fix language handling
Browse files Browse the repository at this point in the history
Language id can be given in upper or lower case in the main script.
Internally, the language id is handled in lower case.

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
  • Loading branch information
lauft committed Nov 21, 2023
1 parent bd38f08 commit a16664f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/holidata/holidays/holidays.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def validate_language_or_get_default(self, lang_id):
raise ValueError(
f"Country '{self.id}' has no default language specified! Choose one of [{', '.join(self.languages)}].")

return lang_id
return lang_id.lower()

def define_holiday(self):
generator = HolidayGenerator(self.id, self.default_lang, self.easter_type)
Expand Down

0 comments on commit a16664f

Please sign in to comment.