mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 13:54:54 +02:00
Make Context menu in Shortcut Mapper (Modify, Delete, Clear) translatable
Fix one of issues in https://github.com/notepad-plus-plus/notepad-plus-plus/issues/8972 Close #13120
This commit is contained in:
parent
d2ba9cae0e
commit
f403b12264
@ -603,6 +603,9 @@ The comments are here for explanation, it's not necessary to translate them.
|
||||
<SettingCategory name="Setting"/>
|
||||
<ToolCategory name="Tool"/>
|
||||
<ExecuteCategory name="Execute"/>
|
||||
<ModifyContextMenu name="Modify"/>
|
||||
<DeleteContextMenu name="Delete"/>
|
||||
<ClearContextMenu name="Clear"/>
|
||||
<MainCommandNames>
|
||||
<Item id="41019" name="Open containing folder in Explorer"/>
|
||||
<Item id="41020" name="Open containing folder in Command Prompt"/>
|
||||
|
@ -547,6 +547,9 @@
|
||||
<SettingCategory name="Setting"/>
|
||||
<ToolCategory name="Tool"/>
|
||||
<ExecuteCategory name="Execute"/>
|
||||
<ModifyContextMenu name="Modify"/>
|
||||
<DeleteContextMenu name="Delete"/>
|
||||
<ClearContextMenu name="Clear"/>
|
||||
<MainCommandNames>
|
||||
<Item id="41019" name="Open containing folder in Explorer"/>
|
||||
<Item id="41020" name="Open containing folder in Command Prompt"/>
|
||||
|
@ -287,7 +287,6 @@ void ShortcutMapper::fillOutBabyGrid()
|
||||
{
|
||||
case STATE_MENU:
|
||||
{
|
||||
NativeLangSpeaker* nativeLangSpeaker = NppParameters::getInstance().getNativeLangSpeaker();
|
||||
vector<CommandShortcut> & cshortcuts = nppParam.getUserShortcuts();
|
||||
cs_index = 1;
|
||||
for (size_t i = 0; i < nbItems; ++i)
|
||||
@ -1095,9 +1094,13 @@ intptr_t CALLBACK ShortcutMapper::run_dlgProc(UINT message, WPARAM wParam, LPARA
|
||||
if (!_rightClickMenu.isCreated())
|
||||
{
|
||||
vector<MenuItemUnit> itemUnitArray;
|
||||
itemUnitArray.push_back(MenuItemUnit(IDM_BABYGRID_MODIFY, TEXT("Modify")));
|
||||
itemUnitArray.push_back(MenuItemUnit(IDM_BABYGRID_DELETE, TEXT("Delete")));
|
||||
itemUnitArray.push_back(MenuItemUnit(IDM_BABYGRID_CLEAR, TEXT("Clear")));
|
||||
NativeLangSpeaker* nativeLangSpeaker = NppParameters::getInstance().getNativeLangSpeaker();
|
||||
generic_string modifyStr = nativeLangSpeaker->getShortcutMapperLangStr("ModifyContextMenu", TEXT("Modify"));
|
||||
generic_string deleteStr = nativeLangSpeaker->getShortcutMapperLangStr("DeleteContextMenu", TEXT("Delete"));
|
||||
generic_string clearStr = nativeLangSpeaker->getShortcutMapperLangStr("ClearContextMenu", TEXT("Clear"));
|
||||
itemUnitArray.push_back(MenuItemUnit(IDM_BABYGRID_MODIFY, modifyStr.c_str()));
|
||||
itemUnitArray.push_back(MenuItemUnit(IDM_BABYGRID_DELETE, deleteStr.c_str()));
|
||||
itemUnitArray.push_back(MenuItemUnit(IDM_BABYGRID_CLEAR, clearStr.c_str()));
|
||||
_rightClickMenu.create(_hSelf, itemUnitArray);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user