Larry -

I would recommend that these sort of changes not be added to the grammar, but 
rather in the specification text related to the [UserDefined] or DEFINES 
section of the .inf or .dec specification.

Tim

From: Hauch, Larry [mailto:larry.ha...@intel.com]
Sent: Monday, August 11, 2014 10:56 AM
To: edk2-devel@lists.sourceforge.net
Subject: [edk2] EDK II UNI Unicode File Specification Update

Hi Folks,
The following is content we would like to add to the EDK II UNI Unicode File 
Specification to support the changes  we have proposed for supporting 
localization in EDK II that can be consumed by the packaging to when creating a 
UEFI PI Distribution Package (and when installing a UEFI PI Distribution 
Package using the EDK II upt tool).
Please respond with feedback the end of this week.
Thanks,
Larry

3
UNI File Common Content
This section defines the common tag syntax for content in a Unicode file 
specified in the following Module and Package UNI sections.

Prototype

<US>          ::= L" "



<MS>          ::= <US>+



<ME>          ::= {<MS>} {<EOL>}



<CR>          ::= 0x000D



<LF>          ::= 0x000A



<EOL>         ::= <CR><LF>



<BlankLine>   ::= <EOL>



<PChars>      ::= (0x0020-0xF6FF)


<LangCode>    ::= <RFC4646>

<RFC4646>     ::= (\ua-\uz\uA-\uZ){2,8}
                  [L"-" (\ua-\uz\uA-\uZ\u0-\u9){2,8}]

<UDblQuote>   ::= 0x0022

<String>      ::= <UDblQuote> <PChars>* <UDblQuote>



<Header>      ::= L"// /** @file" <EOL>

                  [<Abstract> <EOL>]?

                  [L"//" <EOL>]+

                  [<Description> <EOL>]*

                  [L"//" <EOL>]

                  [<Copyright> <EOL>]+

                  [L"//" <EOL>]*

                  [<License> <EOL>]+

                  [L"//" <EOL>]*

                  L"// **/" <EOL>+



<Abstract>    ::= L"//" <MS> <PChars>+



<Description> ::= L"//" <MS> <PChars>+



<Copyright>   ::= L"//" <MS> "Copyright (c)" <MS> <Date>



<Date>        ::= {<Year>} {<YearRange>} {<YearList>} L"," <US> <Comp>



<Year>        ::= (\u2-\u9) (\u0-\u9){3}



<YearRange>   ::= <Year> <US> L"-" <US> <Year>



<YearList>    ::= <Year> ["," <US> <Year>]+



<Comp>        ::= <PChars>* L"." <MS> L"All rights reserved.<BR>"



<License>     ::= L"//" <MS> <PChars>*


<LangEntry>   ::= L"#language" <MS> <LangCode> <ME>
                  [<String> <ME>]+






4
MODULE_UNI_FILE Content
This section defines the tag syntax for content in a Unicode file specified in 
the MODULE_UNI_FILE entry of an INF file's [Defines] section.

Prototype

<InfUnicodeFile> ::= <Header>

                     <BlankLine>*

                     <AbstractTag>?

                     <BlankLine>*

                     <DescriptionTag>?

                     <BlankLine>*





<AbstractTag>    ::= L"#string" <MS> L"STR_MODULE_ABSTRACT" <ME>

                     <LangEntry>+



<DescriptionTag> ::= L"#string" <MS> L"STR_MODULE_DESCRIPTION" <ME>

                     <LangEntry>+




Example

// /** @file

// TerminalDxe Module Localized Abstract and Description Content

//

// Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved.<BR>

//

// This program and the accompanying materials

// are licensed and made available under the terms and conditions of the BSD

// License which accompanies this distribution.

// The full text of the license may be found at

// http://opensource.org/licenses/bsd-license.php

// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,

// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

//

// **/





#string STR_MODULE_ABSTRACT

#language en-US

"Terminal module installs Simple Text Input(ex)/Out protocols for serial "

"devices."



#string STR_MODULE_DESCRIPTION #language en-US

"This module will install Simple Text Input (Ex) protocol and Simple Test "

"Output protocols based on Serial I/O protocol for serial devices including "

"hotplug serial devices."


5
Module Extra File Content
This section defines the tag syntax for content in a Unicode file specified in 
an extra file specified in a [UserExtensions.TianoCore."ExtraFiles"] section of 
an INF file.

Prototype

<InfUnicodeFile>  ::= <Header>

                      <BlankLine>*

                      <PropertyName>?

                      <BlankLine>*



<PropertyName>    ::= L"#string" <MS>

                      L"STR_PROPERTIES_MODULE_NAME" <ME>

                      <LangEntry>+




Example

// /** @file

// TerminalDxe Localized Strings and Content

//

// Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>

//

// This program and the accompanying materials

// are licensed and made available under the terms and conditions of

// the BSD License which accompanies this distribution. The full text

// of the license may be found at

// http://opensource.org/licenses/bsd-license.php

// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS"

// BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER

// EXPRESS OR IMPLIED.

//

// **/



#string STR_PROPERTIES_MODULE_NAME

#language en-US

"Terminal DXE Driver"

6
PACKAGE_UNI_FILE Content
This section defines the tag syntax for content in a Unicode file specified in 
the PACKAGE_UNI_FILE entry of a DEC file's [Defines] section.

Prototype

<DecUnicodeFile>      ::= <Header>

                          <BlankLine>*

                          <AbstractTag>?

                          <BlankLine>*

                          <DescriptionTag>?

                          <BlankLine>*

                          <PcdErrorTags>*

                          <BlankLine>*

                          <PcdHelpTags>*

                          <BlankLine>*

                          <PcdPromptTags>*

                          <BlankLine>*



<AbstractTag>         ::= L"#string" <MS>

                          L"STR_PACKAGE_ABSTRACT" <ME>

                          <LangEntry>+



<DescriptionTag>      ::= L"#string" <MS>

                          L"STR_PACKAGE_DESCRIPTION" <ME>

                          <LangEntry>+



<ENO>                 ::= (\u0-\u9\ua-\uf\uA-\uF){8}



<PcdErrorTags>        ::= L"#string" <MS>

                          L"STR_" <Tsp> L"_ERR_" <ENO> <ME>

                          <LangEntry>+



<Tsp>                 ::= <TokenSpaceGuidCName>



<PcdName              ::= <CName>



<TokenSpaceGuidCName> ::= <CName>



<PCD>                 ::= <TokenSpaceGuidCName> L"_" <PcdName>



<CName>               ::= (\ua-\uz\uA-\uZ) (\ua-\uz\uA-\uZ\u0-\u9)*



<PcdHelpTags>         ::= L"#string" <MS> L"STR_" <PCD> L"_HELP" <ME>

                          <LangEntry>+



<PcdPromptTags>       ::= L"#string" <MS> L"STR_" <PCD> L"_PROMPT" <ME>

                          <LangEntry>+



Example

// /** @file

// Package help, error and prompt strings.

//

// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>

//

// This program and the accompanying materials are licensed and made available

// under the terms and conditions of the BSD License which accompanies this

// distribution.

// The full text of the license may be found at

// http://opensource.org/licenses/bsd-license.php

//

// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,

// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

//

// **/



#string STR_PACKAGE_ABSTRACT

#language en-US

"This package provides network modules that conform to UEFI 2.2 specification."



#string STR_PACKAGE_DESCRIPTION

#language en-US

"This package provides network modules that conform to UEFI 2.2 specification."





#string STR_gEfiNetworkPkgTokenSpaceGuid_PcdIpsecCertificateEnabled_PROMPT

#language en-US

"Enable IPsec IKEv2 Certificate Authentication."



#string STR_gEfiNetworkPkgTokenSpaceGuid_PcdIpsecCertificateEnabled_HELP

#language en-US

"Indicates if the IPsec IKEv2 Certificate Authentication feature is enabled or 
not.<BR><BR>"

"TRUE  - Certificate Authentication feature is enabled.<BR>"

"FALSE - Does not support Certificate Authentication.<BR>"





#string STR_gEfiNetworkPkgTokenSpaceGuid_PcdIpsecUefiCaFile_PROMPT

#language en-US

"CA file."



#string STR_gEfiNetworkPkgTokenSpaceGuid_PcdIpsecUefiCaFile_HELP

#language en-US

"CA certificate used by IPsec."





#string STR_gEfiNetworkPkgTokenSpaceGuid_PcdIpsecUefiCaFileSize_PROMPT

#language en-US

"CA file's size."



#string STR_gEfiNetworkPkgTokenSpaceGuid_PcdIpsecUefiCaFileSize_HELP

#language en-US

"CA certificate file's size."





#string STR_gEfiNetworkPkgTokenSpaceGuid_PcdIpsecUefiCertificate_PROMPT

#language en-US

"Pubic Key for remote peer."



#string STR_gEfiNetworkPkgTokenSpaceGuid_PcdIpsecUefiCertificate_HELP

#language en-US

"X509 certificate as Public Key which is used by IPsec (DER format)"





#string STR_gEfiNetworkPkgTokenSpaceGuid_PcdIpsecUefiCertificateSize_PROMPT

#language en-US

"Pubic Key's size."



#string STR_gEfiNetworkPkgTokenSpaceGuid_PcdIpsecUefiCertificateSize_HELP

#language en-US

"X509 certificate as Public Key's size."





#string STR_gEfiNetworkPkgTokenSpaceGuid_PcdIpsecUefiCertificateKey_PROMPT

#language en-US

"Private Key."



#string STR_gEfiNetworkPkgTokenSpaceGuid_PcdIpsecUefiCertificateKey_HELP

#language en-US

"Private Key used by IPsec (PEM format)."





#string STR_gEfiNetworkPkgTokenSpaceGuid_PcdIpsecUefiCertificateKeySize_PROMPT

#language en-US

"Private Key's size."



#string STR_gEfiNetworkPkgTokenSpaceGuid_PcdIpsecUefiCertificateKeySize_HELP

#language en-US

"Private Key's size."

7
Package Extra File Content
This section defines the tag syntax for content in a Unicode file specified in 
the entry of a DEC file's [UserExtensions.TianoCore. "ExtraFiles"] section.

Prototype

<DecUnicodeFile>      ::= <Header>

                          <BlankLine>*

                          <PropertyName>?

<PropertyName>        ::= L"#string" <MS>
                                                                     
L"STR_PROPERTIES_PACKAGE_NAME" <ME>
                          <LangEntry>+





Example

// /** @file

// Network Package Localized Strings and Content.

//

// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>

//

// This program and the accompanying materials are licensed and made available

// under the terms and conditions of the BSD License which accompanies this

// distribution.

// The full text of the license may be found at

// http://opensource.org/licenses/bsd-license.php

//

// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,

// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

//

// **/



#string STR_PROPERTIES_PACKAGE_NAME

#language en-US

"Network package"


Larry Hauch
Intel Corporation
SSG, STO, Platform Software Infrastructure
2800 Center Dr.
DuPont, WA 98327
Work: (253) 371-8550

------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to