test(cli): cover non-English base locale colliding with an en translation - #17539
Open
devin-ai-integration[bot] wants to merge 2 commits into
Open
test(cli): cover non-English base locale colliding with an en translation#17539devin-ai-integration[bot] wants to merge 2 commits into
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2 tasks
There was a problem hiding this comment.
Adds a single regression test covering a non-English default locale alongside a real en translation, asserting the base and translation segments produce distinct locale keys. Test-only change, consistent with the surrounding test style, and the assertion directly targets the described collision. No issues found.
To request another review, comment /ai-review on this pull request.
Base automatically changed from
devin/1787702962-cli-default-locale-manifest-key
to
main
August 26, 2026 18:00
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.
Description
Linear ticket: Refs #17531, refs Pylon issue 23045
Targets
devin/1787702962-cli-default-locale-manifest-key(#17531), notmain. #17536 was closed as redundant with #17531; this ports the one regression case #17531's tests don't cover.#17531's tests assert that a configured default locale is stamped on the base segment (
en-US,de-DE) and that an explicit translation locale round-trips. What they don't exercise is the collision that made the bug data-destructive rather than merely cosmetic: a non-English default plus a realentranslation. Because the ledger manifest keyslocalesas a record (buildLedgerManifest.ts), a base segment flattened to"en"doesn't just mislabel itself — it occupies the key the site's actualentranslation needs, and one entry silently overwrites the other.Changes Made
buildLedgerInput.test.ts:nldefault +["en", "de"]translations, asserting base andentranslation segments come back as["nl", "en"]— i.e. two distinct manifest keys.Testing
Run against this branch (which is #17531's head plus this test):
Unit-level only — no real docs publish was exercised, and the reader-side pieces (the FDR
registerTranslationenguard,ledger-docs-loader's<html lang="en">fallback, and the Astro fallback in fern-platform#14141) are untouched and unvalidated here.