Skip to content

chore(i18n): drop tabs.home, the home tab's own title key - #486

Merged
PathGao merged 1 commit into
chore/drop-dead-home-tab-constructorfrom
chore/drop-dead-tabs-home-key
Aug 6, 2026
Merged

chore(i18n): drop tabs.home, the home tab's own title key#486
PathGao merged 1 commit into
chore/drop-dead-home-tab-constructorfrom
chore/drop-dead-tabs-home-key

Conversation

@PathGao

@PathGao PathGao commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Prerequisite

Third in a chain — merge #480, then #482, then this:

master ← #480 (Ctrl+T means new file)
           ← #482 (remove addHomeTab, keep the sentinel)
                ← this PR (remove tabs.home, the title that tab carried)

Branched on and targeting chore/drop-dead-home-tab-constructor, so the diff
above is this change alone. GitHub retargets each base automatically as the one
below it lands.

This is the follow-up #482's Scope section offered.

What this is

tabs.home was the home tab's own title key: addHomeTab set
title: t('tabs.home', settings.language), and that was its only consumer in
src/. #482 removed the method, so the key now titles nothing.

26 locales, one leaf each, always the second entry of a tabs block that keeps
untitled:

         tabs: {
-            untitled: 'Untitled',
-            home: 'Home'
+            untitled: 'Untitled'
         },

Scope

The home screen is not affected. There are three home keys per locale and
this touches one:

key what it is here
menu.home the Home menu item / titlebar button label kept
home.* the HomePage section (welcome, recent files, …) kept
tabs.home the title of the tab that held the home screen removed

The home screen keeps both of its live routes — the titlebar button and the
showHome toggle. What went is the title of a tab that can no longer exist.

78 → 52 occurrences of home: in the dictionary, which is 26 × 3 → 26 × 2.

Tests

homeTabRender.test.ts read the key to prove the render gate ignores the tab
title in every language — the dead half of the #392 gate compared against the
English literal 'Recents'. It now reads menu.home, which every locale also
defines. The claim under test is that the title cannot affect which branch runs,
not which key the title came from; the following 'Recents' assertion is
unchanged.

Verification

Nothing type-checks a t() key — Translation is an index signature
([key: string]: string | Translation), so svelte-check has no opinion here
and a half-finished sweep across 26 locales would compile fine. The safety net
is i18nCoverage.test.ts, and rather than assume it covers this I broke it both
ways and watched it fail:

A locale left behind. Restored home: 'ホーム' to ja only:

✖ no language defines a key English does not have
    tabs.home  [1] ja

A call site missed. Put t('tabs.home', settings.language) back into
tabs.svelte.ts:

✖ every key the source asks for exists in English
✖ t() never echoes a key back for a reachable string

Both directions of that file's interlock hold, so neither failure mode can reach
master. Probes reverted; the diff is the 26 deletions and the one test line.

Full suite, macOS (darwin 25.5.0), on top of #482:

npm audit        found 0 vulnerabilities
npm run check    649 FILES 0 ERRORS 0 WARNINGS
npm test         737 tests, 737 pass, 0 fail
cargo test       157 passed; 0 failed   (unchanged from #482 — no Rust here)

Not verified: no running app. This is a dictionary deletion whose safety
rests on the two probes above plus the caller census (grep -rn 'tabs\.home' src scripts returns only the comment explaining the substitution), not on switching
the UI through 26 languages by hand.

Follow-up to #482, which removed `TabManager.addHomeTab`. That method's
`title: t('tabs.home', settings.language)` was the key's only consumer in
`src/`, and the tab it titled no longer exists — nothing is left to name.

26 locales, one leaf each, all of them the second entry of a `tabs`
block that keeps `untitled`. `menu.home` and the whole `home.*` section
are untouched: the home SCREEN is very much alive, reached by the
titlebar button and the `showHome` toggle. Only the tab's title is gone.

homeTabRender.test.ts read the key to prove the render gate ignores the
title in every language. It now reads `menu.home`, which every locale
also defines. The claim under test is that the title cannot affect which
branch runs, not which key the title came from.

Nothing type-checks a `t()` key — the `Translation` interface is an index
signature — so both directions were verified against i18nCoverage.test.ts
rather than assumed:

  * leave the key in one locale after removing it from English, and
    `no language defines a key English does not have` fails with
    `tabs.home [1] ja`. A partial sweep across 26 locales cannot pass.
  * point any src file at `t('tabs.home', …)` again, and both
    `every key the source asks for exists in English` and `t() never
    echoes a key back for a reachable string` fail. A missed call site
    cannot pass either.

npm audit / npm run check / npm test / cargo test all clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@PathGao
PathGao merged commit fd551ec into chore/drop-dead-home-tab-constructor Aug 6, 2026
4 checks passed
@PathGao
PathGao deleted the chore/drop-dead-tabs-home-key branch August 6, 2026 04:09
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.

1 participant