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

get_language_from_abbr() does not recognize ui_language #106

Open
DanielNoord opened this issue Apr 25, 2021 · 0 comments
Open

get_language_from_abbr() does not recognize ui_language #106

DanielNoord opened this issue Apr 25, 2021 · 0 comments

Comments

@DanielNoord
Copy link
Contributor

When using get_language_from_abbr() to get the full string of the ui_language in user_data None will be returned. This is because the ui_language is not added the languages lists that get_language_from_abbr() uses. I think this would be solved by making the lookup from get_language_from_abbr and get_abbreviation_of be based on a stored list of language-abbreviation pairs.

Besides, I think returning None when failing to find the abbreviation is not really expected behavior and it would be better if an exception was raised. Raising that exception should be easy and I can make a PR if you want.

@DanielNoord DanielNoord changed the title get_language_from_abbr does not recognize ui_language get_language_from_abbr() does not recognize ui_language Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant