disable poeditor workflow

This commit is contained in:
Alex Holliday committed 2026-04-07 09:56:11 -07:00
1 parent 2c76484bad
commit 628bca3e29
1 file changed
+105 -105
+105 -105
View File
@@ -1,120 +1,120 @@
name: POEditor Translation Synchronization # name: POEditor Translation Synchronization
on: # on:
# For manual triggering # # For manual triggering
workflow_dispatch: # workflow_dispatch:
inputs: # inputs:
languages: # languages:
description: "Languages to synchronize (comma separated, e.g.: tr,en,es)" # description: "Languages to synchronize (comma separated, e.g.: tr,en,es)"
required: false # required: false
default: "ar,zh-tw,cs,en,fi,fr,de,pt-br,ru,es,tr,ja,zh-cn,th" # default: "ar,zh-tw,cs,en,fi,fr,de,pt-br,ru,es,tr,ja,zh-cn,th"
format: # format:
description: "Export format (key_value_json or json)" # description: "Export format (key_value_json or json)"
required: false # required: false
default: "key_value_json" # default: "key_value_json"
permissions: # permissions:
contents: write # contents: write
pull-requests: write # pull-requests: write
jobs: # jobs:
sync-translations: # sync-translations:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
permissions: # permissions:
contents: write # contents: write
issues: write # issues: write
pull-requests: write # pull-requests: write
steps: # steps:
- name: Checkout code # - name: Checkout code
uses: actions/checkout@v3 # uses: actions/checkout@v3
with: # with:
token: ${{ secrets.GITHUB_TOKEN }} # token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0 # fetch-depth: 0
- name: Setup Node.js # - name: Setup Node.js
uses: actions/setup-node@v3 # uses: actions/setup-node@v3
with: # with:
node-version: "22" # node-version: "22"
- name: Create package.json for scripts # - name: Create package.json for scripts
run: | # run: |
mkdir -p .github/scripts # mkdir -p .github/scripts
cat > .github/scripts/package.json << EOF # cat > .github/scripts/package.json << EOF
{ # {
"name": "poeditor-scripts", # "name": "poeditor-scripts",
"version": "1.0.0", # "version": "1.0.0",
"private": true, # "private": true,
"type": "module", # "type": "module",
"dependencies": { # "dependencies": {
"axios": "^1.6.0", # "axios": "^1.6.0",
"fs-extra": "^11.1.1" # "fs-extra": "^11.1.1"
} # }
} # }
EOF # EOF
- name: Install dependencies # - name: Install dependencies
run: | # run: |
cd .github/scripts # cd .github/scripts
npm install # npm install
- name: Download translations from POEditor # - name: Download translations from POEditor
env: # env:
POEDITOR_API: ${{ secrets.POEDITOR_API }} # POEDITOR_API: ${{ secrets.POEDITOR_API }}
POEDITOR_PROJECT_ID: ${{ secrets.POEDITOR_PROJECT_ID }} # POEDITOR_PROJECT_ID: ${{ secrets.POEDITOR_PROJECT_ID }}
LANGUAGES: ${{ github.event.inputs.languages || 'tr,en' }} # LANGUAGES: ${{ github.event.inputs.languages || 'tr,en' }}
EXPORT_FORMAT: ${{ github.event.inputs.format || 'key_value_json' }} # EXPORT_FORMAT: ${{ github.event.inputs.format || 'key_value_json' }}
run: | # run: |
mkdir -p temp # mkdir -p temp
node .github/scripts/download-translations.js # node .github/scripts/download-translations.js
- name: Verify translation files # - name: Verify translation files
run: | # run: |
echo "Verifying translation files..." # echo "Verifying translation files..."
for file in temp/*.json; do # for file in temp/*.json; do
echo "Checking $file" # echo "Checking $file"
if [ ! -s "$file" ]; then # if [ ! -s "$file" ]; then
echo "Error: $file is empty or does not exist" # echo "Error: $file is empty or does not exist"
exit 1 # exit 1
fi # fi
# Validate JSON format # # Validate JSON format
cat "$file" | jq . > /dev/null || { echo "Error: $file is not valid JSON"; exit 1; } # cat "$file" | jq . > /dev/null || { echo "Error: $file is not valid JSON"; exit 1; }
done # done
echo "All translation files are valid" # echo "All translation files are valid"
- name: Copy translations to project # - name: Copy translations to project
run: | # run: |
mkdir -p client/src/locales # mkdir -p client/src/locales
cp -r temp/* client/src/locales/ # cp -r temp/* client/src/locales/
echo "Translation files copied to client/src/locales/" # echo "Translation files copied to client/src/locales/"
- name: Get current date # - name: Get current date
id: date # id: date
run: echo "date=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_OUTPUT # run: echo "date=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_OUTPUT
- name: Format client code # - name: Format client code
run: | # run: |
cd client # cd client
npm ci # npm ci
npm run format # npm run format
- name: Create Pull Request # - name: Create Pull Request
uses: peter-evans/create-pull-request@v7 # uses: peter-evans/create-pull-request@v7
with: # with:
token: ${{ secrets.GITHUB_TOKEN }} # token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "feat: translations updated from POEditor" # commit-message: "feat: translations updated from POEditor"
title: "🌐 Updated Translations from POEditor" # title: "🌐 Updated Translations from POEditor"
body: | # body: |
This PR contains the latest translations from POEditor. # This PR contains the latest translations from POEditor.
📅 Update Date: ${{ steps.date.outputs.date }} # 📅 Update Date: ${{ steps.date.outputs.date }}
🔄 Updated Languages: ${{ github.event.inputs.languages || 'tr,en' }} # 🔄 Updated Languages: ${{ github.event.inputs.languages || 'tr,en' }}
⚠️ Please review the translations and approve the PR if everything looks correct. # ⚠️ Please review the translations and approve the PR if everything looks correct.
branch: translation-update-${{ github.run_number }} # branch: translation-update-${{ github.run_number }}
delete-branch: true # delete-branch: true
base: develop # base: develop
add-paths: | # add-paths: |
client/src/locales/*.json # client/src/locales/*.json
committer: GitHub Action <github-actions[bot]@users.noreply.github.com> # committer: GitHub Action <github-actions[bot]@users.noreply.github.com>
author: GitHub Action <github-actions[bot]@users.noreply.github.com> # author: GitHub Action <github-actions[bot]@users.noreply.github.com>