Skip to content

Commit

Permalink
new localization with coherent words
Browse files Browse the repository at this point in the history
  • Loading branch information
torasakura committed Oct 17, 2012
1 parent 4514b33 commit 9882f71
Show file tree
Hide file tree
Showing 91 changed files with 1,086 additions and 224 deletions.
6 changes: 3 additions & 3 deletions app/controllers/admin/courses_controller.rb
Expand Up @@ -48,7 +48,7 @@ def create

respond_to do |format|
if @course.save
format.html { redirect_to(admin_courses_path, :notice => t(:course, :scope => :course)+" "+t(:successfully_created, :scope => :general)) }
format.html { redirect_to(admin_courses_path, :notice => t(:course_created, :scope => :course)) }
else
format.html { render :action => "new" }
end
Expand All @@ -62,7 +62,7 @@ def update

respond_to do |format|
if @course.update_attributes(params[:course])
format.html { redirect_to(admin_courses_path, :notice => t(:course, :scope => :course)+" "+t(:successfully_updated, :scope => :general)) }
format.html { redirect_to(admin_courses_path, :notice => t(:course_updated, :scope => :course)) }
else
format.html { render :action => "edit" }
end
Expand All @@ -73,7 +73,7 @@ def update_clone
@course = Course.find(params[:id])
respond_to do |format|
if @course.clone_course(params[:course])
format.html { redirect_to(admin_courses_path, :notice => t(:course, :scope => :course)+" "+t(:successfully_cloned, :scope => :course)) }
format.html { redirect_to(admin_courses_path, :notice => t(:course_cloned, :scope => :course)) }
else
format.html { render :action => "clone" }
end
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/admin/developers_controller.rb
Expand Up @@ -35,7 +35,7 @@ def create
@profile = @developer.profile
respond_to do |format|
if @developer.save
format.html { redirect_to(admin_developers_path, :notice => t(:developer, :scope => :developer)+" "+t(:successfully_created, :scope => :general)) }
format.html { redirect_to(admin_developers_path, :notice => t(:created, :scope => :developer)) }
else
format.html { render :action => "new" }
end
Expand All @@ -51,7 +51,7 @@ def update
@courses = Course.all
respond_to do |format|
if @developer.update_attributes(params[:developer])
format.html { redirect_to(admin_developers_path, :notice => t(:developer, :scope => :developer)+" "+t(:successfully_updated, :scope => :general)) }
format.html { redirect_to(admin_developers_path, :notice => t(:updated, :scope => :developer)) }
else
format.html { render :action => "edit" }
end
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/admin/stitch_modules_controller.rb
Expand Up @@ -30,7 +30,7 @@ def create

respond_to do |format|
if @stitch_module.save
format.html { redirect_to(admin_course_path(@course), :notice => t(:stitch_module, :scope => :stitch_module)+" "+t(:successfully_created, :scope => :general)) }
format.html { redirect_to(admin_course_path(@course), :notice => t(:created, :scope => :stitch_module)) }
else
format.html { render :action => "new" }
end
Expand All @@ -44,7 +44,7 @@ def update

respond_to do |format|
if @stitch_module.update_attributes(params[:stitch_module])
format.html { redirect_to(admin_course_path(@course), :notice => t(:stitch_module, :scope => :stitch_module)+" "+t(:successfully_updated, :scope => :general)) }
format.html { redirect_to(admin_course_path(@course), :notice => t(:updated, :scope => :stitch_module)) }
else
format.html { render :action => "edit" }
end
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/developer/tutors_controller.rb
Expand Up @@ -48,7 +48,7 @@ def create
@courses = Course.all
respond_to do |format|
if @tutor.save
format.html { redirect_to(developer_tutors_path, :notice => 'Tutor was successfully created.') }
format.html { redirect_to(developer_tutors_path, :notice => t(:created, :scope => :tutor)) }
format.xml { render :xml => @tutor, :status => :created, :location => @tutor }
else
format.html { render :action => "new" }
Expand All @@ -65,7 +65,7 @@ def update
@courses = Course.all
respond_to do |format|
if @tutor.update_attributes(params[:tutor])
format.html { redirect_to(developer_tutors_path, :notice => 'Tutor was successfully updated.') }
format.html { redirect_to(developer_tutors_path, :notice => t(:updated, :scope => :tutor)) }
format.xml { head :ok }
else
format.html { render :action => "edit" }
Expand Down
12 changes: 4 additions & 8 deletions app/controllers/session/password_resets_controller.rb
Expand Up @@ -10,11 +10,10 @@ def create
@profile = Profile.find_by_email(params[:email])
if @profile
@profile.deliver_password_reset_instructions!
flash[:notice] = "Instructions to reset your password have been emailed to you. " +
"Please check your email."
flash[:notice] = t(:instruction_sent, :scope => :session)
redirect_to login_url
else
flash[:notice] = "No user was found with that email address"
flash[:notice] = t(:no_user, :scope => :session)
render :action => :new
end
end
Expand All @@ -27,7 +26,7 @@ def update
@profile.password = params[:profile][:password]
@profile.password_confirmation = params[:profile][:password_confirmation]
if @profile.save(:validate => false)
flash[:notice] = "Password successfully updated"
flash[:notice] = t(:updated_pw, :scope => :session)
redirect_to root_url
else
render :action => :edit
Expand All @@ -38,10 +37,7 @@ def update
def load_profile_using_perishable_token
@profile = Profile.find_using_perishable_token(params[:id])
unless @profile
flash[:notice] = "We're sorry, but we could not locate your account. " +
"If you are having issues try copying and pasting the URL " +
"from your email into your browser or restarting the " +
"reset password process."
flash[:notice] = t(:no_profile, :scope => :session)
redirect_to root_url
end
end
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/session/profile_sessions_controller.rb
Expand Up @@ -10,7 +10,7 @@ def new
def create
@profile_session = ProfileSession.new(params[:profile_session])
if @profile_session.save
flash[:notice] = "Successfully logged in."
flash[:notice] = t(:logged_in, :scope => :session)
if @profile_session.profile.inactive_student?
redirect_to edit_student_student_path(@profile_session.profile.role_id)
else
Expand All @@ -25,7 +25,7 @@ def destroy
# @profile_session = ProfileSession.find
# @profile_session.destroy
current_user_session.destroy
flash[:notice] = "Successfully logged out."
flash[:notice] = t(:logged_out, :scope => :session)
redirect_to login_url
end

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/student/students_controller.rb
Expand Up @@ -34,7 +34,7 @@ def update
@student.activate unless @student.activated
respond_to do |format|
if @student.update_attributes(params[:student])
format.html { redirect_to(root_url, :notice => 'Student was successfully updated.') }
format.html { redirect_to(root_url, :notice => t(:updated, :scope => :student )) }
format.xml { head :ok }
else
format.html { render :action => "edit" }
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/tutor/groups_controller.rb
Expand Up @@ -63,7 +63,7 @@ def create
@group.deadline = Deadline.new(params[:deadline])
respond_to do |format|
if @group.save
format.html { redirect_to(tutor_course_students_path(@group.course), :notice => 'Group was successfully created.') }
format.html { redirect_to(tutor_course_students_path(@group.course), :notice => t(:created, :scope => :group)) }
format.xml { render :xml => @group, :status => :created, :location => @group }
else
format.html { render :action => "new" }
Expand All @@ -81,7 +81,7 @@ def create_working_group
respond_to do |format|
if @working_group.save
params[:working_group]['student_ids'].map {|s| Student.find(s).shuffle_group(@course_group, @working_group ) } if params[:working_group]['student_ids']
format.html { redirect_to(edit_tutor_group_path(@course_group), :notice => 'Group was successfully created.') }
format.html { redirect_to(edit_tutor_group_path(@course_group), :notice => t(:created, :scope => :group)) }
format.xml { render :xml => @group, :status => :created, :location => @group }
else
format.html { render :action => "new_working_group" }
Expand All @@ -97,7 +97,7 @@ def update

respond_to do |format|
if @group.update_attributes(params[:group])
format.html { redirect_to(tutor_groups_url, :notice => 'Group was successfully updated.') }
format.html { redirect_to(tutor_groups_url, :notice => t(:updated, :scope => :group)) }
format.xml { head :ok }
else
format.html { render :action => "edit" }
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/tutor/notes_controller.rb
Expand Up @@ -44,7 +44,7 @@ def create

respond_to do |format|
if @note.save
format.html { redirect_to(@note, :notice => 'Note was successfully created.') }
format.html { redirect_to(@note, :notice => t(:created, :scope => :note)) }
format.xml { render :xml => @note, :status => :created, :location => @note }
else
format.html { render :action => "new" }
Expand All @@ -60,7 +60,7 @@ def update

respond_to do |format|
if @note.update_attributes(params[:note])
format.html { redirect_to(@note, :notice => 'Note was successfully updated.') }
format.html { redirect_to(@note, :notice => t(:created, :scope => :note)) }
format.xml { head :ok }
else
format.html { render :action => "edit" }
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/tutor/responses_controller.rb
Expand Up @@ -44,7 +44,7 @@ def create

respond_to do |format|
if @response.save
format.html { redirect_to(@response, :notice => 'Response was successfully created.') }
format.html { redirect_to(@response, :notice => t(:created, :scope => :response)) }
format.xml { render :xml => @response, :status => :created, :location => @response }
else
format.html { render :action => "new" }
Expand All @@ -60,7 +60,7 @@ def update

respond_to do |format|
if @response.update_attributes(params[:response])
format.html { redirect_to(@response, :notice => 'Response was successfully updated.') }
format.html { redirect_to(@response, :notice => t(:updated, :scope => :response)) }
format.xml { head :ok }
else
format.html { render :action => "edit" }
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/tutor/students_controller.rb
Expand Up @@ -55,7 +55,7 @@ def create
@student.groups << @group
@student.send_new_group(@group)
@student.create_coursebook(@tutor, @group.course)
format.html { redirect_to(tutor_course_students_path(@group.course), :notice => 'Student was successfully enrolled.') }
format.html { redirect_to(tutor_course_students_path(@group.course), :notice => t(:enrolled, :scope => :student)) }
format.xml { render :xml => @student, :status => :created, :location => @student }
else
format.html { render :action => "new" }
Expand Down Expand Up @@ -88,7 +88,7 @@ def update_shuffle
respond_to do |format|
if @student.save
@student.send_new_group(new_group)
format.html { redirect_to(edit_tutor_group_path(@group.parent_group), :notice => 'Student was successfully shuffled.') }
format.html { redirect_to(edit_tutor_group_path(@group.parent_group), :notice => t(:shuffled, :scope => :student) ) }
else
format.html { render :action => "shuffle" }
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/answer.rb
Expand Up @@ -27,7 +27,7 @@ def self.lock_answers(student, page)
answer = Answer.new
answer.student = student
answer.question = question
answer.txt = "No Answer given"
answer.txt = "No Answer given."
end
answer.locked = true
answer.save
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/courses/_form.html.erb
Expand Up @@ -29,7 +29,7 @@
</p>
<% if @course.publishable? %>
<p class="select">
<%= f.check_box :published %> <%= t(:publish, :scope => :course) %> <%= t(:course, :scope => :course) %>
<%= f.check_box :published %> <%= t(:publish, :scope => :course) %>
</p>
<% end %>
<% if @course.deprecatable? %>
Expand Down
6 changes: 3 additions & 3 deletions app/views/admin/courses/_list.html.erb
Expand Up @@ -15,11 +15,11 @@
<td><%= course.language %></td>
<td>
<% if course.published %>
<%= link_to image_tag("space.gif", :title => t(:clone, :scope => :course)+ " "+ t(:course, :scope => :course), :class => "icon duplicate"), clone_admin_course_path(course) %>
<%= link_to image_tag("space.gif", :title => t(:clone, :scope => :course), :class => "icon duplicate"), clone_admin_course_path(course) %>
<% else %>
<%= link_to image_tag("space.gif", :title => t(:edit, :scope => :general)+ " "+ t(:course, :scope => :course), :class => "icon useredit"), edit_admin_course_path(course) %>
<%= link_to image_tag("space.gif", :title => t(:edit, :scope => :course), :class => "icon useredit"), edit_admin_course_path(course) %>
<% if course.deletable? %>
<%= link_to image_tag("space.gif", :title => t(:delete, :scope => :general)+ " "+ t(:course, :scope => :course), :class => "icon delete"), admin_course_path(course), :confirm => t(:confirm, :scope => :general)+" "+t(:delete, :scope => :general)+" "+t(:this, :scope => :general)+" "+t(:course, :scope => :course)+"?", :method => :delete %>
<%= link_to image_tag("space.gif", :title => t(:delete, :scope => :course), :class => "icon delete"), admin_course_path(course), :confirm => t(:confirm, :scope => :course), :method => :delete %>
<% end %>
<% end %>
</td>
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/courses/clone.html.erb
@@ -1,6 +1,6 @@
<div id="main">
<%= render 'layouts/breadcrumb' %>
<h1><%= t(:clone, :scope => :course) %> <%= t(:course, :scope => :course) %> <%= @course.short_title %></h1>
<h1><%= t(:clone, :scope => :course) %> <%= @course.short_title %></h1>
<%= form_for(@course, :url => update_clone_admin_course_path(@course) ) do |f| %>
<% if @course.errors.any? %>
<div id="error_explanation">
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/courses/edit.html.erb
@@ -1,6 +1,6 @@
<div id="main">
<%= render 'layouts/breadcrumb' %>
<h1><%= t(:editing, :scope => :general) %> <%= t(:course, :scope => :course) %></h1>
<h1><%= t(:editing, :scope => :course) %></h1>
<%= form_for(@course, :url => admin_course_path(@course) ) do |f| %>
<%= render 'form', :f => f%>
<% end %>
Expand Down
10 changes: 5 additions & 5 deletions app/views/admin/courses/index.html.erb
@@ -1,23 +1,23 @@
<div id="main">
<ul class="dropdown unit">
<li><a href="#"><%= t(:selection, :scope => :course) %></a></li>
<li class="active"><a href="#"><%= t(:all, :scope => :general) %> <%= t(:courses, :scope => :course) %></a></li>
<li class="active"><a href="#"><%= t(:all, :scope => :course) %></a></li>
<li><a href="#"><%= t(:published, :scope => :course) %></a></li>
<li><a href="#"><%= t(:unpublished, :scope => :course) %></a></li>
<li><a href="#"><%= t(:deprecated, :scope => :course) %></a></li>
</ul>

<h2><%= link_to t(:create, :scope => :general) + " " + t(:course, :scope => :course), new_admin_course_path %></h2>
<h2><%= link_to t(:create, :scope => :course), new_admin_course_path %></h2>
<hr>

<h1><%= t(:published, :scope => :course) %> <%= t(:courses, :scope => :course) %></h1>
<h1><%= t(:published_courses, :scope => :course) %></h1>
<%= render 'list', :courses => @published %>

<h1><%= t(:deprecated, :scope => :course) %> <%= t(:courses, :scope => :course) %>s</h1>
<h1><%= t(:deprecated_courses, :scope => :course) %></h1>
<%= render 'list', :courses => @deprecated %>


<h1><%= t(:unpublished, :scope => :course) %> <%= t(:courses, :scope => :course) %></h1>
<h1><%= t(:unpublished_courses, :scope => :course) %></h1>
<%= render 'list', :courses => @unpublished %>

</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/courses/new.html.erb
@@ -1,6 +1,6 @@
<div id="main">
<%= render 'layouts/breadcrumb' %>
<h1><%= t(:new, :scope => :general) %> <%= t(:course, :scope => :course) %></h1>
<h1><%= t(:new, :scope => :course) %></h1>
<%= form_for(@course, :url => admin_courses_path ) do |f| %>
<%= render 'form', :f => f %>
<% end %>
Expand Down
10 changes: 5 additions & 5 deletions app/views/admin/courses/show.html.erb
Expand Up @@ -12,10 +12,10 @@
<% if @course.deprecatable? && !@course.deprecated %>
<p><%= link_to t(:mark_deprecated, :scope => :course), deprecate_admin_course_path(@course) %></p>
<% elsif @course.publishable? && !@course.published %>
<p><%= link_to t(:publish, :scope => :course)+" "+t(:course, :scope => :course), edit_admin_course_path(@course) %></p>
<p><%= link_to t(:create, :scope => :general)+" "+t(:module, :scope => :stitch_module), new_admin_course_stitch_module_path(@course)%></p>
<p><%= link_to t(:publish, :scope => :course), edit_admin_course_path(@course) %></p>
<p><%= link_to t(:create, :scope => :stitch_module), new_admin_course_stitch_module_path(@course)%></p>
<% elsif @course.editable? %>
<p><%= link_to t(:create, :scope => :general)+" "+t(:module, :scope => :stitch_module), new_admin_course_stitch_module_path(@course)%></p>
<p><%= link_to t(:create, :scope => :stitch_module), new_admin_course_stitch_module_path(@course)%></p>
<% end %>


