个人主页,课程相关国际化

exceptionHandle
wanglinchun 12 years ago
parent a0c6a183fe
commit 48a0f2f409

@ -207,9 +207,9 @@ module ProjectsHelper
type = [] type = []
option1 = [] option1 = []
option2 = [] option2 = []
option1 << '作业最终以附件形式提交' option1 << l(:label_task_submit_form_accessory)
option1 << 1 option1 << 1
option2 << '作业最终以项目形式提交' option2 << l(:label_task_submit_form_project)
option2 << 2 option2 << 2
type << option1 type << option1
type << option2 type << option2

@ -97,13 +97,13 @@ module UsersHelper
if @user.user_extensions.identity == 0 if @user.user_extensions.identity == 0
case state case state
when 0 when 0
s = content_tag('span', '我执教的课程', :class => "current-page") s = content_tag('span', l(:label_teaching_course), :class => "current-page")
content << content_tag('li', s) content << content_tag('li', s)
content << content_tag('li', link_to('我发布的作业', {:controller => 'users', :action => 'user_courses', :type => 1})) content << content_tag('li', link_to(l(:label_release_homework), {:controller => 'users', :action => 'user_courses', :type => 1}))
content_tag('div', content, :class => "pagination") content_tag('div', content, :class => "pagination")
when 1 when 1
s = content_tag('span', '我发布的作业', :class => "current-page") s = content_tag('span', l(:label_release_homework), :class => "current-page")
content << content_tag('li', link_to('我执教的课程', {:controller => 'users', :action => 'user_courses'})) content << content_tag('li', link_to(l(:label_teaching_course), {:controller => 'users', :action => 'user_courses'}))
content << content_tag('li', s, :class => "current-page") content << content_tag('li', s, :class => "current-page")
content_tag('div', content, :class => "pagination") content_tag('div', content, :class => "pagination")
end end

@ -50,7 +50,7 @@ module WatchersHelper
def join_in_course(course, user) def join_in_course(course, user)
return '' unless user && user.logged? return '' unless user && user.logged?
joined = user.member_of?(course) joined = user.member_of?(course)
text = joined ? '退出课程 ' : '加入课程' text = joined ? l(:label_exit_course) : l(:label_join_course)
url_t = join_path(:object_id => course.id) url_t = join_path(:object_id => course.id)
url_f = try_join_path(:object_id => course.id) url_f = try_join_path(:object_id => course.id)
method = joined ? 'delete' : 'post' method = joined ? 'delete' : 'post'

@ -198,7 +198,7 @@
$('#enterprise').hide() $('#enterprise').hide()
$('#gender').show() $('#gender').show()
var technical_titleOptions = new Array( var technical_titleOptions = new Array(
"教授","副教授","讲师","助教"); "<%= l(:label_label_technicl_title_professor) %>","<%= l(:label_technicl_title_associate_professor) %>","<%= l(:label_technicl_title_lecturer) %>","<%= l(:label_technicl_title_teaching_assistant) %>");
break; break;
case '1' : case '1' :

@ -29,7 +29,7 @@
<% unless bid.courses.empty? %> <% unless bid.courses.empty? %>
<% teacher = Course.find_by_extra(bid.courses.first.identifier).teacher %> <% teacher = Course.find_by_extra(bid.courses.first.identifier).teacher %>
<tr> <tr>
<td><span class="font_lighter">课程名称:<%= link_to bid.courses.first.name, project_path(bid.courses.first)%>&nbsp;&nbsp;教师<%= link_to teacher.lastname+teacher.firstname, user_path(teacher) %></span></td> <td><span class="font_lighter"><%= l(:label_bid_show_course_name) %><%= link_to bid.courses.first.name, project_path(bid.courses.first)%>&nbsp;&nbsp;<%= l(:label_bid_show_teacher_name) %><%= link_to teacher.lastname+teacher.firstname, user_path(teacher) %></span></td>
</tr> </tr>
<% end %> <% end %>
<% end %> <% end %>

@ -4,7 +4,7 @@
<table width="100%" valign="center"> <table width="100%" valign="center">
<tr> <tr>
<td width="16%"><span style="margin-left:0px"> <td width="16%"><span style="margin-left:0px">
竞赛列表 <%= l(:label_contest_list) %>
</span></td> </span></td>
<td valign="center"><% if User.current.logged? %> <td valign="center"><% if User.current.logged? %>

