fix: translate the tab bar and label the unified inbox and drawer buttons

The bottom tabs showed their route names ("Mail", "Calendar", …) in
every language; they now use the webmail's navigation names, and an
unavailable tab says so with one translated message instead of an
English "(unavailable)" suffix. The first loading screen is
translated as well.

The Unified Inbox selection toolbar, its back and clear-search buttons,
and the drawer's close, expand/collapse and remove-account buttons get
screen reader labels. Its unknown-sender fallback, selection count and
"account(s) could not be loaded" banner are proper translations and
plurals now.

The key harvest and the translation coverage test did not look at
App.tsx, which sits next to src/; they do now.
This commit is contained in:
Linus Rath
2026-09-24 21:44:47 +02:00
parent 1cbf763a36
commit b178ee8d07
8 changed files with 118 additions and 26 deletions
+18 -2
View File
@@ -166,6 +166,7 @@ function SidebarRow({
}: SidebarRowProps) {
const c = useColors();
const styles = React.useMemo(() => makeStyles(c), [c]);
const t = useLocaleStore((s) => s.t);
const leftPad = ROW_PX_BASE + depth * INDENT_STEP;
return (
<Pressable
@@ -184,6 +185,9 @@ function SidebarRow({
onPress={onToggleExpand}
hitSlop={6}
style={styles.chevron}
accessibilityRole="button"
accessibilityLabel={isExpanded ? t('sidebar.collapse', 'Collapse') : t('sidebar.expand', 'Expand')}
accessibilityState={{ expanded: isExpanded }}
>
{isExpanded ? (
<ChevronDown size={12} color={c.textMuted} />
@@ -758,7 +762,13 @@ export default function SidebarDrawer({ visible, onClose }: SidebarDrawerProps)
<SafeAreaView style={styles.drawerSafe} edges={['top', 'bottom', 'left']}>
{/* Header: close + account switcher */}
<View style={styles.header}>
<Pressable onPress={onClose} style={styles.headerClose} hitSlop={8}>
<Pressable
onPress={onClose}
style={styles.headerClose}
hitSlop={8}
accessibilityRole="button"
accessibilityLabel={t('common.close', 'Close')}
>
<X size={20} color={c.text} />
</Pressable>
<Pressable
@@ -860,7 +870,13 @@ export default function SidebarDrawer({ visible, onClose }: SidebarDrawerProps)
</View>
</View>
{!isActive && (
<Pressable onPress={() => confirmRemoveAccount(acc)} hitSlop={8} style={styles.accountMenuRemove}>
<Pressable
onPress={() => confirmRemoveAccount(acc)}
hitSlop={8}
style={styles.accountMenuRemove}
accessibilityRole="button"
accessibilityLabel={t('sidebar.remove_account', 'Remove account')}
>
<UserMinus size={14} color={c.textMuted} />
</Pressable>
)}
@@ -55,6 +55,10 @@ const TRANSLATED_FILES: Record<string, string[]> = {
'components/email/QuickReplyBox.tsx': [],
'components/email/AttachmentChips.tsx': [],
'components/email/AttachmentPreviewModal.tsx': [],
'screens/UnifiedInboxScreen.tsx': [],
'components/SidebarDrawer.tsx': [],
// The app shell (tab bar, loading screen), next to src/.
'../App.tsx': [],
};
describe('translated screens', () => {