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:
Eugen Rochko 2017-09-08 12:32:22 +02:00 committed by GitHub
parent 95f018a3d4
commit 1caf11ddcc
6 changed files with 21 additions and 4 deletions

View file

@ -13,7 +13,7 @@
selected: I18n.locale
= f.input :filtered_languages,
collection: I18n.available_locales,
collection: filterable_languages,
wrapper: :with_block_label,
include_blank: false,
label_method: lambda { |locale| human_locale(locale) },