You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Rename hint_tooltip to tooltip_text & setget
`hint_tooltip` -> `tooltip_text` `set_tooltip` -> `set_tooltip_text` `_get_tooltip` -> `get_tooltip_text` Updates documentation, too.
This commit is contained in:
@@ -41,7 +41,7 @@ Error GDScriptEditorTranslationParserPlugin::parse_file(const String &p_path, Ve
|
||||
// Extract all translatable strings using the parsed tree from GDSriptParser.
|
||||
// The strategy is to find all ExpressionNode and AssignmentNode from the tree and extract strings if relevant, i.e
|
||||
// Search strings in ExpressionNode -> CallNode -> tr(), set_text(), set_placeholder() etc.
|
||||
// Search strings in AssignmentNode -> text = "__", hint_tooltip = "__" etc.
|
||||
// Search strings in AssignmentNode -> text = "__", tooltip_text = "__" etc.
|
||||
|
||||
Error err;
|
||||
Ref<Resource> loaded_res = ResourceLoader::load(p_path, "", ResourceFormatLoader::CACHE_MODE_REUSE, &err);
|
||||
@@ -221,7 +221,7 @@ void GDScriptEditorTranslationParserPlugin::_assess_assignment(GDScriptParser::A
|
||||
}
|
||||
|
||||
if (assignment_patterns.has(assignee_name) && p_assignment->assigned_value->type == GDScriptParser::Node::LITERAL) {
|
||||
// If the assignment is towards one of the extract patterns (text, hint_tooltip etc.), and the value is a string literal, we collect the string.
|
||||
// If the assignment is towards one of the extract patterns (text, tooltip_text etc.), and the value is a string literal, we collect the string.
|
||||
ids->push_back(static_cast<GDScriptParser::LiteralNode *>(p_assignment->assigned_value)->value);
|
||||
} else if (assignee_name == fd_filters && p_assignment->assigned_value->type == GDScriptParser::Node::CALL) {
|
||||
// FileDialog.filters accepts assignment in the form of PackedStringArray. For example,
|
||||
@@ -330,10 +330,10 @@ void GDScriptEditorTranslationParserPlugin::_extract_fd_literals(GDScriptParser:
|
||||
GDScriptEditorTranslationParserPlugin::GDScriptEditorTranslationParserPlugin() {
|
||||
assignment_patterns.insert("text");
|
||||
assignment_patterns.insert("placeholder_text");
|
||||
assignment_patterns.insert("hint_tooltip");
|
||||
assignment_patterns.insert("tooltip_text");
|
||||
|
||||
first_arg_patterns.insert("set_text");
|
||||
first_arg_patterns.insert("set_tooltip");
|
||||
first_arg_patterns.insert("set_tooltip_text");
|
||||
first_arg_patterns.insert("set_placeholder");
|
||||
first_arg_patterns.insert("add_tab");
|
||||
first_arg_patterns.insert("add_check_item");
|
||||
|
||||
Reference in New Issue
Block a user