From 2442ceaa3f57093a48bca86a28c36230f8a10010 Mon Sep 17 00:00:00 2001 From: Georg Bauer Date: Fri, 7 Oct 2005 23:20:24 +0000 Subject: [PATCH] i18n: make-messages.py now correctly handles creation of new languages git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@799 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/bin/make-messages.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/django/bin/make-messages.py b/django/bin/make-messages.py index f8d822f5ec..6b72e04211 100755 --- a/django/bin/make-messages.py +++ b/django/bin/make-messages.py @@ -73,7 +73,8 @@ for (dirpath, dirnames, filenames) in os.walk("."): msgs = os.popen('msguniq %s' % potfile, 'r').read() open(potfile, 'w').write(msgs) -msgs = os.popen('msgmerge %s %s' % (pofile, potfile), 'r').read() +if os.path.exists(pofile): + msgs = os.popen('msgmerge %s %s' % (pofile, potfile), 'r').read() open(pofile, 'wb').write(msgs) os.unlink(potfile)