diff --git a/docs/.utils/transifex_utils.py b/docs/.utils/transifex_utils.py index 5a1b3fb44..cae3e5261 100644 --- a/docs/.utils/transifex_utils.py +++ b/docs/.utils/transifex_utils.py @@ -33,9 +33,12 @@ def create_transifex_config(): if tx_slug: print(f"Found file with tx_slug defined: {relative_path}, {tx_slug}") f.write(f"[o:{TX_ORGANIZATION}:p:{TX_PROJECT}:r:{tx_slug}]\n") - f.write( - f"file_filter = {''.join(relative_path.split('.')[:-2])}..md\n" - ) + if ( + relative_path.count(".") == 1 + ): # if no dots defining language (to filter out the indes.de.md etc.) + f.write( + f"file_filter = {os.path.splitext(relative_path)[0]}..md\n" + ) f.write(f"source_file = {relative_path}\n") f.write(f"source_lang = {TX_SOURCE_LANG}\n") f.write(f"type = {TX_TYPE}\n\n")