Skip to content

Commit

Permalink
config: add fallback for language config
Browse files Browse the repository at this point in the history
  • Loading branch information
SoulMelody committed Feb 9, 2025
1 parent 86f4729 commit d1a2e75
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libresvip/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,9 @@ def from_locale(cls, locale: str) -> Language:
locale = cls.to_language(locale)
return {
"zh-cn": cls.CHINESE,
"en-us": cls.ENGLISH,
"ja-jp": cls.JAPANESE,
"de-de": cls.GERMAN,
}[locale]
}.get(locale, cls.ENGLISH)

@classmethod
def auto(cls) -> Language:
Expand Down

0 comments on commit d1a2e75

Please sign in to comment.