From 7c1f85a8ca4ea067b11c2968f3881404f9c94512 Mon Sep 17 00:00:00 2001 From: LMW Date: Wed, 15 Jul 2026 18:12:35 +0800 Subject: [PATCH 1/6] Improved items for translation --- addons/material_maker/nodes/scale.mmg | 4 ++-- material_maker/main_window.gd | 10 +++++----- material_maker/panels/library/library.gd | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/addons/material_maker/nodes/scale.mmg b/addons/material_maker/nodes/scale.mmg index f9c3d49f3..8973bbaf4 100644 --- a/addons/material_maker/nodes/scale.mmg +++ b/addons/material_maker/nodes/scale.mmg @@ -60,7 +60,7 @@ "control": "P1.y", "default": 0, "label": "Center Y", - "longdesc": "The poisition of the scale center", + "longdesc": "The position of the scale center", "max": 1, "min": -1, "name": "cy", @@ -96,4 +96,4 @@ "shortdesc": "Scale" }, "type": "shader" -} \ No newline at end of file +} diff --git a/material_maker/main_window.gd b/material_maker/main_window.gd index 4d7f9b658..b94ed3923 100644 --- a/material_maker/main_window.gd +++ b/material_maker/main_window.gd @@ -377,14 +377,14 @@ func set_current_mode(mode : String) -> void: func create_menu_load_recent(menu) -> void: menu.clear() if recent_files.is_empty(): - menu.add_item("No items found", 0) + menu.add_item(tr("No items found"), 0) menu.set_item_disabled(0, true) else: for i in recent_files.size(): menu.add_item(recent_files[i], i) menu.connect_id_pressed(self._on_LoadRecent_id_pressed) menu.add_separator() - menu.add_item("Clear recent files", RECENTS_MENU_CLEAR) + menu.add_item(tr("Clear recent files"), RECENTS_MENU_CLEAR) func _on_LoadRecent_id_pressed(id) -> void: match id: @@ -655,7 +655,7 @@ func create_menu_show_panels(menu : MMMenuManager.MenuBase) -> void: menu.clear() var panels = layout.get_panel_list() for i in range(panels.size()): - menu.add_check_item(panels[i], i) + menu.add_check_item(tr(panels[i]), i) menu.set_item_checked(i, layout.is_panel_visible(panels[i])) if current_mode: menu.set_item_disabled(i, panels[i] in layout.HIDE_PANELS[current_mode]) @@ -663,8 +663,8 @@ func create_menu_show_panels(menu : MMMenuManager.MenuBase) -> void: func create_menu_panels_preset(menu : MMMenuManager.MenuBase) -> void: menu.clear() - menu.add_item("Save Preset", MENU_SAVE_PRESET) - menu.add_item("Manage Presets", MENU_MANAGE_PRESETS) + menu.add_item(tr("Save Preset"), MENU_SAVE_PRESET) + menu.add_item(tr("Manage Presets"), MENU_MANAGE_PRESETS) if not layout.presets.is_empty(): menu.add_separator() for id in layout.presets.size(): diff --git a/material_maker/panels/library/library.gd b/material_maker/panels/library/library.gd index 739fcfd97..1b594b25a 100644 --- a/material_maker/panels/library/library.gd +++ b/material_maker/panels/library/library.gd @@ -329,11 +329,11 @@ func _on_Libraries_about_to_show(): if i > 1: unload.add_item(library_manager.get_child(i).library_name, i) if not unload.item_count: - unload.add_item("No custom library loaded") + unload.add_item(tr("No custom library loaded")) unload.set_item_disabled(0, true) popup.add_separator() - popup.add_item("Create library", MENU_CREATE_LIBRARY) - popup.add_item("Load library", MENU_LOAD_LIBRARY) + popup.add_item(tr("Create library"), MENU_CREATE_LIBRARY) + popup.add_item(tr("Load library"), MENU_LOAD_LIBRARY) popup.add_submenu_item("Unload", "Unload") if not popup.window_input.is_connected(_on_Libraries_window_input): popup.window_input.connect(_on_Libraries_window_input.bind(popup)) @@ -440,7 +440,7 @@ func _on_PopupMenu_index_pressed(index): dialog.content_scale_factor = mm_globals.ui_scale_factor() dialog.min_size = Vector2(400, 90) * dialog.content_scale_factor add_child(dialog) - var status = await dialog.enter_text("Library item aliases", "Updated aliases for "+item_path, aliases) + var status = await dialog.enter_text(tr("Library item aliases"), tr("Updated aliases for %s") % [item_path], aliases) if ! status.ok: return library_manager.set_aliases(item_path, status.text) From c31811b8daf175c4a2c754f0acdb2cd22729584a Mon Sep 17 00:00:00 2001 From: LMW Date: Thu, 16 Jul 2026 01:55:56 +0800 Subject: [PATCH 2/6] Fixed Variable-ind author name --- material_maker/windows/about/about.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/material_maker/windows/about/about.gd b/material_maker/windows/about/about.gd index dfc55da79..e7f2b61e5 100644 --- a/material_maker/windows/about/about.gd +++ b/material_maker/windows/about/about.gd @@ -29,7 +29,7 @@ const CONTRIBUTORS = [ { name="Easynam", contribution="Propagate Changes function in subgraph nodes", url="https://github.com/RodZill4/material-maker/commits/master/?author=easynam" }, { name="Zhibade", contribution="Auto size new comment nodes to current selection", url="https://github.com/RodZill4/material-maker/commits/master/?author=Zhibade" }, { name="paddy-exe", contribution="New modes in the Blend node", url="https://github.com/RodZill4/material-maker/commits/master/?author=paddy-exe" }, - { name="Variable", contribution="UI fixes", url="https://github.com/RodZill4/material-maker/commits/master/?author=Variable-ind" }, + { name="Variable-ind", contribution="UI fixes", url="https://github.com/RodZill4/material-maker/commits/master/?author=Variable-ind" }, { name="jeremybeier", contribution="Unity export fixes", url="https://github.com/RodZill4/material-maker/commits/master/?author=jeremybeier" }, { name="Caroline Tilly", contribution="Steam trailer production and music for all showreels", url="https://tilcamusic.com/" }, { name="Margot Rindone", contribution="Steam achievements icons", url="https://www.artstation.com/margot_rindone" }, From 9841dbb65de2cb50862f9aac07071443c5b1482b Mon Sep 17 00:00:00 2001 From: LMW Date: Thu, 16 Jul 2026 02:25:39 +0800 Subject: [PATCH 3/6] Thickness > Line Radius --- material_maker/projects_panel.tscn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/material_maker/projects_panel.tscn b/material_maker/projects_panel.tscn index a18fcf384..8fbbde0de 100644 --- a/material_maker/projects_panel.tscn +++ b/material_maker/projects_panel.tscn @@ -45,8 +45,8 @@ keycode = 93 events = [SubResource("InputEventKey_lbgjg")] [node name="ProjectsPanel" type="Control" unique_id=235293066] -clip_contents = true custom_minimum_size = Vector2(100, 100) +clip_contents = true layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 @@ -376,7 +376,7 @@ layout_mode = 2 [node name="ThicknessLabel" type="Label" parent="MenuBar/HBox/MainGraphMenuBar/HBox/ViewMenu/ViewMenuPanel/VBoxContainer/VBoxContainer2/Thickness" unique_id=537020243] layout_mode = 2 -text = "Thickness" +text = "Line Radius" [node name="LineThickness" parent="MenuBar/HBox/MainGraphMenuBar/HBox/ViewMenu/ViewMenuPanel/VBoxContainer/VBoxContainer2/Thickness" unique_id=688868721 instance=ExtResource("8_1w3oe")] unique_name_in_owner = true From 156f08b232e96ffdf4e978be8cd6b9022e323466 Mon Sep 17 00:00:00 2001 From: LMW Date: Thu, 16 Jul 2026 10:26:34 +0800 Subject: [PATCH 4/6] Translate add node popup path items --- material_maker/windows/add_node_popup/add_node_popup.gd | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/material_maker/windows/add_node_popup/add_node_popup.gd b/material_maker/windows/add_node_popup/add_node_popup.gd index 97555aa14..36f1305ae 100644 --- a/material_maker/windows/add_node_popup/add_node_popup.gd +++ b/material_maker/windows/add_node_popup/add_node_popup.gd @@ -180,7 +180,13 @@ func update_list(filter_text : String = "") -> void: var _name : String = obj.display_name _name = obj.tree_item# + "("+str(i.quality)+")" + " ("+str(i.idx)+")" - %List.add_item(_name, i.icon) + # Translate path items + var path_items : PackedStringArray = _name.split("/") + for n in path_items.size(): + path_items[n] = tr(path_items[n]) + var translated_path = "/".join(path_items) + + %List.add_item(translated_path, i.icon) %List.set_item_custom_fg_color(idx, color) %List.set_item_metadata(idx, i) %List.set_item_tooltip_enabled(idx, false) From f3df2b5d5bda48e680d897b8f91d9d7a86b38cf1 Mon Sep 17 00:00:00 2001 From: LMW Date: Thu, 16 Jul 2026 22:50:13 +0800 Subject: [PATCH 5/6] Enabled translation for line style buttons --- material_maker/projects_panel.tscn | 5 ----- 1 file changed, 5 deletions(-) diff --git a/material_maker/projects_panel.tscn b/material_maker/projects_panel.tscn index 8fbbde0de..1b6aec8f1 100644 --- a/material_maker/projects_panel.tscn +++ b/material_maker/projects_panel.tscn @@ -302,7 +302,6 @@ unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 tooltip_text = "Direct Connections" -tooltip_auto_translate_mode = 2 toggle_mode = true button_group = ExtResource("10_lbgjg") shortcut = SubResource("Shortcut_7tisq") @@ -316,7 +315,6 @@ unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 tooltip_text = "Bezier Connections" -tooltip_auto_translate_mode = 2 toggle_mode = true button_pressed = true button_group = ExtResource("10_lbgjg") @@ -331,7 +329,6 @@ unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 tooltip_text = "Rounded Connections" -tooltip_auto_translate_mode = 2 toggle_mode = true button_group = ExtResource("10_lbgjg") shortcut = SubResource("Shortcut_7tisq") @@ -345,7 +342,6 @@ unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 tooltip_text = "Manhattan Connections" -tooltip_auto_translate_mode = 2 toggle_mode = true button_group = ExtResource("10_lbgjg") shortcut = SubResource("Shortcut_7tisq") @@ -359,7 +355,6 @@ unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 tooltip_text = "Diagonal Connections" -tooltip_auto_translate_mode = 2 toggle_mode = true button_group = ExtResource("10_lbgjg") shortcut = SubResource("Shortcut_7tisq") From ca8b9e8df5dfcc6f42a5d957cde49c9c54f39b4a Mon Sep 17 00:00:00 2001 From: LMW Date: Thu, 16 Jul 2026 23:24:58 +0800 Subject: [PATCH 6/6] Allow searching in the current language for add node popup --- material_maker/tools/library_manager/library.gd | 16 ++++++++++++---- .../windows/add_node_popup/add_node_popup.gd | 8 +------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/material_maker/tools/library_manager/library.gd b/material_maker/tools/library_manager/library.gd index 2712e4312..d652b0fa0 100644 --- a/material_maker/tools/library_manager/library.gd +++ b/material_maker/tools/library_manager/library.gd @@ -1,3 +1,4 @@ +class_name Library extends Node var library_path : String = "" @@ -10,6 +11,12 @@ var read_only : bool = false func _ready(): pass +static func translate_item_path(from_item_path : String) -> String: + var path_items : PackedStringArray = from_item_path.split("/") + for n in path_items.size(): + path_items[n] = str(TranslationServer.translate(path_items[n])) + return "/".join(path_items) + func create_library(path : String, lib_name : String) -> void: library_path = path library_name = lib_name @@ -73,21 +80,21 @@ func get_items(filter : String, disabled_sections : Array, aliased_items : Array var result_quality := 1.0 if filter: include = false - if i.display_name.to_lower().begins_with(filter) or " "+filter in i.display_name.to_lower(): + if tr(i.display_name).to_lower().begins_with(filter) or " "+filter in tr(i.display_name).to_lower(): include = true if not include: include = true result_quality = 0.8 for word in filter.split(" "): - if not word in i.display_name.to_lower(): + if not word in tr(i.display_name).to_lower(): include = false if (not include) and i.has("name"): include = true result_quality = 0.8 for word in filter.split(" "): - if not word in i.name.to_lower(): + if not word in tr(i.name).to_lower(): include = false if not include: @@ -102,8 +109,9 @@ func get_items(filter : String, disabled_sections : Array, aliased_items : Array if not include: include = true result_quality = 0.4 + for word in filter.split(" "): - if not word in i.tree_item.to_lower(): + if not word in i.tree_item.to_lower() or not word in translate_item_path(i.tree_item).to_lower(): include = false if include: diff --git a/material_maker/windows/add_node_popup/add_node_popup.gd b/material_maker/windows/add_node_popup/add_node_popup.gd index 36f1305ae..c5d48175c 100644 --- a/material_maker/windows/add_node_popup/add_node_popup.gd +++ b/material_maker/windows/add_node_popup/add_node_popup.gd @@ -180,13 +180,7 @@ func update_list(filter_text : String = "") -> void: var _name : String = obj.display_name _name = obj.tree_item# + "("+str(i.quality)+")" + " ("+str(i.idx)+")" - # Translate path items - var path_items : PackedStringArray = _name.split("/") - for n in path_items.size(): - path_items[n] = tr(path_items[n]) - var translated_path = "/".join(path_items) - - %List.add_item(translated_path, i.icon) + %List.add_item(Library.translate_item_path(_name), i.icon) %List.set_item_custom_fg_color(idx, color) %List.set_item_metadata(idx, i) %List.set_item_tooltip_enabled(idx, false)