Bug 27779: (QA follow-up) Better translatability

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Tomás Cohen Arazi 2022-08-08 15:41:36 -03:00
parent 4ddf182192
commit bf35746743
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -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('<tr><td>' + out.credit_type.description + ' ' + __("against") + ' ' + out.related_debit.debit_type.description + '</td><td>- ' + out.total + '</td></tr>');
if (out.credit_type_code == 'REFUND') {
tbody.append('<tr><td>' + __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) }) + '</td><td>- ' + out.total.format_price() + '</td></tr>');
} else {
tbody.append('<tr><td>' + out.credit_type.description + '</td><td>- ' + out.total + '</td></tr>');
tbody.append('<tr><td>' + escape_str(out.credit_type.description) + '</td><td>- ' + out.total.format_price() + '</td></tr>');
}
}
for (income of data.summary.income_grouped) {
tbody.append('<tr><td>' + income.debit_type.description + '</td><td>' + income.total.format_price() + '</td></tr>');
tbody.append('<tr><td>' + escape_str(income.debit_type.description) + '</td><td>' + income.total.format_price() + '</td></tr>');
}
var tfoot = summary_modal.find('tfoot');
@ -35,7 +35,7 @@ $(document).ready(function() {
tfoot.append('<tr><td>Total</td><td>' + data.summary.total.format_price() + '</td></tr>');
for (type of data.summary.total_grouped) {
if (type.total !== 0) {
tfoot.append('<tr><td>' + type.payment_type + '</td><td>' + type.total.format_price() + '</td></tr>');
tfoot.append('<tr><td>' + escape_str(type.payment_type) + '</td><td>' + type.total.format_price() + '</td></tr>');
}
}
}