#NEWLINE# def search_translation( key , locale = config . get ( 'locale' ) ) : #NEWLINE# #INDENT# splitted_key = key . split ( config . get ( 'namespace_delimiter' ) ) #NEWLINE# if ( not splitted_key ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# namespace = splitted_key [ : ( - 1 ) ] #NEWLINE# if ( ( not namespace ) and ( '{namespace}' not in config . get ( 'filename_format' ) ) ) : #NEWLINE# #INDENT# for directory in config . get ( 'load_path' ) : #NEWLINE# #INDENT# load_directory ( directory , locale ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# for directory in config . get ( 'load_path' ) : #NEWLINE# #INDENT# recursive_search_dir ( namespace , '' , directory , locale )