Closed ivanistheone closed 6 years ago
Before this PR, looking for Spanish by name was retuning Nicaraguan
>>> from le_utils.constants.languages import getlang, getlang_by_name, getlang_by_native_name >>> lang_obj = getlang_by_name('Spanish') >>> lang_obj.code 'es-NI'
There was a bug in the "enrichment" logic (edge case only applies to Spanish) that used the last occurence of the string.
After this PR, the un-localized Spanish gets processed first and so becomes the default:
>>> from le_utils.constants.languages import getlang, getlang_by_name, getlang_by_native_name >>> lang_obj = getlang_by_name('Spanish') >>> lang_obj.code 'es'
The second commit also fixes some inconsistensies in the native_name attributes. I enforced the convention that commas separate sifferent native names, and extra attributes in brackets.
native_name
Before this PR, looking for Spanish by name was retuning Nicaraguan
There was a bug in the "enrichment" logic (edge case only applies to Spanish) that used the last occurence of the string.
After this PR, the un-localized Spanish gets processed first and so becomes the default:
The second commit also fixes some inconsistensies in the
native_name
attributes. I enforced the convention that commas separate sifferent native names, and extra attributes in brackets.