Skip to content

fix(mobile): iOS tab bar names follow the app language - #49698

Open
flamboh wants to merge 1 commit into
pingdotgg:mainfrom
flamboh:t3/translated-native-tab-names
Open

flamboh wants to merge 1 commit into
pingdotgg:mainfrom
flamboh:t3/translated-native-tab-names

Conversation

@flamboh

@flamboh flamboh commented Dec 6, 2026

Copy link
Copy Markdown
Contributor

Note

🤖 Claude Opus 5.5 on behalf of Oliver

Explain it like I'm lost

The floating tab bar on iPhone (iOS 26+), compact iPad and the iPhone Duo is a native UIKit view. Its tabs are icon-only, so VoiceOver reads each tab's accessibility label. Those labels were hard-coded in Swift as English, so a German user heard "Usage" and "Settings" while the rest of the app spoke German.

Now JS passes each tab's translated name to the native bar, reusing the messages the other iOS tab bar already uses.

VoiceOver tab names with the app in German, before and after

Reproduction on main

Base: 758c14b

  1. Run the dev client on an iOS 26+ iPhone simulator.
  2. Settings → General → Language → Deutsch.
  3. Inspect the tab bar's accessibility tree (VoiceOver, Accessibility Inspector, or agent-device snapshot).

Observed: Chats, PRs, Usage, Settings. Expected: Chats, PRs, Nutzung, Einstellungen.

Fix

  • T3SidebarTabBarView takes a tabLabels prop (tab id → name) and drops its English table.
  • WorkspaceTabDock.ios.tsx builds that map from WORKSPACE_TAB_LABELS and Settings, the same messages WorkspaceNativeTabs.ios.tsx uses. No new strings.
  • The bar's React key now includes the labels. UIKit drops accessible names when nil-titled items change in place, so a language change remounts the bar, like a tab change already does.

Nitro: not affected. apps/mobile-nitro builds its tab items from the Tabs.Screen titles, which already go through translations.

Verification

  • Native dev client built from this branch on the T3 iPhone 18 Pro simulator (iOS 27.0).
  • Under German, the snapshot reads Chats, PRs, Nutzung, Einstellungen. With main's build it reads Usage, Settings.
  • Switching back to English while the app runs updates the labels to Usage and Settings right away. Switching tabs keeps them.
  • vp run check:changed: pass.

Tests kept: none.

Made with Claude Opus 5.5 in Claude Code (T3 Code).

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. 📱 Native Change Changes the native fingerprint; merging blocks production OTAs until a new store build ships. size:S 10-29 changed lines (additions + deletions). labels Dec 6, 2026
@macroscopeapp

macroscopeapp Bot commented Dec 6, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 3c363d7

Macroscope's review found this PR approvable — iOS tab accessibility names now follow the app language using existing translations, with the native bar refreshed when labels change. The change is presentation-only and leaves navigation behavior and stored preferences unchanged.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Dec 6, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The iOS workspace tab dock now supplies localized labels for visible tabs to the native sidebar tab bar. The native view applies the supplied labels to prepared tab items. The tab bar key now includes tab labels.

Changes: Sidebar Tab Labels

Layer / File(s) Summary
Native tab label support
apps/mobile/modules/t3-native-controls/ios/T3NativeControlsModule.swift, apps/mobile/modules/t3-native-controls/ios/T3SidebarTabBarView.swift
The native module accepts a tab-label mapping. The view applies matching labels to prepared items and creates items from fixed tab identifiers.
Workspace label localization and wiring
apps/mobile/src/features/layout/workspace/WorkspaceTabDock.ios.tsx
The workspace tab dock builds labels using localization hooks, includes labels in the tab bar key, and passes the mapping to the native component.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Merge Risk: Minimal · up to 3c363

The change passes translated tab names to the native iOS tab bar so VoiceOver announces them in the app language. No actionable merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(mobile): iOS tab bar names follow the app language" matches the main change. The PR passes translated tab names to the native iOS tab bar so VoiceOver reads them in the app language, in…
Description check Passed The description follows the template's main sections. Problem explains the hard-coded English VoiceOver labels and gives reproduction steps on main. Change describes the tabLabels prop, the WorkspaceT…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(mobile): iOS tab bar names follow the app language" matches the main change. The PR passes translated tab names to the native iOS tab bar so VoiceOver reads them in the app language, instead of hard-coded English labels in T3SidebarTabBarView. The title is specific, uses a conventional commit prefix, and names the affected platform and behavior.

Full details: Description check

Explanation

The description follows the template's main sections. Problem explains the hard-coded English VoiceOver labels and gives reproduction steps on main. Change describes the tabLabels prop, the WorkspaceTabDock mapping, and the key change. Scope notes that no new strings are added and that this is a bug fix. Verification gives the simulator steps, before and after snapshot results, and a before/after image. It also states that no tests were kept and names the model used. The description is clear and complete. The template's optional-looking guidance on splitting and issue links is not fully addressed, since no issue link is given and the Scope section does not explain why no issue is needed. This is a minor gap.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 758c14b and 3c363d7.

Files selected for processing: 3

  • apps/mobile/modules/t3-native-controls/ios/T3NativeControlsModule.swift
  • apps/mobile/modules/t3-native-controls/ios/T3SidebarTabBarView.swift
  • apps/mobile/src/features/layout/workspace/WorkspaceTabDock.ios.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Dec 6, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

Reproduced on base; fixed on head. Real T3 Code Dev on a pooled iPhone 18 Pro, iOS 27.2, 402 × 874 logical points, Light appearance, no connected environments. Each commit used its matching native client and its own Metro checkout.

Steps: Settings → General → Language → Deutsch → back to Settings → Chats → Einstellungen → Tableiste → cold relaunch → switch back to English. Native accessibility trees were captured at each checkpoint.

The tabs are icon-only. Each panel pairs an unmodified app screenshot with verbatim native accessibility rows captured in that state; the text beside the screenshot is an evidence annotation.

Check Before After
Commit 758c14b397 3c363d7b2e
Immediately after Deutsch Before: Immediately after Deutsch After: Immediately after Deutsch
Chats in German Before: Chats in German After: Chats in German
After cold relaunch Before: After cold relaunch After: After cold relaunch
English restored live Before: English restored live After: English restored live
Recording Before interaction After interaction
Native accessibility trees Before trees After trees

Base keeps “Usage” and “Settings” in the German UI, including after cold relaunch. Head immediately uses “Nutzung” and “Einstellungen”, retains them after cold relaunch, and restores “Usage” and “Settings” when English is selected.

Reproduction driver · Evidence-panel renderer · Attempted iOS scenario

The scenario runner failed twice before app launch with an incompatible remote RPC protocol; the captures above come from the direct device-pool workflow.

Not shown:

  • VoiceOver spoken audio was not recorded; this proof inspects the real native accessibility names, matching the reported reproduction.
  • Other app languages and iPad/sidebar placements were not exercised.

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass staged-for-store and removed takeover:in-progress A takeover lead is working on this PR labels Dec 6, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

Thanks for this. This change passed review and its checks are green, so it is ready to merge.

It is held for now because it changes the native app: merging it would block over-the-air updates until a new store build ships. It is labelled staged-for-store and will be merged when the next store release is prepared. Nothing is needed from you until then.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📱 Native Change Changes the native fingerprint; merging blocks production OTAs until a new store build ships. size:S 10-29 changed lines (additions + deletions). staged-for-store takeover:ready Takeover done; auto-lands when gates pass vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants