diff --git a/.github/workflows/build-warnings.yml.BACKUP b/.github/workflows/backup/build-warnings.yml similarity index 96% rename from .github/workflows/build-warnings.yml.BACKUP rename to .github/workflows/backup/build-warnings.yml index 6ae6ba603c2d..41a59c38b79c 100644 --- a/.github/workflows/build-warnings.yml.BACKUP +++ b/.github/workflows/backup/build-warnings.yml @@ -4,7 +4,6 @@ on: push: branches: - master - workflow_dispatch: jobs: @@ -47,7 +46,7 @@ jobs: run: | cd ${{ env.DOC_PATH }} sphinx-build -T -E -n -v -w build_log.txt -q -b html -d _build/doctrees . _build/html - + - name: Store build log uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/greetings4firstIssueOrPullRequest.yml.BACKUP b/.github/workflows/backup/greetings4firstIssueOrPullRequest.yml similarity index 100% rename from .github/workflows/greetings4firstIssueOrPullRequest.yml.BACKUP rename to .github/workflows/backup/greetings4firstIssueOrPullRequest.yml diff --git a/.github/workflows/link-checker.yml.BACKUP b/.github/workflows/backup/link-checker.yml similarity index 100% rename from .github/workflows/link-checker.yml.BACKUP rename to .github/workflows/backup/link-checker.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d141834a99eb..261be42993b2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,6 +1,9 @@ name: Tests on: + push: + branches: + - master workflow_dispatch: jobs: diff --git a/.github/workflows/translations.yml b/.github/workflows/translations.yml new file mode 100644 index 000000000000..3c3c6398a84e --- /dev/null +++ b/.github/workflows/translations.yml @@ -0,0 +1,36 @@ +name: Update translations + +on: + push: + branches: + - master + schedule: + - cron: '7 0 * * *' # every day at 00:07 UTC + workflow_dispatch: + +jobs: + synchronize-with-crowdin: + runs-on: ubuntu-latest + if: github.repository == 'openaps/AndroidAPSdocs' + permissions: + contents: write + pull-requests: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: crowdin action + uses: crowdin/github-action@v1 + with: + upload_sources: true + upload_translations: false + download_translations: true + localization_branch_name: l10n_translations + create_pull_request: true + pull_request_title: 'New translations' + pull_request_body: 'New translations' + pull_request_base_branch_name: 'main' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} \ No newline at end of file diff --git a/crowdin.yml b/crowdin.yml index 64fc581ab29e..9abd15347c3d 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -1,7 +1,11 @@ +project_id: '310610' +api_token_env: CROWDIN_PERSONAL_TOKEN +preserve_hierarchy: true + files: - source: /docs/EN/**/*.md - translation: /docs/CROWDIN/%two_letters_code%/**/%original_file_name% + translation: /docs/CROWDIN/%two_letters_code%/%original_path%/%original_file_name% - source: /docs/EN/**/*.rst - translation: /docs/CROWDIN/%two_letters_code%/**/%original_file_name% + translation: /docs/CROWDIN/%two_letters_code%/%original_path%/%original_file_name% - source: /docs/EN/images/**/* - translation: /docs/CROWDIN/%two_letters_code%/images/**/%original_file_name% + translation: /docs/CROWDIN/%two_letters_code%/images/%original_path%/%original_file_name%