Add missing translations

This commit is contained in:
Christophe Vilayphiou 2012-09-21 12:58:44 +08:00
parent 2ca7e1b548
commit 4fb35b00f2
33 changed files with 339 additions and 72 deletions

View File

@ -15,7 +15,7 @@ module Admin::ItemHelper
ret << "<div class='with_action'><i class='icons-moves'></i>"
ret << (link_to node.title, dest, :class => 'js_history')
ret << "<div class='quick-edit hide'>"
ret << (link_to t('admin.edit'), eval("edit_admin_#{node.class.to_s.downcase}_path(node)"), :class => 'js_history') if node.class.to_s.eql?('Page')
ret << (link_to t(:edit), eval("edit_admin_#{node.class.to_s.downcase}_path(node)"), :class => 'js_history') if node.class.to_s.eql?('Page')
ret << (link_to t('new.page'), new_admin_page_path(:parent_id => node.id), :class => 'new_page js_history') if node.class.to_s.eql?('Page')
ret << (link_to t('new.link'), new_admin_link_path(:parent_id => node.id), :class => 'new_link js_history') if node.class.to_s.eql?('Page')
ret << (link_to t(:delete), eval("delete_admin_#{node.class.to_s.downcase}_path(node, :authenticity_token => form_authenticity_token)"), :confirm => t('sure?'), :class => 'delete js_history')

View File

@ -1,7 +1,7 @@
<% content_for :secondary do %>
<div class="assets_setup">
<ul class="list">
<li><%= link_to t('admin.new_asset'), new_admin_asset_path, :remote => true, :class => 'button positive' %></li>
<li><%= link_to t('new.asset'), new_admin_asset_path, :remote => true, :class => 'button positive' %></li>
</ul>
</div>
<% end -%>

View File

@ -1,7 +1,7 @@
<% content_for :secondary do %>
<div class="assets_setup">
<ul class="list">
<li><%= link_to t('admin.new_asset'), new_admin_asset_path, :remote => true, :class => 'button positive' %></li>
<li><%= link_to t('new.asset'), new_admin_asset_path, :remote => true, :class => 'button positive' %></li>
</ul>
</div>
<% end -%>

View File

@ -9,7 +9,7 @@
<table>
<thead>
<tr>
<td class="<%= @attribute_type %>s"><%= t("admin.#{@attribute_type}") %></td>
<td class="<%= @attribute_type %>s"><%= t("#{@attribute_type}") %></td>
<td class="action"><%= t(:action) %></td>
</tr>
</thead>

View File

@ -1,5 +1,5 @@
<div class="attributes_block <%= @class %>">
<h2><%= t("admin.#{@attribute_type}") %></h2>
<h2><%= t("#{@attribute_type}") %></h2>
<div class="info_input">
<table border="0" cellspacing="0" cellpadding="0">
<thead class="list_head">

View File

@ -1,5 +1,5 @@
<div class="attributes_block <%= @class %>">
<h2><%= t("admin.#{@attribute_type}") %></h2>
<h2><%= t("#{@attribute_type}") %></h2>
<hr>
<div class="info_input">
<table border="0" cellspacing="0" cellpadding="0">

View File

@ -5,7 +5,7 @@
<table border="0" cellspacing="0" cellpadding="0">
<thead class="list_head">
<tr>
<td><%= t("admin.key") %></td>
<td><%= t(:key) %></td>
<% @site_valid_locales.each do |locale| %>
<td><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></td>
<% end %>

View File

@ -1,7 +1,7 @@
<div class="info_input">
<table border="0" cellspacing="0" cellpadding="0">
<thead class="list_head">
<td><%= t("admin.key") %></td>
<td><%= t(:key) %></td>
<% @site_valid_locales.each do |locale| %>
<td><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></td>
<% end %>

View File

@ -4,7 +4,7 @@
<table border="0" cellspacing="0" cellpadding="0">
<thead class="list_head">
<tr>
<td><%= t("admin.key") %></td>
<td><%= t(:key) %></td>
<% @site_valid_locales.each do |locale| %>
<td><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></td>
<% end %>

View File

@ -13,7 +13,7 @@
<%= content_tag :li, link_to(t(:categories), panel_announcement_back_end_bulletin_categorys_path), :class =>( active_for_action('bulletin_categorys', 'index') || active_for_ob_auths_object("BulletinCategory") ) %>
<%= content_tag :li, link_to(t(:tags), panel_announcement_back_end_tags_path), :class => active_for_action('/panel/announcement/back_end/tags', 'index') %>
<%= content_tag :li, link_to(t('approval.setting'), panel_announcement_back_end_approval_setting_path), :class => active_for_action('approvals', 'setting') if (is_manager? rescue true) %>
<%= content_tag :li, link_to(t('admin.module_authorization'),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: "Announcement"}))), :class => active_for_app_auth('Announcement') if (is_admin? rescue nil) %>
<%= content_tag :li, link_to(t(:module_authorization),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: "Announcement"}))), :class => active_for_app_auth('Announcement') if (is_admin? rescue nil) %>
<% end -%>
@ -27,7 +27,7 @@
<%= content_tag :li, link_to(t(:categories), panel_news_back_end_news_bulletin_categorys_path), :class => active_for_action('news_bulletin_categorys', 'index') || active_for_ob_auths_object("NewsBulletinCategory") %>
<%= content_tag :li, link_to(t(:tags), panel_news_back_end_tags_path), :class => active_for_action('/panel/news/back_end/tags', 'index') %>
<%= content_tag :li, link_to(t('approval.setting'), panel_news_back_end_approval_setting_path), :class => active_for_action('news_approvals', 'setting') if (is_manager? rescue true) %>
<%= content_tag :li, link_to(t('admin.module_authorization'),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "news"}))), :class => active_for_app_auth('news') if (is_admin? rescue nil) %>
<%= content_tag :li, link_to(t(:module_authorization),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "news"}))), :class => active_for_app_auth('news') if (is_admin? rescue nil) %>
<% end -%>
<% end -%>
@ -40,7 +40,7 @@
<%= link_to content_tag(:i, nil, :class => 'icons-page') + t(:page), panel_page_content_back_end_page_contexts_path %>
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('page_contexts')) do -%>
<%#= content_tag :li, link_to(t(:list_), panel_page_content_back_end_page_contexts_path), :class => active_for_action('page_context', 'index') %>
<%= content_tag :li, link_to(t('admin.module_authorization'),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: "page_content"}))), :class => active_for_app_auth('page_content') if (is_admin? rescue nil) %>
<%= content_tag :li, link_to(t(:module_authorization),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: "page_content"}))), :class => active_for_app_auth('page_content') if (is_admin? rescue nil) %>
<% end -%>
<% end -%>
@ -52,7 +52,7 @@
<%#= content_tag :li, link_to(t('list.ad_banner'), admin_ad_banners_path), :class => active_for_action('ad_banners', 'index') %>
<%#= content_tag :li, link_to(t('new.banner'), new_admin_ad_banner_path), :class => active_for_action('ad_banners', 'new') %>
<%#= content_tag :li, link_to(t('ad.new_image'), new_ad_image_admin_ad_banners_path), :class => active_for_action('ad_images', 'new') %>
<%= content_tag :li, link_to(t('admin.module_authorization'),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: "ad_banners"}))), :class => active_for_app_auth('ad_banners') if (is_admin? rescue nil) %>
<%= content_tag :li, link_to(t(:module_authorization),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: "ad_banners"}))), :class => active_for_app_auth('ad_banners') if (is_admin? rescue nil) %>
<% end -%>
<% end %>
@ -63,7 +63,7 @@
<%= content_tag :li, link_to(t(:add), new_panel_web_resource_back_end_web_link_path), :class => active_for_action('web_links', 'new') %>
<%= content_tag :li, link_to(t(:categories), panel_web_resource_back_end_web_link_categorys_path), :class => (active_for_action('web_link_categorys', 'index') || active_for_ob_auths_object("WebLinkCategory")) %>
<%= content_tag :li, link_to(t(:tags), panel_web_resource_back_end_tags_path), :class => active_for_action('/panel/web_resource/back_end/tags', 'index') %>
<%= content_tag :li, link_to(t('admin.module_authorization'),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: "web_resource"}))), :class => active_for_app_auth('web_resource') if (is_admin? rescue nil) %>
<%= content_tag :li, link_to(t(:module_authorization),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: "web_resource"}))), :class => active_for_app_auth('web_resource') if (is_admin? rescue nil) %>
<% end -%>
<% end -%>
@ -71,7 +71,7 @@
<%#= link_to content_tag(:i, nil, :class => 'icons-link') + t(:asset), admin_assets_path %>
<%#= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('assets', '/admin/asset_tags', 'asset_categories')) do -%>
<%#= content_tag :li, link_to(t('list.asset'), admin_assets_path), :class => active_for_action('assets', 'index') %>
<%#= content_tag :li, link_to(t('admin.categories'), admin_asset_categories_path), :class => active_for_action('asset_categories', 'index') %>
<%#= content_tag :li, link_to(t(:categories), admin_asset_categories_path), :class => active_for_action('asset_categories', 'index') %>
<%#= content_tag :li, link_to(t(:tags), admin_asset_tags_path), :class => active_for_action('/admin/asset_tags', 'index') %>
<%# end -%>
<%# end -%>

View File

@ -1,6 +1,6 @@
<div class="checkblock">
<div class="for_unit" style="display:none;"> <%= user.cache_dept[I18n.locale.to_s] rescue ''%></div>
<%= content_tag :div,:data=>{'original-title' => t('approval.setting_window_title'),:content => (user.cache_dept[I18n.locale.to_s] rescue '')},:class=>"checkbox clear" do %>
<%= content_tag :div,:data=>{'original-title' => t(:title),:content => (user.cache_dept[I18n.locale.to_s] rescue '')},:class=>"checkbox clear" do %>
<div class="check-icon">
</div>
<div class='member-avatar'>

View File

@ -77,6 +77,7 @@ en:
cant_delete_self: You can not delete yourself.
cant_empty_star: Cannot be empty (*)
cant_revoke_self_admin: You can not revoke your admin role yourself.
categories: Categories
category: Category
category_auth: Category Authorization
clear: Clear
@ -137,6 +138,7 @@ en:
horizontal: Horizontal
hot: Hot
image: Image
info: Information
intro: Introduction
is_published: Is published
item: Item
@ -167,6 +169,7 @@ en:
tls: TLS
user_name: User Name
manager: Manager
manager: Manager
me: Me
member: Member
menu_enabled_for: Menu enabled for
@ -312,3 +315,14 @@ en:
visitors_this_year: This year's visitors
visitors_today: Today's visitors
yes_: "Yes"
nccu:
date: Date
file: File
file_description: Description
file_name: Name
link_name: Name
picture: Picture
selected_file: File
tags: Tags
url: URL

View File

@ -1,6 +1,6 @@
zh_tw:
_locale: English
_locale: 中文
access:
denied:
@ -77,6 +77,7 @@ zh_tw:
cant_delete_self: 不可以刪除自己
cant_empty_star: 不能為空白 (*)
cant_revoke_self_admin: 不可以撤銷自己的管理身份
categories: 類別
category: 類別
category_auth: 類別授權
clear: 清除
@ -137,6 +138,7 @@ zh_tw:
horizontal: 水平的
hot: 熱門
image: 圖片
info: 信息
intro: 簡介
is_published: 已發佈
item: 項目
@ -167,6 +169,7 @@ zh_tw:
tls: 電子郵件TLS
user_name: 電子郵件帳號
manager: 管理者
manager: 管理者
me:
member: 會員
menu_enabled_for: 選單啟用
@ -190,7 +193,7 @@ zh_tw:
user: 新增使用者
info: 新增使用者資訊
role: 新增使用者角色
news: 公告
news: 新聞
no_: "不是"
no_deadline: 沒有期限
object_auth:
@ -330,3 +333,253 @@ zh_tw:
web_link:
title: 名稱
url: 路徑
nccu:
date: 起迄日期
file: 附加檔案
file_description: 檔案描述
file_name: 檔案名稱
link_name: 連結名稱
picture: 刊頭圖片
selected_file: 選擇檔案
tags: 頁籤
url: 連結位置
# Chinese (Taiwan) translations for Ruby on Rails
# by tsechingho (http://github.com/tsechingho)
date:
formats:
default: "%Y-%m-%d"
short: "%b%d日"
long: "%Y年%b%d日"
day_names: [星期日, 星期一, 星期二, 星期三, 星期四, 星期五, 星期六]
abbr_day_names: [日, 一, 二, 三, 四, 五, 六]
month_names: [~, 一月, 二月, 三月, 四月, 五月, 六月, 七月, 八月, 九月, 十月, 十一月, 十二月]
abbr_month_names: [~, 1月, 2月, 3月, 4月, 5月, 6月, 7月, 8月, 9月, 10月, 11月, 12月]
order: [ :year, :month, :day ]
time:
formats:
default: "%Y年%b%d日 %A %H:%M:%S %Z"
short: "%b%d日 %H:%M"
long: "%Y年%b%d日 %H:%M"
am: "上午"
pm: "下午"
datetime:
distance_in_words:
half_a_minute: "半分鐘"
less_than_x_seconds:
one: "不到一秒"
other: "不到 %{count} 秒"
x_seconds:
one: "一秒"
other: "%{count} 秒"
less_than_x_minutes:
one: "不到一分鐘"
other: "不到 %{count} 分鐘"
x_minutes:
one: "一分鐘"
other: "%{count} 分鐘"
about_x_hours:
one: "大約一小時"
other: "大約 %{count} 小時"
x_days:
one: "一天"
other: "%{count} 天"
about_x_months:
one: "大約一個月"
other: "大約 %{count} 個月"
x_months:
one: "一個月"
other: "%{count} 個月"
about_x_years:
one: "大約一年"
other: "大約 %{count} 年"
over_x_years:
one: "一年多"
other: "%{count} 年多"
almost_x_years:
one: "接近一年"
other: "接近 %{count} 年"
prompts:
year: "年"
month: "月"
day: "日"
hour: "時"
minute: "分"
second: "秒"
number:
format:
separator: "."
delimiter: ","
precision: 3
significant: false
strip_insignificant_zeros: false
currency:
format:
format: "%u %n"
unit: "NT$"
separator: "."
delimiter: ","
precision: 2
significant: false
strip_insignificant_zeros: false
percentage:
format:
delimiter: ""
precision:
format:
delimiter: ""
human:
format:
delimiter: ""
precision: 1
significant: false
strip_insignificant_zeros: false
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
decimal_units:
format: "%n %u"
units:
# 10^-21 zepto, 10^-24 yocto
atto: "渺" # 10^-18
femto: "飛" # 10^-15 毫微微
pico: "漠" # 10^-12 微微
nano: "奈" # 10^-9 毫微
micro: "微" # 10^-6
mili: "毫" # 10^-3 milli
centi: "厘" # 10^-2
deci: "分" # 10^-1
unit: ""
ten:
one: "十"
other: "十" # 10^1
hundred: "百" # 10^2
thousand: "千" # 10^3 kilo
million: "百萬" # 10^6 mega
billion: "十億" # 10^9 giga
trillion: "兆" # 10^12 tera
quadrillion: "千兆" # 10^15 peta
# 10^18 exa, 10^21 zetta, 10^24 yotta
support:
array:
words_connector: ", "
two_words_connector: " 和 "
last_word_connector: ", 和 "
select:
prompt: "請選擇"
search:
not_found: "沒有搜尋結果"
domains: Google Search Domains
site_search: "全站搜尋"
sitesearch: Google Site Search
site_setting_help: 請輸入送交Google搜尋的參數
result_get: "搜尋有關 ' %{search_word} ' 共搜尋到%{item_num}筆資料"
too_many: "搜尋有關 ' %{search_word} ' 尋找到超過 %{exceed_num} 筆資料,請嘗試加入更多關鍵字縮小搜尋範圍,以作更精確的搜尋"
result_get: "搜尋標題有關 ' %{search_word} ' 共搜尋到%{item_num}筆資料"
unit_get: "列出由:%{unit_name}發佈的資料,共有%{item_num}筆"
activerecord:
errors:
template: # ~ 2.3.5 backward compatible
header:
one: "有 1 個錯誤發生使得「%{model}」無法被儲存。"
other: "有 %{count} 個錯誤發生使得「%{model}」無法被儲存。"
body: "以下欄位發生問題:"
full_messages:
format: "%{attribute} %{message}"
messages:
inclusion: "沒有包含在列表中"
exclusion: "是被保留的關鍵字"
invalid: "是無效的"
confirmation: "不符合確認值"
accepted: "必須是可被接受的"
empty: "不能留空"
blank: "不能是空白字元"
too_long: "過長(最長是 %{count} 個字)"
too_short: "過短(最短是 %{count} 個字)"
wrong_length: "字數錯誤(必須是 %{count} 個字)"
not_a_number: "不是數字"
not_an_integer: "必須是整數"
greater_than: "必須大於 %{count}"
greater_than_or_equal_to: "必須大於或等於 %{count}"
equal_to: "必須等於 %{count}"
less_than: "必須小於 %{count}"
less_than_or_equal_to: "必須小於或等於 %{count}"
odd: "必須是奇數"
even: "必須是偶數"
taken: "已經被使用"
record_invalid: "校驗失敗: %{errors}"
activemodel:
errors:
template:
header:
one: "有 1 個錯誤發生使得「%{model}」無法被儲存。"
other: "有 %{count} 個錯誤發生使得「%{model}」無法被儲存。"
body: "以下欄位發生問題:"
errors:
format: "%{attribute} %{message}"
messages:
inclusion: "沒有包含在列表中"
exclusion: "是被保留的關鍵字"
invalid: "是無效的"
confirmation: "不符合確認值"
accepted: "必須是可被接受的"
empty: "不能留空"
blank: "不能是空白字元"
too_long: "過長(最長是 %{count} 個字)"
too_short: "過短(最短是 %{count} 個字)"
wrong_length: "字數錯誤(必須是 %{count} 個字)"
not_a_number: "不是數字"
not_an_integer: "必須是整數"
greater_than: "必須大於 %{count}"
greater_than_or_equal_to: "必須大於或等於 %{count}"
equal_to: "必須等於 %{count}"
less_than: "必須小於 %{count}"
less_than_or_equal_to: "必須小於或等於 %{count}"
odd: "必須是奇數"
even: "必須是偶數"
template:
header:
one: "有 1 個錯誤發生使得「%{model}」無法被儲存。"
other: "有 %{count} 個錯誤發生使得「%{model}」無法被儲存。"
body: "以下欄位發生問題:"
helpers:
select:
prompt: "請選擇"
submit:
create: "新增%{model}"
update: "更新%{model}"
submit: "儲存%{model}"
modal:
close: "關閉"
preview: "預覽"
sys:
not_previewable: "不支援預覽"
limit_of_upload_file_size: "上傳檔案大小限制: %{best_size}"
preview_only_for_img: "預覽僅支援jpg,png,gif,bmp...等圖片格式"
can_not_display_due_to_no_context: "因為沒有中文版本,所以無法顯示"
module_page_lang_not_support: "很抱歉,本頁沒有開放中文版本"
object_disable:
change_to_true: "設為停用"
change_to_false: "重新啓用"

View File

@ -11,16 +11,16 @@
<div class="widget-action clear">
<a href="#" class="action"><i title="Set the announcement to start and end dates" class="icon-exclamation-sign icon-white tip"></i></a>
</div>
<h3 class="widget-title"><i class="icons-calendar icons-white"></i> Date</h3>
<h3 class="widget-title"><i class="icons-calendar icons-white"></i><%= t('nccu.date') %></h3>
<div class="widget-content clear">
<div class="control-group">
<label class="control-label">Start</label>
<label class="control-label"><%= t(:start) %></label>
<div class="controls">
<%= f.datetime_select :postdate, {:use_month_numbers => true, :order => [:day, :month, :year] }, {:class => 'span1'} %>
</div>
</div>
<div class="control-group">
<label class="control-label">End</label>
<label class="control-label"><%= t(:end) %></label>
<div class="controls">
<%= f.datetime_select :deadline, {:use_month_numbers => true, :prompt => { :month => 'Month', :day => 'Day', :year => 'Year'}, :order => [:day, :month, :year] }, {:class => 'span1'} %>
</div>
@ -33,7 +33,7 @@
<div class="widget-action clear">
<a class="action"><i title="Setting the announcement state" class="icon-exclamation-sign icon-white tip"></i></a>
</div>
<h3 class="widget-title"><i class="icons-star-thin icons-white"></i>Status</h3>
<h3 class="widget-title"><i class="icons-star-thin icons-white"></i><%= t(:status) %></h3>
<div class="widget-content clear">
<div class="controls">
<%= content_tag :label,:class => "checkbox inline" do -%>
@ -67,7 +67,7 @@
<div class="widget-action clear">
<a class="action"><i title="Setting" class="icon-cog icon-white tip"></i></a>
</div>
<h3 class="widget-title"><i class="icons-tag icons-white"></i>Tags</h3>
<h3 class="widget-title"><i class="icons-tag icons-white"></i><%= t('nccu.tags') %></h3>
<div class="widget-content clear form-horizontal">
<p>
<% @tags.each do |tag| %>
@ -147,7 +147,7 @@
<div class="widget-action clear">
<a class="action"><i title="Add a reference link" class="icon-exclamation-sign icon-white tip"></i></a>
</div>
<h3 class="widget-title"><i class="icons-link icons-white"></i>Link</h3>
<h3 class="widget-title"><i class="icons-link icons-white"></i><%= t(:link) %></h3>
<div class="widget-content">
<div id='bulletin_links' class="bulletin_links_block">
@ -155,8 +155,8 @@
<table class="table table-condensed">
<thead>
<tr>
<th>URL</th>
<th>Name</th>
<th><%= t('nccu.url') %></th>
<th><%= t('nccu.link_name') %></th>
<th class="span1"></th>
</tr>
</thead>
@ -191,7 +191,7 @@
<div class="widget-action clear">
<a class="action"><i title="Added to the file" class="icon-exclamation-sign icon-white tip"></i></a>
</div>
<h3 class="widget-title"><i class="icons-paperclip icons-white"></i>File</h3>
<h3 class="widget-title"><i class="icons-paperclip icons-white"></i><%= t('nccu.file') %></h3>
<div class="widget-content">
<div id='bulletin_files' class="bulletin_files_block">
@ -199,9 +199,9 @@
<table class="table table-condensed">
<thead>
<tr>
<th>File</th>
<th>Name</th>
<th><%= t('description') %></th>
<th><%= t('nccu.selected_file') %></th>
<th><%= t('nccu.file_name') %></th>
<th><%= t('nccu.file_description') %></th>
<th class="span1"></th>
</tr>
</thead>

View File

@ -1,8 +1,8 @@
<ul class="breadcrumb">
<!-- <ul class="breadcrumb">
<li><span>Home</span><span class="divider">/</span></li>
<li><span>Library</span><span class="divider">/</span></li>
<li class="text-blue"><%= t('announcement.editing_announcement') %></li>
</ul>
</ul> -->
<div id="poststuff">
<%= form_for @bulletin, :url => panel_announcement_back_end_bulletin_path(@bulletin), :html => {:class => 'clear nccu_ajax_form'} do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>

View File

@ -75,7 +75,7 @@ class Panel::News::BackEnd::NewsBulletinCategorysController < OrbitBackendContro
respond_to do |format|
if @news_bulletin_category.save
# format.html { redirect_to @news_bulletin_category, notice: 'Entry was successfully created.' }
format.html { redirect_to(panel_news_back_end_news_bulletin_categorys_url, :notice => t('news.create_news_bulletin_category_success')) }
format.html { redirect_to(panel_news_back_end_news_bulletin_categorys_url, :notice => t('news_bulletin.create_news_bulletin_category_success')) }
# format.xml { render :xml => @news_bulletin_category, :status => :created, :location => @news_bulletin_category }
format.js
else

View File

@ -166,7 +166,7 @@ class Panel::News::BackEnd::NewsBulletinsController < OrbitBackendController
respond_to do |format|
if @news_bulletin.save
expire_page(:controller=>'panel/news/widget/news_bulletins' , :action=>'home_banner')
format.html { redirect_to(panel_news_back_end_news_bulletins_url, :notice => t('news.create_news_bulletin_success')) }
format.html { redirect_to(panel_news_back_end_news_bulletins_url, :notice => t('news_bulletin.create_news_bulletin_success')) }
format.xml { render :xml => @news_bulletin, :status => :created, :location => @news_bulletin }
format.js
#format.json {render :json => {"success"=>"true","redirect_url"=>panel_news_back_end_news_bulletins_url,"notice" => t('news_bulletin.create_news_bulletin_success')}}
@ -377,7 +377,7 @@ class Panel::News::BackEnd::NewsBulletinsController < OrbitBackendController
# @news_bulletin_categorys = NewsBulletinCategory.all.authed_for_user(current_user,'submit')
# end
# if @news_bulletin_categorys.empty? && params[:action] != "index"
# flash[:alert] = t("news.error.no_avilb_cate_for_posting")
# flash[:alert] = t("news_bulletin.error.no_avilb_cate_for_posting")
# redirect_to :action => :index
# end
# end

