Skip to content

Commit a547ef0

Browse files
Fixed django#2604 -- Got compile-messages.py working on win32. Thanks for the patch, Jarosław Zabiełło
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3672 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent e7424f0 commit a547ef0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

django/bin/compile-messages.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ def compile_messages():
2626
# See http://cyberelk.net/tim/articles/cmdline/ar01s02.html
2727
os.environ['djangocompilemo'] = pf + '.mo'
2828
os.environ['djangocompilepo'] = pf + '.po'
29-
cmd = 'msgfmt -o "$djangocompilemo" "$djangocompilepo"'
29+
if sys.platform == 'win32': # Different shell-variable syntax
30+
cmd = 'msgfmt -o "%djangocompilemo%" "%djangocompilepo%"'
31+
else:
32+
cmd = 'msgfmt -o "$djangocompilemo" "$djangocompilepo"'
3033
os.system(cmd)
3134

3235
if __name__ == "__main__":

0 commit comments

Comments
 (0)