Repository navigation
Changelog follow-ups for #331: translatable labels and working quarter links (part of TW-1786) - #346
Merged
zoltan-baba merged 2 commits intoOct 8, 2026
Conversation
Wrap the user-visible strings of the new Changelog and DateRangePicker components in Docusaurus translate()/<Translate> under changelog.* ids, so the Japanese locale can localize them. Area names are product names and stay English per team policy; they are wrapped so the choice is made in i18n, not in code. Month, weekday and range-date formatting now uses Intl.DateTimeFormat with the current locale; English output is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T641RxhBBd3yTdKhMyorpq
The page TOC is built from the MDX at build time and links to every quarter, but Quarter returned null when the area or date filter left it empty. On 4 hub pages (Build Hub, RDE, Insights, Release Management) that broke the #2026-q1 and #2026-q2 TOC links and produced broken-anchor build warnings. The heading now stays with a short, translatable notice; the build has 0 quarter warnings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T641RxhBBd3yTdKhMyorpq
ilanazholobovsky
requested review from
aorcsik,
matenadasdi and
zoltan-baba
as code owners
October 7, 2026 14:44
This was referenced Oct 8, 2026
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.
Base:
changelog-segmented-filters(#331)Why
#325 adds the Japanese locale. The new changelog components from #331 hard-code their UI text in English, so the Japanese changelog would show an English filter bar and date picker.
What
Every user-visible string in
src/components/Changelog/index.tsxandsrc/components/Changelog/DateRangePicker.tsxnow goes throughtranslate()or<Translate>. English text is unchanged.17 new ids:
changelog.filter.allAreas,changelog.filter.ariaLabelchangelog.badge.title("Show only {area} entries")changelog.area.ci,.build-cache,.release-management,.platform,.build-hub,.insights,.rde. These are product names, so each description says "keep in English". They're wrapped anyway so the decision lives in i18n, not in the code.changelog.dateRange.allDates,.clear,.dialogAriaLabel,.previousMonth,.nextMonth,.monthAriaLabel,.yearAriaLabelMonth names, weekday names and the dates on the range button were built from hard-coded English arrays. They now use
Intl.DateTimeFormatwith the site's current locale, so Japanese gets 1月, 月, 9月06日 and so on with no strings to translate. In English,Intlproduces the same text as before. I compared both for every date from 2024 to 2027, with and without the year.How the Japanese strings arrive
In #325,
translate-ja-docs.ymlrunsdocusaurus write-translations --locale jaand thenscripts/translate_ui_strings.py. That script translates anycode.jsonentry that's still English, and leaves alone the entries listed underkeep_englishinlocalization/ja-ui-strings.yamland terms in the do-not-translate glossary. All the area names except "Platform" are inkeep_english. "Platform" is in the glossary.Three things to know:
docs/**/*.md(x),src/partials/**/*.mdxordocs/**/_category_.json. The UI-string step is also skipped unless something changed underdocs/orsrc/partials/. Asrc/**/*.tsxchange like this one doesn't trigger it, and the workflow has noworkflow_dispatchfor a manual run. So after Add Japanese (ja) locale: translated docs, translation pipeline fixes, UI strings #325 and this PR are both on main, the new ids are picked up by the next PR that changes a doc page. Or someone runs the two commands locally and commitsi18n/ja/code.json.ANTHROPIC_API_KEYsecret is added.descriptionfield to the model. The "keep in English" note is guidance for human translators. The script relies on its ownkeep_englishlist and glossary to keep product names in English.Verified
npx tsc --noEmitpasses.npx docusaurus build --locale ensucceeds. The built changelog page still shows "All areas", "All dates", "Filter by area" and "Show only Release Management entries".npx docusaurus write-translations --locale jaextracts all 17changelog.*ids intoi18n/ja/code.json. That file isn't committed here.Not verified
Second commit: working quarter links (
6bf08715)Building #331 on its own shows broken-anchor warnings on 4 hub changelog pages (Build Hub, RDE, Insights, Release Management) for
#2026-q1and#2026-q2. Cause: the page's table of contents is built from the MDX and links to every quarter, butQuarterreturnednullwhen the area filter left it empty, so the heading the TOC links to wasn't there. Readers clicking those TOC entries landed nowhere.Fix: the quarter heading always renders; when no entry matches the filters, a short translatable notice appears under it ("No updates match the current filters in this quarter."). Result: 0 quarter warnings in the English build, and every TOC link on all 5 checked hub pages has its heading (e.g. Insights: 3 headings, 3 TOC links, 2 notices). It also fixes the same dead-link effect when the date filter empties a quarter.
Decision for Zoli: this shows empty quarters with a notice instead of hiding them. If you'd rather keep hiding them, the alternative is filtering the TOC itself, which needs a swizzled TOC component — bigger change.