Update translations.

This commit is contained in:
BoHung Chiu 2023-08-03 21:01:26 +08:00
parent 0311726412
commit 2d2cd79883
5 changed files with 27 additions and 10 deletions

View File

@ -17,12 +17,12 @@ class AsiaDatabasesController < ApplicationController
selected_unit = params[:unit] selected_unit = params[:unit]
selected_academy = nil selected_academy = nil
if selected_unit == 'all' 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| AsiaAcademy.all.each do |academy|
choice_unit << {"choice_value"=> academy.uid, "choice_show"=> academy.academy_name, 'choice_select'=>''} choice_unit << {"choice_value"=> academy.uid, "choice_show"=> academy.academy_name, 'choice_select'=>''}
end end
else 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| AsiaAcademy.all.each do |academy|
uid = academy.uid uid = academy.uid
if uid == selected_unit if uid == selected_unit
@ -164,6 +164,11 @@ class AsiaDatabasesController < ApplicationController
'search_text' => search_text, 'search_text' => search_text,
'search_value' => params[:keywords].to_s.gsub(/\"/,''), 'search_value' => params[:keywords].to_s.gsub(/\"/,''),
'search_trans' => t('asia_database.extend_translate.search'), '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'), 'unit_trans' => t('asia_database.extend_translate.unit'),
'csrf_value' => csrf_value, 'csrf_value' => csrf_value,
'tmp_id' => tmp_id 'tmp_id' => tmp_id

View File

@ -10,6 +10,12 @@ en:
asia_database: Asia Talent Database asia_database: Asia Talent Database
asia_database: asia_database:
extend_translate: extend_translate:
all: All
keywords: Keywords
clear: Clear
export: Export
preparing: "Preparing..."
download: Download
download_excel: Download Excel download_excel: Download Excel
start_time: Start time start_time: Start time
end_time: End time end_time: End time

View File

@ -10,6 +10,12 @@ zh_tw:
asia_database: 亞大人才資料庫 asia_database: 亞大人才資料庫
asia_database: asia_database:
extend_translate: extend_translate:
all: "所有單位"
keywords: "請輸入關鍵字"
clear: "清除"
export: "匯出"
preparing: "準備中..."
download: "下載"
download_excel: "下載Excel" download_excel: "下載Excel"
start_time: 開始時間 start_time: 開始時間
end_time: 結束時間 end_time: 結束時間

View File

@ -29,9 +29,9 @@ $( ".selectbox" ).ready(function() {
{{choice_show}}</option> {{choice_show}}</option>
</select> </select>
{{search_text}} {{search_text}}
<input name="keywords" placeholder="Keywords" type="text" value="{{search_value}}"> <input name="keywords" placeholder="{{keywords_trans}}" type="text" value="{{search_value}}">
<button class="btn btn-light">{{search_trans}}</button> <button class="btn btn-light">{{search_trans}}</button>
<a aria-pressed="true" class="btn btn-default clear-btn" href="{{url}}">Clear</a> <a aria-pressed="true" class="btn btn-default clear-btn" href="{{url}}">{{clear_trans}}</a>
</form> </form>
</div> </div>
<table class="asia_teachers-index table table-hover table-striped dt-responsive dataTable no-footer dtr-inline"> <table class="asia_teachers-index table table-hover table-striped dt-responsive dataTable no-footer dtr-inline">

View File

@ -35,14 +35,14 @@
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">Export</h4> <h4 class="modal-title">{{export_trans}}</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="export-progress"> <div class="export-progress">
<span class="finish_percent">0</span>% (<span class="export-status">Preparing</span>) <span class="finish_percent">0</span>% (<span class="export-status">{{preparing_trans}}</span>)
</div> </div>
<div class="export-link-block" style="display: none;"> <div class="export-link-block" style="display: none;">
<a title="Download" href="{{download_url}}" class="export-link btn btn-primary">Download</a> <a title="Download" href="{{download_url}}" class="export-link btn btn-primary">{{download_trans}}</a>
</div> </div>
</div> </div>
</div> </div>
@ -79,12 +79,12 @@
</span> </span>
<span> <span>
{{search_text}} {{search_text}}
<input name="keywords" placeholder="Keywords" type="text" value="{{search_value}}"> <input name="keywords" placeholder="{{keywords_trans}}" type="text" value="{{search_value}}">
<button class="btn btn-default">{{search_trans}}</button> <button class="btn btn-default">{{search_trans}}</button>
</span> </span>
<span> <span>
<a aria-pressed="true" class="btn btn-default clear-btn" href="{{url}}">Clear</a> <a aria-pressed="true" class="btn btn-default clear-btn" href="{{url}}">{{clear_trans}}</a>
<button type="button" class="btn btn-default" id="export-asia-db" data-href="{{export_url}}">Export</a> <button type="button" class="btn btn-default" id="export-asia-db" data-href="{{export_url}}">{{export_trans}}</a>
</button> </button>
</span> </span>
</form> </form>