[ContextMenus]Update context menu labels and improve localization calls (#31000)

* Update file locksmith

* ImageResizer

* Update imageresizer context menu

* Changes

* [PowerRename]Don't use app name for context menu caption

* [ImageResizer]Apply string to old context menu too

* Add localization to the PowerRenameContextMenu project

* Show actual context menu string in PowerRename

* New Ids for the resource strings

* Add do not loc comments

* Add fallback and cache resource values

* Update src/modules/imageresizer/dll/ContextMenuHandler.cpp

Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>

* Remove do not loc comments from Image Resizer

---------

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>
This commit is contained in:
Niels Laute
2024-01-25 13:27:25 +01:00
committed by GitHub
parent 43aa80fb1e
commit fc214a80c5
18 changed files with 194 additions and 50 deletions

View File

@@ -16,8 +16,11 @@
#include <wrl/implements.h>
#include <wrl/client.h>
#include "Generated Files/resource.h"
#include <common/utils/elevation.h>
#include <common/utils/process_path.h>
#include <common/utils/resources.h>
#include <Helpers.h>
#include <Settings.h>
#include <trace.h>
@@ -60,7 +63,7 @@ public:
// IExplorerCommand
IFACEMETHODIMP GetTitle(_In_opt_ IShellItemArray* items, _Outptr_result_nullonfailure_ PWSTR* name)
{
return SHStrDup(app_name.c_str(), name);
return SHStrDup(context_menu_caption.c_str(), name);
}
IFACEMETHODIMP GetIcon(_In_opt_ IShellItemArray*, _Outptr_result_nullonfailure_ PWSTR* icon)
@@ -261,7 +264,7 @@ private:
std::thread create_pipe_thread;
HANDLE hPipe = INVALID_HANDLE_VALUE;
std::wstring app_name = L"PowerRename";
std::wstring context_menu_caption = GET_RESOURCE_STRING_FALLBACK(IDS_POWERRENAME_CONTEXT_MENU_ENTRY, L"Rename with PowerRename");
};
CoCreatableClass(PowerRenameContextMenuCommand)