mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
[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:
@@ -117,8 +117,8 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Resize_Pictures_Title" xml:space="preserve">
|
||||
<value>Resize pictures</value>
|
||||
<data name="ImageResizer_Context_Menu_Entry" xml:space="preserve">
|
||||
<value>Resize with Image Resizer</value>
|
||||
</data>
|
||||
<data name="ImageResizer_App_Name" xml:space="preserve">
|
||||
<value>Image Resizer</value>
|
||||
|
||||
@@ -51,10 +51,7 @@ public:
|
||||
// IExplorerCommand
|
||||
IFACEMETHODIMP GetTitle(_In_opt_ IShellItemArray* items, _Outptr_result_nullonfailure_ PWSTR* name)
|
||||
{
|
||||
wchar_t strResizePictures[64] = { 0 };
|
||||
LoadString(g_hInst, IDS_RESIZE_PICTURES_TITLE, strResizePictures, ARRAYSIZE(strResizePictures));
|
||||
|
||||
return SHStrDup(strResizePictures, name);
|
||||
return SHStrDup(context_menu_caption.c_str(), name);
|
||||
}
|
||||
|
||||
IFACEMETHODIMP GetIcon(_In_opt_ IShellItemArray*, _Outptr_result_nullonfailure_ PWSTR* icon)
|
||||
@@ -272,7 +269,7 @@ private:
|
||||
|
||||
std::thread create_pipe_thread;
|
||||
HANDLE hPipe = INVALID_HANDLE_VALUE;
|
||||
std::wstring app_name = L"ImageResizer";
|
||||
std::wstring context_menu_caption = GET_RESOURCE_STRING_FALLBACK(IDS_IMAGERESIZER_CONTEXT_MENU_ENTRY, L"Resize with Image Resizer");
|
||||
};
|
||||
|
||||
CoCreatableClass(ImageResizerContextMenuCommand)
|
||||
|
||||
Reference in New Issue
Block a user