- Allow LANGUAGE_PAGE localization

- Use DefaultLanguage setting to set the user interface language even for the language selection itself
- Add missing language page entries to current localizations, translators get to work!

svn path=/trunk/; revision=31437
This commit is contained in:
Marc Piulachs 2007-12-25 20:24:19 +00:00
parent 55888d315a
commit efe106fcd9
14 changed files with 333 additions and 34 deletions

View file

@ -44,6 +44,7 @@ LONG UnattendMBRInstallType = -1;
LONG UnattendFormatPartition = 0;
LONG AutoPartition = 0;
WCHAR UnattendInstallationDirectory[MAX_PATH];
PWCHAR SelectedLanguageId;
BOOLEAN RepairUpdateFlag = FALSE;
HANDLE hPnpThread = INVALID_HANDLE_VALUE;
@ -571,11 +572,19 @@ LanguagePage(PINPUT_RECORD Ir)
if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_DOWN)) /* DOWN */
{
#if 0 //Dinamically update user interface
SelectedLanguageId = (PWCHAR)LanguageList->CurrentEntry->UserData;
MUIDisplayPage(LANGUAGE_PAGE);
#endif
ScrollDownGenericList (LanguageList);
}
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_UP)) /* UP */
{
#if 0
SelectedLanguageId = (PWCHAR)LanguageList->CurrentEntry->UserData;
MUIDisplayPage(LANGUAGE_PAGE);
#endif
ScrollUpGenericList (LanguageList);
}
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
@ -586,7 +595,7 @@ LanguagePage(PINPUT_RECORD Ir)
}
else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
{
MUISelectLanguage((PWCHAR)LanguageList->CurrentEntry->UserData);
SelectedLanguageId = (PWCHAR)LanguageList->CurrentEntry->UserData;
return INTRO_PAGE;
}
}

View file

@ -1,6 +1,46 @@
#ifndef LANG_DE_DE_H__
#define LANG_DE_DE_H__
static MUI_ENTRY deDELanguagePageEntries[] =
{
{
6,
8,
"Language Selection.",
TEXT_NORMAL
},
{
8,
10,
"\x07 Please choose the language used for the installation process.",
TEXT_NORMAL
},
{
8,
11,
" Then press ENTER.",
TEXT_NORMAL
},
{
8,
13,
"\x07 This Language will be the default language for the final system.",
TEXT_NORMAL
},
{
0,
0,
" ENTER = Continue F3 = Quit",
TEXT_STATUS
},
{
0,
0,
NULL,
0
}
};
static MUI_ENTRY deDEWelcomePageEntries[] =
{
{
@ -1266,6 +1306,10 @@ MUI_ERROR deDEErrorEntries[] =
MUI_PAGE deDEPages[] =
{
{
LANGUAGE_PAGE,
deDELanguagePageEntries
},
{
START_PAGE,
deDEWelcomePageEntries

View file

@ -1,6 +1,46 @@
#ifndef LANG_EL_GR_H__
#define LANG_EL_GR_H__
static MUI_ENTRY elGRLanguagePageEntries[] =
{
{
6,
8,
"Language Selection.",
TEXT_NORMAL
},
{
8,
10,
"\x07 Please choose the language used for the installation process.",
TEXT_NORMAL
},
{
8,
11,
" Then press ENTER.",
TEXT_NORMAL
},
{
8,
13,
"\x07 This Language will be the default language for the final system.",
TEXT_NORMAL
},
{
0,
0,
" ENTER = Continue F3 = Quit",
TEXT_STATUS
},
{
0,
0,
NULL,
0
}
};
static MUI_ENTRY elGRWelcomePageEntries[] =
{
{
@ -1268,7 +1308,7 @@ MUI_PAGE elGRPages[] =
{
{
LANGUAGE_PAGE,
LanguagePageEntries
elGRLanguagePageEntries
},
{
START_PAGE,

View file

@ -1,13 +1,12 @@
#ifndef LANG_EN_US_H__
#define LANG_EN_US_H__
// do not translate these
static MUI_ENTRY LanguagePageEntries[] =
static MUI_ENTRY enUSLanguagePageEntries[] =
{
{
6,
8,
"Language Selection.",
"Language Selection",
TEXT_NORMAL
},
{
@ -1308,7 +1307,7 @@ MUI_PAGE enUSPages[] =
{
{
LANGUAGE_PAGE,
LanguagePageEntries
enUSLanguagePageEntries
},
{
START_PAGE,

View file

@ -1,6 +1,46 @@
#ifndef LANG_ES_ES_H__
#define LANG_ES_ES_H__
static MUI_ENTRY esESLanguagePageEntries[] =
{
{
6,
8,
"Selección de idioma",
TEXT_NORMAL
},
{
8,
10,
"\x07 Please choose the language used for the installation process.",
TEXT_NORMAL
},
{
8,
11,
" Then press ENTER.",
TEXT_NORMAL
},
{
8,
13,
"\x07 This Language will be the default language for the final system.",
TEXT_NORMAL
},
{
0,
0,
" ENTER = Continue F3 = Quit",
TEXT_STATUS
},
{
0,
0,
NULL,
0
}
};
static MUI_ENTRY esESWelcomePageEntries[] =
{
{
@ -1074,11 +1114,11 @@ MUI_PAGE esESPages[] =
{
{
LANGUAGE_PAGE,
LanguagePageEntries
esESLanguagePageEntries
},
{
START_PAGE,
esESWelcomePageEntries
START_PAGE,
esESWelcomePageEntries
},
{
INSTALL_INTRO_PAGE,

View file

@ -1,6 +1,46 @@
#ifndef LANG_FR_FR_H__
#define LANG_FR_FR_H__
static MUI_ENTRY frFRLanguagePageEntries[] =
{
{
6,
8,
"Language Selection.",
TEXT_NORMAL
},
{
8,
10,
"\x07 Please choose the language used for the installation process.",
TEXT_NORMAL
},
{
8,
11,
" Then press ENTER.",
TEXT_NORMAL
},
{
8,
13,
"\x07 This Language will be the default language for the final system.",
TEXT_NORMAL
},
{
0,
0,
" ENTER = Continue F3 = Quit",
TEXT_STATUS
},
{
0,
0,
NULL,
0
}
};
static MUI_ENTRY frFRWelcomePageEntries[] =
{
{
@ -1280,7 +1320,7 @@ MUI_PAGE frFRPages[] =
{
{
LANGUAGE_PAGE,
LanguagePageEntries
frFRLanguagePageEntries
},
{
START_PAGE,

View file

@ -1,6 +1,46 @@
#ifndef LANG_IT_IT_H__
#define LANG_IT_IT_H__
static MUI_ENTRY itITLanguagePageEntries[] =
{
{
6,
8,
"Language Selection.",
TEXT_NORMAL
},
{
8,
10,
"\x07 Please choose the language used for the installation process.",
TEXT_NORMAL
},
{
8,
11,
" Then press ENTER.",
TEXT_NORMAL
},
{
8,
13,
"\x07 This Language will be the default language for the final system.",
TEXT_NORMAL
},
{
0,
0,
" ENTER = Continue F3 = Quit",
TEXT_STATUS
},
{
0,
0,
NULL,
0
}
};
static MUI_ENTRY itITWelcomePageEntries[] =
{
{
@ -1267,7 +1307,7 @@ MUI_PAGE itITPages[] =
{
{
LANGUAGE_PAGE,
LanguagePageEntries
itITLanguagePageEntries
},
{
START_PAGE,

View file

@ -6,7 +6,25 @@ static MUI_ENTRY ruRULanguagePageEntries[] =
{
6,
8,
"Select your language:",
"Language Selection.",
TEXT_NORMAL
},
{
8,
10,
"\x07 Please choose the language used for the installation process.",
TEXT_NORMAL
},
{
8,
11,
" Then press ENTER.",
TEXT_NORMAL
},
{
8,
13,
"\x07 This Language will be the default language for the final system.",
TEXT_NORMAL
},
{

View file

@ -1,6 +1,46 @@
#ifndef LANG_SV_SE_H__
#define LANG_SV_SE_H__
static MUI_ENTRY svSELanguagePageEntries[] =
{
{
6,
8,
"Language Selection.",
TEXT_NORMAL
},
{
8,
10,
"\x07 Please choose the language used for the installation process.",
TEXT_NORMAL
},
{
8,
11,
" Then press ENTER.",
TEXT_NORMAL
},
{
8,
13,
"\x07 This Language will be the default language for the final system.",
TEXT_NORMAL
},
{
0,
0,
" ENTER = Continue F3 = Quit",
TEXT_STATUS
},
{
0,
0,
NULL,
0
}
};
static MUI_ENTRY svSEWelcomePageEntries[] =
{
{
@ -1075,7 +1115,7 @@ MUI_PAGE svSEPages[] =
{
{
LANGUAGE_PAGE,
LanguagePageEntries
svSELanguagePageEntries
},
{
START_PAGE,

View file

@ -1,6 +1,46 @@
#ifndef LANG_UK_UA_H__
#define LANG_UK_UA_H__
static MUI_ENTRY ukUALanguagePageEntries[] =
{
{
6,
8,
"Language Selection.",
TEXT_NORMAL
},
{
8,
10,
"\x07 Please choose the language used for the installation process.",
TEXT_NORMAL
},
{
8,
11,
" Then press ENTER.",
TEXT_NORMAL
},
{
8,
13,
"\x07 This Language will be the default language for the final system.",
TEXT_NORMAL
},
{
0,
0,
" ENTER = Continue F3 = Quit",
TEXT_STATUS
},
{
0,
0,
NULL,
0
}
};
static MUI_ENTRY ukUAWelcomePageEntries[] =
{
{
@ -1073,6 +1113,10 @@ static MUI_ENTRY ukUADeletePartitionEntries[] =
MUI_PAGE ukUAPages[] =
{
{
LANGUAGE_PAGE,
ukUALanguagePageEntries
},
{
START_PAGE,
ukUAWelcomePageEntries

View file

@ -38,9 +38,6 @@
#include "lang/sv-SE.h"
#include "lang/uk-UA.h"
/* The current selected language , by default en-us for now */
static PWCHAR SelectedLanguageId = L"00000409";
static MUI_LANGUAGE LanguageList[] =
{
{
@ -111,16 +108,6 @@ PopupError(PCHAR Text,
PINPUT_RECORD Ir,
ULONG WaitEvent);
BOOLEAN
MUISelectLanguage(PWCHAR LanguageID)
{
if (LanguageID == NULL)
return FALSE;
SelectedLanguageId = LanguageID;
return TRUE;
}
static
MUI_ENTRY *
FindMUIEntriesOfPage (ULONG PageNumber)
@ -188,8 +175,8 @@ MUIDisplayPage(ULONG page)
CONSOLE_SetUnderlinedTextXY(entry[index].X, entry[index].Y, entry[index].Buffer);
break;
case TEXT_STATUS:
CONSOLE_SetStatusText(entry[index].Buffer);
break;
CONSOLE_SetStatusText(entry[index].Buffer);
break;
default:
break;
}

View file

@ -34,11 +34,6 @@ typedef struct
#define TEXT_ALIGN_CENTER 8
VOID
MUIDisplayPage(ULONG PageNumber);
BOOLEAN
//MUISelectLanguage(ULONG LanguageIndex);
MUISelectLanguage(PWCHAR LanguageID);
MUIDisplayPage (ULONG PageNumber);
#endif

View file

@ -674,6 +674,8 @@ CreateLanguageList(HINF InfFile)
return NULL;
wcscpy(DefaultLanguage, KeyValue);
SelectedLanguageId = KeyValue;
List = CreateGenericList();
if (List == NULL)

View file

@ -79,6 +79,7 @@ extern UNICODE_STRING SourceRootPath;
extern UNICODE_STRING SourceRootDir;
extern UNICODE_STRING SourcePath;
extern BOOLEAN IsUnattendedSetup;
extern PWCHAR SelectedLanguageId;
typedef enum _PAGE_NUMBER
{