public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Nikolay Bodunov <nikolay.bodunov@gmail.com>
To: edk2-devel@lists.01.org
Subject: Localization help need: national symbols are not displayed on BIOS screen after adding a new language
Date: Wed, 31 May 2017 03:03:38 +0300	[thread overview]
Message-ID: <CANqPu1KX0N-o6v+o3kbNx6JT6+FdRp_sgeYyEsNH1eeDHSn7dA@mail.gmail.com> (raw)

Hello

I added 3 new languages in MdeModulePks/Application/UiApp example from EDK2
and I got a problem with strings output. Using Nt32Pkg emulator with Win 7.

My problem is: when I add Russian language, I also add new string on that
language to existing token, but I can't see that string shown on screen.
Specifically, I can see English part of the string only.
I mean, if I write the first half of the string on English and the second
half on Russian, I can see only English half of the string on BIOS screen.
Here are my problem on the screenshot:
https://yadi.sk/i/mgh_-dBH3JbYtp
I didn't added corresponding Russian strings to any other tokens, so
displaying "!" instead for them is ok. If I switch back to English or
French, correct strings are shown again.

What I did:
1. Added new languages in MdePkg.dec:
  gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatform
LangCodes|"en;fr;en-US;fr-FR;ru;de;zh-cn"|VOID*|0x0000001e

2. Opened UNI file in Notepad++ and added new languages, after English and
French:
#langdef   en-US "English"
#langdef   fr-FR "Francais"
#langdef   en    "Standard English"
#langdef   fr    "Standard Francais"
#langdef   ru    "Russian"
//#langdef   ru-RU "Russian"
#langdef   de    "German"
#langdef   zh-cn "Chinese (PRC)"

3. Switched (in Windows 7) on Russian codepage and added new string for
"ru" locale that token "STR_LANGUAGE_SELECT"
https://yadi.sk/i/quf2Gd003JbZez

I also located my string in .efi output file in HEX to investigate what
could be wrong, but I see exactly what I expected: codepage 04 and symbol
codes which conforms corresponding Russian symbols in UCS-2: 2004 4304 4104
4104 3A04 3804 3904 (and English symbols, too):
https://yadi.sk/i/QIEqcqKg3JbaiL

>From the other side, I got support for German locale in that way, having
typical German symbols in string attached ot that token.

Any suggestions, what I did wrong or what I should do else? I suppose there
should be some "magical" function call that adds more than one locale, but
I don't know what it is.
Maybe default font just does not support Russian locale? Which font should
I use instead and where I can read about it? Text search in EDK2 source
tree does't find string "ru-RU"

I cannot diagnose it in programming way: when I add non-existing locale
"xz" to MdePkg.dec, I have no error during compilation and I can see this
pseudo-locale in PlatformLangCodes variable then.

With best regards,
Nikolay Bodunov


             reply	other threads:[~2017-05-31  0:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-31  0:03 Nikolay Bodunov [this message]
2017-05-31  0:35 ` Localization help need: national symbols are not displayed on BIOS screen after adding a new language Kinney, Michael D

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANqPu1KX0N-o6v+o3kbNx6JT6+FdRp_sgeYyEsNH1eeDHSn7dA@mail.gmail.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox