components/policy/tools/template_writers/writers/plist_strings_writer.py
def WritePolicy(self, policy):
    '''Add strings to the stringtable corresponding a given policy.

    Args:
      policy: The policy for which the strings will be added to the
        string table.
    '''
    desc = policy['desc']
    if policy['type'] in ('int-enum', 'string-enum', 'string-enum-list'):
      # Append the captions of enum items to the description string.
      item_descs = []
      for item in policy['items']:
        item_descs.append(str(item['value']) + ' - ' + item['caption'])
      desc = '\n'.join(item_descs) + '\n' + desc
    if self.HasExpandedPolicyDescription(policy):
      desc += '\n' + self.GetExpandedPolicyDescription(policy)

    self._AddToStringTable(policy['name'], policy['label'], desc)
Add strings to the stringtable corresponding a given policy.

    Args:
      policy: The policy for which the strings will be added to the
        string table.
    
Add strings to the stringtable corresponding a given policy.
Add strings to the stringtable corresponding a given policy .
def WritePolicy(self, policy):
    desc = policy['desc']
    if policy['type'] in ('int-enum', 'string-enum', 'string-enum-list'):
      item_descs = []
      for item in policy['items']:
        item_descs.append(str(item['value']) + ' - ' + item['caption'])
      desc = '\n'.join(item_descs) + '\n' + desc
    if self.HasExpandedPolicyDescription(policy):
      desc += '\n' + self.GetExpandedPolicyDescription(policy)
    self._AddToStringTable(policy['name'], policy['label'], desc)
def WritePolicy ( self , policy ) : desc = policy [ 'desc' ] if policy [ 'type' ] in ( 'int-enum' , 'string-enum' , 'string-enum-list' ) : item_descs = [ ] for item in policy [ 'items' ] : item_descs . append ( str ( item [ 'value' ] ) + ' - ' + item [ 'caption' ] ) desc = '\n' . join ( item_descs ) + '\n' + desc if self . HasExpandedPolicyDescription ( policy ) : desc += '\n' + self . GetExpandedPolicyDescription ( policy ) self . _AddToStringTable ( policy [ 'name' ] , policy [ 'label' ] , desc )
Add strings to the stringtable corresponding a given policy.
Add strings to the stringtable corresponding a given policy .
'''Add strings to the stringtable corresponding a given policy.

    Args:
      policy: The policy for which the strings will be added to the
        string table.
    ''' # Append the captions of enum items to the description string.
self
policy
The policy for which the strings will be added to the
string table.
The policy for which the strings will be added to the string table .