diff --git a/assets/i18n/en-US.json b/assets/i18n/en-US.json index 0e1a403fb..820893bca 100644 --- a/assets/i18n/en-US.json +++ b/assets/i18n/en-US.json @@ -1124,7 +1124,12 @@ "authDeviceChallenges": "Device Usage", "authDeviceHint": "Swipe left to edit label, swipe right to logout device.", "settingsMessageDisplayStyle": "Message Display Style", + "settingsMessageDisplayStyleBubble": "Bubble", + "settingsMessageDisplayStyleColumn": "Column", + "settingsMessageDisplayStyleCompact": "Compact", "settingsAttachmentsListStyle": "Attachments List Style", + "settingsAttachmentsListStyleRow": "Row", + "settingsAttachmentsListStyleColumn": "Column", "settingsLinkCollapseMode": "Link Preview Default", "settingsLinkCollapseModeExpand": "Expand", "settingsLinkCollapseModeCollapse": "Collapse", @@ -1712,6 +1717,11 @@ "chatRoomUnpinned": "Chat room unpinned successfully.", "pinnedChatRoom": "Pinned Rooms", "settingsGroupedChatList": "Grouped Chat List", + "settingsShowChatEventMessages": "ShowChatEventMessages", + "ShowChatEventsMessagesHelper": "Choose visibility level for event/system messages", + "settingsChatEventMessageModeVerbose": "Verbose", + "settingsChatEventMessageModeImportant": "Important", + "settingsChatEventMessageModeNone": "None", "settingsNotifyWithHaptic": "Notification with Haptic Feedback", "settingsTts": "Text-to-Speech", "settingsEnableTts": "Enable TTS", @@ -2667,6 +2677,25 @@ "settingsMediaProxy": "Media Proxy", "settingsMediaProxyHelper": "Media proxy will run a local HTTP server on your device, to support streaming cache, provides better media playback experience.", "openFullPost": "Open full post", + "fitnessSyncHint": "Tap to sync your latest workouts and metrics", + "fitnessNewHealthDataHint": "New health data available", + "fitnessSync": "Sync", + "fitnessQuickActions": "Quick Actions", + "NoWorkoutsHint": "No Workouts", + "SeeAll": "See All", + "fitnessViewGoals": "View Goals", + "TrackFitnessGoals": "Track your fitness goals", + "ViewMetrics": "View Metrics", + "fitnessTrackHint": "Track weight, steps, and more", + "ViewLeaderboard": "View Leaderboard", + "ViewLeaderboardHint": "See how you rank against others", + "ActiveGoals": "Active Goals", + "Completed": "Completed", + "Goals": "Goals", + "Metrics": "Metrics", + "Import": "Import", + "RecentWorkouts": "Recent Workouts", + "LeaderBoard": "LeaderBoard", "project": "Project", "pickImage": "Pick Image", "selectedImages": "Selected Images", diff --git a/assets/i18n/zh-CN.json b/assets/i18n/zh-CN.json index fd2b9a379..c4f65b2cb 100644 --- a/assets/i18n/zh-CN.json +++ b/assets/i18n/zh-CN.json @@ -12,6 +12,13 @@ "loginGreeting": "欢迎回来!", "loginOr": "或使用\n第三方登录", "loginInProgress": "登录中……", + "useRecoveryCode": "使用恢复码", + "recoveryCodeHint": "请输入您的账户名称和恢复码以恢复账户。", + "recoveryCode": "恢复码", + "recover": "恢复", + "recoveryCodeCreated": "恢复码已创建", + "recoveryCodeSaveWarning": "请妥善保存此恢复码,之后将无法再次获取。请将其保存在密码管理器或安全位置。", + "iHaveSavedIt": "我已保存", "username": "用户名", "usernameCannotChangeHint": "用户名创建后无法更改。", "usernameLookupHint": "您也可以输入电子邮件地址。", @@ -1444,6 +1451,12 @@ "thoughtFunctionCallFinish": "{} 已响应", "thoughtUnpaidHint": "由于存在未支付订单,无法使用寻思功能", "thoughtUnpaidBanner": "你有未支付订单,请完成支付以继续使用服务。", + "thoughtStatusCompacting": "正在压缩上下文...", + "thoughtStatusPreparingContext": "正在准备上下文...", + "thoughtStatusContextCleared": "上下文已清除", + "thoughtStatusCompacted": "上下文已压缩", + "thoughtStatusAutoCompacted": "上下文已自动压缩", + "thoughtCompactArchived": "已归档 {} 条消息", "conversations": "对话", "newConversation": "新建对话", "deleteConversation": "删除对话", @@ -1664,6 +1677,14 @@ "notableDayToday": "{} 就是今天!", "authSessionLogout": "注销登录", "authSessionLogoutHint": "确认要退出登录吗?此操作将仅结束当前浏览会话,不会影响其他已登录的设备。", + "authDevicesTab": "设备", + "authSessionsTab": "会话", + "authLogoutAllOtherSessions": "退出所有其他会话", + "authLogoutAllOtherSessionsHint": "确定要退出所有其他会话吗?此操作无法撤销。", + "authCurrentSession": "当前会话", + "sessionTypeLogin": "登录", + "sessionTypeOAuth": "OAuth", + "sessionTypeOidc": "OIDC", "filesDescription": "在 Solar Network Drive 管理您的文件。", "postComposeDescription": "撰写一篇新帖子", "searchPostsDescription": "输入标题、正文或关键词进行搜索。", @@ -1692,6 +1713,11 @@ "chatRoomUnpinned": "聊天室已取消置顶。", "pinnedChatRoom": "已置顶的聊天室", "settingsGroupedChatList": "启用群组聊天列表分组", +"settingsShowChatEventMessages": "显示聊天事件消息", + "ShowChatEventsMessagesHelper": "选择事件/系统消息的可见级别", + "settingsChatEventMessageModeVerbose": "全部显示", + "settingsChatEventMessageModeImportant": "仅重要", + "settingsChatEventMessageModeNone": "不显示", "settingsNotifyWithHaptic": "通知触感反馈", "settingsTts": "文字转语音", "settingsEnableTts": "启用 TTS", @@ -2034,22 +2060,58 @@ "benefitsComparison": "权益对比", "subscribeNow": "立即订阅", "subscriptionAutoRenewDisclaimer": "自动续订订阅。可随时在 App Store 中取消。", + "noPurchasesToRestore": "没有可恢复的购买项目", "termsLink": "服务条款", "badges": "徽章", + "badgeInfoDescription": "徽章可通过完成成就、支持 Solar Network、成为社区重要成员以及参与特殊活动获得。激活的徽章将显示在您的账户名称旁,其余徽章则始终在个人资料页可见。", "active": "已激活", "activate": "激活", - "actionLogs": "操作日志", +"actionLogs": "操作日志", + "punishments": "处罚记录", + "adminPunishments": "管理处罚", + "myPunishments": "我的处罚", + "my": "我的", + "admin": "管理", + "punishment": "处罚", + "createPunishment": "创建处罚", + "editPunishment": "编辑处罚", + "deletePunishment": "删除处罚", + "deletePunishmentConfirm": "确定要删除此处罚吗?此操作无法撤销。", + "punishmentReason": "原因", + "punishmentReasonRequired": "请输入原因", + "punishmentReasonHint": "请输入处罚原因……", + "punishmentType": "类型", + "punishmentExpiresAt": "过期时间", + "punishmentBlockedPermissions": "被封禁的权限", + "punishmentBlockedPermissionsHint": "输入权限键,支持通配符,例如 'chat.send' 或 'drive.*'", + "punishmentTypePermissionModification": "权限修改", + "punishmentTypeBlockLogin": "禁止登录", + "punishmentTypeDisableAccount": "禁用账户", + "punishmentTypeStrike": "记过", + "noPunishmentsFound": "未找到处罚记录", + "punishmentCreated": "处罚创建成功", + "punishmentUpdated": "处罚更新成功", + "punishmentDeleted": "处罚删除成功", + "punishmentOverviewPermissionModification": "您的权限已被修改", + "punishmentOverviewBlockLogin": "您已被限制登录", + "punishmentOverviewDisableAccount": "您的账户已被禁用", + "punishmentOverviewStrike": "您已被记过一次", + "punishmentOverviewExpires": "过期时间:{}", + "accountRestrictions": "账户限制", + "tapToViewDetails": "点击查看详情", + "targetAccount": "目标账户", + "selectAccount": "选择账户", + "selectAccountRequired": "请选择一个账户", + "socialCreditReduction": "社会信用扣减", + "expiredAt": "已过期:{}", + "expiresAt": "过期:{}", + "optionalField": "可选", "passport": "进度", "achievements": "成就", "quests": "任务", "rewards": "奖励", - "completed": "已完成", "completedAt": "完成于 {}", - "nextReset": "下次重置: {}", - "daily": "每日", - "weekly": "每周", - "monthly": "每月", - "progress": "进度", + "nextReset": "下次重置:{}", "noAchievements": "暂无成就", "noQuests": "暂无可用任务", "experience": "经验", @@ -2248,13 +2310,19 @@ "nearbyObservationsReady": "已准备 {} 条记录", "nearbyObservationsCollecting": "正在收集...", "meetWatchStopped": "实时更新已停止", - "meetParticipants": "参与者", - "meetParticipantsCount": "共有 {} 人", - "meetParticipantsEmpty": "尚无人加入。", + "meetQrShareTitle": "分享 {}", + "meetQrShareTitleDefault": "分享会面", + "meetQrScanTitle": "扫描二维码", + "meetQrScanHint": "将摄像头对准会议二维码即可加入", + "meetQrScan": "扫描二维码", + "meetParticipants": "发起者", + "meetParticipantsCount": "{} people here", + "meetParticipantsLocation": "参与者位置", + "meetParticipantsEmpty": "暂无参与者加入", "meetHost": "发起者", "meetParticipant": "参与者", "meetComplete": "完成会面", - "meetDelete": "删除会面", + "meetDelete": "删除会面", "meetDeleteConfirm": "您确定要删除此会面吗?此操作无法撤销。", "meetExpiresAt": "结束时间", "meetLastUpdate": "最后更新", @@ -2448,7 +2516,11 @@ "descriptionOptional": "描述(可选)", "notes": "备注", "notesOptional": "备注(可选)", + "details": "详情", + "progress": "进度", "complete": "完成", + "active": "进行中", + "completed": "已完成", "paused": "已暂停", "cancelled": "已取消", "recalculateProgress": "重新计算进度", @@ -2507,8 +2579,11 @@ "fediverseInteractionHint": "要与联邦宇宙帖子互动,请在账户设置中设置默认的联邦宇宙发布者。", "fediverseInteractionHintTitle": "需要联邦宇宙身份", "fediverseFollowHint": "要关注联邦宇宙行动者,请在账户设置中设置默认的联邦宇宙发布者。", - "autoTrackFrom": "自动跟踪来源", + "autoTrackFrom": "自动追踪起始时间", + "daily": "每日", + "weekly": "每周", "biweekly": "每两周", + "monthly": "每月", "quarterly": "每季度", "yearly": "每年", "day": "天", @@ -2596,5 +2671,27 @@ "notificationCustomTopic": "主题", "notificationCustomTopicHint": "例如:custom.topic.name", "notificationCustomDescription": "描述", - "notificationCustomTopicError": "请输入主题和描述" + "notificationCustomTopicError": "请输入主题和描述", + "settingsMediaProxy": "媒体代理", + "settingsMediaProxyHelper": "媒体代理将在您的设备上运行一个本地 HTTP 服务器,以支持流式缓存,提供更好的媒体播放体验。", + "openFullPost": "展开全文", +"fitnessSyncHint": "点击同步您的最新锻炼和健康数据", +"fitnessNewHealthDataHint": "有新健康数据可用", +"fitnessSync": "同步", +"fitnessQuickActions": "快捷操作", +"NoWorkoutsHint": "暂无锻炼记录", +"SeeAll": "查看全部", +"fitnessViewGoals": "查看目标", +"TrackFitnessGoals": "追踪您的健身目标", +"ViewMetrics": "查看指标", +"fitnessTrackHint": "追踪体重、步数等更多数据", +"ViewLeaderboard": "查看排行榜", +"ViewLeaderboardHint": "查看您在他人中的排名", +"ActiveGoals": "进行中的目标", +"Completed": "已完成", +"Goals": "目标", +"Metrics": "指标", +"Import": "导入", +"RecentWorkouts": "最近锻炼", +"LeaderBoard": "排行榜" } \ No newline at end of file diff --git a/assets/i18n/zh-TW.json b/assets/i18n/zh-TW.json index b7cae4e41..0e74009e7 100644 --- a/assets/i18n/zh-TW.json +++ b/assets/i18n/zh-TW.json @@ -12,6 +12,13 @@ "loginGreeting": "歡迎回來!", "loginOr": "或使用\n第三方登入", "loginInProgress": "登入中……", + "useRecoveryCode": "使用恢復碼", + "recoveryCodeHint": "請輸入您的賬戶名稱和恢復碼以恢復賬戶。", + "recoveryCode": "恢復碼", + "recover": "恢復", + "recoveryCodeCreated": "恢復碼已建立", + "recoveryCodeSaveWarning": "請妥善儲存此恢復碼,之後將無法再次獲取。請將其儲存在密碼管理器或安全位置。", + "iHaveSavedIt": "我已儲存", "username": "用戶名", "usernameCannotChangeHint": "用戶名建立後無法更改。", "usernameLookupHint": "您也可以輸入電子郵件地址。", @@ -170,7 +177,7 @@ "checkIn": "簽到", "checkInNone": "尚未簽到", "checkInNoneHint": "透過簽到獲取您的運勢提示和每日獎勵。", - "checkInResultLevel0": "大凶", + "checkInResultLevel0": "大兇", "checkInResultLevel1": "兇", "checkInResultLevel2": "中平", "checkInResultLevel3": "吉", @@ -529,7 +536,7 @@ "timeZone": "時區", "birthday": "生日", "selectADate": "選擇日期", - "checkInResultT0": "大凶", + "checkInResultT0": "大兇", "checkInResultT1": "兇", "checkInResultT2": "中平", "checkInResultT3": "吉", @@ -1444,6 +1451,12 @@ "thoughtFunctionCallFinish": "{} 已響應", "thoughtUnpaidHint": "由於存在未支付訂單,無法使用尋思功能", "thoughtUnpaidBanner": "你有未支付訂單,請完成支付以繼續使用服務。", + "thoughtStatusCompacting": "正在壓縮上下文…", + "thoughtStatusPreparingContext": "正在準備上下文…", + "thoughtStatusContextCleared": "上下文已清除", + "thoughtStatusCompacted": "上下文已壓縮", + "thoughtStatusAutoCompacted": "上下文已自動壓縮", + "thoughtCompactArchived": "已歸檔 {} 條訊息", "conversations": "對話", "newConversation": "新建對話", "deleteConversation": "刪除對話", @@ -1664,6 +1677,14 @@ "notableDayToday": "{} 就是今天!", "authSessionLogout": "登出登入", "authSessionLogoutHint": "確認要退出登入嗎?此操作將僅結束當前瀏覽會話,不會影響其他已登入的裝置。", + "authDevicesTab": "裝置", + "authSessionsTab": "會話", + "authLogoutAllOtherSessions": "退出所有其他會話", + "authLogoutAllOtherSessionsHint": "確定要退出所有其他會話嗎?此操作無法撤銷。", + "authCurrentSession": "當前會話", + "sessionTypeLogin": "登入", + "sessionTypeOAuth": "OAuth", + "sessionTypeOidc": "OIDC", "filesDescription": "在 Solar Network Drive 管理您的檔案。", "postComposeDescription": "撰寫一篇新貼文", "searchPostsDescription": "輸入標題、正文或關鍵詞進行搜尋。", @@ -1692,6 +1713,11 @@ "chatRoomUnpinned": "聊天室已取消置頂。", "pinnedChatRoom": "已置頂的聊天室", "settingsGroupedChatList": "啟用群組聊天列表分組", + "settingsShowChatEventMessages": "顯示聊天事件訊息", + "ShowChatEventsMessagesHelper": "選擇事件/系統訊息的可見級別", + "settingsChatEventMessageModeVerbose": "全部顯示", + "settingsChatEventMessageModeImportant": "僅重要", + "settingsChatEventMessageModeNone": "不顯示", "settingsNotifyWithHaptic": "通知觸感反饋", "settingsTts": "文字轉語音", "settingsEnableTts": "啟用 TTS", @@ -2034,22 +2060,58 @@ "benefitsComparison": "權益對比", "subscribeNow": "立即訂閱", "subscriptionAutoRenewDisclaimer": "自動續訂訂閱。可隨時在 App Store 中取消。", + "noPurchasesToRestore": "沒有可恢復的購買專案", "termsLink": "服務條款", "badges": "徽章", - "active": "已啟用", + "badgeInfoDescription": "徽章可透過完成成就、支援 Solar Network、成為社區重要成員以及參與特殊活動獲得。啟用的徽章將顯示在您的賬戶名稱旁,其餘徽章則始終在個人資料頁可見。", + "active": "進行中", "activate": "啟用", "actionLogs": "操作日誌", + "punishments": "處罰記錄", + "adminPunishments": "管理處罰", + "myPunishments": "我的處罰", + "my": "我的", + "admin": "管理", + "punishment": "處罰", + "createPunishment": "建立處罰", + "editPunishment": "編輯處罰", + "deletePunishment": "刪除處罰", + "deletePunishmentConfirm": "確定要刪除此處罰嗎?此操作無法撤銷。", + "punishmentReason": "原因", + "punishmentReasonRequired": "請輸入原因", + "punishmentReasonHint": "請輸入處罰原因……", + "punishmentType": "型別", + "punishmentExpiresAt": "過期時間", + "punishmentBlockedPermissions": "被封禁的許可權", + "punishmentBlockedPermissionsHint": "輸入許可權鍵,支援萬用字元,例如 'chat.send' 或 'drive.*'", + "punishmentTypePermissionModification": "許可權修改", + "punishmentTypeBlockLogin": "禁止登入", + "punishmentTypeDisableAccount": "禁用賬戶", + "punishmentTypeStrike": "記過", + "noPunishmentsFound": "未找到處罰記錄", + "punishmentCreated": "處罰建立成功", + "punishmentUpdated": "處罰更新成功", + "punishmentDeleted": "處罰刪除成功", + "punishmentOverviewPermissionModification": "您的許可權已被修改", + "punishmentOverviewBlockLogin": "您已被限制登入", + "punishmentOverviewDisableAccount": "您的賬戶已被禁用", + "punishmentOverviewStrike": "您已被記過一次", + "punishmentOverviewExpires": "過期時間:{}", + "accountRestrictions": "賬戶限制", + "tapToViewDetails": "點選檢視詳情", + "targetAccount": "目標賬戶", + "selectAccount": "選擇賬戶", + "selectAccountRequired": "請選擇一個賬戶", + "socialCreditReduction": "社會信用扣減", + "expiredAt": "已過期:{}", + "expiresAt": "過期:{}", + "optionalField": "可選", "passport": "進度", "achievements": "成就", "quests": "任務", "rewards": "獎勵", - "completed": "已完成", "completedAt": "完成於 {}", - "nextReset": "下次重置: {}", - "daily": "每日", - "weekly": "每週", - "monthly": "每月", - "progress": "進度", + "nextReset": "下次重置:{}", "noAchievements": "暫無成就", "noQuests": "暫無可用任務", "experience": "經驗", @@ -2248,9 +2310,15 @@ "nearbyObservationsReady": "已準備 {} 條記錄", "nearbyObservationsCollecting": "正在收集…", "meetWatchStopped": "實時更新已停止", - "meetParticipants": "參與者", - "meetParticipantsCount": "共有 {} 人", - "meetParticipantsEmpty": "尚無人加入。", + "meetQrShareTitle": "分享 {}", + "meetQrShareTitleDefault": "分享會面", + "meetQrScanTitle": "掃描二維碼", + "meetQrScanHint": "將攝像頭對準會議二維碼即可加入", + "meetQrScan": "掃描二維碼", + "meetParticipants": "發起者", + "meetParticipantsCount": "{} people here", + "meetParticipantsLocation": "參與者位置", + "meetParticipantsEmpty": "暫無參與者加入", "meetHost": "發起者", "meetParticipant": "參與者", "meetComplete": "完成會面", @@ -2448,7 +2516,9 @@ "descriptionOptional": "描述(可選)", "notes": "備註", "notesOptional": "備註(可選)", + "progress": "進度", "complete": "完成", + "completed": "已完成", "paused": "已暫停", "cancelled": "已取消", "recalculateProgress": "重新計算進度", @@ -2507,8 +2577,11 @@ "fediverseInteractionHint": "要與聯邦宇宙貼文互動,請在賬戶設定中設定預設的聯邦宇宙發佈者。", "fediverseInteractionHintTitle": "需要聯邦宇宙身份", "fediverseFollowHint": "要關注聯邦宇宙行動者,請在賬戶設定中設定預設的聯邦宇宙發佈者。", - "autoTrackFrom": "自動跟蹤來源", + "autoTrackFrom": "自動追蹤起始時間", + "daily": "每日", + "weekly": "每週", "biweekly": "每兩週", + "monthly": "每月", "quarterly": "每季度", "yearly": "每年", "day": "天", @@ -2596,5 +2669,27 @@ "notificationCustomTopic": "主題", "notificationCustomTopicHint": "例如:custom.topic.name", "notificationCustomDescription": "描述", - "notificationCustomTopicError": "請輸入主題和描述" + "notificationCustomTopicError": "請輸入主題和描述", + "settingsMediaProxy": "媒體代理", + "settingsMediaProxyHelper": "媒體代理將在您的裝置上執行一個本地 HTTP 伺服器,以支援流式快取,提供更好的媒體播放體驗。", + "openFullPost": "展開全文", + "fitnessSyncHint": "點選同步您的最新鍛鍊和健康資料", + "fitnessNewHealthDataHint": "有新健康資料可用", + "fitnessSync": "同步", + "fitnessQuickActions": "快捷操作", + "NoWorkoutsHint": "暫無鍛鍊記錄", + "SeeAll": "檢視全部", + "fitnessViewGoals": "檢視目標", + "TrackFitnessGoals": "追蹤您的健身目標", + "ViewMetrics": "檢視指標", + "fitnessTrackHint": "追蹤體重、步數等更多資料", + "ViewLeaderboard": "檢視排行榜", + "ViewLeaderboardHint": "檢視您在他人中的排名", + "ActiveGoals": "進行中的目標", + "Completed": "已完成", + "Goals": "目標", + "Metrics": "指標", + "Import": "匯入", + "RecentWorkouts": "最近鍛鍊", + "LeaderBoard": "排行榜" } diff --git a/lib/fitness/screens/fitness_dashboard_screen.dart b/lib/fitness/screens/fitness_dashboard_screen.dart index bb066c29e..e2eeb3f8f 100644 --- a/lib/fitness/screens/fitness_dashboard_screen.dart +++ b/lib/fitness/screens/fitness_dashboard_screen.dart @@ -10,6 +10,7 @@ import 'package:island/fitness/screens/leaderboard_screen.dart'; import 'package:island/route.gr.dart'; import 'package:island/shared/widgets/app_scaffold.dart'; import 'package:solar_network_sdk/solar_network_sdk.dart'; +import 'package:easy_localization/easy_localization.dart'; @RoutePage() class FitnessDashboardScreen extends ConsumerWidget { @@ -23,7 +24,7 @@ class FitnessDashboardScreen extends ConsumerWidget { final isDismissed = ref.watch(dismissNewDataCardProvider); return AppScaffold( - appBar: AppBar(title: const Text('Fitness')), + appBar: AppBar(title: Text('fitness').tr()), body: RefreshIndicator( onRefresh: () async { ref.invalidate(goalStatsProvider); @@ -80,7 +81,7 @@ class FitnessDashboardScreen extends ConsumerWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - 'New health data available', + 'fitnessNewHealthDataHint'.tr(), style: Theme.of(context).textTheme.titleSmall?.copyWith( color: Theme.of( context, @@ -89,7 +90,7 @@ class FitnessDashboardScreen extends ConsumerWidget { ), ), Text( - 'Tap to sync your latest workouts and metrics', + 'fitnessSyncHint'.tr(), style: Theme.of(context).textTheme.bodySmall?.copyWith( color: Theme.of( context, @@ -103,7 +104,7 @@ class FitnessDashboardScreen extends ConsumerWidget { onPressed: () { context.router.push(const HealthSyncRoute()); }, - child: const Text('Sync'), + child: Text('fitnessSync').tr(), ), IconButton( icon: const Icon(Icons.close), @@ -133,7 +134,7 @@ class FitnessDashboardScreen extends ConsumerWidget { children: [ Expanded( child: _StatItem( - label: 'Active Goals', + label: 'ActiveGoals'.tr(), value: stats.activeCount.toString(), icon: Icons.flag, color: Theme.of(context).colorScheme.primary, @@ -146,7 +147,7 @@ class FitnessDashboardScreen extends ConsumerWidget { ), Expanded( child: _StatItem( - label: 'Completed', + label: 'Completed'.tr(), value: stats.completedCount.toString(), icon: Icons.check_circle, color: Theme.of(context).colorScheme.tertiary, @@ -176,7 +177,7 @@ class FitnessDashboardScreen extends ConsumerWidget { Expanded( child: _ActionCard( icon: Icons.flag_outlined, - label: 'Goals', + label: 'Goals'.tr(), onTap: () => context.router.push(const GoalsRoute()), ), ), @@ -184,7 +185,7 @@ class FitnessDashboardScreen extends ConsumerWidget { Expanded( child: _ActionCard( icon: Icons.show_chart, - label: 'Metrics', + label: 'Metrics'.tr(), onTap: () => context.router.push(const MetricsRoute()), ), ), @@ -196,7 +197,7 @@ class FitnessDashboardScreen extends ConsumerWidget { Expanded( child: _ActionCard( icon: Icons.cloud_upload_outlined, - label: 'Import', + label: 'Import'.tr(), onTap: () => context.router.push(const HealthSyncRoute()), ), ), @@ -207,7 +208,7 @@ class FitnessDashboardScreen extends ConsumerWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - 'Quick Actions', + 'fitnessQuickActions'.tr(), style: Theme.of( context, ).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.w600), @@ -229,14 +230,14 @@ class FitnessDashboardScreen extends ConsumerWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - 'Recent Workouts', + 'RecentWorkouts'.tr(), style: Theme.of( context, ).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.w600), ), FilledButton.tonal( onPressed: () => context.router.push(const WorkoutsRoute()), - child: const Text('See All'), + child: Text('SeeAll').tr(), ), ], ), @@ -249,7 +250,7 @@ class FitnessDashboardScreen extends ConsumerWidget { padding: const EdgeInsets.all(32), child: Center( child: Text( - 'No workouts yet', + 'NoWorkoutsHint'.tr(), style: Theme.of(context).textTheme.bodyLarge?.copyWith( color: Theme.of(context).colorScheme.onSurfaceVariant, ), @@ -316,14 +317,14 @@ class FitnessDashboardScreen extends ConsumerWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - 'Goals', + 'Goals'.tr(), style: Theme.of( context, ).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.w600), ), FilledButton.tonal( onPressed: () => context.router.push(const GoalsRoute()), - child: const Text('See All'), + child: Text('SeeAll'.tr()), ), ], ), @@ -338,8 +339,8 @@ class FitnessDashboardScreen extends ConsumerWidget { color: Theme.of(context).colorScheme.onPrimaryContainer, ), ), - title: const Text('View Goals'), - subtitle: const Text('Track your fitness goals'), + title: Text('fitnessViewGoals').tr(), + subtitle: Text('TrackFitnessGoals').tr(), trailing: const Icon(Icons.chevron_right), onTap: () => context.router.push(const GoalsRoute()), ), @@ -356,14 +357,14 @@ class FitnessDashboardScreen extends ConsumerWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - 'Metrics', + 'Metrics'.tr(), style: Theme.of( context, ).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.w600), ), FilledButton.tonal( onPressed: () => context.router.push(const MetricsRoute()), - child: const Text('See All'), + child: Text('SeeAll'.tr()), ), ], ), @@ -378,8 +379,8 @@ class FitnessDashboardScreen extends ConsumerWidget { color: Theme.of(context).colorScheme.onPrimaryContainer, ), ), - title: const Text('View Metrics'), - subtitle: const Text('Track weight, steps, and more'), + title: const Text('ViewMetrics').tr(), + subtitle: const Text('fitnessTrackHint').tr(), trailing: const Icon(Icons.chevron_right), onTap: () => context.router.push(const MetricsRoute()), ), @@ -393,7 +394,7 @@ class FitnessDashboardScreen extends ConsumerWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - 'Leaderboard', + 'Leaderboard'.tr(), style: Theme.of( context, ).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.w600), @@ -409,8 +410,8 @@ class FitnessDashboardScreen extends ConsumerWidget { color: Theme.of(context).colorScheme.onSecondaryContainer, ), ), - title: const Text('View Leaderboard'), - subtitle: const Text('See how you rank against others'), + title: Text('ViewLeaderboard'.tr()), + subtitle: const Text('ViewLeaderboardHint').tr(), trailing: const Icon(Icons.chevron_right), onTap: () => showModalBottomSheet( context: context, diff --git a/lib/misc/settings.dart b/lib/misc/settings.dart index 175a9874c..0c23d5a1f 100644 --- a/lib/misc/settings.dart +++ b/lib/misc/settings.dart @@ -201,15 +201,15 @@ class SettingsScreen extends HookConsumerWidget { items: [ DropdownItem( value: 'bubble', - child: Text('Bubble').fontSize(14), + child: Text('settingsMessageDisplayStyleBubble').tr().fontSize(14), ), DropdownItem( value: 'column', - child: Text('Column').fontSize(14), + child: Text('settingsMessageDisplayStyleColumn').tr().fontSize(14), ), DropdownItem( value: 'compact', - child: Text('Compact').fontSize(14), + child: Text('settingsMessageDisplayStyleCompact').tr().fontSize(14), ), ], valueListenable: ValueNotifier( @@ -244,11 +244,11 @@ class SettingsScreen extends HookConsumerWidget { items: [ DropdownItem( value: 'row', - child: Text('Row').fontSize(14), + child: Text('settingsAttachmentsListStyleRow').tr().fontSize(14), ), DropdownItem( value: 'column', - child: Text('Column').fontSize(14), + child: Text('settingsAttachmentsListStyleColumn').tr().fontSize(14), ), ], valueListenable: ValueNotifier( @@ -881,27 +881,27 @@ class SettingsScreen extends HookConsumerWidget { // Show chat event/system messages settings ListTile( minLeadingWidth: 48, - title: const Text('Show Chat Event Messages'), + title: const Text('settingsShowChatEventMessages').tr(), subtitle: const Text( - 'Choose visibility level for event/system messages', - ), + 'ShowChatEventsMessagesHelper', + ).tr(), contentPadding: const EdgeInsets.only(left: 24, right: 17), leading: const Icon(Symbols.info), trailing: DropdownButtonHideUnderline( child: DropdownButton2( isExpanded: true, - items: const [ + items: [ DropdownItem( value: kChatEventMessageModeVerbose, - child: Text('Verbose'), + child: Text('settingsChatEventMessageModeVerbose').tr(), ), DropdownItem( value: kChatEventMessageModeImportant, - child: Text('Important'), + child: Text('settingsChatEventMessageModeImportant').tr(), ), DropdownItem( value: kChatEventMessageModeNone, - child: Text('None'), + child: Text('settingsChatEventMessageModeNone').tr(), ), ], valueListenable: ValueNotifier(