fix: strings for translation (backport #44816) (#44927)

* fix: strings for translation

(cherry picked from commit 3be633f6f1)

# Conflicts:
#	erpnext/accounts/utils.py

* fix: resolved conflict

---------

Co-authored-by: mahsem <137205921+mahsem@users.noreply.github.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
This commit is contained in:
mergify[bot]
2024-12-27 11:33:09 +05:30
committed by GitHub
parent 5cc9e10923
commit 488d8080c8
7 changed files with 11 additions and 11 deletions

View File

@@ -318,7 +318,7 @@ def get_columns(additional_table_columns, filters):
"width": 100,
},
{
"label": _("Rate"),
"label": _("Tax Rate"),
"fieldname": "rate",
"fieldtype": "Float",
"options": "currency",

View File

@@ -130,7 +130,7 @@ def get_fiscal_years(
else:
return ((fy.name, fy.year_start_date, fy.year_end_date),)
error_msg = _("""{0} {1} is not in any active Fiscal Year""").format(label, formatdate(transaction_date))
error_msg = _("""{0} {1} is not in any active Fiscal Year""").format(_(label), formatdate(transaction_date))
if company:
error_msg = _("""{0} for {1}""").format(error_msg, frappe.bold(company))

View File

@@ -230,8 +230,8 @@ class ForecastingReport(ExponentialSmoothingForecast):
"data": {
"labels": labels,
"datasets": [
{"name": "Demand", "values": self.total_demand},
{"name": "Forecast", "values": self.total_forecast},
{"name": _("Demand"), "values": self.total_demand},
{"name": _("Forecast"), "values": self.total_forecast},
],
},
"type": "line",

View File

@@ -106,7 +106,7 @@ def get_data(filters, columns):
for label in labels:
work = {}
work["Status"] = label
work["Status"] = _(label)
for _dummy, end_date in ranges:
period = get_period(end_date, filters)
if periodic_data.get(label).get(period):

View File

@@ -147,10 +147,10 @@ class BOMConfigurator {
if (!node.expanded) {
view.tree.load_children(node, true);
$(node.parent[0]).find(".tree-children").show();
node.$toolbar.find(".expand-all-btn").html("Collapse All");
node.$toolbar.find(".expand-all-btn").html(__("Collapse All"));
} else {
node.$tree_link.trigger("click");
node.$toolbar.find(".expand-all-btn").html("Expand All");
node.$toolbar.find(".expand-all-btn").html(__("Expand All"));
}
},
condition: function (node) {
@@ -190,10 +190,10 @@ class BOMConfigurator {
if (!node.expanded) {
view.tree.load_children(node, true);
$(node.parent[0]).find(".tree-children").show();
node.$toolbar.find(".expand-all-btn").html("Collapse All");
node.$toolbar.find(".expand-all-btn").html(__("Collapse All"));
} else {
node.$tree_link.trigger("click");
node.$toolbar.find(".expand-all-btn").html("Expand All");
node.$toolbar.find(".expand-all-btn").html(__("Expand All"));
}
},
condition: function (node) {

View File

@@ -322,7 +322,7 @@ frappe.ui.form.on("Material Request", {
default: 1,
},
],
primary_action_label: "Get Items",
primary_action_label: __("Get Items"),
primary_action(values) {
if (!values) return;
values["company"] = frm.doc.company;

View File

@@ -17,7 +17,7 @@ frappe.ready(function() {
if($("#footer-subscribe-email").val() && validate_email($("#footer-subscribe-email").val())) {
$("#footer-subscribe-email").attr('disabled', true);
$("#footer-subscribe-button").html("Sending...")
$("#footer-subscribe-button").html(__("Sending..."))
.attr("disabled", true);
erpnext.subscribe_to_newsletter({
email: $("#footer-subscribe-email").val(),