From d776923ffea74588a212b0e028509c618b013b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 1 Apr 2022 16:26:03 +0200 Subject: [PATCH] Use "withdraw" instead of "retire" We used "retire" because we translated it literally from the Spanish verb "retirar" which can mean both "retire" and "withdraw". Note we're still using "retire" in database fields and method names; changing that might make it harder to upgrade from a previous version of CONSUL. --- config/locales/en/activerecord.yml | 2 +- config/locales/en/admin.yml | 2 +- config/locales/en/general.yml | 22 +++++++++--------- spec/models/related_content_spec.rb | 2 +- spec/system/dashboard/dashboard_spec.rb | 2 +- spec/system/proposal_notifications_spec.rb | 2 +- spec/system/proposals_spec.rb | 26 +++++++++++----------- spec/system/users_spec.rb | 4 ++-- 8 files changed, 31 insertions(+), 31 deletions(-) diff --git a/config/locales/en/activerecord.yml b/config/locales/en/activerecord.yml index d02d6499c..6b9af4a44 100644 --- a/config/locales/en/activerecord.yml +++ b/config/locales/en/activerecord.yml @@ -256,7 +256,7 @@ en: question: "Question" description: "Description" responsible_name: "Full name of the person submitting the proposal" - retired_reason: "Reason to retire the proposal" + retired_reason: "Reason to withdraw the proposal" selected: "Mark as selected" terms_of_service: "Terms of service" video_url: "External video URL" diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml index e234e08dc..4ef0cdb33 100644 --- a/config/locales/en/admin.yml +++ b/config/locales/en/admin.yml @@ -807,7 +807,7 @@ en: segment_recipient: all_users: All users administrators: Administrators - all_proposal_authors: Proposal authors (including archived and retired) + all_proposal_authors: Proposal authors (including archived and withdrawn) proposal_authors: Proposal authors investment_authors: Investment authors in the current budget feasible_and_undecided_investment_authors: "Authors of some investment in the current budget that does not comply with: [valuation finished unfesasible]" diff --git a/config/locales/en/general.yml b/config/locales/en/general.yml index 982722474..ca2df47cc 100644 --- a/config/locales/en/general.yml +++ b/config/locales/en/general.yml @@ -195,7 +195,7 @@ en: proposal_header: published: Published draft: Draft - retired: Retired + retired: Withdrawn proposal_totals: active_resources: Active resources community: Participants in your community @@ -312,11 +312,11 @@ en: submit_button: Save changes show_link: View proposal retire_form: - title: Retire proposal - warning: "If you retire the proposal it would still accept supports, but will be removed from the main list and a message will be visible to all users stating that the author considers the proposal should not be supported anymore" + title: Withdraw proposal + warning: "If you withdraw the proposal it will still accept supports, but will be removed from the main list and a message will be visible to all users stating that the author considers the proposal should not be supported anymore" retired_reason_blank: Choose an option retired_explanation_placeholder: Explain shortly why you think this proposal should not receive more supports - submit_button: Retire proposal + submit_button: Withdraw proposal retire_options: duplicated: Duplicated started: Already underway @@ -351,8 +351,8 @@ en: actions: success: "Recommendations for proposals are now disabled for this account" error: "An error has occured. Please go to 'My account' page to manually disable recommendations for proposals" - retired_proposals: Retired proposals - retired_proposals_link: "Proposals retired by the author" + retired_proposals: Withdrawn proposals + retired_proposals_link: "Proposals withdrawn by the author" selected_proposals: Selected proposals selected_proposals_link: View selected proposals archived_proposals: Archived proposals @@ -392,7 +392,7 @@ en: recommendations_title: Recommendations for creating a proposal start_new: Create new proposal notice: - retired: Proposal retired + retired: The proposal has been withdrawn published: The proposal has been published proposal: created: "You've created a proposal!" @@ -436,7 +436,7 @@ en: milestones_tab: Milestones retired_warning: "The author considers this proposal should not receive more supports." retired_warning_link_to_explanation: Read the explanation before voting for it. - retired: Proposal retired by the author + retired: Proposal withdrawn by the author share: Share no_notifications: "This proposal has no notifications." embed_video_title: "Video on %{proposal}" @@ -476,7 +476,7 @@ en: title: Edition edit_proposal_link: Edit proposal publish: Publish proposal - retire: Retire proposal + retire: Withdraw proposal new_request: links: Links resources: @@ -837,12 +837,12 @@ en: send_private_message: "Send private message" delete_alert: "Are you sure you want to delete your investment project? This action can't be undone" proposals: - retired: "Retired proposal" + retired: "Withdrawn proposal" draft: Draft published: Published see: "See proposal" actions: Actions - retired_help_text: Dashboard not available for retired proposals + retired_help_text: Dashboard not available for withdrawn proposals votes: agree: I agree agree_label: "I agree with %{title}" diff --git a/spec/models/related_content_spec.rb b/spec/models/related_content_spec.rb index 2ccc62f09..827a50597 100644 --- a/spec/models/related_content_spec.rb +++ b/spec/models/related_content_spec.rb @@ -91,7 +91,7 @@ describe RelatedContent do expect(parent_relationable.relationed_contents).to eq [child_relationable] end - it "returns related contents without retired proposals" do + it "returns related contents without withdrawn proposals" do create( :related_content, parent_relationable: parent_relationable, diff --git a/spec/system/dashboard/dashboard_spec.rb b/spec/system/dashboard/dashboard_spec.rb index 1d423c4d3..97ee9d466 100644 --- a/spec/system/dashboard/dashboard_spec.rb +++ b/spec/system/dashboard/dashboard_spec.rb @@ -9,7 +9,7 @@ describe "Proposal's dashboard" do expect(page).to have_link("Edit my proposal") expect(page).to have_link("Edit proposal") - expect(page).to have_link("Retire proposal") + expect(page).to have_link("Withdraw proposal") expect(page).to have_link("Publish proposal") expect(page).to have_link("Polls") expect(page).to have_link("E-mail") diff --git a/spec/system/proposal_notifications_spec.rb b/spec/system/proposal_notifications_spec.rb index f41be4d65..d15889dcc 100644 --- a/spec/system/proposal_notifications_spec.rb +++ b/spec/system/proposal_notifications_spec.rb @@ -310,7 +310,7 @@ describe "Proposal Notifications" do expect(page).to have_content "This resource is not available anymore" end - scenario "Proposal retired by author" do + scenario "Proposal withdrawn by its author" do author = create(:user) user = create(:user) proposal = create(:proposal, :retired, author: author, followers: [user]) diff --git a/spec/system/proposals_spec.rb b/spec/system/proposals_spec.rb index 8c59e4a1f..3a05e4f63 100644 --- a/spec/system/proposals_spec.rb +++ b/spec/system/proposals_spec.rb @@ -585,8 +585,8 @@ describe "Proposals" do end end - context "Retired proposals" do - scenario "Retire" do + context "Withdrawn proposals" do + scenario "Withdraw" do proposal = create(:proposal) login_as(proposal.author) @@ -599,20 +599,20 @@ describe "Proposals" do click_link "Edit my proposal" end - within_window(window_opened_by { click_link "Retire proposal" }) do + within_window(window_opened_by { click_link "Withdraw proposal" }) do expect(page).to have_current_path(retire_form_proposal_path(proposal)) select "Duplicated", from: "proposal_retired_reason" fill_in "Explanation", with: "There are three other better proposals with the same subject" - click_button "Retire proposal" + click_button "Withdraw proposal" - expect(page).to have_content "Proposal retired" + expect(page).to have_content "The proposal has been withdrawn" end visit proposal_path(proposal) expect(page).to have_content proposal.title - expect(page).to have_content "Proposal retired by the author" + expect(page).to have_content "Proposal withdrawn by the author" expect(page).to have_content "Duplicated" expect(page).to have_content "There are three other better proposals with the same subject" end @@ -623,13 +623,13 @@ describe "Proposals" do visit retire_form_proposal_path(proposal) - click_button "Retire proposal" + click_button "Withdraw proposal" - expect(page).not_to have_content "Proposal retired" + expect(page).not_to have_content "The proposal has been withdrawn" expect(page).to have_content "can't be blank", count: 2 end - scenario "Index do not list retired proposals by default" do + scenario "Index does not list withdrawn proposals by default" do Setting["feature.featured_proposals"] = true create_featured_proposals not_retired = create(:proposal) @@ -644,20 +644,20 @@ describe "Proposals" do end end - scenario "Index has a link to retired proposals list" do + scenario "Index has a link to the list of withdrawn proposals" do not_retired = create(:proposal) retired = create(:proposal, :retired) visit proposals_path expect(page).not_to have_content retired.title - click_link "Proposals retired by the author" + click_link "Proposals withdrawn by the author" expect(page).to have_content retired.title expect(page).not_to have_content not_retired.title end - scenario "Retired proposals index interface elements" do + scenario "Withdrawn proposals index interface elements" do visit proposals_path(retired: "all") expect(page).not_to have_content "Advanced search" @@ -665,7 +665,7 @@ describe "Proposals" do expect(page).not_to have_content "Districts" end - scenario "Retired proposals index has links to filter by retired_reason" do + scenario "Withdrawn proposals index has links to filter by retired_reason" do unfeasible = create(:proposal, :retired, retired_reason: "unfeasible") duplicated = create(:proposal, :retired, retired_reason: "duplicated") diff --git a/spec/system/users_spec.rb b/spec/system/users_spec.rb index 127bb1b11..bae98741f 100644 --- a/spec/system/users_spec.rb +++ b/spec/system/users_spec.rb @@ -349,7 +349,7 @@ describe "Users" do expect(page).to have_content proposal.title end - scenario "Retired proposals do not have a link to the dashboard" do + scenario "Withdrawn proposals do not have a link to the dashboard" do proposal = create(:proposal, :retired, author: user) login_as user @@ -357,7 +357,7 @@ describe "Users" do expect(page).to have_content proposal.title expect(page).not_to have_link "Dashboard" - expect(page).to have_content("Dashboard not available for retired proposals") + expect(page).to have_content "Dashboard not available for withdrawn proposals" end scenario "Published proposals have a link to the dashboard" do