Skip to content

Symfony translations #821

Symfony translations

Symfony translations #821

name: Symfony translations
on:
schedule:
- cron: '30 6,12,18 * * *'
jobs:
build:
name: Sync
runs-on: ubuntu-latest
steps:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
- name: Get lowest version
id: version
run: |
set -x
version=$(curl -s https://symfony.com/releases.json | jq -r '.supported_versions[0]')
echo $version
echo "lowest_branch=$version" >> $GITHUB_OUTPUT
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
repository: symfony/symfony
ref: ${{ steps.version.outputs.lowest_branch }}
fetch-depth: 0
- name: Download dependencies
run: |
cp composer.json composer.json.bak
composer config allow-plugins true
composer update --no-interaction --prefer-stable
rm composer.json
mv composer.json.bak composer.json
- name: Generate data files
id: generate_data
run: php .github/sync-translations.php
- name: Check for changes
id: check_changes
run: |
if [[ $(git diff --numstat | wc -l) -eq 0 ]]; then
echo "No significant changes."
echo "make_pr=false" >> $GITHUB_OUTPUT
exit 0
fi
echo "make_pr=true" >> $GITHUB_OUTPUT
- name: Create Pull Request
if: ${{ steps.check_changes.outputs.make_pr == 'true' }}
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
delete-branch: true
commit-message: "Sync translations"
author: "carsonbot <[email protected]>"
committer: "carsonbot <[email protected]>"
push-to-fork: carsonbot/symfony
title: 'Sync translations across all languages'
body: |
| Q | A
| ------------- | ---
| Branch? | ${{ steps.version.outputs.lowest_branch }}
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Issues |
| License | MIT
We just added new English translations. This PR make sure to add them to all other languages.
-------
This PR was automatically generated by the Carsonbot. It ran the following command:
```bash
php .github/sync-translations.php
```
You can find the workflow [here](https://github.com/symfony-tools/symfony-translation-checker/blob/master/.github/workflows/sync-sf-translations.yml).