用户列表,需求列表,项目列表,用户粉丝列表,欢迎页面等英文页面解决单复数问题

This commit is contained in:
kaizheng 2013-09-11 20:54:01 +08:00
parent d14b88f07f
commit 4dfffabb67
9 changed files with 149 additions and 23 deletions

View File

@ -26,9 +26,9 @@
</td>
</tr>
<tr><td>
<span class="font_lighter"><%= l(:label_biding_project) %>(<strong><%=link_to bid.biding_projects.count, project_for_bid_path(bid) %></strong>)</span>
<span class="font_lighter"><%= l(:label_responses) %>(<strong><%=link_to bid.commit, respond_path(bid) %></strong>)</span>
<span class="font_lighter"><%= l(:label_followers) %>(<strong><%=link_to bid.watcher_users.count, respond_path(bid) %></strong>)</span>
<span class="font_lighter"><%= l(:label_x_biding_project, :count => bid.biding_projects.count) %>(<strong><%=link_to bid.biding_projects.count, project_for_bid_path(bid) %></strong>)</span>
<span class="font_lighter"><%= l(:label_x_responses, :count => bid.commit) %>(<strong><%=link_to bid.commit, respond_path(bid) %></strong>)</span>
<span class="font_lighter"><%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<strong><%=link_to bid.watcher_users.count, respond_path(bid) %></strong>)</span>
</td>
</tr>
</table></td>

View File

@ -49,7 +49,7 @@
<div>
<strong class="font_small_watch"><%=link_to l(:label_user_watcher)+"("+User.watched_by(@user.id).count.to_s+")" ,:controller=>"users", :action=>"user_watchlist"%></strong> &nbsp;
<strong class="font_small_watch"><%=link_to l(:label_user_fans)+"("+@user.watcher_users(@user.id).count.to_s+")", :controller=>"users", :action=>"user_fanslist" %></strong>
<strong class="font_small_watch"><%=link_to l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count)+"("+@user.watcher_users(@user.id).count.to_s+")", :controller=>"users", :action=>"user_fanslist" %></strong>
</div>
</div>
@ -105,7 +105,7 @@
<!--fans-->
<div class="user_fans">
<div class="font_title_left">
<strong><%= l(:label_user_fans) %></strong>
<strong><%= l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count) %></strong>
<% if show_more_fans?(@user) %>
<div style="font-size: 11px; display: inline; float: right; margin-top: 5px; margin-right: 20px" ><%= link_to l(:label_more), :controller => "users", :action => "user_fanslist"%></div>
<% end %>

View File

@ -10,10 +10,10 @@
</div>
<div class="information">
<p class="stats">
<%= content_tag('span', @project.watcher_users.count, :class => "info") %><%= content_tag('span', l(:label_follow_people)) %>
<%= content_tag('span', @project.watcher_users.count, :class => "info") %><%= content_tag('span', l(:label_x_follow_people,:count =>@project.watcher_users.count)) %>
</p>
<p class="stats">
<%= content_tag('span', "#{@project.users.count}", :class => "info") %><%= content_tag('span', l(:label_current_contributors)) %>
<%= content_tag('span', "#{@project.users.count}", :class => "info") %><%= content_tag('span', l(:label_x_current_contributors, :count => @project.users.count)) %>
</p>
<p class="stats">
<%= content_tag('span', "#{(@project.repository.nil? || @project.repository.changesets[0].nil?) ? '0' : distance_of_time_in_words(Time.now, @project.repository.changesets[0].committed_on)}", :class => "info") %><%= content_tag('span', l(:label_since_last_commits)) %>

View File

@ -106,7 +106,7 @@
<% unless user.id == 1%>
<div class="well">
<%= content_tag "p", "#{format_date(user.created_on)}#{l(:label_member_since)}", :class => "float_right member_since" %>
<%= content_tag "p", "#{format_date(user.created_on)} #{l(:label_member_since)}", :class => "float_right member_since" %>
<%= image_tag "/images/time_member.png", :class => "img_member_time"%>
<!-- <%= get_avatar?(user) ? (link_to image_tag(avatar_image(user), :class => 'avatar'), user_path(user), :class => "avatar") : (link_to image_tag("/images/12_50.png", :class => 'avatar'), user_path(user), :class => "avatar") %> -->
<div>
@ -114,18 +114,18 @@
<%= content_tag "span", link_to_user(user), :class => "nomargin avatar_name" %>
</div>
<div style="margin-top: 20px;margin-left:66px">
<%= l(:label_has_fans,:count=>user.watcher_users.count)%>
<%= l(:label_x_has_fans,:count=>user.watcher_users.count)%>
<%= l(:label_has_watchers,:count=>User.watched_by(user.id).count) %>
</div>
<div class="user-bottom">
<% unless user.memberships.empty? %>
<%= l(:label_contribute_to, :project_count => "#{user.memberships.count}") %>
<%= l(:label_x_contribute_to, :count => user.memberships.count) %>
<% for member in user.memberships %>
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : '' %>
<% end %>
<% end %>
<%= user.changesets.count == 0 ? '' : ",#{l(:label_total_commit, :total_commit => user.changesets.count)}" %>
<%= user.changesets.count == 0 ? '' : ",#{l(:label_x_total_commit, :count => user.changesets.count)}" %>
</div>
</div>
<% end -%>

View File

@ -1,5 +1,5 @@
<!--add by huang-->
<h3><%= l(:label_user_fans)%></h3>
<h3><%= l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count)%></h3>
<div class="inf_user_image">
<% for user in @user.watcher_users %>
<ul class="list_watch"><li>
@ -14,7 +14,7 @@
<tr>
<td colspan="2" width="580px" ><p class="font_description">
<% unless user.memberships.empty? %>
<%= l(:label_contribute_to, :project_count => "#{user.memberships.count}") %>
<%= l(:label_x_contribute_to, :count => user.memberships.count) %>
<% for member in user.memberships %>
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : '' %>
<% end %>

View File

@ -14,7 +14,7 @@
<tr>
<td colspan="2" width="580px" ><p class="font_description">
<% unless user.memberships.empty? %>
<%= l(:label_contribute_to, :project_count => "#{user.memberships.count}") %>
<%= l(:label_x_contribute_to, :count => user.memberships.count) %>
<% for member in user.memberships %>
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : '' %>
<% end %>

View File

@ -196,11 +196,11 @@ software development and software crowdsourcing.</td></tr>
<td rowspan="2" style="padding-left: 20px"><%=link_to image_tag(url_to_avatar(User.current), :class => 'avatar'), user_path(User.current) %></td>
<td><strong class="font_small_watch"><%= link_to l(:label_user_watcher)+"("+User.watched_by(User.current).count.to_s+")", user_path(User.current) %></strong>&nbsp
<strong class="font_small_watch"><%=link_to l(:label_user_fans)+"("+User.current.watcher_users(User.current.id).count.to_s+")", user_path(User.current) %></strong></td>
<strong class="font_small_watch"><%=link_to l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count)+"("+User.current.watcher_users(User.current.id).count.to_s+")", user_path(User.current) %></strong></td>
</tr>
<tr>
<td align="left"><% unless User.current.memberships.empty? %>
<%= l(:label_welcome_participate) %> <strong class="font_small_watch"><%= link_to User.current.memberships.count, {:controller => 'users', :action => 'user_projects', :id => User.current} %></strong> <%= l(:label_welcome_participate_project)%>
<%= l(:label_x_welcome_participate, :count => User.current.memberships.count) %> <strong class="font_small_watch"><%= link_to User.current.memberships.count, {:controller => 'users', :action => 'user_projects', :id => User.current} %></strong> <%= l(:label_welcome_participate_project)%>
<!-- <% for member in User.current.memberships %>
<%= link_to_project(member.project) %><%= (User.current.memberships.last == member) ? '' : '' %>
<% end %> --> <% end %></td>

View File

