forked from External/greenlight
GRN2-178: Generalized use of language_name based on Mozilla Mapping (#613)
* GRN2-178: Generalized use of language_name based on Moxilla Mapping * Fixed issues catched by rubocop * MAke sure the file with data exists * Removed language mapping from local code
This commit is contained in:
@ -17,10 +17,12 @@
|
||||
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 'bbb_api'
|
||||
require 'i18n/language/mapping'
|
||||
|
||||
module ApplicationHelper
|
||||
include MeetingsHelper
|
||||
include BbbApi
|
||||
include I18n::Language::Mapping
|
||||
|
||||
# Gets all configured omniauth providers.
|
||||
def configured_providers
|
||||
@ -54,9 +56,8 @@ module ApplicationHelper
|
||||
locales = I18n.available_locales
|
||||
language_opts = [['<<<< ' + t("language_default") + ' >>>>', "default"]]
|
||||
locales.each do |locale|
|
||||
language_name = t("language_name", locale: locale)
|
||||
language_name = locale.to_s if locale != :en && language_name == 'English'
|
||||
language_opts.push([language_name, locale.to_s])
|
||||
language_mapping = I18n::Language::Mapping.language_mapping_list[locale.to_s.gsub("_", "-")]
|
||||
language_opts.push([language_mapping["nativeName"], locale.to_s])
|
||||
end
|
||||
language_opts.sort
|
||||
end
|
||||
|
Reference in New Issue
Block a user