Skip to content

fix(jp/angular): complete the carousel xplat sync for Japanese - #873

Merged
ChronosSF merged 1 commit into
vnextfrom
fix/jp-carousel-sync-completion
Sep 29, 2026
Merged

ChronosSF merged 1 commit into
vnextfrom
fix/jp-carousel-sync-completion

Conversation

@ChronosSF

@ChronosSF ChronosSF commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Problem

Build And Deploy Angular Documentation JP is failing on vnext (run 36572335183):

[ImageNotFound] Could not find requested image
  docs/angular/src/content/jp/images/carousel/carousel_do_not2@2x.png

The break landed with #870 (JP sync of the carousel redesign), which brought over the xplat MDX but not the pieces the Angular build needs. It surfaced only now because the Angular JP workflow paths-ignores docs/xplat/**, so the push that introduced it never triggered a build — the next unrelated push did (see #402).

Why the xplat JP build passes but Angular JP doesn't

The @xplat-images alias resolves differently in the two apps:

config target
docs/xplat/astro.config.ts src/assets/images — shared, language-agnostic
docs/angular/astro.config.ts src/content/<docsLang>/images — per-locale

And docs/angular/scripts/sync-generated.mjs copies MDX only, never images. So every xplat topic synced into Angular needs its images duplicated under both en/images/ and jp/images/. #506 added the EN copies; the JP ones were never added. The same thing happened with avatar and was fixed the same way in f8bd08c.

Changes

  • Add the 9 missing JP images — images/carousel/ (8 files) and images/anatomy-content-light/carousel-lt-a.png, copied from their EN counterparts.
  • Delete jp/components/carousel.mdx — the superseded native Angular topic, now provided by the xplat sync. feat(docs): update carousel xplat topic #506 deleted the EN equivalent.
  • Repoint jp/components/toc.json from carousel.mdx to layouts/carousel.mdx, matching EN.
  • Update the two JP topics still linking to the old path — general/cli/component-templates.mdx and themes/roundness.mdx.

The TOC change matters on its own: without it the JP site keeps serving the old carousel page while the synced redesign is built but unreachable.

Verification

  • DOCS_TOC_STRICT=true npm run angular:build:jp — clean, 421 pages built, carousel images processed.
  • I diffed every @xplat-images import across all 29 JP xplat topics the Angular sync picks up (excluding grids/ and changelogs, which the sync drops) against what is present in jp/images/. These 9 were the only misses, so this fully unblocks the JP deploy.

Follow-ups (not in this PR)

🤖 Generated with Claude Code

The JP sync of the carousel redesign (#870) brought over the xplat MDX but
not the pieces the Angular build needs, which broke Build And Deploy Angular
Documentation JP:

  [ImageNotFound] Could not find requested image
    docs/angular/src/content/jp/images/carousel/carousel_do_not2@2x.png

docs/angular/astro.config.ts resolves @xplat-images per locale, to
src/content/<lang>/images, and sync-generated.mjs copies MDX only. So each
xplat topic synced into Angular needs its images duplicated under both
en/images/ and jp/images/. #506 added the EN copies; this adds the JP ones.

Also finishes the topic swap on the JP side, mirroring what #506 did for EN:

- delete the superseded native Angular topic components/carousel.mdx
- repoint components/toc.json at layouts/carousel.mdx
- update the two JP topics that still linked to the old path

Without the TOC change the JP site keeps serving the old carousel page and
the synced redesign is built but unreachable.

Verified with DOCS_TOC_STRICT=true npm run angular:build:jp — 421 pages, clean.

Related to #842.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ChronosSF
ChronosSF merged commit caf817c into vnext Sep 29, 2026
11 checks passed
@ChronosSF
ChronosSF deleted the fix/jp-carousel-sync-completion branch September 29, 2026 15:03
ChronosSF added a commit that referenced this pull request Sep 29, 2026
Topics generated from the xplat source import their images as
'@xplat-images/<path>'. docs/xplat/astro.config.ts resolves that to one
shared, language-agnostic folder, but docs/angular/astro.config.ts resolved
it per locale, to src/content/<lang>/images — and sync-generated.mjs copies
MDX only. So every xplat topic synced into Angular needed its images copied
into the Angular tree twice, once per language, by hand.

Nothing enforced that, so it was found by deploys: carousel (#873), and
switch and avatar before it.

Replace the alias with a pre plugin that searches the Angular locale's image
directory first and the shared xplat folder second. An alias cannot express a
fallback, hence the plugin. Precedence is unchanged where a copy already
exists, so this is not a content change; it only stops a missing copy from
being fatal.

Verified against vnext, which lacks the nine JP carousel images:

- angular:build:jp passes where it previously failed with ImageNotFound
- angular:build:en passes
- instrumenting the resolver over a full JP build: 41 specifiers resolve from
  the Angular locale dir (existing copies still win), 9 from the shared
  folder, 0 unresolved. Those 9 are exactly the images #873 adds by hand.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants