Skip to content

Commit

Permalink
fix transifex filter
Browse files Browse the repository at this point in the history
  • Loading branch information
signedav committed Oct 9, 2023
1 parent f1fdbc0 commit 0bb58e6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/.utils/transifex_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])}.<lang>.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]}.<lang>.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")
Expand Down

0 comments on commit 0bb58e6

Please sign in to comment.