View File

@ -1,4 +1,4 @@
<h1><%= t('news.editing_news_category') %></h1>
<h1><%= t('news_bulletin.editing_news_category') %></h1>
<%= form_for @news_bulletin_category, :url => panel_news_back_end_news_bulletin_category_path(@news_bulletin_category) do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>

View File

@ -10,7 +10,7 @@
<br />
<br />
<h1><%= t('news.new_news_category') %></h1>
<h1><%= t('news_bulletin.new_news_category') %></h1>
<%= form_for @news_bulletin_category, :url => panel_news_back_end_news_bulletin_categorys_path do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<% end %>

View File

@ -1,6 +1,6 @@
<div class="accordion-inner" data-toggle="buttons-checkbox">
<%= link_to t(:top), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_top'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_top')}" %>
<%= link_to t('news.hot'), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_hot'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_hot')}" %>
<%= link_to t('news_bulletin.hot'), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_hot'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_hot')}" %>
<%= link_to t(:hidden), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_hidden'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_hidden')}" %>
<%= link_to t(:pending), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_pending'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_pending')}" %>
<%= link_to t(:passed), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_checked'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_checked')}" %>

View File

@ -9,7 +9,7 @@
<div class="widget-action clear">
<a class="action"><i title="Upload pictures" class="icon-exclamation-sign icon-white tip"></i></a>
</div>
<h3 class="widget-title"><i class="icons-picture icons-white"></i>Picture</h3>
<h3 class="widget-title"><i class="icons-picture icons-white"></i><%= t('nccu.picture') %></h3>
<div class="widget-content clear">
<div class="control-group">
<!-- <img class="pull-left upload-picture" src="/assets/default-img.png" /> -->
@ -45,16 +45,16 @@
<div class="widget-action clear">
<a href="#" class="action"><i title="Set the news to start and end dates" class="icon-exclamation-sign icon-white tip"></i></a>
</div>
<h3 class="widget-title"><i class="icons-calendar icons-white"></i> Date</h3>
<h3 class="widget-title"><i class="icons-calendar icons-white"></i><%= t('nccu.date') %></h3>
<div class="widget-content clear">
<div class="control-group">
<label class="control-label">Start</label>
<label class="control-label"><%= t(:start) %></label>
<div class="controls">
<%= f.date_select :postdate, {:use_month_numbers => true, :order => [:day, :month, :year] }, {:class => 'input-small'} %>
</div>
</div>
<div class="control-group">
<label class="control-label">End</label>
<label class="control-label"><%= t(:end) %></label>
<div class="controls">
<%= f.date_select :deadline, {:use_month_numbers => true, :prompt => { :month => 'Month', :day => 'Day', :year => 'Year'}, :order => [:day, :month, :year] }, {:class => 'input-small'} %>
</div>
@ -67,7 +67,7 @@
<div class="widget-action clear">
<a class="action"><i title="Setting the news state" class="icon-exclamation-sign icon-white tip"></i></a>
</div>
<h3 class="widget-title"><i class="icons-star-thin icons-white"></i>Status</h3>
<h3 class="widget-title"><i class="icons-star-thin icons-white"></i><%= t(:status) %></h3>
<div class="widget-content clear">
<div class="controls">
<%= content_tag :label,:class => "checkbox inline" do -%>
@ -76,7 +76,7 @@
<% end -%>
<%= content_tag :label,:class => "checkbox inline" do -%>
<%= f.check_box :is_hot %>
<%= t('news.hot') %>
<%= t('news_bulletin.hot') %>
<% end -%>
<%= content_tag :label,:class => "checkbox inline" do -%>
<%= f.check_box :is_hidden %>
@ -90,7 +90,7 @@
<div class="widget-action clear">
<a class="action"><i title="Setting" class="icon-cog icon-white tip"></i></a>
</div>
<h3 class="widget-title"><i class="icons-tag icons-white"></i>Tags</h3>
<h3 class="widget-title"><i class="icons-tag icons-white"></i><%= t('nccu.tags') %></h3>
<div class="widget-content clear form-horizontal">
<% @tags.each do |tag| %>
<%= content_tag :label,:class => "checkbox inline" do -%>
@ -131,8 +131,8 @@
<div id="post-body">
<div id="post-body-content" class="clear">
<%= alert_block_tag(t("activerecord.errors.template.body"),session[:in_validate_object].errors.messages) unless session[:in_validate_object].blank? %>
<%= f.label :unit_list_for_anc,t('news.news_bulletin.unit_name')%>
<%= f.select :unit_list_for_anc_id,@unit_list_for_anc.collect{|t| [ t.title, t.id ]}, {:prompt => t("news.ut_prompt")}, :class => "input-medium" %>
<%= f.label :unit_list_for_anc,t('news_bulletin.news_bulletin.unit_name')%>
<%= f.select :unit_list_for_anc_id,@unit_list_for_anc.collect{|t| [ t.title, t.id ]}, {:prompt => t("news_bulletin.ut_prompt")}, :class => "input-medium" %>
<%= f.label :category,t(:category) %>
<%= f.select :news_bulletin_category_id, @news_bulletin_categorys.collect{|t| [ t.title, t.id ]}, {}, :class => "input-medium" %>
@ -186,7 +186,7 @@
<div class="widget-action clear">
<a class="action"><i title="Add a reference link" class="icon-exclamation-sign icon-white tip"></i></a>
</div>
<h3 class="widget-title"><i class="icons-link icons-white"></i>Link</h3>
<h3 class="widget-title"><i class="icons-link icons-white"></i><%= t(:link) %></h3>
<div class="widget-content">
<div id='news_bulletin_links' class="news_bulletin_links_block">
@ -194,8 +194,8 @@
<table class="table table-condensed">
<thead>
<tr>
<th>URL</th>
<th>Name</th>
<th><%= t('nccu.url') %></th>
<th><%= t('nccu.link_name') %></th>
<th class="span1"></th>
</tr>
</thead>
@ -230,7 +230,7 @@
<div class="widget-action clear">
<a class="action"><i title="Added to the file" class="icon-exclamation-sign icon-white tip"></i></a>
</div>
<h3 class="widget-title"><i class="icons-paperclip icons-white"></i>File</h3>
<h3 class="widget-title"><i class="icons-paperclip icons-white"></i><%= t('nccu.file') %></h3>
<div class="widget-content">
<div id='news_bulletin_files' class="news_bulletin_files_block">
@ -238,9 +238,9 @@
<table class="table table-condensed">
<thead>
<tr>
<th>File</th>
<th>Name</th>
<th><%= t('description') %></th>
<th><%= t('nccu.selected_file') %></th>
<th><%= t('nccu.file_name') %></th>
<th><%= t('nccu.file_description') %></th>
<th class="span1"></th>
</tr>
</thead>

