diff --git a/df_translation_toolkit/create_mod/from_template.py b/df_translation_toolkit/create_mod/from_template.py index 89e3d1f..9ed3096 100644 --- a/df_translation_toolkit/create_mod/from_template.py +++ b/df_translation_toolkit/create_mod/from_template.py @@ -102,7 +102,8 @@ def get_dictionaries(translation_path: Path, language: str) -> Dictionaries: for file in translation_path.glob(f"*{po_file}*{language}.po"): if file.is_file() and file.stat().st_mtime > mtime: po_files[po_file] = file - if not po_files[po_file].is_file(): + + if po_file not in po_files: msg = f"Unable to find {po_file} po file for language {language}" raise ValueError(msg)