1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-22 00:11:14 +00:00

Replaced "can't" with "cannot" in error messages.

git-svn-id: http://svn.redmine.org/redmine/trunk@13781 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2014-12-21 12:39:48 +00:00
parent e2998505b2
commit 2a6692248b
49 changed files with 77 additions and 83 deletions

View File

@ -131,7 +131,7 @@ class Enumeration < ActiveRecord::Base
private private
def check_integrity def check_integrity
raise "Can't delete enumeration" if self.in_use? raise "Cannot delete enumeration" if self.in_use?
end end
end end

View File

@ -204,8 +204,8 @@ private
end end
def check_deletable def check_deletable
raise "Can't delete role" if members.any? raise "Cannot delete role" if members.any?
raise "Can't delete builtin role" if builtin? raise "Cannot delete builtin role" if builtin?
end end
def self.find_or_create_system_role(builtin, name) def self.find_or_create_system_role(builtin, name)

View File

@ -109,6 +109,6 @@ class Tracker < ActiveRecord::Base
private private
def check_integrity def check_integrity
raise Exception.new("Can't delete tracker") if Issue.where(:tracker_id => self.id).any? raise Exception.new("Cannot delete tracker") if Issue.where(:tracker_id => self.id).any?
end end
end end

View File

@ -915,7 +915,7 @@ bs:
error_can_not_delete_custom_field: Unable to delete custom field error_can_not_delete_custom_field: Unable to delete custom field
error_unable_to_connect: Unable to connect (%{value}) error_unable_to_connect: Unable to connect (%{value})
error_can_not_remove_role: This role is in use and can not be deleted. error_can_not_remove_role: This role is in use and can not be deleted.
error_can_not_delete_tracker: This tracker contains issues and can't be deleted. error_can_not_delete_tracker: This tracker contains issues and cannot be deleted.
field_principal: Principal field_principal: Principal
label_my_page_block: My page block label_my_page_block: My page block
notice_failed_to_save_members: "Failed to save member(s): %{errors}." notice_failed_to_save_members: "Failed to save member(s): %{errors}."

View File

@ -902,7 +902,7 @@ el:
error_can_not_delete_custom_field: Unable to delete custom field error_can_not_delete_custom_field: Unable to delete custom field
error_unable_to_connect: Unable to connect (%{value}) error_unable_to_connect: Unable to connect (%{value})
error_can_not_remove_role: This role is in use and can not be deleted. error_can_not_remove_role: This role is in use and can not be deleted.
error_can_not_delete_tracker: This tracker contains issues and can't be deleted. error_can_not_delete_tracker: This tracker contains issues and cannot be deleted.
field_principal: Principal field_principal: Principal
label_my_page_block: My page block label_my_page_block: My page block
notice_failed_to_save_members: "Failed to save member(s): %{errors}." notice_failed_to_save_members: "Failed to save member(s): %{errors}."

View File

@ -114,8 +114,8 @@ en-GB:
invalid: "is invalid" invalid: "is invalid"
confirmation: "doesn't match confirmation" confirmation: "doesn't match confirmation"
accepted: "must be accepted" accepted: "must be accepted"
empty: "can't be empty" empty: "cannot be empty"
blank: "can't be blank" blank: "cannot be blank"
too_long: "is too long (maximum is %{count} characters)" too_long: "is too long (maximum is %{count} characters)"
too_short: "is too short (minimum is %{count} characters)" too_short: "is too short (minimum is %{count} characters)"
wrong_length: "is the wrong length (should be %{count} characters)" wrong_length: "is the wrong length (should be %{count} characters)"

View File

@ -110,8 +110,8 @@ en:
invalid: "is invalid" invalid: "is invalid"
confirmation: "doesn't match confirmation" confirmation: "doesn't match confirmation"
accepted: "must be accepted" accepted: "must be accepted"
empty: "can't be empty" empty: "cannot be empty"
blank: "can't be blank" blank: "cannot be blank"
too_long: "is too long (maximum is %{count} characters)" too_long: "is too long (maximum is %{count} characters)"
too_short: "is too short (minimum is %{count} characters)" too_short: "is too short (minimum is %{count} characters)"
wrong_length: "is the wrong length (should be %{count} characters)" wrong_length: "is the wrong length (should be %{count} characters)"

View File

@ -923,7 +923,7 @@ fi:
error_can_not_delete_custom_field: Unable to delete custom field error_can_not_delete_custom_field: Unable to delete custom field
error_unable_to_connect: Unable to connect (%{value}) error_unable_to_connect: Unable to connect (%{value})
error_can_not_remove_role: This role is in use and can not be deleted. error_can_not_remove_role: This role is in use and can not be deleted.
error_can_not_delete_tracker: This tracker contains issues and can't be deleted. error_can_not_delete_tracker: This tracker contains issues and cannot be deleted.
field_principal: Principal field_principal: Principal
label_my_page_block: My page block label_my_page_block: My page block
notice_failed_to_save_members: "Failed to save member(s): %{errors}." notice_failed_to_save_members: "Failed to save member(s): %{errors}."

