diff --git a/app/assets/javascripts/controllers/events.coffee.erb b/app/assets/javascripts/controllers/events.coffee.erb index 528d94344..33a267fd7 100644 --- a/app/assets/javascripts/controllers/events.coffee.erb +++ b/app/assets/javascripts/controllers/events.coffee.erb @@ -542,12 +542,11 @@ Application.Controllers.controller "ShowEventController", ["$scope", "$state", " $scope.numberFilter = $filter('number') # Button label - confirmPaymentText = if $scope.currentUser.role == 'admin' then _t('confirm_client_payment_of_') else _t('confirm_my_payment_of_') if $scope.amount > 0 - $scope.validButtonName = "#{confirmPaymentText} #{$filter('currency')($scope.amount)}" + $scope.validButtonName = _t('confirm_payment_of_html', {ROLE:$scope.currentUser.role, AMOUNT:$filter('currency')($scope.amount)}, "messageformat") else if price.price > 0 and $scope.walletAmount == 0 - $scope.validButtonName = "#{confirmPaymentText} #{$filter('currency')(price.price)}" + $scope.validButtonName = _t('confirm_payment_of_html', {ROLE:$scope.currentUser.role, AMOUNT:$filter('currency')(price.price)}, "messageformat") else $scope.validButtonName = _t('confirm') diff --git a/app/assets/javascripts/controllers/machines.coffee.erb b/app/assets/javascripts/controllers/machines.coffee.erb index d3092b06e..98f2c8009 100644 --- a/app/assets/javascripts/controllers/machines.coffee.erb +++ b/app/assets/javascripts/controllers/machines.coffee.erb @@ -831,12 +831,11 @@ Application.Controllers.controller "ReserveMachineController", ["$scope", "$stat $scope.numberFilter = $filter('number') # Button label - confirmPaymentText = if $scope.currentUser.role == 'admin' then _t('confirm_client_payment_of_') else _t('confirm_my_payment_of_') if $scope.amount > 0 - $scope.validButtonName = "#{confirmPaymentText} #{$filter('currency')($scope.amount)}" + $scope.validButtonName = _t('confirm_payment_of_html', {ROLE:$scope.currentUser.role, AMOUNT:$filter('currency')($scope.amount)}, "messageformat") else if price.price > 0 and $scope.walletAmount == 0 - $scope.validButtonName = "#{confirmPaymentText} #{$filter('currency')(price.price)}" + $scope.validButtonName = _t('confirm_payment_of_html', {ROLE:$scope.currentUser.role, AMOUNT:$filter('currency')(price.price)}, "messageformat") else $scope.validButtonName = _t('confirm') diff --git a/app/assets/javascripts/controllers/plans.coffee.erb b/app/assets/javascripts/controllers/plans.coffee.erb index 815a8fe8a..ba7456780 100644 --- a/app/assets/javascripts/controllers/plans.coffee.erb +++ b/app/assets/javascripts/controllers/plans.coffee.erb @@ -236,12 +236,11 @@ Application.Controllers.controller "PlansIndexController", ["$scope", "$rootScop $scope.member = member # Button label - confirmPaymentText = if $scope.currentUser.role == 'admin' then _t('confirm_client_payment_of_') else _t('confirm_my_payment_of_') if $scope.amount > 0 - $scope.validButtonName = "#{confirmPaymentText} #{$filter('currency')($scope.amount)}" + $scope.validButtonName = _t('confirm_payment_of_html', {ROLE:$scope.currentUser.role, AMOUNT:$filter('currency')($scope.amount)}, "messageformat") else if price.price > 0 and $scope.walletAmount == 0 - $scope.validButtonName = "#{confirmPaymentText} #{$filter('currency')(price.price)}" + $scope.validButtonName = _t('confirm_payment_of_html', {ROLE:$scope.currentUser.role, AMOUNT:$filter('currency')(price.price)}, "messageformat") else $scope.validButtonName = _t('confirm') diff --git a/app/assets/javascripts/controllers/trainings.coffee.erb b/app/assets/javascripts/controllers/trainings.coffee.erb index 8fb8de80d..e5376ea91 100644 --- a/app/assets/javascripts/controllers/trainings.coffee.erb +++ b/app/assets/javascripts/controllers/trainings.coffee.erb @@ -556,12 +556,11 @@ Application.Controllers.controller "ReserveTrainingController", ["$scope", "$sta $scope.numberFilter = $filter('number') # Button label - confirmPaymentText = if $scope.currentUser.role == 'admin' then _t('confirm_client_payment_of_') else _t('confirm_my_payment_of_') if $scope.amount > 0 - $scope.validButtonName = "#{confirmPaymentText} #{$filter('currency')($scope.amount)}" + $scope.validButtonName = _t('confirm_payment_of_html', {ROLE:$scope.currentUser.role, AMOUNT:$filter('currency')($scope.amount)}, "messageformat") else if price.price > 0 and $scope.walletAmount == 0 - $scope.validButtonName = "#{confirmPaymentText} #{$filter('currency')(price.price)}" + $scope.validButtonName = _t('confirm_payment_of_html', {ROLE:$scope.currentUser.role, AMOUNT:$filter('currency')(price.price)}, "messageformat") else $scope.validButtonName = _t('confirm') diff --git a/app/assets/templates/plans/payment_modal.html.erb b/app/assets/templates/plans/payment_modal.html.erb index 60d198d2c..2e723bd9c 100644 --- a/app/assets/templates/plans/payment_modal.html.erb +++ b/app/assets/templates/plans/payment_modal.html.erb @@ -9,6 +9,6 @@

{{ plan | humanReadablePlanName }}

diff --git a/config/locales/app.shared.en.yml b/config/locales/app.shared.en.yml index 722db6aa0..4a9f40174 100644 --- a/config/locales/app.shared.en.yml +++ b/config/locales/app.shared.en.yml @@ -96,6 +96,7 @@ en: name_is_required: "Name is required." all_themes: "All themes" filter: 'Filter' + confirm_payment_of_html: "{ROLE, select, admin{Payment on site} other{Pay}}: {AMOUNT}" # messageFormat interpolation (context: confirm my payment of $20.00) messages: you_will_lose_any_unsaved_modification_if_you_quit_this_page: "You will lose any unsaved modification if you quit this page" @@ -159,7 +160,6 @@ en: i_have_read_and_accept_: "I have read, and accept" _the_general_terms_and_conditions: "the general terms and conditions." enter_your_card_number: "Enter your card number" - confirm_my_payment_of_: "Confirm my payment of" # context: confirm my payment of $20.00 credit_amount_for_pay_reservation: "{{amount}} {{currency}} remains to be paid to confirm your reservation" client_credit_amount_for_pay_reservation: "{{amount}} {{currency}} remains to be paid to confirm reservation of client" @@ -167,7 +167,6 @@ en: # dialog of on site payment for reservations booking_confirmation: "Booking confirmation" here_is_the_summary_of_the_slots_to_book_for_the_current_user: "Here is the summary of the slots to book for the current user:" - confirm_client_payment_of_: "Confirm (Payment on site) of {{amount}} {{currency}}" event: # event edition form diff --git a/config/locales/app.shared.fr.yml b/config/locales/app.shared.fr.yml index a157a6fdb..119deb195 100644 --- a/config/locales/app.shared.fr.yml +++ b/config/locales/app.shared.fr.yml @@ -96,6 +96,7 @@ fr: name_is_required: "Le nom est requis." all_themes: "Toutes les thématiques" filter: 'Filtre' + confirm_payment_of_html: "{ROLE, select, admin{Paiement sur place} other{Payer}} : {AMOUNT}" # messageFormat interpolation (contexte : valider mon paiement de 20,00 €) messages: you_will_lose_any_unsaved_modification_if_you_quit_this_page: "Vous perdrez les modifications non enregistrées si vous quittez cette page" @@ -159,7 +160,6 @@ fr: i_have_read_and_accept_: "J'ai bien pris connaissance, et accepte" _the_general_terms_and_conditions: "les conditions générales de vente." enter_your_card_number: "Saisissez votre numéro de carte" - confirm_my_payment_of_: "Valider mon paiement de" # contexte : valider mon paiement de 20,00 € credit_amount_for_pay_reservation: "Il vous reste {{amount}} {{currency}} à payer pour valider votre réservation" client_credit_amount_for_pay_reservation: "Il reste {{amount}} {{currency}} à payer pour valider la réservation" @@ -167,7 +167,6 @@ fr: # fenêtre de paiement sur place d'une réservation booking_confirmation: "Validation réservation" here_is_the_summary_of_the_slots_to_book_for_the_current_user: "Voici le récapitulatif des créneaux à réserver pour l'utilisateur courant :" - confirm_client_payment_of_: "Valider (Paiement sur place) de {{amount}} {{currency}}" event: # formulaire d'édition d'un événement