mirror of
https://github.com/reactos/reactos.git
synced 2025-06-25 23:49:43 +00:00
- Added ACP, OEMCP and MACCP keys to registry
- Added ERROR_ADDING_CODEPAGE to all languages - Update Russian translation svn path=/trunk/; revision=31642
This commit is contained in:
parent
a173909f74
commit
00fe6ccc98
15 changed files with 395 additions and 234 deletions
|
@ -62,6 +62,7 @@ typedef enum
|
||||||
ERROR_CREATE_INSTALL_DIR,
|
ERROR_CREATE_INSTALL_DIR,
|
||||||
ERROR_FIND_SETUPDATA,
|
ERROR_FIND_SETUPDATA,
|
||||||
ERROR_WRITE_PTABLE,
|
ERROR_WRITE_PTABLE,
|
||||||
|
ERROR_ADDING_CODEPAGE,
|
||||||
|
|
||||||
ERROR_LAST_ERROR_CODE
|
ERROR_LAST_ERROR_CODE
|
||||||
}ERROR_NUMBER;
|
}ERROR_NUMBER;
|
||||||
|
|
|
@ -3093,6 +3093,14 @@ RegistryPage(PINPUT_RECORD Ir)
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Add codepage information to registry */
|
||||||
|
CONSOLE_SetStatusText(" Adding codepage information to registry...");
|
||||||
|
if (!AddCodePage())
|
||||||
|
{
|
||||||
|
MUIDisplayError(ERROR_ADDING_CODEPAGE, Ir, POPUP_WAIT_ENTER);
|
||||||
|
return QUIT_PAGE;
|
||||||
|
}
|
||||||
|
|
||||||
/* Update the mounted devices list */
|
/* Update the mounted devices list */
|
||||||
SetMountedDeviceValues(PartitionList);
|
SetMountedDeviceValues(PartitionList);
|
||||||
|
|
||||||
|
|
|
@ -1457,6 +1457,11 @@ MUI_ERROR deDEErrorEntries[] =
|
||||||
"Setup konnte die Partitionstabellen nicht schreiben.\n"
|
"Setup konnte die Partitionstabellen nicht schreiben.\n"
|
||||||
"ENTER = Computer neustarten"
|
"ENTER = Computer neustarten"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
//ERROR_ADDING_CODEPAGE,
|
||||||
|
"Setup failed to add codepage to registry.\n"
|
||||||
|
"ENTER = Reboot computer"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
|
|
|
@ -1451,6 +1451,11 @@ MUI_ERROR elGRErrorEntries[] =
|
||||||
"Η Εγκατάσταση απέτυχε να γράψει τα partition tables.\n"
|
"Η Εγκατάσταση απέτυχε να γράψει τα partition tables.\n"
|
||||||
"ENTER = Επανεκκίνηση υπολογιστή"
|
"ENTER = Επανεκκίνηση υπολογιστή"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
//ERROR_ADDING_CODEPAGE,
|
||||||
|
"Setup failed to add codepage to registry.\n"
|
||||||
|
"ENTER = Reboot computer"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
|
|
|
@ -1275,7 +1275,7 @@ MUI_ERROR enUSErrorEntries[] =
|
||||||
"\n"
|
"\n"
|
||||||
" \x07 Press ENTER to continue Setup.\n"
|
" \x07 Press ENTER to continue Setup.\n"
|
||||||
" \x07 Press F3 to quit Setup.",
|
" \x07 Press F3 to quit Setup.",
|
||||||
"F3= Quit ENTER = Continue"
|
"F3 = Quit ENTER = Continue"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
//ERROR_NO_HDD
|
//ERROR_NO_HDD
|
||||||
|
@ -1451,6 +1451,11 @@ MUI_ERROR enUSErrorEntries[] =
|
||||||
"Setup failed to write partition tables.\n"
|
"Setup failed to write partition tables.\n"
|
||||||
"ENTER = Reboot computer"
|
"ENTER = Reboot computer"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
//ERROR_ADDING_CODEPAGE,
|
||||||
|
"Setup failed to add codepage to registry.\n"
|
||||||
|
"ENTER = Reboot computer"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
|
|
|
@ -1451,6 +1451,11 @@ MUI_ERROR esESErrorEntries[] =
|
||||||
"Setup failed to write partition tables.\n"
|
"Setup failed to write partition tables.\n"
|
||||||
"ENTER = Reboot computer"
|
"ENTER = Reboot computer"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
//ERROR_ADDING_CODEPAGE,
|
||||||
|
"Setup failed to add codepage to registry.\n"
|
||||||
|
"ENTER = Reboot computer"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
|
|
|
@ -1463,6 +1463,11 @@ MUI_ERROR frFRErrorEntries[] =
|
||||||
"Setup n'a pu ecrire les tables de partition.\n"
|
"Setup n'a pu ecrire les tables de partition.\n"
|
||||||
"ENTER = Redemarrer l'ordinateur"
|
"ENTER = Redemarrer l'ordinateur"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
//ERROR_ADDING_CODEPAGE,
|
||||||
|
"Setup failed to add codepage to registry.\n"
|
||||||
|
"ENTER = Reboot computer"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
|
|
|
@ -1457,6 +1457,11 @@ MUI_ERROR itITErrorEntries[] =
|
||||||
"Setup non ha potuto scrivere le tabelle di partizioni.\n"
|
"Setup non ha potuto scrivere le tabelle di partizioni.\n"
|
||||||
"INVIO = Riavviare il computer"
|
"INVIO = Riavviare il computer"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
//ERROR_ADDING_CODEPAGE,
|
||||||
|
"Setup failed to add codepage to registry.\n"
|
||||||
|
"ENTER = Reboot computer"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
|
|
|
@ -1459,6 +1459,11 @@ MUI_ERROR plPLErrorEntries[] =
|
||||||
"Instalator nie móg³ zapisaæ zmian w tablicy partycji.\n"
|
"Instalator nie móg³ zapisaæ zmian w tablicy partycji.\n"
|
||||||
"ENTER = Restart komputera"
|
"ENTER = Restart komputera"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
//ERROR_ADDING_CODEPAGE,
|
||||||
|
"Setup failed to add codepage to registry.\n"
|
||||||
|
"ENTER = Reboot computer"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1451,6 +1451,11 @@ MUI_ERROR svSEErrorEntries[] =
|
||||||
"Setup failed to write partition tables.\n"
|
"Setup failed to write partition tables.\n"
|
||||||
"ENTER = Reboot computer"
|
"ENTER = Reboot computer"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
//ERROR_ADDING_CODEPAGE,
|
||||||
|
"Setup failed to add codepage to registry.\n"
|
||||||
|
"ENTER = Reboot computer"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
|
|
|
@ -1451,6 +1451,11 @@ MUI_ERROR ukUAErrorEntries[] =
|
||||||
"Setup failed to write partition tables.\n"
|
"Setup failed to write partition tables.\n"
|
||||||
"ENTER = Reboot computer"
|
"ENTER = Reboot computer"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
//ERROR_ADDING_CODEPAGE,
|
||||||
|
"Setup failed to add codepage to registry.\n"
|
||||||
|
"ENTER = Reboot computer"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
|
|
|
@ -28,6 +28,9 @@
|
||||||
#include "errorcode.h"
|
#include "errorcode.h"
|
||||||
#include "mui.h"
|
#include "mui.h"
|
||||||
|
|
||||||
|
#define NDEBUG
|
||||||
|
#include <debug.h>
|
||||||
|
|
||||||
#include "lang/en-US.h"
|
#include "lang/en-US.h"
|
||||||
#include "lang/de-DE.h"
|
#include "lang/de-DE.h"
|
||||||
#include "lang/el-GR.h"
|
#include "lang/el-GR.h"
|
||||||
|
@ -308,4 +311,99 @@ MUIDisplayError(ULONG ErrorNum, PINPUT_RECORD Ir, ULONG WaitEvent)
|
||||||
WaitEvent);
|
WaitEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static BOOLEAN
|
||||||
|
AddCodepageToRegistry(PWCHAR ACPage, PWCHAR OEMCPage, PWCHAR MACCPage)
|
||||||
|
{
|
||||||
|
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||||
|
UNICODE_STRING KeyName;
|
||||||
|
UNICODE_STRING ValueName;
|
||||||
|
HANDLE KeyHandle;
|
||||||
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
// Open the nls codepage key
|
||||||
|
RtlInitUnicodeString(&KeyName,
|
||||||
|
L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\NLS\\CodePage");
|
||||||
|
InitializeObjectAttributes(&ObjectAttributes,
|
||||||
|
&KeyName,
|
||||||
|
OBJ_CASE_INSENSITIVE,
|
||||||
|
NULL,
|
||||||
|
NULL);
|
||||||
|
Status = NtOpenKey(&KeyHandle,
|
||||||
|
KEY_ALL_ACCESS,
|
||||||
|
&ObjectAttributes);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DPRINT1("NtOpenKey() failed (Status %lx)\n", Status);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set ANSI codepage
|
||||||
|
RtlInitUnicodeString(&ValueName, L"ACP");
|
||||||
|
Status = NtSetValueKey(KeyHandle,
|
||||||
|
&ValueName,
|
||||||
|
0,
|
||||||
|
REG_SZ,
|
||||||
|
(PVOID)ACPage,
|
||||||
|
4 * sizeof(PWCHAR));
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
|
||||||
|
NtClose(KeyHandle);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set OEM codepage
|
||||||
|
RtlInitUnicodeString(&ValueName, L"OEMCP");
|
||||||
|
Status = NtSetValueKey(KeyHandle,
|
||||||
|
&ValueName,
|
||||||
|
0,
|
||||||
|
REG_SZ,
|
||||||
|
(PVOID)OEMCPage,
|
||||||
|
3 * sizeof(PWCHAR));
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
|
||||||
|
NtClose(KeyHandle);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set MAC codepage
|
||||||
|
RtlInitUnicodeString(&ValueName, L"MACCP");
|
||||||
|
Status = NtSetValueKey(KeyHandle,
|
||||||
|
&ValueName,
|
||||||
|
0,
|
||||||
|
REG_SZ,
|
||||||
|
(PVOID)MACCPage,
|
||||||
|
5 * sizeof(PWCHAR));
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
|
||||||
|
NtClose(KeyHandle);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
NtClose(KeyHandle);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOLEAN
|
||||||
|
AddCodePage(VOID)
|
||||||
|
{
|
||||||
|
ULONG lngIndex = 0;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
if (_wcsicmp(LanguageList[lngIndex].LanguageID , SelectedLanguageId) == 0)
|
||||||
|
{
|
||||||
|
return AddCodepageToRegistry(LanguageList[lngIndex].ACPage,
|
||||||
|
LanguageList[lngIndex].OEMCPage,
|
||||||
|
LanguageList[lngIndex].MACCPage);
|
||||||
|
}
|
||||||
|
|
||||||
|
lngIndex++;
|
||||||
|
}
|
||||||
|
while (LanguageList[lngIndex].MuiPages != NULL);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -53,5 +53,8 @@ MUIDisplayError (ULONG ErrorNum, PINPUT_RECORD Ir, ULONG WaitEvent);
|
||||||
VOID
|
VOID
|
||||||
MUIDefaultKeyboardLayout(WCHAR * KeyboardLayout);
|
MUIDefaultKeyboardLayout(WCHAR * KeyboardLayout);
|
||||||
|
|
||||||
|
BOOLEAN
|
||||||
|
AddCodePage(VOID);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -821,7 +821,7 @@ ProcessKeyboardLayoutRegistry(PGENERIC_LIST List)
|
||||||
0,
|
0,
|
||||||
REG_SZ,
|
REG_SZ,
|
||||||
(PVOID)(LanguageId + 4),
|
(PVOID)(LanguageId + 4),
|
||||||
8);
|
8 * sizeof(PWCHAR));
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
|
DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
|
||||||
|
@ -837,7 +837,7 @@ ProcessKeyboardLayoutRegistry(PGENERIC_LIST List)
|
||||||
0,
|
0,
|
||||||
REG_SZ,
|
REG_SZ,
|
||||||
(PVOID)(LanguageId + 4),
|
(PVOID)(LanguageId + 4),
|
||||||
8);
|
8 * sizeof(PWCHAR));
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
|
DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue