From 4871474859f39c12673ec8f51cc062af07cf9886 Mon Sep 17 00:00:00 2001 From: Adam Blackburn Date: Sat, 29 May 2010 17:32:40 +0800 Subject: [PATCH] Debian patch: xx-get_translations.patch --- setup.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index e97ea6e..2234dac 100644 --- a/setup.py +++ b/setup.py @@ -436,7 +436,10 @@ class get_translations(Command): import urllib, shutil if os.path.exists('translations'): shutil.rmtree('translations/') + if os.path.exists('po'): + shutil.rmtree('po/') os.makedirs('translations') + os.makedirs('po') filename, headers = urllib.urlretrieve('http://wicd.sourceforge.net/translator/idlist/') id_file = open(filename, 'r') lines = id_file.readlines() @@ -452,11 +455,10 @@ class get_translations(Command): except: print >> sys.stderr, 'error downloading language %s' % id else: - shutil.move(pofile, lang_identifier+'.po') + shutil.move(pofile, 'po/'+lang_identifier+'.po') os.makedirs('translations/'+lang_identifier+'/LC_MESSAGES') os.system('msgfmt --output-file=translations/' + lang_identifier + - '/LC_MESSAGES/wicd.mo ' + lang_identifier + '.po') - os.remove(lang_identifier+'.po') + '/LC_MESSAGES/wicd.mo po/' + lang_identifier + '.po') class uninstall(Command):