summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/editor
diff options
context:
space:
mode:
authorHaoyu Qiu <timothyqiu32@gmail.com>2023-05-27 10:38:37 +0800
committerHaoyu Qiu <timothyqiu32@gmail.com>2023-05-27 10:38:37 +0800
commit3e88c4cd5c22e6e687ad88b148b0ef26d69c97eb (patch)
treeb47e65fcdc2bf90f6e31d3fc14ed292945fb4d86 /modules/gdscript/editor
parent2210111eb5e8bac6a476227c01205ac44745e21e (diff)
downloadredot-engine-3e88c4cd5c22e6e687ad88b148b0ef26d69c97eb.tar.gz
Fix extraction of chained tr() calls
Diffstat (limited to 'modules/gdscript/editor')
-rw-r--r--modules/gdscript/editor/gdscript_translation_parser_plugin.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/gdscript/editor/gdscript_translation_parser_plugin.cpp b/modules/gdscript/editor/gdscript_translation_parser_plugin.cpp
index 00d50d1737..3458eb43b5 100644
--- a/modules/gdscript/editor/gdscript_translation_parser_plugin.cpp
+++ b/modules/gdscript/editor/gdscript_translation_parser_plugin.cpp
@@ -311,6 +311,14 @@ void GDScriptEditorTranslationParserPlugin::_extract_from_call(GDScriptParser::C
}
}
}
+
+ if (p_call->callee && p_call->callee->type == GDScriptParser::Node::SUBSCRIPT) {
+ GDScriptParser::SubscriptNode *subscript_node = static_cast<GDScriptParser::SubscriptNode *>(p_call->callee);
+ if (subscript_node->base && subscript_node->base->type == GDScriptParser::Node::CALL) {
+ GDScriptParser::CallNode *call_node = static_cast<GDScriptParser::CallNode *>(subscript_node->base);
+ _extract_from_call(call_node);
+ }
+ }
}
void GDScriptEditorTranslationParserPlugin::_extract_fd_literals(GDScriptParser::ExpressionNode *p_expression) {