Skip to content
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
20 changes: 16 additions & 4 deletions .github/scripts/crowdinSync.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ if (Test-Path $xliffFile) {
git diff --staged --quiet
if ($LASTEXITCODE -ne 0) {
git commit -m "Update $xliffFile for $addonId"
git push
}
}

Expand Down Expand Up @@ -172,9 +171,22 @@ git add addon/locale addon/doc
git diff --staged --quiet
if ($LASTEXITCODE -ne 0) {
git commit -m "Update translations for $addonId from Crowdin (Automatic Sync)"
$branch = $env:downloadTranslationsBranch
git push -f origin "HEAD:$branch"
Write-Host "SUCCESS: Translations committed and pushed."
Write-Host "SUCCESS: Translations committed."
} else {
Write-Host "DEBUG: No changes in translations to commit."
}

# Push all generated commits after successful Crowdin synchronization
$pushOutput = git push 2>&1

Write-Host $pushOutput

if ($LASTEXITCODE -ne 0) {
Write-Host "ERROR: Failed to push commits to $repository."
}
elseif ($pushOutput -match "Everything up-to-date") {
Write-Host "INFO: No new commits needed to be pushed."
}
else {
Write-Host "SUCCESS: New commits successfully pushed to $repository."
}
1 change: 0 additions & 1 deletion .github/workflows/crowdinL10n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ concurrency:

env:
crowdinAuthToken: ${{ secrets.CROWDIN_TOKEN }}
downloadTranslationsBranch: l10n
GH_TOKEN: ${{ github.token }}
CROWDIN_PROJECT_ID: ${{ vars.CROWDIN_PROJECT_ID || 780748 }}
L10N_UTIL_CONFIG: ${{ vars.L10N_UTIL_CONFIG || 'addon' }}
Expand Down
Loading