Browse Source
refactor: Format translation strings (#24004 )
* fix: translation strings
* fix: linting
develop
Mohammad Hasnain Mohsin Rajan
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with
7 additions and
14 deletions
erpnext/accounts/doctype/journal_entry/journal_entry.py
erpnext/healthcare/doctype/clinical_procedure/clinical_procedure.js
erpnext/public/js/controllers/buying.js
erpnext/selling/doctype/sales_order/sales_order.js
erpnext/selling/page/point_of_sale/pos_controller.js
erpnext/setup/doctype/sales_person/sales_person.js
@ -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 """
@ -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 ( ) {
@ -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 ;
}
@ -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'
@ -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" ) ;
@ -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' ) ;
}
} ,