Repository navigation
feat(cli): localize a whole template, and stop format:check failing on a local file - #511
Merged
Merged
Conversation
…n a local file Two small follow-ups to the localize command (#499). `add-template <slug> --localized` installs every block a template composes with its text fields marked localized, so a fifteen-block site does not need a second pass. `add --localized` prints a notice when the Payload config declares no locales; looping that per block would repeat it once per block — seventeen times for portfolio-solo — so `addCommand` takes an internal `deferLocaleNotice` and `add-template` emits it once for the run, alongside a Localization line in the plan. `.prettierignore` now lists `.claude/settings.local.json`. It is git-ignored, usually through a global gitignore, so `git status` stays quiet about it while `prettier --check .` still walks it — which failed `pnpm format:check` locally on a file no commit can contain. CI never saw it; every local gate run did. Co-Authored-By: Claude Opus 5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedNext included review available in 44 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two small follow-ups to
payload-components localize(#499). Independent of each other; split by commit message paragraph if you'd rather take one.1.
add-template <slug> --localizedaddhas had--localizedsince #499, butadd-templatedid not — so installing a template landed fifteen-plus blocks unlocalized and needed a separatelocalizepass straight afterwards. Now:The wrinkle worth reviewing.
add --localizedprints a notice when the Payload config declares no locales, becauselocalized: trueis inert without them.add-templateloopsaddCommandonce per block, so threading the flag naively would have printed that same warning once per block — seventeen times forportfolio-solo.addCommandtherefore takes an internaldeferLocaleNotice, andadd-templateemits the notice once for the run.The plan gained a matching line, from a real
--dry-runagainst a fixture project:warnWhenNoLocalesDeclaredis now exported fromadd.tssoadd-templatecan call it once. Theadd-templatespec mocks the whole./addmodule, so the mock carries both exports.2.
.prettierignorecovers.claude/settings.local.jsonClaude Code writes that file per machine. It is git-ignored — usually through a global gitignore, which is why
git statusstays silent about it — butprettier --check .still walks the working tree and found it, sopnpm format:checkfailed locally on a file no commit can contain.CI never saw it, since the file does not exist on a fresh clone. Every local gate run did.
format:checknow exits 0.Tests
Three new int cases: the flag reaching every block, the notice deferring per block and firing exactly once for the run, and the unflagged default staying unlocalized. One pre-existing CLI case also needed updating — it pinned
addTemplateCommand's exact call shape, which now carrieslocalized.Verification
Rebased onto current
dev(45600eea, which brought Next 16.3.3 and an analytics/SEO spec change) and re-run there, not just on the original base:install --frozen-lockfile(no churn) ·source:build·lint·tsc --noEmit·test:registryformat:checktest:intbuild:e2e·test:e2e(PLAYWRIGHT_SERVER_MODE=production)The e2e run was on the pre-rebase base; the four commits
devgained touchanalytics-contract.int.spec.tsandfumadocs-site.int.spec.ts, neither of which this branch modifies, and the int suite passes on the rebased tree. CI covers the combination.Note for the eventual promote
No closing keyword here — per
AGENTS.mdthose belong in thedev → mainpromote body.🤖 Generated with Claude Code