fix: Translation strings with trailing spaces (#21192)

This commit is contained in:
Suraj Shetty 2020-04-08 09:32:41 +05:30 committed by GitHub
parent 28753268e6
commit da6806e6bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 13 deletions

View File

@ -439,7 +439,7 @@ class AccountsController(TransactionBase):
if account_currency not in valid_currency: if account_currency not in valid_currency:
frappe.throw(_("Account {0} is invalid. Account Currency must be {1}") frappe.throw(_("Account {0} is invalid. Account Currency must be {1}")
.format(account, _(" or ").join(valid_currency))) .format(account, (' ' + _("or") + ' ').join(valid_currency)))
def clear_unallocated_advances(self, childtype, parentfield): def clear_unallocated_advances(self, childtype, parentfield):
self.set(parentfield, self.get(parentfield, {"allocated_amount": ["not in", [0, None, ""]]})) self.set(parentfield, self.get(parentfield, {"allocated_amount": ["not in", [0, None, ""]]}))

View File

@ -687,8 +687,7 @@ def add_leaves(events, start, end, filter_conditions=None):
"to_date": d.to_date, "to_date": d.to_date,
"docstatus": d.docstatus, "docstatus": d.docstatus,
"color": d.color, "color": d.color,
"title": cstr(d.employee_name) + \ "title": cstr(d.employee_name) + (' ' + _('(Half Day)') if d.half_day else ''),
(d.half_day and _(" (Half Day)") or ""),
} }
if e not in events: if e not in events:
events.append(e) events.append(e)

View File

@ -108,8 +108,8 @@ erpnext.stock.ItemDashboard = Class.extend({
if (context.data.length > 0) { if (context.data.length > 0) {
$(frappe.render_template('item_dashboard_list', context)).appendTo(this.result); $(frappe.render_template('item_dashboard_list', context)).appendTo(this.result);
} else { } else {
var message = __(" Currently no stock available in any warehouse") var message = __("Currently no stock available in any warehouse");
$("<span class='text-muted small'>"+message+"</span>").appendTo(this.result); $(`<span class='text-muted small'> ${message} </span>`).appendTo(this.result);
} }
}, },
get_item_dashboard_data: function(data, max_count, show_item) { get_item_dashboard_data: function(data, max_count, show_item) {