Different methods for declaring UNI files


Konstantin Aladyshev
 

Hello!

I was investigating EDKII database and have found 3 ways of declaring UNI files:

1) Sources section within the INF file:
```
[Sources]
InventoryStrings.uni
VfrStrings.uni
...
```

Example:
https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf


2) MODULE_UNI_FILE/[UserExtensions.TianoCore."ExtraFiles"] within the INF file:
```
[Defines]
...
MODULE_UNI_FILE = ResetSystemPei.uni

...

[UserExtensions.TianoCore."ExtraFiles"]
ResetSystemPeiExtra.uni
```
Example: https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Universal/ResetSystemPei/ResetSystemPei.inf

3) PACKAGE_UNI_FILE/[UserExtensions.TianoCore."ExtraFiles"] within the DEC file:
```
[Defines]
PACKAGE_UNI_FILE = MdeModulePkg.uni

...

[UserExtensions.TianoCore."ExtraFiles"]
MdeModulePkgExtra.uni
```
Example: https://github.com/tianocore/edk2/blob/master/MdeModulePkg/MdeModulePkg.dec

_______________________

Could someone provide me some info about all these different methods?

As I understand, all the translation strings for HII should be defined
within method 1. Am I correct?
What is the purpose of methods 2 and 3 then?
I see that these methods define strings like:
STR_MODULE_ABSTRACT
STR_MODULE_DESCRIPTION
STR_PROPERTIES_MODULE_NAME

STR_PACKAGE_ABSTRACT
STR_PACKAGE_DESCRIPTION
STR_PROPERTIES_PACKAGE_NAME

When are these strings printed? What is the point of putting
STR_MODULE_ABSTRACT/STR_MODULE_DESCRIPTION in one file and
STR_PROPERTIES_MODULE_NAME in the other "extra" file? Seems redundant.

Also I've found more strange strings in the
https://github.com/tianocore/edk2/blob/master/MdeModulePkg/MdeModulePkg.uni

STR_gEfiMdeModulePkgTokenSpaceGuid_PcdLoadModuleAtFixAddressEnable_PROMPT
STR_gEfiMdeModulePkgTokenSpaceGuid_PcdLoadModuleAtFixAddressEnable_HELP
STR_gEfiMdeModulePkgTokenSpaceGuid_ERR_80000001

How are they used?

Best regards,
Konstantin Aladyshev

Join discuss@edk2.groups.io to automatically receive all group messages.