View File

@ -11,7 +11,7 @@
<span class="label label-success"><%= t(:top) %></span>
<% end %>
<% if news_bulletin.is_hot? %>
<span class="label label-important"><%= t('news.hot') %></span>
<span class="label label-important"><%= t('news_bulletin.hot') %></span>
<% end %>
<% if news_bulletin.is_hidden? %>
<span class="label"><%= t(:hidden) %></span>

View File

@ -40,7 +40,7 @@
<div class="control-group">
<label class="control-label"><%= t(:status) %></label>
<div class="controls">
<label class="checkbox inline"><%= f.check_box :is_hot %><%= t('news.hot') %></label>
<label class="checkbox inline"><%= f.check_box :is_hot %><%= t('news_bulletin.hot') %></label>
<label class="checkbox inline"><%= f.check_box :is_top %><%= t(:top) %></label>
<label class="checkbox inline"><%= f.check_box :is_hidden %><%= t(:hidden) %></label>
</div>

View File

@ -1,8 +1,8 @@
<ul class="breadcrumb">
<!-- <ul class="breadcrumb">
<li><span>Home</span><span class="divider">/</span></li>
<li><span>Library</span><span class="divider">/</span></li>
<li class="text-blue"><%= t('news.editing_news') %></li>
</ul>
<li class="text-blue"><%= t('news_bulletin.editing_news') %></li>
</ul> -->
<div id="poststuff">
<%= form_for @news_bulletin, :url => panel_news_back_end_news_bulletin_path(@news_bulletin), :html => {:class => 'clear nccu_ajax_form'} do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>

View File

@ -16,9 +16,9 @@
<table class="table table-bordered">
<tbody>
<tr>
<th class="span2"><%= t('news.news_bulletin.image') %></th>
<th class="span2"><%= t('news_bulletin.news_bulletin.image') %></th>
<th><%= t(:text) %></th>
<th class="span2 pagination-right"><%= t('news.news_bulletin.postdate') %></th>
<th class="span2 pagination-right"><%= t('news_bulletin.news_bulletin.postdate') %></th>
</tr>
<% @news_bulletins.each do |post| %>
<tr>

View File

@ -4,7 +4,7 @@ xml.rss :version => "2.0" do
if @current_category
xml.title @current_category.title_translations[I18n.locale.to_s]
else
xml.title t('news.campus_news')
xml.title t('news_bulletin.campus_news')
end
xml.link url_for(:action=>"index", :controller=>"panel/news/front_end/news_bulletins" ,:format=> :rss,:only_path=>false,:inner=>true)

View File

@ -4,7 +4,7 @@ xml.rss :version => "2.0" do
if @current_category
xml.title @current_category.title_translations[I18n.locale.to_s]
else
xml.title t('news.campus_news')
xml.title t('news_bulletin.campus_news')
end
xml.link url_for(:action=>"index", :controller=>"panel/news/front_end/news_bulletins" ,:format=> :rss,:only_path=>false,:inner=>true)

View File

@ -1,5 +1,5 @@
<% if @news_bulletins and !@news_bulletins.nil? %>
<h2 class="topic_title"><%= link_to t('news.campus_news'), panel_news_front_end_news_bulletins_path %></h2>
<h2 class="topic_title"><%= link_to t('news_bulletin.campus_news'), panel_news_front_end_news_bulletins_path %></h2>
<%#= link_to t(:more_plus),panel_news_front_end_news_bulletins_path(), :class => "topic_note" %>
<div class="btn-group topic_note">
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">

View File

@ -5,7 +5,7 @@
</div>
<div class="news_block">
<h3 class="news_title2"><%= t("news.news_bulletins") %></h3>
<h3 class="news_title2"><%= t("news_bulletin.news_bulletins") %></h3>
<ul id='news_bulletins_web_links_news_bulletins' class="news_list">
<%= render 'news_bulletins' if @news_bulletins %>
</ul>

View File

@ -12,7 +12,7 @@
<% @tags.each_with_index do |tag, index| %>
<div id="news_<%= index %>" class="news_block">
<h3 class="news_title2"><%= t("news.news_bulletins") %></h3>
<h3 class="news_title2"><%= t("news_bulletin.news_bulletins") %></h3>
<div class="news_prev">prev</div>
<div class="news_next">next</div>
<ul class="news_list">

View File

@ -2,7 +2,7 @@
<%= hidden_field_tag :category_id, params[:category_id] %>
<%= hidden_field_tag :tag_id, params[:tag_id] %>
<p>
<%= text_field_tag :search_query, params[:search_query],{:value => (params[:search_query].blank?? '' : params[:search_query]),:placeholder=>t("news.search") }%>
<%= text_field_tag :search_query, params[:search_query],{:value => (params[:search_query].blank?? '' : params[:search_query]),:placeholder=>t("news_bulletin.search") }%>
<%= hidden_field_tag :category_id, params[:category_id] %>
<%= submit_tag "Search", name: nil %>
</p>

View File

@ -1,6 +1,6 @@
zh_tw:
news:
news_bulletin:
campus_news: 校園新聞
create_news_bulletin_category_success: 新聞類別已成功建立
create_news_bulletin_success: 新聞已成功建立

View File

@ -10,7 +10,7 @@
<div class="widget-action clear">
<a class="action"><i title="Setting the announcement state" class="icon-exclamation-sign icon-white tip"></i></a>
</div>
<h3 class="widget-title"><i class="icons-star-thin icons-white"></i>Status</h3>
<h3 class="widget-title"><i class="icons-star-thin icons-white"></i><%= t(:status) %></h3>
<div class="widget-content clear">
<div class="controls">
<%= content_tag :label,:class => "checkbox inline" do -%>
@ -33,7 +33,7 @@
<div class="widget-action clear">
<a class="action"><i title="Setting" class="icon-cog icon-white tip"></i></a>
</div>
<h3 class="widget-title"><i class="icons-tag icons-white"></i>Tags</h3>
<h3 class="widget-title"><i class="icons-tag icons-white"></i><%= t('nccu.tags') %></h3>
<div class="widget-content clear form-horizontal">
<% @tags.each do |tag| %>
<%= content_tag :label,:class => "checkbox inline" do -%>
@ -69,7 +69,7 @@
<div class="<%= locale %> fade tab-pane <%= ( i == 0 ) ? "in active" : '' %>">
<div class="title">
<%= f.label :name ,t(:name)%>
<%= f.label :name , t('nccu.link_name') %>
<%= f.fields_for :title_translations do |f| %>
<%= I18nVariable.from_locale(locale) %>
<%= f.text_field locale, :class=>'post-title', :value => (@web_link.title_translations[locale] rescue nil) %>
@ -91,7 +91,7 @@
</div>
<div class="title">
<%= f.label :url,t("web_resource.url") %>
<%= f.label :url, t('nccu.url') %>
<%= f.text_field :url %>
</div>