diff --git a/vendor/built_in_modules/survey/app/controllers/panel/survey/back_end/surveys_controller.rb b/vendor/built_in_modules/survey/app/controllers/panel/survey/back_end/surveys_controller.rb index 9052d26f..7b315146 100644 --- a/vendor/built_in_modules/survey/app/controllers/panel/survey/back_end/surveys_controller.rb +++ b/vendor/built_in_modules/survey/app/controllers/panel/survey/back_end/surveys_controller.rb @@ -22,6 +22,8 @@ class Panel::Survey::BackEnd::SurveysController < OrbitBackendController def new @survey = ::Survey.new + @primary_locale = I18n.locale.to_s + @secondary_locale = (I18n.locale == :zh_tw) ? "en" : "zh_tw" respond_to do |format| format.html # new.html.erb @@ -47,6 +49,8 @@ class Panel::Survey::BackEnd::SurveysController < OrbitBackendController end def edit + @primary_locale = I18n.locale.to_s + @secondary_locale = (I18n.locale == :zh_tw) ? "en" : "zh_tw" @survey = ::Survey.find(params[:id]) @sqs = [] @survey.survey_questions.each do |sq| diff --git a/vendor/built_in_modules/survey/app/views/panel/survey/back_end/surveys/_questions.html.erb b/vendor/built_in_modules/survey/app/views/panel/survey/back_end/surveys/_questions.html.erb index 5b44ac47..c9788cbf 100644 --- a/vendor/built_in_modules/survey/app/views/panel/survey/back_end/surveys/_questions.html.erb +++ b/vendor/built_in_modules/survey/app/views/panel/survey/back_end/surveys/_questions.html.erb @@ -165,8 +165,8 @@
- English - Chinese + <%= I18nVariable.from_locale(@primary_locale) %> + <%= I18nVariable.from_locale(@secondary_locale) %> @@ -187,8 +187,8 @@
- English - Chinese + <%= I18nVariable.from_locale(@primary_locale) %> + <%= I18nVariable.from_locale(@secondary_locale) %>