@@ -359,6 +359,7 @@ void EditorProfiler::_update_frame() {
359359 category->set_editable (0 , true );
360360 category->set_metadata (0 , m.categories [i].signature );
361361 category->set_text (0 , String (m.categories [i].name ));
362+ category->set_auto_translate_mode (0 , AUTO_TRANSLATE_MODE_DISABLED);
362363 category->set_text (1 , _get_time_as_text (m, m.categories [i].total_time , 1 ));
363364
364365 if (plot_sigs.has (m.categories [i].signature )) {
@@ -376,6 +377,7 @@ void EditorProfiler::_update_frame() {
376377 item->set_cell_mode (0 , TreeItem::CELL_MODE_CHECK);
377378 item->set_editable (0 , true );
378379 item->set_text (0 , it.name );
380+ item->set_auto_translate_mode (0 , AUTO_TRANSLATE_MODE_DISABLED);
379381 item->set_metadata (0 , it.signature );
380382 item->set_metadata (1 , it.script );
381383 item->set_metadata (2 , it.line );
@@ -404,10 +406,10 @@ void EditorProfiler::_update_frame() {
404406void EditorProfiler::_update_button_text () {
405407 if (activate->is_pressed ()) {
406408 activate->set_button_icon (get_editor_theme_icon (SNAME (" Stop" )));
407- activate->set_text (TTR (" Stop" ));
409+ activate->set_text (TTRC (" Stop" ));
408410 } else {
409411 activate->set_button_icon (get_editor_theme_icon (SNAME (" Play" )));
410- activate->set_text (TTR (" Start" ));
412+ activate->set_text (TTRC (" Start" ));
411413 }
412414}
413415
@@ -438,9 +440,14 @@ void EditorProfiler::_autostart_toggled(bool p_toggled_on) {
438440
439441void EditorProfiler::_notification (int p_what) {
440442 switch (p_what) {
441- case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
442- case NOTIFICATION_THEME_CHANGED:
443443 case NOTIFICATION_TRANSLATION_CHANGED: {
444+ if (is_ready ()) {
445+ _update_frame ();
446+ }
447+ [[fallthrough]];
448+ }
449+ case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
450+ case NOTIFICATION_THEME_CHANGED: {
444451 activate->set_button_icon (get_editor_theme_icon (SNAME (" Play" )));
445452 clear_button->set_button_icon (get_editor_theme_icon (SNAME (" Clear" )));
446453
@@ -673,18 +680,18 @@ EditorProfiler::EditorProfiler() {
673680 activate = memnew (Button);
674681 activate->set_toggle_mode (true );
675682 activate->set_disabled (true );
676- activate->set_text (TTR (" Start" ));
683+ activate->set_text (TTRC (" Start" ));
677684 activate->connect (SceneStringName (pressed), callable_mp (this , &EditorProfiler::_activate_pressed));
678685 container->add_child (activate);
679686
680687 clear_button = memnew (Button);
681- clear_button->set_text (TTR (" Clear" ));
688+ clear_button->set_text (TTRC (" Clear" ));
682689 clear_button->connect (SceneStringName (pressed), callable_mp (this , &EditorProfiler::_clear_pressed));
683690 clear_button->set_disabled (true );
684691 container->add_child (clear_button);
685692
686693 CheckBox *autostart_checkbox = memnew (CheckBox);
687- autostart_checkbox->set_text (TTR (" Autostart" ));
694+ autostart_checkbox->set_text (TTRC (" Autostart" ));
688695 autostart_checkbox->set_pressed (EditorSettings::get_singleton ()->get_project_metadata (" debug_options" , " autostart_profiler" , false ));
689696 autostart_checkbox->connect (SceneStringName (toggled), callable_mp (this , &EditorProfiler::_autostart_toggled));
690697 container->add_child (autostart_checkbox);
@@ -693,14 +700,14 @@ EditorProfiler::EditorProfiler() {
693700 hb_measure->add_theme_constant_override (SNAME (" separation" ), 2 * EDSCALE);
694701 container->add_child (hb_measure);
695702
696- hb_measure->add_child (memnew (Label (TTR (" Measure:" ))));
703+ hb_measure->add_child (memnew (Label (TTRC (" Measure:" ))));
697704
698705 display_mode = memnew (OptionButton);
699706 display_mode->set_accessibility_name (TTRC (" Measure:" ));
700- display_mode->add_item (TTR (" Frame Time (ms)" ));
701- display_mode->add_item (TTR (" Average Time (ms)" ));
702- display_mode->add_item (TTR (" Frame %" ));
703- display_mode->add_item (TTR (" Physics Frame %" ));
707+ display_mode->add_item (TTRC (" Frame Time (ms)" ));
708+ display_mode->add_item (TTRC (" Average Time (ms)" ));
709+ display_mode->add_item (TTRC (" Frame %" ));
710+ display_mode->add_item (TTRC (" Physics Frame %" ));
704711 display_mode->connect (SceneStringName (item_selected), callable_mp (this , &EditorProfiler::_combo_changed));
705712
706713 hb_measure->add_child (display_mode);
@@ -709,19 +716,19 @@ EditorProfiler::EditorProfiler() {
709716 hb_time->add_theme_constant_override (SNAME (" separation" ), 2 * EDSCALE);
710717 container->add_child (hb_time);
711718
712- hb_time->add_child (memnew (Label (TTR (" Time:" ))));
719+ hb_time->add_child (memnew (Label (TTRC (" Time:" ))));
713720
714721 display_time = memnew (OptionButton);
715722 display_time->set_accessibility_name (TTRC (" Time:" ));
716723 // TRANSLATORS: This is an option in the profiler to display the time spent in a function, including the time spent in other functions called by that function.
717- display_time->add_item (TTR (" Inclusive" ));
724+ display_time->add_item (TTRC (" Inclusive" ));
718725 // TRANSLATORS: This is an option in the profiler to display the time spent in a function, exincluding the time spent in other functions called by that function.
719- display_time->add_item (TTR (" Self" ));
720- display_time->set_tooltip_text (TTR (" Inclusive: Includes time from other functions called by this function.\n Use this to spot bottlenecks.\n\n Self: Only count the time spent in the function itself, not in other functions called by that function.\n Use this to find individual functions to optimize." ));
726+ display_time->add_item (TTRC (" Self" ));
727+ display_time->set_tooltip_text (TTRC (" Inclusive: Includes time from other functions called by this function.\n Use this to spot bottlenecks.\n\n Self: Only count the time spent in the function itself, not in other functions called by that function.\n Use this to find individual functions to optimize." ));
721728 display_time->connect (SceneStringName (item_selected), callable_mp (this , &EditorProfiler::_combo_changed));
722729 hb_time->add_child (display_time);
723730
724- display_internal_profiles = memnew (CheckButton (TTR (" Display internal functions" )));
731+ display_internal_profiles = memnew (CheckButton (TTRC (" Display internal functions" )));
725732 display_internal_profiles->set_visible (EDITOR_GET (" debugger/profile_native_calls" ));
726733 display_internal_profiles->set_pressed (false );
727734 display_internal_profiles->connect (SceneStringName (pressed), callable_mp (this , &EditorProfiler::_internal_profiles_pressed));
@@ -732,7 +739,7 @@ EditorProfiler::EditorProfiler() {
732739 hb_frame->set_v_size_flags (SIZE_SHRINK_BEGIN);
733740 hb->add_child (hb_frame);
734741
735- hb_frame->add_child (memnew (Label (TTR (" Frame #:" ))));
742+ hb_frame->add_child (memnew (Label (TTRC (" Frame #:" ))));
736743
737744 cursor_metric_edit = memnew (SpinBox);
738745 cursor_metric_edit->set_accessibility_name (TTRC (" Frame #:" ));
@@ -747,22 +754,21 @@ EditorProfiler::EditorProfiler() {
747754 h_split->set_v_size_flags (SIZE_EXPAND_FILL);
748755
749756 variables = memnew (Tree);
750- variables->set_auto_translate_mode (AUTO_TRANSLATE_MODE_DISABLED);
751757 variables->set_custom_minimum_size (Size2 (320 , 0 ) * EDSCALE);
752758 variables->set_hide_folding (true );
753759 h_split->add_child (variables);
754760 variables->set_hide_root (true );
755761 variables->set_columns (3 );
756762 variables->set_column_titles_visible (true );
757- variables->set_column_title (0 , TTR (" Name" ));
763+ variables->set_column_title (0 , TTRC (" Name" ));
758764 variables->set_column_expand (0 , true );
759765 variables->set_column_clip_content (0 , true );
760766 variables->set_column_custom_minimum_width (0 , 60 );
761- variables->set_column_title (1 , TTR (" Time" ));
767+ variables->set_column_title (1 , TTRC (" Time" ));
762768 variables->set_column_expand (1 , false );
763769 variables->set_column_clip_content (1 , true );
764770 variables->set_column_custom_minimum_width (1 , 75 * EDSCALE);
765- variables->set_column_title (2 , TTR (" Calls" ));
771+ variables->set_column_title (2 , TTRC (" Calls" ));
766772 variables->set_column_expand (2 , false );
767773 variables->set_column_clip_content (2 , true );
768774 variables->set_column_custom_minimum_width (2 , 50 * EDSCALE);
0 commit comments