View File

@ -903,7 +903,7 @@ hr:
error_can_not_delete_custom_field: Unable to delete custom field error_can_not_delete_custom_field: Unable to delete custom field
error_unable_to_connect: Unable to connect (%{value}) error_unable_to_connect: Unable to connect (%{value})
error_can_not_remove_role: This role is in use and can not be deleted. error_can_not_remove_role: This role is in use and can not be deleted.
error_can_not_delete_tracker: This tracker contains issues and can't be deleted. error_can_not_delete_tracker: This tracker contains issues and cannot be deleted.
field_principal: Principal field_principal: Principal
label_my_page_block: My page block label_my_page_block: My page block
notice_failed_to_save_members: "Failed to save member(s): %{errors}." notice_failed_to_save_members: "Failed to save member(s): %{errors}."

View File

@ -906,7 +906,7 @@ id:
error_can_not_delete_custom_field: Unable to delete custom field error_can_not_delete_custom_field: Unable to delete custom field
error_unable_to_connect: Unable to connect (%{value}) error_unable_to_connect: Unable to connect (%{value})
error_can_not_remove_role: This role is in use and can not be deleted. error_can_not_remove_role: This role is in use and can not be deleted.
error_can_not_delete_tracker: This tracker contains issues and can't be deleted. error_can_not_delete_tracker: This tracker contains issues and cannot be deleted.
field_principal: Principal field_principal: Principal
label_my_page_block: My page block label_my_page_block: My page block
notice_failed_to_save_members: "Failed to save member(s): %{errors}." notice_failed_to_save_members: "Failed to save member(s): %{errors}."

View File

@ -895,7 +895,7 @@ lv:
field_parent_issue: Parent task field_parent_issue: Parent task
error_unable_delete_issue_status: Unable to delete issue status error_unable_delete_issue_status: Unable to delete issue status
label_subtask_plural: Apakšuzdevumi label_subtask_plural: Apakšuzdevumi
error_can_not_delete_tracker: This tracker contains issues and can't be deleted. error_can_not_delete_tracker: This tracker contains issues and cannot be deleted.
label_project_copy_notifications: Send email notifications during the project copy label_project_copy_notifications: Send email notifications during the project copy
field_principal: Principal field_principal: Principal
label_my_page_block: My page block label_my_page_block: My page block

View File

@ -182,7 +182,7 @@ mk:
error_no_tracker_in_project: 'No tracker is associated to this project. Please check the Project settings.' error_no_tracker_in_project: 'No tracker is associated to this project. Please check the Project settings.'
error_no_default_issue_status: 'No default issue status is defined. Please check your configuration (Go to "Administration -> Issue statuses").' error_no_default_issue_status: 'No default issue status is defined. Please check your configuration (Go to "Administration -> Issue statuses").'
error_can_not_delete_custom_field: Unable to delete custom field error_can_not_delete_custom_field: Unable to delete custom field
error_can_not_delete_tracker: "This tracker contains issues and can't be deleted." error_can_not_delete_tracker: "This tracker contains issues and cannot be deleted."
error_can_not_remove_role: "This role is in use and can not be deleted." error_can_not_remove_role: "This role is in use and can not be deleted."
error_can_not_reopen_issue_on_closed_version: 'An issue assigned to a closed version can not be reopened' error_can_not_reopen_issue_on_closed_version: 'An issue assigned to a closed version can not be reopened'
error_can_not_archive_project: This project can not be archived error_can_not_archive_project: This project can not be archived

View File

@ -903,7 +903,7 @@ mn:
error_can_not_delete_custom_field: Unable to delete custom field error_can_not_delete_custom_field: Unable to delete custom field
error_unable_to_connect: Unable to connect (%{value}) error_unable_to_connect: Unable to connect (%{value})
error_can_not_remove_role: This role is in use and can not be deleted. error_can_not_remove_role: This role is in use and can not be deleted.
error_can_not_delete_tracker: This tracker contains issues and can't be deleted. error_can_not_delete_tracker: This tracker contains issues and cannot be deleted.
field_principal: Principal field_principal: Principal
label_my_page_block: My page block label_my_page_block: My page block
notice_failed_to_save_members: "Failed to save member(s): %{errors}." notice_failed_to_save_members: "Failed to save member(s): %{errors}."

View File

@ -897,7 +897,7 @@ ro:
error_can_not_delete_custom_field: Unable to delete custom field error_can_not_delete_custom_field: Unable to delete custom field
error_unable_to_connect: Unable to connect (%{value}) error_unable_to_connect: Unable to connect (%{value})
error_can_not_remove_role: This role is in use and can not be deleted. error_can_not_remove_role: This role is in use and can not be deleted.
error_can_not_delete_tracker: This tracker contains issues and can't be deleted. error_can_not_delete_tracker: This tracker contains issues and cannot be deleted.
field_principal: Principal field_principal: Principal
label_my_page_block: My page block label_my_page_block: My page block
notice_failed_to_save_members: "Failed to save member(s): %{errors}." notice_failed_to_save_members: "Failed to save member(s): %{errors}."

View File

@ -899,7 +899,7 @@ th:
error_can_not_delete_custom_field: Unable to delete custom field error_can_not_delete_custom_field: Unable to delete custom field
error_unable_to_connect: Unable to connect (%{value}) error_unable_to_connect: Unable to connect (%{value})
error_can_not_remove_role: This role is in use and can not be deleted. error_can_not_remove_role: This role is in use and can not be deleted.
error_can_not_delete_tracker: This tracker contains issues and can't be deleted. error_can_not_delete_tracker: This tracker contains issues and cannot be deleted.
field_principal: Principal field_principal: Principal
label_my_page_block: My page block label_my_page_block: My page block
notice_failed_to_save_members: "Failed to save member(s): %{errors}." notice_failed_to_save_members: "Failed to save member(s): %{errors}."

View File

@ -899,7 +899,7 @@ uk:
error_can_not_delete_custom_field: Unable to delete custom field error_can_not_delete_custom_field: Unable to delete custom field
error_unable_to_connect: Unable to connect (%{value}) error_unable_to_connect: Unable to connect (%{value})
error_can_not_remove_role: This role is in use and can not be deleted. error_can_not_remove_role: This role is in use and can not be deleted.
error_can_not_delete_tracker: This tracker contains issues and can't be deleted. error_can_not_delete_tracker: This tracker contains issues and cannot be deleted.
field_principal: Principal field_principal: Principal
label_my_page_block: My page block label_my_page_block: My page block
notice_failed_to_save_members: "Failed to save member(s): %{errors}." notice_failed_to_save_members: "Failed to save member(s): %{errors}."

View File

@ -382,7 +382,7 @@ class AttachmentsControllerTest < ActionController::TestCase
assert_response :success assert_response :success
assert_template 'edit' assert_template 'edit'
assert_select_error /file #{ESCAPED_CANT} be blank/i assert_select_error /file cannot be blank/i
# The other attachment should not be updated # The other attachment should not be updated
attachment = Attachment.find(4) attachment = Attachment.find(4)

View File

@ -74,7 +74,7 @@ class AuthSourcesControllerTest < ActionController::TestCase
assert_response :success assert_response :success
assert_template 'new' assert_template 'new'
end end
assert_select_error /host #{ESCAPED_CANT} be blank/i assert_select_error /host cannot be blank/i
end end
def test_edit def test_edit
@ -118,7 +118,7 @@ class AuthSourcesControllerTest < ActionController::TestCase
:port => '389', :attr_login => 'uid'} :port => '389', :attr_login => 'uid'}
assert_response :success assert_response :success
assert_template 'edit' assert_template 'edit'
assert_select_error /host #{ESCAPED_CANT} be blank/i assert_select_error /host cannot be blank/i
end end
def test_destroy def test_destroy

View File

@ -62,7 +62,7 @@ class IssueStatusesControllerTest < ActionController::TestCase
post :create, :issue_status => {:name => ''} post :create, :issue_status => {:name => ''}
assert_response :success assert_response :success
assert_template 'new' assert_template 'new'
assert_select_error /name #{ESCAPED_CANT} be blank/i assert_select_error /name cannot be blank/i
end end
def test_edit def test_edit
@ -82,7 +82,7 @@ class IssueStatusesControllerTest < ActionController::TestCase
put :update, :id => '3', :issue_status => {:name => ''} put :update, :id => '3', :issue_status => {:name => ''}
assert_response :success assert_response :success
assert_template 'edit' assert_template 'edit'
assert_select_error /name #{ESCAPED_CANT} be blank/i assert_select_error /name cannot be blank/i
end end
def test_destroy def test_destroy

View File

@ -1958,7 +1958,7 @@ class IssuesControllerTest < ActionController::TestCase
assert_template 'new' assert_template 'new'
issue = assigns(:issue) issue = assigns(:issue)
assert_not_nil issue assert_not_nil issue
assert_select_error /Database #{ESCAPED_CANT} be blank/ assert_select_error /Database cannot be blank/
end end
def test_create_should_validate_required_fields def test_create_should_validate_required_fields
@ -1982,8 +1982,8 @@ class IssuesControllerTest < ActionController::TestCase
assert_template 'new' assert_template 'new'
end end
assert_select_error /Due date #{ESCAPED_CANT} be blank/i assert_select_error /Due date cannot be blank/i
assert_select_error /Bar #{ESCAPED_CANT} be blank/i assert_select_error /Bar cannot be blank/i
end end
def test_create_should_ignore_readonly_fields def test_create_should_ignore_readonly_fields
@ -3201,7 +3201,7 @@ class IssuesControllerTest < ActionController::TestCase
assert_response :success assert_response :success
assert_template 'edit' assert_template 'edit'
assert_select_error /Activity #{ESCAPED_CANT} be blank/ assert_select_error /Activity cannot be blank/
assert_select 'textarea[name=?]', 'issue[notes]', :text => notes assert_select 'textarea[name=?]', 'issue[notes]', :text => notes
assert_select 'input[name=?][value=?]', 'time_entry[hours]', '2z' assert_select 'input[name=?][value=?]', 'time_entry[hours]', '2z'
end end
@ -3219,8 +3219,8 @@ class IssuesControllerTest < ActionController::TestCase
assert_response :success assert_response :success
assert_template 'edit' assert_template 'edit'
assert_select_error /Activity #{ESCAPED_CANT} be blank/ assert_select_error /Activity cannot be blank/
assert_select_error /Hours #{ESCAPED_CANT} be blank/ assert_select_error /Hours cannot be blank/
assert_select 'textarea[name=?]', 'issue[notes]', :text => notes assert_select 'textarea[name=?]', 'issue[notes]', :text => notes
assert_select 'input[name=?][value=?]', 'time_entry[comments]', 'this is my comment' assert_select 'input[name=?][value=?]', 'time_entry[comments]', 'this is my comment'
end end

View File

@ -129,7 +129,7 @@ class NewsControllerTest < ActionController::TestCase
assert_template 'new' assert_template 'new'
assert_not_nil assigns(:news) assert_not_nil assigns(:news)
assert assigns(:news).new_record? assert assigns(:news).new_record?
assert_select_error /title #{ESCAPED_CANT} be blank/i assert_select_error /title cannot be blank/i
end end
def test_get_edit def test_get_edit
@ -166,7 +166,7 @@ class NewsControllerTest < ActionController::TestCase
put :update, :id => 1, :news => { :description => '' } put :update, :id => 1, :news => { :description => '' }
assert_response :success assert_response :success
assert_template 'edit' assert_template 'edit'
assert_select_error /description #{ESCAPED_CANT} be blank/i assert_select_error /description cannot be blank/i
end end
def test_destroy def test_destroy

View File

@ -104,7 +104,7 @@ class PrincipalMembershipsControllerTest < ActionController::TestCase
assert_equal 'text/javascript', response.content_type assert_equal 'text/javascript', response.content_type
end end
assert_include 'alert', response.body, "Alert message not sent" assert_include 'alert', response.body, "Alert message not sent"
assert_include 'Role can\\\'t be empty', response.body, "Error message not sent" assert_include 'Role cannot be empty', response.body, "Error message not sent"
end end
def test_update_user_membership def test_update_user_membership

View File

@ -445,7 +445,7 @@ class ProjectsControllerTest < ActionController::TestCase
post :update, :id => 1, :project => {:name => ''} post :update, :id => 1, :project => {:name => ''}
assert_response :success assert_response :success
assert_template 'settings' assert_template 'settings'
assert_select_error /name #{ESCAPED_CANT} be blank/i assert_select_error /name cannot be blank/i
end end
def test_update_should_be_denied_for_member_on_closed_project def test_update_should_be_denied_for_member_on_closed_project

View File

@ -89,7 +89,7 @@ class TrackersControllerTest < ActionController::TestCase
end end
assert_response :success assert_response :success
assert_template 'new' assert_template 'new'
assert_select_error /name #{ESCAPED_CANT} be blank/i assert_select_error /name cannot be blank/i
end end
def test_edit def test_edit
@ -147,7 +147,7 @@ class TrackersControllerTest < ActionController::TestCase
put :update, :id => 1, :tracker => { :name => '' } put :update, :id => 1, :tracker => { :name => '' }
assert_response :success assert_response :success
assert_template 'edit' assert_template 'edit'
assert_select_error /name #{ESCAPED_CANT} be blank/i assert_select_error /name cannot be blank/i
end end
def test_move_lower def test_move_lower

View File

@ -928,7 +928,7 @@ class WikiControllerTest < ActionController::TestCase
end end
def test_edit_protected_page_by_nonmember def test_edit_protected_page_by_nonmember
# Non members can't edit protected wiki pages # Non members cannot edit protected wiki pages
@request.session[:user_id] = 4 @request.session[:user_id] = 4
get :edit, :project_id => 1, :id => 'CookBook_documentation' get :edit, :project_id => 1, :id => 'CookBook_documentation'
assert_response 403 assert_response 403

View File

@ -51,7 +51,7 @@ class WikisControllerTest < ActionController::TestCase
end end
assert_include 'errorExplanation', response.body assert_include 'errorExplanation', response.body
assert_include "Start page #{ESCAPED_CANT} be blank", response.body assert_include "Start page cannot be blank", response.body
end end
def test_update def test_update

View File

@ -144,7 +144,7 @@ class Redmine::ApiTest::GroupsTest < Redmine::ApiTest::Base
assert_equal 'application/xml', response.content_type assert_equal 'application/xml', response.content_type
assert_select 'errors' do assert_select 'errors' do
assert_select 'error', :text => /Name can't be blank/ assert_select 'error', :text => /Name cannot be blank/
end end
end end
@ -164,7 +164,7 @@ class Redmine::ApiTest::GroupsTest < Redmine::ApiTest::Base
assert_equal 'application/xml', response.content_type assert_equal 'application/xml', response.content_type
assert_select 'errors' do assert_select 'errors' do
assert_select 'error', :text => /Name can't be blank/ assert_select 'error', :text => /Name cannot be blank/
end end
end end

View File

@ -57,7 +57,7 @@ class Redmine::ApiTest::IssueCategoriesTest < Redmine::ApiTest::Base
assert_response :unprocessable_entity assert_response :unprocessable_entity
assert_equal 'application/xml', @response.content_type assert_equal 'application/xml', @response.content_type
assert_select 'errors error', :text => "Name can't be blank" assert_select 'errors error', :text => "Name cannot be blank"
end end
test "PUT /issue_categories/:id.xml with valid parameters should update the issue category" do test "PUT /issue_categories/:id.xml with valid parameters should update the issue category" do
@ -76,7 +76,7 @@ class Redmine::ApiTest::IssueCategoriesTest < Redmine::ApiTest::Base
assert_response :unprocessable_entity assert_response :unprocessable_entity
assert_equal 'application/xml', @response.content_type assert_equal 'application/xml', @response.content_type
assert_select 'errors error', :text => "Name can't be blank" assert_select 'errors error', :text => "Name cannot be blank"
end end
test "DELETE /issue_categories/:id.xml should destroy the issue category" do test "DELETE /issue_categories/:id.xml should destroy the issue category" do

View File

@ -90,7 +90,7 @@ class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base
assert_response :unprocessable_entity assert_response :unprocessable_entity
assert_equal 'application/xml', @response.content_type assert_equal 'application/xml', @response.content_type
assert_select 'errors error', :text => "Start date can't be blank" assert_select 'errors error', :text => "Start date cannot be blank"
end end
test "GET /issues.xml with custom field filter" do test "GET /issues.xml with custom field filter" do
@ -361,7 +361,7 @@ class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base
post '/issues.xml', {:issue => {:project_id => 1}}, credentials('jsmith') post '/issues.xml', {:issue => {:project_id => 1}}, credentials('jsmith')
end end
assert_select 'errors error', :text => "Subject can't be blank" assert_select 'errors error', :text => "Subject cannot be blank"
end end
test "POST /issues.json should create an issue with the attributes" do test "POST /issues.json should create an issue with the attributes" do
@ -385,7 +385,7 @@ class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base
end end
json = ActiveSupport::JSON.decode(response.body) json = ActiveSupport::JSON.decode(response.body)
assert json['errors'].include?("Subject can't be blank") assert json['errors'].include?("Subject cannot be blank")
end end
test "PUT /issues/:id.xml" do test "PUT /issues/:id.xml" do
@ -444,7 +444,7 @@ class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base
put '/issues/6.xml', {:issue => {:subject => ''}}, credentials('jsmith') put '/issues/6.xml', {:issue => {:subject => ''}}, credentials('jsmith')
assert_response :unprocessable_entity assert_response :unprocessable_entity
assert_select 'errors error', :text => "Subject can't be blank" assert_select 'errors error', :text => "Subject cannot be blank"
end end
test "PUT /issues/:id.json" do test "PUT /issues/:id.json" do
@ -468,7 +468,7 @@ class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base
assert_response :unprocessable_entity assert_response :unprocessable_entity
json = ActiveSupport::JSON.decode(response.body) json = ActiveSupport::JSON.decode(response.body)
assert json['errors'].include?("Subject can't be blank") assert json['errors'].include?("Subject cannot be blank")
end end
test "DELETE /issues/:id.xml" do test "DELETE /issues/:id.xml" do

View File

@ -85,7 +85,7 @@ class Redmine::ApiTest::MembershipsTest < Redmine::ApiTest::Base
assert_response :unprocessable_entity assert_response :unprocessable_entity
assert_equal 'application/xml', @response.content_type assert_equal 'application/xml', @response.content_type
assert_select 'errors error', :text => "Principal can't be blank" assert_select 'errors error', :text => "Principal cannot be blank"
end end
end end
@ -133,7 +133,7 @@ class Redmine::ApiTest::MembershipsTest < Redmine::ApiTest::Base
assert_response :unprocessable_entity assert_response :unprocessable_entity
assert_equal 'application/xml', @response.content_type assert_equal 'application/xml', @response.content_type
assert_select 'errors error', :text => "Role can't be empty" assert_select 'errors error', :text => "Role cannot be empty"
end end
test "DELETE /memberships/:id.xml should destroy the membership" do test "DELETE /memberships/:id.xml should destroy the membership" do
@ -148,7 +148,7 @@ class Redmine::ApiTest::MembershipsTest < Redmine::ApiTest::Base
test "DELETE /memberships/:id.xml should respond with 422 on failure" do test "DELETE /memberships/:id.xml should respond with 422 on failure" do
assert_no_difference 'Member.count' do assert_no_difference 'Member.count' do
# A membership with an inherited role can't be deleted # A membership with an inherited role cannot be deleted
Member.find(2).member_roles.first.update_attribute :inherited_from, 99 Member.find(2).member_roles.first.update_attribute :inherited_from, 99
delete '/memberships/2.xml', {}, credentials('jsmith') delete '/memberships/2.xml', {}, credentials('jsmith')

View File

@ -179,7 +179,7 @@ class Redmine::ApiTest::ProjectsTest < Redmine::ApiTest::Base
assert_response :unprocessable_entity assert_response :unprocessable_entity
assert_equal 'application/xml', @response.content_type assert_equal 'application/xml', @response.content_type
assert_select 'errors error', :text => "Identifier can't be blank" assert_select 'errors error', :text => "Identifier cannot be blank"
end end
test "PUT /projects/:id.xml with valid parameters should update the project" do test "PUT /projects/:id.xml with valid parameters should update the project" do
@ -220,7 +220,7 @@ class Redmine::ApiTest::ProjectsTest < Redmine::ApiTest::Base
assert_response :unprocessable_entity assert_response :unprocessable_entity
assert_equal 'application/xml', @response.content_type assert_equal 'application/xml', @response.content_type
assert_select 'errors error', :text => "Name can't be blank" assert_select 'errors error', :text => "Name cannot be blank"
end end
test "DELETE /projects/:id.xml should delete the project" do test "DELETE /projects/:id.xml should delete the project" do

View File

@ -102,7 +102,7 @@ class Redmine::ApiTest::TimeEntriesTest < Redmine::ApiTest::Base
assert_response :unprocessable_entity assert_response :unprocessable_entity
assert_equal 'application/xml', @response.content_type assert_equal 'application/xml', @response.content_type
assert_select 'errors error', :text => "Hours can't be blank" assert_select 'errors error', :text => "Hours cannot be blank"
end end
test "PUT /time_entries/:id.xml with valid parameters should update time entry" do test "PUT /time_entries/:id.xml with valid parameters should update time entry" do
@ -121,7 +121,7 @@ class Redmine::ApiTest::TimeEntriesTest < Redmine::ApiTest::Base
assert_response :unprocessable_entity assert_response :unprocessable_entity
assert_equal 'application/xml', @response.content_type assert_equal 'application/xml', @response.content_type
assert_select 'errors error', :text => "Hours can't be blank" assert_select 'errors error', :text => "Hours cannot be blank"
end end
test "DELETE /time_entries/:id.xml should destroy time entry" do test "DELETE /time_entries/:id.xml should destroy time entry" do

View File

@ -183,7 +183,7 @@ class Redmine::ApiTest::UsersTest < Redmine::ApiTest::Base
assert_response :unprocessable_entity assert_response :unprocessable_entity
assert_equal 'application/xml', @response.content_type assert_equal 'application/xml', @response.content_type
assert_select 'errors error', :text => "First name can't be blank" assert_select 'errors error', :text => "First name cannot be blank"
end end
test "POST /users.json with with invalid parameters should return errors" do test "POST /users.json with with invalid parameters should return errors" do
@ -253,7 +253,7 @@ class Redmine::ApiTest::UsersTest < Redmine::ApiTest::Base
assert_response :unprocessable_entity assert_response :unprocessable_entity
assert_equal 'application/xml', @response.content_type assert_equal 'application/xml', @response.content_type
assert_select 'errors error', :text => "First name can't be blank" assert_select 'errors error', :text => "First name cannot be blank"
end end
test "PUT /users/:id.json with invalid parameters" do test "PUT /users/:id.json with invalid parameters" do

View File

@ -94,7 +94,7 @@ class Redmine::ApiTest::VersionsTest < Redmine::ApiTest::Base
end end
assert_response :unprocessable_entity assert_response :unprocessable_entity
assert_select 'errors error', :text => "Name can't be blank" assert_select 'errors error', :text => "Name cannot be blank"
end end
test "GET /versions/:id.xml should return the version" do test "GET /versions/:id.xml should return the version" do

View File

