refactor: Format translation strings (#24004)
* fix: translation strings * fix: linting
This commit is contained in:
parent
e60a62bde5
commit
90e33e53fd
@ -339,8 +339,7 @@ class JournalEntry(AccountsController):
|
|||||||
currency=account_currency)
|
currency=account_currency)
|
||||||
|
|
||||||
if flt(voucher_total) < (flt(order.advance_paid) + total):
|
if flt(voucher_total) < (flt(order.advance_paid) + total):
|
||||||
frappe.throw(_("Advance paid against {0} {1} cannot be greater \
|
frappe.throw(_("Advance paid against {0} {1} cannot be greater than Grand Total {2}").format(reference_type, reference_name, formatted_voucher_total))
|
||||||
than Grand Total {2}").format(reference_type, reference_name, formatted_voucher_total))
|
|
||||||
|
|
||||||
def validate_invoices(self):
|
def validate_invoices(self):
|
||||||
"""Validate totals and docstatus for invoices"""
|
"""Validate totals and docstatus for invoices"""
|
||||||
|
@ -85,8 +85,7 @@ frappe.ui.form.on('Clinical Procedure', {
|
|||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
if (r.message) {
|
if (r.message) {
|
||||||
frappe.show_alert({
|
frappe.show_alert({
|
||||||
message: __('Stock Entry {0} created',
|
message: __('Stock Entry {0} created', ['<a class="bold" href="#Form/Stock Entry/'+ r.message + '">' + r.message + '</a>']),
|
||||||
['<a class="bold" href="#Form/Stock Entry/'+ r.message + '">' + r.message + '</a>']),
|
|
||||||
indicator: 'green'
|
indicator: 'green'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -105,8 +104,7 @@ frappe.ui.form.on('Clinical Procedure', {
|
|||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
if (!r.exc) {
|
if (!r.exc) {
|
||||||
if (r.message == 'insufficient stock') {
|
if (r.message == 'insufficient stock') {
|
||||||
let msg = __('Stock quantity to start the Procedure is not available in the Warehouse {0}. Do you want to record a Stock Entry?',
|
let msg = __('Stock quantity to start the Procedure is not available in the Warehouse {0}. Do you want to record a Stock Entry?', [frm.doc.warehouse.bold()]);
|
||||||
[frm.doc.warehouse.bold()]);
|
|
||||||
frappe.confirm(
|
frappe.confirm(
|
||||||
msg,
|
msg,
|
||||||
function() {
|
function() {
|
||||||
|
@ -218,8 +218,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
|
|||||||
var is_negative_qty = false;
|
var is_negative_qty = false;
|
||||||
for(var i = 0; i<fieldnames.length; i++) {
|
for(var i = 0; i<fieldnames.length; i++) {
|
||||||
if(item[fieldnames[i]] < 0){
|
if(item[fieldnames[i]] < 0){
|
||||||
frappe.msgprint(__("Row #{0}: {1} can not be negative for item {2}",
|
frappe.msgprint(__("Row #{0}: {1} can not be negative for item {2}", [item.idx,__(frappe.meta.get_label(cdt, fieldnames[i], cdn)), item.item_code]));
|
||||||
[item.idx,__(frappe.meta.get_label(cdt, fieldnames[i], cdn)), item.item_code]));
|
|
||||||
is_negative_qty = true;
|
is_negative_qty = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -326,8 +326,7 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
|
|||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
if(r.message) {
|
if(r.message) {
|
||||||
frappe.msgprint({
|
frappe.msgprint({
|
||||||
message: __('Work Orders Created: {0}',
|
message: __('Work Orders Created: {0}', [r.message.map(function(d) {
|
||||||
[r.message.map(function(d) {
|
|
||||||
return repl('<a href="#Form/Work Order/%(name)s">%(name)s</a>', {name:d})
|
return repl('<a href="#Form/Work Order/%(name)s">%(name)s</a>', {name:d})
|
||||||
}).join(', ')]),
|
}).join(', ')]),
|
||||||
indicator: 'green'
|
indicator: 'green'
|
||||||
|
@ -644,8 +644,7 @@ erpnext.PointOfSale.Controller = class {
|
|||||||
})
|
})
|
||||||
} else if (available_qty < qty_needed) {
|
} else if (available_qty < qty_needed) {
|
||||||
frappe.show_alert({
|
frappe.show_alert({
|
||||||
message: __('Stock quantity not enough for Item Code: {0} under warehouse {1}. Available quantity {2}.',
|
message: __('Stock quantity not enough for Item Code: {0} under warehouse {1}. Available quantity {2}.', [bold_item_code, bold_warehouse, bold_available_qty]),
|
||||||
[bold_item_code, bold_warehouse, bold_available_qty]),
|
|
||||||
indicator: 'orange'
|
indicator: 'orange'
|
||||||
});
|
});
|
||||||
frappe.utils.play_sound("error");
|
frappe.utils.play_sound("error");
|
||||||
|
@ -5,8 +5,7 @@ frappe.ui.form.on('Sales Person', {
|
|||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
if(frm.doc.__onload && frm.doc.__onload.dashboard_info) {
|
if(frm.doc.__onload && frm.doc.__onload.dashboard_info) {
|
||||||
var info = frm.doc.__onload.dashboard_info;
|
var info = frm.doc.__onload.dashboard_info;
|
||||||
frm.dashboard.add_indicator(__('Total Contribution Amount: {0}',
|
frm.dashboard.add_indicator(__('Total Contribution Amount: {0}', [format_currency(info.allocated_amount, info.currency)]), 'blue');
|
||||||
[format_currency(info.allocated_amount, info.currency)]), 'blue');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user