From 412fffba1d8cfb9988172fd4dca806b325821bfa Mon Sep 17 00:00:00 2001 From: Masha Date: Sun, 5 May 2019 15:15:32 +0100 Subject: [PATCH 1/4] the translations for Remove in the exchange forms added --- app/views/admin/order_cycles/_exchange_form.html.haml | 2 +- config/locales/ca.yml | 1 + config/locales/de_DE.yml | 1 + config/locales/en.yml | 1 + config/locales/en_BE.yml | 1 + config/locales/en_CA.yml | 1 + config/locales/en_GB.yml | 1 + config/locales/en_US.yml | 1 + config/locales/es.yml | 1 + config/locales/fr.yml | 1 + config/locales/fr_BE.yml | 1 + config/locales/fr_CA.yml | 1 + config/locales/it.yml | 1 + config/locales/nb.yml | 1 + config/locales/nl_BE.yml | 1 + config/locales/pt.yml | 1 + config/locales/simple_form.en.yml | 1 - 17 files changed, 16 insertions(+), 2 deletions(-) diff --git a/app/views/admin/order_cycles/_exchange_form.html.haml b/app/views/admin/order_cycles/_exchange_form.html.haml index 9209c4cf77..5cb7af6e7d 100644 --- a/app/views/admin/order_cycles/_exchange_form.html.haml +++ b/app/views/admin/order_cycles/_exchange_form.html.haml @@ -26,7 +26,7 @@ = select_tag 'order_cycle_{{ exchangeDirection(exchange) }}_exchange_{{ $parent.$index }}_enterprise_fees_{{ $index }}_enterprise_fee_id', nil, {'id' => 'order_cycle_{{ exchangeDirection(exchange) }}_exchange_{{ $parent.$index }}_enterprise_fees_{{ $index }}_enterprise_fee_id', 'ng-model' => 'enterprise_fee.id', 'ng-options' => 'enterprise_fee.id as enterprise_fee.name for enterprise_fee in enterpriseFeesForEnterprise(enterprise_fee.enterprise_id)'} - = link_to 'Remove', '#', {'id' => 'order_cycle_{{ exchangeDirection(exchange) }}_exchange_{{ $parent.$index }}_enterprise_fees_{{ $index }}_remove', 'ng-click' => 'removeExchangeFee($event, exchange, $index)'} + = link_to t('.remove'), '#', {'id' => 'order_cycle_{{ exchangeDirection(exchange) }}_exchange_{{ $parent.$index }}_enterprise_fees_{{ $index }}_remove', 'ng-click' => 'removeExchangeFee($event, exchange, $index)'} = f.submit t('.add_fee'), 'ng-click' => 'addExchangeFee($event, exchange)', 'ng-hide' => '!enterprises[exchange.enterprise_id].managed && !order_cycle.viewing_as_coordinator' %td.actions diff --git a/config/locales/ca.yml b/config/locales/ca.yml index 5cac8ef852..35c0072342 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -876,6 +876,7 @@ ca: pickup_time_placeholder: "Preparat per (és a dir, data / hora)" receival_instructions_placeholder: "Instruccions de recepció" add_fee: 'Afegeix una comissió' + remove: Eliminar selected: 'seleccionat' add_exchange_form: add_supplier: 'Afegeix proveïdora' diff --git a/config/locales/de_DE.yml b/config/locales/de_DE.yml index 11ee3def83..6d2ea7dca8 100644 --- a/config/locales/de_DE.yml +++ b/config/locales/de_DE.yml @@ -814,6 +814,7 @@ de_DE: pickup_instructions_tip: Diese Informationen werden Kunden nach Abschluss einer Bestellung angezeigt pickup_time_placeholder: "Bereit für (dh Datum / Uhrzeit)" receival_instructions_placeholder: "Lieferinformation" + remove: Entfernen add_fee: 'Gebühr hinzufügen' selected: 'ausgewählt' add_exchange_form: diff --git a/config/locales/en.yml b/config/locales/en.yml index 89adb8e0f4..b96b936ca0 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -866,6 +866,7 @@ en: pickup_time_placeholder: "Ready for (ie. Date / Time)" receival_instructions_placeholder: "Receival instructions" add_fee: 'Add fee' + remove: 'Remove' selected: 'selected' add_exchange_form: add_supplier: 'Add supplier' diff --git a/config/locales/en_BE.yml b/config/locales/en_BE.yml index 616eb5bf70..1ee7d8473f 100644 --- a/config/locales/en_BE.yml +++ b/config/locales/en_BE.yml @@ -873,6 +873,7 @@ en_BE: pickup_instructions_tip: These instructions are shown to customers after they complete an order pickup_time_placeholder: "Ready for (ie. Date / Time)" receival_instructions_placeholder: "Receival instructions" + remove: Remove add_fee: 'Add fee' selected: 'selected' add_exchange_form: diff --git a/config/locales/en_CA.yml b/config/locales/en_CA.yml index 0aa4e7d684..6995cf85cc 100644 --- a/config/locales/en_CA.yml +++ b/config/locales/en_CA.yml @@ -873,6 +873,7 @@ en_CA: pickup_instructions_tip: These instructions are shown to customers after they complete an order pickup_time_placeholder: "Ready for (ie. Date / Time)" receival_instructions_placeholder: "Receival instructions" + remove: Remove add_fee: 'Add fee' selected: 'selected' add_exchange_form: diff --git a/config/locales/en_GB.yml b/config/locales/en_GB.yml index 22fd706273..5d78975305 100644 --- a/config/locales/en_GB.yml +++ b/config/locales/en_GB.yml @@ -811,6 +811,7 @@ en_GB: pickup_instructions_tip: These instructions are shown to customers after they complete an order pickup_time_placeholder: "Ready for (ie. Date / Time)" receival_instructions_placeholder: "Receival instructions" + remove: Remove add_fee: 'Add fee' selected: 'selected' add_exchange_form: diff --git a/config/locales/en_US.yml b/config/locales/en_US.yml index 55e10ed2ac..bf402609e1 100644 --- a/config/locales/en_US.yml +++ b/config/locales/en_US.yml @@ -873,6 +873,7 @@ en_US: pickup_instructions_tip: These instructions are shown to customers after they complete an order pickup_time_placeholder: "Ready for (ie. Date / Time)" receival_instructions_placeholder: "Receival instructions" + remove: Remove add_fee: 'Add fee' selected: 'selected' add_exchange_form: diff --git a/config/locales/es.yml b/config/locales/es.yml index 4fe8532810..e90c6c3cf6 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -875,6 +875,7 @@ es: pickup_instructions_tip: Estas instrucciones se muestran a las consumidoras después de completar un pedido. pickup_time_placeholder: "Listo para ( Fecha / Hora)" receival_instructions_placeholder: "Instrucciones de recepción" + remove: Eliminar add_fee: 'Añadir comisión' selected: 'seleccionado' add_exchange_form: diff --git a/config/locales/fr.yml b/config/locales/fr.yml index d9bb08452d..3885223e45 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -812,6 +812,7 @@ fr: pickup_instructions_tip: Ces instructions sont affichées aux acheteurs après passage d'une commande pickup_time_placeholder: "Prêt pour (ex : jour + créneau horaire)" receival_instructions_placeholder: "Modalités de livraison" + remove: Supprimer add_fee: 'Ajouter une commission' selected: 'sélectionné' add_exchange_form: diff --git a/config/locales/fr_BE.yml b/config/locales/fr_BE.yml index bf4dc0962f..475b8f3f60 100644 --- a/config/locales/fr_BE.yml +++ b/config/locales/fr_BE.yml @@ -874,6 +874,7 @@ fr_BE: pickup_instructions_tip: Ces instructions sont affichées aux acheteurs après passage d'une commande pickup_time_placeholder: "Prêt pour (ex : jour + créneau horaire)" receival_instructions_placeholder: "Modalités de livraison" + remove: Supprimer add_fee: 'Ajouter une commission' selected: 'sélectionné' add_exchange_form: diff --git a/config/locales/fr_CA.yml b/config/locales/fr_CA.yml index e978c172e0..b5f131d2e4 100644 --- a/config/locales/fr_CA.yml +++ b/config/locales/fr_CA.yml @@ -875,6 +875,7 @@ fr_CA: pickup_instructions_tip: Ces instructions sont affichées aux acheteurs après passage d'une commande pickup_time_placeholder: "Prêt pour (ex : jour + créneau horaire)" receival_instructions_placeholder: "Modalités de livraison" + remove: Supprimer add_fee: 'Ajouter une commission' selected: 'sélectionné' add_exchange_form: diff --git a/config/locales/it.yml b/config/locales/it.yml index d4f63d1943..b7ee28f5c6 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -875,6 +875,7 @@ it: pickup_instructions_tip: Queste istruzioni saranno visibili agli utenti dopo che hanno completato una gentile richiesta pickup_time_placeholder: "Pronto per (es. Data / Ora)" receival_instructions_placeholder: "Istruzioni per il ritiro" + remove: Rimuovi add_fee: 'Aggiungi tariffa' selected: 'selezionato' add_exchange_form: diff --git a/config/locales/nb.yml b/config/locales/nb.yml index 40a7110b0f..b3c19567f4 100644 --- a/config/locales/nb.yml +++ b/config/locales/nb.yml @@ -811,6 +811,7 @@ nb: pickup_instructions_tip: Disse instruksjonene vises til kunder etter at de har fullført en bestilling pickup_time_placeholder: "Klar til (dvs. Dato/Tid)" receival_instructions_placeholder: "Mottaksinstruksjoner" + remove: Fjern add_fee: 'Legg til gebyr' selected: 'valgt' add_exchange_form: diff --git a/config/locales/nl_BE.yml b/config/locales/nl_BE.yml index 36f5f0fb4c..5d5fafd3b2 100644 --- a/config/locales/nl_BE.yml +++ b/config/locales/nl_BE.yml @@ -876,6 +876,7 @@ nl_BE: pickup_instructions_tip: Deze aanwijzingen worden getoond nadat de klant z'n bestelling heeft vervolledigd. pickup_time_placeholder: "Klaar voor (d.w.z. Datum/ Uur)" receival_instructions_placeholder: "Ontvangst instructies" + remove: Verwijderen add_fee: 'Voeg vergoeding to' selected: 'Geselecteerd' add_exchange_form: diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 885d8940cf..436c1ecc24 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -812,6 +812,7 @@ pt: pickup_instructions_tip: Estas instruções são mostradas aos consumidores depois de finalizarem as suas encomendas pickup_time_placeholder: "Pronto para (dia/hora)" receival_instructions_placeholder: "Instruções de recebimento" + remove: Remover add_fee: 'Acrescentar taxa' selected: 'selecionado' add_exchange_form: diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 0df11fe0f3..9810cea163 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -23,4 +23,3 @@ en: # defaults: # username: 'User name to sign in.' # password: 'No special characters, please.' - From 436a2ba0a272c2ee1d21bfe68e1623fc53708414 Mon Sep 17 00:00:00 2001 From: Masha Date: Sun, 5 May 2019 15:34:26 +0100 Subject: [PATCH 2/4] went much shorted way --- app/views/admin/order_cycles/_exchange_form.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/order_cycles/_exchange_form.html.haml b/app/views/admin/order_cycles/_exchange_form.html.haml index 5cb7af6e7d..8bf6852dff 100644 --- a/app/views/admin/order_cycles/_exchange_form.html.haml +++ b/app/views/admin/order_cycles/_exchange_form.html.haml @@ -26,7 +26,7 @@ = select_tag 'order_cycle_{{ exchangeDirection(exchange) }}_exchange_{{ $parent.$index }}_enterprise_fees_{{ $index }}_enterprise_fee_id', nil, {'id' => 'order_cycle_{{ exchangeDirection(exchange) }}_exchange_{{ $parent.$index }}_enterprise_fees_{{ $index }}_enterprise_fee_id', 'ng-model' => 'enterprise_fee.id', 'ng-options' => 'enterprise_fee.id as enterprise_fee.name for enterprise_fee in enterpriseFeesForEnterprise(enterprise_fee.enterprise_id)'} - = link_to t('.remove'), '#', {'id' => 'order_cycle_{{ exchangeDirection(exchange) }}_exchange_{{ $parent.$index }}_enterprise_fees_{{ $index }}_remove', 'ng-click' => 'removeExchangeFee($event, exchange, $index)'} + = link_to t('remove'), '#', {'id' => 'order_cycle_{{ exchangeDirection(exchange) }}_exchange_{{ $parent.$index }}_enterprise_fees_{{ $index }}_remove', 'ng-click' => 'removeExchangeFee($event, exchange, $index)'} = f.submit t('.add_fee'), 'ng-click' => 'addExchangeFee($event, exchange)', 'ng-hide' => '!enterprises[exchange.enterprise_id].managed && !order_cycle.viewing_as_coordinator' %td.actions From fbf52dd1f9f80bf3b4d7b18ae60b268f30a02abb Mon Sep 17 00:00:00 2001 From: Masha Date: Sun, 5 May 2019 18:31:06 +0100 Subject: [PATCH 3/4] removed translations that are not required, left exchange_form.remove key but reference a global remove in the table --- config/locales/ca.yml | 1 - config/locales/de_DE.yml | 1 - config/locales/en_BE.yml | 1 - config/locales/en_CA.yml | 1 - config/locales/en_GB.yml | 1 - config/locales/en_US.yml | 1 - config/locales/es.yml | 1 - config/locales/fr.yml | 1 - config/locales/fr_BE.yml | 1 - config/locales/fr_CA.yml | 1 - config/locales/it.yml | 1 - config/locales/nb.yml | 1 - config/locales/nl_BE.yml | 1 - config/locales/pt.yml | 1 - 14 files changed, 14 deletions(-) diff --git a/config/locales/ca.yml b/config/locales/ca.yml index 35c0072342..5cac8ef852 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -876,7 +876,6 @@ ca: pickup_time_placeholder: "Preparat per (és a dir, data / hora)" receival_instructions_placeholder: "Instruccions de recepció" add_fee: 'Afegeix una comissió' - remove: Eliminar selected: 'seleccionat' add_exchange_form: add_supplier: 'Afegeix proveïdora' diff --git a/config/locales/de_DE.yml b/config/locales/de_DE.yml index 6d2ea7dca8..11ee3def83 100644 --- a/config/locales/de_DE.yml +++ b/config/locales/de_DE.yml @@ -814,7 +814,6 @@ de_DE: pickup_instructions_tip: Diese Informationen werden Kunden nach Abschluss einer Bestellung angezeigt pickup_time_placeholder: "Bereit für (dh Datum / Uhrzeit)" receival_instructions_placeholder: "Lieferinformation" - remove: Entfernen add_fee: 'Gebühr hinzufügen' selected: 'ausgewählt' add_exchange_form: diff --git a/config/locales/en_BE.yml b/config/locales/en_BE.yml index 1ee7d8473f..616eb5bf70 100644 --- a/config/locales/en_BE.yml +++ b/config/locales/en_BE.yml @@ -873,7 +873,6 @@ en_BE: pickup_instructions_tip: These instructions are shown to customers after they complete an order pickup_time_placeholder: "Ready for (ie. Date / Time)" receival_instructions_placeholder: "Receival instructions" - remove: Remove add_fee: 'Add fee' selected: 'selected' add_exchange_form: diff --git a/config/locales/en_CA.yml b/config/locales/en_CA.yml index 6995cf85cc..0aa4e7d684 100644 --- a/config/locales/en_CA.yml +++ b/config/locales/en_CA.yml @@ -873,7 +873,6 @@ en_CA: pickup_instructions_tip: These instructions are shown to customers after they complete an order pickup_time_placeholder: "Ready for (ie. Date / Time)" receival_instructions_placeholder: "Receival instructions" - remove: Remove add_fee: 'Add fee' selected: 'selected' add_exchange_form: diff --git a/config/locales/en_GB.yml b/config/locales/en_GB.yml index 5d78975305..22fd706273 100644 --- a/config/locales/en_GB.yml +++ b/config/locales/en_GB.yml @@ -811,7 +811,6 @@ en_GB: pickup_instructions_tip: These instructions are shown to customers after they complete an order pickup_time_placeholder: "Ready for (ie. Date / Time)" receival_instructions_placeholder: "Receival instructions" - remove: Remove add_fee: 'Add fee' selected: 'selected' add_exchange_form: diff --git a/config/locales/en_US.yml b/config/locales/en_US.yml index bf402609e1..55e10ed2ac 100644 --- a/config/locales/en_US.yml +++ b/config/locales/en_US.yml @@ -873,7 +873,6 @@ en_US: pickup_instructions_tip: These instructions are shown to customers after they complete an order pickup_time_placeholder: "Ready for (ie. Date / Time)" receival_instructions_placeholder: "Receival instructions" - remove: Remove add_fee: 'Add fee' selected: 'selected' add_exchange_form: diff --git a/config/locales/es.yml b/config/locales/es.yml index e90c6c3cf6..4fe8532810 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -875,7 +875,6 @@ es: pickup_instructions_tip: Estas instrucciones se muestran a las consumidoras después de completar un pedido. pickup_time_placeholder: "Listo para ( Fecha / Hora)" receival_instructions_placeholder: "Instrucciones de recepción" - remove: Eliminar add_fee: 'Añadir comisión' selected: 'seleccionado' add_exchange_form: diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 3885223e45..d9bb08452d 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -812,7 +812,6 @@ fr: pickup_instructions_tip: Ces instructions sont affichées aux acheteurs après passage d'une commande pickup_time_placeholder: "Prêt pour (ex : jour + créneau horaire)" receival_instructions_placeholder: "Modalités de livraison" - remove: Supprimer add_fee: 'Ajouter une commission' selected: 'sélectionné' add_exchange_form: diff --git a/config/locales/fr_BE.yml b/config/locales/fr_BE.yml index 475b8f3f60..bf4dc0962f 100644 --- a/config/locales/fr_BE.yml +++ b/config/locales/fr_BE.yml @@ -874,7 +874,6 @@ fr_BE: pickup_instructions_tip: Ces instructions sont affichées aux acheteurs après passage d'une commande pickup_time_placeholder: "Prêt pour (ex : jour + créneau horaire)" receival_instructions_placeholder: "Modalités de livraison" - remove: Supprimer add_fee: 'Ajouter une commission' selected: 'sélectionné' add_exchange_form: diff --git a/config/locales/fr_CA.yml b/config/locales/fr_CA.yml index b5f131d2e4..e978c172e0 100644 --- a/config/locales/fr_CA.yml +++ b/config/locales/fr_CA.yml @@ -875,7 +875,6 @@ fr_CA: pickup_instructions_tip: Ces instructions sont affichées aux acheteurs après passage d'une commande pickup_time_placeholder: "Prêt pour (ex : jour + créneau horaire)" receival_instructions_placeholder: "Modalités de livraison" - remove: Supprimer add_fee: 'Ajouter une commission' selected: 'sélectionné' add_exchange_form: diff --git a/config/locales/it.yml b/config/locales/it.yml index b7ee28f5c6..d4f63d1943 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -875,7 +875,6 @@ it: pickup_instructions_tip: Queste istruzioni saranno visibili agli utenti dopo che hanno completato una gentile richiesta pickup_time_placeholder: "Pronto per (es. Data / Ora)" receival_instructions_placeholder: "Istruzioni per il ritiro" - remove: Rimuovi add_fee: 'Aggiungi tariffa' selected: 'selezionato' add_exchange_form: diff --git a/config/locales/nb.yml b/config/locales/nb.yml index b3c19567f4..40a7110b0f 100644 --- a/config/locales/nb.yml +++ b/config/locales/nb.yml @@ -811,7 +811,6 @@ nb: pickup_instructions_tip: Disse instruksjonene vises til kunder etter at de har fullført en bestilling pickup_time_placeholder: "Klar til (dvs. Dato/Tid)" receival_instructions_placeholder: "Mottaksinstruksjoner" - remove: Fjern add_fee: 'Legg til gebyr' selected: 'valgt' add_exchange_form: diff --git a/config/locales/nl_BE.yml b/config/locales/nl_BE.yml index 5d5fafd3b2..36f5f0fb4c 100644 --- a/config/locales/nl_BE.yml +++ b/config/locales/nl_BE.yml @@ -876,7 +876,6 @@ nl_BE: pickup_instructions_tip: Deze aanwijzingen worden getoond nadat de klant z'n bestelling heeft vervolledigd. pickup_time_placeholder: "Klaar voor (d.w.z. Datum/ Uur)" receival_instructions_placeholder: "Ontvangst instructies" - remove: Verwijderen add_fee: 'Voeg vergoeding to' selected: 'Geselecteerd' add_exchange_form: diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 436c1ecc24..885d8940cf 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -812,7 +812,6 @@ pt: pickup_instructions_tip: Estas instruções são mostradas aos consumidores depois de finalizarem as suas encomendas pickup_time_placeholder: "Pronto para (dia/hora)" receival_instructions_placeholder: "Instruções de recebimento" - remove: Remover add_fee: 'Acrescentar taxa' selected: 'selecionado' add_exchange_form: From 32c107ab5a53fb507709eea42d37ff094ae356dc Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Thu, 30 May 2019 23:26:23 +0100 Subject: [PATCH 4/4] move translation to use relative path so that the new translation key is used --- app/views/admin/order_cycles/_exchange_form.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/order_cycles/_exchange_form.html.haml b/app/views/admin/order_cycles/_exchange_form.html.haml index 8bf6852dff..5cb7af6e7d 100644 --- a/app/views/admin/order_cycles/_exchange_form.html.haml +++ b/app/views/admin/order_cycles/_exchange_form.html.haml @@ -26,7 +26,7 @@ = select_tag 'order_cycle_{{ exchangeDirection(exchange) }}_exchange_{{ $parent.$index }}_enterprise_fees_{{ $index }}_enterprise_fee_id', nil, {'id' => 'order_cycle_{{ exchangeDirection(exchange) }}_exchange_{{ $parent.$index }}_enterprise_fees_{{ $index }}_enterprise_fee_id', 'ng-model' => 'enterprise_fee.id', 'ng-options' => 'enterprise_fee.id as enterprise_fee.name for enterprise_fee in enterpriseFeesForEnterprise(enterprise_fee.enterprise_id)'} - = link_to t('remove'), '#', {'id' => 'order_cycle_{{ exchangeDirection(exchange) }}_exchange_{{ $parent.$index }}_enterprise_fees_{{ $index }}_remove', 'ng-click' => 'removeExchangeFee($event, exchange, $index)'} + = link_to t('.remove'), '#', {'id' => 'order_cycle_{{ exchangeDirection(exchange) }}_exchange_{{ $parent.$index }}_enterprise_fees_{{ $index }}_remove', 'ng-click' => 'removeExchangeFee($event, exchange, $index)'} = f.submit t('.add_fee'), 'ng-click' => 'addExchangeFee($event, exchange)', 'ng-hide' => '!enterprises[exchange.enterprise_id].managed && !order_cycle.viewing_as_coordinator' %td.actions