Merge pull request #44816 from mahsem/strings_for_translation

fix: strings for translation
This commit is contained in:
ruthra kumar
2024-12-27 10:56:57 +05:30
committed by GitHub
7 changed files with 11 additions and 11 deletions

View File

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

View File

@@ -113,7 +113,7 @@ def get_fiscal_years(
# No match for restricting selectors
if raise_on_missing:
error_msg = _("""{0} {1} is not in any active Fiscal Year""").format(
label, formatdate(transaction_date)
_(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

@@ -148,10 +148,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) {
@@ -191,10 +191,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

@@ -336,7 +336,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(),