Skip to content

Commit

Permalink
fix: strings for translation
Browse files Browse the repository at this point in the history
  • Loading branch information
mahsem authored Dec 21, 2024
1 parent 56f561c commit 3be633f
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def get_columns(additional_table_columns, filters):
"width": 100,
},
{
"label": _("Rate"),
"label": _("Tax Rate"),
"fieldname": "rate",
"fieldtype": "Float",
"options": "currency",
Expand Down
2 changes: 1 addition & 1 deletion erpnext/accounts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ def get_chart_data(self):
"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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
8 changes: 4 additions & 4 deletions erpnext/public/js/bom_configurator/bom_configurator.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion erpnext/stock/doctype/material_request/material_request.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,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;
Expand Down
2 changes: 1 addition & 1 deletion erpnext/templates/includes/footer/footer_extension.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

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(),
Expand Down

0 comments on commit 3be633f

Please sign in to comment.