Cleanup accessibility names.

This commit is contained in:
Pāvels Nadtočajevs
2025-06-12 07:55:29 +03:00
parent 242b8ff80a
commit a272376f89
97 changed files with 188 additions and 440 deletions

View File

@ -1780,7 +1780,7 @@ SceneImportSettingsDialog::SceneImportSettingsDialog() {
animation_play_button = memnew(Button);
animation_hbox->add_child(animation_play_button);
animation_play_button->set_flat(true);
animation_play_button->set_accessibility_name(TTRC("Play"));
animation_play_button->set_accessibility_name(TTRC("Selected Animation Play/Pause"));
animation_play_button->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
animation_play_button->set_shortcut(ED_SHORTCUT("scene_import_settings/play_selected_animation", TTRC("Selected Animation Play/Pause"), Key::SPACE));
animation_play_button->connect(SceneStringName(pressed), callable_mp(this, &SceneImportSettingsDialog::_play_animation));
@ -1788,7 +1788,6 @@ SceneImportSettingsDialog::SceneImportSettingsDialog() {
animation_stop_button = memnew(Button);
animation_hbox->add_child(animation_stop_button);
animation_stop_button->set_flat(true);
animation_stop_button->set_accessibility_name(TTRC("Stop"));
animation_stop_button->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
animation_stop_button->set_tooltip_text(TTR("Selected Animation Stop"));
animation_stop_button->connect(SceneStringName(pressed), callable_mp(this, &SceneImportSettingsDialog::_stop_current_animation));
@ -1810,7 +1809,6 @@ SceneImportSettingsDialog::SceneImportSettingsDialog() {
animation_toggle_skeleton_visibility->set_theme_type_variation("FlatButton");
animation_toggle_skeleton_visibility->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
animation_toggle_skeleton_visibility->set_tooltip_text(TTR("Toggle Animation Skeleton Visibility"));
animation_toggle_skeleton_visibility->set_accessibility_name(TTRC("Skeleton Visibility"));
animation_toggle_skeleton_visibility->connect(SceneStringName(pressed), callable_mp(this, &SceneImportSettingsDialog::_animation_update_skeleton_visibility));
@ -1831,7 +1829,6 @@ SceneImportSettingsDialog::SceneImportSettingsDialog() {
light_rotate_switch->set_toggle_mode(true);
light_rotate_switch->set_pressed(true);
light_rotate_switch->set_tooltip_text(TTR("Rotate Lights With Model"));
light_rotate_switch->set_accessibility_name(TTRC("Rotate Lights With Model"));
light_rotate_switch->connect(SceneStringName(pressed), callable_mp(this, &SceneImportSettingsDialog::_on_light_rotate_switch_pressed));
vb_light->add_child(light_rotate_switch);
@ -1840,7 +1837,6 @@ SceneImportSettingsDialog::SceneImportSettingsDialog() {
light_1_switch->set_toggle_mode(true);
light_1_switch->set_pressed(true);
light_1_switch->set_tooltip_text(TTR("Primary Light"));
light_1_switch->set_accessibility_name(TTRC("Primary Light"));
light_1_switch->connect(SceneStringName(pressed), callable_mp(this, &SceneImportSettingsDialog::_on_light_1_switch_pressed));
vb_light->add_child(light_1_switch);
@ -1849,7 +1845,6 @@ SceneImportSettingsDialog::SceneImportSettingsDialog() {
light_2_switch->set_toggle_mode(true);
light_2_switch->set_pressed(true);
light_2_switch->set_tooltip_text(TTR("Secondary Light"));
light_2_switch->set_accessibility_name(TTRC("Secondary Light"));
light_2_switch->connect(SceneStringName(pressed), callable_mp(this, &SceneImportSettingsDialog::_on_light_2_switch_pressed));
vb_light->add_child(light_2_switch);

View File

@ -541,14 +541,13 @@ AudioStreamImportSettingsDialog::AudioStreamImportSettingsDialog() {
loop_hb->add_theme_constant_override("separation", 4 * EDSCALE);
loop = memnew(CheckBox);
loop->set_text(TTR("Enable"));
loop->set_accessibility_name(TTRC("Enable looping"));
loop->set_tooltip_text(TTR("Enable looping."));
loop->connect(SceneStringName(toggled), callable_mp(this, &AudioStreamImportSettingsDialog::_settings_changed).unbind(1));
loop_hb->add_child(loop);
loop_hb->add_spacer();
loop_hb->add_child(memnew(Label(TTR("Offset:"))));
loop_offset = memnew(SpinBox);
loop_offset->set_accessibility_name(TTRC("Loop Offset"));
loop_offset->set_accessibility_name(TTRC("Offset:"));
loop_offset->set_max(10000);
loop_offset->set_step(0.001);
loop_offset->set_suffix("s");
@ -568,7 +567,7 @@ AudioStreamImportSettingsDialog::AudioStreamImportSettingsDialog() {
bpm_edit = memnew(SpinBox);
bpm_edit->set_max(400);
bpm_edit->set_step(0.01);
bpm_edit->set_accessibility_name(TTRC("BPM"));
bpm_edit->set_accessibility_name(TTRC("BPM:"));
bpm_edit->set_tooltip_text(TTR("Configure the Beats Per Measure (tempo) used for the interactive streams.\nThis is required in order to configure beat information."));
bpm_edit->connect(SceneStringName(value_changed), callable_mp(this, &AudioStreamImportSettingsDialog::_settings_changed).unbind(1));
interactive_hb->add_child(bpm_edit);
@ -580,7 +579,7 @@ AudioStreamImportSettingsDialog::AudioStreamImportSettingsDialog() {
beats_edit = memnew(SpinBox);
beats_edit->set_tooltip_text(TTR("Configure the amount of Beats used for music-aware looping. If zero, it will be autodetected from the length.\nIt is recommended to set this value (either manually or by clicking on a beat number in the preview) to ensure looping works properly."));
beats_edit->set_max(99999);
beats_edit->set_accessibility_name(TTRC("Beat Count"));
beats_edit->set_accessibility_name(TTRC("Beat Count:"));
beats_edit->connect(SceneStringName(value_changed), callable_mp(this, &AudioStreamImportSettingsDialog::_settings_changed).unbind(1));
interactive_hb->add_child(beats_edit);
bar_beats_label = memnew(Label(TTR("Bar Beats:")));
@ -589,7 +588,7 @@ AudioStreamImportSettingsDialog::AudioStreamImportSettingsDialog() {
bar_beats_edit->set_tooltip_text(TTR("Configure the Beats Per Bar. This used for music-aware transitions between AudioStreams."));
bar_beats_edit->set_min(2);
bar_beats_edit->set_max(32);
bar_beats_edit->set_accessibility_name(TTRC("Bar Beats"));
bar_beats_edit->set_accessibility_name(TTRC("Bar Beats:"));
bar_beats_edit->connect(SceneStringName(value_changed), callable_mp(this, &AudioStreamImportSettingsDialog::_settings_changed).unbind(1));
interactive_hb->add_child(bar_beats_edit);
main_vbox->add_margin_child(TTR("Music Playback:"), interactive_hb);

View File

@ -1100,13 +1100,12 @@ DynamicFontImportSettingsDialog::DynamicFontImportSettingsDialog() {
add_var = memnew(Button);
add_var->set_tooltip_text(TTR("Add new font variation configuration."));
add_var->set_accessibility_name(TTRC("Add Configuration"));
page2_hb_vars->add_child(add_var);
add_var->connect(SceneStringName(pressed), callable_mp(this, &DynamicFontImportSettingsDialog::_variation_add));
vars_list = memnew(Tree);
vars_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
vars_list->set_accessibility_name(TTRC("Configuration"));
vars_list->set_accessibility_name(TTRC("Configuration:"));
vars_list->set_custom_minimum_size(Size2(300 * EDSCALE, 0));
vars_list->set_hide_root(true);
vars_list->set_columns(2);