From f05e046751c73622437bc054e3bdf108001d3ac6 Mon Sep 17 00:00:00 2001 From: whimlex Date: Fri, 30 Jan 2015 10:26:26 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 2 +- app/helpers/welcome_helper.rb | 36 ++-- app/views/layouts/_base_footer.html.erb | 22 +-- .../layouts/_bootstrap_base_footer.html.erb | 12 +- app/views/welcome/_search_course.html.erb | 8 +- app/views/welcome/_search_project.html.erb | 10 +- app/views/welcome/contest.html.erb | 2 +- app/views/welcome/index.html.erb | 7 +- config/locales/en.yml | 162 +++++++++++++++--- config/locales/zh.yml | 155 ++++++++++++++--- 10 files changed, 321 insertions(+), 95 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 1face5c38..4d9004e57 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1844,7 +1844,7 @@ module ApplicationHelper users_link = link_to l(:label_software_user), {:controller => 'users', :action => 'index', :host => Setting.user_domain} # contest_link = link_to l(:label_contest_innovate), {:controller => 'contests', :action => 'index'} bids_link = link_to l(:label_requirement_enterprise), {:controller => 'bids', :action => 'index'} - forum_link = link_to l(:label_project_module_forums), {:controller => "forums", :action => "index"} + forum_link = link_to l(:label_forum_all), {:controller => "forums", :action => "index"} stores_link = link_to l(:label_stores_index), {:controller => 'stores', :action=> 'index'} school_all_school_link = link_to l(:label_school_all), {:controller => 'school', :action => 'index'} diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb index 27caa8306..d101fd36c 100644 --- a/app/helpers/welcome_helper.rb +++ b/app/helpers/welcome_helper.rb @@ -314,38 +314,38 @@ module WelcomeHelper str = ' '.html_safe case event.event_type when 'news' - str << content_tag("span", "发表了") << + str << content_tag("span", l(:field_user_active_published)) << content_tag("span", find_all_event_type(event)) << ': '.html_safe << link_to(strip_tags(event.event_description).gsub(/ /,''), event.event_url, {:title => event.event_description}) when 'issue', 'message' , 'bid' , 'wiki-page' , 'document' - str << content_tag("span", "发表了") << + str << content_tag("span", l(:field_user_active_published)) << content_tag("span", find_all_event_type(event)) << ': '.html_safe << link_to(event.event_title, event.event_url, {:title => event.event_title}) when 'reply' ,'Reply', 'Memo' - str << content_tag("span", "发表了") << - content_tag("span", find_all_event_type(event)) << + str << content_tag("span", l(:field_user_active_published)) << + content_tag("span", find_all_event_type(event)) << ': '.html_safe << link_to(strip_tags(event.event_description).gsub(/ /,''), event.event_url, {:title => event.event_description}) when 'attachment' - str << content_tag('span', '上传了') << + str << content_tag('span', l(:field_user_active_uploaded)) << content_tag('span', find_all_event_type(event)) << ': '.html_safe << link_to(event.event_title, event.event_url, {:title => event.event_title}) << link_to((' ['.html_safe+l(:label_downloads_list).to_s << ']'), project_files_path(event.container.project), :class => "attachments_list_color") else - str << content_tag("span", "更新了") << + str << content_tag("span", l(:field_user_active_updated)) << content_tag("span", find_all_event_type(event)) << ': '.html_safe << link_to(event.event_title, event.event_url, {:title => event.event_title}) end str rescue Exception => e - str << content_tag("span", '未知内容') + str << content_tag("span", l(:field_user_active_unknow)) end def show_event_reply event - str = "回复(" + str = l(:field_active_reply) case event.event_type when 'news' str << link_to( event.comments.count, news_path(event)) << ")" @@ -463,25 +463,25 @@ module WelcomeHelper def find_all_event_type event case event.event_type when 'news' - '新闻' + l(:field_user_active_news) when 'issue' - '缺陷' + l(:field_user_active_issue) when 'attachment' - '附件' + l(:field_user_active_attachment) when 'message' - '主题' + l(:field_user_active_message) when 'Reply','reply' - '回复' + l(:field_user_active_reply) when 'bid' - '作业' + l(:field_user_active_bid) when 'Memo' - '主题' + l(:field_user_active_memo) when 'document' - '文件' + l(:field_user_active_document) when 'changeset' - '版本库' + l(:field_user_active_changeset) when 'issue-note' - '问题说明' + l(:field_user_active_issue_note) else event.event_type end diff --git a/app/views/layouts/_base_footer.html.erb b/app/views/layouts/_base_footer.html.erb index 4050de3b7..4716ed25a 100644 --- a/app/views/layouts/_base_footer.html.erb +++ b/app/views/layouts/_base_footer.html.erb @@ -9,12 +9,12 @@

<% if @organizer.nil? %>

- 主办单位 - 国防科学技术大学并行与分布处理国家重点实验室 - 计算机科学与技术系 - 版权©2007~2014 - 联系我们 - 湘ICP备09019772 + <%= l(:label_hosted_organization) %> + <%= l(:label_hosted_by) %> + <%= l(:label_sponsor) %> + <%= l(:label_rights_reserved)%> + <%= l(:label_contact_us) %> + <%= l(:label_license) %>

<% else %> <%= @organizer.description.html_safe %> @@ -22,11 +22,11 @@