mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-24 06:14:47 +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"/>
|
<SettingCategory name="Setting"/>
|
||||||
<ToolCategory name="Tool"/>
|
<ToolCategory name="Tool"/>
|
||||||
<ExecuteCategory name="Execute"/>
|
<ExecuteCategory name="Execute"/>
|
||||||
|
<ModifyContextMenu name="Modify"/>
|
||||||
|
<DeleteContextMenu name="Delete"/>
|
||||||
|
<ClearContextMenu name="Clear"/>
|
||||||
<MainCommandNames>
|
<MainCommandNames>
|
||||||
<Item id="41019" name="Open containing folder in Explorer"/>
|
<Item id="41019" name="Open containing folder in Explorer"/>
|
||||||
<Item id="41020" name="Open containing folder in Command Prompt"/>
|
<Item id="41020" name="Open containing folder in Command Prompt"/>
|
||||||
|
@ -547,6 +547,9 @@
|
|||||||
<SettingCategory name="Setting"/>
|
<SettingCategory name="Setting"/>
|
||||||
<ToolCategory name="Tool"/>
|
<ToolCategory name="Tool"/>
|
||||||
<ExecuteCategory name="Execute"/>
|
<ExecuteCategory name="Execute"/>
|
||||||
|
<ModifyContextMenu name="Modify"/>
|
||||||
|
<DeleteContextMenu name="Delete"/>
|
||||||
|
<ClearContextMenu name="Clear"/>
|
||||||
<MainCommandNames>
|
<MainCommandNames>
|
||||||
<Item id="41019" name="Open containing folder in Explorer"/>
|
<Item id="41019" name="Open containing folder in Explorer"/>
|
||||||
<Item id="41020" name="Open containing folder in Command Prompt"/>
|
<Item id="41020" name="Open containing folder in Command Prompt"/>
|
||||||
|
@ -287,7 +287,6 @@ void ShortcutMapper::fillOutBabyGrid()
|
|||||||
{
|
{
|
||||||
case STATE_MENU:
|
case STATE_MENU:
|
||||||
{
|
{
|
||||||
NativeLangSpeaker* nativeLangSpeaker = NppParameters::getInstance().getNativeLangSpeaker();
|
|
||||||
vector<CommandShortcut> & cshortcuts = nppParam.getUserShortcuts();
|
vector<CommandShortcut> & cshortcuts = nppParam.getUserShortcuts();
|
||||||
cs_index = 1;
|
cs_index = 1;
|
||||||
for (size_t i = 0; i < nbItems; ++i)
|
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())
|
if (!_rightClickMenu.isCreated())
|
||||||
{
|
{
|
||||||
vector<MenuItemUnit> itemUnitArray;
|
vector<MenuItemUnit> itemUnitArray;
|
||||||
itemUnitArray.push_back(MenuItemUnit(IDM_BABYGRID_MODIFY, TEXT("Modify")));
|
NativeLangSpeaker* nativeLangSpeaker = NppParameters::getInstance().getNativeLangSpeaker();
|
||||||
itemUnitArray.push_back(MenuItemUnit(IDM_BABYGRID_DELETE, TEXT("Delete")));
|
generic_string modifyStr = nativeLangSpeaker->getShortcutMapperLangStr("ModifyContextMenu", TEXT("Modify"));
|
||||||
itemUnitArray.push_back(MenuItemUnit(IDM_BABYGRID_CLEAR, TEXT("Clear")));
|
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);
|
_rightClickMenu.create(_hSelf, itemUnitArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user