edk2toollib/windows/capsule/inf_generator2.py
def AddLocalizableString(self, Key: str, Value: str) -> None:
        '''Add a Localizable string to the collection of strings for this INF.

        Key     - the name of this string as it is used in the INF (e.g. "MfgName"). Note: the INF will typically
                  reference this string using % as delimiters (e.g. "%MfgName%"). Do not include the % characters
                  when calling this routine.
        Value   - the value of the localizable string as a string (e.g. "Firmware Manufacturer")
        '''
        # The inf spec says keys here should be "letters, digits, and/or other explicitly visible characters".
        # for simplicity, this just enforces that it must be a string that matches \w+
        if not (re.compile(r'\w+$')).match(Key):
            raise ValueError("Key has invalid chars.")
        self.LocalizableStrings[Key] = Value
Add a Localizable string to the collection of strings for this INF.

        Key     - the name of this string as it is used in the INF (e.g. "MfgName"). Note: the INF will typically
                  reference this string using % as delimiters (e.g. "%MfgName%"). Do not include the % characters
                  when calling this routine.
        Value   - the value of the localizable string as a string (e.g. "Firmware Manufacturer")
        
Add a Localizable string to the collection of strings for this INF.
Key     - the name of this string as it is used in the INF . Note: the INF will typically
reference this string using % as delimiters . Do not include the % characters
when calling this routine.
Value   - the value of the localizable string as a string
Add a Localizable string to the collection of strings for this INF . Key - the name of this string as it is used in the INF . Note : the INF will typically reference this string using % as delimiters . Do not include the % characters when calling this routine . Value - the value of the localizable string as a string
def AddLocalizableString(self, Key: str, Value: str) -> None:
        if not (re.compile(r'\w+$')).match(Key):
            raise ValueError("Key has invalid chars.")
        self.LocalizableStrings[Key] = Value
def AddLocalizableString ( self , Key : str , Value : str ) -> None : if not ( re . compile ( r'\w+$' ) ) . match ( Key ) : raise ValueError ( "Key has invalid chars." ) self . LocalizableStrings [ Key ] = Value
Add a Localizable string to the collection of strings for this INF.
Add a Localizable string to the collection of strings for this INF .
'''Add a Localizable string to the collection of strings for this INF.

        Key     - the name of this string as it is used in the INF (e.g. "MfgName"). Note: the INF will typically
                  reference this string using % as delimiters (e.g. "%MfgName%"). Do not include the % characters
                  when calling this routine.
        Value   - the value of the localizable string as a string (e.g. "Firmware Manufacturer")
        ''' # The inf spec says keys here should be "letters, digits, and/or other explicitly visible characters". # for simplicity, this just enforces that it must be a string that matches \w+
self
Key
str
Value
str