#NEWLINE# def _get_locale_dirs( include_core = True ) : #NEWLINE# #INDENT# '\n    Return a tuple (contrib name, absolute path) for all locale directories,\n    optionally including the django core catalog.\n    ' #NEWLINE# contrib_dir = os . path . join ( os . getcwd ( ) , 'django' , 'contrib' ) #NEWLINE# dirs = [ ] #NEWLINE# for contrib_name in os . listdir ( contrib_dir ) : #NEWLINE# #INDENT# path = os . path . join ( contrib_dir , contrib_name , 'locale' ) #NEWLINE# if os . path . isdir ( path ) : #NEWLINE# #INDENT# dirs . append ( ( contrib_name , contrib_name ) ) #NEWLINE# if ( contrib_name in HAVE_JS ) : #NEWLINE# #INDENT# dirs . append ( ( ( '%s-js' % contrib_name ) , path ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if include_core : #NEWLINE# #INDENT# dirs . insert ( 0 , ( 'core' , os . path . join ( os . getcwd ( ) , 'django' , 'conf' , 'locale' ) ) ) #NEWLINE# #UNINDENT# return dirs