1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Make editor's shortcut names translated on-site

This commit is contained in:
Haoyu Qiu
2024-10-18 19:07:44 +08:00
parent 6e2cf2aa7b
commit bf4e5cca3f
43 changed files with 568 additions and 548 deletions

View File

@@ -304,18 +304,18 @@ TilesEditorUtils::TilesEditorUtils() {
// Pattern preview generation thread.
pattern_preview_thread.start(_thread_func, this);
ED_SHORTCUT("tiles_editor/cut", TTR("Cut"), KeyModifierMask::CMD_OR_CTRL | Key::X);
ED_SHORTCUT("tiles_editor/copy", TTR("Copy"), KeyModifierMask::CMD_OR_CTRL | Key::C);
ED_SHORTCUT("tiles_editor/paste", TTR("Paste"), KeyModifierMask::CMD_OR_CTRL | Key::V);
ED_SHORTCUT("tiles_editor/cancel", TTR("Cancel"), Key::ESCAPE);
ED_SHORTCUT("tiles_editor/delete", TTR("Delete"), Key::KEY_DELETE);
ED_SHORTCUT("tiles_editor/cut", TTRC("Cut"), KeyModifierMask::CMD_OR_CTRL | Key::X);
ED_SHORTCUT("tiles_editor/copy", TTRC("Copy"), KeyModifierMask::CMD_OR_CTRL | Key::C);
ED_SHORTCUT("tiles_editor/paste", TTRC("Paste"), KeyModifierMask::CMD_OR_CTRL | Key::V);
ED_SHORTCUT("tiles_editor/cancel", TTRC("Cancel"), Key::ESCAPE);
ED_SHORTCUT("tiles_editor/delete", TTRC("Delete"), Key::KEY_DELETE);
ED_SHORTCUT("tiles_editor/paint_tool", TTR("Paint"), Key::D);
ED_SHORTCUT("tiles_editor/line_tool", TTR("Line", "Tool"), Key::L);
ED_SHORTCUT("tiles_editor/rect_tool", TTR("Rect"), Key::R);
ED_SHORTCUT("tiles_editor/bucket_tool", TTR("Bucket"), Key::B);
ED_SHORTCUT("tiles_editor/eraser", TTR("Eraser"), Key::E);
ED_SHORTCUT("tiles_editor/picker", TTR("Picker"), Key::P);
ED_SHORTCUT("tiles_editor/paint_tool", TTRC("Paint Tool"), Key::D);
ED_SHORTCUT("tiles_editor/line_tool", TTRC("Line Tool"), Key::L);
ED_SHORTCUT("tiles_editor/rect_tool", TTRC("Rect Tool"), Key::R);
ED_SHORTCUT("tiles_editor/bucket_tool", TTRC("Bucket Tool"), Key::B);
ED_SHORTCUT("tiles_editor/eraser", TTRC("Eraser Tool"), Key::E);
ED_SHORTCUT("tiles_editor/picker", TTRC("Picker Tool"), Key::P);
}
TilesEditorUtils::~TilesEditorUtils() {
@@ -499,7 +499,7 @@ TileMapEditorPlugin::TileMapEditorPlugin() {
editor->set_custom_minimum_size(Size2(0, 200) * EDSCALE);
editor->hide();
button = EditorNode::get_bottom_panel()->add_item(TTR("TileMap"), editor, ED_SHORTCUT_AND_COMMAND("bottom_panels/toggle_tile_map_bottom_panel", TTR("Toggle TileMap Bottom Panel")));
button = EditorNode::get_bottom_panel()->add_item(TTR("TileMap"), editor, ED_SHORTCUT_AND_COMMAND("bottom_panels/toggle_tile_map_bottom_panel", TTRC("Toggle TileMap Bottom Panel")));
button->hide();
}
@@ -550,7 +550,7 @@ TileSetEditorPlugin::TileSetEditorPlugin() {
editor->set_custom_minimum_size(Size2(0, 200) * EDSCALE);
editor->hide();
button = EditorNode::get_bottom_panel()->add_item(TTR("TileSet"), editor, ED_SHORTCUT_AND_COMMAND("bottom_panels/toggle_tile_set_bottom_panel", TTR("Toggle TileSet Bottom Panel")));
button = EditorNode::get_bottom_panel()->add_item(TTR("TileSet"), editor, ED_SHORTCUT_AND_COMMAND("bottom_panels/toggle_tile_set_bottom_panel", TTRC("Toggle TileSet Bottom Panel")));
button->hide();
}