#NEWLINE# @ classmethod #NEWLINE# def extract_field_analyzed_translations( cls , obj , field , db_field = None ) : #NEWLINE# #INDENT# '\n        Returns a dict containing translations for each language-specific\n        analyzer for the given field.\n        ' #NEWLINE# if ( db_field is None ) : #NEWLINE# #INDENT# db_field = ( '%s_id' % field ) #NEWLINE# #UNINDENT# extend_with_me = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for ( analyzer , languages ) in SEARCH_ANALYZER_MAP . iteritems ( ) : #NEWLINE# #INDENT# extend_with_me [ ( '%s_%s' % ( field , locale ) ) ] = list ( set ( ( string for ( locale , string ) in obj . translations [ getattr ( obj , db_field ) ] if ( locale . lower ( ) in languages ) ) ) ) #NEWLINE# #UNINDENT# return extend_with_me