From 9a050c5c12980ca1e34bc449529cfc2892c7996f Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Sat, 19 Jul 2025 18:28:03 +0800 Subject: [PATCH] Fix root auto-translate mode ignored for child nodes when generating POT --- editor/translations/packed_scene_translation_parser_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/translations/packed_scene_translation_parser_plugin.cpp b/editor/translations/packed_scene_translation_parser_plugin.cpp index b467e62bd4..3c47c7e40b 100644 --- a/editor/translations/packed_scene_translation_parser_plugin.cpp +++ b/editor/translations/packed_scene_translation_parser_plugin.cpp @@ -106,7 +106,7 @@ Error PackedSceneEditorTranslationParserPlugin::parse_file(const String &p_path, // If `auto_translate_mode` wasn't found, that means it is set to its default value (`AUTO_TRANSLATE_MODE_INHERIT`). if (!auto_translate_mode_found) { int idx_last = atr_owners.size() - 1; - if (idx_last > 0 && parent_path.begins_with(String(atr_owners[idx_last].first))) { + if (idx_last >= 0 && parent_path.begins_with(String(atr_owners[idx_last].first))) { auto_translating = atr_owners[idx_last].second; } else { atr_owners.push_back(Pair(state->get_node_path(i), true));