Browse Source

Set editor's translation domain at root node

Haoyu Qiu 5 months ago
parent
commit
7c8f81f1d0
3 changed files with 2 additions and 4 deletions
  1. 0 2
      editor/editor_node.cpp
  2. 0 2
      editor/project_manager.cpp
  3. 2 0
      main/main.cpp

+ 0 - 2
editor/editor_node.cpp

@@ -6848,8 +6848,6 @@ EditorNode::EditorNode() {
 	DEV_ASSERT(!singleton);
 	DEV_ASSERT(!singleton);
 	singleton = this;
 	singleton = this;
 
 
-	set_translation_domain("godot.editor");
-
 	Resource::_get_local_scene_func = _resource_get_edited_scene;
 	Resource::_get_local_scene_func = _resource_get_edited_scene;
 
 
 	{
 	{

+ 0 - 2
editor/project_manager.cpp

@@ -1162,8 +1162,6 @@ void ProjectManager::_titlebar_resized() {
 ProjectManager::ProjectManager(bool p_custom_res) {
 ProjectManager::ProjectManager(bool p_custom_res) {
 	singleton = this;
 	singleton = this;
 
 
-	set_translation_domain("godot.editor");
-
 	// Turn off some servers we aren't going to be using in the Project Manager.
 	// Turn off some servers we aren't going to be using in the Project Manager.
 	NavigationServer3D::get_singleton()->set_active(false);
 	NavigationServer3D::get_singleton()->set_active(false);
 	PhysicsServer3D::get_singleton()->set_active(false);
 	PhysicsServer3D::get_singleton()->set_active(false);

+ 2 - 0
main/main.cpp

@@ -4115,6 +4115,7 @@ int Main::start() {
 		if (editor) {
 		if (editor) {
 			OS::get_singleton()->benchmark_begin_measure("Startup", "Editor");
 			OS::get_singleton()->benchmark_begin_measure("Startup", "Editor");
 
 
+			sml->get_root()->set_translation_domain("godot.editor");
 			if (editor_pseudolocalization) {
 			if (editor_pseudolocalization) {
 				translation_server->get_editor_domain()->set_pseudolocalization_enabled(true);
 				translation_server->get_editor_domain()->set_pseudolocalization_enabled(true);
 			}
 			}
@@ -4312,6 +4313,7 @@ int Main::start() {
 			OS::get_singleton()->benchmark_begin_measure("Startup", "Project Manager");
 			OS::get_singleton()->benchmark_begin_measure("Startup", "Project Manager");
 			Engine::get_singleton()->set_editor_hint(true);
 			Engine::get_singleton()->set_editor_hint(true);
 
 
+			sml->get_root()->set_translation_domain("godot.editor");
 			if (editor_pseudolocalization) {
 			if (editor_pseudolocalization) {
 				translation_server->get_editor_domain()->set_pseudolocalization_enabled(true);
 				translation_server->get_editor_domain()->set_pseudolocalization_enabled(true);
 			}
 			}