Browse Source

refactor: Format translation strings (#24004)

* fix: translation strings

* fix: linting
develop
Mohammad Hasnain Mohsin Rajan 4 years ago
committed by GitHub
parent
commit
90e33e53fd
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      erpnext/accounts/doctype/journal_entry/journal_entry.py
  2. 6
      erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.js
  3. 3
      erpnext/public/js/controllers/buying.js
  4. 3
      erpnext/selling/doctype/sales_order/sales_order.js
  5. 3
      erpnext/selling/page/point_of_sale/pos_controller.js
  6. 3
      erpnext/setup/doctype/sales_person/sales_person.js

3
erpnext/accounts/doctype/journal_entry/journal_entry.py

@ -339,8 +339,7 @@ class JournalEntry(AccountsController):
currency=account_currency)
if flt(voucher_total) < (flt(order.advance_paid) + total):
frappe.throw(_("Advance paid against {0} {1} cannot be greater \
than Grand Total {2}").format(reference_type, reference_name, formatted_voucher_total))
frappe.throw(_("Advance paid against {0} {1} cannot be greater than Grand Total {2}").format(reference_type, reference_name, formatted_voucher_total))
def validate_invoices(self):
"""Validate totals and docstatus for invoices"""

6
erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.js

@ -85,8 +85,7 @@ frappe.ui.form.on('Clinical Procedure', {
callback: function(r) {
if (r.message) {
frappe.show_alert({
message: __('Stock Entry {0} created',
['<a class="bold" href="#Form/Stock Entry/'+ r.message + '">' + r.message + '</a>']),
message: __('Stock Entry {0} created', ['<a class="bold" href="#Form/Stock Entry/'+ r.message + '">' + r.message + '</a>']),
indicator: 'green'
});
}
@ -105,8 +104,7 @@ frappe.ui.form.on('Clinical Procedure', {
callback: function(r) {
if (!r.exc) {
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?',
[frm.doc.warehouse.bold()]);
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()]);
frappe.confirm(
msg,
function() {

3
erpnext/public/js/controllers/buying.js

@ -218,8 +218,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
var is_negative_qty = false;
for(var i = 0; i<fieldnames.length; i++) {
if(item[fieldnames[i]] < 0){
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]));
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]));
is_negative_qty = true;
break;
}

3
erpnext/selling/doctype/sales_order/sales_order.js

@ -326,8 +326,7 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
callback: function(r) {
if(r.message) {
frappe.msgprint({
message: __('Work Orders Created: {0}',
[r.message.map(function(d) {
message: __('Work Orders Created: {0}', [r.message.map(function(d) {
return repl('<a href="#Form/Work Order/%(name)s">%(name)s</a>', {name:d})
}).join(', ')]),
indicator: 'green'

3
erpnext/selling/page/point_of_sale/pos_controller.js

@ -644,8 +644,7 @@ erpnext.PointOfSale.Controller = class {
})
} else if (available_qty < qty_needed) {
frappe.show_alert({
message: __('Stock quantity not enough for Item Code: {0} under warehouse {1}. Available quantity {2}.',
[bold_item_code, bold_warehouse, bold_available_qty]),
message: __('Stock quantity not enough for Item Code: {0} under warehouse {1}. Available quantity {2}.', [bold_item_code, bold_warehouse, bold_available_qty]),
indicator: 'orange'
});
frappe.utils.play_sound("error");

3
erpnext/setup/doctype/sales_person/sales_person.js

@ -5,8 +5,7 @@ frappe.ui.form.on('Sales Person', {
refresh: function(frm) {
if(frm.doc.__onload && frm.doc.__onload.dashboard_info) {
var info = frm.doc.__onload.dashboard_info;
frm.dashboard.add_indicator(__('Total Contribution Amount: {0}',
[format_currency(info.allocated_amount, info.currency)]), 'blue');
frm.dashboard.add_indicator(__('Total Contribution Amount: {0}', [format_currency(info.allocated_amount, info.currency)]), 'blue');
}
},

Loading…
Cancel
Save