Commit d55d5c93 by Steve Strassmann

addressed Don\'s comments on pull request

parent 3fd004e2
...@@ -21,7 +21,7 @@ def merge(locale, target='django.po'): ...@@ -21,7 +21,7 @@ def merge(locale, target='django.po'):
""" """
For the given locale, merge django-partial.po, messages.po, mako.po -> django.po For the given locale, merge django-partial.po, messages.po, mako.po -> django.po
""" """
LOG.info('Merging locale=%s' % locale) LOG.info('Merging locale={0}'.format(locale))
locale_directory = messages_dir(locale) locale_directory = messages_dir(locale)
files_to_merge = ('django-partial.po', 'messages.po', 'mako.po') files_to_merge = ('django-partial.po', 'messages.po', 'mako.po')
validate_files(locale_directory, files_to_merge) validate_files(locale_directory, files_to_merge)
...@@ -45,7 +45,7 @@ def validate_files(dir, files_to_merge): ...@@ -45,7 +45,7 @@ def validate_files(dir, files_to_merge):
for path in files_to_merge: for path in files_to_merge:
pathname = os.path.join(dir, path) pathname = os.path.join(dir, path)
if not os.path.exists(pathname): if not os.path.exists(pathname):
raise Exception("File not found: %s" % pathname) raise Exception("File not found: {0}".format(pathname))
def main (): def main ():
configuration = get_config() configuration = get_config()
......
...@@ -22,15 +22,9 @@ class TestExtract(TestCase): ...@@ -22,15 +22,9 @@ class TestExtract(TestCase):
self.start_time = datetime.now() - timedelta(seconds=1) self.start_time = datetime.now() - timedelta(seconds=1)
super(TestExtract, self).setUp() super(TestExtract, self).setUp()
if not SETUP_HAS_RUN: if not SETUP_HAS_RUN:
self.run_main()
SETUP_HAS_RUN = True
def run_main(self):
# Run extraction script. Warning, this takes 1 minute or more # Run extraction script. Warning, this takes 1 minute or more
print "***********************"
print "***********************"
print "***********************"
extract.main() extract.main()
SETUP_HAS_RUN = True
def get_files (self): def get_files (self):
""" """
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment