Fixed context menu TTR bugs

(cherry picked from commit a1cfc89108)
This commit is contained in:
sersoong 2018-04-19 15:31:38 +08:00 committed by Hein-Pieter van Braam
parent 3acd6fb728
commit b5425e3d87
2 changed files with 13 additions and 13 deletions

View File

@ -1503,15 +1503,15 @@ LineEdit::LineEdit() {
context_menu_enabled = true; context_menu_enabled = true;
menu = memnew(PopupMenu); menu = memnew(PopupMenu);
add_child(menu); add_child(menu);
menu->add_item(TTR("Cut"), MENU_CUT, KEY_MASK_CMD | KEY_X); menu->add_item(RTR("Cut"), MENU_CUT, KEY_MASK_CMD | KEY_X);
menu->add_item(TTR("Copy"), MENU_COPY, KEY_MASK_CMD | KEY_C); menu->add_item(RTR("Copy"), MENU_COPY, KEY_MASK_CMD | KEY_C);
menu->add_item(TTR("Paste"), MENU_PASTE, KEY_MASK_CMD | KEY_V); menu->add_item(RTR("Paste"), MENU_PASTE, KEY_MASK_CMD | KEY_V);
menu->add_separator(); menu->add_separator();
menu->add_item(TTR("Select All"), MENU_SELECT_ALL, KEY_MASK_CMD | KEY_A); menu->add_item(RTR("Select All"), MENU_SELECT_ALL, KEY_MASK_CMD | KEY_A);
menu->add_item(TTR("Clear"), MENU_CLEAR); menu->add_item(RTR("Clear"), MENU_CLEAR);
menu->add_separator(); menu->add_separator();
menu->add_item(TTR("Undo"), MENU_UNDO, KEY_MASK_CMD | KEY_Z); menu->add_item(RTR("Undo"), MENU_UNDO, KEY_MASK_CMD | KEY_Z);
menu->add_item(TTR("Redo"), MENU_REDO, KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_Z); menu->add_item(RTR("Redo"), MENU_REDO, KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_Z);
menu->connect("id_pressed", this, "menu_option"); menu->connect("id_pressed", this, "menu_option");
expand_to_text_length = false; expand_to_text_length = false;
} }

View File

@ -5847,14 +5847,14 @@ TextEdit::TextEdit() {
context_menu_enabled = true; context_menu_enabled = true;
menu = memnew(PopupMenu); menu = memnew(PopupMenu);
add_child(menu); add_child(menu);
menu->add_item(TTR("Cut"), MENU_CUT, KEY_MASK_CMD | KEY_X); menu->add_item(RTR("Cut"), MENU_CUT, KEY_MASK_CMD | KEY_X);
menu->add_item(TTR("Copy"), MENU_COPY, KEY_MASK_CMD | KEY_C); menu->add_item(RTR("Copy"), MENU_COPY, KEY_MASK_CMD | KEY_C);
menu->add_item(TTR("Paste"), MENU_PASTE, KEY_MASK_CMD | KEY_V); menu->add_item(RTR("Paste"), MENU_PASTE, KEY_MASK_CMD | KEY_V);
menu->add_separator(); menu->add_separator();
menu->add_item(TTR("Select All"), MENU_SELECT_ALL, KEY_MASK_CMD | KEY_A); menu->add_item(RTR("Select All"), MENU_SELECT_ALL, KEY_MASK_CMD | KEY_A);
menu->add_item(TTR("Clear"), MENU_CLEAR); menu->add_item(RTR("Clear"), MENU_CLEAR);
menu->add_separator(); menu->add_separator();
menu->add_item(TTR("Undo"), MENU_UNDO, KEY_MASK_CMD | KEY_Z); menu->add_item(RTR("Undo"), MENU_UNDO, KEY_MASK_CMD | KEY_Z);
menu->connect("id_pressed", this, "menu_option"); menu->connect("id_pressed", this, "menu_option");
} }