From c62104a388d1feffadd05cc9acf3cd7313c0619b Mon Sep 17 00:00:00 2001 From: Patrick Gansterer Date: Fri, 4 Mar 2016 23:13:28 +0100 Subject: [PATCH] Get rid of duplicated confirm_delete translations --- app/views/admin/users/show.html.haml | 2 +- app/views/article_categories/index.html.haml | 2 +- app/views/articles/_article.html.haml | 2 +- app/views/finance/invoices/_invoices.html.haml | 2 +- app/views/stockit/_stock_article.html.haml | 2 +- app/views/suppliers/show.html.haml | 2 +- config/locales/de.yml | 8 -------- config/locales/en.yml | 8 -------- config/locales/fr.yml | 8 -------- config/locales/nl.yml | 8 -------- 10 files changed, 6 insertions(+), 38 deletions(-) diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index 6b9a84d2..a4030f38 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -40,6 +40,6 @@ %p = link_to t('ui.edit'), edit_admin_user_path(@user), class: 'btn' = link_to t('ui.delete'), [:admin, @user], method: :delete, class: 'btn btn-danger', - data: {confirm: t('.confirm_delete', user: @user.first_name)} + data: {confirm: t('ui.confirm_delete', name: @user.first_name)} = link_to t('.sudo'), sudo_admin_user_path(@user), method: :post, class: 'btn', data: {confirm: t('.confirm_sudo', user: @user.first_name)} diff --git a/app/views/article_categories/index.html.haml b/app/views/article_categories/index.html.haml index 413f0037..e4b5175d 100644 --- a/app/views/article_categories/index.html.haml +++ b/app/views/article_categories/index.html.haml @@ -15,5 +15,5 @@ %td= truncate article_category.description, length: 50 %td = link_to t('ui.edit'), edit_article_category_path(article_category), class: 'btn btn-mini' - = link_to t('ui.delete'), article_category, :method => :delete, :data => {:confirm => t('.confirm_delete')}, + = link_to t('ui.delete'), article_category, :method => :delete, :data => {:confirm => t('ui.confirm_delete', name: article_category.name)}, class: 'btn btn-mini btn-danger' diff --git a/app/views/articles/_article.html.haml b/app/views/articles/_article.html.haml index 8d4fae41..2c5bc41e 100644 --- a/app/views/articles/_article.html.haml +++ b/app/views/articles/_article.html.haml @@ -14,4 +14,4 @@ %td= link_to t('ui.edit'), edit_supplier_article_path(@supplier, article), :remote => true, class: 'btn btn-mini' %td= link_to t('ui.delete'), [@supplier, article], - :method => :delete, :data => {:confirm => t('.confirm_delete')}, :remote => true, class: 'btn btn-mini btn-danger' + :method => :delete, :data => {:confirm => t('ui.confirm_delete', name: article.name)}, :remote => true, class: 'btn btn-mini btn-danger' diff --git a/app/views/finance/invoices/_invoices.html.haml b/app/views/finance/invoices/_invoices.html.haml index fe995bd3..9f0f7d9c 100644 --- a/app/views/finance/invoices/_invoices.html.haml +++ b/app/views/finance/invoices/_invoices.html.haml @@ -37,5 +37,5 @@ = link_to t('ui.edit'), edit_finance_invoice_path(invoice), class: 'btn btn-mini' %td - if invoice.user_can_edit?(current_user) - = link_to t('ui.delete'), finance_invoice_path(invoice), :data => {:confirm => t('.confirm_delete')}, :method => :delete, + = link_to t('ui.delete'), finance_invoice_path(invoice), :data => {:confirm => t('ui.confirm_delete', name: invoice.number)}, :method => :delete, class: 'btn btn-danger btn-mini' diff --git a/app/views/stockit/_stock_article.html.haml b/app/views/stockit/_stock_article.html.haml index 0a9ba7b6..4df32342 100644 --- a/app/views/stockit/_stock_article.html.haml +++ b/app/views/stockit/_stock_article.html.haml @@ -10,5 +10,5 @@ %td= stock_article.article_category.name %td = link_to t('ui.edit'), edit_stock_article_path(stock_article), remote: true, class: 'btn btn-mini' - = link_to t('ui.delete'), stock_article, :method => :delete, :data => {:confirm => t('.confirm_delete', :name => stock_article.name)}, + = link_to t('ui.delete'), stock_article, :method => :delete, :data => {:confirm => t('ui.confirm_delete', :name => stock_article.name)}, class: 'btn btn-mini btn-danger', :remote => true diff --git a/app/views/suppliers/show.html.haml b/app/views/suppliers/show.html.haml index b347b149..892adfa6 100644 --- a/app/views/suppliers/show.html.haml +++ b/app/views/suppliers/show.html.haml @@ -42,7 +42,7 @@ - if @current_user.role_suppliers? .form-actions = link_to t('ui.edit'), edit_supplier_path(@supplier), class: 'btn' - = link_to t('ui.delete'), @supplier, :data => {:confirm => t('.confirm_delete')}, :method => :delete, class: 'btn btn-danger' + = link_to t('ui.delete'), @supplier, :data => {:confirm => t('ui.confirm_delete', name: @supplier.name)}, :method => :delete, class: 'btn btn-danger' - if @deliveries.any? .span6 diff --git a/config/locales/de.yml b/config/locales/de.yml index 62e9a8cd..336e8564 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -289,7 +289,6 @@ de: error: 'Benutzer/in konnte nicht wiederhergestellt werden: %{error}' notice: Benutzer/in wurde wiederhergestellt show: - confirm_delete: Willst du den Benutzer %{user} wirklich löschen? confirm_sudo: Wenn du fortsetzt, dann wirst du als Benutzer %{user} angemeldet. Sei vorsichtig und melde dich ab, wenn du fertig bist! groupabos: Gruppenabos member_since: Mitglied seit %{time} @@ -338,7 +337,6 @@ de: edit: title: Kategorie ändern index: - confirm_delete: Bist Du sicher? new: Neue Kategorie anlegen title: Artikelkategorien new: @@ -347,7 +345,6 @@ de: notice: Die Kategorie wurde aktualisiert articles: article: - confirm_delete: Bist du sicher? last_update: 'zuletzt geändert: %{last_update} | Brutto: %{gross_price}' articles: confirm_delete: Willst Du wirklich alle gewählten Artikel löschen? @@ -780,8 +777,6 @@ de: index: action_new: Neue Rechnung anlegen title: Rechnungen - invoices: - confirm_delete: Bist Du sicher? linked: Diese Rechnung ist mit %{what_link} verknüpft. linked_delivery: einer Lieferung linked_order: einer Bestellung @@ -1589,8 +1584,6 @@ de: new_quantity: Neuer Bestand reason: Ereignis stock_changes: Verlauf des Lagerbestands - stock_article: - confirm_delete: Möchtest Du den Lagerartikel %{name} wirklich löschen? update: notice: Lagerartikel »%{name}« aktualisiert. suppliers: @@ -1622,7 +1615,6 @@ de: supplier: Lieferantin title: Externe Listen show: - confirm_delete: Bist Du sicher? last_deliveries: Letzte Lieferungen last_orders: Letzte Bestellungen new_delivery: Neue Lieferung anlegen diff --git a/config/locales/en.yml b/config/locales/en.yml index 6497da03..5b28700c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -294,7 +294,6 @@ en: error: 'User could not be restored: %{error}' notice: User was restored show: - confirm_delete: Do you really want to remove %{user}? confirm_sudo: If you continue, you will take on the identity of %{user}. Do not forget to log out when you're done! groupabos: Group subscriptions member_since: Member since %{time} @@ -343,7 +342,6 @@ en: edit: title: Edit category index: - confirm_delete: Are you sure? new: Add new category title: Article categories new: @@ -352,7 +350,6 @@ en: notice: Category was updated articles: article: - confirm_delete: Are you sure? last_update: 'last updated: %{last_update} | gross: %{gross_price}' articles: confirm_delete: Do you really want to delete all selected articles? @@ -793,8 +790,6 @@ en: index: action_new: Create new invoice title: Invoices - invoices: - confirm_delete: Are you sure? linked: This invoice is linked to %{what_link}. linked_delivery: a delivery linked_order: an order @@ -1611,8 +1606,6 @@ en: new_quantity: New quantity reason: Reason stock_changes: Stock quantity changes - stock_article: - confirm_delete: Are you sure you want to delete the stock article %{name}? update: notice: Stock article %{name} was saved. suppliers: @@ -1644,7 +1637,6 @@ en: supplier: Supplier title: External lists show: - confirm_delete: Are you sure? last_deliveries: Recent deliveries last_orders: Last orders new_delivery: New delivery diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 5c7f2ac3..29dc103f 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -284,7 +284,6 @@ fr: new: title: Ajouter unE nouveLLE_eau membre show: - confirm_delete: Veux-tu vraiment expulser %{user}? confirm_sudo: groupabos: Participation à des équipes member_since: Membre depuis %{time} @@ -333,7 +332,6 @@ fr: edit: title: Modifier la catégorie index: - confirm_delete: T'es sûrE de ton coup? new: Créer une nouvelle catérogie title: Catégories de produits new: @@ -342,7 +340,6 @@ fr: notice: La catégorie a été mise à jour articles: article: - confirm_delete: T'es sûrE de ton coup? last_update: 'dernière modification: %{last_update} | TTC: %{gross_price}' articles: confirm_delete: Tu veux vraiment supprimer tous ces produits? @@ -777,8 +774,6 @@ fr: index: action_new: Ajouter une facture title: Factures - invoices: - confirm_delete: T'es sûrE de ton coup? linked: Cette facture est associée à %{what_link}. linked_delivery: un réapprovisionnement linked_order: une commande @@ -1595,8 +1590,6 @@ fr: new_quantity: Nouveau stock reason: Raison stock_changes: Afficher l'historique - stock_article: - confirm_delete: Es-tu sûr de vouloir supprimer l'article %{name} du cellier? update: notice: Les données de l'article "%{name}" ont été mises à jour. suppliers: @@ -1631,7 +1624,6 @@ fr: supplier: Fournisseur-e title: Listes externes show: - confirm_delete: Tu es sûrE de ton coup? last_deliveries: Dernières livraisons last_orders: Dernières commande new_delivery: Approvisionner le cellier diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 3d2cc0e0..7e40bc0a 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -284,7 +284,6 @@ nl: new: title: Nieuwe gebruiker toevoegen show: - confirm_delete: Wil je %{user} daadwerkelijk verwijderen? confirm_sudo: Als je doorgaat, neem je de identiteit aan van gebruiker %{user}. Vergeet hierna niet uit te loggen! groupabos: Groepslidmaatschappen member_since: Lid sinds %{time} @@ -333,7 +332,6 @@ nl: edit: title: Categorie bewerken index: - confirm_delete: Weet je het zeker? new: Nieuwe categorie title: Categoriën new: @@ -342,7 +340,6 @@ nl: notice: Categorie is bijgewerkt. articles: article: - confirm_delete: Weet je het zeker? last_update: 'laatst bijgewerkt: %{last_update} | bruto: %{gross_price}' articles: confirm_delete: Weet je zeker dat je alle artikelen wilt verwijderen? @@ -775,8 +772,6 @@ nl: index: action_new: Nieuwe factuur toevoegen title: Facturen - invoices: - confirm_delete: Weet je het zeker? linked: Deze factuur is aan %{what_link} gekoppeld. linked_delivery: een levering linked_order: een bestelling @@ -1588,8 +1583,6 @@ nl: new_quantity: Nieuw aantal reason: Reden stock_changes: Verloop - stock_article: - confirm_delete: Voorraadartikel "%{name}" echt verwijderen? update: notice: Voorraadartikel "%{name}" is bijgewerkt. suppliers: @@ -1621,7 +1614,6 @@ nl: supplier: Leverancier title: Externe lijsten show: - confirm_delete: Zeker weten? last_deliveries: Laatste leveringen last_orders: Recente bestellingen new_delivery: Levering aanmaken