Page by page changes for i18n yml

This commit is contained in:
Christophe Vilayphiou 2012-09-24 08:36:29 +08:00
parent 4fb35b00f2
commit c846a102ff
22 changed files with 38 additions and 34 deletions

View File

@ -30,7 +30,7 @@
</ul> </ul>
<% if at_least_module_manager %> <% if at_least_module_manager %>
<%= show_ad_banner_permission_link ad_banner_tab%> <%= show_ad_banner_permission_link ad_banner_tab%>
<%= link_to t('ad.delete_banner'),admin_ad_banner_path(ad_banner_tab),:class => 'btn',:method => :delete,:confirm => t('sure?') %> <%= link_to t(:delete),admin_ad_banner_path(ad_banner_tab),:class => 'btn',:method => :delete,:confirm => t('sure?') %>
<% end -%> <% end -%>
<%#= render :partial => 'new_add_banner_file', :object => ad_banner_tab.ad_images.build, :locals => { :field_name => "new_ad_images[]", :f => f, :classes => "r_destroy" } %> <%#= render :partial => 'new_add_banner_file', :object => ad_banner_tab.ad_images.build, :locals => { :field_name => "new_ad_images[]", :f => f, :classes => "r_destroy" } %>

View File

@ -19,7 +19,7 @@
<div class="widget-action clear"> <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> <a href="#" class="action"><i title="Set the announcement to start and end dates" class="icon-exclamation-sign icon-white tip"></i></a>
</div> </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="widget-content clear">
<div id="calendarRange"> <div id="calendarRange">
<div class="input-append"> <div class="input-append">
@ -73,7 +73,7 @@
<div class="widget-action clear"> <div class="widget-action clear">
<a class="action"><i title="Upload pictures" class="icon-exclamation-sign icon-white tip"></i></a> <a class="action"><i title="Upload pictures" class="icon-exclamation-sign icon-white tip"></i></a>
</div> </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="widget-content clear">
<div class="control-group"> <div class="control-group">
<div class="upload-picture"> <div class="upload-picture">
@ -101,7 +101,7 @@
<div class="widget-action clear"> <div class="widget-action clear">
<a class="action"><i class="icon-exclamation-sign icon-white tip" data-original-title="Upload pictures"></i></a> <a class="action"><i class="icon-exclamation-sign icon-white tip" data-original-title="Upload pictures"></i></a>
</div> </div>
<h3 class="widget-title"><i class="icons-star-thin icons-white"></i>Type</h3> <h3 class="widget-title"><i class="icons-star-thin icons-white"></i><%= t(:type) %></h3>
<div class="widget-content clear"> <div class="widget-content clear">
<%= f.select :link_open ,AdImage::LINK_OPEN_TYPES%> <%= f.select :link_open ,AdImage::LINK_OPEN_TYPES%>
</div> </div>
@ -111,7 +111,7 @@
<div class="widget-action clear"> <div class="widget-action clear">
<a class="action"><i class="icon-exclamation-sign icon-white tip" data-original-title="Set the range time"></i></a> <a class="action"><i class="icon-exclamation-sign icon-white tip" data-original-title="Set the range time"></i></a>
</div> </div>
<h3 class="widget-title"><i class="icons-time icons-white"></i>FEQ</h3> <h3 class="widget-title"><i class="icons-time icons-white"></i><%= t(:frequency) %></h3>
<div class="widget-content clear"> <div class="widget-content clear">
<%= f.text_field :weight ,:class=> 'span3',:placeholder=>"在套圖中出現次數 1次請輸入1" %> <%= f.text_field :weight ,:class=> 'span3',:placeholder=>"在套圖中出現次數 1次請輸入1" %>
</div> </div>
@ -121,7 +121,7 @@
<div class="widget-action clear"> <div class="widget-action clear">
<a class="action"><i class="icon-exclamation-sign icon-white tip" data-original-title="Add a reference link"></i></a> <a class="action"><i class="icon-exclamation-sign icon-white tip" data-original-title="Add a reference link"></i></a>
</div> </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 clear"> <div class="widget-content clear">
<%= f.text_field :out_link ,:class=> 'span3',:placeholder => "輸入連結"%> <%= f.text_field :out_link ,:class=> 'span3',:placeholder => "輸入連結"%>
</div> </div>

View File

@ -27,7 +27,7 @@
<% form_tag admin_module_app_manager_auth_proc_path do %> <% form_tag admin_module_app_manager_auth_proc_path do %>
<%= render :partial => "layouts/users_checkbox_ary" %> <%= render :partial => "layouts/users_checkbox_ary" %>
<div class="form-actions form-fixed pagination-right"> <div class="form-actions form-fixed pagination-right">
<%= submit_tag "Update", :class => 'btn btn-primary' %> <%= submit_tag t(:update_), :class => 'btn btn-primary' %>
</div> </div>
<% end -%> <% end -%>
<% end -%> <% end -%>

View File

@ -29,7 +29,7 @@
<%= render :partial => "layouts/users_checkbox_ary" %> <%= render :partial => "layouts/users_checkbox_ary" %>
<div class="form-actions form-fixed pagination-right"> <div class="form-actions form-fixed pagination-right">
<%= hidden_field_tag 'app_key', @module_app.key %> <%= hidden_field_tag 'app_key', @module_app.key %>
<%= submit_tag "Update", :class => 'btn btn-primary' %> <%= submit_tag t(:update_), :class => 'btn btn-primary' %>
</div> </div>
<% end -%> <% end -%>
<% end -%> <% end -%>

View File

@ -2,7 +2,7 @@
<% LIST[:page_part_kinds].each do |kind| %> <% LIST[:page_part_kinds].each do |kind| %>
<%= f.radio_button :kind, kind, :class => 'part_kind' %> <%= f.radio_button :kind, kind, :class => 'part_kind' %>
<%= t(kind, :scope => 'page_part_kinds' %> <%= t(kind, :scope => 'page_part_kinds') %>
<% end %> <% end %>
<% LIST[:page_part_kinds].each do |kind| %> <% LIST[:page_part_kinds].each do |kind| %>

View File

@ -3,5 +3,5 @@
<%= I18nVariable.from_locale(locale) %>:<%= f.text_field locale %> <%= I18nVariable.from_locale(locale) %>:<%= f.text_field locale %>
<% end %> <% end %>
<%= f.hidden_field :module_app_id, :value => @module_app_id %> <%= f.hidden_field :module_app_id, :value => @module_app_id %>
<%= f.submit %> <%= f.submit t(:add) %>
<% end %> <% end %>

View File

@ -3,5 +3,5 @@
<%= I18nVariable.from_locale(locale) %>:<%= f.text_field locale %> <%= I18nVariable.from_locale(locale) %>:<%= f.text_field locale %>
<% end %> <% end %>
<%= f.hidden_field :module_app_id, :value => tag.module_app_id %> <%= f.hidden_field :module_app_id, :value => tag.module_app_id %>
<%= f.submit %> <%= f.submit t(:update_) %>
<% end %> <% end %>

View File

@ -130,6 +130,7 @@ en:
file_: File file_: File
file_type: File Type file_type: File Type
forgot_password: Forgot your password? forgot_password: Forgot your password?
frequency: Frequency
help: Help help: Help
hidden: Hidden hidden: Hidden
hide: Hide hide: Hide
@ -266,6 +267,7 @@ en:
status: Status status: Status
structure: Structure structure: Structure
sub_manager: SubManager sub_manager: SubManager
subtitle: Subtitle
submit: Submit submit: Submit
submit_approval: Submit approval submit_approval: Submit approval
submit_user_list: Submit user list submit_user_list: Submit user list

View File

@ -130,6 +130,7 @@ zh_tw:
file_: 檔案 file_: 檔案
file_type: 檔案類型 file_type: 檔案類型
forgot_password: 忘記密碼? forgot_password: 忘記密碼?
frequency: 頻率
help: 幫助 help: 幫助
hidden: 隱藏的 hidden: 隱藏的
hide: 隱藏 hide: 隱藏
@ -266,6 +267,7 @@ zh_tw:
status: 身份 status: 身份
structure: 結構 structure: 結構
sub_manager: 次管理員 sub_manager: 次管理員
subtitle: 副標題
submit: 送出 submit: 送出
submit_approval: 送出已核准 submit_approval: 送出已核准
submit_user_list: 送出使用者列表 submit_user_list: 送出使用者列表

View File

@ -25,7 +25,7 @@
<% form_tag panel_announcement_back_end_approval_setting_path do %> <% form_tag panel_announcement_back_end_approval_setting_path do %>
<%= render :partial => "layouts/users_checkbox_ary" %> <%= render :partial => "layouts/users_checkbox_ary" %>
<div class="form-actions form-fixed pagination-right"> <div class="form-actions form-fixed pagination-right">
<%= submit_tag "Update", :class => 'btn btn-primary' %> <%= submit_tag t(:update_), :class => 'btn btn-primary' %>
</div> </div>
<% end -%> <% end -%>
<% end -%> <% end -%>

View File

@ -2,10 +2,10 @@
<%= form_for(@bulletin_category, :remote => true, :url => @url) do |f| %> <%= form_for(@bulletin_category, :remote => true, :url => @url) do |f| %>
<h2><%= (@bulletin_category.new_record? ? 'Add' : 'Edit') %></h2> <h2><%= @bulletin_category.new_record? ? t(:add) : t(:edit) %></h2>
<div id="widget-title"> <div id="widget-title">
<%= f.label :key %> <%= f.label :key, t(:key) %>
<%= f.text_field :key %> <%= f.text_field :key %>
</div> </div>
@ -13,7 +13,7 @@
<%= f.fields_for :title_translations do |f| %> <%= f.fields_for :title_translations do |f| %>
<% @site_valid_locales.each do |locale| %> <% @site_valid_locales.each do |locale| %>
<div class="control-group"> <div class="control-group">
<%= label_tag "name-#{locale}", "Name-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %> <%= label_tag "name-#{locale}", "#{t(:name)}-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
<div class="controls"> <div class="controls">
<%= f.text_field locale, :class => 'input-xxlarge', :value => (@bulletin_category.title_translations[locale] rescue nil) %> <%= f.text_field locale, :class => 'input-xxlarge', :value => (@bulletin_category.title_translations[locale] rescue nil) %>
</div> </div>

View File

@ -57,7 +57,7 @@
<div class="widget-action clear"> <div class="widget-action clear">
<a class="action"><i title="Rejected Report" class="icon-cog icon-white tip"></i></a> <a class="action"><i title="Rejected Report" class="icon-cog icon-white tip"></i></a>
</div> </div>
<h3 class="widget-title"><i class="icons-tag icons-white"></i>Approval Status</h3> <h3 class="widget-title"><i class="icons-tag icons-white"></i><%= t('approval.stat') %></h3>
<div class="widget-content clear form-horizontal"> <div class="widget-content clear form-horizontal">
<%= @bulletin.not_checked_reason rescue t("rejected_reason_empty") %> <%= @bulletin.not_checked_reason rescue t("rejected_reason_empty") %>
</div> </div>
@ -129,7 +129,7 @@
<div class="editor"> <div class="editor">
<%= f.label :text ,t('announcement.bulletin.text')%> <%= f.label :text ,t(:text)%>
<%= f.fields_for :text_translations do |f| %> <%= f.fields_for :text_translations do |f| %>
<%= I18nVariable.from_locale(locale) %> <%= I18nVariable.from_locale(locale) %>
<%= f.text_area locale, :style=>"width:100%", :class => 'tinymce_textarea', :value => (@bulletin.text_translations[locale] rescue nil) %> <%= f.text_area locale, :style=>"width:100%", :class => 'tinymce_textarea', :value => (@bulletin.text_translations[locale] rescue nil) %>

View File

@ -12,7 +12,7 @@
<%= f.fields_for :title_translations do |f| %> <%= f.fields_for :title_translations do |f| %>
<% @site_valid_locales.each do |locale| %> <% @site_valid_locales.each do |locale| %>
<div class="control-group"> <div class="control-group">
<%= label_tag "title-#{locale}", "Title-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %> <%= label_tag "title-#{locale}", "#{t(:title)}-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
<div class="controls"> <div class="controls">
<%= f.text_field locale, :class => 'input-xxlarge', :value => (bulletin.title_translations[locale] rescue nil) %> <%= f.text_field locale, :class => 'input-xxlarge', :value => (bulletin.title_translations[locale] rescue nil) %>
</div> </div>

View File

@ -5,4 +5,4 @@
['start_date', 'postdate', 'span1-2', :start_date], ['start_date', 'postdate', 'span1-2', :start_date],
['end_date', 'deadline', 'span1-2', :end_date], ['end_date', 'deadline', 'span1-2', :end_date],
['tags', 'tags', 'span1-2', :tags], ['tags', 'tags', 'span1-2', :tags],
['last_modified', 'update_user_id','span1-3', 'bulletin.last_modified']).html_safe %> ['last_modified', 'update_user_id','span1-3', 'last_modified']).html_safe %>

View File

@ -25,7 +25,7 @@
<% form_tag panel_news_back_end_approval_setting_path do %> <% form_tag panel_news_back_end_approval_setting_path do %>
<%= render :partial => "layouts/users_checkbox_ary" %> <%= render :partial => "layouts/users_checkbox_ary" %>
<div class="form-actions form-fixed pagination-right"> <div class="form-actions form-fixed pagination-right">
<%= submit_tag "Update", :class => 'btn btn-primary' %> <%= submit_tag t(:update_), :class => 'btn btn-primary' %>
</div> </div>
<% end -%> <% end -%>
<% end -%> <% end -%>

View File

@ -2,10 +2,10 @@
<%= form_for(@news_bulletin_category, :remote => true, :url => @url) do |f| %> <%= form_for(@news_bulletin_category, :remote => true, :url => @url) do |f| %>
<h2><%= (@news_bulletin_category.new_record? ? 'Add' : 'Edit') %></h2> <h2><%= (@news_bulletin_category.new_record? ? t(:edit) : t(:add)) %></h2>
<div id="widget-title"> <div id="widget-title">
<%= f.label :key %> <%= f.label :key, t(:key) %>
<%= f.text_field :key %> <%= f.text_field :key %>
</div> </div>
@ -13,7 +13,7 @@
<%= f.fields_for :title_translations do |f| %> <%= f.fields_for :title_translations do |f| %>
<% @site_valid_locales.each do |locale| %> <% @site_valid_locales.each do |locale| %>
<div class="control-group"> <div class="control-group">
<%= label_tag "name-#{locale}", "Name-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %> <%= label_tag "name-#{locale}", "#{t(:name)}-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
<div class="controls"> <div class="controls">
<%= f.text_field locale, :class => 'input-xxlarge', :value => (@news_bulletin_category.title_translations[locale] rescue nil) %> <%= f.text_field locale, :class => 'input-xxlarge', :value => (@news_bulletin_category.title_translations[locale] rescue nil) %>
</div> </div>

View File

@ -106,7 +106,7 @@
<div class="widget-action clear"> <div class="widget-action clear">
<a class="action"><i title="Rejected Report" class="icon-cog icon-white tip"></i></a> <a class="action"><i title="Rejected Report" class="icon-cog icon-white tip"></i></a>
</div> </div>
<h3 class="widget-title"><i class="icons-tag icons-white"></i>Approval Status</h3> <h3 class="widget-title"><i class="icons-tag icons-white"></i><%= t('approval.stat') %></h3>
<div class="widget-content clear form-horizontal"> <div class="widget-content clear form-horizontal">
<%= @news_bulletin.not_checked_reason rescue t("rejected_reason_empty") %> <%= @news_bulletin.not_checked_reason rescue t("rejected_reason_empty") %>
</div> </div>
@ -131,7 +131,7 @@
<div id="post-body"> <div id="post-body">
<div id="post-body-content" class="clear"> <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? %> <%= 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_bulletin.news_bulletin.unit_name')%> <%= f.label :unit_list_for_anc,t(: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.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.label :category,t(:category) %>

View File

@ -12,7 +12,7 @@
<%= f.fields_for :title_translations do |f| %> <%= f.fields_for :title_translations do |f| %>
<% @site_valid_locales.each do |locale| %> <% @site_valid_locales.each do |locale| %>
<div class="control-group"> <div class="control-group">
<%= label_tag "title-#{locale}", "Title-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %> <%= label_tag "title-#{locale}", "#{t(:title)}-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
<div class="controls"> <div class="controls">
<%= f.text_field locale, :class => 'input-xxlarge', :value => (news_bulletin.title_translations[locale] rescue nil) %> <%= f.text_field locale, :class => 'input-xxlarge', :value => (news_bulletin.title_translations[locale] rescue nil) %>
</div> </div>

View File

@ -1,6 +1,6 @@
en: en:
news: news_bulletin:
campus_news: Campus News campus_news: Campus News
create_news_bulletin_category_success: News category was successfully created create_news_bulletin_category_success: News category was successfully created
create_news_bulletin_success: News was successfully created create_news_bulletin_success: News was successfully created

View File

@ -5,7 +5,7 @@
<div id="post-body"> <div id="post-body">
<div id="post-body-content"> <div id="post-body-content">
<div class="title"> <div class="title">
<%= f.label :name %> <%= f.label :name, t(:name) %>
<%= @page_context.page.title %> <%= @page_context.page.title %>
</div> </div>
@ -22,7 +22,7 @@
<div class="<%= locale %> fade tab-pane <%= ( i == 0 ) ? "in active" : '' %>"> <div class="<%= locale %> fade tab-pane <%= ( i == 0 ) ? "in active" : '' %>">
<div class="title"> <div class="title">
<%= f.label :context %> <%= f.label :context, t(:content) %>
<%= f.fields_for :context_translations do |f| %> <%= f.fields_for :context_translations do |f| %>
<%= I18nVariable.from_locale(locale) %> <%= I18nVariable.from_locale(locale) %>
<%= f.text_area locale, :style=>"width:100%", :class => 'tinymce_textarea', :value => (@page_context.context_translations[locale] rescue nil) %> <%= f.text_area locale, :style=>"width:100%", :class => 'tinymce_textarea', :value => (@page_context.context_translations[locale] rescue nil) %>

View File

@ -2,10 +2,10 @@
<%= form_for(@web_link_category, :remote => true, :url => @url) do |f| %> <%= form_for(@web_link_category, :remote => true, :url => @url) do |f| %>
<h2><%= (@web_link_category.new_record? ? 'Add' : 'Edit') %></h2> <h2><%= (@web_link_category.new_record? ? t(:add) : t(:edit)) %></h2>
<div id="widget-title"> <div id="widget-title">
<%= f.label :key %> <%= f.label :key, t(:key) %>
<%= f.text_field :key %> <%= f.text_field :key %>
</div> </div>
@ -13,7 +13,7 @@
<%= f.fields_for :title_translations do |f| %> <%= f.fields_for :title_translations do |f| %>
<% @site_valid_locales.each do |locale| %> <% @site_valid_locales.each do |locale| %>
<div class="control-group"> <div class="control-group">
<%= label_tag "name-#{locale}", "Name-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %> <%= label_tag "name-#{locale}", "#{t(:name)}-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
<div class="controls"> <div class="controls">
<%= f.text_field locale, :class => 'input-xxlarge', :value => (@web_link_category.title_translations[locale] rescue nil) %> <%= f.text_field locale, :class => 'input-xxlarge', :value => (@web_link_category.title_translations[locale] rescue nil) %>
</div> </div>
@ -23,7 +23,7 @@
</div> </div>
<div class="form-actions"> <div class="form-actions">
<%= f.submit 'Submit/送出', :class=>'btn btn-primary' %> <%= f.submit t(:submit), :class=>'btn btn-primary' %>
</div> </div>
<% end %> <% end %>

View File

@ -77,7 +77,7 @@
</div> </div>
<div class="title"> <div class="title">
<%= f.label :describe,t("web_resource.describe") %> <%= f.label :describe, t(:description) %>
<%= f.fields_for :context_translations do |f| %> <%= f.fields_for :context_translations do |f| %>
<%= I18nVariable.from_locale(locale) %> <%= I18nVariable.from_locale(locale) %>
<%= f.text_area locale, :style=>"width:100%", :value => (@web_link.context_translations[locale] rescue nil) %> <%= f.text_area locale, :style=>"width:100%", :value => (@web_link.context_translations[locale] rescue nil) %>