Skip to content

Commit

Permalink
ignore index.de.md in trans
Browse files Browse the repository at this point in the history
  • Loading branch information
signedav committed Oct 9, 2023
1 parent 7e6309a commit 8f61bb2
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions docs/.utils/transifex_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,14 @@ def create_transifex_config():

tx_slug = slugify(os.path.splitext(relative_path)[0])

if tx_slug:
if (
tx_slug and relative_path.count(".") == 1
): # if no dots defining language (to filter out the indes.de.md etc.)
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")
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"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 8f61bb2

Please sign in to comment.