[SHELLFIND] Localize column names
authorBrock Mammen <brockmammen@gmail.com>
Sat, 24 Aug 2019 17:32:45 +0000 (12:32 -0500)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Sun, 15 Sep 2019 16:46:36 +0000 (19:46 +0300)
dll/win32/browseui/lang/en-US.rc
dll/win32/browseui/shellfind/CFindFolder.cpp

index f541cfa..b2e4063 100644 (file)
@@ -345,4 +345,8 @@ BEGIN
     IDS_SEARCHINVALID "'%1' is not a valid folder."
     IDS_SEARCH_FOLDER "Searching %s"
     IDS_SEARCH_FILES_FOUND "%u files found"
     IDS_SEARCHINVALID "'%1' is not a valid folder."
     IDS_SEARCH_FOLDER "Searching %s"
     IDS_SEARCH_FILES_FOUND "%u files found"
+    IDS_SEARCH_OPEN_FOLDER "Open Containing &Folder"
+    IDS_COL_NAME "Name"
+    IDS_COL_LOCATION "In Folder"
+    IDS_COL_RELEVANCE "Relevance"
 END
 END
index 357a1f0..0d111c6 100644 (file)
@@ -20,7 +20,7 @@ SHOpenFolderAndSelectItems(LPITEMIDLIST pidlFolder,
 
 struct FolderViewColumns
 {
 
 struct FolderViewColumns
 {
-    LPCWSTR wzColumnName;
+    int iResource;
     DWORD dwDefaultState;
     int fmt;
     int cxChar;
     DWORD dwDefaultState;
     int fmt;
     int cxChar;
@@ -28,9 +28,9 @@ struct FolderViewColumns
 
 static FolderViewColumns g_ColumnDefs[] =
 {
 
 static FolderViewColumns g_ColumnDefs[] =
 {
-    {L"Name",      SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 30},
-    {L"In Folder", SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 30},
-    {L"Relevance", SHCOLSTATE_TYPE_STR,                          LVCFMT_LEFT, 0}
+    {IDS_COL_NAME,      SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 30},
+    {IDS_COL_LOCATION,  SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_LEFT, 30},
+    {IDS_COL_RELEVANCE, SHCOLSTATE_TYPE_STR,                          LVCFMT_LEFT, 0}
 };
 
 CFindFolder::CFindFolder() :
 };
 
 CFindFolder::CFindFolder() :
@@ -366,7 +366,7 @@ STDMETHODIMP CFindFolder::GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELL
     pDetails->fmt = g_ColumnDefs[iColumn].fmt;
 
     if (!pidl)
     pDetails->fmt = g_ColumnDefs[iColumn].fmt;
 
     if (!pidl)
-        return SHSetStrRet(&pDetails->str, g_ColumnDefs[iColumn].wzColumnName);
+        return SHSetStrRet(&pDetails->str, _AtlBaseModule.GetResourceInstance(), g_ColumnDefs[iColumn].iResource);
 
     if (iColumn == 1)
     {
 
     if (iColumn == 1)
     {
@@ -550,7 +550,7 @@ STDMETHODIMP CFindFolder::CallBack(IShellFolder *psf, HWND hwndOwner, IDataObjec
         {
             QCMINFO *pqcminfo = (QCMINFO *) lParam;
             _InsertMenuItemW(pqcminfo->hmenu, pqcminfo->indexMenu++, TRUE, pqcminfo->idCmdFirst++, MFT_SEPARATOR, NULL, 0);
         {
             QCMINFO *pqcminfo = (QCMINFO *) lParam;
             _InsertMenuItemW(pqcminfo->hmenu, pqcminfo->indexMenu++, TRUE, pqcminfo->idCmdFirst++, MFT_SEPARATOR, NULL, 0);
-            _InsertMenuItemW(pqcminfo->hmenu, pqcminfo->indexMenu++, TRUE, pqcminfo->idCmdFirst++, MFT_STRING, L"Open Containing Folder", MFS_ENABLED);
+            _InsertMenuItemW(pqcminfo->hmenu, pqcminfo->indexMenu++, TRUE, pqcminfo->idCmdFirst++, MFT_STRING, MAKEINTRESOURCEW(IDS_SEARCH_OPEN_FOLDER), MFS_ENABLED);
             _InsertMenuItemW(pqcminfo->hmenu, pqcminfo->indexMenu++, TRUE, pqcminfo->idCmdFirst++, MFT_SEPARATOR, NULL, 0);
             return S_OK;
         }
             _InsertMenuItemW(pqcminfo->hmenu, pqcminfo->indexMenu++, TRUE, pqcminfo->idCmdFirst++, MFT_SEPARATOR, NULL, 0);
             return S_OK;
         }