How to integrate a GitHub repo to a Transifex project?

I want to translate a textbook from English(United States) to Chinese(Simplified) on Transifex. As I know, most project on Transifex is software or website project, but not a book. “All the material for this course (web site, autograders, PowerPoint, textbook, figures for the textbook, assignments, etc) is in this GitHub repository.” But I don’t know how to configure the YAML text that will sync all the documents in the GitHub repo.
That is the YAML text I tried to submit but no files synced successfully:

filters:
  - filter_type: dir
    file_format: PO
    source_file_extension: po
    source_language: en
    source_file_dir: /
    translation_files_expression: /<lang>/
settings:
    language_mapping:
        en: en_US
        zh: zh_CN

Who can help me to edit the YAML text correctly? Thanks a lot.

Hello Lee

From the repository I notice the books are in two file formats; HTML and kindle. Transifex supports HTML. This file: https://github.com/WePosts/py4e-zh_CN/blob/master/README.md describes the location of the source files for the ebook.

Therefore, based on the readme file I mentioned above this is what your YAML config should look like:

filters:

  • filter_type: dir
    file_format: HTML
    source_file_extension: html
    source_language: en
    source_file_dir: book3/html/
    translation_files_expression: ‘translations/<lang>/’

Please re-configure your integration with the above YAML file and let me know how it goes.

Have a nice day!

Anthony

2 Likes