@ -5,7 +5,7 @@
<tr> <tr>
<td width="16%"><span style="margin-left:0px"> <td width="16%"><span style="margin-left:0px">
<% if @project_type == '1' %> <% if @project_type == '1' %>
作业列表 <%= l(:label_bids_task_list) %>
<% else %> <% else %>
<%= l(:label_call_list)%> <%= l(:label_call_list)%>
<% end %></span></td> <% end %></span></td>

@ -7,8 +7,8 @@
</div> </div>
<%= content_tag('div', "#{link_to(l(:label_layouts_feedback)+'(' + User.current.count_new_jour.to_s + ')', feedback_path(User.current))}".html_safe, :id => 'loggedas') if User.current.logged? %> <%= content_tag('div', "#{link_to(l(:label_layouts_feedback)+'(' + User.current.count_new_jour.to_s + ')', feedback_path(User.current))}".html_safe, :id => 'loggedas') if User.current.logged? %>
<%= 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', "#{l(:label_logged_as)} #{link_to_user(User.current, :format => :username)}".html_safe, :id => 'loggedas') if User.current.logged? %>
<%= content_tag('li', "#{link_to(l(:label_enterprise_college), :controller =>'projects', :action => 'course_enterprise', :project_type => 1 )}".html_safe, :id=> 'account-enterprise') %> <%= content_tag('li', "#{link_to(l(:label_enter_college), :controller =>'projects', :action => 'course_enterprise', :project_type => 1 )}".html_safe, :id=> 'account-enterprise') %>
<%= content_tag('li', "#{link_to(l(:lable_college_enterprise), :controller => 'projects', :action =>'enterprise_course', :project_type => 0)}".html_safe, :id=> 'account-college') %> <%= content_tag('li', "#{link_to(l(:lable_enter_enterprise), :controller => 'projects', :action =>'enterprise_course', :project_type => 0)}".html_safe, :id=> 'account-college') %>
<!-- <div style="float: right; margin-top: 13px;"> <!-- <div style="float: right; margin-top: 13px;">
<%= 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 => "留言") if User.current.logged? %>
</div> --> </div> -->

@ -83,9 +83,9 @@
<td class="font_index"><%= link_to files_count, project_files_path(@project) %></td> <td class="font_index"><%= link_to files_count, project_files_path(@project) %></td>
<tr class="font_aram"> <tr class="font_aram">
<td align="center" width="80px"> <%= "成员" %></td> <td align="center" width="80px"> <%= l(:label_x_base_courses_member, :count => @project.members.count) %></td>
<td align="center" width="80px"><%= l(:label_course_data) %></td> <td align="center" width="80px"><%= l(:label_x_course_data, :count => files_count) %></td>
</tr> </tr>
</table> </table>
<div class="user_underline"></div> <div class="user_underline"></div>

@ -63,7 +63,7 @@
<% unless @bid.parent_id.nil?%> <% unless @bid.parent_id.nil?%>
<tr> <tr>
<td><div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis; -o-text-overflow: ellipsis; width:200px"> <td><div style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis; -o-text-overflow: ellipsis; width:200px">
作业来源<%= link_to(Bid.find(@bid.parent_id).name, respond_path(Bid.find(@bid.parent_id))) %></div></td> <%= l(:label_homework_source) %><%= link_to(Bid.find(@bid.parent_id).name, respond_path(Bid.find(@bid.parent_id))) %></div></td>
</tr> </tr>
<% end %> <% end %>
</table> </table>

