diff --git a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.json b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.json index 75022fd25cb..f7e7fc414bd 100644 --- a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.json +++ b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.json @@ -48,7 +48,7 @@ "idx": 1, "index_web_pages_for_search": 1, "links": [], - "modified": "2024-03-27 13:10:05.597711", + "modified": "2024-08-16 19:22:42.942264", "modified_by": "Administrator", "module": "Accounts", "name": "Mode of Payment", @@ -74,5 +74,6 @@ "show_name_in_global_search": 1, "sort_field": "creation", "sort_order": "ASC", - "states": [] + "states": [], + "translated_doctype": 1 } \ No newline at end of file diff --git a/erpnext/crm/doctype/market_segment/market_segment.json b/erpnext/crm/doctype/market_segment/market_segment.json index f493664af8f..0ad3d0e4b59 100644 --- a/erpnext/crm/doctype/market_segment/market_segment.json +++ b/erpnext/crm/doctype/market_segment/market_segment.json @@ -17,7 +17,7 @@ } ], "links": [], - "modified": "2024-03-27 13:10:04.846687", + "modified": "2024-08-16 19:24:55.811760", "modified_by": "Administrator", "module": "CRM", "name": "Market Segment", @@ -40,5 +40,6 @@ "sort_field": "creation", "sort_order": "DESC", "states": [], - "track_changes": 1 + "track_changes": 1, + "translated_doctype": 1 } \ No newline at end of file diff --git a/erpnext/projects/doctype/activity_type/activity_type.json b/erpnext/projects/doctype/activity_type/activity_type.json index 4da88b463eb..ccca292ba77 100644 --- a/erpnext/projects/doctype/activity_type/activity_type.json +++ b/erpnext/projects/doctype/activity_type/activity_type.json @@ -47,7 +47,7 @@ "icon": "icon-flag", "idx": 1, "links": [], - "modified": "2024-03-27 13:05:57.956050", + "modified": "2024-08-16 19:22:57.706521", "modified_by": "Administrator", "module": "Projects", "name": "Activity Type", @@ -84,5 +84,6 @@ "quick_entry": 1, "sort_field": "creation", "sort_order": "ASC", - "states": [] + "states": [], + "translated_doctype": 1 } \ No newline at end of file diff --git a/erpnext/projects/doctype/project_type/project_type.json b/erpnext/projects/doctype/project_type/project_type.json index e8577b36631..2487ffa9554 100644 --- a/erpnext/projects/doctype/project_type/project_type.json +++ b/erpnext/projects/doctype/project_type/project_type.json @@ -26,7 +26,7 @@ } ], "links": [], - "modified": "2024-03-27 13:10:21.571554", + "modified": "2024-08-16 19:24:29.480229", "modified_by": "Administrator", "module": "Projects", "name": "Project Type", @@ -70,5 +70,6 @@ "sort_field": "creation", "sort_order": "DESC", "states": [], - "track_changes": 1 + "track_changes": 1, + "translated_doctype": 1 } \ No newline at end of file diff --git a/erpnext/setup/doctype/customer_group/customer_group.json b/erpnext/setup/doctype/customer_group/customer_group.json index f2db724bae1..e1876bbd1ca 100644 --- a/erpnext/setup/doctype/customer_group/customer_group.json +++ b/erpnext/setup/doctype/customer_group/customer_group.json @@ -139,7 +139,7 @@ "idx": 1, "is_tree": 1, "links": [], - "modified": "2024-03-27 13:06:48.550415", + "modified": "2024-08-16 19:21:41.880111", "modified_by": "Administrator", "module": "Setup", "name": "Customer Group", @@ -212,5 +212,6 @@ "show_name_in_global_search": 1, "sort_field": "creation", "sort_order": "DESC", - "states": [] + "states": [], + "translated_doctype": 1 } \ No newline at end of file diff --git a/erpnext/setup/doctype/customer_group/customer_group.py b/erpnext/setup/doctype/customer_group/customer_group.py index 5dd0fd02011..9a05760ec29 100644 --- a/erpnext/setup/doctype/customer_group/customer_group.py +++ b/erpnext/setup/doctype/customer_group/customer_group.py @@ -17,9 +17,7 @@ class CustomerGroup(NestedSet): from frappe.types import DF from erpnext.accounts.doctype.party_account.party_account import PartyAccount - from erpnext.selling.doctype.customer_credit_limit.customer_credit_limit import ( - CustomerCreditLimit, - ) + from erpnext.selling.doctype.customer_credit_limit.customer_credit_limit import CustomerCreditLimit accounts: DF.Table[PartyAccount] credit_limits: DF.Table[CustomerCreditLimit] diff --git a/erpnext/setup/doctype/item_group/item_group.json b/erpnext/setup/doctype/item_group/item_group.json index 06468f22cc3..34135507b13 100644 --- a/erpnext/setup/doctype/item_group/item_group.json +++ b/erpnext/setup/doctype/item_group/item_group.json @@ -135,7 +135,7 @@ "is_tree": 1, "links": [], "max_attachments": 3, - "modified": "2024-03-27 13:09:54.588785", + "modified": "2024-08-16 19:20:36.401913", "modified_by": "Administrator", "module": "Setup", "name": "Item Group", @@ -206,5 +206,6 @@ "show_name_in_global_search": 1, "sort_field": "creation", "sort_order": "DESC", - "states": [] + "states": [], + "translated_doctype": 1 } \ No newline at end of file diff --git a/erpnext/setup/doctype/supplier_group/supplier_group.json b/erpnext/setup/doctype/supplier_group/supplier_group.json index cf1dcc8cd68..bc4f40ca2c4 100644 --- a/erpnext/setup/doctype/supplier_group/supplier_group.json +++ b/erpnext/setup/doctype/supplier_group/supplier_group.json @@ -107,7 +107,7 @@ "idx": 1, "is_tree": 1, "links": [], - "modified": "2024-03-27 13:10:48.734325", + "modified": "2024-08-16 19:22:02.022181", "modified_by": "Administrator", "module": "Setup", "name": "Supplier Group", @@ -170,5 +170,6 @@ "show_name_in_global_search": 1, "sort_field": "creation", "sort_order": "ASC", - "states": [] + "states": [], + "translated_doctype": 1 } \ No newline at end of file diff --git a/erpnext/setup/doctype/territory/territory.json b/erpnext/setup/doctype/territory/territory.json index 9ee8b6d42ee..0b07f72e469 100644 --- a/erpnext/setup/doctype/territory/territory.json +++ b/erpnext/setup/doctype/territory/territory.json @@ -123,7 +123,7 @@ "idx": 1, "is_tree": 1, "links": [], - "modified": "2024-03-27 13:10:53.240951", + "modified": "2024-08-16 19:21:19.161490", "modified_by": "Administrator", "module": "Setup", "name": "Territory", @@ -188,5 +188,6 @@ "show_name_in_global_search": 1, "sort_field": "creation", "sort_order": "DESC", - "states": [] + "states": [], + "translated_doctype": 1 } \ No newline at end of file diff --git a/erpnext/setup/setup_wizard/operations/install_fixtures.py b/erpnext/setup/setup_wizard/operations/install_fixtures.py index 6365ad2a4e1..cd6312cc032 100644 --- a/erpnext/setup/setup_wizard/operations/install_fixtures.py +++ b/erpnext/setup/setup_wizard/operations/install_fixtures.py @@ -7,7 +7,6 @@ import os from pathlib import Path import frappe -from frappe import _ from frappe.desk.doctype.global_search_settings.global_search_settings import ( update_global_search_doctypes, ) @@ -18,6 +17,14 @@ from erpnext.accounts.doctype.account.account import RootNotEditable from erpnext.regional.address_template.setup import set_up_address_templates +def _(x, *args, **kwargs): + """Redefine the translation function to return the string as is. + + We want to create english records but still mark the strings as translatable. + The respective DocTypes have 'Translate Link Fields' enabled.""" + return x + + def read_lines(filename: str) -> list[str]: """Return a list of lines from a file in the data directory.""" return (Path(__file__).parent.parent / "data" / filename).read_text().splitlines() @@ -68,49 +75,49 @@ def install(country=None): # Stock Entry Type { "doctype": "Stock Entry Type", - "name": "Material Issue", + "name": _("Material Issue"), "purpose": "Material Issue", "is_standard": 1, }, { "doctype": "Stock Entry Type", - "name": "Material Receipt", + "name": _("Material Receipt"), "purpose": "Material Receipt", "is_standard": 1, }, { "doctype": "Stock Entry Type", - "name": "Material Transfer", + "name": _("Material Transfer"), "purpose": "Material Transfer", "is_standard": 1, }, { "doctype": "Stock Entry Type", - "name": "Manufacture", + "name": _("Manufacture"), "purpose": "Manufacture", "is_standard": 1, }, { "doctype": "Stock Entry Type", - "name": "Repack", + "name": _("Repack"), "purpose": "Repack", "is_standard": 1, }, { "doctype": "Stock Entry Type", - "name": "Send to Subcontractor", + "name": _("Send to Subcontractor"), "purpose": "Send to Subcontractor", "is_standard": 1, }, { "doctype": "Stock Entry Type", - "name": "Material Transfer for Manufacture", + "name": _("Material Transfer for Manufacture"), "purpose": "Material Transfer for Manufacture", "is_standard": 1, }, { "doctype": "Stock Entry Type", - "name": "Material Consumption for Manufacture", + "name": _("Material Consumption for Manufacture"), "purpose": "Material Consumption for Manufacture", "is_standard": 1, }, @@ -274,9 +281,9 @@ def install(country=None): {"doctype": "Opportunity Type", "name": _("Sales")}, {"doctype": "Opportunity Type", "name": _("Support")}, {"doctype": "Opportunity Type", "name": _("Maintenance")}, - {"doctype": "Project Type", "project_type": "Internal"}, - {"doctype": "Project Type", "project_type": "External"}, - {"doctype": "Project Type", "project_type": "Other"}, + {"doctype": "Project Type", "project_type": _("Internal")}, + {"doctype": "Project Type", "project_type": _("External")}, + {"doctype": "Project Type", "project_type": _("Other")}, {"doctype": "Print Heading", "print_heading": _("Credit Note")}, {"doctype": "Print Heading", "print_heading": _("Debit Note")}, # Share Management @@ -370,8 +377,8 @@ def add_uom_data(): ).read() ) for d in uom_conversions: - if not frappe.db.exists("UOM Category", _(d.get("category"))): - frappe.get_doc({"doctype": "UOM Category", "category_name": _(d.get("category"))}).db_insert() + if not frappe.db.exists("UOM Category", d.get("category")): + frappe.get_doc({"doctype": "UOM Category", "category_name": d.get("category")}).db_insert() if not frappe.db.exists( "UOM Conversion Factor", @@ -380,7 +387,7 @@ def add_uom_data(): frappe.get_doc( { "doctype": "UOM Conversion Factor", - "category": _(d.get("category")), + "category": d.get("category"), "from_uom": d.get("from_uom"), "to_uom": d.get("to_uom"), "value": d.get("value"), @@ -494,7 +501,6 @@ def update_stock_settings(): stock_settings.item_naming_by = "Item Code" stock_settings.valuation_method = "FIFO" stock_settings.default_warehouse = frappe.db.get_value("Warehouse", {"warehouse_name": _("Stores")}) - stock_settings.stock_uom = _("Nos") stock_settings.stock_uom = "Nos" stock_settings.auto_indent = 1 stock_settings.auto_insert_price_list_rate_if_missing = 1 diff --git a/erpnext/stock/doctype/price_list/price_list.json b/erpnext/stock/doctype/price_list/price_list.json index e0d00cae8a8..e3da9d78fc9 100644 --- a/erpnext/stock/doctype/price_list/price_list.json +++ b/erpnext/stock/doctype/price_list/price_list.json @@ -84,7 +84,7 @@ "idx": 1, "links": [], "max_attachments": 1, - "modified": "2024-03-27 13:10:17.226079", + "modified": "2024-08-16 19:41:19.591111", "modified_by": "Administrator", "module": "Stock", "name": "Price List", @@ -130,5 +130,6 @@ "show_name_in_global_search": 1, "sort_field": "creation", "sort_order": "ASC", - "states": [] + "states": [], + "translated_doctype": 1 } \ No newline at end of file diff --git a/erpnext/stock/doctype/stock_entry_type/stock_entry_type.json b/erpnext/stock/doctype/stock_entry_type/stock_entry_type.json index 303ce95476e..6c2c96b15a1 100644 --- a/erpnext/stock/doctype/stock_entry_type/stock_entry_type.json +++ b/erpnext/stock/doctype/stock_entry_type/stock_entry_type.json @@ -37,7 +37,7 @@ } ], "links": [], - "modified": "2024-08-20 15:35:45.696958", + "modified": "2024-08-22 16:00:22.696958", "modified_by": "Administrator", "module": "Stock", "name": "Stock Entry Type", @@ -88,5 +88,6 @@ "sort_field": "creation", "sort_order": "ASC", "states": [], - "track_changes": 1 + "track_changes": 1, + "translated_doctype": 1 } \ No newline at end of file diff --git a/erpnext/support/doctype/issue_priority/issue_priority.json b/erpnext/support/doctype/issue_priority/issue_priority.json index 6f131c9eb48..7b3afb8b5e0 100644 --- a/erpnext/support/doctype/issue_priority/issue_priority.json +++ b/erpnext/support/doctype/issue_priority/issue_priority.json @@ -15,7 +15,7 @@ } ], "links": [], - "modified": "2024-03-27 13:09:53.126034", + "modified": "2024-08-16 19:23:40.697426", "modified_by": "Administrator", "module": "Support", "name": "Issue Priority", @@ -38,5 +38,6 @@ "sort_field": "creation", "sort_order": "ASC", "states": [], - "track_changes": 1 + "track_changes": 1, + "translated_doctype": 1 } \ No newline at end of file