mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 11:53:16 +00:00
[SHELL32] Add IDS_NEWITEMFORMAT and retry FCIDM_SHVIEW_NEW (#5412)
- FCIDM_SHVIEW_NEW resource string had some problems in localization and keyboard usability. - Add IDS_NEWITEMFORMAT resource string ("New %s") to format the new file item string. - Modify CNewMenu::NewItemByNonCommand for IDS_NEWITEMFORMAT. - FCIDM_SHVIEW_NEW is provided for [New] menu item, so it should have an ampersand. Add a comment for it and then retry the translation. CORE-18706
This commit is contained in:
parent
3da13042ea
commit
abf1934d92
38 changed files with 77 additions and 43 deletions
|
@ -518,17 +518,14 @@ HRESULT CNewMenu::NewItemByCommand(SHELLNEW_ITEM *pItem, LPCWSTR wszPath)
|
|||
HRESULT CNewMenu::NewItemByNonCommand(SHELLNEW_ITEM *pItem, LPWSTR wszName,
|
||||
DWORD cchNameMax, LPCWSTR wszPath)
|
||||
{
|
||||
WCHAR wszBuf[MAX_PATH];
|
||||
WCHAR wszNewFile[MAX_PATH];
|
||||
BOOL bSuccess = TRUE;
|
||||
|
||||
if (!LoadStringW(shell32_hInstance, FCIDM_SHVIEW_NEW, wszBuf, _countof(wszBuf)))
|
||||
return E_FAIL;
|
||||
|
||||
StringCchPrintfW(wszNewFile, _countof(wszNewFile), L"%s %s%s", wszBuf, pItem->pwszDesc, pItem->pwszExt);
|
||||
CStringW strNewItem;
|
||||
strNewItem.Format(IDS_NEWITEMFORMAT, pItem->pwszDesc);
|
||||
strNewItem += pItem->pwszExt;
|
||||
|
||||
/* Create the name of the new file */
|
||||
if (!PathYetAnotherMakeUniqueName(wszName, wszPath, NULL, wszNewFile))
|
||||
if (!PathYetAnotherMakeUniqueName(wszName, wszPath, NULL, strNewItem))
|
||||
return E_FAIL;
|
||||
|
||||
/* Create new file */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue