Skip to content

Commit

Permalink
handling situations where folder is not provided
Browse files Browse the repository at this point in the history
  • Loading branch information
edmoss345 committed Oct 23, 2023
1 parent ea73c68 commit 57fe8ca
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/scripts/prepare_for_translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,14 @@ def main():

for group_info in split_groups_full:
name = group_info[0]
dest_path = group_info[1]
file_path = extract_result + '/' + name + '.json'
folder_name = ready_for_translation + '/' + dest_path + '/en'

#Check if destination folder information is provided
if len(group_info) >= 2:
dest_path = group_info[1]
folder_name = ready_for_translation + '/' + dest_path + '/en'
else:
folder_name = ready_for_translation + '/en'

if not os.path.exists(folder_name):
os.makedirs(folder_name)
Expand Down

0 comments on commit 57fe8ca

Please sign in to comment.