mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-13 11:09:28 +08:00
Merge pull request #1106 from alekhyareddy28/locPowerRename
Localize PowerRename
This commit is contained in:
commit
ba1a681aab
@ -77,4 +77,4 @@ std::wstring get_resource_string(UINT resource_id, HINSTANCE instance, const wch
|
||||
// Requires that
|
||||
// extern "C" IMAGE_DOS_HEADER __ImageBase;
|
||||
// is added to the .cpp file.
|
||||
#define GET_RESOURCE_STRING(resource_id) get_resource_string(resource_id, reinterpret_cast<HINSTANCE>(&__ImageBase), L#resource_id)
|
||||
#define GET_RESOURCE_STRING(resource_id) get_resource_string(resource_id, reinterpret_cast<HINSTANCE>(&__ImageBase), L#resource_id)
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <PowerRenameItem.h>
|
||||
#include <PowerRenameManager.h>
|
||||
#include <trace.h>
|
||||
#include <common.h>
|
||||
#include <Helpers.h>
|
||||
#include <icon_helpers.h>
|
||||
#include <Settings.h>
|
||||
@ -20,6 +21,7 @@ struct InvokeStruct
|
||||
CPowerRenameMenu::CPowerRenameMenu()
|
||||
{
|
||||
ModuleAddRef();
|
||||
app_name = GET_RESOURCE_STRING(IDS_POWERRENAME);
|
||||
}
|
||||
|
||||
CPowerRenameMenu::~CPowerRenameMenu()
|
||||
@ -196,7 +198,7 @@ DWORD WINAPI CPowerRenameMenu::s_PowerRenameUIThreadProc(_In_ void* pData)
|
||||
|
||||
HRESULT __stdcall CPowerRenameMenu::GetTitle(IShellItemArray* /*psiItemArray*/, LPWSTR* ppszName)
|
||||
{
|
||||
return SHStrDup(L"PowerRename", ppszName);
|
||||
return SHStrDup(app_name.c_str(), ppszName);
|
||||
}
|
||||
|
||||
HRESULT __stdcall CPowerRenameMenu::GetIcon(IShellItemArray* /*psiItemArray*/, LPWSTR* ppszIcon)
|
||||
|
@ -71,4 +71,5 @@ private:
|
||||
std::atomic<long> m_refCount = 1;
|
||||
HBITMAP m_hbmpIcon = nullptr;
|
||||
CComPtr<IDataObject> m_spdo;
|
||||
std::wstring app_name;
|
||||
};
|
||||
|
@ -91,7 +91,14 @@
|
||||
|