misc: correctly reset current directory after translations (#36331)
This commit is contained in:
parent
9a31e83d10
commit
56b133c7a7
5
setup.py
5
setup.py
|
@ -71,17 +71,18 @@ class compile_translations(Command):
|
|||
pass
|
||||
|
||||
def run(self):
|
||||
curdir = os.getcwd()
|
||||
try:
|
||||
from django.core.management import call_command
|
||||
for path, dirs, files in os.walk('chrono'):
|
||||
if 'locale' not in dirs:
|
||||
continue
|
||||
curdir = os.getcwd()
|
||||
os.chdir(os.path.realpath(path))
|
||||
call_command('compilemessages')
|
||||
os.chdir(curdir)
|
||||
except ImportError:
|
||||
sys.stderr.write('!!! Please install Django >= 1.4 to build translations\n')
|
||||
finally:
|
||||
os.chdir(curdir)
|
||||
|
||||
|
||||
class compile_scss(Command):
|
||||
|
|
Loading…
Reference in New Issue