language translations

This commit is contained in:
Harry Bomrah 2018-01-19 17:05:26 +08:00
parent 370f3fd325
commit a0df7f77f4
4 changed files with 58 additions and 27 deletions

View File

@ -2,39 +2,39 @@
<script type="text/javascript" src="/assets/validator.js"></script>
<% end %>
<form action="<%= admin_announcement_importanns_path %>" method="post" class="form-horizontal main-forms" id="import-anns-xls" enctype="multipart/form-data">
<h3 style="padding-left: 30px;">Export to Excel</h3>
<h3 style="padding-left: 30px;"><%= t("announcement.export_to_excel") %></h3>
<div class="control-group">
<div class="controls">
<a href="<%= admin_announcement_export_excel_path(:format => "xlsx") %>">Export all announcments.</a>
<a href="<%= admin_announcement_export_excel_path(:format => "xlsx") %>"><%= t("announcement.export_all_anns") %></a>
</div>
</div>
<h3 style="padding-left: 30px;">Import from Excel</h3>
<h3 style="padding-left: 30px;"><%= t("announcement.import_from_excel") %></h3>
<%= hidden_field_tag :authenticity_token, form_authenticity_token %>
<div class="input-area">
<% if @module_app.categories.count > 0 %>
<div class="control-group">
<div class="controls">
<a href="<%= admin_announcement_excel_format_path(:format => "xlsx") %>">Download example sheet here.</a>
<a href="<%= admin_announcement_excel_format_path(:format => "xlsx") %>"><%= t("announcement.download_example_sheet_here") %></a>
</div>
</div>
<div class="control-group">
<label for="import-anns" class="control-label muted">Upload :</label>
<label for="import-anns" class="control-label muted"><%= t("upload") %></label>
<div class="controls">
<input type="file" id="import-anns" name="import_file" data-fv-validation="required;mustbexls;" data-fv-messages="Cannot be empty; Must be an excel file.;" />
<span class="help-block">Please create all the tags and categories before hand. Only excel file is allowed.</span>
<span class="help-block"><%= t("announcement.please_create_tags_cats") %></span>
</div>
</div>
<% else %>
<div class="control-group">
<div class="controls">
<h4>Please create atleast one category before importing.</h4>
<h4><%= t("announcement.create_atleast_one_cat") %></h4>
</div>
</div>
<% end %>
</div>
<% if @module_app.categories.count > 0 %>
<div class="form-actions">
<input type="submit" value="Import" class="btn btn-primary">
<input type="submit" value="<%= t("restful_actions.import") %>" class="btn btn-primary">
</div>
<% end %>
</form>
@ -42,21 +42,21 @@
<!-- import from wp xml -->
<form action="<%= admin_announcement_import_from_wp_path %>" method="post" class="form-horizontal main-forms" id="import-anns-wp-xml" enctype="multipart/form-data">
<h3 style="padding-left: 30px;">Import from Word Press XML</h3>
<h3 style="padding-left: 30px;"><%= t("announcement.import_from_wp_xml") %></h3>
<%= hidden_field_tag :authenticity_token, form_authenticity_token %>
<div class="input-area">
<div class="control-group">
<label for="import-anns-wp-xml" class="control-label muted">Upload :</label>
<label for="import-anns-wp-xml" class="control-label muted"><%= t("upload") %></label>
<div class="controls">
<input type="file" id="import-anns-wp-xml" name="import_xml" data-fv-validation="required;mustbexml;" data-fv-messages="Cannot be empty; Must be an XML file.;" />
</div>
</div>
</div>
<div class="form-actions">
<input type="submit" value="Import" class="btn btn-primary">
<input type="submit" value="<%= t("restful_actions.import") %>" class="btn btn-primary">
</div>
</form>
<!-- <form action="<%= admin_announcement_import_from_xml_path %>" method="post" class="form-horizontal main-forms" id="import-anns-xml" enctype="multipart/form-data">
<!-- <form action="<%#= admin_announcement_import_from_xml_path %>" method="post" class="form-horizontal main-forms" id="import-anns-xml" enctype="multipart/form-data">
<h3 style="padding-left: 30px;">Import from XML</h3>
<%#= hidden_field_tag :authenticity_token, form_authenticity_token %>
<div class="input-area">

View File

@ -50,14 +50,14 @@
sub_managers = @module_app.sub_managers
sub_managers.delete(nil)
%>
<div id="notification">Click on Submit to save the changes.</div>
<div id="notification"><%= t("announcement.click_on_submit") %></div>
<%= form_for @setting, url: (@setting.new_record? ? admin_announcement_createsettings_path : admin_announcement_updatesettings_path), html: {class: "form-horizontal main-forms"} do |f| %>
<div class="input-area">
<div class="control-group">
<%= f.label :top_limit, :class => "control-label muted" %>
<%= f.label :top_limit, t("announcement.top_limit"), :class => "control-label muted" %>
<div class="controls">
<%= f.number_field :top_limit, :min => "0" %>
<span class="help-block">Put 0 for unlimited.</span>
<span class="help-block"><%= t("announcement.for_unlimited") %></span>
</div>
</div>
<% if AnnouncementSetting.is_pro? %>
@ -65,21 +65,21 @@
<div class="control-group">
<%= f.label "Approver Setting", :class => "control-label muted" %>
<div class="controls">
<a href="#approverModal" role="button" class="btn" data-toggle="modal">Approvers List</a>
<a href="#approverModal" role="button" class="btn" data-toggle="modal"><%= t("announcement.approvers_list") %></a>
<span class="badge badge-info"><%= @setting.approvers.count %></span>
</div>
</div>
<% else %>
<div class="control-group">
<a href="/admin/authorizations/announcement">Click here to set Sub Managers for this module</a>
<a href="/admin/authorizations/announcement"><%= t("announcement.click_set_sub_manager") %></a>
</div>
<% end %>
<div class="control-group">
<%= f.label "Send emails to", :class => "control-label muted" %>
<div class="controls">
<input type="checkbox" name="announcement_setting[email_to][]" value="admins" <%= @setting.email_to.include?("admins") ? "checked=checked" : "" %>> Admins
<input type="checkbox" name="announcement_setting[email_to][]" value="managers" <%= @setting.email_to.include?("managers") ? "checked=checked" : "" %>> Managers
<input type="checkbox" name="announcement_setting[email_to][]" value="approvers" <%= @setting.email_to.include?("approvers") ? "checked=checked" : "" %>> Approvers
<input type="checkbox" name="announcement_setting[email_to][]" value="admins" <%= @setting.email_to.include?("admins") ? "checked=checked" : "" %>> <%= t("admin") %>
<input type="checkbox" name="announcement_setting[email_to][]" value="managers" <%= @setting.email_to.include?("managers") ? "checked=checked" : "" %>> <%= t("manager") %>
<input type="checkbox" name="announcement_setting[email_to][]" value="approvers" <%= @setting.email_to.include?("approvers") ? "checked=checked" : "" %>> <%= t("announcement.approver") %>
</div>
</div>
</div>
@ -99,7 +99,7 @@
<div id="approverModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="approverModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="approverModalLabel">Sub Managers</h3>
<h3 id="approverModalLabel"><%= t("sub_manager") %></h3>
</div>
<div class="modal-body">
<ul id="approver-list">
@ -109,7 +109,7 @@
<span class="approver-title"><%= sm.name %></span>
<span class="pull-right approver-check">
<input id="checkbox_<%= sm.id %>" type="checkbox" value="<%= sm.id %>" <%= @setting.approvers.include?(sm.id.to_s) ? "checked=checked" : "" %>>
<label for="checkbox_<%= sm.id %>">Approver</label>
<label for="checkbox_<%= sm.id %>"><%= t("announcement.approver") %></label>
</span>
</li>
<% end %>

View File

@ -1,5 +1,7 @@
en:
restful_actions:
feed: Feed
import: Import
announcement:
table:
title : Title
@ -12,6 +14,19 @@ en:
File: File
view_count: View Count
add_new: Add New
export_to_excel: Export to Excel
export_all_anns: Export all Announcement
import_from_excel: Import from Excel
download_example_sheet_here: Download example sheet here
please_create_tags_cats: Please create all the tags and categories before hand. Only excel file is allowed
create_atleast_one_cat: Please create atleast one category before importing.
import_from_wp_xml: Import from WordPress XML
click_on_submit: Click on Submit to save the changes
approvers_list: Approvers List
click_set_sub_manager: Click here to set Sub Managers for this module
approver: Approver
top_limit: Top Limit
for_unlimited: Put 0 for unlimited
feed_name: Feed Name
rssfeed: RSS Feed Link
jsonfeed: JSON Feed Link

View File

@ -1,5 +1,7 @@
zh_tw:
restful_actions:
feed: 供給
import: 匯入
announcement:
table:
title : 標題
@ -12,12 +14,26 @@ zh_tw:
file: 檔案下載
view_count: 瀏覽人次
add_new: 新建
import: 匯入
export_to_excel: 匯出至Excel檔
export_all_anns: 匯出所有公告
import_from_excel: 從Excel檔匯入
download_example_sheet_here: 在此下載範例
please_create_tags_cats: 甲、 請事先建立所有標籤及分類。 僅限Excel檔。
create_atleast_one_cat: 匯入前, 請先建立至少一個類別
import_from_wp_xml: 從WordPress XML檔匯入
top_limit: 最高設限
for_unlimited: 歸零不設限
click_on_submit: 點"提交"儲存變更
approvers_list: 審核人名單
click_set_sub_manager: 點這邊來設定這個模組的副管理者
approver: 審核人
approve: 通過
feed_name: Feed 標題
settings: Settings
settings: 設定
import: 匯入 / 匯出
rssfeed: RSS Feed Link
jsonfeed: JSON Feed Link
rssfeed: RSS 供給連結
jsonfeed: JSON 供給連結
feed_list: 訂閱清單
all_articles: 文章列表
announcement: 公告