From bd17619cbcb1ecb0163573bf77789a95cb0605fd Mon Sep 17 00:00:00 2001 From: Stefan Wendhausen Date: Mon, 9 Oct 2023 13:50:20 +0200 Subject: [PATCH 1/2] remove spanish repo --- .github/workflows/remote-get-spanish.yml | 105 ----------------------- README.md | 1 - 2 files changed, 106 deletions(-) delete mode 100644 .github/workflows/remote-get-spanish.yml diff --git a/.github/workflows/remote-get-spanish.yml b/.github/workflows/remote-get-spanish.yml deleted file mode 100644 index ac7143a8abd..00000000000 --- a/.github/workflows/remote-get-spanish.yml +++ /dev/null @@ -1,105 +0,0 @@ -# This workflow fetches the Spanish V4 Version of the Joomla CMS and syncs the needed translation language files -# into the core-translations repository. After this it creates a new commit. -# The second part uploads the translation to the CMS Crowdin project. - -name: J4 Get Spanish Translation files - -on: - workflow_dispatch: - # Runs once a day at 8:16 - schedule: - - cron: '16 8 * * *' - -jobs: - collect-from-external: - if: (github.event_name == 'schedule' && github.repository == 'joomla/core-translations') || (github.event_name != 'schedule') - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Fetch and extract Spanish j4 cms - run: | - cd .. - ls -l - wget -nv "https://github.com/Valc/es-ES-core-language-packs/archive/refs/heads/master.zip" - unzip master.zip - - - name: Syncing j4 directories - # We use a simple copy paste syntax here if needed customization for different directories - run: | - cd .. - SYNC_VERION="v4" - LANGUAGE_CODE="es-ES" - - ZIP_PATH="es-ES-core-language-packs-master/joomla_${SYNC_VERION}/administrator/language/${LANGUAGE_CODE}/" - REPO_PATH="${LANGUAGE_CODE}/administrator/language/${LANGUAGE_CODE}/" - echo /${ZIP_PATH} - echo /${REPO_PATH} - rsync -i -rptgo --checksum --ignore-times --delete ${ZIP_PATH} core-translations/joomla_${SYNC_VERION}/translations/package/${REPO_PATH} - - ZIP_PATH="es-ES-core-language-packs-master/joomla_${SYNC_VERION}/pkg_es-ES.xml" - REPO_PATH="${LANGUAGE_CODE}/" - echo /${ZIP_PATH} - echo /${REPO_PATH} - rsync -i -rptgo --checksum --ignore-times --delete ${ZIP_PATH} core-translations/joomla_${SYNC_VERION}/translations/package/${REPO_PATH} - - ZIP_PATH="es-ES-core-language-packs-master/joomla_${SYNC_VERION}/api/language/${LANGUAGE_CODE}/" - REPO_PATH="${LANGUAGE_CODE}/api/language/${LANGUAGE_CODE}/" - echo /${ZIP_PATH} - echo /${REPO_PATH} - rsync -i -rptgo --checksum --ignore-times --delete ${ZIP_PATH} core-translations/joomla_${SYNC_VERION}/translations/package/${REPO_PATH} - - ZIP_PATH="es-ES-core-language-packs-master/joomla_${SYNC_VERION}/language/${LANGUAGE_CODE}/" - REPO_PATH="${LANGUAGE_CODE}/language/${LANGUAGE_CODE}/" - echo /${ZIP_PATH} - echo /${REPO_PATH} - rsync -i -rptgo --checksum --ignore-times --delete ${ZIP_PATH} core-translations/joomla_${SYNC_VERION}/translations/package/${REPO_PATH} - - - name: Validate PHP code - run: | - SYNC_VERION="v4" - LANGUAGE_CODE="es-ES" - find ./joomla_${SYNC_VERION}/translations/package/${LANGUAGE_CODE}/ -name "*.php" -exec php -l {} \; | fgrep -i "No syntax errors detected" || exit 1 - - - name: Push translations to repo - run: | - git config user.name Translation Bot - git config user.email release+translation-bot@joomla.org - git status - git add . - git diff --quiet && git diff --staged --quiet || git commit -am "J4 Spanish Language update on `date +'%Y-%m-%d'`" - git push - -# Upload the translations to Crowdin - synchronize-with-crowdin: - needs: collect-from-external - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Checkout - uses: actions/checkout@v4 - - # Runs the Crowdin action command - https://github.com/crowdin/github-action - - name: Crowdin Upload Spanish - uses: crowdin/github-action@v1.13.1 - with: - # Upload sources to Crowdin - upload_sources: false - # Upload translations to Crowdin - upload_translations: true - # Define the languages to upload for translations - upload_language: 'es' - # Automatically approves uploaded translations - auto_approve_imported: true - # Defines whether to add translation if it is equal to source string in Crowdin project - import_eq_suggestions: true - # Option to specify a path to the configuration file, without / at the beginning - config: 'Configurations/Crowdin-J4-All.yml' - # Use true for dryrun to test the run without actually processing anything - dryrun_action: false - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} - CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} diff --git a/README.md b/README.md index b1500f8845f..982ad3e9e1c 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,6 @@ These two files can't be processed manual, because of the amount of work and ris * UTC 04:01-05:00 -> J5 Download Package Translations Crowdin Action * UTC 07:12-08:12 -> Get J5 Core Source and Upload to Crowdin * UTC 08:01-08:15 -> Get Russian and upload Translations to Crowdin -* UTC 08:16-08:30 -> Get Spanish and upload Translations to Crowdin * UTC 08:31-08:45 -> Get Japanese and upload Translations to Crowdin * UTC 08:46-09:00 -> Get Ukrainian and upload Translations to Crowdin From d810586805c7a3f92ad482255f53d9270f9dbd4c Mon Sep 17 00:00:00 2001 From: Stefan Wendhausen Date: Mon, 9 Oct 2023 13:50:31 +0200 Subject: [PATCH 2/2] add spanish crowdin sync --- .../crowdin-v4-dl-package-translations.yml | 17 ++++++++++++++++- .../crowdin-v5-dl-package-translations.yml | 18 +++++++++++++++++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/.github/workflows/crowdin-v4-dl-package-translations.yml b/.github/workflows/crowdin-v4-dl-package-translations.yml index 05b5ae4aa91..61c3d5e3690 100644 --- a/.github/workflows/crowdin-v4-dl-package-translations.yml +++ b/.github/workflows/crowdin-v4-dl-package-translations.yml @@ -1076,7 +1076,22 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GHA_TRANSLATIONBOT_PAT }} -# Spanish doesn't use Crowdin + - name: Crowdin Download Spanish Spain + uses: crowdin/github-action@v1.13.1 + with: + config: 'Configurations/Crowdin-J4-All.yml' + upload_sources: false + download_translations: true + download_language: es-ES + skip_untranslated_strings: true + export_only_approved: true + commit_message: 'New Spanish Spain Crowdin translations by Github Action' + localization_branch_name: 'l10n_crowdin_package_v4' + github_user_name: 'joomla-translation-bot' + github_user_email: 'release+translation-bot@joomla.org' + env: + GITHUB_TOKEN: ${{ secrets.GHA_TRANSLATIONBOT_PAT }} + - name: Crowdin Download Spanish Colombia uses: crowdin/github-action@v1.13.1 with: diff --git a/.github/workflows/crowdin-v5-dl-package-translations.yml b/.github/workflows/crowdin-v5-dl-package-translations.yml index 7c6945a2b40..acb6be904e4 100644 --- a/.github/workflows/crowdin-v5-dl-package-translations.yml +++ b/.github/workflows/crowdin-v5-dl-package-translations.yml @@ -1141,7 +1141,23 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GHA_TRANSLATIONBOT_PAT }} -# Spanish doesn't use Crowdin + - name: Crowdin Download Spanish Spain + uses: crowdin/github-action@v1.13.1 + with: + config: 'Configurations/Crowdin-J5-All.yml' + crowdin_branch_name: JoomlaV5 + upload_sources: false + download_translations: true + download_language: es-ES + skip_untranslated_strings: true + export_only_approved: true + commit_message: 'New Spanish Spain Crowdin translations by Github Action' + localization_branch_name: 'l10n_crowdin_package_v5' + github_user_name: 'joomla-translation-bot' + github_user_email: 'release+translation-bot@joomla.org' + env: + GITHUB_TOKEN: ${{ secrets.GHA_TRANSLATIONBOT_PAT }} + - name: Crowdin Download Spanish Colombia uses: crowdin/github-action@v1.13.1 with: