linguist
linguist copied to clipboard
Allow to pass locales as atoms to MemorizedVocabulary
Hello.
I've already fixed passing locales as atoms into t! and t functions: #30
But MemorizedVocabulary module does not check locale before saving it to :ets. So you can easily add call locale(:en, ...), but then you cannot call t(:en, "path") because locale here is checked with normalize_locale function which accepts only strings.
What I've changed::
- Added locale name normalization step to
locale/2function - Allowed to pass atom locales into
normalize_locale/1function - Added few tests for this case