Skip to content

Commit 27c3544

Browse files
committed
f
1 parent a957e37 commit 27c3544

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/translator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ def translate_directory(language, source_path, dest_path, model, num_threads, cl
425425
translate_files = None # Need to initialize it here to avoid error
426426
if args.file_paths:
427427
# Translate only the indicated file
428-
translate_files = [f.strip() for f in args.file_paths.split(',') if f]
428+
translate_files = list(set([f.strip() for f in args.file_paths.split(',') if f]))
429429
for file_path in translate_files:
430430
#with tqdm(total=len(all_markdown_files), desc="Translating Files") as pbar:
431431
with concurrent.futures.ThreadPoolExecutor(max_workers=num_threads) as executor:

0 commit comments

Comments
 (0)