Fixed #323 Allow users to select a language in settings (GRN-17) (#324)

* <Added ui for language setting and migration>

* <Option to choose languages added>

* <Fixed code style>

* <Added Rspec tests>

* <sync db>

* <Sync db>

* <Generalized language settings>

* <Fixed flash message>

* Fixed las issue with i18n fallback

* <Modified fallback config>

* <Fixed code style>
This commit is contained in:
John Ma
2018-12-06 16:00:22 -05:00
committed by Jesus Federico
parent 895af7494e
commit b3f37cd3b3
11 changed files with 89 additions and 8 deletions

View File

@ -46,6 +46,15 @@ module ApplicationHelper
Rails.configuration.bigbluebutton_endpoint_default == Rails.configuration.bigbluebutton_endpoint
end
# Returns language selection options
def language_options
language_opts = [['<<<< ' + t("language_options.default") + ' >>>>', "default"]]
Rails.configuration.languages.each do |loc|
language_opts.push([t("language_options." + loc), loc])
end
language_opts.sort
end
# Parses markdown for rendering.
def markdown(text)
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML,