From 030258fede3383fe8c4481a5e98382148cc86245 Mon Sep 17 00:00:00 2001 From: NicolasGrosjean Date: Fri, 16 Apr 2021 22:14:25 +0200 Subject: [PATCH] Reduce false positive Avoid extraction fake translation of empty string --- src/extract_existing_translation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extract_existing_translation.py b/src/extract_existing_translation.py index a92e7b0..f25e3d0 100644 --- a/src/extract_existing_translation.py +++ b/src/extract_existing_translation.py @@ -50,7 +50,7 @@ def extract_translation_from_yml_file(source_loc_file, dest_loc_file, extracted_ source_texts, _ = file_to_keys_and_values(source_loc_file) dest_texts, _ = file_to_keys_and_values(dest_loc_file) for source_key in source_texts.keys(): - if source_key in dest_texts.keys(): + if source_key in dest_texts.keys() and source_texts[source_key]['value'] != '': extracted_translation[source_texts[source_key]['value']] = dest_texts[source_key]['value']