diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index 8f3b184e0..9e51a8598 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -466,7 +466,7 @@ class BidsController < ApplicationController end # Replaces pre blocks with [...] text = text.to_s.strip.gsub(%r{
((.|\s)*?)
}m, '[...]') - @content = "> #{ll(Setting.default_language, :text_user_wrote, user)}\n> " + @content = "> #{ll(User.current.language, :text_user_wrote, user)}\n> " @content << text.gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n" @id = user.id rescue ActiveRecord::RecordNotFound diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb index 171b2f0c0..0a81d6ab6 100644 --- a/app/controllers/words_controller.rb +++ b/app/controllers/words_controller.rb @@ -71,7 +71,7 @@ class WordsController < ApplicationController end # Replaces pre blocks with [...] text = text.to_s.strip.gsub(%r{
((.|\s)*?)
}m, '[...]') - @content = "> #{ll(Setting.default_language, :text_user_wrote, user)}\n> " + @content = "> #{ll(User.current.language, :text_user_wrote, user)}\n> " @content << text.gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n" # @content << text.gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n" diff --git a/app/views/bids/_list_projects.html.erb b/app/views/bids/_list_projects.html.erb index 88a5ec36f..42812a5fa 100644 --- a/app/views/bids/_list_projects.html.erb +++ b/app/views/bids/_list_projects.html.erb @@ -24,7 +24,7 @@ <% if get_prize(b_project).nil? or get_prize(b_project) == "" %> <% if @bid.deadline < Date.today %> - 未评奖 + <%= l(:label_noawards)%> <% end %> <% else %> <% case @bid.reward_type %> diff --git a/app/views/bids/contest.html.erb b/app/views/bids/contest.html.erb index 51c6817ac..576323cbc 100644 --- a/app/views/bids/contest.html.erb +++ b/app/views/bids/contest.html.erb @@ -8,8 +8,10 @@ <% if User.current.logged? %> - - <%= link_to(l(:label_newtype_contest), {:controller => 'bids', :action => 'new_contest'}, :class => 'icon icon-add') %> + + <% if User.current.user_extensions.identity == 0 %> + <%= link_to(l(:label_newtype_contest), {:controller => 'bids', :action => 'new_contest'}, :class => 'icon icon-add') %> + <% end %> <% end %> diff --git a/app/views/users/_my_course.html.erb b/app/views/users/_my_course.html.erb index c06abe4b0..d7e4a4cc1 100644 --- a/app/views/users/_my_course.html.erb +++ b/app/views/users/_my_course.html.erb @@ -47,13 +47,13 @@ <%= format_time(membership.created_on) %> - 课程角色: + <%= l(:role_of_course)%>: <% if membership.roles.sort.collect(&:to_s).join(', ') =='Manager' %> - 老师 + <%= l(:label_teacher)%> <% elsif membership.roles.sort.collect(&:to_s).join(', ') =='Reporter' %> - 学生 + <%= l(:label_student)%> <% elsif membership.roles.sort.collect(&:to_s).join(', ') =='TA' %> - 助教 + <%= l(:label_ta)%> <% end %> diff --git a/app/views/users/_my_create_homework.html.erb b/app/views/users/_my_create_homework.html.erb index d5652fe0a..4c7cbe02f 100644 --- a/app/views/users/_my_create_homework.html.erb +++ b/app/views/users/_my_create_homework.html.erb @@ -12,8 +12,13 @@
<%= link_to(bid.author.lastname+bid.author.firstname, user_path(bid.author), :class => 'bid_user') %> - 在课程: <%= link_to(bid.courses.first.name, project_path(bid.courses.first)) %> - 中布置了作业: <%= link_to(bid.name, respond_path(bid), :class => 'bid_path') %> + <%if @user.language=='zh'%> + <%= l(:label_in_course)%>: <%= link_to(bid.courses.first.name, project_path(bid.courses.first)) %> + <%= l(:label_assign_homework)%>: <%= link_to(bid.name, respond_path(bid), :class => 'bid_path') %> + <%else%> + <%= l(:label_assign_homework)%>: <%= link_to(bid.name, respond_path(bid), :class => 'bid_path') %> + <%= l(:label_in_course)%>: <%= link_to(bid.courses.first.name, project_path(bid.courses.first)) %> + <%end%> <%= link_to( l(:button_delete), diff --git a/config/locales/en.yml b/config/locales/en.yml index e07bd5fee..9098f3eea 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1535,3 +1535,11 @@ en: label_task_submit_form_accessory: Submitted as accessory label_task_submit_form_project: Submitted as project label_news_notice: Release course news + + role_of_course: Role + label_student: student + label_teacher: teacher + label_ta: teacher assistant + label_in_course: in course + label_assign_homework: assigned homewok + label_noawards: No awards diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 355c2c40e..ee6c3a62e 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1626,3 +1626,13 @@ zh: label_new_join_order: 请输入课程密码 label_task_submit_form_accessory: 作业最终以附件形式提交 label_task_submit_form_project: 作业最终以项目形式提交 + label_has_been: 已经被 + label_course_userd_by: 个课程引用 + + role_of_course: 课程角色 + label_student: 学生 + label_teacher: 老师 + label_ta: 助教 + label_in_course: 在课程中 + label_assign_homework: 中布置了作业 + label_noawards: 未评奖 \ No newline at end of file