Skip to content

[jp-sync] Sync switch topics translation (from #546) - #835

Open
github-actions[bot] wants to merge 7 commits into
vnextfrom
jp-sync/switch-topics-546-6e7d4a0a9f499509
Open

github-actions[bot] wants to merge 7 commits into
vnextfrom
jp-sync/switch-topics-546-6e7d4a0a9f499509

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Original author: Hristo Hristov 57346540+Hristo313@users.noreply.github.com

Syncs the Japanese (docs/xplat/src/content/jp) documentation with the English switch topic changes introduced in commit 5f68139 ("feat(switch): update switch topics (#546)").

Files processed

English source Japanese counterpart Change
docs/xplat/src/content/en/components/inputs/switch.mdx docs/xplat/src/content/jp/components/inputs/switch.mdx Full re-translation. The English topic was substantially rewritten (new title, anatomy section, restructured getting-started/usage sections per platform, interaction/disabled/on-off states, layout, do/don't table, properties table, expanded styling section with Sass/CSS variables/parts/Tailwind, accessibility section, troubleshooting, API references, dependencies, related components, and FAQ). The Japanese file was rewritten to mirror this structure while preserving all PlatformBlock/ApiLink/Sample/Anatomy/Faq/FaqItem tags, imports, code blocks, and {Token} placeholders exactly. Tag counts were verified to match the English source (PlatformBlock: 57, ApiLink: 27, Sample: 14, FaqItem: 4). Added last_updated: "2026-08-31" and relatedComponents: [Checkbox, ToggleButton] frontmatter fields to match the English source, alongside the existing _language: ja.
docs/xplat/src/content/en/components/inputs/badge.mdx docs/xplat/src/content/jp/components/inputs/badge.mdx Updated the two "outlined" badge <Sample> heights from 212 to 250 to match the English change. No prose changed in this file.
docs/xplat/src/content/en/toc.json docs/xplat/src/content/jp/toc.json Removed the exclude: ["Angular"] entry for the Switch item and added "updated": true, matching the English toc.json change. The existing Japanese name value ("スイッチ") was left untouched since it wasn't part of the diff.

Not synced

  • docs/xplat/src/content/en/components/interactivity/accessibility-compliance.mdx had a one-line link-path fix (../switch.mdx../inputs/switch.mdx). The Japanese counterpart currently uses a different (older) table layout for this content that does not contain an equivalent Markdown link to update, so no change was made there. This pre-existing structural drift between the English and Japanese accessibility-compliance topics is unrelated to the Switch update and may need separate attention.

Generated by Sync Japanese Documentation (xplat) · copilot · auto · 345.8 AIC · ⌖ 2.74 AIC · ⊞ 11.1K ·

Sync Japanese documentation with English switch topic updates from
commit 5f68139 (feat(switch): update switch topics (#546)).

- components/inputs/switch.mdx: full translation of the reworked
  Switch topic (anatomy, getting started, usage, interaction states,
  styling, accessibility, troubleshooting, FAQ, related components).
- components/inputs/badge.mdx: updated Sample height (212 -> 250) for
  the outlined badge example, matching the English change.
- toc.json: removed the Angular exclude on the Switch entry and added
  updated: true, matching the English toc.json change.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mkamiishi
mkamiishi self-requested a review September 16, 2026 01:07
mkamiishi
mkamiishi previously approved these changes Sep 16, 2026
@mkamiishi

Copy link
Copy Markdown
Contributor

@ChronosSF I ran our check prompt against these files, and overall, they look like a good result. The main corrections involved ensuring consistency in terminology across related pages. As previously reported, we believe that if the prompt were to instruct the system to maintain consistency in translations by cross-referencing with existing documents, even a low-cost AI model could achieve a level of accuracy that would eliminate the need for this type of correction.

@ChronosSF

Copy link
Copy Markdown
Member

@mkamiishi , could you please re-review. I had to fix the getting started links for angular which we started breaking a bit earlier than this PR.

@ChronosSF
ChronosSF requested a review from mkamiishi September 16, 2026 09:05
Hristo313
Hristo313 previously approved these changes Sep 16, 2026
mkamiishi
mkamiishi previously approved these changes Sep 17, 2026
@mkamiishi

Copy link
Copy Markdown
Contributor

@ChronosSF
Thank you for the fix! I re-reviewed and everything looks good.

@jsakamotoIGJP
jsakamotoIGJP dismissed stale reviews from mkamiishi and Hristo313 via 0288ad9 September 17, 2026 01:37

@jsakamotoIGJP jsakamotoIGJP left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ChronosSF When I checked it on my end with the npm run angular:dev:jp command, it showed an error below.

Cannot find module '@xplat-images/anatomy-content-light/switch-lt-a.png'
imported from '.../docs/angular/src/content/jp/components/inputs/switch.mdx'
Image

So, I copied the required image files from the English version to the JP content directory. Please also see commit 0288ad9.
After that, it looked perfect, so I'll approve this pull request.

@jsakamotoIGJP

Copy link
Copy Markdown
Contributor

@ChronosSF As I described above, this pull request had an issue because some image files were missing on the JP content side. Moreover, I noticed that this kind of issue, such as a lack of image files, was never detected by any CI checks. I'd appreciate it if someone could improve the CI checks to detect missing image files.

@jsakamotoIGJP

Copy link
Copy Markdown
Contributor

@ChronosSF For now, this pull request includes changes in EN conten so we, JP team, can't merge these commits into the vnext branch.
So, please handle merging this PR on your side.

@ChronosSF

Copy link
Copy Markdown
Member

@ChronosSF As I described above, this pull request had an issue because some image files were missing on the JP content side. Moreover, I noticed that this kind of issue, such as a lack of image files, was never detected by any CI checks. I'd appreciate it if someone could improve the CI checks to detect missing image files.

@copilot , log an issue about this finding.

Copilot AI commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

@ChronosSF As I described above, this pull request had an issue because some image files were missing on the JP content side. Moreover, I noticed that this kind of issue, such as a lack of image fil...

I couldn’t create the issue from this session: issue-creation access is unavailable (the CLI is unauthenticated and the browser tool is unavailable). Ready-to-file report:

Title: CI: detect missing localized documentation image imports

Problem: In #835, running npm run angular:dev:jp and opening /inputs/switch failed with:

Cannot find module '@xplat-images/anatomy-content-light/switch-lt-a.png'

The import came from the generated Angular JP switch topic. Screenshot. Commit 0288ad9 fixed the page by adding the JP anatomy and do/don’t images; preventing recurrence remains outstanding.

CI evidence: The Angular CI job before the fix, at f356491, succeeded; its logs show 418 pages built. The CI build matrix covers platforms, not languages, and the Angular build defaults to English. The relative-link checker scans Markdown links and JSX href attributes, not MDX image imports. Angular resolves @xplat-images against the selected language’s Angular image directory, so an EN image does not satisfy a JP import.

Acceptance criteria:

  • Add a PR check that catches missing localized image imports, including @xplat-images in xplat-generated Angular JP content, using the actual platform/language resolution rules.
  • Fail with the importing topic, platform/language, and missing image path; cover image deletions as well as topic edits.
  • Add regression coverage for an image present in EN but missing from the JP destination; restoring the JP image must make the check pass.

No changes to this PR are needed for filing this follow-up.

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.

5 participants