Uh oh!
There was an error while loading. Please reload this page.
fix: 未翻訳トラッキングIssueのプレビューURL生成をナビゲーション定義に基づかせる - #1199
Open
lacolaco wants to merge 5 commits into
Open
Conversation
The untranslated-files tracker derived angular.jp URLs by string-munging content file paths. Since `path` and `contentPath` in the navigation entries are independent, 14 of 132 generated links pointed at 404 pages (e.g. best-practices/performance/overview.md -> /best-practices/performance). Read the route table instead, and cover the routes Bazel generates for the error encyclopedia, extended diagnostics and tutorials. Pages that resolve to no route are unreachable on the site, so they are dropped from the tracker. `pnpm test` now fails when a page stops resolving.
- Consume the URL computed by list-untranslated instead of re-deriving it. - Match Translation Checkout titles on path boundaries, so `translate: guide/signals` no longer claims `guide/signals-xyz.md`, and files outside src/content match at all. - Paginate issue queries; the default page size of 30 silently truncated the checkout list and risked creating a duplicate tracking issue. - Pass the file list through the environment rather than interpolating it into the script body. - Add the introduction, ai and events categories, which all fell into "その他".
Review of the previous commit found three defects in the resolver. The navigation entries list 8 pages under two sections, so one contentPath carries two URLs; taking the last one sent 5 guide pages to their best-practices alias. Prefer the URL that repeats the content path. The parser required contentPath to sit on the line after path, and threw otherwise, so a benign key reordering upstream would have taken down both the sync workflow and CI. Scan the object literals instead. An unresolvable page was assumed orphaned and vanished from tracking. Only pages listed in KNOWN_ORPHANED_CONTENT are dropped now; anything else stays tracked without a preview link, and the route check names both lists so the choice is deliberate. The route check runs as its own CI step: `pnpm test` keeps meaning patch validation, which update-origin depends on.
The path-boundary fix broke declarations written with a trailing slash (`translate: guide/di/`), which the old prefix match did handle. Normalise the trailing slash, and cover the matching with tests. Files dropped for having no page now appear in the issue body; leaving them only in the workflow log means nobody notices they went untranslated.
The pin points at the commit tag v4.1.0 resolves to, but the comment read 4.1.0, which is not a ref. zizmor's ref-version-mismatch check blocks any PR that touches these workflows. Only the two files this PR edits are corrected; the same comment remains in the workflows it does not touch.
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 freeto 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.
翻訳・修正
未翻訳ドキュメントのトラッキングIssue (#1102) が生成するプレビューリンクの破損を修正します。翻訳内容の変更はありません。
https://angular.jp/best-practices/performance/overviewが404になる報告から、生成アルゴリズムを総点検しました。何が壊れていたか
プレビューURLは
adev-ja/src/content/**のファイルパスを文字列加工して作っていましたが、実URLはadev-ja/src/app/routing/navigation-entries/index.tsのpath/contentPath対応表が正です。両者は独立した値なので一致しません。未翻訳131件のうち13件が404を指していました。best-practices/performance/overview.md/best-practices/performance/overview/best-practices/performancebest-practices/runtime-performance/zone-pollution.md/best-practices/runtime-performance/zone-pollution/best-practices/zone-pollutionguide/forms/signals/designing-your-form-model.md…/designing-your-form-model…/model-designai/mcp-server-setup.md/ai/mcp-server-setup/ai/mcp*/overview.mdを親パスへ畳む系)あわせて以下も修正しています。
listForRepoが既定30件で打ち切られていました。type: translationラベルは既に全57件あり、トラッキングIssueがページ外へ落ちると新規Issueが作られます。ページネーションを追加。translate: guide/signalsがguide/signals-rfc.mdも宣言済みにしていました。パス境界での一致に変更。src/app/**の宣言が一切マッチしなかった問題も解消。guide/di/creating-injectable-service.mdは上流でナビから外れリダイレクトのみ残る死にコンテンツです。追跡対象から外し、外した事実はIssue本文に明記します。introduction/ai/eventsが「その他」に落ちていたため追加。再発防止
pnpm run test:routes: 全コンテンツ378件がURLへ解決できることを検査。解決できないページは、追跡を続ける (ROUTELESS_TRANSLATABLE_CONTENT) か外す (KNOWN_ORPHANED_CONTENT) かの明示を要求します。pnpm run test:unit: 経路解決と宣言突合の仕様を20件のテストで固定。いずれもCIのPRチェックに追加しました。
pnpm testは従来どおりパッチ検証のみで、update-originの事前チェックの意味は変えていません。関連Issue
#1102
備考
navigation-entries/index.tsにはcontentPathの重複が8件あり、うち5件は別セクションへの相互掲載です (例:guide/ssrがguide/ssrとbest-practices/performance/ssrの両方に載る)。プレビューURLは「contentPathと一致するパス = そのページ自身の住所」を優先しています。KNOWN_ORPHANED_CONTENTの2件はllms-list.md経由でllms-full.txtには収録されるため、ページとしては到達不能でもLLM向けコンテキストには載ります。翻訳の優先度は低いという判断で追跡から外していますが、方針を変える場合はこのリストを空にしてください。変更ファイル:
tools/lib/content-routes.ts(新規),tools/lib/content-routes.test.ts(新規)tools/verify-content-routes.ts(新規)tools/list-untranslated.ts.github/scripts/sync-untranslated-issue.mjs,.github/scripts/sync-untranslated-issue.test.mjs(新規).github/workflows/sync-untranslated-issue.yml,.github/workflows/ci.yml,package.json