From bf35746743def72e3ba5abc7e49c9d3d4adfb22e Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 8 Aug 2022 15:41:36 -0300 Subject: [PATCH] Bug 27779: (QA follow-up) Better translatability Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/intranet-tmpl/prog/js/cashup_modal.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/cashup_modal.js b/koha-tmpl/intranet-tmpl/prog/js/cashup_modal.js index 3cc7914c5e..ad7bd6aa83 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/cashup_modal.js +++ b/koha-tmpl/intranet-tmpl/prog/js/cashup_modal.js @@ -19,15 +19,15 @@ $(document).ready(function() { var tbody = summary_modal.find('tbody') tbody.empty(); for (out of data.summary.payout_grouped) { - if ( out.credit_type_code == 'REFUND' ) { - tbody.append('' + out.credit_type.description + ' ' + __("against") + ' ' + out.related_debit.debit_type.description + '- ' + out.total + ''); + if (out.credit_type_code == 'REFUND') { + tbody.append('' + __x('{credit_type_description} against {debit_type_description}', { 'credit_type_description': escape_str(out.credit_type.description), 'debit_type_description': escape_str(out.related_debit.debit_type.description) }) + '- ' + out.total.format_price() + ''); } else { - tbody.append('' + out.credit_type.description + '- ' + out.total + ''); + tbody.append('' + escape_str(out.credit_type.description) + '- ' + out.total.format_price() + ''); } } for (income of data.summary.income_grouped) { - tbody.append('' + income.debit_type.description + '' + income.total.format_price() + ''); + tbody.append('' + escape_str(income.debit_type.description) + '' + income.total.format_price() + ''); } var tfoot = summary_modal.find('tfoot'); @@ -35,7 +35,7 @@ $(document).ready(function() { tfoot.append('Total' + data.summary.total.format_price() + ''); for (type of data.summary.total_grouped) { if (type.total !== 0) { - tfoot.append('' + type.payment_type + '' + type.total.format_price() + ''); + tfoot.append('' + escape_str(type.payment_type) + '' + type.total.format_price() + ''); } } } -- 2.39.5