|
@ -13,6 +13,8 @@ from patacrep.latex.syntax import tex2plain, parse_song |
|
|
|
|
|
|
|
|
LOGGER = logging.getLogger(__name__) |
|
|
LOGGER = logging.getLogger(__name__) |
|
|
|
|
|
|
|
|
|
|
|
DEFAULT_LANGUAGE = "en_us" |
|
|
|
|
|
|
|
|
BABEL_LANGUAGES = OrderedDict(( |
|
|
BABEL_LANGUAGES = OrderedDict(( |
|
|
('de_de', 'german'), |
|
|
('de_de', 'german'), |
|
|
('de_at', 'austrian'), |
|
|
('de_at', 'austrian'), |
|
@ -132,13 +134,14 @@ def checklanguage(lang): |
|
|
available = ", ".join(BABEL_LANGUAGES.keys()) |
|
|
available = ", ".join(BABEL_LANGUAGES.keys()) |
|
|
raise UnknownLanguage( |
|
|
raise UnknownLanguage( |
|
|
original=lang, |
|
|
original=lang, |
|
|
fallback="en_us", |
|
|
fallback=DEFAULT_LANGUAGE, |
|
|
message=( |
|
|
message=( |
|
|
"Unknown language code '{}' (supported: {}). Using " |
|
|
"Unknown language code '{}' (supported: {}). Using " |
|
|
"default 'en_us' instead." |
|
|
"default '{}' instead." |
|
|
).format( |
|
|
).format( |
|
|
lang, |
|
|
lang, |
|
|
available |
|
|
available, |
|
|
|
|
|
DEFAULT_LANGUAGE, |
|
|
) |
|
|
) |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|