Fix language filter codes (#4841)
* Fix language filter codes CLD3 returns BCP-47 language identifier, filter settings expect identifiers in the ISO 639-1 format. Convert between formats, and exclude duplicate languages from filter choices (zh-CN->zh) * Fix zh name
This commit is contained in:
@@ -4,10 +4,10 @@ require 'rails_helper'
|
||||
|
||||
describe SettingsHelper do
|
||||
describe 'the HUMAN_LOCALES constant' do
|
||||
it 'has the same number of keys as I18n locales exist' do
|
||||
it 'includes all I18n locales' do
|
||||
options = I18n.available_locales
|
||||
|
||||
expect(described_class::HUMAN_LOCALES.keys).to eq(options)
|
||||
expect(described_class::HUMAN_LOCALES.keys).to include(*options)
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user