1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-28 16:07:14 +00:00

Set auto translate mode for drag previews

- Controls
  - `LineEdit`, `TextEdit`: Always disabled since it's dragging user input.
  - `TabBar`: Use the same auto translate mode as the node.
  - `RichTextLabel`: Always disable since auto translation is done
    differently from other controls (selection text you get
    programmatically is always after auto translation).
- Editor
  - Disable drag preview auto translation if the text is user input,
    filename, or class name.
  - Also disabled unexpected auto translation for audio bus effect names.
This commit is contained in:
Haoyu Qiu
2024-09-19 08:14:00 +08:00
parent 694d3c2930
commit 14321b8ed5
18 changed files with 22 additions and 1 deletions

View File

@@ -697,7 +697,7 @@ Variant EditorSettingsDialog::get_drag_data_fw(const Point2 &p_point, Control *p
return Variant();
}
String label_text = "Event " + itos(selected->get_meta("event_index"));
String label_text = vformat(TTRC("Event %d"), selected->get_meta("event_index"));
Label *label = memnew(Label(label_text));
label->set_modulate(Color(1, 1, 1, 1.0f));
shortcuts->set_drag_preview(label);