From aef0704dc33d765b5458815069047ad65deb041a Mon Sep 17 00:00:00 2001 From: Mark Scherer Date: Sun, 11 Oct 2026 19:10:10 +0200 Subject: [PATCH] Check the translation template in CI and refresh it A new CI job extracts the translatable strings with cakephp-i18n-lint and fails when the committed POT file differs, then lints the catalogs. It runs once, on the highest PHP version. The template had drifted from the code: 20 string(s) were missing and 2 were stale. It is regenerated here. --- .github/workflows/ci.yml | 27 ++++++++++ composer.json | 6 ++- resources/locales/queue.pot | 98 ++++++++++++++++++++++++++++--------- 3 files changed, 108 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f5c8098..1ca69e23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -125,3 +125,30 @@ jobs: - name: Run phpcs run: composer cs-check + + i18n: + name: Translation Catalog + runs-on: ubuntu-22.04 + permissions: + contents: read + + steps: + - uses: actions/checkout@v5 + with: + persist-credentials: false + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.5' + extensions: mbstring, intl + coverage: none + + - name: Composer install + run: composer install --no-progress --prefer-dist + + - name: Check POT is up to date + run: composer i18n-check + + - name: Lint catalogs + run: composer i18n-lint diff --git a/composer.json b/composer.json index 88efd7c9..cd167a29 100755 --- a/composer.json +++ b/composer.json @@ -40,6 +40,7 @@ "cakedc/cakephp-phpstan": "^4.0.0", "cakephp/bake": "^3.0.1", "cakephp/migrations": "^5.0.0", + "dereuromark/cakephp-i18n-lint": "^0.1.1", "dereuromark/cakephp-ide-helper": "^2.0.0", "dereuromark/cakephp-templating": "^0.2.7", "dereuromark/cakephp-tools": "^3.12.0", @@ -92,6 +93,9 @@ "test-coverage": "phpunit --log-junit tmp/coverage/unitreport.xml --coverage-html tmp/coverage --coverage-clover tmp/coverage/coverage.xml", "pot-setup": "cp composer.json composer.backup && composer require --dev dereuromark/cakephp-translate && mv composer.backup composer.json", "pot-check": "php vendor/dereuromark/cakephp-translate/scripts/pot-updater.php --fail-on-diff", - "pot-update": "php vendor/dereuromark/cakephp-translate/scripts/pot-updater.php --update" + "pot-update": "php vendor/dereuromark/cakephp-translate/scripts/pot-updater.php --update", + "i18n-check": "i18n-lint check", + "i18n-extract": "i18n-lint extract", + "i18n-lint": "i18n-lint lint" } } diff --git a/resources/locales/queue.pot b/resources/locales/queue.pot index 24f6e56f..e04f9bd1 100644 --- a/resources/locales/queue.pot +++ b/resources/locales/queue.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" -"POT-Creation-Date: 2026-05-04 04:14+0200\n" +"POT-Creation-Date: 2026-10-11 17:10+0000\n" "PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n" "Last-Translator: NAME \n" "Language-Team: LANGUAGE \n" @@ -14,9 +14,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -msgid "Invalid connection: {0}. Must be one of: {1}" -msgstr "" - msgid "Queue admin backend is not configured. Set Queue.adminAccess to a Closure that returns true for permitted callers." msgstr "" @@ -80,6 +77,9 @@ msgstr "" msgid "The job could not be queued. Please try again." msgstr "" +msgid "Invalid connection: {0}. Must be one of: {1}" +msgstr "" + msgid "Demonstrates cost management to prevent server overload" msgstr "" @@ -104,24 +104,30 @@ msgstr "" msgid "Only one instance can run at a time across all workers" msgstr "" -msgid "Restarted" +msgid "Aborted" msgstr "" msgid "Requeued" msgstr "" -msgid "Aborted" -msgstr "" - msgid "Queue Running" msgstr "" msgid "Queue Idle" msgstr "" +msgid "Queue Stalled" +msgstr "" + +msgid "action required" +msgstr "" + msgid "Last activity {0}" msgstr "" +msgid "No worker reporting" +msgstr "" + msgid "{0} worker(s)" msgstr "" @@ -131,27 +137,63 @@ msgstr "" msgid "Manage Workers" msgstr "" -msgid "No queue status available. Workers may not have started yet." +msgid "A job is marked in-flight but no worker is reporting. The worker likely crashed mid-job — reset stale fetched jobs and check cron." msgstr "" -msgid "Scheduled" +msgid "No worker has reported in. Cron is likely not firing — check that {0} runs on at least one server." +msgstr "" + +msgid "Jobs are waiting but no workers are running. Check that {0} cron is firing on at least one server." +msgstr "" + +msgid "Jobs are waiting but aren't being picked up. Workers may have crashed — restart the queue or clean up stale processes." +msgstr "" + +msgid "Last activity" +msgstr "" + +msgid "No worker has reported recently" +msgstr "" + +msgid "Workers" +msgstr "" + +msgid "on {0} server(s)" msgstr "" msgid "Pending" msgstr "" +msgid "jobs waiting" +msgstr "" + +msgid "Scheduled" +msgstr "" + msgid "Running" msgstr "" -msgid "Failed" +msgid "Requeued/Failed" msgstr "" -msgid "Pending Jobs" +msgid "Aborted Jobs" +msgstr "" + +msgid "Reset All" +msgstr "" + +msgid "Reset all {0} aborted jobs?" msgstr "" msgid "View All" msgstr "" +msgid "Showing {0} most recent of {1} aborted jobs. {2} for the full list." +msgstr "" + +msgid "See QueuedJobs admin" +msgstr "" + msgid "Task" msgstr "" @@ -161,15 +203,12 @@ msgstr "" msgid "Created" msgstr "" -msgid "Status" +msgid "Failure" msgstr "" msgid "Actions" msgstr "" -msgid "Scheduled {0}" -msgstr "" - msgid "Attempts" msgstr "" @@ -182,12 +221,30 @@ msgstr "" msgid "Remove" msgstr "" +msgid "Pending Jobs" +msgstr "" + +msgid "Showing {0} most recent of {1} pending jobs. {2} for the full list." +msgstr "" + +msgid "Status" +msgstr "" + +msgid "Scheduled {0}" +msgstr "" + +msgid "Failed" +msgstr "" + msgid "No pending jobs" msgstr "" msgid "Scheduled Jobs" msgstr "" +msgid "Showing {0} most recent of {1} scheduled jobs. {2} for the full list." +msgstr "" + msgid "Scheduled For" msgstr "" @@ -263,9 +320,6 @@ msgstr "" msgid "Idle - waiting for jobs" msgstr "" -msgid "Last activity" -msgstr "" - msgid "Finish & End" msgstr "" @@ -704,9 +758,6 @@ msgstr "" msgid "Sure? This will remove all failed jobs." msgstr "" -msgid "Reset All" -msgstr "" - msgid "Sure? This will make all failed as well as still running jobs ready for re-run." msgstr "" @@ -740,6 +791,9 @@ msgstr "" msgid "Filter" msgstr "" +msgid "Back to App" +msgstr "" + msgid "Server Time" msgstr ""