#NEWLINE# def compile_mo( lang = None ) : #NEWLINE# #INDENT# langs = getlangs ( lang ) #NEWLINE# puts ( ( 'Compiling %s' % ', ' . join ( langs ) ) ) #NEWLINE# for loc in langs : #NEWLINE# #INDENT# with indent ( 2 ) : #NEWLINE# #INDENT# puts ( ( 'Compiling %s' % loc ) ) #NEWLINE# #UNINDENT# shell_call ( ( 'django-admin.py compilemessages -l %(lang)s ' % { #NEWLINE# #INDENT# 'lang' : loc , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# for app in I18N_APPS : #NEWLINE# #INDENT# with indent ( 4 ) : #NEWLINE# #INDENT# puts ( ( 'Compiling app %s' % app ) ) #NEWLINE# #UNINDENT# with chdir ( os . path . join ( REPO_ROOT , app ) ) : #NEWLINE# #INDENT# shell_call ( ( 'django-admin.py compilemessages -l %(lang)s' % { #NEWLINE# #INDENT# 'lang' : loc , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# #UNINDENT# #UNINDENT# puts ( colored . green ( ( 'sucesssfuly compiled %s' % app ) ) )