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 @@
<%= 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 |