Author: dchapyshev
Date: Mon Apr 28 09:04:22 2008
New Revision: 33175
URL:
http://svn.reactos.org/svn/reactos?rev=33175&view=rev
Log:
- Add support second keyboard layout
- Update all translations
Modified:
trunk/reactos/base/setup/usetup/errorcode.h
trunk/reactos/base/setup/usetup/interface/usetup.c
trunk/reactos/base/setup/usetup/lang/bg-BG.h
trunk/reactos/base/setup/usetup/lang/cs-CZ.h
trunk/reactos/base/setup/usetup/lang/de-DE.h
trunk/reactos/base/setup/usetup/lang/el-GR.h
trunk/reactos/base/setup/usetup/lang/en-US.h
trunk/reactos/base/setup/usetup/lang/es-ES.h
trunk/reactos/base/setup/usetup/lang/fr-FR.h
trunk/reactos/base/setup/usetup/lang/it-IT.h
trunk/reactos/base/setup/usetup/lang/lt-LT.h
trunk/reactos/base/setup/usetup/lang/pl-PL.h
trunk/reactos/base/setup/usetup/lang/ru-RU.h
trunk/reactos/base/setup/usetup/lang/sk-SK.h
trunk/reactos/base/setup/usetup/lang/sv-SE.h
trunk/reactos/base/setup/usetup/lang/uk-UA.h
trunk/reactos/base/setup/usetup/mui.c
trunk/reactos/base/setup/usetup/mui.h
trunk/reactos/base/setup/usetup/settings.c
Modified: trunk/reactos/base/setup/usetup/errorcode.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/errorcod…
==============================================================================
--- trunk/reactos/base/setup/usetup/errorcode.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/errorcode.h [iso-8859-1] Mon Apr 28 09:04:22 2008
@@ -64,6 +64,7 @@
ERROR_WRITE_PTABLE,
ERROR_ADDING_CODEPAGE,
ERROR_UPDATE_LOCALESETTINGS,
+ ERROR_ADDING_KBLAYOUTS,
ERROR_LAST_ERROR_CODE
}ERROR_NUMBER;
Modified: trunk/reactos/base/setup/usetup/interface/usetup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/interfac…
==============================================================================
--- trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] Mon Apr 28 09:04:22
2008
@@ -3188,6 +3188,14 @@
return QUIT_PAGE;
}
+ /* Add keyboard layouts */
+ CONSOLE_SetStatusText(MUIGetString(STRING_ADDKBLAYOUTS));
+ if (!AddKeyboardLayouts())
+ {
+ MUIDisplayError(ERROR_ADDING_KBLAYOUTS, Ir, POPUP_WAIT_ENTER);
+ return QUIT_PAGE;
+ }
+
/* Update keyboard layout settings */
CONSOLE_SetStatusText(MUIGetString(STRING_KEYBOARDSETTINGSUPDATE));
if (!ProcessKeyboardLayoutRegistry(LayoutList))
Modified: trunk/reactos/base/setup/usetup/lang/bg-BG.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/bg-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/bg-BG.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/bg-BG.h [iso-8859-1] Mon Apr 28 09:04:22 2008
@@ -1469,6 +1469,11 @@
//ERROR_UPDATE_LOCALESETTINGS,
"¥ãá¯¥è® ãáâ ®¢ï¢ ¥ ¬¥áâ¨â¥ áâனª¨.\n"
"ENTER = १ ¯ã᪠¥ ª®¬¯îâêà "
+ },
+ {
+ //ERROR_ADDING_KBLAYOUTS,
+ "Setup failed to add keyboard layouts to registry.\n"
+ "ENTER = Reboot computer"
},
{
NULL,
@@ -1689,6 +1694,8 @@
""},
{STRING_GB,
""},
+ {STRING_ADDKBLAYOUTS,
+ "Adding keyboard layouts"},
{0, 0}
};
Modified: trunk/reactos/base/setup/usetup/lang/cs-CZ.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/cs-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/cs-CZ.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/cs-CZ.h [iso-8859-1] Mon Apr 28 09:04:22 2008
@@ -1466,6 +1466,11 @@
//ERROR_UPDATE_LOCALESETTINGS,
"Nepodaýilo se nastavit m¡stn¡ nastaven¡.\n"
"ENTER = Restartovat po¡ta"
+ },
+ {
+ //ERROR_ADDING_KBLAYOUTS,
+ "Setup failed to add keyboard layouts to registry.\n"
+ "ENTER = Reboot computer"
},
{
NULL,
@@ -1686,6 +1691,8 @@
"MB"},
{STRING_GB,
"GB"},
+ {STRING_ADDKBLAYOUTS,
+ "Adding keyboard layouts"},
{0, 0}
};
Modified: trunk/reactos/base/setup/usetup/lang/de-DE.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/de-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/de-DE.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/de-DE.h [iso-8859-1] Mon Apr 28 09:04:22 2008
@@ -1460,6 +1460,11 @@
//ERROR_UPDATE_LOCALESETTINGS,
"Setup konnte die Systemsprache nicht einstellen.\n"
"ENTER = Computer neustarten"
+ },
+ {
+ //ERROR_ADDING_KBLAYOUTS,
+ "Setup failed to add keyboard layouts to registry.\n"
+ "ENTER = Reboot computer"
},
{
NULL,
@@ -1680,6 +1685,8 @@
"MB"},
{STRING_GB,
"GB"},
+ {STRING_ADDKBLAYOUTS,
+ "Adding keyboard layouts"},
{0, 0}
};
Modified: trunk/reactos/base/setup/usetup/lang/el-GR.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/el-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/el-GR.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/el-GR.h [iso-8859-1] Mon Apr 28 09:04:22 2008
@@ -1459,6 +1459,11 @@
{
//ERROR_UPDATE_LOCALESETTINGS,
"Setup could not set the system locale.\n"
+ "ENTER = Reboot computer"
+ },
+ {
+ //ERROR_ADDING_KBLAYOUTS,
+ "Setup failed to add keyboard layouts to registry.\n"
"ENTER = Reboot computer"
},
{
@@ -1680,6 +1685,8 @@
"MB"},
{STRING_GB,
"GB"},
+ {STRING_ADDKBLAYOUTS,
+ "Adding keyboard layouts"},
{0, 0}
};
Modified: trunk/reactos/base/setup/usetup/lang/en-US.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/en-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/en-US.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/en-US.h [iso-8859-1] Mon Apr 28 09:04:22 2008
@@ -1459,6 +1459,11 @@
{
//ERROR_UPDATE_LOCALESETTINGS,
"Setup could not set the system locale.\n"
+ "ENTER = Reboot computer"
+ },
+ {
+ //ERROR_ADDING_KBLAYOUTS,
+ "Setup failed to add keyboard layouts to registry.\n"
"ENTER = Reboot computer"
},
{
@@ -1680,6 +1685,8 @@
"MB"},
{STRING_GB,
"GB"},
+ {STRING_ADDKBLAYOUTS,
+ "Adding keyboard layouts"},
{0, 0}
};
Modified: trunk/reactos/base/setup/usetup/lang/es-ES.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/es-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/es-ES.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/es-ES.h [iso-8859-1] Mon Apr 28 09:04:22 2008
@@ -1460,6 +1460,11 @@
//ERROR_UPDATE_LOCALESETTINGS,
"El instalador no pudo configurar el idioma del sistema.\n"
"ENTER = Reiniciar el equipo"
+ },
+ {
+ //ERROR_ADDING_KBLAYOUTS,
+ "Setup failed to add keyboard layouts to registry.\n"
+ "ENTER = Reboot computer"
},
{
NULL,
@@ -1679,6 +1684,8 @@
"MB"},
{STRING_GB,
"GB"},
+ {STRING_ADDKBLAYOUTS,
+ "Adding keyboard layouts"},
{0, 0}
};
Modified: trunk/reactos/base/setup/usetup/lang/fr-FR.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/fr-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/fr-FR.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/fr-FR.h [iso-8859-1] Mon Apr 28 09:04:22 2008
@@ -1472,6 +1472,11 @@
//ERROR_UPDATE_LOCALESETTINGS,
"Setup n'a pu changer la langue systme.\n"
"ENTER = Redmarrer l'ordinateur"
+ },
+ {
+ //ERROR_ADDING_KBLAYOUTS,
+ "Setup failed to add keyboard layouts to registry.\n"
+ "ENTER = Reboot computer"
},
{
NULL,
@@ -1692,6 +1697,8 @@
"Mo"},
{STRING_GB,
"Go"},
+ {STRING_ADDKBLAYOUTS,
+ "Adding keyboard layouts"},
{0, 0}
};
Modified: trunk/reactos/base/setup/usetup/lang/it-IT.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/it-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/it-IT.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/it-IT.h [iso-8859-1] Mon Apr 28 09:04:22 2008
@@ -1460,6 +1460,11 @@
//ERROR_UPDATE_LOCALESETTINGS,
"Setup non ha potuto impostare la regionalizzazione del sistema.\n"
"INVIO = Riavviare il computer"
+ },
+ {
+ //ERROR_ADDING_KBLAYOUTS,
+ "Setup failed to add keyboard layouts to registry.\n"
+ "ENTER = Reboot computer"
},
{
NULL,
@@ -1680,6 +1685,8 @@
"MB"},
{STRING_GB,
"GB"},
+ {STRING_ADDKBLAYOUTS,
+ "Adding keyboard layouts"},
{0, 0}
};
Modified: trunk/reactos/base/setup/usetup/lang/lt-LT.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/lt-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/lt-LT.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/lt-LT.h [iso-8859-1] Mon Apr 28 09:04:22 2008
@@ -1468,6 +1468,11 @@
{
//ERROR_UPDATE_LOCALESETTINGS,
"Setup could not set the system locale.\n"
+ "ENTER = Reboot computer"
+ },
+ {
+ //ERROR_ADDING_KBLAYOUTS,
+ "Setup failed to add keyboard layouts to registry.\n"
"ENTER = Reboot computer"
},
{
@@ -1689,6 +1694,8 @@
"MB"},
{STRING_GB,
"GB"},
+ {STRING_ADDKBLAYOUTS,
+ "Adding keyboard layouts"},
{0, 0}
};
Modified: trunk/reactos/base/setup/usetup/lang/pl-PL.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/pl-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/pl-PL.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/pl-PL.h [iso-8859-1] Mon Apr 28 09:04:22 2008
@@ -1467,6 +1467,11 @@
//ERROR_UPDATE_LOCALESETTINGS,
"Instalator nie m¢g ustawi wersji j©zykowej.\n"
"ENTER = Restart komputera"
+ },
+ {
+ //ERROR_ADDING_KBLAYOUTS,
+ "Setup failed to add keyboard layouts to registry.\n"
+ "ENTER = Reboot computer"
},
{
NULL,
@@ -1687,6 +1692,8 @@
"MB"},
{STRING_GB,
"GB"},
+ {STRING_ADDKBLAYOUTS,
+ "Adding keyboard layouts"},
{0, 0}
};
Modified: trunk/reactos/base/setup/usetup/lang/ru-RU.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/ru-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/ru-RU.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/ru-RU.h [iso-8859-1] Mon Apr 28 09:04:22 2008
@@ -1460,6 +1460,11 @@
//ERROR_UPDATE_LOCALESETTINGS,
"¥ 㤠«®áì ãáâ ®¢¨âì «®ª «ì á¨á⥬ë.\n"
"ENTER = ¥à¥§ £à㧪 "
+ },
+ {
+ //ERROR_ADDING_KBLAYOUTS,
+ "Setup failed to add keyboard layouts to registry.\n"
+ "ENTER = Reboot computer"
},
{
NULL,
@@ -1680,6 +1685,8 @@
""},
{STRING_GB,
""},
+ {STRING_ADDKBLAYOUTS,
+ "Adding keyboard layouts"},
{0, 0}
};
Modified: trunk/reactos/base/setup/usetup/lang/sk-SK.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/sk-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/sk-SK.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/sk-SK.h [iso-8859-1] Mon Apr 28 09:04:22 2008
@@ -1467,6 +1467,11 @@
//ERROR_UPDATE_LOCALESETTINGS,
"Setup could not set the system locale.\n"
"ENTER = Reçtart po¡taa"
+ },
+ {
+ //ERROR_ADDING_KBLAYOUTS,
+ "Setup failed to add keyboard layouts to registry.\n"
+ "ENTER = Reboot computer"
},
{
NULL,
@@ -1687,6 +1692,8 @@
"MB"},
{STRING_GB,
"GB"},
+ {STRING_ADDKBLAYOUTS,
+ "Adding keyboard layouts"},
{0, 0}
};
Modified: trunk/reactos/base/setup/usetup/lang/sv-SE.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/sv-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/sv-SE.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/sv-SE.h [iso-8859-1] Mon Apr 28 09:04:22 2008
@@ -1459,6 +1459,11 @@
{
//ERROR_UPDATE_LOCALESETTINGS,
"Setup could not set the system locale.\n"
+ "ENTER = Reboot computer"
+ },
+ {
+ //ERROR_ADDING_KBLAYOUTS,
+ "Setup failed to add keyboard layouts to registry.\n"
"ENTER = Reboot computer"
},
{
@@ -1679,6 +1684,8 @@
"MB"},
{STRING_GB,
"GB"},
+ {STRING_ADDKBLAYOUTS,
+ "Adding keyboard layouts"},
{0, 0}
};
Modified: trunk/reactos/base/setup/usetup/lang/uk-UA.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/uk-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/uk-UA.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/uk-UA.h [iso-8859-1] Mon Apr 28 09:04:22 2008
@@ -1459,6 +1459,11 @@
{
//ERROR_UPDATE_LOCALESETTINGS,
"Setup could not set the system locale.\n"
+ "ENTER = Reboot computer"
+ },
+ {
+ //ERROR_ADDING_KBLAYOUTS,
+ "Setup failed to add keyboard layouts to registry.\n"
"ENTER = Reboot computer"
},
{
@@ -1680,6 +1685,8 @@
"MB"},
{STRING_GB,
"GB"},
+ {STRING_ADDKBLAYOUTS,
+ "Adding keyboard layouts"},
{0, 0}
};
Modified: trunk/reactos/base/setup/usetup/mui.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/mui.c?re…
==============================================================================
--- trunk/reactos/base/setup/usetup/mui.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/mui.c [iso-8859-1] Mon Apr 28 09:04:22 2008
@@ -49,36 +49,36 @@
static const MUI_LANGUAGE LanguageList[] =
{
- /* Lang ID, DefKbdLayout,ANSI CP, OEM CP, MAC CP, Language Name, page
strgs,error strings, other strings */
- {L"00000409", L"00000409", L"1252", L"437",
L"10000", L"English", enUSPages, enUSErrorEntries, enUSStrings
},
- {L"00000401", L"00000401", L"1256", L"720",
L"10004", L"Arabic", enUSPages, enUSErrorEntries, enUSStrings
},
- {L"00000402", L"00000402", L"1251", L"866",
L"10007", L"Bulgarian", bgBGPages, bgBGErrorEntries, bgBGStrings
},
- {L"00000403", L"00000403", L"1252", L"850",
L"10000", L"Catalan", enUSPages, enUSErrorEntries, enUSStrings
},
- {L"00000804", L"00000804", L"936", L"936",
L"10008", L"Chinese (PRC)", enUSPages, enUSErrorEntries, enUSStrings
},
- {L"00000405", L"00000405", L"1250", L"852",
L"10029", L"Czech", csCZPages, csCZErrorEntries, csCZStrings
},
- {L"00000406", L"00000406", L"1252", L"850",
L"10000", L"Danish", enUSPages, enUSErrorEntries, enUSStrings
},
- {L"00000407", L"00000407", L"1252", L"850",
L"10000", L"Deutsch", deDEPages, deDEErrorEntries, deDEStrings
},
- {L"00000413", L"00000813", L"1252", L"850",
L"10000", L"Dutch", enUSPages, enUSErrorEntries, enUSStrings
},
- {L"0000040B", L"0000040B", L"1252", L"850",
L"10000", L"Finnish", enUSPages, enUSErrorEntries, enUSStrings
},
- {L"0000040C", L"0000040C", L"1252", L"850",
L"10000", L"French", frFRPages, frFRErrorEntries, frFRStrings
},
- {L"00000408", L"00000408", L"1253", L"737",
L"10006", L"Greek", elGRPages, elGRErrorEntries, elGRStrings
},
- {L"0000040D", L"0000040D", L"1255", L"862",
L"10005", L"Hebrew", enUSPages, enUSErrorEntries, enUSStrings
},
- {L"0000040E", L"0000040E", L"1250", L"852",
L"10029", L"Hungarian", enUSPages, enUSErrorEntries, enUSStrings
},
- {L"00000410", L"00000410", L"1252", L"850",
L"10000", L"Italian", itITPages, itITErrorEntries, itITStrings
},
- {L"00000411", L"00000411", L"932", L"932",
L"10001", L"Japanese", enUSPages, enUSErrorEntries, enUSStrings
},
- {L"00000412", L"00000412", L"949", L"949",
L"10003", L"Korean", enUSPages, enUSErrorEntries, enUSStrings
},
- {L"00000427", L"00000427", L"1257", L"775",
L"10029", L"Lithuanian", ltLTPages, ltLTErrorEntries, ltLTStrings
},
- {L"00000414", L"00000414", L"1252", L"850",
L"10000", L"Norwegian", enUSPages, enUSErrorEntries, enUSStrings
},
- {L"00000419", L"00000419", L"1251", L"866",
L"10007", L"Russkij", ruRUPages, ruRUErrorEntries, ruRUStrings
},
- {L"0000041B", L"0000041B", L"1250", L"852",
L"10029", L"Slovak", skSKPages, skSKErrorEntries, skSKStrings
},
- {L"0000040A", L"0000040A", L"1252", L"850",
L"10000", L"Spanish", esESPages, esESErrorEntries, esESStrings
},
- {L"00000415", L"00000415", L"1250", L"852",
L"10029", L"Polski", plPLPages, plPLErrorEntries, plPLStrings
},
- {L"00000816", L"00000816", L"1252", L"850",
L"10000", L"Portuguese", enUSPages, enUSErrorEntries, enUSStrings
},
- {L"0000041D", L"0000041D", L"1252", L"850",
L"10000", L"Swedish", svSEPages, svSEErrorEntries, svSEStrings
},
- {L"0000041E", L"0000041E", L"874", L"874",
L"10021", L"Thai", enUSPages, enUSErrorEntries, enUSStrings
},
- {L"0000041F", L"0000041F", L"1254", L"857",
L"10081", L"Turkish", enUSPages, enUSErrorEntries, enUSStrings
},
- {L"00000422", L"00000422", L"1251", L"866",
L"10017", L"Ukrainian", ukUAPages, ukUAErrorEntries, ukUAStrings
},
- {NULL, NULL, NULL, NULL, NULL}
+ /* Lang ID, DefKbdLayout, SecKbLayout, ANSI CP, OEM CP, MAC CP, Language Name,
page strgs,error strings, other strings */
+ {L"00000409", L"00000409", NULL, L"1252",
L"437", L"10000", L"English", enUSPages,
enUSErrorEntries, enUSStrings },
+ {L"00000401", L"00000401", L"00000409",
L"1256", L"720", L"10004", L"Arabic",
enUSPages, enUSErrorEntries, enUSStrings },
+ {L"00000402", L"00000402", L"00000409",
L"1251", L"866", L"10007", L"Bulgarian",
bgBGPages, bgBGErrorEntries, bgBGStrings },
+ {L"00000403", L"00000403", L"00000409",
L"1252", L"850", L"10000", L"Catalan",
enUSPages, enUSErrorEntries, enUSStrings },
+ {L"00000804", L"00000804", L"00000409",
L"936", L"936", L"10008", L"Chinese (PRC)",
enUSPages, enUSErrorEntries, enUSStrings },
+ {L"00000405", L"00000405", L"00000409",
L"1250", L"852", L"10029", L"Czech",
csCZPages, csCZErrorEntries, csCZStrings },
+ {L"00000406", L"00000406", L"00000409",
L"1252", L"850", L"10000", L"Danish",
enUSPages, enUSErrorEntries, enUSStrings },
+ {L"00000407", L"00000407", L"00000409",
L"1252", L"850", L"10000", L"Deutsch",
deDEPages, deDEErrorEntries, deDEStrings },
+ {L"00000413", L"00000813", L"00000409",
L"1252", L"850", L"10000", L"Dutch",
enUSPages, enUSErrorEntries, enUSStrings },
+ {L"0000040B", L"0000040B", L"00000409",
L"1252", L"850", L"10000", L"Finnish",
enUSPages, enUSErrorEntries, enUSStrings },
+ {L"0000040C", L"0000040C", L"00000409",
L"1252", L"850", L"10000", L"French",
frFRPages, frFRErrorEntries, frFRStrings },
+ {L"00000408", L"00000408", L"00000409",
L"1253", L"737", L"10006", L"Greek",
elGRPages, elGRErrorEntries, elGRStrings },
+ {L"0000040D", L"0000040D", L"00000409",
L"1255", L"862", L"10005", L"Hebrew",
enUSPages, enUSErrorEntries, enUSStrings },
+ {L"0000040E", L"0000040E", L"00000409",
L"1250", L"852", L"10029", L"Hungarian",
enUSPages, enUSErrorEntries, enUSStrings },
+ {L"00000410", L"00000410", L"00000409",
L"1252", L"850", L"10000", L"Italian",
itITPages, itITErrorEntries, itITStrings },
+ {L"00000411", L"00000411", L"00000409",
L"932", L"932", L"10001", L"Japanese",
enUSPages, enUSErrorEntries, enUSStrings },
+ {L"00000412", L"00000412", L"00000409",
L"949", L"949", L"10003", L"Korean",
enUSPages, enUSErrorEntries, enUSStrings },
+ {L"00000427", L"00000427", L"00000409",
L"1257", L"775", L"10029", L"Lithuanian",
ltLTPages, ltLTErrorEntries, ltLTStrings },
+ {L"00000414", L"00000414", L"00000409",
L"1252", L"850", L"10000", L"Norwegian",
enUSPages, enUSErrorEntries, enUSStrings },
+ {L"00000419", L"00000419", L"00000409",
L"1251", L"866", L"10007", L"Russkij",
ruRUPages, ruRUErrorEntries, ruRUStrings },
+ {L"0000041B", L"0000041B", L"00000409",
L"1250", L"852", L"10029", L"Slovak",
skSKPages, skSKErrorEntries, skSKStrings },
+ {L"0000040A", L"0000040A", L"00000409",
L"1252", L"850", L"10000", L"Spanish",
esESPages, esESErrorEntries, esESStrings },
+ {L"00000415", L"00000415", L"00000409",
L"1250", L"852", L"10029", L"Polski",
plPLPages, plPLErrorEntries, plPLStrings },
+ {L"00000816", L"00000816", L"00000409",
L"1252", L"850", L"10000", L"Portuguese",
enUSPages, enUSErrorEntries, enUSStrings },
+ {L"0000041D", L"0000041D", L"00000409",
L"1252", L"850", L"10000", L"Swedish",
svSEPages, svSEErrorEntries, svSEStrings },
+ {L"0000041E", L"0000041E", L"00000409",
L"874", L"874", L"10021", L"Thai",
enUSPages, enUSErrorEntries, enUSStrings },
+ {L"0000041F", L"0000041F", L"00000409",
L"1254", L"857", L"10081", L"Turkish",
enUSPages, enUSErrorEntries, enUSStrings },
+ {L"00000422", L"00000422", L"00000409",
L"1251", L"866", L"10017", L"Ukrainian",
ukUAPages, ukUAErrorEntries, ukUAStrings },
+ {NULL, NULL, NULL, NULL, NULL, NULL}
};
extern
@@ -247,6 +247,132 @@
POPUP_WAIT_NONE);
return "<nostring>";
+}
+
+static BOOLEAN
+AddKbLayoutsToRegistry(IN LPCWSTR DefKbLayout, IN LPCWSTR SecKbLayout)
+{
+ OBJECT_ATTRIBUTES ObjectAttributes;
+ UNICODE_STRING KeyName;
+ UNICODE_STRING ValueName;
+ HANDLE KeyHandle;
+ NTSTATUS Status;
+ ULONG Disposition;
+ WCHAR szKeyName[48] = L"\\Registry\\User\\.DEFAULT\\Keyboard Layout";
+
+ // Open the keyboard layout key
+ RtlInitUnicodeString(&KeyName,
+ szKeyName);
+ InitializeObjectAttributes(&ObjectAttributes,
+ &KeyName,
+ OBJ_CASE_INSENSITIVE,
+ NULL,
+ NULL);
+
+ Status = NtCreateKey(&KeyHandle,
+ KEY_ALL_ACCESS,
+ &ObjectAttributes,
+ 0,
+ NULL,
+ 0,
+ &Disposition);
+
+ if(NT_SUCCESS(Status))
+ NtClose(KeyHandle);
+ else
+ {
+ DPRINT1("NtCreateKey() failed (Status %lx)\n", Status);
+ return FALSE;
+ }
+
+ KeyName.MaximumLength = sizeof(szKeyName);
+ Status = RtlAppendUnicodeToString(&KeyName, L"\\Preload");
+
+ if(!NT_SUCCESS(Status))
+ {
+ DPRINT1("RtlAppend failed! (%lx)\n", Status);
+ DPRINT1("String is %wZ\n", &KeyName);
+ return FALSE;
+ }
+
+ InitializeObjectAttributes(&ObjectAttributes,
+ &KeyName,
+ OBJ_CASE_INSENSITIVE,
+ NULL,
+ NULL);
+
+ Status = NtCreateKey(&KeyHandle,
+ KEY_ALL_ACCESS,
+ &ObjectAttributes,
+ 0,
+ NULL,
+ 0,
+ &Disposition);
+
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("NtCreateKey() failed (Status %lx)\n", Status);
+ return FALSE;
+ }
+
+ /* Set def keyboard layout */
+ RtlInitUnicodeString(&ValueName,
+ L"1");
+
+ Status = NtSetValueKey(KeyHandle,
+ &ValueName,
+ 0,
+ REG_SZ,
+ (PVOID)DefKbLayout,
+ (8 + 1) * sizeof(WCHAR));
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
+ NtClose(KeyHandle);
+ return FALSE;
+ }
+
+ if (SecKbLayout != NULL)
+ {
+ /* Set second keyboard layout */
+ RtlInitUnicodeString(&ValueName,
+ L"2");
+
+ Status = NtSetValueKey(KeyHandle,
+ &ValueName,
+ 0,
+ REG_SZ,
+ (PVOID)SecKbLayout,
+ (8 + 1) * sizeof(WCHAR));
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
+ NtClose(KeyHandle);
+ return FALSE;
+ }
+ }
+
+ NtClose(KeyHandle);
+ return TRUE;
+}
+
+BOOLEAN
+AddKeyboardLayouts(VOID)
+{
+ ULONG lngIndex = 0;
+ do
+ {
+ if (_wcsicmp(LanguageList[lngIndex].LanguageID , SelectedLanguageId) == 0)
+ {
+ return
AddKbLayoutsToRegistry(LanguageList[lngIndex].LanguageKeyboardLayoutID,
+ LanguageList[lngIndex].SecondLangKbLayoutID);
+ }
+
+ lngIndex++;
+ }
+ while (LanguageList[lngIndex].MuiPages != NULL);
+
+ return FALSE;
}
static BOOLEAN
Modified: trunk/reactos/base/setup/usetup/mui.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/mui.h?re…
==============================================================================
--- trunk/reactos/base/setup/usetup/mui.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/mui.h [iso-8859-1] Mon Apr 28 09:04:22 2008
@@ -31,6 +31,7 @@
{
PWCHAR LanguageID;
PWCHAR LanguageKeyboardLayoutID;
+ PWCHAR SecondLangKbLayoutID;
PWCHAR ACPage;
PWCHAR OEMCPage;
PWCHAR MACCPage;
@@ -52,65 +53,69 @@
BOOLEAN
AddCodePage(VOID);
+BOOLEAN
+AddKeyboardLayouts(VOID);
+
VOID
SetConsoleCodePage(VOID);
LPSTR
MUIGetString(ULONG Number);
-#define STRING_PLEASEWAIT 1
-#define STRING_INSTALLCREATEPARTITION 2
-#define STRING_INSTALLDELETEPARTITION 3
-#define STRING_PARTITIONSIZE 4
-#define STRING_CHOOSENEWPARTITION 5
-#define STRING_HDDSIZE 6
-#define STRING_CREATEPARTITION 7
-#define STRING_PARTFORMAT 8
-#define STRING_NONFORMATTEDPART 9
-#define STRING_INSTALLONPART 10
-#define STRING_CHECKINGPART 11
-#define STRING_QUITCONTINUE 12
-#define STRING_REBOOTCOMPUTER 13
-#define STRING_TXTSETUPFAILED 14
-#define STRING_COPYING 15
-#define STRING_SETUPCOPYINGFILES 16
-#define STRING_PAGEDMEM 17
-#define STRING_NONPAGEDMEM 18
-#define STRING_FREEMEM 19
-#define STRING_REGHIVEUPDATE 20
-#define STRING_IMPORTFILE 21
-#define STRING_DISPLAYETTINGSUPDATE 22
-#define STRING_LOCALESETTINGSUPDATE 23
-#define STRING_KEYBOARDSETTINGSUPDATE 24
-#define STRING_CODEPAGEINFOUPDATE 25
-#define STRING_DONE 26
-#define STRING_REBOOTCOMPUTER2 27
-#define STRING_CONSOLEFAIL1 28
-#define STRING_CONSOLEFAIL2 29
-#define STRING_CONSOLEFAIL3 30
-#define STRING_FORMATTINGDISK 31
-#define STRING_CHECKINGDISK 32
-#define STRING_FORMATDISK1 33
-#define STRING_FORMATDISK2 34
-#define STRING_KEEPFORMAT 35
-#define STRING_HDINFOPARTCREATE 36
-#define STRING_HDDINFOUNK1 37
-#define STRING_HDDINFOUNK2 38
-#define STRING_HDINFOPARTDELETE 39
-#define STRING_HDDINFOUNK3 40
-#define STRING_HDINFOPARTZEROED 41
-#define STRING_HDDINFOUNK4 42
-#define STRING_HDINFOPARTEXISTS 43
-#define STRING_HDDINFOUNK5 44
-#define STRING_HDINFOPARTSELECT 45
-#define STRING_HDDINFOUNK6 46
-#define STRING_NEWPARTITION 47
-#define STRING_UNPSPACE 48
-#define STRING_MAXSIZE 49
-#define STRING_UNFORMATTED 50
-#define STRING_FORMATUNUSED 51
-#define STRING_FORMATUNKNOWN 52
-#define STRING_KB 53
-#define STRING_MB 54
-#define STRING_GB 55
+#define STRING_PLEASEWAIT 1
+#define STRING_INSTALLCREATEPARTITION 2
+#define STRING_INSTALLDELETEPARTITION 3
+#define STRING_PARTITIONSIZE 4
+#define STRING_CHOOSENEWPARTITION 5
+#define STRING_HDDSIZE 6
+#define STRING_CREATEPARTITION 7
+#define STRING_PARTFORMAT 8
+#define STRING_NONFORMATTEDPART 9
+#define STRING_INSTALLONPART 10
+#define STRING_CHECKINGPART 11
+#define STRING_QUITCONTINUE 12
+#define STRING_REBOOTCOMPUTER 13
+#define STRING_TXTSETUPFAILED 14
+#define STRING_COPYING 15
+#define STRING_SETUPCOPYINGFILES 16
+#define STRING_PAGEDMEM 17
+#define STRING_NONPAGEDMEM 18
+#define STRING_FREEMEM 19
+#define STRING_REGHIVEUPDATE 20
+#define STRING_IMPORTFILE 21
+#define STRING_DISPLAYETTINGSUPDATE 22
+#define STRING_LOCALESETTINGSUPDATE 23
+#define STRING_KEYBOARDSETTINGSUPDATE 24
+#define STRING_CODEPAGEINFOUPDATE 25
+#define STRING_DONE 26
+#define STRING_REBOOTCOMPUTER2 27
+#define STRING_CONSOLEFAIL1 28
+#define STRING_CONSOLEFAIL2 29
+#define STRING_CONSOLEFAIL3 30
+#define STRING_FORMATTINGDISK 31
+#define STRING_CHECKINGDISK 32
+#define STRING_FORMATDISK1 33
+#define STRING_FORMATDISK2 34
+#define STRING_KEEPFORMAT 35
+#define STRING_HDINFOPARTCREATE 36
+#define STRING_HDDINFOUNK1 37
+#define STRING_HDDINFOUNK2 38
+#define STRING_HDINFOPARTDELETE 39
+#define STRING_HDDINFOUNK3 40
+#define STRING_HDINFOPARTZEROED 41
+#define STRING_HDDINFOUNK4 42
+#define STRING_HDINFOPARTEXISTS 43
+#define STRING_HDDINFOUNK5 44
+#define STRING_HDINFOPARTSELECT 45
+#define STRING_HDDINFOUNK6 46
+#define STRING_NEWPARTITION 47
+#define STRING_UNPSPACE 48
+#define STRING_MAXSIZE 49
+#define STRING_UNFORMATTED 50
+#define STRING_FORMATUNUSED 51
+#define STRING_FORMATUNKNOWN 52
+#define STRING_KB 53
+#define STRING_MB 54
+#define STRING_GB 55
+#define STRING_ADDKBLAYOUTS 56
#endif
Modified: trunk/reactos/base/setup/usetup/settings.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/settings…
==============================================================================
--- trunk/reactos/base/setup/usetup/settings.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/settings.c [iso-8859-1] Mon Apr 28 09:04:22 2008
@@ -868,13 +868,14 @@
{
PGENERIC_LIST_ENTRY Entry;
PWCHAR LanguageId;
+ WCHAR CurrentLangId[8 + 1];
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName;
UNICODE_STRING ValueName;
- ULONG Disposition;
+ ULONG ResLength, Length;
HANDLE KeyHandle;
NTSTATUS Status;
- WCHAR szKeyName[48] = L"\\Registry\\User\\.DEFAULT\\Keyboard Layout";
// 48 = "\Registry\User\.DEFAULT\Keyboard Layout\Preload" + NULL char
+ PKEY_VALUE_PARTIAL_INFORMATION ValueInfo;
Entry = GetGenericListEntry(List);
if (Entry == NULL)
@@ -884,8 +885,7 @@
if (LanguageId == NULL)
return FALSE;
- // First create the "Keyboard Layout" key
- RtlInitUnicodeString(&KeyName, szKeyName);
+ RtlInitUnicodeString(&KeyName, L"\\Registry\\User\\.DEFAULT\\Keyboard
Layout\\Preload");
InitializeObjectAttributes(&ObjectAttributes,
&KeyName,
@@ -893,68 +893,92 @@
NULL,
NULL);
- Status = NtCreateKey(&KeyHandle,
- KEY_ALL_ACCESS,
- &ObjectAttributes,
- 0,
- NULL,
- 0,
- &Disposition);
-
- if(NT_SUCCESS(Status))
+ Status = NtOpenKey(&KeyHandle,
+ KEY_ALL_ACCESS,
+ &ObjectAttributes);
+
+ if(!NT_SUCCESS(Status))
+ {
+ DPRINT1("NtOpenKey() failed (Status %lx)\n", Status);
NtClose(KeyHandle);
- else
- {
- DPRINT1("NtCreateKey() failed (Status %lx)\n", Status);
- return FALSE;
- }
-
- // Then create the "Preload" key
- KeyName.MaximumLength = sizeof(szKeyName);
- Status = RtlAppendUnicodeToString(&KeyName, L"\\Preload");
-
- if(!NT_SUCCESS(Status))
- {
- DPRINT1("RtlAppend failed! (%lx)\n", Status);
- DPRINT1("String is %wZ\n", &KeyName);
- return FALSE;
- }
-
- InitializeObjectAttributes(&ObjectAttributes,
- &KeyName,
- OBJ_CASE_INSENSITIVE,
- NULL,
- NULL);
-
- Status = NtCreateKey(&KeyHandle,
- KEY_ALL_ACCESS,
- &ObjectAttributes,
- 0,
- NULL,
- 0,
- &Disposition);
-
- if (!NT_SUCCESS(Status))
- {
- DPRINT1("NtCreateKey() failed (Status %lx)\n", Status);
- return FALSE;
- }
-
- /* Set default keyboard layout */
+ return FALSE;
+ }
+
+ /* Get current keyboard layout */
RtlInitUnicodeString(&ValueName,
L"1");
- Status = NtSetValueKey(KeyHandle,
- &ValueName,
- 0,
- REG_SZ,
- (PVOID)LanguageId,
- (8 + 1) * sizeof(WCHAR));
+ Length = sizeof(KEY_VALUE_PARTIAL_INFORMATION) + (8 + 1) * sizeof(WCHAR);
+
+ ValueInfo = (KEY_VALUE_PARTIAL_INFORMATION*) RtlAllocateHeap(RtlGetProcessHeap(),
+ 0,
+ Length);
+
+ if (ValueInfo == NULL)
+ {
+ DPRINT("RtlAllocateHeap() failed\n");
+ NtClose(KeyHandle);
+ return FALSE;
+ }
+
+ Status = NtQueryValueKey(KeyHandle,
+ &ValueName,
+ KeyValuePartialInformation,
+ ValueInfo,
+ Length,
+ &ResLength);
if (!NT_SUCCESS(Status))
{
- DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
+ DPRINT1("NtQueryValueKey() failed (Status %lx)\n", Status);
NtClose(KeyHandle);
return FALSE;
+ }
+
+ RtlCopyMemory(CurrentLangId,
+ ValueInfo->Data,
+ (8 + 1) * sizeof(WCHAR));
+
+ CurrentLangId[8 + 1] = 0;
+
+ RtlFreeHeap(RtlGetProcessHeap(),
+ 0,
+ ValueInfo);
+
+ if (wcscmp(CurrentLangId, LanguageId) != 0)
+ {
+ RtlInitUnicodeString(&ValueName,
+ L"1");
+
+ Status = NtSetValueKey(KeyHandle,
+ &ValueName,
+ 0,
+ REG_SZ,
+ (PVOID)LanguageId,
+ (8 + 1) * sizeof(WCHAR));
+
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
+ NtClose(KeyHandle);
+ return FALSE;
+ }
+
+ RtlInitUnicodeString(&ValueName,
+ L"2");
+
+ Status = NtSetValueKey(KeyHandle,
+ &ValueName,
+ 0,
+ REG_SZ,
+ (PVOID)CurrentLangId,
+ (8 + 1) * sizeof(WCHAR));
+
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
+ NtClose(KeyHandle);
+ return FALSE;
+ }
}
NtClose(KeyHandle);