@ -368,7 +368,7 @@ $().ready(function(){
$('#enterprise').hide() $('#enterprise').hide()
$('#gender').show() $('#gender').show()
var technical_titleOptions = new Array( var technical_titleOptions = new Array(
"教授","副教授","讲师","助教"); "<%= l(:label_technicl_title_professor) %>","<%= l(:label_technicl_title_associate_professor) %>","<%= l(:label_technicl_title_lecturer) %>","<%= l(:label_technicl_title_teaching_assistant) %>");
break; break;
case '1' : case '1' :
@ -419,10 +419,10 @@ $().ready(function(){
<p style="width:400px;padding-left: 26px;"><%= l(:label_identity) %> <p style="width:400px;padding-left: 26px;"><%= l(:label_identity) %>
<td class="info" style="width: 10px"> <td class="info" style="width: 10px">
<select onchange="showtechnical_title(this.value, document.getElementById(&#39;userTechnical_title&#39;));" name="identity" id="userIdentity" class="location"> <select onchange="showtechnical_title(this.value, document.getElementById(&#39;userTechnical_title&#39;));" name="identity" id="userIdentity" class="location">
<option value="">--请选择身份--</option> <option value=""><%= l(:label_account_identity_choose) %></option>
<option value="0">教师</option> <option value="0"><%= l(:label_account_identity_teacher) %></option>
<option value="1">学生</option> <option value="1"><%= l(:label_account_identity_student) %></option>
<option value="3">开发者</option> <option value="3"><%= l(:label_account_identity_developer) %></option>
</select></td> </select></td>
<span id = 'technical_title' style = 'display:none'> <span id = 'technical_title' style = 'display:none'>
@ -442,11 +442,11 @@ $().ready(function(){
<% else %> <% else %>
<span style="display:none"> <span style="display:none">
<select onchange="showtechnical_title(this.value, document.getElementById(&#39;userTechnical_title&#39;));" name="identity" id="userIdentity" class="location"> <select onchange="showtechnical_title(this.value, document.getElementById(&#39;userTechnical_title&#39;));" name="identity" id="userIdentity" class="location">
<option value="">--请选择身份--</option> <option value=""><%= l(:label_account_identity_choose) %></option>
<option value="0">教师</option> <option value="0"><%= l(:label_account_identity_teacher) %></option>
<option value="1">学生</option> <option value="1"><%= l(:label_account_identity_student) %></option>
<option value="2">企业</option> <option value="2"><%= l(:label_account_identity_enterprise) %></option>
<option value="3">开发者</option> <option value="3"><%= l(:label_account_identity_developer) %></option>
</select> </select>
</span> </span>

@ -49,9 +49,10 @@
<td align="cneter"> <td align="cneter">
<%= text_field_tag 'course_password', nil, :size => 27 %></td> <%= text_field_tag 'course_password', nil, :size => 27 %></td>
<td align="center"> <%= text_field_tag 'course_password', nil, :size => 48%>
<%= submit_tag '加入', :name => nil, :class => "bid_btn", :onclick => "hideModal(this);" %></td>
<td align="center"> <p class="buttons" style="padding-top: 10px; padding-bottom: 1px; margin-bottom: 1px">
<%= submit_tag l(:label_new_join), :name => nil, :class => "bid_btn", :onclick => "hideModal(this);" %>
<%= submit_tag l(:button_cancel), :name => nil, :class => "bid_btn", :onclick => "hideModal(this);", :type => 'button' %> <%= submit_tag l(:button_cancel), :name => nil, :class => "bid_btn", :onclick => "hideModal(this);", :type => 'button' %>
</td> </td>
</tr></table> </tr></table>

@ -44,17 +44,17 @@
<%= content_tag('span', @project.watcher_users.count, :class => "info") %><%= content_tag('span', l(:label_x_follow_people,:count =>@project.watcher_users.count)) %> <%= content_tag('span', @project.watcher_users.count, :class => "info") %><%= content_tag('span', l(:label_x_follow_people,:count =>@project.watcher_users.count)) %>
</p> </p>
<p class="stats"> <p class="stats">
<%= content_tag('span', "#{@project.homeworks.count}", :class => "info") %><%= content_tag('span', l(:label_x_task, :count => @project.users.count)) %> <%= content_tag('span', "#{@project.homeworks.count}", :class => "info") %><%= content_tag('span', l(:label_x_task, :count => @project.homeworks.count)) %>
</p> </p>
<p class="stats"> <p class="stats">
<%= content_tag('span', "#{@project.members.count}", :class => "info") %><%= content_tag('span', l(:label_x_member)) %> <%= content_tag('span', "#{@project.members.count}", :class => "info") %><%= content_tag('span', l(:label_x_member, :count => @project.members.count)) %>
</p> </p>
<p class="stats"> <p class="stats">
<% files_count = @project.attachments.count %> <% files_count = @project.attachments.count %>
<% @project.versions.each do |version| %> <% @project.versions.each do |version| %>
<% files_count += version.attachments.count %> <% files_count += version.attachments.count %>
<% end %> <% end %>
<%= content_tag('span', files_count, :class => "info") %><%= content_tag('span', l(:label_x_data)) %> <%= content_tag('span', files_count, :class => "info") %><%= content_tag('span', l(:label_x_data,:count => files_count)) %>
</p> </p>
</div> </div>
@ -76,7 +76,7 @@
<%= content_tag('a', @admin.collect{|u| link_to(u.user.lastname+u.user.firstname, user_path(u.user_id))}.join(", ").html_safe) %> <%= content_tag('a', @admin.collect{|u| link_to(u.user.lastname+u.user.firstname, user_path(u.user_id))}.join(", ").html_safe) %>
<% end %> <% end %>
<% if(@project.project_type==1)%> <% if(@project.project_type==1)%>
&nbsp;&nbsp;&nbsp;大学 &nbsp;&nbsp;&nbsp;<%= l(:label_course_college) %>
<%if @admin&&@admin.first&&@admin.first.user&&@admin.first.user.user_extensions%> <%if @admin&&@admin.first&&@admin.first.user&&@admin.first.user.user_extensions%>
<%= @admin.first.user.user_extensions.occupation %> <%= @admin.first.user.user_extensions.occupation %>
<% end %> <% end %>

@ -45,5 +45,5 @@
<% end %> <% end %>
<% else %> <% else %>
<p class="font_description">暂无任何作业</p> <p class="font_description"><%= l(:label_my_create_honework_no_homework) %></p>
<% end %> <% end %>

@ -50,5 +50,5 @@
<% end %> <% end %>
<% else %> <% else %>
<p class="font_description">暂无任何作业</p> <p class="font_description"><%= l(:label_my_honework_no_homework) %></p>
<% end %> <% end %>

@ -1340,7 +1340,7 @@ en:
field_birthday: Birthday field_birthday: Birthday
field_brief_introduction: Info field_brief_introduction: Info
field_location: Location field_location: Location
field_occupation: Occupation field_occupation: Position
field_work_experience: Work experience(year) field_work_experience: Work experience(year)
field_zip_code: Zip code field_zip_code: Zip code
label_reward: reward label_reward: reward
@ -1356,6 +1356,7 @@ en:
label_tags_related: Related Tags label_tags_related: Related Tags
button_project_tags_add: Add button_project_tags_add: Add
label_issue_query_condition: Query condition label_issue_query_condition: Query condition
label_homework_source: Task
label_issue_query: Query label_issue_query: Query
label_issue_cancel_query: Cancel query label_issue_cancel_query: Cancel query
field_reward_type: The type of reward field_reward_type: The type of reward
@ -1426,9 +1427,111 @@ en:
label_course_new: New course label_course_new: New course
label_public_info: If you don't choose public, only the project's members can see the project. label_public_info: If you don't choose public, only the project's members can see the project.
label_course_student: Student label_course_student: Student
label_homework: Homework label_homework: Task
label_course_new_homework: New homework label_course_new_homework: New homework
label_course_homework_list: Homework List label_course_homework_list: Homework List
label_course_homework_new: new homework label_course_homework_new: new homework
label_course_data: Data
label_x_course_data:
zero: File
one: File
other: Files
#add by men
label_brief_introduction: Personality words
label_technical_title: Title
label_technicl_title_professor: Professor
label_technicl_title_associate_professor: Associate professor
label_technicl_title_lecturer: Lecturer
label_technicl_title_teaching_assistant: Teaching assistant
label_account_identity_teacher: Teacher
label_account_identity_student: Student
label_account_identity_developer: Developer
label_account_identity_enterprise: Enterprise
label_account_identity_choose: --Please choose your identity--
label_enter_college: College Entrance
lable_enter_enterprise: Enterprise Entrance
label_homework_info: Status
label_question_student: Feedback
label_student_response: Feedback
label_my_question: Please raise your questions here
label_teacher_homework: Teacher's name
label_course_homework: Corresponding course
label_limit_time: Deadline
label_commit_homework: Submitted Task
label_no_course_project: No submitted work
button_clear_requirement: Cancel
#end
label_x_bids_responses: #modify by huang
zero: response
one: response
other: responses
#end
label_teaching_course: My Courses
label_release_homework: Released Tasks
label_term: Term
label_spring: spring term
label_summer: summer term
label_autumn: autumn term
label_winter: winter term
text_command: The password is required when applying a course, and it will be released by the teacher of.
label_enterprise_into: Enterprise Entrance
label_college_into: College Entrance
label_user_course: Courses
label_new_course: Courses
field_tea_name: Teacher
label_course_college: College
label_x_task:
zero: Task
one: Task
other: Tasks
label_project_course_unadd: You have no course,creat one now
label_my_create_honework_no_homework: no task now
label_my_homework_no_homework: no task now
label_x_member:
zero: member
one: member
other: members
label_x_data:
zero: file
one: file
other: files
label_bid_show_course_name: Course
label_bid_show_teacher_name: Teacher
label_bid_contest_show_course_name: Course
label_bid_contest_show_teacher_name: Teacher
label_x_homework_project:
zero: submitted task
one: submitted task
other: submitted tasks
label_new_homework: Tasks
label_new_contest: Contests
label_contest_list: Contests list
label_newtype_contest: Release contest
label_question_requirement: introduce a question
button_bidding_homework: To take part in contest
label_bids_form_contest_new_description: Enterprise or college can release a contest here.
label_contest_name: Input the name of the contest
label_contest_description: Contentdescription your contest
label_main_teacher: Main teacher
label_main_term: Term
label_teacher_work_unit: Position
label_course_overview: Status
label_course_file: File
label_course_news: News
label_x_base_courses_member:
zero: member
one: member
other: members
label_bids_task_list: Tasks list
label_join_course: join course
label_exit_course: exit course
label_new_join: Join
label_new_join_order: Please input the course order.
label_homeworks_form_new_description: Release a task,the submit form of the task may be accessory or project,setting in the task form.
label_course_settings: Setting
field_homework_type: Submit form
label_task_submit_form_accessory: Submitted as accessory
label_task_submit_form_project: Submitted as project
label_news_notice: Release course news

@ -218,7 +218,6 @@ zh:
field_name: 名称 field_name: 名称
#added by huang #added by huang
field_tea_name: 教师 field_tea_name: 教师
field_location: 工作单位
field_couurse_time: 学时 field_couurse_time: 学时
field_course_code: 学分 field_course_code: 学分
field_state: 加入课程口令 field_state: 加入课程口令
@ -530,9 +529,9 @@ zh:
#end #end
#by huang # modified by bai #by huang # modified by bai
label_college: 高校进入 label_college: 高校进入
label_enterprise_college: 进入高校 label_enter_college: 进入高校
label_enterprise: 企业进入 label_enterprise: 企业进入
lable_college_enterprise: 进入企业 lable_enter_enterprise: 进入企业
label_term: 学期 label_term: 学期
label_spring: 春季学期 label_spring: 春季学期
label_summer: 夏季学期 label_summer: 夏季学期
@ -608,7 +607,6 @@ zh:
label_question_student: 学生反馈 #huang label_question_student: 学生反馈 #huang
label_homework_commit: 提交作业 #huang label_homework_commit: 提交作业 #huang
label_homework_info: 作业情况 #huang label_homework_info: 作业情况 #huang
label_course_file: 资料下载
label_course_news: 课程通知 label_course_news: 课程通知
label_version: 版本 label_version: 版本
label_version_new: 新建版本 label_version_new: 新建版本
@ -1552,7 +1550,12 @@ zh:
label_course_homework_list: 作业列表 label_course_homework_list: 作业列表
label_course_homework_new: 发布作业 label_course_homework_new: 发布作业
label_fork_homework_new: 选为作业 label_fork_homework_new: 选为作业
label_course_data: 资料
label_x_course_data:
zero: 资料
one: 资料
other: 资料
label_homework_statistics: 作业统计 label_homework_statistics: 作业统计
label_technical_title: 职称 label_technical_title: 职称
@ -1568,6 +1571,51 @@ zh:
label_course_settings: 课程设置 label_course_settings: 课程设置
#added by nie #added by nie
label_x_task: 份作业 label_x_task:
label_x_member: 个成员 zero: 份作业
label_x_data: 份资料 one: 份作业
other: 份作业
label_x_member:
zero: 个成员
one: 个成员
other: 个成员
label_x_data:
zero: 份资料
one: 份资料
other: 份资料
#add by men
label_technicl_title_professor: 教授
label_technicl_title_associate_professor: 副教授
label_technicl_title_lecturer: 讲师
label_technicl_title_teaching_assistant: 助教
label_account_identity_teacher: 教师
label_account_identity_student: 学生
label_account_identity_developer: 开发者
label_account_identity_enterprise: 企业
label_account_identity_choose: --请选择身份--
label_teaching_course: 我执教的课程
label_release_homework: 我发布的作业
label_enterprise_into: 进入企业
label_homework_source: 作业来源
label_course_college: 大学
label_my_create_honework_no_homework: 暂无任何作业
label_my_homework_no_homework: 暂无任何作业
label_bid_show_course_name: 课程名称
label_bid_show_teacher_name: 教师
label_bid_contest_show_course_name: 课程名称
label_bid_contest_show_teacher_name: 教师
label_contest_list: 竞赛列表
label_x_base_courses_member:
zero: 成员
one: 成员
other: 成员
label_bids_task_list: 作业列表
label_join_course: 加入课程
label_exit_course: 退出课程
label_new_join: 加入
label_new_join_order: 请输入课程密码
label_task_submit_form_accessory: 作业最终以附件形式提交
label_task_submit_form_project: 作业最终以项目形式提交
Loading…
Cancel
Save