Skip to content

fix: change display name state [WPB-9653] (#3094) #484

fix: change display name state [WPB-9653] (#3094)

fix: change display name state [WPB-9653] (#3094) #484

name: "Crowdin Action"
# **What it does**: Upload strings to crowdin project for translations and creates a PR with updates.
# **Why we have it**: We want to externalize and automate the translations process.
# **Who does it impact**: Everyone collaborating on the project.
# For more info: https://github.com/crowdin/github-action/blob/master/action.yml
on:
push:
branches: [ develop ]
workflow_dispatch:
inputs:
baseBranch:
description: "Base branch to create the PR and update the localization strings"
required: true
default: "develop"
type: choice
options:
- "develop"
- "release/candidate"
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: "Set base branch from input"
env:
INPUT_BASE_BRANCH: ${{github.event.inputs.baseBranch}}
if: "${{ github.event.inputs.baseBranch != '' }}"
run: echo "BASE_BRANCH=$INPUT_BASE_BRANCH" >> "$GITHUB_ENV"
- name: "Set base branch to default branch"
if: "${{ github.event.inputs.baseBranch == '' }}"
run: echo "BASE_BRANCH=develop" >> "$GITHUB_ENV"
- name: Crowdin action
uses: crowdin/github-action@v1
with:
project_id: ${{ secrets.CROWDIN_PROJECT_ID }}
token: ${{ secrets.CROWDIN_API_TOKEN }}
upload_sources: true
download_translations: true
upload_translations: false
create_pull_request: true
localization_branch_name: chore/sync-and-update-localization-${{env.BASE_BRANCH}}
commit_message: "chore: update localization strings via Crowdin"
pull_request_title: "chore: update localization strings via Crowdin"
pull_request_body: "This PR pulls in the latest localization translations 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"