@ -1118,6 +1118,13 @@ en:
label_user_info: "User information" #huang 添加
label_user_watcher: "Following" # huang添加的 # modified by bai
label_user_fans: "Followed by" # modified by bai
# modify by men
label_x_user_fans:
zero: fan
one: fan
other: fans
#end
label_user_commits: "Code commits"
label_user_watchered: "Followed by" # huang添加的
label_user_newfeedback: "Messages" ## huang添加的 # modified by bai
@ -1162,15 +1169,45 @@ en:
#Customer addedAdded by nie
label_create_time: Created time
label_current_contributors: current contributors
#modify by men
label_x_current_contributors:
zero: current contributor
one: current contributor
other: current contributors
#end
label_lines_of_code: lines of code
label_since_last_commits: since last commit
label_users_on_trustie: User
label_front: first page
label_commit_on: commit times
#modify by men
label_x_commit_on:
zero: commit time
one: commit time
other: commit times
#end
label_follow_people: following # modified by bai
label_member_since: join
#modify by men
label_x_follow_people:
zero: follower
one: follower
other: followers
#end
label_member_since: joined
label_contribute_to: Participates %{project_count} projects
#modify by men
label_x_contribute_to:
zero: Participates %{count} project
one: Participates %{count} project
other: Participates %{count} projects
#end
label_total_commit: Totally %{total_commit} commits # modified by bai
#modify by men
label_x_total_commit:
zero: Totally %{count} commit
one: Totally %{count} commit
other: Totally %{count} commits
#end
label_upload_profile: Upload avatar
label_type_as: Type as
label_status_as: Status as
@ -1184,9 +1221,24 @@ en:
label_call_list: Calls list
label_requirement_list: Requirement list
label_biding_project: projects
label_responses: comments
label_followers: following # modified by bai
label_x_biding_project: #modify by men
zero: project
one: project
other: projects
#end
label_x_responses: #modify by men
zero: comment
one: comment
other: comments
#end
label_x_followers: #modified by men
zero: follower
one: follower
other: followers
#end
label_price: price
label_RMB_sign:
label_investment_budget: Investment budget
@ -1222,6 +1274,12 @@ en:
label_has_praisers: praisers(%{count})
label_has_watchers: following(%{count}) # modified by bai
label_has_fans: followed by(%{count}) # modified by bai
#modify by men
label_x_has_fans:
zero: fan(%{count})
one: fan(%{count})
other: fans(%{count})
#end
label_me: me
label_my: my
label_i: I
@ -1336,6 +1394,12 @@ en:
label_user_all_respond: All replies
label_layouts_feedback: Messages
label_welcome_participate: participates
#modify by men
label_x_welcome_participate:
zero: participate
one: participate
other: participates
#end
label_welcome_participate_project: projects
label_projects_feedback: responded to the project
label_projects_feedback_respond: Respond

View File

@ -768,6 +768,12 @@ zh:
label_user_info: "个人简介" #huang 添加
label_user_watcher: "关注" # huang添加的
label_user_fans: "粉丝"
# modify by men
label_x_user_fans:
zero: 粉丝
one: 粉丝
other: 粉丝
#end
label_user_commits: "代码提交"
label_user_watchered: "关注" # huang添加的
label_user_newfeedback: "留言" ## huang添加的
@ -1150,15 +1156,45 @@ zh:
label_total_time: 合计
label_create_time: 创建时间 #Customer addedAdded by nie
label_current_contributors: 位当前贡献者
#modify by men
label_x_current_contributors:
zero: 位当前贡献者
one: 位当前贡献者
other: 位当前贡献者
#end
label_lines_of_code: 行代码
label_since_last_commits: 距离上次提交时间
label_users_on_trustie: 用户
label_front: 第一页
label_commit_on: 次提交
#modify by men
label_x_commit_on:
zero: 次提交
one: 次提交
other: 次提交
#end
label_follow_people: 个关注者
#modify by men
label_x_follow_people:
zero: 个关注者
one: 个关注者
other: 个关注者
#end
label_member_since: 加入
label_contribute_to: 参与了 %{project_count} 个项目:
#modify by men
label_x_contribute_to:
zero: 参与了 %{count} 个项目:
one: 参与了 %{count} 个项目:
other: 参与了 %{count} 个项目:
#end
label_total_commit: 共%{total_commit}次提交
#modify by men
label_x_total_commit:
zero: 共 %{count} 次提交
one: 共 %{count} 次提交
other: 共 %{count} 次提交
#end
label_upload_profile: 上传头像
label_type_as: 类型为
label_status_as: 状态为
@ -1202,9 +1238,21 @@ zh:
label_requirement_list: 需求列表
label_biding_project: 项目
label_responses: 留言
label_followers: 关注
label_x_biding_project: #modify by men
zero: 项目
one: 项目
other: 项目
#end
label_x_responses: #modify by men
zero: 留言
one: 留言
other: 留言
#end
label_x_followers: #modify by men
zero: 关注
one: 关注
other: 关注
#end
label_price: 悬赏:
label_RMB_sign:
label_investment_budget: 投资预算:
@ -1233,6 +1281,12 @@ zh:
label_has_praisers: 赞(%{count})
label_has_watchers: 关注(%{count})
label_has_fans: 粉丝(%{count})
#modify by men
label_x_has_fans:
zero: 粉丝(%{count})
one: 粉丝(%{count})
other: 粉丝(%{count})
#end
label_me:
label_my:
label_i:
@ -1351,6 +1405,12 @@ zh:
label_user_all_respond: 所有反馈
label_layouts_feedback: 留言
label_welcome_participate: 参与了
#modify by men
label_x_welcome_participate:
zero: 参与了
one: 参与了
other: 参与了
#end
label_welcome_participate_project: 个项目
label_projects_feedback: 对项目进行了反馈
label_projects_feedback_respond: 回复
@ -1358,3 +1418,5 @@ zh:
button_projects_feedback_respond: 回复
label_projects_feedback_respond_content: 请输入回复内容
label_user_create_project: 创建了