You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rusackas (via GitHub)" <gi...@apache.org> on 2026/10/21 19:39:13 UTC
[PR] feat(ci): add scheduled sync for translation catalogs [superset]
rusackas opened a new pull request, #45584:
URL: https://github.com/apache/superset/pull/45584
### SUMMARY
Follow-up to #45583: adds a scheduled job so locale `.po` catalogs stop silently drifting behind `messages.pot` between manual catch-ups.
`check_pot_drift.py` already guarantees `messages.pot` matches source on every PR, but a PR that adds a translatable string is only required to regenerate `messages.pot` β propagating the new entries into every locale catalog via `pybabel update` is a separate, unenforced step. `check_translation_regression.py` can't catch the gap either: it only compares relative translated/fuzzy counts between a base ref and a PR, so any pre-existing drift cancels out on both sides and never fails.
This adds `.github/workflows/sync-translation-catalogs.yml`:
- Runs weekly (Mondays 06:00 UTC) and on `workflow_dispatch`.
- Runs `scripts/translations/babel_update.sh` against current `master`.
- If that produces a diff under `superset/translations`, commits it on `chore/sync-translation-catalogs-automated` and opens a PR (or updates the existing one if last week's is still open), using the default `GITHUB_TOKEN` with `contents: write` + `pull-requests: write` β no new third-party action, mirroring the pattern already used by `bump-python-package.yml`.
- A human still reviews and merges every PR; nothing is pushed straight to `master`. This matches ASF Infra's GitHub Actions policy, which restricts automated services from pushing directly to a release-subject branch without prior Infra authorization, but doesn't restrict a bot opening a PR for review (the same category Dependabot itself falls into, and which ASF requires enabling on every repo).
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A
### TESTING INSTRUCTIONS
- `zizmor`/pre-commit pass on the new workflow file.
- The underlying `babel_update.sh` + diff/commit logic was exercised locally against current `master`, producing the catch-up in #45583 β that's the same diff this job would commit on its first scheduled run. The workflow definition itself hasn't run in GitHub Actions yet (it only runs from a branch GitHub recognizes); worth triggering once manually via `workflow_dispatch` after merge to confirm the PR-open/update path end-to-end, then it should be a no-op most weeks.
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
π€ Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat(ci): add scheduled sync for translation catalogs [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #45584:
URL: https://github.com/apache/superset/pull/45584
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat(ci): add scheduled sync for translation catalogs [superset]
Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
sadpandajoe commented on code in PR #45584:
URL: https://github.com/apache/superset/pull/45584#discussion_r4341822612
##########
.github/workflows/sync-translation-catalogs.yml:
##########
@@ -0,0 +1,79 @@
+name: Sync Translation Catalogs
+
+# superset/translations/messages.pot is kept in sync with source by
+# check_pot_drift.py on every PR, but individual locale .po catalogs can
+# drift behind it: a PR that adds a translatable string is only required to
+# regenerate messages.pot, not to propagate the new entries into every
+# language file via `pybabel update`. Nothing else catches that gap -
+# check_translation_regression.py only compares relative counts between a
+# base ref and a PR, so pre-existing drift cancels out on both sides. This
+# job runs the catch-up on a schedule and opens a PR when there's drift to
+# commit, instead of letting it silently accumulate between manual passes.
+on:
+ schedule:
+ - cron: "0 6 * * 1" # Mondays at 06:00 UTC
+ workflow_dispatch: {}
+
+permissions:
+ contents: read
+
+concurrency:
+ group: sync-translation-catalogs
+ cancel-in-progress: false
+
+jobs:
+ sync-translation-catalogs:
+ runs-on: ubuntu-26.04
+ permissions:
+ contents: write
+ pull-requests: write
+ steps:
+ - name: "Checkout master"
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ ref: master
+ persist-credentials: true
+
+ - name: Setup Python
+ uses: $/.github/actions/setup-backend/
+
+ - name: Install gettext tools
+ uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3
+ with:
+ packages: gettext
+ version: 1.0
+
+ - name: Run babel_update
+ run: ./scripts/translations/babel_update.sh
+
+ - name: Check for drift
+ id: diff
+ run: |
+ if git diff --quiet -- superset/translations; then
Review Comment:
`babel_update.sh` re-extracts `messages.pot` and `pybabel update` rewrites every catalog header, including `POT-Creation-Date` (e.g. `de/LC_MESSAGES/messages.po` carries one today), so this raw `git diff --quiet` will report changes on every run even when no string or translation changed. After the first catch-up merges, each Monday would then force-push the branch and open a PR containing only timestamp churn. Should the check ignore header timestamps, for example by comparing after normalizing `POT-Creation-Date` or restoring files whose only diff is that line?
##########
.github/workflows/sync-translation-catalogs.yml:
##########
@@ -0,0 +1,79 @@
+name: Sync Translation Catalogs
+
+# superset/translations/messages.pot is kept in sync with source by
+# check_pot_drift.py on every PR, but individual locale .po catalogs can
+# drift behind it: a PR that adds a translatable string is only required to
+# regenerate messages.pot, not to propagate the new entries into every
+# language file via `pybabel update`. Nothing else catches that gap -
+# check_translation_regression.py only compares relative counts between a
+# base ref and a PR, so pre-existing drift cancels out on both sides. This
+# job runs the catch-up on a schedule and opens a PR when there's drift to
+# commit, instead of letting it silently accumulate between manual passes.
+on:
+ schedule:
+ - cron: "0 6 * * 1" # Mondays at 06:00 UTC
+ workflow_dispatch: {}
+
+permissions:
+ contents: read
+
+concurrency:
+ group: sync-translation-catalogs
+ cancel-in-progress: false
+
+jobs:
+ sync-translation-catalogs:
+ runs-on: ubuntu-26.04
+ permissions:
+ contents: write
+ pull-requests: write
+ steps:
+ - name: "Checkout master"
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ ref: master
+ persist-credentials: true
+
+ - name: Setup Python
+ uses: $/.github/actions/setup-backend/
+
+ - name: Install gettext tools
+ uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3
+ with:
+ packages: gettext
+ version: 1.0
+
+ - name: Run babel_update
+ run: ./scripts/translations/babel_update.sh
+
+ - name: Check for drift
+ id: diff
+ run: |
+ if git diff --quiet -- superset/translations; then
+ echo "has_changes=false" >> "$GITHUB_OUTPUT"
+ else
+ echo "has_changes=true" >> "$GITHUB_OUTPUT"
+ fi
+
+ - name: Open or update sync PR
+ if: steps.diff.outputs.has_changes == 'true'
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Review Comment:
Agreedβa PR opened with the default `GITHUB_TOKEN` does not fire `pull_request` workflows, so the required checks on the sync PR never run and it cannot be merged normally. Is the plan to push with a PAT/app token, or to have the job dispatch the checks explicitly?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat(ci): add scheduled sync for translation catalogs [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #45584:
URL: https://github.com/apache/superset/pull/45584#discussion_r4343628390
##########
.github/workflows/sync-translation-catalogs.yml:
##########
@@ -0,0 +1,79 @@
+name: Sync Translation Catalogs
+
+# superset/translations/messages.pot is kept in sync with source by
+# check_pot_drift.py on every PR, but individual locale .po catalogs can
+# drift behind it: a PR that adds a translatable string is only required to
+# regenerate messages.pot, not to propagate the new entries into every
+# language file via `pybabel update`. Nothing else catches that gap -
+# check_translation_regression.py only compares relative counts between a
+# base ref and a PR, so pre-existing drift cancels out on both sides. This
+# job runs the catch-up on a schedule and opens a PR when there's drift to
+# commit, instead of letting it silently accumulate between manual passes.
+on:
+ schedule:
+ - cron: "0 6 * * 1" # Mondays at 06:00 UTC
+ workflow_dispatch: {}
+
+permissions:
+ contents: read
+
+concurrency:
+ group: sync-translation-catalogs
+ cancel-in-progress: false
+
+jobs:
+ sync-translation-catalogs:
+ runs-on: ubuntu-26.04
+ permissions:
+ contents: write
+ pull-requests: write
+ steps:
+ - name: "Checkout master"
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ ref: master
+ persist-credentials: true
+
+ - name: Setup Python
+ uses: $/.github/actions/setup-backend/
+
+ - name: Install gettext tools
+ uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3
+ with:
+ packages: gettext
+ version: 1.0
+
+ - name: Run babel_update
+ run: ./scripts/translations/babel_update.sh
+
+ - name: Check for drift
+ id: diff
+ run: |
+ if git diff --quiet -- superset/translations; then
+ echo "has_changes=false" >> "$GITHUB_OUTPUT"
+ else
+ echo "has_changes=true" >> "$GITHUB_OUTPUT"
+ fi
+
+ - name: Open or update sync PR
+ if: steps.diff.outputs.has_changes == 'true'
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ BRANCH: chore/sync-translation-catalogs-automated
+ run: |
+ git config user.name "GitHub Action"
+ git config user.email "action@github.com"
+ git checkout -b "$BRANCH"
+ git add superset/translations
+ git commit -m "chore(i18n): sync translation catalogs with messages.pot" \
+ -m "Automated catch-up: propagates pending messages.pot entries into every locale catalog via babel_update.sh. All new entries land untranslated (--no-fuzzy-matching); no existing translation is touched."
+ git push --force origin "$BRANCH"
Review Comment:
β
**Customized review instruction saved!**
**Instruction:**
> Do not flag force-pushing the bot branch in this workflow; it is fully regenerated from master, and manual edits belong in master or a separate PR.
**Applied to:**
- `.github/workflows/sync-translation-catalogs.yml`
---
π‘ *To manage or update this instruction, visit: [CodeAnt AI Settings](https://app.codeant.ai/org/settings/learnings)*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat(ci): add scheduled sync for translation catalogs [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #45584:
URL: https://github.com/apache/superset/pull/45584#issuecomment-6325011101
## CodeAnt PR Risk: Medium Risk
- The PR needs attention before merging because PRs created with the workflow's token may not trigger required pull-request checks.
- Each scheduled run force-pushes a branch rebuilt from master, which can overwrite manual corrections on an open sync PR.
**Assessed commit:** `e2cf2d4311ca`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat(ci): add scheduled sync for translation catalogs [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #45584:
URL: https://github.com/apache/superset/pull/45584#discussion_r4341828320
##########
.github/workflows/sync-translation-catalogs.yml:
##########
@@ -0,0 +1,79 @@
+name: Sync Translation Catalogs
+
+# superset/translations/messages.pot is kept in sync with source by
+# check_pot_drift.py on every PR, but individual locale .po catalogs can
+# drift behind it: a PR that adds a translatable string is only required to
+# regenerate messages.pot, not to propagate the new entries into every
+# language file via `pybabel update`. Nothing else catches that gap -
+# check_translation_regression.py only compares relative counts between a
+# base ref and a PR, so pre-existing drift cancels out on both sides. This
+# job runs the catch-up on a schedule and opens a PR when there's drift to
+# commit, instead of letting it silently accumulate between manual passes.
+on:
+ schedule:
+ - cron: "0 6 * * 1" # Mondays at 06:00 UTC
+ workflow_dispatch: {}
+
+permissions:
+ contents: read
+
+concurrency:
+ group: sync-translation-catalogs
+ cancel-in-progress: false
+
+jobs:
+ sync-translation-catalogs:
+ runs-on: ubuntu-26.04
+ permissions:
+ contents: write
+ pull-requests: write
+ steps:
+ - name: "Checkout master"
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ ref: master
+ persist-credentials: true
+
+ - name: Setup Python
+ uses: $/.github/actions/setup-backend/
+
+ - name: Install gettext tools
+ uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3
+ with:
+ packages: gettext
+ version: 1.0
+
+ - name: Run babel_update
+ run: ./scripts/translations/babel_update.sh
+
+ - name: Check for drift
+ id: diff
+ run: |
+ if git diff --quiet -- superset/translations; then
+ echo "has_changes=false" >> "$GITHUB_OUTPUT"
+ else
+ echo "has_changes=true" >> "$GITHUB_OUTPUT"
+ fi
+
+ - name: Open or update sync PR
+ if: steps.diff.outputs.has_changes == 'true'
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Review Comment:
Iβd use a narrowly scoped GitHub App installation token, rather than dispatching checks explicitly. A token-authenticated push will trigger the normal `pull_request` workflows, so the sync PR gets the same required checks as a human-opened PR. Explicit dispatches may run jobs, but donβt reliably attach the required check statuses to the PRβs head SHA.
One detail: the current checkout persists the default `GITHUB_TOKEN` for `git push`. The App token must be used for the checkout/push credentials as well as `GH_TOKEN`; changing only `GH_TOKEN` would leave the push using the default token. This requires installing/configuring the App with `contents: write` and `pull-requests: write`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat(ci): add scheduled sync for translation catalogs [superset]
Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #45584:
URL: https://github.com/apache/superset/pull/45584#issuecomment-6330348949
### <span aria-hidden="true">β
</span> Deploy Preview for *superset-docs-preview* ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">π¨</span> Latest commit | f80fbce368e559b948269324eb2d0b6cdc3cc404 |
|<span aria-hidden="true">π</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6ad9645533fe9d8f237c71ba |
|<span aria-hidden="true">π</span> Deploy Preview | [https://deploy-preview-45584--superset-docs-preview.netlify.app](https://deploy-preview-45584--superset-docs-preview.netlify.app) |
|<span aria-hidden="true">π±</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br /><br /><br />_Use your smartphone camera to open QR code link._</details> |
|<span aria-hidden="true">π€</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#DctbCoAgEEDRvcx3EmXvHbSMcdSKzBEVIqK959_lwnkhRL5ChgWgAhXR016ado6mTo8nkctLDvPBXhBmdLwlcXM8reO7GG2C42fVRQ2o56HreymtmfVkWznS2CiE7wc) |
---
<!-- [superset-docs-preview Preview](https://deploy-preview-45584--superset-docs-preview.netlify.app) -->
_To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat(ci): add scheduled sync for translation catalogs [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #45584:
URL: https://github.com/apache/superset/pull/45584#discussion_r4343626201
##########
.github/workflows/sync-translation-catalogs.yml:
##########
@@ -0,0 +1,79 @@
+name: Sync Translation Catalogs
+
+# superset/translations/messages.pot is kept in sync with source by
+# check_pot_drift.py on every PR, but individual locale .po catalogs can
+# drift behind it: a PR that adds a translatable string is only required to
+# regenerate messages.pot, not to propagate the new entries into every
+# language file via `pybabel update`. Nothing else catches that gap -
+# check_translation_regression.py only compares relative counts between a
+# base ref and a PR, so pre-existing drift cancels out on both sides. This
+# job runs the catch-up on a schedule and opens a PR when there's drift to
+# commit, instead of letting it silently accumulate between manual passes.
+on:
+ schedule:
+ - cron: "0 6 * * 1" # Mondays at 06:00 UTC
+ workflow_dispatch: {}
+
+permissions:
+ contents: read
+
+concurrency:
+ group: sync-translation-catalogs
+ cancel-in-progress: false
+
+jobs:
+ sync-translation-catalogs:
+ runs-on: ubuntu-26.04
+ permissions:
+ contents: write
+ pull-requests: write
+ steps:
+ - name: "Checkout master"
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ ref: master
+ persist-credentials: true
+
+ - name: Setup Python
+ uses: $/.github/actions/setup-backend/
+
+ - name: Install gettext tools
+ uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3
+ with:
+ packages: gettext
+ version: 1.0
+
+ - name: Run babel_update
+ run: ./scripts/translations/babel_update.sh
+
+ - name: Check for drift
+ id: diff
+ run: |
+ if git diff --quiet -- superset/translations; then
Review Comment:
Good catch. Added a step before the drift check that reverts any catalog whose only diff is the `POT-Creation-Date` header, so timestamp-only churn no longer opens a PR (f80fbce).
##########
.github/workflows/sync-translation-catalogs.yml:
##########
@@ -0,0 +1,79 @@
+name: Sync Translation Catalogs
+
+# superset/translations/messages.pot is kept in sync with source by
+# check_pot_drift.py on every PR, but individual locale .po catalogs can
+# drift behind it: a PR that adds a translatable string is only required to
+# regenerate messages.pot, not to propagate the new entries into every
+# language file via `pybabel update`. Nothing else catches that gap -
+# check_translation_regression.py only compares relative counts between a
+# base ref and a PR, so pre-existing drift cancels out on both sides. This
+# job runs the catch-up on a schedule and opens a PR when there's drift to
+# commit, instead of letting it silently accumulate between manual passes.
+on:
+ schedule:
+ - cron: "0 6 * * 1" # Mondays at 06:00 UTC
+ workflow_dispatch: {}
+
+permissions:
+ contents: read
+
+concurrency:
+ group: sync-translation-catalogs
+ cancel-in-progress: false
+
+jobs:
+ sync-translation-catalogs:
+ runs-on: ubuntu-26.04
+ permissions:
+ contents: write
+ pull-requests: write
+ steps:
+ - name: "Checkout master"
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ ref: master
+ persist-credentials: true
+
+ - name: Setup Python
+ uses: $/.github/actions/setup-backend/
+
+ - name: Install gettext tools
+ uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3
+ with:
+ packages: gettext
+ version: 1.0
+
+ - name: Run babel_update
+ run: ./scripts/translations/babel_update.sh
+
+ - name: Check for drift
+ id: diff
+ run: |
+ if git diff --quiet -- superset/translations; then
+ echo "has_changes=false" >> "$GITHUB_OUTPUT"
+ else
+ echo "has_changes=true" >> "$GITHUB_OUTPUT"
+ fi
+
+ - name: Open or update sync PR
+ if: steps.diff.outputs.has_changes == 'true'
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ BRANCH: chore/sync-translation-catalogs-automated
+ run: |
+ git config user.name "GitHub Action"
+ git config user.email "action@github.com"
+ git checkout -b "$BRANCH"
+ git add superset/translations
+ git commit -m "chore(i18n): sync translation catalogs with messages.pot" \
+ -m "Automated catch-up: propagates pending messages.pot entries into every locale catalog via babel_update.sh. All new entries land untranslated (--no-fuzzy-matching); no existing translation is touched."
+ git push --force origin "$BRANCH"
Review Comment:
This is intentional: the branch is fully generated from `master` by `babel_update.sh`, so force-pushing just regenerates it. Manual edits belong in `master` or in a separate PR, not on the bot branch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat(ci): add scheduled sync for translation catalogs [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #45584:
URL: https://github.com/apache/superset/pull/45584#discussion_r4341213691
##########
.github/workflows/sync-translation-catalogs.yml:
##########
@@ -0,0 +1,79 @@
+name: Sync Translation Catalogs
+
+# superset/translations/messages.pot is kept in sync with source by
+# check_pot_drift.py on every PR, but individual locale .po catalogs can
+# drift behind it: a PR that adds a translatable string is only required to
+# regenerate messages.pot, not to propagate the new entries into every
+# language file via `pybabel update`. Nothing else catches that gap -
+# check_translation_regression.py only compares relative counts between a
+# base ref and a PR, so pre-existing drift cancels out on both sides. This
+# job runs the catch-up on a schedule and opens a PR when there's drift to
+# commit, instead of letting it silently accumulate between manual passes.
+on:
+ schedule:
+ - cron: "0 6 * * 1" # Mondays at 06:00 UTC
+ workflow_dispatch: {}
+
+permissions:
+ contents: read
+
+concurrency:
+ group: sync-translation-catalogs
+ cancel-in-progress: false
+
+jobs:
+ sync-translation-catalogs:
+ runs-on: ubuntu-26.04
+ permissions:
+ contents: write
+ pull-requests: write
+ steps:
+ - name: "Checkout master"
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ ref: master
+ persist-credentials: true
+
+ - name: Setup Python
+ uses: $/.github/actions/setup-backend/
+
+ - name: Install gettext tools
+ uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3
+ with:
+ packages: gettext
+ version: 1.0
+
+ - name: Run babel_update
+ run: ./scripts/translations/babel_update.sh
+
+ - name: Check for drift
+ id: diff
+ run: |
+ if git diff --quiet -- superset/translations; then
+ echo "has_changes=false" >> "$GITHUB_OUTPUT"
+ else
+ echo "has_changes=true" >> "$GITHUB_OUTPUT"
+ fi
+
+ - name: Open or update sync PR
+ if: steps.diff.outputs.has_changes == 'true'
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ BRANCH: chore/sync-translation-catalogs-automated
+ run: |
+ git config user.name "GitHub Action"
+ git config user.email "action@github.com"
+ git checkout -b "$BRANCH"
+ git add superset/translations
+ git commit -m "chore(i18n): sync translation catalogs with messages.pot" \
+ -m "Automated catch-up: propagates pending messages.pot entries into every locale catalog via babel_update.sh. All new entries land untranslated (--no-fuzzy-matching); no existing translation is touched."
+ git push --force origin "$BRANCH"
Review Comment:
**Suggestion:** Each run starts from `master` and force-pushes this fixed branch, so manual corrections committed to an open sync PR are discarded on the next scheduled run.
**Assessment:** π `Major` Β· π `Occurrence: Rarely` Β· π·οΈ `Logic error`
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill) [](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=b9c632f0f0ee42b8b38cc83615a4c4fc&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=b9c632f0f0ee42b8b38cc83615a4c4fc&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
<details>
<summary><b>Prompt for AI Agent π€ </b></summary>
```mdx
This is a comment left during a code review.
**Path:** .github/workflows/sync-translation-catalogs.yml
**Line:** 70:70
**Comment:**
*Logic Error: Each run starts from `master` and force-pushes this fixed branch, so manual corrections committed to an open sync PR are discarded on the next scheduled run.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F45584&comment_hash=9e90e2a62a106fa30e7c9b5351b3662a6cc4cdf098a057e1c3c0a0907787b212&reaction=like'>π</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F45584&comment_hash=9e90e2a62a106fa30e7c9b5351b3662a6cc4cdf098a057e1c3c0a0907787b212&reaction=dislike'>π</a>
##########
.github/workflows/sync-translation-catalogs.yml:
##########
@@ -0,0 +1,79 @@
+name: Sync Translation Catalogs
+
+# superset/translations/messages.pot is kept in sync with source by
+# check_pot_drift.py on every PR, but individual locale .po catalogs can
+# drift behind it: a PR that adds a translatable string is only required to
+# regenerate messages.pot, not to propagate the new entries into every
+# language file via `pybabel update`. Nothing else catches that gap -
+# check_translation_regression.py only compares relative counts between a
+# base ref and a PR, so pre-existing drift cancels out on both sides. This
+# job runs the catch-up on a schedule and opens a PR when there's drift to
+# commit, instead of letting it silently accumulate between manual passes.
+on:
+ schedule:
+ - cron: "0 6 * * 1" # Mondays at 06:00 UTC
+ workflow_dispatch: {}
+
+permissions:
+ contents: read
+
+concurrency:
+ group: sync-translation-catalogs
+ cancel-in-progress: false
+
+jobs:
+ sync-translation-catalogs:
+ runs-on: ubuntu-26.04
+ permissions:
+ contents: write
+ pull-requests: write
+ steps:
+ - name: "Checkout master"
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ ref: master
+ persist-credentials: true
+
+ - name: Setup Python
+ uses: $/.github/actions/setup-backend/
+
+ - name: Install gettext tools
+ uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3
+ with:
+ packages: gettext
+ version: 1.0
+
+ - name: Run babel_update
+ run: ./scripts/translations/babel_update.sh
+
+ - name: Check for drift
+ id: diff
+ run: |
+ if git diff --quiet -- superset/translations; then
+ echo "has_changes=false" >> "$GITHUB_OUTPUT"
+ else
+ echo "has_changes=true" >> "$GITHUB_OUTPUT"
+ fi
+
+ - name: Open or update sync PR
+ if: steps.diff.outputs.has_changes == 'true'
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Review Comment:
**Suggestion:** Because `GITHUB_TOKEN` creates the PR, GitHub suppresses its `pull_request` workflows; required checks such as `babel-extract` never run, leaving the generated PR unable to merge.
**Assessment:** π `Major` Β· π `Occurrence: Sometimes` Β· π·οΈ `Api mismatch`
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill) [](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=a9a6457c47144ec49b60654e08e77b51&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=a9a6457c47144ec49b60654e08e77b51&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
<details>
<summary><b>Prompt for AI Agent π€ </b></summary>
```mdx
This is a comment left during a code review.
**Path:** .github/workflows/sync-translation-catalogs.yml
**Line:** 61:61
**Comment:**
*Api Mismatch: Because `GITHUB_TOKEN` creates the PR, GitHub suppresses its `pull_request` workflows; required checks such as `babel-extract` never run, leaving the generated PR unable to merge.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F45584&comment_hash=8482797bc7d85b9f5cd35dde013b62e79815f26ae241462319ae26433f44cca4&reaction=like'>π</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F45584&comment_hash=8482797bc7d85b9f5cd35dde013b62e79815f26ae241462319ae26433f44cca4&reaction=dislike'>π</a>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org