Skip to content

[Maintainer] i18n: a new locale no longer breaks release-check - #1235

Merged
Aymericr merged 4 commits into
mainfrom
cursor/i18n-release-check-new-locale-b052
Nov 9, 2026
Merged

Aymericr merged 4 commits into
mainfrom
cursor/i18n-release-check-new-locale-b052

Conversation

@Aymericr

@Aymericr Aymericr commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

The release workflow's translation gate, bun scripts/i18n.ts release-check, could not pick a base once a new locale was bundled. hasCatalogs required a catalog for every TARGET_LOCALES entry, and no earlier commit has the new locale's catalog. So after #1184 (Turkish) or #1200 (Italian) merges, the latest release tag, the origin/main fallback and the catalogs' first commit are all rejected, and the next release fails:

release-check: no base with bundled PO catalogs (@pascal-app/editor@1.0.7 has no catalogs; origin/main and the catalogs' first commit are unavailable or HEAD); pass --base <rev>

--base @pascal-app/editor@1.0.7 is rejected the same way. PR CI doesn't see this: i18n:check compares with the PR's base commit, where a missing locale is already allowed.

  • A base qualifies when it has a catalog for any target locale (every → some in hasCatalogs). A base from before the catalogs is still rejected, by the default lookup and by --base.
  • Locales with a catalog at the base are compared exactly as before. A locale without one has nothing reviewed there to keep: release-check names it (New locales since @pascal-app/editor@1.0.7, with no reviewed entries to keep: tr), and its compiled pack is still scanned for drafts.
  • --base-dir <dir> with no target catalog now fails like --base (--base-dir <dir> has no bundled PO catalogs to compare with). Before, it compared with an empty base and passed.
  • i18n/README.md: one sentence on new locales in the release-check paragraph.
  • Test fixtures: the fixture repos turn off commit and tag signing. With signing configured globally, every fixture commit went through the signer (slow, or a prompt per commit; up to 15 s each here, past bun's 5 s test timeout), and with tag.gpgSign=true, git tag <name> fails for want of a message. Fixture directories are now removed after each test, as in the other script tests.

No catalog, translation or review marker changes here, and nothing in this PR reviews or approves a tr or it entry.

How to test

  1. bun test ./scripts/i18n-literals.test.ts: 51 pass. The new tests cover:

    • a locale bundled after the latest release tag;
    • regressions in the other locales and drafts in the new locale's pack still failing;
    • --base predating a locale but not the catalogs;
    • a --base-dir without catalogs failing.

    The first three fail on main with the error above; the --base-dir one fails without its guard (exit 0 instead of 1).

  2. In a throwaway clone, merge a locale PR and point origin/main at the merge, as the release run after that merge sees it:

    git fetch origin pull/1184/head:pr-1184
    git switch --detach origin/main && git merge --no-edit pr-1184
    git update-ref refs/remotes/origin/main HEAD
    bun scripts/i18n.ts release-check

    On main this fails with the error above. After git merge --no-edit origin/cursor/i18n-release-check-new-locale-b052, it prints Comparing with @pascal-app/editor@1.0.7 and New locales since @pascal-app/editor@1.0.7, with no reviewed entries to keep: tr, then passes. Same with Add Italian (it) as a bundled locale (unreviewed AI drafts) #1200 (it), and with both merged (tr, it).

  3. In that tree, mark fr's reviewed editor.buildPanel.advanced as #, fuzzy with Review: required: release-check fails with fr: "editor.buildPanel.advanced" is reviewed on the base branch with the same English and must stay reviewed. Compiling a draft into the fr, tr or it pack fails with <locale>: compiled pack ships unreviewed "…".

bun run ci passed locally on be3f503: biome, i18n:check, skills validation, typecheck, package and root tests, build, and the production smoke test. On the final head, the root i18n suite (80 pass), i18n:check and bun run check pass locally, and CI passes.

Screenshots / screen recording

N/A — non-visual change.

Checklist

  • I've tested this locally with bun dev
  • My code follows the existing code style (run bun check to verify)
  • I've updated relevant documentation (if applicable)
  • This PR targets the main branch

Locale PRs

This unblocks the release after #1184 (tr) or #1200 (it) merges. It doesn't make either one ready:

  • Against current main, i18n:check fails for both until their catalogs are refreshed. tr is missing 1,192 messages and has 37 obsolete; it is missing 129 and has 24 obsolete.
  • Both edit the same TARGET_LOCALES line and the same locale lists in scripts/i18n-literals.test.ts, so the second to land has to merge those lines.
  • Their fork CI runs are waiting for approval.
  • Their drafts still need native-speaker review before they ship.

Review

  • Codex's GitHub review ran when this PR was opened and finished on be3f503 with no findings. It hasn't re-run on the two follow-up commits.
  • A fresh-context review by another agent approved be3f503. Its P2 (a --base-dir without catalogs passed silently) and two nits are addressed in 1e2ba69 and 8f97c54, which it then approved with no P0–P2 findings.
  • Cursor Bugbot passed on 8f97c54 with no comments.

Next owner: Maintainer

Open in Web Open in Cursor 

Note

Medium Risk
Changes release workflow gating and base-selection logic for translation regressions; mistakes could let bad packs ship or block valid releases.

Reviewed by Cursor Bugbot for commit 8f97c54. Bugbot is set up for automated code reviews on this repo. Configure here.

releaseBase only accepted a base whose tree had a catalog for every
TARGET_LOCALES entry. A PR that bundles a new locale (tr in #1184, it in
#1200) passes PR CI, but after it merges no release tag, origin/main
fallback or first-catalog commit has that locale's catalog, so the next
release fails with "no base with bundled PO catalogs", and `--base
<tag>` is rejected too.

A base now qualifies when it has any target catalog, which still rejects
a base from before the catalogs. A locale without a catalog at the base
has nothing reviewed there to keep; release-check names it, and its
compiled pack is still scanned for drafts.

Tests cover a locale bundled after the latest release tag: the release
passes, a reviewed-to-draft regression in an existing locale still fails
against that tag, a draft compiled into the new locale's pack still
fails, and an explicit --base without catalogs is still rejected.
The fixture repositories behind the release-check tests committed and
tagged with the developer's global git config. With commit signing on,
every fixture commit went through the signer; a throttled signer took
up to 15 s per commit, so these tests hit bun's 5 s timeout. With
tag.gpgSign on, `git tag <name>` asks for an annotated tag message and
fails. The fixtures now turn off commit and tag signing.
@Aymericr Aymericr added the bot:maintainer label Nov 9, 2026 — with Cursor
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T01:25:51.362777Z be3f503 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

The default lookup and --base never compare with a base that has no
catalogs, but a --base-dir with none (a typo, or the wrong level) read
as an empty base: release-check passed, and now also listed every locale
as new. It fails like --base instead, so the README's "never compares
with a base that has no catalogs" holds for every base.

The README now says it is the release job that lists a new locale;
i18n:check in CI does not.
Every catalog fixture and release repository stayed in the temp
directory, a few megabytes each, and the new-locale tests added three
more per run. They are removed after each test, as the other script
tests already do.
@Aymericr
Aymericr merged commit 13adfab into main Nov 9, 2026
4 checks passed
@Aymericr
Aymericr deleted the cursor/i18n-release-check-new-locale-b052 branch November 9, 2026 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants