- Allow LANGUAGE_PAGE localization
authorMarc Piulachs <marc.piulachs@live.com>
Tue, 25 Dec 2007 20:24:19 +0000 (20:24 +0000)
committerMarc Piulachs <marc.piulachs@live.com>
Tue, 25 Dec 2007 20:24:19 +0000 (20:24 +0000)
- 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

14 files changed:
reactos/base/setup/usetup/interface/usetup.c
reactos/base/setup/usetup/lang/de-DE.h
reactos/base/setup/usetup/lang/el-GR.h
reactos/base/setup/usetup/lang/en-US.h
reactos/base/setup/usetup/lang/es-ES.h
reactos/base/setup/usetup/lang/fr-FR.h
reactos/base/setup/usetup/lang/it-IT.h
reactos/base/setup/usetup/lang/ru-RU.h
reactos/base/setup/usetup/lang/sv-SE.h
reactos/base/setup/usetup/lang/uk-UA.h
reactos/base/setup/usetup/mui.c
reactos/base/setup/usetup/mui.h
reactos/base/setup/usetup/settings.c
reactos/base/setup/usetup/usetup.h

index 17f9f58..1e96c03 100644 (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;
        }
     }
index c9d8ba4..6a28e39 100644 (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
index e979965..532ab8e 100644 (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,
index ae6df83..96295f6 100644 (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,
index 7c4e4f6..7138ee4 100644 (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,
index 2c93437..96119e0 100644 (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,
index 0b28638..e54fe5d 100644 (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,
index 081ed74..a822190 100644 (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
     },
     {
index f6c4f40..407c5f9 100644 (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,
index f2cbed9..c3ca16c 100644 (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
index 4ac1438..cb5b256 100644 (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;
         }
index 1c90291..0c39f3c 100644 (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
index 5915c96..7dd9159 100644 (file)
@@ -674,6 +674,8 @@ CreateLanguageList(HINF InfFile)
      return NULL; 
 
     wcscpy(DefaultLanguage, KeyValue); 
+    
+    SelectedLanguageId = KeyValue;
 
     List = CreateGenericList(); 
     if (List == NULL) 
index a8371f7..ce933d8 100644 (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
 {