From 01f9065dbda0ff8a61b17f8917cf7603d96e17f4 Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Wed, 13 Mar 2024 13:59:27 -0700 Subject: [PATCH] Fix incorrect closet list deletion prompt message It's no longer true that we transfer the items to the default list; we just delete them now! --- app/helpers/closet_lists_helper.rb | 6 ------ app/views/closet_lists/_closet_list.html.haml | 2 +- config/locales/en-MEEP.yml | 8 ++------ config/locales/en.yml | 6 ++---- config/locales/es.yml | 3 +-- config/locales/pt.yml | 3 +-- 6 files changed, 7 insertions(+), 21 deletions(-) diff --git a/app/helpers/closet_lists_helper.rb b/app/helpers/closet_lists_helper.rb index 899b9ae2..d4a19721 100644 --- a/app/helpers/closet_lists_helper.rb +++ b/app/helpers/closet_lists_helper.rb @@ -1,10 +1,4 @@ module ClosetListsHelper - def closet_list_delete_confirmation(closet_list) - ownership_key = closet_list.hangers_owned? ? 'owned' : 'wanted' - translate("closet_lists.closet_list.delete_confirmation.#{ownership_key}", - :list_name => closet_list.name) - end - def closet_list_description_format(list) md = RDiscount.new(list.description) Sanitize.clean(md.to_html, Sanitize::Config::BASIC).html_safe diff --git a/app/views/closet_lists/_closet_list.html.haml b/app/views/closet_lists/_closet_list.html.haml index bdc7f7c3..8f7e02b4 100644 --- a/app/views/closet_lists/_closet_list.html.haml +++ b/app/views/closet_lists/_closet_list.html.haml @@ -9,7 +9,7 @@ = link_to t('.edit'), edit_user_closet_list_path(closet_list.user_id, closet_list) = form_tag user_closet_list_path(closet_list.user_id, closet_list), :method => 'delete' do = submit_tag t('.delete'), - data: {turbo_confirm: closet_list_delete_confirmation(closet_list)} + data: {turbo_confirm: t('.delete_confirmation', list_name: closet_list.name)} = form_tag user_closet_hangers_path(@user), method: :delete, class: 'remove-all' do = hidden_field_tag :list_id, closet_list.id = submit_tag t('.remove_all.submit'), diff --git a/config/locales/en-MEEP.yml b/config/locales/en-MEEP.yml index 938e4144..2710c053 100644 --- a/config/locales/en-MEEP.yml +++ b/config/locales/en-MEEP.yml @@ -157,12 +157,8 @@ en-MEEP: edit: Meepit delete: Deleep delete_confirmation: - owned: - Are you sure you want to deleep "%{list_name}"? Even if you do, we'll - remember that you own these items. - wanted: - Are you sure you want to deleep "%{list_name}"? Even if you do, we'll - remember that you want these items. + Are you sure you want to deleep "%{list_name}"? If you do, we'll deleep + all the items in it, too. empty: This meep is empty. edit: diff --git a/config/locales/en.yml b/config/locales/en.yml index 1294e3e0..acc364ac 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -169,10 +169,8 @@ en: edit: Edit delete: Delete delete_confirmation: - owned: Are you sure you want to delete "%{list_name}"? - If you do, we'll move these items into Items You Own, not in a list. - wanted: Are you sure you want to delete "%{list_name}"? - If you do, we'll move these items into Items You Want, not in a list. + Are you sure you want to delete "%{list_name}"? + If you do, we'll delete all the items in it, too. remove_all: confirm: "Remove all items from this list?" submit: Remove all diff --git a/config/locales/es.yml b/config/locales/es.yml index b5df35dc..4b5aeee6 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -117,8 +117,7 @@ es: edit: Editar delete: Eliminar delete_confirmation: - owned: ¿Estás seguro/a que quieres eliminar la lista "%{list_name}"? Recuerda que si eliminas la lista seguirás teniendo estos objetos. - wanted: ¿Estás seguro/a que quieres eliminar la lista "%{list_name}"? Recuerda que si eliminas la lista seguirás queriendo estos objetos. + ¿Estás seguro/a que quieres eliminar la lista "%{list_name}"? empty: Esta lista está vacía. edit: title: Editando la lista "%{list_name}" diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 27baaf8d..64872f7a 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -117,8 +117,7 @@ pt: edit: Editar delete: Excluir delete_confirmation: - owned: Você tem certeza que deseja excluir "%{list_name}"? Mesmo se você fizer isso, vamos lembrar que você possui esses itens. - wanted: Você tem certeza que deseja excluir "%{list_name}"? Mesmo se você fizer isso, vamos lembrar que você procura esses itens. + Você tem certeza que deseja excluir "%{list_name}"? empty: Esta lista está vazia. edit: title: Editando lista "%{list_name}"