You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using get_language_from_abbr() to get the full string of the ui_language in user_dataNone 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.
The text was updated successfully, but these errors were encountered:
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
When using
get_language_from_abbr()
to get the full string of theui_language
inuser_data
None
will be returned. This is because theui_language
is not added the languages lists thatget_language_from_abbr()
uses. I think this would be solved by making the lookup fromget_language_from_abbr
andget_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.
The text was updated successfully, but these errors were encountered: