From 0d447cae2cf537919f83041f1bff70b01844ff3d Mon Sep 17 00:00:00 2001
From: kaizheng <18763216000@163.com>
Date: Tue, 27 Aug 2013 16:17:52 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E6=98=BE=E7=A4=BA=E5=88=86?=
=?UTF-8?q?=E7=B1=BB=E5=9B=BD=E9=99=85=E5=8C=96=EF=BC=8C=E9=9C=80=E6=B1=82?=
=?UTF-8?q?=E5=8F=8D=E9=A6=88=E5=9B=BE=E6=A0=87=E5=BC=95=E7=94=A8=E3=80=81?=
=?UTF-8?q?=E5=88=A0=E9=99=A4=E5=9B=BD=E9=99=85=E5=8C=96=EF=BC=8C=E7=95=99?=
=?UTF-8?q?=E8=A8=80=E5=9B=BE=E6=A0=87=E5=BC=95=E7=94=A8=E3=80=81=E5=88=A0?=
=?UTF-8?q?=E9=99=A4=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/controllers/watchers_controller.rb | 12 ++++++------
app/helpers/users_helper.rb | 18 +++++++++---------
app/views/bids/_bid_show.html.erb | 2 +-
app/views/bids/_history.html.erb | 6 +++---
app/views/bids/show.html.erb | 2 +-
app/views/layouts/_base_header.html.erb | 2 +-
app/views/layouts/base_bids.html.erb | 2 +-
app/views/layouts/base_users.html.erb | 8 ++++----
app/views/users/show.html.erb | 12 ++++++------
app/views/users/user_newfeedback.html.erb | 2 +-
app/views/users/watch_bids.html.erb | 2 +-
app/views/words/_message.html.erb | 6 +++---
config/locales/en.yml | 18 ++++++++++++++----
config/locales/zh.yml | 11 ++++++++++-
lib/redmine.rb | 4 ++--
15 files changed, 63 insertions(+), 44 deletions(-)
diff --git a/app/controllers/watchers_controller.rb b/app/controllers/watchers_controller.rb
index c01afebc..e48c3740 100644
--- a/app/controllers/watchers_controller.rb
+++ b/app/controllers/watchers_controller.rb
@@ -100,21 +100,21 @@ class WatchersController < ApplicationController
watchable.set_watcher(user, watching)
# @user = watchable # added by william
if watching
- # 修改 user和project的状态
+ # userproject״̬
if watchable.instance_of?(User)
- #写user_statuses表
+ #дuser_statuses
watchable.user_status.update_watchers_count(1)
elsif watchable.instance_of?(Project)
- #写project_statuese表
+ #дproject_statuese
watchable.project_status.update_watchers_count(1)
end
else
- # 修改 user和project的状态
+ # userproject״̬
if watchable.instance_of?(User)
- #写user_statuses表
+ #дuser_statuses
watchable.user_status.update_watchers_count(-1)
elsif watchable.instance_of?(Project)
- #写project_statuese表 :project_status
+ #дproject_statuese :project_status
watchable.project_status.update_watchers_count(-1)
end
end
diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb
index bb854ac4..a9abfbc2 100644
--- a/app/helpers/users_helper.rb
+++ b/app/helpers/users_helper.rb
@@ -73,19 +73,19 @@ module UsersHelper
content = ''.html_safe
case state
when 0
- s = content_tag('span', "所有动态", :class => "current-page")
+ s = content_tag('span', l(:label_user_all_activity), :class => "current-page")
content << content_tag('li', s)
- content << content_tag('li', link_to("只看自己", {:controller => 'users', :action => 'show', :type => 1}))
- content << content_tag('li', link_to("所有反馈", {:controller => 'users', :action => 'show', :type => 2}))
+ content << content_tag('li', link_to(l(:label_user_activity_myself), {:controller => 'users', :action => 'show', :type => 1}))
+ content << content_tag('li', link_to(l(:label_user_all_respond), {:controller => 'users', :action => 'show', :type => 2}))
when 1
- s = content_tag('span', "只看自己", :class => "current-page")
- content << content_tag('li', link_to("所有动态", {:controller => 'users', :action => 'show'}))
+ s = content_tag('span', l(:label_user_activity_myself), :class => "current-page")
+ content << content_tag('li', link_to(l(:label_user_all_activity), {:controller => 'users', :action => 'show'}))
content << content_tag('li', s, :class => "current-page")
- content << content_tag('li', link_to("所有反馈", {:controller => 'users', :action => 'show', :type => 2}))
+ content << content_tag('li', link_to(l(:label_user_all_respond), {:controller => 'users', :action => 'show', :type => 2}))
when 2
- s = content_tag('span', "所有反馈", :class => "current-page")
- content << content_tag('li', link_to("所有动态", {:controller => 'users', :action => 'show'}))
- content << content_tag('li', link_to("只看自己", {:controller => 'users', :action => 'show', :type => 1}))
+ s = content_tag('span', l(:label_user_all_respond), :class => "current-page")
+ content << content_tag('li', link_to(l(:label_user_all_activity), {:controller => 'users', :action => 'show'}))
+ content << content_tag('li', link_to(l(:label_user_activity_myself), {:controller => 'users', :action => 'show', :type => 1}))
content << content_tag('li', s, :class => "current-page")
end
content_tag('div', content, :class => "pagination")
diff --git a/app/views/bids/_bid_show.html.erb b/app/views/bids/_bid_show.html.erb
index 30dd92ed..534e84a1 100644
--- a/app/views/bids/_bid_show.html.erb
+++ b/app/views/bids/_bid_show.html.erb
@@ -19,7 +19,7 @@
<% elsif bid.reward_type == 2%>
<%= l(:label_bids_reward_method) %><%= bid.budget%>
<% else %>
- <%= l(:label_bids_reward_method) %><%= l(:label_bids_credit) %> <%= bid.budget%><%= l(:label_bids_credit_number) %>
+ <%= l(:label_bids_reward_method) %><%= l(:label_bids_credit) %> <%= bid.budget%> <%= l(:label_bids_credit_number) %>
<% end %>
(<%= link_to bid.biding_projects.count, project_for_bid_path(bid)%>)<%= l(:label_biding_project) %>
(<%= link_to bid.commit, respond_path(bid)%>)<%= l(:label_responses) %>
diff --git a/app/views/bids/_history.html.erb b/app/views/bids/_history.html.erb
index 577685e0..21115cdb 100644
--- a/app/views/bids/_history.html.erb
+++ b/app/views/bids/_history.html.erb
@@ -26,12 +26,12 @@
<%= l(:label_bids_published) %> <%= time_tag(journal.created_on).html_safe %> <%= l(:label_bids_published_ago) %> |
<% if @user==User.current|| User.current.admin? %>
- <%= link_to("引用", {:controller => 'bids', :action => 'new', :id => bid, :journal_id => journal}, :remote => true,
+ | <%= link_to(l(:label_bid_respond_quote), {:controller => 'bids', :action => 'new', :id => bid, :journal_id => journal}, :remote => true,
:method => 'post', :title => l(:button_quote))%>
- <%= link_to("删除", {:controller => 'bids', :action => 'destroy', :object_id => journal, :id => bid},:confirm => l(:label_delete_confirm),
+ <%= link_to(l(:label_bid_respond_delete), {:controller => 'bids', :action => 'destroy', :object_id => journal, :id => bid},:confirm => l(:label_delete_confirm),
:remote => true, :method => 'delete', :class => "delete", :confirm => l(:text_are_you_sure), :title => l(:button_delete)) %> |
<% else %>
- <%= link_to("引用", {:controller => 'bids', :action => 'new', :id => bid, :journal_id => journal}, :remote => true,
+ | <%= link_to(l(:label_bid_respond_quote), {:controller => 'bids', :action => 'new', :id => bid, :journal_id => journal}, :remote => true,
:method => 'post', :title => l(:button_quote))%>
<% end %>
|
diff --git a/app/views/bids/show.html.erb b/app/views/bids/show.html.erb
index 06b38307..034f980e 100644
--- a/app/views/bids/show.html.erb
+++ b/app/views/bids/show.html.erb
@@ -12,7 +12,7 @@
<% elsif @bid.reward_type == 2%>
<%= l(:label_bids_reward_method) %><%= @bid.budget%> |
<% else %>
- <%= l(:label_bids_reward_method) %><%= l(:label_bids_credit) %> <%= @bid.budget%><%= l(:label_bids_credit_number) %> |
+ <%= l(:label_bids_reward_method) %><%= l(:label_bids_credit) %> <%= @bid.budget%> <%= l(:label_bids_credit_number) %> |
<% end %>
diff --git a/app/views/layouts/_base_header.html.erb b/app/views/layouts/_base_header.html.erb
index 9be9065c..00bde7b0 100644
--- a/app/views/layouts/_base_header.html.erb
+++ b/app/views/layouts/_base_header.html.erb
@@ -8,7 +8,7 @@
<%= content_tag('div', "#{l(:label_logged_as)} #{link_to_user(User.current, :format => :username)}".html_safe, :id => 'loggedas') if User.current.logged? %>
- <%= content_tag('div', "#{link_to(image_tag('/images/mes.png'), feedback_path(User.current))}".html_safe, :title => "留言") if User.current.logged? %>
+ <%= content_tag('div', "#{link_to(image_tag('/images/mes.png'), feedback_path(User.current))}".html_safe, :title => l(:label_newfeedback_message)) if User.current.logged? %>
<%= User.current.count_new_jour if User.current.logged? && User.current.count_new_jour != 0 %>
diff --git a/app/views/layouts/base_bids.html.erb b/app/views/layouts/base_bids.html.erb
index 2acb18d3..3714ceb4 100644
--- a/app/views/layouts/base_bids.html.erb
+++ b/app/views/layouts/base_bids.html.erb
@@ -53,7 +53,7 @@
<% elsif @bid.reward_type == 2%>
<%= l(:label_bids_reward_method) %><%= @bid.budget%> |
<% else %>
-
<%= l(:label_bids_reward_method) %><%= l(:label_bids_credit) %> <%= @bid.budget%><%= l(:label_bids_credit_number) %> |
+
<%= l(:label_bids_reward_method) %><%= l(:label_bids_credit) %> <%= @bid.budget%> <%= l(:label_bids_credit_number) %> |
<% end %>
diff --git a/app/views/layouts/base_users.html.erb b/app/views/layouts/base_users.html.erb
index ddd2b837..3836a606 100644
--- a/app/views/layouts/base_users.html.erb
+++ b/app/views/layouts/base_users.html.erb
@@ -56,15 +56,15 @@
-
+
- <%= l(:label_user_joinin) %> |
+ <%= l(:label_user_joinin) %> |
- <%= l(:label_user_login) %> |
+ <%= l(:label_user_login) %> |
- <%= l(:label_user_mail) %> |
+ <%= l(:label_user_mail) %> |
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index cfe367fe..b74a309f 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -17,7 +17,7 @@
<% when 'Bid' %>
<% if e.user == User.current%>
- <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_new_activity) %> <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> |
+ <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> |
<% else %>
<%= link_to(h(e.user), user_path(e.user_id)) %><%= l(:label_new_activity) %> <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> |
<% end %>
@@ -34,7 +34,7 @@
<% when 'Journal' %>
<% if e.user == User.current%>
- <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_new_activity) %> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %> |
+ <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %> |
<% else %>
<%= link_to(h(e.user), user_path(e.user_id)) %><%= l(:label_new_activity) %> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %> |
<% end %>
@@ -51,7 +51,7 @@
<% when 'Changeset' %>
<% if e.user == User.current%>
- <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_new_activity) %> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %> |
+ <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_i_new_activity) %> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %> |
<% else %>
<%= link_to(h(e.user), user_path(e.user_id)) %><%= l(:label_new_activity) %> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %> |
<% end %>
@@ -68,7 +68,7 @@
<% when 'Message' %>
<% if e.user == User.current%>
- <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_new_activity) %> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %> |
+ <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %> |
<% else %>
<%= link_to(h(e.user), user_path(e.user_id)) %><%= l(:label_new_activity) %> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %> |
<% end %>
@@ -102,7 +102,7 @@
<% when 'News' %>
<% if e.user == User.current%>
- <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_new_activity) %> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %> |
+ <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %> |
<% else %>
<%= link_to(h(e.user), user_path(e.user_id)) %><%= l(:label_new_activity) %> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %> |
<% end %>
@@ -119,7 +119,7 @@
<% when 'Issue' %>
<% if e.user == User.current%>
- <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_new_activity) %> <%= link_to format_activity_title("#{act.tracker.name} ##{act.id} (#{act.status}): #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %> |
+ <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{act.tracker.name} ##{act.id} (#{act.status}): #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %> |
<% else %>
<%= link_to(h(e.user), user_path(e.user_id)) %><%= l(:label_new_activity) %> <%= link_to format_activity_title("#{act.tracker.name} ##{act.id} (#{act.status}): #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %> |
<% end %>
diff --git a/app/views/users/user_newfeedback.html.erb b/app/views/users/user_newfeedback.html.erb
index b5114ef9..55340902 100644
--- a/app/views/users/user_newfeedback.html.erb
+++ b/app/views/users/user_newfeedback.html.erb
@@ -3,7 +3,7 @@
<%= render :partial => 'words/new', :locals => {:user => @user, :sta => @state} %>
-留言(<%= @feedback_count%>)
+<%= l(:label_newfeedback_message) %>(<%= @feedback_count%>)
diff --git a/app/views/users/watch_bids.html.erb b/app/views/users/watch_bids.html.erb
index a9cd9789..6dc4ef24 100644
--- a/app/views/users/watch_bids.html.erb
+++ b/app/views/users/watch_bids.html.erb
@@ -22,7 +22,7 @@
<% elsif bid.reward_type == 2%>
<%= l(:label_bids_reward_method) %><%= bid.budget%>
<% else %>
- <%= l(:label_bids_reward_method) %><%= l(:label_bids_credit) %> <%= bid.budget%><%= l(:label_bids_credit_number) %>
+ <%= l(:label_bids_reward_method) %><%= l(:label_bids_credit) %> <%= bid.budget%> <%= l(:label_bids_credit_number) %>
<% end %>
diff --git a/app/views/words/_message.html.erb b/app/views/words/_message.html.erb
index d8f3666b..20458834 100644
--- a/app/views/words/_message.html.erb
+++ b/app/views/words/_message.html.erb
@@ -21,12 +21,12 @@
<%= format_time journal.created_on %> |
<% if @user == User.current %>
- <%= link_to("引用", {:controller => 'words', :action => 'new', :id => user, :journal_id => journal}, :remote => true,
+ <%= link_to(l(:label_newfeedback_quote), {:controller => 'words', :action => 'new', :id => user, :journal_id => journal}, :remote => true,
:method => 'post', :title => l(:button_quote))%>
- <%= link_to("删除", {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => user},
+ <%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => user},
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) if remove_allowed || journal.jour_id == User.current.id %> |
<% else %>
- <%= link_to("引用", {:controller => 'words', :action => 'new', :id => user, :journal_id => journal}, :remote => true,
+ <%= link_to(l(:label_newfeedback_quote), {:controller => 'words', :action => 'new', :id => user, :journal_id => journal}, :remote => true,
:method => 'post', :title => l(:button_quote))%>
<% end %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 6e55fb4c..afae8ece 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -1118,7 +1118,7 @@ en:
label_user_commits: "Code commits"
label_user_watchered: "Followed" # huang添加的
label_user_newfeedback: "Leave a message" ## huang添加的
- label_user_login: "Lastest login:"
+ label_user_login: "Last login:"
label_user_mail: "E-mail:"
label_user_joinin: "Join date:"
label_user_activities: "You have no activities,come and join us!"
@@ -1154,7 +1154,7 @@ en:
label_bidding_project: projects
button_bidding: I will participate in it
label_new_call: New call
- label_user_information: "My information"
+ label_user_information: My informations
#Customer added!Added by nie
label_create_time: Created time
@@ -1201,6 +1201,7 @@ en:
label_leave_others_message: leave message to him/her
label_leave_a_message: Leave him/her a message:
label_new_activity: has new activity
+ label_i_new_activity: have new activity
label_create_project: had participated in
label_praise: praise
label_cancel_praise: cancel praise
@@ -1285,7 +1286,7 @@ en:
label_money: money
label_reward_1: others
label_bids_credit: credit
- label_bids_credit_number: numbers
+ label_bids_credit_number: points
field_budget: reward
field_deadline: deadline
label_tags_selected: Selected Tags
@@ -1300,7 +1301,7 @@ en:
label_bid_project: projects
label_project_no_follow: The project hasn't been followed now!
label_no_bid_project: has no participate project
- label_bids_reward_method: method of reward:
+ label_bids_reward_method: reward:
label_bids_reward_what: input what for reward
label_call_bonus: bonus
label_bids_form_new_description: Publish a requirement,a competition or a course work.
@@ -1317,3 +1318,12 @@ en:
label_bids_published_ago: ago
label_welcome_trustie: Trustie forge
label_welcome_trustie_description: a socialized collaboration platform for project management, collaborative research, software development and software crowdsourcing for creative university students and entrepreneurs.
+ label_user_project: Projects
+ label_bid_respond_quote: Quote
+ label_bid_respond_delete: Delete
+ label_newfeedback_message: messages
+ label_newfeedback_quote: Quote
+ label_newfeedback_delete: Delete
+ label_user_all_activity: All activities
+ label_user_activity_myself: About me
+ label_user_all_respond: All respondes
\ No newline at end of file
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index b0506c72..a17d86a8 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -1335,4 +1335,13 @@ zh:
label_bids_published: 发布于
label_bids_published_ago: 之前
label_welcome_trustie: Trustie
- label_welcome_trustie_description: 面向有创意和激情的高校大学生与创业者,提供社交化的项目管理、协同研究、软件开发和众包平台。
\ No newline at end of file
+ label_welcome_trustie_description: 面向有创意和激情的高校大学生与创业者,提供社交化的项目管理、协同研究、软件开发和众包平台。
+ label_user_project: 项目
+ label_bid_respond_quote: 引用
+ label_bid_respond_delete: 删除
+ label_newfeedback_message: 留言
+ label_newfeedback_quote: 引用
+ label_newfeedback_delete: 删除
+ label_user_all_activity: 所有动态
+ label_user_activity_myself: 只看自己
+ label_user_all_respond: 所有反馈
\ No newline at end of file
diff --git a/lib/redmine.rb b/lib/redmine.rb
index ff1e175c..8da5b533 100644
--- a/lib/redmine.rb
+++ b/lib/redmine.rb
@@ -268,7 +268,7 @@ end
#added by young
Redmine::MenuManager.map :user_menu do |menu|
menu.push :activity, {:controller => 'users', :action => 'show' }
- menu.push :project, {:controller => 'users', :action => 'user_projects'}
+ menu.push :user_project, {:controller => 'users', :action => 'user_projects'}
menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids'}
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback'}
@@ -276,7 +276,7 @@ end
Redmine::MenuManager.map :user_menu_self do |menu|
menu.push :activity, {:controller => 'users', :action => 'show' }
menu.push :user_information, {:controller => 'users', :action => 'info'}
- menu.push :project, {:controller => 'users', :action => 'user_projects'}
+ menu.push :user_project, {:controller => 'users', :action => 'user_projects'}
menu.push :requirement_focus, {:controller => 'users', :action => 'watch_bids'}
menu.push :user_newfeedback, {:controller => 'users', :action => 'user_newfeedback'}