Skip to content

Commit 508dc3c

Browse files
authored
Make sure that the TMX folder exist in Android extraction (#980)
1 parent 6b4800c commit 508dc3c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/scripts/tmx/tmx_android.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,15 @@ def storeTranslations(self, output_format):
111111

112112
for locale in self.translations:
113113
translations = self.translations[locale]
114+
storage_folder = os.path.join(self.storage_path, locale)
114115
storage_file = os.path.join(
115-
self.storage_path, locale,
116+
storage_folder,
116117
'cache_{0}_{1}'.format(locale, self.repository_name))
117118

119+
# Make sure that the TMX folder exists
120+
if not os.path.exists(storage_folder):
121+
os.mkdir(storage_folder)
122+
118123
if output_format != 'php':
119124
# Store translations in JSON format
120125
with open('{}.json'.format(storage_file), 'w') as f:

0 commit comments

Comments
 (0)