Replace i18n destroy to delete

This commit is contained in:
decabeza
2019-05-14 16:28:38 +02:00
parent 33c06ea0d3
commit 0c704c2f06
10 changed files with 24 additions and 24 deletions

View File

@@ -106,8 +106,8 @@ en:
blank_dates: Dates are blank
destroy:
success_notice: Budget deleted successfully
unable_notice: You cannot destroy a budget that has associated investments
unable_notice_polls: You cannot destroy a budget that has an associated poll
unable_notice: You cannot delete a budget that has associated investments
unable_notice_polls: You cannot delete a budget that has an associated poll
new:
title: New participatory budget
winners:
@@ -130,7 +130,7 @@ en:
notice: "Group updated successfully"
destroy:
success_notice: "Group deleted successfully"
unable_notice: "You cannot destroy a Group that has associated headings"
unable_notice: "You cannot delete a Group that has associated headings"
form:
create: "Create new group"
edit: "Edit group"
@@ -150,7 +150,7 @@ en:
notice: "Heading updated successfully"
destroy:
success_notice: "Heading deleted successfully"
unable_notice: "You cannot destroy a Heading that has associated investments"
unable_notice: "You cannot delete a Heading that has associated investments"
form:
name: "Heading name"
amount: "Amount"
@@ -1507,7 +1507,7 @@ en:
origin_total: Total participants
tags:
create: Create topic
destroy: Destroy topic
destroy: Delete topic
index:
add_tag: Add a new proposal topic
title: Proposal topics

View File

@@ -26,7 +26,7 @@ en:
new_topic: Create topic
topic:
edit: Edit topic
destroy: Destroy topic
destroy: Delete topic
comments:
one: 1 comment
other: "%{count} comments"

View File

@@ -14,11 +14,11 @@ en:
actions:
destroy:
notice: Document was deleted successfully.
alert: Cannot destroy document.
alert: Cannot delete document.
confirm: Are you sure you want to delete the document? This action cannot be undone!
buttons:
download_document: Download file
destroy_document: Destroy document
destroy_document: Delete document
errors:
messages:
in_between: must be in between %{min} and %{max}

View File

@@ -14,7 +14,7 @@ en:
actions:
destroy:
notice: Image was deleted successfully.
alert: Cannot destroy image.
alert: Cannot delete image.
errors:
messages:
in_between: must be in between %{min} and %{max}

View File

@@ -91,7 +91,7 @@ feature "Admin budget groups" do
visit admin_budget_groups_path(budget)
within("#budget_group_#{group.id}") { click_link "Delete" }
expect(page).to have_content "You cannot destroy a Group that has associated headings"
expect(page).to have_content "You cannot delete a Group that has associated headings"
expect(page).to have_selector "#budget_group_#{group.id}"
end

View File

@@ -94,7 +94,7 @@ feature "Admin budget headings" do
visit admin_budget_group_headings_path(budget, group)
within("#budget_heading_#{heading.id}") { click_link "Delete" }
expect(page).to have_content "You cannot destroy a Heading that has associated investments"
expect(page).to have_content "You cannot delete a Heading that has associated investments"
expect(page).to have_selector "#budget_heading_#{heading.id}"
end

View File

@@ -148,7 +148,7 @@ feature "Admin budgets" do
click_link "Edit budget"
click_link "Delete budget"
expect(page).to have_content("You cannot destroy a budget that has associated investments")
expect(page).to have_content("You cannot delete a budget that has associated investments")
expect(page).to have_content("There is 1 budget")
end
@@ -158,7 +158,7 @@ feature "Admin budgets" do
visit edit_admin_budget_path(budget)
click_link "Delete budget"
expect(page).to have_content("You cannot destroy a budget that has an associated poll")
expect(page).to have_content("You cannot delete a budget that has an associated poll")
expect(page).to have_content("There is 1 budget")
end
end

View File

@@ -40,7 +40,7 @@ feature "Admin tags" do
expect(page).to have_content tag2.name
within("#tag_#{tag2.id}") do
click_link "Destroy topic"
click_link "Delete topic"
end
visit admin_tags_path
@@ -59,7 +59,7 @@ feature "Admin tags" do
expect(page).to have_content tag2.name
within("#tag_#{tag2.id}") do
click_link "Destroy topic"
click_link "Delete topic"
end
visit admin_tags_path

View File

@@ -137,7 +137,7 @@ feature "Topics" do
login_as(user)
visit community_topic_path(community, topic)
click_link "Destroy topic"
click_link "Delete topic"
expect(page).to have_content "Topic deleted successfully."
expect(page).not_to have_content topic.title
@@ -153,7 +153,7 @@ feature "Topics" do
visit community_path(community)
expect(page).not_to have_link "Destroy"
expect(page).not_to have_link "Delete"
end
end

View File

@@ -42,28 +42,28 @@ shared_examples "documentable" do |documentable_factory_name,
scenario "Should not be able when no user logged in" do
visit send(documentable_path, arguments)
expect(page).not_to have_link("Destroy document")
expect(page).not_to have_link("Delete document")
end
scenario "Should be able when documentable author is logged in" do
login_as documentable.author
visit send(documentable_path, arguments)
expect(page).to have_link("Destroy document")
expect(page).to have_link("Delete document")
end
scenario "Administrators cannot destroy documentables they have not authored" do
login_as(administrator)
visit send(documentable_path, arguments)
expect(page).not_to have_link("Destroy document")
expect(page).not_to have_link("Delete document")
end
scenario "Users cannot destroy documentables they have not authored" do
login_as(create(:user))
visit send(documentable_path, arguments)
expect(page).not_to have_link("Destroy document")
expect(page).not_to have_link("Delete document")
end
end
@@ -122,7 +122,7 @@ shared_examples "documentable" do |documentable_factory_name,
visit send(documentable_path, arguments)
within "#document_#{document.id}" do
click_on "Destroy document"
click_on "Delete document"
end
expect(page).to have_content "Document was deleted successfully."
@@ -134,7 +134,7 @@ shared_examples "documentable" do |documentable_factory_name,
visit send(documentable_path, arguments)
within "#document_#{document.id}" do
click_on "Destroy document"
click_on "Delete document"
end
expect(page).not_to have_content "Documents (0)"
@@ -146,7 +146,7 @@ shared_examples "documentable" do |documentable_factory_name,
visit send(documentable_path, arguments)
within "#document_#{document.id}" do
click_on "Destroy document"
click_on "Delete document"
end
within "##{dom_id(documentable)}" do