diff options
author | gikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-06-25 04:44:45 +0000 |
---|---|---|
committer | gikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-06-25 04:44:45 +0000 |
commit | 8d3b5aff68cef02a1fdb650d009b9aa6b83d6040 (patch) | |
tree | 7a1a5723efddda6c93c3002ef212579289786e4a /IntelFrameworkModulePkg/Universal | |
parent | f66d00cabc80475fe1b3a9be9bfd71b712657d02 (diff) | |
download | edk2-platforms-8d3b5aff68cef02a1fdb650d009b9aa6b83d6040.tar.xz |
Use UNI file string to display Boot Option for language localization.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8655 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Universal')
-rw-r--r-- | IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c | 43 | ||||
-rw-r--r-- | IntelFrameworkModulePkg/Universal/BdsDxe/Strings.uni | bin | 7342 -> 9310 bytes |
2 files changed, 42 insertions, 1 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c index 0fad88ed48..eda86fdcba 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c @@ -201,6 +201,7 @@ CallBootManager ( VOID *EndOpCodeHandle;
EFI_IFR_GUID_LABEL *StartLabel;
EFI_IFR_GUID_LABEL *EndLabel;
+ CHAR16 *BootStringNumber;
gOption = NULL;
InitializeListHead (&BdsBootOptionList);
@@ -262,7 +263,47 @@ CallBootManager ( if ((Option->Attribute & LOAD_OPTION_HIDDEN) != 0) {
continue;
}
-
+
+ //
+ // Replace description string with UNI file string.
+ //
+ BootStringNumber = AllocateZeroPool (StrSize (Option->Description));
+ ASSERT (BootStringNumber != NULL);
+
+ if (StrStr (Option->Description, DESCRIPTION_FLOPPY) != NULL) {
+ BootStringNumber = Option->Description + StrLen (DESCRIPTION_FLOPPY) + 1;
+ Option->Description = GetStringById (STRING_TOKEN (STR_DESCRIPTION_FLOPPY));
+
+ } else if (StrStr (Option->Description, DESCRIPTION_DVD) != NULL) {
+ BootStringNumber = Option->Description + StrLen (DESCRIPTION_DVD) + 1;
+ Option->Description = GetStringById (STRING_TOKEN (STR_DESCRIPTION_DVD));
+
+ } else if (StrStr (Option->Description, DESCRIPTION_USB) != NULL) {
+ BootStringNumber = Option->Description + StrLen (DESCRIPTION_USB) + 1;
+ Option->Description = GetStringById (STRING_TOKEN (STR_DESCRIPTION_USB));
+
+ } else if (StrStr (Option->Description, DESCRIPTION_SCSI) != NULL) {
+ BootStringNumber = Option->Description + StrLen (DESCRIPTION_SCSI) + 1;
+ Option->Description = GetStringById (STRING_TOKEN (STR_DESCRIPTION_SCSI));
+
+ } else if (StrStr (Option->Description, DESCRIPTION_MISC) != NULL) {
+ BootStringNumber = Option->Description + StrLen (DESCRIPTION_MISC) + 1;
+ Option->Description = GetStringById (STRING_TOKEN (STR_DESCRIPTION_MISC));
+
+ } else if (StrStr (Option->Description, DESCRIPTION_NETWORK) != NULL) {
+ BootStringNumber = Option->Description + StrLen (DESCRIPTION_NETWORK) + 1;
+ Option->Description = GetStringById (STRING_TOKEN (STR_DESCRIPTION_NETWORK));
+
+ } else if (StrStr (Option->Description, DESCRIPTION_NON_BLOCK) != NULL) {
+ BootStringNumber = Option->Description + StrLen (DESCRIPTION_NON_BLOCK) + 1;
+ Option->Description = GetStringById (STRING_TOKEN (STR_DESCRIPTION_NON_BLOCK));
+ }
+
+ if (StrnCmp (BootStringNumber, L"0", 1) != 0) {
+ StrCat (Option->Description, L" ");
+ StrCat (Option->Description, BootStringNumber);
+ }
+
Token = HiiSetString (HiiHandle, 0, Option->Description, NULL);
TempStr = DevicePathToStr (Option->DevicePath);
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/Strings.uni b/IntelFrameworkModulePkg/Universal/BdsDxe/Strings.uni Binary files differindex 0d4274a4a9..fac0a0a639 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/Strings.uni +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/Strings.uni |