diff options
Diffstat (limited to 'tests/i18n/sampleproject/update_catalogs.py')
| -rwxr-xr-x | tests/i18n/sampleproject/update_catalogs.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/i18n/sampleproject/update_catalogs.py b/tests/i18n/sampleproject/update_catalogs.py index 55bf1656a2..8780f629e4 100755 --- a/tests/i18n/sampleproject/update_catalogs.py +++ b/tests/i18n/sampleproject/update_catalogs.py @@ -31,7 +31,7 @@ import re import sys proj_dir = os.path.dirname(os.path.abspath(__file__)) -sys.path.append(os.path.abspath(os.path.join(proj_dir, '..', '..', '..'))) +sys.path.append(os.path.abspath(os.path.join(proj_dir, "..", "..", ".."))) def update_translation_catalogs(): @@ -41,16 +41,16 @@ def update_translation_catalogs(): prev_cwd = os.getcwd() os.chdir(proj_dir) - call_command('makemessages') - call_command('compilemessages') + call_command("makemessages") + call_command("compilemessages") # keep the diff friendly - remove 'POT-Creation-Date' - pofile = os.path.join(proj_dir, 'locale', 'fr', 'LC_MESSAGES', 'django.po') + pofile = os.path.join(proj_dir, "locale", "fr", "LC_MESSAGES", "django.po") with open(pofile) as f: content = f.read() - content = re.sub(r'^"POT-Creation-Date.+$\s', '', content, flags=re.MULTILINE) - with open(pofile, 'w') as f: + content = re.sub(r'^"POT-Creation-Date.+$\s', "", content, flags=re.MULTILINE) + with open(pofile, "w") as f: f.write(content) os.chdir(prev_cwd) |