@ -44,12 +44,6 @@ class ActiveSupport::TestCase
self.use_transactional_fixtures = true self.use_transactional_fixtures = true
self.use_instantiated_fixtures = false self.use_instantiated_fixtures = false
#ESCAPED_CANT = 'can&#x27;t'
#ESCAPED_UCANT = 'Can&#x27;t'
# Rails 4.0.2
ESCAPED_CANT = 'can&#39;t'
ESCAPED_UCANT = 'Can&#39;t'
def uploaded_test_file(name, mime) def uploaded_test_file(name, mime)
fixture_file_upload("files/#{name}", mime, true) fixture_file_upload("files/#{name}", mime, true)
end end

View File

@ -47,7 +47,7 @@ class GroupTest < ActiveSupport::TestCase
set_language_if_valid 'en' set_language_if_valid 'en'
g = Group.new g = Group.new
assert !g.save assert !g.save
assert_include "Name can't be blank", g.errors.full_messages assert_include "Name cannot be blank", g.errors.full_messages
end end
def test_blank_name_error_message_fr def test_blank_name_error_message_fr

View File

@ -26,7 +26,7 @@ class IssueCustomFieldTest < ActiveSupport::TestCase
set_language_if_valid 'en' set_language_if_valid 'en'
field = IssueCustomField.new(:name => 'Field', :field_format => 'string', :visible => false) field = IssueCustomField.new(:name => 'Field', :field_format => 'string', :visible => false)
assert !field.save assert !field.save
assert_include "Roles can't be blank", field.errors.full_messages assert_include "Roles cannot be blank", field.errors.full_messages
field.role_ids = [1, 2] field.role_ids = [1, 2]
assert field.save assert field.save
end end

View File

@ -50,7 +50,7 @@ class IssueStatusTest < ActiveSupport::TestCase
def test_destroy_status_in_use def test_destroy_status_in_use
# Status assigned to an Issue # Status assigned to an Issue
status = Issue.find(1).status status = Issue.find(1).status
assert_raise(RuntimeError, "Can't delete status") { status.destroy } assert_raise(RuntimeError, "Cannot delete status") { status.destroy }
end end
def test_new_statuses_allowed_to def test_new_statuses_allowed_to

View File

@ -136,11 +136,11 @@ class IssueTest < ActiveSupport::TestCase
assert issue.available_custom_fields.include?(field) assert issue.available_custom_fields.include?(field)
# No value for the custom field # No value for the custom field
assert !issue.save assert !issue.save
assert_equal ["Database can't be blank"], issue.errors.full_messages assert_equal ["Database cannot be blank"], issue.errors.full_messages
# Blank value # Blank value
issue.custom_field_values = { field.id => '' } issue.custom_field_values = { field.id => '' }
assert !issue.save assert !issue.save
assert_equal ["Database can't be blank"], issue.errors.full_messages assert_equal ["Database cannot be blank"], issue.errors.full_messages
# Invalid value # Invalid value
issue.custom_field_values = { field.id => 'SQLServer' } issue.custom_field_values = { field.id => 'SQLServer' }
assert !issue.save assert !issue.save
@ -826,13 +826,13 @@ class IssueTest < ActiveSupport::TestCase
assert_equal [cf.id.to_s, "category_id", "due_date"], assert_equal [cf.id.to_s, "category_id", "due_date"],
issue.required_attribute_names(user).sort issue.required_attribute_names(user).sort
assert !issue.save, "Issue was saved" assert !issue.save, "Issue was saved"
assert_equal ["Category can't be blank", "Due date can't be blank", "Foo can't be blank"], assert_equal ["Category cannot be blank", "Due date cannot be blank", "Foo cannot be blank"],
issue.errors.full_messages.sort issue.errors.full_messages.sort
issue.tracker_id = 2 issue.tracker_id = 2
assert_equal [cf.id.to_s, "start_date"], issue.required_attribute_names(user).sort assert_equal [cf.id.to_s, "start_date"], issue.required_attribute_names(user).sort
assert !issue.save, "Issue was saved" assert !issue.save, "Issue was saved"
assert_equal ["Foo can't be blank", "Start date can't be blank"], assert_equal ["Foo cannot be blank", "Start date cannot be blank"],
issue.errors.full_messages.sort issue.errors.full_messages.sort
issue.start_date = Date.today issue.start_date = Date.today
@ -850,7 +850,7 @@ class IssueTest < ActiveSupport::TestCase
issue = Issue.new(:project_id => 1, :tracker_id => 1, :status_id => 1, issue = Issue.new(:project_id => 1, :tracker_id => 1, :status_id => 1,
:subject => 'Required fields', :author => user) :subject => 'Required fields', :author => user)
assert !issue.save assert !issue.save
assert_include "Start date can't be blank", issue.errors.full_messages assert_include "Start date cannot be blank", issue.errors.full_messages
tracker = Tracker.find(1) tracker = Tracker.find(1)
tracker.core_fields -= %w(start_date) tracker.core_fields -= %w(start_date)

View File

@ -65,7 +65,7 @@ class MemberTest < ActiveSupport::TestCase
def test_validate def test_validate
member = Member.new(:project_id => 1, :user_id => 2, :role_ids => [2]) member = Member.new(:project_id => 1, :user_id => 2, :role_ids => [2])
# same use can't have more than one membership for a project # same use cannot have more than one membership for a project
assert !member.save assert !member.save
# must have one role at least # must have one role at least

View File

@ -37,7 +37,7 @@ class QueryTest < ActiveSupport::TestCase
set_language_if_valid 'en' set_language_if_valid 'en'
query = IssueQuery.new(:name => 'Query', :visibility => IssueQuery::VISIBILITY_ROLES) query = IssueQuery.new(:name => 'Query', :visibility => IssueQuery::VISIBILITY_ROLES)
assert !query.save assert !query.save
assert_include "Roles can't be blank", query.errors.full_messages assert_include "Roles cannot be blank", query.errors.full_messages
query.role_ids = [1, 2] query.role_ids = [1, 2]
assert query.save assert query.save
end end

View File

@ -63,7 +63,7 @@ class RepositoryBazaarTest < ActiveSupport::TestCase
:log_encoding => 'UTF-8' :log_encoding => 'UTF-8'
) )
assert !repo.save assert !repo.save
assert_include "Path to repository can't be blank", assert_include "Path to repository cannot be blank",
repo.errors.full_messages repo.errors.full_messages
end end

View File

@ -46,7 +46,7 @@ class RepositoryCvsTest < ActiveSupport::TestCase
:root_url => REPOSITORY_PATH :root_url => REPOSITORY_PATH
) )
assert !repo.save assert !repo.save
assert_include "Module can't be blank", assert_include "Module cannot be blank",
repo.errors.full_messages repo.errors.full_messages
end end
@ -74,7 +74,7 @@ class RepositoryCvsTest < ActiveSupport::TestCase
:url => MODULE_NAME :url => MODULE_NAME
) )
assert !repo.save assert !repo.save
assert_include "CVSROOT can't be blank", assert_include "CVSROOT cannot be blank",
repo.errors.full_messages repo.errors.full_messages
end end

View File

@ -43,7 +43,7 @@ class RepositoryDarcsTest < ActiveSupport::TestCase
:log_encoding => 'UTF-8' :log_encoding => 'UTF-8'
) )
assert !repo.save assert !repo.save
assert_include "Path to repository can't be blank", assert_include "Path to repository cannot be blank",
repo.errors.full_messages repo.errors.full_messages
end end

View File

@ -41,7 +41,7 @@ class RepositoryFilesystemTest < ActiveSupport::TestCase
:identifier => 'test' :identifier => 'test'
) )
assert !repo.save assert !repo.save
assert_include "Root directory can't be blank", assert_include "Root directory cannot be blank",
repo.errors.full_messages repo.errors.full_messages
end end

View File

@ -56,7 +56,7 @@ class RepositoryGitTest < ActiveSupport::TestCase
:identifier => 'test' :identifier => 'test'
) )
assert !repo.save assert !repo.save
assert_include "Path to repository can't be blank", assert_include "Path to repository cannot be blank",
repo.errors.full_messages repo.errors.full_messages
end end

View File

@ -45,7 +45,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
:identifier => 'test' :identifier => 'test'
) )
assert !repo.save assert !repo.save
assert_include "Path to repository can't be blank", assert_include "Path to repository cannot be blank",
repo.errors.full_messages repo.errors.full_messages
end end

View File

@ -48,7 +48,7 @@ class RepositoryTest < ActiveSupport::TestCase
:log_encoding => '' :log_encoding => ''
) )
assert !repo.save assert !repo.save
assert_include "Commit messages encoding can't be blank", assert_include "Commit messages encoding cannot be blank",
repo.errors.full_messages repo.errors.full_messages
end end

View File

@ -59,7 +59,7 @@ class TimeEntryActivityTest < ActiveSupport::TestCase
e = TimeEntryActivity.new(:name => 'Custom Data') e = TimeEntryActivity.new(:name => 'Custom Data')
assert !e.save assert !e.save
assert_equal ["Billable can't be blank"], e.errors.full_messages assert_equal ["Billable cannot be blank"], e.errors.full_messages
end end
def test_create_with_required_custom_field_should_succeed def test_create_with_required_custom_field_should_succeed
@ -83,7 +83,7 @@ class TimeEntryActivityTest < ActiveSupport::TestCase
# Blanking custom field, save should fail # Blanking custom field, save should fail
e.custom_field_values = {field.id => ""} e.custom_field_values = {field.id => ""}
assert !e.save assert !e.save
assert_equal ["Billable can't be blank"], e.errors.full_messages assert_equal ["Billable cannot be blank"], e.errors.full_messages
# Update custom field to valid value, save should succeed # Update custom field to valid value, save should succeed
e.custom_field_values = {field.id => "0"} e.custom_field_values = {field.id => "0"}