Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(translations): Crowdin does not allow slashes #9362

Merged
merged 4 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/crowdin-branch-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
outputs:
branch: ${{ steps.extract_current_branch.outputs.branch }}
pr: ${{ steps.get-prs.outputs.pr }}
modified_branch_name: ${{ steps.extract_modified_branch_name.outputs.modified_branch_name }}
steps:
- name: Extract current branch name
shell: bash
Expand All @@ -33,7 +34,11 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CURRENT_BRANCH: ${{ steps.extract_current_branch.outputs.branch }}


- name: Modified branch name
run: echo "modified_branch_name="${{ steps.extract_current_branch.outputs.branch }} | sed 's#/#-#g'"" >> "$GITHUB_OUTPUT"
id: extract_modified_branch_name

github_cleanup:
runs-on: ubuntu-latest
needs: prestep
Expand Down Expand Up @@ -69,5 +74,5 @@ jobs:
if: needs.prestep.outputs.branch != 'main'
uses: crowdin/github-action@c953b17499daa6be3e5afbf7a63616fb02d8b18d
with:
command: branch delete ${{ needs.prestep.outputs.branch }}
command: ${{ needs.prestep.outputs.modified_branch_name }}
command_args: -v
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ jobs:
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> "$GITHUB_OUTPUT"
id: extract_current_branch

- name: Modified branch name
run: echo "modified_branch_name="${{ steps.extract_current_branch.outputs.branch }} | sed 's#/#-#g'"" >> "$GITHUB_OUTPUT"
id: extract_modified_branch_name

- name: Checkout
uses: actions/checkout@v3
with:
Expand All @@ -32,7 +36,7 @@ jobs:
- name: Crowdin push main as baseline
uses: crowdin/github-action@c953b17499daa6be3e5afbf7a63616fb02d8b18d
with:
crowdin_branch_name: ${{ steps.extract_current_branch.outputs.branch }}
crowdin_branch_name: ${{ steps.extract_modified_branch_name.outputs.modified_branch_name }}
upload_sources: true
upload_translations_args: --import-eq-suggestions --auto-approve-imported --verbose
upload_translations: true
Expand All @@ -44,7 +48,7 @@ jobs:
- name: Crowdin sources push
uses: crowdin/github-action@c953b17499daa6be3e5afbf7a63616fb02d8b18d
with:
crowdin_branch_name: ${{ steps.extract_current_branch.outputs.branch }}
crowdin_branch_name: ${{ steps.extract_modified_branch_name.outputs.modified_branch_name }}
upload_sources: true
upload_sources_args: --auto-update --verbose
upload_translations: false
10 changes: 7 additions & 3 deletions .github/workflows/crowdin-reusable-translation-download.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,22 @@ jobs:
with:
ref: ${{ inputs.branch }}

- name: Modified branch name
run: echo "modified_branch_name="${{ inputs.branch }} | sed 's#/#-#g'"" >> "$GITHUB_OUTPUT"
id: extract_modified_branch_name

- name: Check translation progress
# when main just pull whatever you have (aka skip this) - need to test
if: ${{ inputs.branch != 'main' }}
uses: crowdin/github-action@c953b17499daa6be3e5afbf7a63616fb02d8b18d
with:
command: 'status translation'
command_args: '-b ${{ inputs.branch }} --fail-if-incomplete'

command_args: '-b ${{ steps.extract_modified_branch_name.outputs.modified_branch_name }} --fail-if-incomplete'
- name: Synchronize with Crowdin
uses: crowdin/github-action@c953b17499daa6be3e5afbf7a63616fb02d8b18d
with:
crowdin_branch_name: ${{ inputs.branch }}
crowdin_branch_name: ${{ steps.extract_modified_branch_name.outputs.modified_branch_name }}
upload_sources: false
upload_translations: false
download_translations: true
Expand Down
Loading