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

chore: source updated from crowdin #2305

Merged
merged 6 commits into from
Oct 9, 2023
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
59 changes: 59 additions & 0 deletions .github/workflows/crowdin-source-updater.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: "Crowdin Action"

# **What it does**: Download new source from crowdin project.
# **Why we have it**: We want to be able to pull-update base (EN) translations to the project.
# **Who does it impact**: Everyone collaborating on the project, and the translators.
# For more info: https://github.com/crowdin/github-action/blob/master/action.yml

on:
workflow_dispatch:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove or is it needed for the GH action to run?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we need the workflow_dispatch so we can trigger it manually, I removed the push block tho, the test ran successfully

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so we can trigger it manually

Who, exactly, and how? We, developers, by hitting the button in Actions, or we have some more stuff going on?


concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
synchronize-with-crowdin:
runs-on: ubuntu-latest

env:
GITHUB_USER: "AndroidBob"
GITHUB_TOKEN: ${{ secrets.ANDROID_BOB_GH_TOKEN }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: "Exit if the branch is not default 'develop'"
run: |
if [[ "${{ github.ref }}" != "refs/heads/develop" ]]; then
echo "Branch is not develop, exiting."
exit 0
fi

- name: Crowdin action
uses: crowdin/github-action@v1
with:
project_id: ${{ secrets.CROWDIN_PROJECT_ID }}
token: ${{ secrets.CROWDIN_API_TOKEN }}

download_sources: true
push_sources: true
upload_sources: false
download_translations: true
upload_translations: false

create_pull_request: true
localization_branch_name: chore/sync-and-update-localization-source
commit_message: "chore: update localization sources from Crowdin"
pull_request_title: "chore: update localization sources from Crowdin"
pull_request_body: "This PR pulls in the latest localization **source** from Crowdin."
github_user_name: "AndroidBob"
github_user_email: "[email protected]"

pull_request_labels: "l10n, crowdin"
pull_request_assignees: "AndroidBob"
pull_request_team_reviewers: "wireapp/android"
pull_request_base_branch_name: ${{env.BASE_BRANCH}}

config: "crowdin.yml"
Loading