def localize_common(obj, trans):
 if ('label' in trans):
  obj.label = trans['label']
 if ('description' in trans):
  obj.description = trans['description']

def localize_common ( obj , trans ) : if ( 'label' in trans ) : obj . label = trans [ 'label' ] if ( 'description' in trans ) : obj . description = trans [ 'description' ]
localize common attributes: label and description .