Skip to content

Commit

Permalink
Merge pull request #34 from liminspace/develop
Browse files Browse the repository at this point in the history
0.0.16
  • Loading branch information
liminspace committed Jan 17, 2019
2 parents fa83c88 + 40a2b19 commit 3ffc17e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
0.0.16 (2019-01-17)
===================
* Fixed import


0.0.15 (2019-01-16)
===================
* Added metadata with import date


0.0.14 (2018-08-07)
===================
* Added supporting Django 2.1
2 changes: 1 addition & 1 deletion transtool/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '0.0.15'
__version__ = '0.0.16'

default_app_config = 'transtool.apps.TrantoolConfig'
8 changes: 6 additions & 2 deletions transtool/management/commands/transtool_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,12 @@ def copy_files(self, diff_info, imp_zip_file):
for fn in sorted(diff_info['new']):
content = z.read(fn)
po_path = os.path.join(TRANSTOOL_PROJECT_BASE_DIR, fn)
ext = os.path.splitext(po_path)[1]
try:
with open(po_path, 'wb') as f:
f.write(content)
self.update_import_datetime(po_path)
if ext == '.po':
self.update_import_datetime(po_path)
except IOError as e:
self.stdout.write(e.message)
self.stdout.write(' SKIP: {}'.format(fn))
Expand All @@ -126,10 +128,12 @@ def copy_files(self, diff_info, imp_zip_file):
fn_info = fn
content = z.read(fn)
po_path = os.path.join(TRANSTOOL_PROJECT_BASE_DIR, fn)
ext = os.path.splitext(po_path)[1]
try:
with open(po_path, 'wb') as f:
f.write(content)
self.update_import_datetime(po_path)
if ext == '.po':
self.update_import_datetime(po_path)
except IOError as e:
self.stdout.write(e.message)
self.stdout.write(' SKIP: {}'.format(fn_info))
Expand Down

0 comments on commit 3ffc17e

Please sign in to comment.