chore: add replexica to ci (#16306)
* chore: Add replexica for AI i18n * Add write permission * moved i18n to repo root * Added checkout to i18n job * Added contents:read * Added actions: write for testing * Updated contents: write * feat: add missing translations * Checking out the i18n files from PR head sha * Added the rest of the languages * Added i18n to list of required checks * Added a comment explaining the custom common.json checkout * Commented out languages to not crush Replexica usage * Add a fetch-depth: 2 * Supporting fetch of external fork branch * Put back the dynamic sha * Added a check for null so this can run manually and not just on PRs * Removed comments * feat: update translations * Reverted de and fr to re-run with new settings * feat: update translations * Reverted de and fr to re-run with new settings * feat: update translations * Removed crowdin * Limited languages to major ones for 1st pass * feat: update translations * Fixing es test * Reverted yarn.lock changes --------- Co-authored-by: Replexica <[email protected]>
This commit is contained in:
1 parent
d938e67e65
commit
3c5ab5e8d2
22 files changed
+8408
-346
No files matched your search
@@ -1,42 +0,0 @@
|
||||
name: Crowdin Action
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
synchronize-with-crowdin:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ secrets.GH_ACCESS_TOKEN }}
|
||||
|
||||
- name: crowdin action
|
||||
uses: crowdin/[email protected]
|
||||
with:
|
||||
# upload sources
|
||||
upload_sources: true
|
||||
|
||||
# upload translations (& auto-approve 'em)
|
||||
upload_translations_args: '--auto-approve-imported'
|
||||
upload_translations: true
|
||||
push_translations: true
|
||||
|
||||
# download translations
|
||||
download_translations: true
|
||||
|
||||
# GH config
|
||||
commit_message: "New Crowdin translations by Github Action"
|
||||
localization_branch_name: main
|
||||
create_pull_request: false
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
@@ -97,6 +97,27 @@ jobs:
|
||||
if: ${{ needs.changes.outputs.has-files-requiring-all-checks == 'true' }}
|
||||
uses: ./.github/workflows/yarn-install.yml
|
||||
|
||||
i18n:
|
||||
name: Run i18n
|
||||
runs-on: buildjet-2vcpu-ubuntu-2204
|
||||
permissions:
|
||||
actions: write
|
||||
contents: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
# Doing this custom checkout of the common.json files from the PR since we don't
|
||||
# want to checkout the entire branch for security reasons as this job is granted
|
||||
# write permissions.
|
||||
- run: git fetch --depth=2 origin ${{ github.event.pull_request.head.sha }}
|
||||
if: ${{ github.event.pull_request.head.sha != '' }}
|
||||
- run: find apps/web/public/static/locales/** -name "common.json" | xargs git checkout ${{ github.event.pull_request.head.sha }} --
|
||||
if: ${{ github.event.pull_request.head.sha != '' }}
|
||||
shell: bash
|
||||
- uses: replexica/replexica@main
|
||||
with:
|
||||
api-key: ${{ secrets.CI_REPLEXICA_API_KEY }}
|
||||
|
||||
type-check:
|
||||
name: Type check
|
||||
needs: [changes, check-label, deps]
|
||||
@@ -217,6 +238,7 @@ jobs:
|
||||
[
|
||||
changes,
|
||||
lint,
|
||||
i18n,
|
||||
type-check,
|
||||
unit-test,
|
||||
integration-test,
|
||||
|
||||
Reference in new issue
Block a user