From 2d2cd79883bc3f2000a5e1691b50c086406dcb09 Mon Sep 17 00:00:00 2001 From: BoHung Chiu Date: Thu, 3 Aug 2023 21:01:26 +0800 Subject: [PATCH] Update translations. --- app/controllers/asia_databases_controller.rb | 9 +++++++-- config/locales/en.yml | 6 ++++++ config/locales/zh_tw.yml | 6 ++++++ modules/asia_database/index_search0.html.erb | 4 ++-- modules/asia_database/index_search1.html.erb | 12 ++++++------ 5 files changed, 27 insertions(+), 10 deletions(-) diff --git a/app/controllers/asia_databases_controller.rb b/app/controllers/asia_databases_controller.rb index 6c00075..f367dfb 100644 --- a/app/controllers/asia_databases_controller.rb +++ b/app/controllers/asia_databases_controller.rb @@ -17,12 +17,12 @@ class AsiaDatabasesController < ApplicationController selected_unit = params[:unit] selected_academy = nil if selected_unit == 'all' - choice_unit << {"choice_value"=> 'all', "choice_show"=> 'All', 'choice_select'=> 'selected'} + choice_unit << {"choice_value"=> 'all', "choice_show"=> I18n.t('asia_database.extend_translate.all'), 'choice_select'=> 'selected'} AsiaAcademy.all.each do |academy| choice_unit << {"choice_value"=> academy.uid, "choice_show"=> academy.academy_name, 'choice_select'=>''} end else - choice_unit << {"choice_value"=> 'all', "choice_show"=> 'All', 'choice_select'=> ''} + choice_unit << {"choice_value"=> 'all', "choice_show"=> I18n.t('asia_database.extend_translate.all'), 'choice_select'=> ''} AsiaAcademy.all.each do |academy| uid = academy.uid if uid == selected_unit @@ -164,6 +164,11 @@ class AsiaDatabasesController < ApplicationController 'search_text' => search_text, 'search_value' => params[:keywords].to_s.gsub(/\"/,''), 'search_trans' => t('asia_database.extend_translate.search'), + 'keywords_trans' => t('asia_database.extend_translate.keywords'), + 'clear_trans' => t('asia_database.extend_translate.clear'), + 'export_trans' => t('asia_database.extend_translate.export'), + 'preparing_trans' => t('asia_database.extend_translate.preparing'), + 'download_trans' => t('asia_database.extend_translate.download'), 'unit_trans' => t('asia_database.extend_translate.unit'), 'csrf_value' => csrf_value, 'tmp_id' => tmp_id diff --git a/config/locales/en.yml b/config/locales/en.yml index d083101..b725e5f 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -10,6 +10,12 @@ en: asia_database: Asia Talent Database asia_database: extend_translate: + all: All + keywords: Keywords + clear: Clear + export: Export + preparing: "Preparing..." + download: Download download_excel: Download Excel start_time: Start time end_time: End time diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index c21ef4c..72ff741 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -10,6 +10,12 @@ zh_tw: asia_database: 亞大人才資料庫 asia_database: extend_translate: + all: "所有單位" + keywords: "請輸入關鍵字" + clear: "清除" + export: "匯出" + preparing: "準備中..." + download: "下載" download_excel: "下載Excel" start_time: 開始時間 end_time: 結束時間 diff --git a/modules/asia_database/index_search0.html.erb b/modules/asia_database/index_search0.html.erb index 613e820..44f2327 100644 --- a/modules/asia_database/index_search0.html.erb +++ b/modules/asia_database/index_search0.html.erb @@ -29,9 +29,9 @@ $( ".selectbox" ).ready(function() { {{choice_show}} {{search_text}} - + - Clear + {{clear_trans}} diff --git a/modules/asia_database/index_search1.html.erb b/modules/asia_database/index_search1.html.erb index 76a303f..1c06027 100644 --- a/modules/asia_database/index_search1.html.erb +++ b/modules/asia_database/index_search1.html.erb @@ -35,14 +35,14 @@ @@ -79,12 +79,12 @@ {{search_text}} - + - Clear -