Expand All @@ -37,9 +37,9 @@
<td><%= sm.complete ? t(:yes, :scope => :general) : t(:no, :scope => :general) %></td>
<td>
<% unless @course.published %>
<%= link_to image_tag("space.gif", :title => t(:edit, :scope => :general)+" "+ t(:module, :scope => :stitch_module), :class => "icon useredit"), edit_admin_course_stitch_module_path(@course, sm) %>
<%= link_to image_tag("space.gif", :title => t(:edit, :scope => :stitch_module), :class => "icon useredit"), edit_admin_course_stitch_module_path(@course, sm) %>
<% if sm.deletable? %>
<%= link_to image_tag("space.gif", :title => t(:delete, :scope => :general)+" "+ t(:module, :scope => :stitch_module), :class => "icon delete"), admin_course_stitch_module_path(@course, sm), :confirm => t(:confirm, :scope => :general)+" "+t(:delete, :scope => :general)+" "+t(:this, :scope => :general)+" "+t(:module, :scope => :stitch_module)+"?", :method => :delete %>
<%= link_to image_tag("space.gif", :title => t(:delete, :scope => :stitch_module), :class => "icon delete"), admin_course_stitch_module_path(@course, sm), :confirm => t(:confirm, :scope => :stitch_module), :method => :delete %>
<% end %>
<% end %>
</td>
Expand Down
8 changes: 4 additions & 4 deletions app/views/admin/developers/edit.html.erb
@@ -1,19 +1,19 @@
<div id="main">
<h1><%= t(:editing, :scope => :general) %> <%= t(:developer, :scope => :developer) %></h1>
<h1><%= t(:editing, :scope => :developer) %></h1>

<%= form_for(@developer, :url => admin_developer_path(@developer)) do |f| %>
<%= render 'form', :f => f %>
<hr/>
<h2><%= t(:statistics, :scope => :developer) %></h2>
<label><%= t(:last, :scope => :general) %> <%= t(:login, :scope => :profile) %>: </label><p><%= @developer.profile.last_login_at.strftime("%H:%M %d.%m.%y") if @developer.profile.last_login_at %></p>
<label><%= t(:number_of, :scope => :developer) %> <%= t(:logins, :scope => :profile) %>: </label><p><%= @developer.profile.login_count.to_i %></p>
<label><%= t(:last, :scope => :profile) %>: </label><p><%= @developer.profile.last_login_at.strftime("%H:%M %d.%m.%y") if @developer.profile.last_login_at %></p>
<label><%= t(:number_of_logins, :scope => :profile) %>: </label><p><%= @developer.profile.login_count.to_i %></p>
<hr/>
<h2><%= t(:admin_rights, :scope => :developer) %></h2>
<%= label :admin, t(:admin, :scope => :developer) %>
<%= f.check_box :admin %>

<hr/>
<h2><%= t(:select, :scope => :general) %> <%= t(:modules, :scope => :stitch_module) %>:</h2>
<h2><%= t(:select, :scope => :stitch_module) %>:</h2>
<div id="accordion">
<% @courses.each do |course| %>
<h3><strong><%= course.title %></strong></h3>
Expand Down

0 comments on commit 9882f71

Please sign in to comment.