Update translations.

This commit is contained in:
BoHung Chiu 2021-03-26 11:55:59 +08:00
parent 8f293afd87
commit 5aaf112325
3 changed files with 26 additions and 5 deletions

View File

@ -61,7 +61,13 @@ class Admin::SeminarsController < OrbitAdminController
end
if @seminar.enable_summary_choice
@fields << "seminar_signup_contributes.description"
begin
data2 = @seminar.seminar_submission_field_sets.select{|v| v.field_name=='description'}[0]
name2 = data2['name'][I18n.locale]
@fields_translations << (name2.present? ? name2 : I18n.t("seminar_signup.description"))
rescue
@fields_translations << I18n.t("seminar_signup.description")
end
@fields_values << @seminar.summary_chioices.map.with_index{|v,i| [i.to_s,{I18n.locale=>v}]}.to_h
end
@fields_values = @fields_values.collect.with_index{|fields_values,i| [i, fields_values.values.map{|v| v[I18n.locale]} ] }.to_h

View File

@ -6,6 +6,15 @@
@seminar = data["seminar"]
@seminar_signup = data["seminar_signup"]
@time_now = data["time_now"]
data1 = @seminar.seminar_submission_field_sets.select{|v| v.field_name=='title'}[0]
data2 = @seminar.seminar_submission_field_sets.select{|v| v.field_name=='description'}[0]
data3 = @seminar.seminar_submission_field_sets.select{|v| v.field_name=='file'}[0]
show1 = !(data1.disabled) rescue false
show2 = !(data2.disabled) rescue false
show3 = !(data3.disabled) rescue false
name1 = data1['name'][I18n.locale]
name2 = data2['name'][I18n.locale]
name3 = data3['name'][I18n.locale]
%>
<% if @seminar.contribute_start_date <= @time_now and ( @seminar.contribute_end_date.nil? or @seminar.contribute_end_date+1 >= @time_now ) %>
<% begin %>
@ -19,9 +28,15 @@
</caption>
<thead>
<tr>
<th class="col-md-2"><%= t('seminar_signup.file_name') %></th>
<th class="col-md-2"><%= t('seminar_signup.file_note') %></th>
<th class="col-md-2"><%= t('seminar_signup.files') %></th>
<% if show1 %>
<th class="col-md-2"><%= name1 %></th>
<% end %>
<% if show2 %>
<th class="col-md-2"><%= name2 %></th>
<% end %>
<% if show3 %>
<th class="col-md-2"><%= name3 %></th>
<% end %>
<th class="col-md-2"><%= t(:action) %></th>
</tr>
</thead>