File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -51,8 +51,9 @@ func _enter_tree():
51
51
if TranslationServer .has_method (& "get_or_add_domain" ):
52
52
var tool_locale := TranslationServer .get_tool_locale ()
53
53
var tx := TranslationServer .get_translation_object (tool_locale )
54
- var tx_domain := TranslationServer .get_or_add_domain (& "godot_block_coding" )
55
- tx_domain .add_translation (tx )
54
+ var tx_domain = TranslationServer .call (& "get_or_add_domain" , & "godot_block_coding" )
55
+ if tx_domain :
56
+ tx_domain .call (& "add_translation" , tx )
56
57
57
58
# Remove unwanted class nodes from create node
58
59
old_feature_profile = EditorInterface .get_current_feature_profile ()
@@ -103,8 +104,9 @@ func _exit_tree():
103
104
EditorInterface .set_current_feature_profile ("" )
104
105
105
106
if TranslationServer .has_method (& "get_or_add_domain" ):
106
- var tx_domain := TranslationServer .get_or_add_domain (& "godot_block_coding" )
107
- tx_domain .clear ()
107
+ var tx_domain = TranslationServer .call (& "get_or_add_domain" , & "godot_block_coding" )
108
+ if tx_domain :
109
+ tx_domain .call (& "clear" )
108
110
109
111
110
112
func _ready ():
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ var undo_redo: EditorUndoRedoManager:
42
42
43
43
func _ready ():
44
44
if has_method (& "set_translation_domain" ):
45
- set_translation_domain ( & "godot_block_coding" )
45
+ call ( & "set_translation_domain" , & "godot_block_coding" )
46
46
47
47
_context .changed .connect (_on_context_changed )
48
48
You can’t perform that action at this time.
0 commit comments