def translations_for_field(field):
 if (field is None):
  return {}
 translation_id = getattr(field, 'id')
 qs = Translation.objects.filter(id=translation_id, localized_string__isnull=False)
 translations = dict(qs.values_list('locale', 'localized_string'))
 return translations

def translations_for_field ( field ) : if ( field is None ) : return { } translation_id = getattr ( field , 'id' ) qs = Translation . objects . filter ( id = translation_id , localized_string__isnull = False ) translations = dict ( qs . values_list ( 'locale' , 'localized_string' ) ) return translations
return all the translations for a given field .