[Github integration] source_file_dir: exclude sub directories

Hello,

I’ve a project set up this way:
Several file.md documents in root directory and subdirectories.

DirA / DocA.md
DocB.md
DocC.md

the translations are in subdirectory named by language, like

it/DirA/DocA.md
it/DocB.md
it/DocC.md

here is the yaml file I have

filters:
  - filter_type: dir
    file_format: GITHUBMARKDOWN
    source_file_extension: md
    source_language: en
    source_file_dir: /
    translation_files_expression: '/<lang>'

it’s importing correctly the markdown files, but I’d like the languages subdirectories to be ignored (it, fr etc)
Is there any way to do this?

Hello @ashledombos,

According to your question, could you please clarify why do you want the language subdirectories to be ignored? Also, something else that I would like you to confirm is that from the above YAML config file the DocA.md which is hosted under the DirA folder on your Github repository does it pushed to Transifex as a source file?

Thank you in advance.

Kind regards,
Panagiotis

Hello @Panagiotis_Kavrakis, thank you for your reply.

It’s because the .md files in language subdirectories are imported as a source material, which they’re not. Furthermore, I fear some kind of recursive loop where pushed translations are imported as source (though I’ve not pushed anything to github yet, so I can’t tell it will happen)

Yes, all is imported, whether it’s in root directory or subdirectories.

Hi @ashledombos,

I read your case above and I think that the issue is caused by the way you defined the path in the source_file_dir field.

I assume that the source files are stored under en directory.

So, can you please try the following and let me know if this works?

filters:
- filter_type: dir
file_format: GITHUBMARKDOWN
source_file_extension: md
source_language: en
source_file_dir: en/
translation_files_expression: '/<lang>'