diff --git a/dlls/shlwapi/resource.h b/dlls/shlwapi/resource.h index bd59505a07b..c06dbf71a7c 100644 --- a/dlls/shlwapi/resource.h +++ b/dlls/shlwapi/resource.h @@ -20,6 +20,8 @@ #ifndef WINE_SHLWAPI_RESOURCE_H #define WINE_SHLWAPI_RESOURCE_H +#define IDS_BYTES_FORMAT 64 + /* These numbers match native ID's and shouldn't be abitrarily changed */ #define IDD_ERR_DIALOG 0x1200 #define IDS_ERR_USER_MSG 0x1201 diff --git a/dlls/shlwapi/shlwapi_De.rc b/dlls/shlwapi/shlwapi_De.rc index 05258d52137..1680b4aae72 100644 --- a/dlls/shlwapi/shlwapi_De.rc +++ b/dlls/shlwapi/shlwapi_De.rc @@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON L"&Ja" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON L"&Nein" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } + +STRINGTABLE DISCARDABLE +{ + IDS_BYTES_FORMAT "%ld bytes" +} diff --git a/dlls/shlwapi/shlwapi_En.rc b/dlls/shlwapi/shlwapi_En.rc index 7d0e95c89bb..a8d19806c3f 100644 --- a/dlls/shlwapi/shlwapi_En.rc +++ b/dlls/shlwapi/shlwapi_En.rc @@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON L"&Yes" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON L"&No" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } + +STRINGTABLE DISCARDABLE +{ + IDS_BYTES_FORMAT "%ld bytes" +} diff --git a/dlls/shlwapi/shlwapi_Eo.rc b/dlls/shlwapi/shlwapi_Eo.rc index af638210a99..dcbcdafe99b 100644 --- a/dlls/shlwapi/shlwapi_Eo.rc +++ b/dlls/shlwapi/shlwapi_Eo.rc @@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON L"&Jes" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON L"&Ne" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } + +STRINGTABLE DISCARDABLE +{ + IDS_BYTES_FORMAT "%ld bytes" +} diff --git a/dlls/shlwapi/shlwapi_Es.rc b/dlls/shlwapi/shlwapi_Es.rc index 469c08d7339..61782c9d00b 100644 --- a/dlls/shlwapi/shlwapi_Es.rc +++ b/dlls/shlwapi/shlwapi_Es.rc @@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON L"&Sí" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON L"&No" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } + +STRINGTABLE DISCARDABLE +{ + IDS_BYTES_FORMAT "%ld bytes" +} diff --git a/dlls/shlwapi/shlwapi_Fi.rc b/dlls/shlwapi/shlwapi_Fi.rc index 4b79e5c8e86..5ba5d3ce731 100644 --- a/dlls/shlwapi/shlwapi_Fi.rc +++ b/dlls/shlwapi/shlwapi_Fi.rc @@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON L"&Kyllä" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON L"&Ei" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } + +STRINGTABLE DISCARDABLE +{ + IDS_BYTES_FORMAT "%ld bytes" +} diff --git a/dlls/shlwapi/shlwapi_Fr.rc b/dlls/shlwapi/shlwapi_Fr.rc index f8be5e8d27c..e84403d10ea 100644 --- a/dlls/shlwapi/shlwapi_Fr.rc +++ b/dlls/shlwapi/shlwapi_Fr.rc @@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON L"&Oui" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON L"&Non" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } + +STRINGTABLE DISCARDABLE +{ + IDS_BYTES_FORMAT "%ld bytes" +} diff --git a/dlls/shlwapi/shlwapi_Hu.rc b/dlls/shlwapi/shlwapi_Hu.rc index 7c4e6ca6a4c..52efedc2f04 100644 --- a/dlls/shlwapi/shlwapi_Hu.rc +++ b/dlls/shlwapi/shlwapi_Hu.rc @@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON L"&Igen" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON L"&Nem" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } + +STRINGTABLE DISCARDABLE +{ + IDS_BYTES_FORMAT "%ld bytes" +} diff --git a/dlls/shlwapi/shlwapi_It.rc b/dlls/shlwapi/shlwapi_It.rc index a56f0483d17..cdb113e8cfd 100644 --- a/dlls/shlwapi/shlwapi_It.rc +++ b/dlls/shlwapi/shlwapi_It.rc @@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON L"&Si" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON L"&No" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } + +STRINGTABLE DISCARDABLE +{ + IDS_BYTES_FORMAT "%ld bytes" +} diff --git a/dlls/shlwapi/shlwapi_Ja.rc b/dlls/shlwapi/shlwapi_Ja.rc index e39ca766486..7ac8d412aed 100644 --- a/dlls/shlwapi/shlwapi_Ja.rc +++ b/dlls/shlwapi/shlwapi_Ja.rc @@ -33,3 +33,8 @@ FONT 9, "MS UI Gothic" PUSHBUTTON L"‚Í‚¢(&Y)" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON L"‚¢‚¢‚¦(&N)" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } + +STRINGTABLE DISCARDABLE +{ + IDS_BYTES_FORMAT "%ld bytes" +} diff --git a/dlls/shlwapi/shlwapi_Ko.rc b/dlls/shlwapi/shlwapi_Ko.rc index 7330724dfe2..92dab21a1d7 100644 --- a/dlls/shlwapi/shlwapi_Ko.rc +++ b/dlls/shlwapi/shlwapi_Ko.rc @@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON L"¿¹(&Y)" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON L"¾Æ´Ï¿À(&N)" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } + +STRINGTABLE DISCARDABLE +{ + IDS_BYTES_FORMAT "%ld bytes" +} diff --git a/dlls/shlwapi/shlwapi_Nl.rc b/dlls/shlwapi/shlwapi_Nl.rc index 11e424f3243..5d257800da9 100644 --- a/dlls/shlwapi/shlwapi_Nl.rc +++ b/dlls/shlwapi/shlwapi_Nl.rc @@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON L"&Ja" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON L"&Nee" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } + +STRINGTABLE DISCARDABLE +{ + IDS_BYTES_FORMAT "%ld bytes" +} diff --git a/dlls/shlwapi/shlwapi_No.rc b/dlls/shlwapi/shlwapi_No.rc index 435cfb57052..3ca08a3f821 100644 --- a/dlls/shlwapi/shlwapi_No.rc +++ b/dlls/shlwapi/shlwapi_No.rc @@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON L"&Ja" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON L"&Nei" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } + +STRINGTABLE DISCARDABLE +{ + IDS_BYTES_FORMAT "%ld bytes" +} diff --git a/dlls/shlwapi/shlwapi_Pt.rc b/dlls/shlwapi/shlwapi_Pt.rc index 64d28f38a9a..c0fb168df2d 100644 --- a/dlls/shlwapi/shlwapi_Pt.rc +++ b/dlls/shlwapi/shlwapi_Pt.rc @@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON L"&Sim" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON L"&Não" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } + +STRINGTABLE DISCARDABLE +{ + IDS_BYTES_FORMAT "%ld bytes" +} diff --git a/dlls/shlwapi/shlwapi_Tr.rc b/dlls/shlwapi/shlwapi_Tr.rc index 139b3b0ebf2..a55641b3a4a 100644 --- a/dlls/shlwapi/shlwapi_Tr.rc +++ b/dlls/shlwapi/shlwapi_Tr.rc @@ -33,3 +33,8 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON L"&Evet" IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP PUSHBUTTON L"&Hayýr" IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP } + +STRINGTABLE DISCARDABLE +{ + IDS_BYTES_FORMAT "%ld bytes" +} diff --git a/dlls/shlwapi/string.c b/dlls/shlwapi/string.c index b03bdfb051d..aafddd0f9ee 100644 --- a/dlls/shlwapi/string.c +++ b/dlls/shlwapi/string.c @@ -42,6 +42,8 @@ #include "wine/unicode.h" #include "wine/debug.h" +#include "resource.h" + WINE_DEFAULT_DEBUG_CHANNEL(shell); /* Get a function pointer from a DLL handle */ @@ -55,6 +57,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); } while (0) extern HMODULE SHLWAPI_hmlang; +extern HINSTANCE shlwapi_hInstance; typedef HRESULT (WINAPI *fnpConvertINetUnicodeToMultiByte)(LPDWORD,DWORD,LPCWSTR,LPINT,LPSTR,LPINT); static fnpConvertINetUnicodeToMultiByte pConvertINetUnicodeToMultiByte; @@ -2230,7 +2233,6 @@ typedef struct tagSHLWAPI_BYTEFORMATS */ LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax) { - static const WCHAR wszBytes[] = {'%','l','d',' ','b','y','t','e','s',0}; static const WCHAR wsz3_0[] = {'%','3','.','0','f',0}; static const WCHAR wsz3_1[] = {'%','3','.','1','f',0}; static const WCHAR wsz3_2[] = {'%','3','.','2','f',0}; @@ -2272,7 +2274,9 @@ LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax) if (llBytes < 1024) /* 1K */ { - snprintfW(lpszDest, cchMax, wszBytes, (long)llBytes); + WCHAR wszBytesFormat[64]; + LoadStringW(shlwapi_hInstance, IDS_BYTES_FORMAT, wszBytesFormat, 64); + snprintfW(lpszDest, cchMax, wszBytesFormat, (long)llBytes); return lpszDest; }