translate start menu & desktop links

display 2nd stage install in system language
original patch by Pierre Schweitzer

svn path=/trunk/; revision=26582
This commit is contained in:
Sylvain Petreolle 2007-04-29 21:29:41 +00:00
parent b290654c00
commit ccc433f9a2
19 changed files with 734 additions and 468 deletions

View file

@ -890,6 +890,8 @@ SetThreadUILanguage@4
SetTimerQueueTimer@24
SetTimeZoneInformation@4
SetUnhandledExceptionFilter@4
SetUserDefaultLCID@4
SetUserDefaultUILanguage@4
SetUserGeoID@4
SetVDMCurrentDirectories@8
SetVolumeLabelA@8

View file

@ -1,4 +1,4 @@
<module name="kernel32_base" type="objectlibrary">
<module name="kernel32_base" type="objectlibrary" allowwarnings="true">
<include base="kernel32_base">.</include>
<include base="kernel32_base">include</include>
<include base="ReactOS">include/reactos/subsys</include>

View file

@ -1573,6 +1573,42 @@ BOOL WINAPI SetThreadLocale( LCID lcid )
}
/*
* @implemented
*/
BOOL STDCALL
SetUserDefaultLCID(LCID lcid)
{
NTSTATUS Status;
Status = NtSetDefaultLocale(TRUE, lcid);
if (!NT_SUCCESS(Status))
{
SetLastErrorByStatus(Status);
return 0;
}
return 1;
}
/*
* @implemented
*/
BOOL STDCALL
SetUserDefaultUILanguage(LANGID LangId)
{
NTSTATUS Status;
Status = NtSetDefaultUILanguage(LangId);
if (!NT_SUCCESS(Status))
{
SetLastErrorByStatus(Status);
return 0;
}
return 1;
}
/*
* @unimplemented
*/

View file

@ -49,6 +49,8 @@
#include "globals.h"
#include "resource.h"
#include <debug.h>
DWORD WINAPI
CMP_WaitNoPendingInstallEvents(DWORD dwTimeout);
@ -136,10 +138,11 @@ HRESULT CreateShellLink(LPCTSTR linkPath, LPCTSTR cmd, LPCTSTR arg, LPCTSTR dir,
static BOOL
CreateShortcut(int csidl, LPCTSTR folder, LPCTSTR linkName, LPCTSTR command, UINT nIdTitle)
CreateShortcut(int csidl, LPCTSTR folder, UINT nIdName, LPCTSTR command, UINT nIdTitle)
{
TCHAR path[MAX_PATH];
TCHAR title[256];
TCHAR name[256];
LPTSTR p = path;
if (!SHGetSpecialFolderPath(0, path, csidl, TRUE))
@ -152,7 +155,10 @@ CreateShortcut(int csidl, LPCTSTR folder, LPCTSTR linkName, LPCTSTR command, UIN
}
p = PathAddBackslash(p);
_tcscpy(p, linkName);
if(!LoadString(hDllInstance, nIdName, name, 256))
return FALSE;
_tcscpy(p, name);
if (!LoadString(hDllInstance, nIdTitle, title, 256))
return FALSE;
@ -524,50 +530,52 @@ InstallReactOS (HINSTANCE hInstance)
}
CoInitialize(NULL);
SetUserDefaultLCID(GetSystemDefaultLCID());
SetThreadLocale(GetSystemDefaultLCID());
/* create desktop shortcuts */
CreateShortcut(CSIDL_DESKTOP, NULL, _T("Command Prompt.lnk"), _T("cmd.exe"), IDS_CMT_CMD);
CreateShortcut(CSIDL_DESKTOP, NULL, IDS_SHORT_CMD, _T("cmd.exe"), IDS_CMT_CMD);
/* create program startmenu shortcuts */
CreateShortcut(CSIDL_PROGRAMS, NULL, _T("ReactOS Explorer.lnk"), _T("explorer.exe"), IDS_CMT_EXPLORER);
CreateShortcut(CSIDL_PROGRAMS, NULL, IDS_SHORT_EXPLORER, _T("explorer.exe"), IDS_CMT_EXPLORER);
/* workaround to stop empty links for trunk builds */
if(GetSystemDirectory(szBuffer, MAX_PATH))
{
_tcscpy(Path, szBuffer);
if((_taccess(_tcscat(Path, _T("\\downloader.exe")), 0 )) != -1)
CreateShortcut(CSIDL_PROGRAMS, NULL, _T("Download !.lnk"), _T("downloader.exe"), IDS_CMT_DOWNLOADER);
CreateShortcut(CSIDL_PROGRAMS, NULL, IDS_SHORT_DOWNLOADER, _T("downloader.exe"), IDS_CMT_DOWNLOADER);
_tcscpy(Path, szBuffer);
if((_taccess(_tcscat(Path, _T("\\getfirefox.exe")), 0 )) != -1)
CreateShortcut(CSIDL_PROGRAMS, NULL, _T("Get Firefox.lnk"), _T("getfirefox.exe"), IDS_CMT_GETFIREFOX);
CreateShortcut(CSIDL_PROGRAMS, NULL, IDS_SHORT_FIREFOX, _T("getfirefox.exe"), IDS_CMT_GETFIREFOX);
}
/* create administritive tools startmenu shortcuts */
CreateShortcut(CSIDL_COMMON_ADMINTOOLS, NULL, _T("Service Manager.lnk"), _T("servman.exe"), IDS_CMT_SERVMAN);
CreateShortcut(CSIDL_COMMON_ADMINTOOLS, NULL, _T("Device Manager.lnk"), _T("devmgmt.exe"), IDS_CMT_DEVMGMT);
CreateShortcut(CSIDL_COMMON_ADMINTOOLS, NULL, IDS_SHORT_SERVICE, _T("servman.exe"), IDS_CMT_SERVMAN);
CreateShortcut(CSIDL_COMMON_ADMINTOOLS, NULL, IDS_SHORT_DEVICE, _T("devmgmt.exe"), IDS_CMT_DEVMGMT);
/* create and fill Accessories subfolder */
if (CreateShortcutFolder(CSIDL_PROGRAMS, IDS_ACCESSORIES, sAccessories, 256))
{
CreateShortcut(CSIDL_PROGRAMS, sAccessories, _T("Calculator.lnk"), _T("calc.exe"), IDS_CMT_CALC);
CreateShortcut(CSIDL_PROGRAMS, sAccessories, _T("Command Prompt.lnk"), _T("cmd.exe"), IDS_CMT_CMD);
CreateShortcut(CSIDL_PROGRAMS, sAccessories, _T("Notepad.lnk"), _T("notepad.exe"), IDS_CMT_NOTEPAD);
CreateShortcut(CSIDL_PROGRAMS, sAccessories, _T("Regedit.lnk"), _T("regedit.exe"), IDS_CMT_REGEDIT);
CreateShortcut(CSIDL_PROGRAMS, sAccessories, _T("WordPad.lnk"), _T("wordpad.exe"), IDS_CMT_WORDPAD);
CreateShortcut(CSIDL_PROGRAMS, sAccessories, IDS_SHORT_CALC, _T("calc.exe"), IDS_CMT_CALC);
CreateShortcut(CSIDL_PROGRAMS, sAccessories, IDS_SHORT_CMD, _T("cmd.exe"), IDS_CMT_CMD);
CreateShortcut(CSIDL_PROGRAMS, sAccessories, IDS_SHORT_NOTEPAD, _T("notepad.exe"), IDS_CMT_NOTEPAD);
CreateShortcut(CSIDL_PROGRAMS, sAccessories, IDS_SHORT_REGEDIT, _T("regedit.exe"), IDS_CMT_REGEDIT);
CreateShortcut(CSIDL_PROGRAMS, sAccessories, IDS_SHORT_WORDPAD, _T("wordpad.exe"), IDS_CMT_WORDPAD);
if(GetSystemDirectory(szBuffer, MAX_PATH))
{
_tcscpy(Path, szBuffer);
if((_taccess(_tcscat(Path, _T("\\screenshot.exe")), 0 )) != -1)
CreateShortcut(CSIDL_PROGRAMS, sAccessories, _T("SnapShot.lnk"), _T("screenshot.exe"), IDS_CMT_SCREENSHOT);
CreateShortcut(CSIDL_PROGRAMS, sAccessories, IDS_SHORT_SNAP, _T("screenshot.exe"), IDS_CMT_SCREENSHOT);
}
}
/* create Games subfolder and fill if the exe is available */
if (CreateShortcutFolder(CSIDL_PROGRAMS, IDS_GAMES, sGames, 256))
{
CreateShortcut(CSIDL_PROGRAMS, sGames, _T("Solitaire.lnk"), _T("sol.exe"), IDS_CMT_SOLITAIRE);
CreateShortcut(CSIDL_PROGRAMS, sGames, _T("WineMine.lnk"), _T("winemine.exe"), IDS_CMT_WINEMINE);
CreateShortcut(CSIDL_PROGRAMS, sGames, IDS_SHORT_SOLITAIRE, _T("sol.exe"), IDS_CMT_SOLITAIRE);
CreateShortcut(CSIDL_PROGRAMS, sGames, IDS_SHORT_WINEMINE, _T("winemine.exe"), IDS_CMT_WINEMINE);
}
CoUninitialize();

View file

@ -194,4 +194,20 @@ BEGIN
IDS_CMT_WINEMINE "WineMine"
END
STRINGTABLE
BEGIN
IDS_SHORT_CMD "Command Prompt.lnk"
IDS_SHORT_EXPLORER "ReactOS Explorer.lnk"
IDS_SHORT_DOWNLOADER "Download !.lnk"
IDS_SHORT_FIREFOX "Get Firefox.lnk"
IDS_SHORT_SERVICE "Service Manager.lnk"
IDS_SHORT_DEVICE "Device Manager.lnk"
IDS_SHORT_CALC "Calculator.lnk"
IDS_SHORT_REGEDIT "Regedit.lnk"
IDS_SHORT_NOTEPAD "Notepad.lnk"
IDS_SHORT_WORDPAD "WordPad.lnk"
IDS_SHORT_SNAP "SnapShot.lnk"
IDS_SHORT_SOLITAIRE "Solitaire.lnk"
IDS_SHORT_WINEMINE "WineMine.lnk"
END
/* EOF */

View file

@ -219,4 +219,20 @@ BEGIN
IDS_REASON_UNKNOWN "Grund unbekannt"
END
STRINGTABLE
BEGIN
IDS_SHORT_CMD "Command Prompt.lnk"
IDS_SHORT_EXPLORER "ReactOS Explorer.lnk"
IDS_SHORT_DOWNLOADER "Download !.lnk"
IDS_SHORT_FIREFOX "Get Firefox.lnk"
IDS_SHORT_SERVICE "Service Manager.lnk"
IDS_SHORT_DEVICE "Device Manager.lnk"
IDS_SHORT_CALC "Calculator.lnk"
IDS_SHORT_REGEDIT "Regedit.lnk"
IDS_SHORT_NOTEPAD "Notepad.lnk"
IDS_SHORT_WORDPAD "WordPad.lnk"
IDS_SHORT_SNAP "SnapShot.lnk"
IDS_SHORT_SOLITAIRE "Solitaire.lnk"
IDS_SHORT_WINEMINE "WineMine.lnk"
END
/* EOF */

View file

@ -220,4 +220,20 @@ BEGIN
IDS_REASON_UNKNOWN ""
END
STRINGTABLE
BEGIN
IDS_SHORT_CMD "Command Prompt.lnk"
IDS_SHORT_EXPLORER "ReactOS Explorer.lnk"
IDS_SHORT_DOWNLOADER "Download !.lnk"
IDS_SHORT_FIREFOX "Get Firefox.lnk"
IDS_SHORT_SERVICE "Service Manager.lnk"
IDS_SHORT_DEVICE "Device Manager.lnk"
IDS_SHORT_CALC "Calculator.lnk"
IDS_SHORT_REGEDIT "Regedit.lnk"
IDS_SHORT_NOTEPAD "Notepad.lnk"
IDS_SHORT_WORDPAD "WordPad.lnk"
IDS_SHORT_SNAP "SnapShot.lnk"
IDS_SHORT_SOLITAIRE "Solitaire.lnk"
IDS_SHORT_WINEMINE "WineMine.lnk"
END
/* EOF */

View file

@ -200,4 +200,20 @@ BEGIN
IDS_PROCESSSUBTITLE "Process page subtitle"
END
STRINGTABLE
BEGIN
IDS_SHORT_CMD "Command Prompt.lnk"
IDS_SHORT_EXPLORER "ReactOS Explorer.lnk"
IDS_SHORT_DOWNLOADER "Download !.lnk"
IDS_SHORT_FIREFOX "Get Firefox.lnk"
IDS_SHORT_SERVICE "Service Manager.lnk"
IDS_SHORT_DEVICE "Device Manager.lnk"
IDS_SHORT_CALC "Calculator.lnk"
IDS_SHORT_REGEDIT "Regedit.lnk"
IDS_SHORT_NOTEPAD "Notepad.lnk"
IDS_SHORT_WORDPAD "WordPad.lnk"
IDS_SHORT_SNAP "SnapShot.lnk"
IDS_SHORT_SOLITAIRE "Solitaire.lnk"
IDS_SHORT_WINEMINE "WineMine.lnk"
END
/* EOF */

View file

@ -18,7 +18,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
IDD_WELCOMEPAGE DIALOG DISCARDABLE 0, 0, 317, 193
@ -220,4 +220,20 @@ BEGIN
IDS_REASON_UNKNOWN ""
END
STRINGTABLE
BEGIN
IDS_SHORT_CMD "Invite de commandes.lnk"
IDS_SHORT_EXPLORER "Explorateur ReactOS.lnk"
IDS_SHORT_DOWNLOADER "Télécharger !.lnk"
IDS_SHORT_FIREFOX "Rélécharger FireFox.lnk"
IDS_SHORT_SERVICE "Gestionnaire de services.lnk"
IDS_SHORT_DEVICE "Gestionnaire de périphériques.lnk"
IDS_SHORT_CALC "Calculatrice.lnk"
IDS_SHORT_REGEDIT "Regedit.lnk"
IDS_SHORT_NOTEPAD "Notepad.lnk"
IDS_SHORT_WORDPAD "WordPad.lnk"
IDS_SHORT_SNAP "Capture d'écran.lnk"
IDS_SHORT_SOLITAIRE "Solitaire.lnk"
IDS_SHORT_WINEMINE "WineMine.lnk"
END
/* EOF */

View file

@ -227,4 +227,20 @@ BEGIN
IDS_REASON_UNKNOWN ""
END
STRINGTABLE
BEGIN
IDS_SHORT_CMD "Command Prompt.lnk"
IDS_SHORT_EXPLORER "ReactOS Explorer.lnk"
IDS_SHORT_DOWNLOADER "Download !.lnk"
IDS_SHORT_FIREFOX "Get Firefox.lnk"
IDS_SHORT_SERVICE "Service Manager.lnk"
IDS_SHORT_DEVICE "Device Manager.lnk"
IDS_SHORT_CALC "Calculator.lnk"
IDS_SHORT_REGEDIT "Regedit.lnk"
IDS_SHORT_NOTEPAD "Notepad.lnk"
IDS_SHORT_WORDPAD "WordPad.lnk"
IDS_SHORT_SNAP "SnapShot.lnk"
IDS_SHORT_SOLITAIRE "Solitaire.lnk"
IDS_SHORT_WINEMINE "WineMine.lnk"
END
/* EOF */

View file

@ -218,4 +218,20 @@ BEGIN
IDS_REASON_UNKNOWN ""
END
STRINGTABLE
BEGIN
IDS_SHORT_CMD "Command Prompt.lnk"
IDS_SHORT_EXPLORER "ReactOS Explorer.lnk"
IDS_SHORT_DOWNLOADER "Download !.lnk"
IDS_SHORT_FIREFOX "Get Firefox.lnk"
IDS_SHORT_SERVICE "Service Manager.lnk"
IDS_SHORT_DEVICE "Device Manager.lnk"
IDS_SHORT_CALC "Calculator.lnk"
IDS_SHORT_REGEDIT "Regedit.lnk"
IDS_SHORT_NOTEPAD "Notepad.lnk"
IDS_SHORT_WORDPAD "WordPad.lnk"
IDS_SHORT_SNAP "SnapShot.lnk"
IDS_SHORT_SOLITAIRE "Solitaire.lnk"
IDS_SHORT_WINEMINE "WineMine.lnk"
END
/* EOF */

View file

@ -211,4 +211,20 @@ IDS_REACTOS_SETUP "Installazione di ReactOS"
IDS_REASON_UNKNOWN ""
END
STRINGTABLE
BEGIN
IDS_SHORT_CMD "Command Prompt.lnk"
IDS_SHORT_EXPLORER "ReactOS Explorer.lnk"
IDS_SHORT_DOWNLOADER "Download !.lnk"
IDS_SHORT_FIREFOX "Get Firefox.lnk"
IDS_SHORT_SERVICE "Service Manager.lnk"
IDS_SHORT_DEVICE "Device Manager.lnk"
IDS_SHORT_CALC "Calculator.lnk"
IDS_SHORT_REGEDIT "Regedit.lnk"
IDS_SHORT_NOTEPAD "Notepad.lnk"
IDS_SHORT_WORDPAD "WordPad.lnk"
IDS_SHORT_SNAP "SnapShot.lnk"
IDS_SHORT_SOLITAIRE "Solitaire.lnk"
IDS_SHORT_WINEMINE "WineMine.lnk"
END
/* EOF */

View file

@ -198,4 +198,20 @@ BEGIN
IDS_CMT_WINEMINE "WineMine"
END
STRINGTABLE
BEGIN
IDS_SHORT_CMD "Command Prompt.lnk"
IDS_SHORT_EXPLORER "ReactOS Explorer.lnk"
IDS_SHORT_DOWNLOADER "Download !.lnk"
IDS_SHORT_FIREFOX "Get Firefox.lnk"
IDS_SHORT_SERVICE "Service Manager.lnk"
IDS_SHORT_DEVICE "Device Manager.lnk"
IDS_SHORT_CALC "Calculator.lnk"
IDS_SHORT_REGEDIT "Regedit.lnk"
IDS_SHORT_NOTEPAD "Notepad.lnk"
IDS_SHORT_WORDPAD "WordPad.lnk"
IDS_SHORT_SNAP "SnapShot.lnk"
IDS_SHORT_SOLITAIRE "Solitaire.lnk"
IDS_SHORT_WINEMINE "WineMine.lnk"
END
/* EOF */

View file

@ -222,4 +222,20 @@ BEGIN
IDS_REASON_UNKNOWN ""
END
STRINGTABLE
BEGIN
IDS_SHORT_CMD "Command Prompt.lnk"
IDS_SHORT_EXPLORER "ReactOS Explorer.lnk"
IDS_SHORT_DOWNLOADER "Download !.lnk"
IDS_SHORT_FIREFOX "Get Firefox.lnk"
IDS_SHORT_SERVICE "Service Manager.lnk"
IDS_SHORT_DEVICE "Device Manager.lnk"
IDS_SHORT_CALC "Calculator.lnk"
IDS_SHORT_REGEDIT "Regedit.lnk"
IDS_SHORT_NOTEPAD "Notepad.lnk"
IDS_SHORT_WORDPAD "WordPad.lnk"
IDS_SHORT_SNAP "SnapShot.lnk"
IDS_SHORT_SOLITAIRE "Solitaire.lnk"
IDS_SHORT_WINEMINE "WineMine.lnk"
END
/* EOF */

View file

@ -198,4 +198,20 @@ BEGIN
IDS_CMT_WINEMINE "WineMine"
END
STRINGTABLE
BEGIN
IDS_SHORT_CMD "Command Prompt.lnk"
IDS_SHORT_EXPLORER "ReactOS Explorer.lnk"
IDS_SHORT_DOWNLOADER "Download !.lnk"
IDS_SHORT_FIREFOX "Get Firefox.lnk"
IDS_SHORT_SERVICE "Service Manager.lnk"
IDS_SHORT_DEVICE "Device Manager.lnk"
IDS_SHORT_CALC "Calculator.lnk"
IDS_SHORT_REGEDIT "Regedit.lnk"
IDS_SHORT_NOTEPAD "Notepad.lnk"
IDS_SHORT_WORDPAD "WordPad.lnk"
IDS_SHORT_SNAP "SnapShot.lnk"
IDS_SHORT_SOLITAIRE "Solitaire.lnk"
IDS_SHORT_WINEMINE "WineMine.lnk"
END
/* EOF */

View file

@ -223,4 +223,20 @@ BEGIN
IDS_REASON_UNKNOWN ""
END
STRINGTABLE
BEGIN
IDS_SHORT_CMD "Command Prompt.lnk"
IDS_SHORT_EXPLORER "ReactOS Explorer.lnk"
IDS_SHORT_DOWNLOADER "Download !.lnk"
IDS_SHORT_FIREFOX "Get Firefox.lnk"
IDS_SHORT_SERVICE "Service Manager.lnk"
IDS_SHORT_DEVICE "Device Manager.lnk"
IDS_SHORT_CALC "Calculator.lnk"
IDS_SHORT_REGEDIT "Regedit.lnk"
IDS_SHORT_NOTEPAD "Notepad.lnk"
IDS_SHORT_WORDPAD "WordPad.lnk"
IDS_SHORT_SNAP "SnapShot.lnk"
IDS_SHORT_SOLITAIRE "Solitaire.lnk"
IDS_SHORT_WINEMINE "WineMine.lnk"
END
/* EOF */

View file

@ -208,4 +208,20 @@ BEGIN
IDS_REASON_UNKNOWN ""
END
STRINGTABLE
BEGIN
IDS_SHORT_CMD "Command Prompt.lnk"
IDS_SHORT_EXPLORER "ReactOS Explorer.lnk"
IDS_SHORT_DOWNLOADER "Download !.lnk"
IDS_SHORT_FIREFOX "Get Firefox.lnk"
IDS_SHORT_SERVICE "Service Manager.lnk"
IDS_SHORT_DEVICE "Device Manager.lnk"
IDS_SHORT_CALC "Calculator.lnk"
IDS_SHORT_REGEDIT "Regedit.lnk"
IDS_SHORT_NOTEPAD "Notepad.lnk"
IDS_SHORT_WORDPAD "WordPad.lnk"
IDS_SHORT_SNAP "SnapShot.lnk"
IDS_SHORT_SOLITAIRE "Solitaire.lnk"
IDS_SHORT_WINEMINE "WineMine.lnk"
END
/* EOF */

View file

@ -113,6 +113,20 @@
#define IDS_TIMEOUT 3307
#define IDS_REASON_UNKNOWN 3308
#define IDS_SHORT_CMD 3400
#define IDS_SHORT_EXPLORER 3401
#define IDS_SHORT_DOWNLOADER 3402
#define IDS_SHORT_FIREFOX 3403
#define IDS_SHORT_SERVICE 3404
#define IDS_SHORT_DEVICE 3405
#define IDS_SHORT_CALC 3406
#define IDS_SHORT_REGEDIT 3407
#define IDS_SHORT_NOTEPAD 3408
#define IDS_SHORT_WORDPAD 3409
#define IDS_SHORT_SNAP 3410
#define IDS_SHORT_SOLITAIRE 3411
#define IDS_SHORT_WINEMINE 3412
#define IDR_GPL 4000
#endif /* RESOURCE_H */

View file

@ -1,9 +1,7 @@
<module name="syssetup" type="win32dll" baseaddress="${BASEADDRESS_SYSSETUP}" installbase="system32" installname="syssetup.dll">
<module name="syssetup" type="win32dll" baseaddress="${BASEADDRESS_SYSSETUP}" installbase="system32" installname="syssetup.dll" unicode="yes" allowwarnings="true">
<importlibrary definition="syssetup.def" />
<include base="syssetup">.</include>
<define name="__USE_W32API" />
<define name="UNICODE" />
<define name="_UNICODE" />
<define name="_WIN32_IE">0x0600</define>
<define name="_WIN32_WINNT">0x0501</define>
<define name="_SETUPAPI_VER">0x0501</define>