Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

MUL-7608 feat(mobile): add Simplified Chinese localization (#8702)

Bing Freed5a25d743862
diff --git a/.gitignore b/.gitignore
index 4449b08a13..5cc0cef2bc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -79,3 +79,5 @@ data/
__pycache__/
*.pyc
perf-report/
+# The production example is a tracked template; `.env*` above would hide it.
+!apps/mobile/.env.production.example
diff --git a/apps/docs/content/docs/mobile-app.ja.mdx b/apps/docs/content/docs/mobile-app.ja.mdx
index 6f7ac78e6d..6db241328c 100644
--- a/apps/docs/content/docs/mobile-app.ja.mdx
+++ b/apps/docs/content/docs/mobile-app.ja.mdx
@@ -70,19 +70,21 @@ pnpm ios:mobile:device:prod:release
## セルフホストインスタンスへの接続
-Release ビルドは API アドレスをアプリに埋め込みます。セルフホストインスタンスに接続するには、先に `apps/mobile/.env.production` を編集します:
+Release ビルドは API アドレスをアプリに埋め込みます。`apps/mobile/.env.production` は公開されている multica.ai のデフォルト値とともにコミットされているため、新しくクローンした状態でも本番ビルドができます。
+
+セルフホストインスタンスに接続するには、`apps/mobile/.env.production.example` を `apps/mobile/.env.production.local` としてコピーし、コピーを編集します:
```dotenv
EXPO_PUBLIC_API_URL=https://api.example.com
EXPO_PUBLIC_WEB_URL=https://app.example.com
```
-`EXPO_PUBLIC_API_URL` は必須です。`EXPO_PUBLIC_WEB_URL` は任意で、"Copy link" や "Open on web" などの入口に使われます。未設定の場合、これらのメニュー項目は表示されません。
+`.local` ファイルはコミット済みのデフォルトをキーごとに上書きし、gitignore されるため、個人の API アドレスがリポジトリに入ることはありません。`EXPO_PUBLIC_API_URL` は必須です。`EXPO_PUBLIC_WEB_URL` は "Copy link" や "Open on web" などの入口に使われます。コピーには両方を設定してください。書かなかったキーには multica.ai のデフォルト値が使われるため、これらの入口がセルフホストインスタンスではなく multica.ai を開きます。
編集後にビルドコマンドを再実行します。iPhone がこの API アドレスに到達できる必要があります。LAN のアドレスを使う場合、`localhost` と書かないでください — iPhone 上では iPhone 自身を指します。
<Callout type="warning">
-`.env.production` を変更すると、現在のチェックアウトの本番設定が変わります。その変更をコミットすると、個人の API アドレスがリポジトリの本番設定に書き込まれます。
+`.env.production` を直接編集すると、現在のチェックアウトの本番設定が変わります。個人の値は gitignore された `.env.production.local` に書いてください。
</Callout>
モバイルの開発、Simulator の使用、staging への接続については、リポジトリの [`apps/mobile/README.md`](https://github.com/multica-ai/multica/blob/main/apps/mobile/README.md) を参照してください。
diff --git a/apps/docs/content/docs/mobile-app.ko.mdx b/apps/docs/content/docs/mobile-app.ko.mdx
index 5a47b4267c..f27bc2bf46 100644
--- a/apps/docs/content/docs/mobile-app.ko.mdx
+++ b/apps/docs/content/docs/mobile-app.ko.mdx
@@ -70,19 +70,21 @@ pnpm ios:mobile:device:prod:release
## 자체 호스팅 인스턴스 연결
-Release 빌드는 API 주소를 앱에 포함합니다. 자체 호스팅 인스턴스에 연결하려면 먼저 `apps/mobile/.env.production`을 수정합니다.
+Release 빌드는 API 주소를 앱에 포함합니다. `apps/mobile/.env.production`은 공개 multica.ai 기본값과 함께 커밋되어 있어 새로 클론한 상태에서도 프로덕션 빌드가 가능합니다.
+
+자체 호스팅 인스턴스에 연결하려면 `apps/mobile/.env.production.example`을 `apps/mobile/.env.production.local`로 복사한 뒤 복사본을 수정합니다.
```dotenv
EXPO_PUBLIC_API_URL=https://api.example.com
EXPO_PUBLIC_WEB_URL=https://app.example.com
```
-`EXPO_PUBLIC_API_URL`은 필수입니다. `EXPO_PUBLIC_WEB_URL`은 "Copy link", "Open on web" 같은 메뉴에 사용하는 선택 항목이며 설정하지 않으면 이 메뉴가 표시되지 않습니다.
+`.local` 파일은 커밋된 기본값을 키 단위로 덮어쓰며 gitignore되므로 개인 API 주소가 저장소에 들어가지 않습니다. `EXPO_PUBLIC_API_URL`은 필수입니다. `EXPO_PUBLIC_WEB_URL`은 "Copy link", "Open on web" 같은 메뉴에 사용됩니다. 복사본에 두 값을 모두 설정하세요. 적지 않은 키는 multica.ai 기본값을 그대로 쓰므로 이 메뉴가 자체 호스팅 인스턴스 대신 multica.ai를 엽니다.
수정한 뒤 빌드 명령을 다시 실행합니다. iPhone에서 이 API 주소에 접근할 수 있어야 합니다. 로컬 네트워크 주소를 사용할 때는 `localhost`를 쓰지 마세요. iPhone에서는 휴대전화 자체를 가리킵니다.
<Callout type="warning">
-`.env.production`을 수정하면 현재 checkout의 프로덕션 설정이 바뀝니다. 이 변경을 커밋하면 개인 API 주소가 저장소의 프로덕션 설정에 들어갑니다.
+`.env.production`을 직접 수정하면 현재 checkout의 프로덕션 설정이 바뀝니다. 개인 값은 gitignore된 `.env.production.local`에 두세요.
</Callout>
모바일 개발, Simulator 사용, staging 연결 방법은 저장소의 [`apps/mobile/README.md`](https://github.com/multica-ai/multica/blob/main/apps/mobile/README.md)를 참고하세요.
diff --git a/apps/docs/content/docs/mobile-app.mdx b/apps/docs/content/docs/mobile-app.mdx
index 06f1807cef..4486ecdedf 100644
--- a/apps/docs/content/docs/mobile-app.mdx
+++ b/apps/docs/content/docs/mobile-app.mdx
@@ -70,19 +70,21 @@ pnpm ios:mobile:device:prod:release
## Connecting to a self-hosted instance
-Release builds bake the API address into the app. To connect to a self-hosted instance, edit `apps/mobile/.env.production` first:
+Release builds bake the API address into the app. `apps/mobile/.env.production` is committed with the public multica.ai defaults, so a fresh clone builds against production as-is.
+
+To connect to a self-hosted instance, copy `apps/mobile/.env.production.example` to `apps/mobile/.env.production.local` and edit the copy:
```dotenv
EXPO_PUBLIC_API_URL=https://api.example.com
EXPO_PUBLIC_WEB_URL=https://app.example.com
```
-`EXPO_PUBLIC_API_URL` is required. `EXPO_PUBLIC_WEB_URL` is optional and powers entries like "Copy link" and "Open on web"; when it's unset, those menu items are hidden.
+The `.local` file overrides the committed defaults key by key and is gitignored, so personal endpoints never reach the repository. `EXPO_PUBLIC_API_URL` is required. `EXPO_PUBLIC_WEB_URL` powers entries like "Copy link" and "Open on web". Set both in the copy: a key you leave out falls back to the multica.ai default, so those entries would open multica.ai instead of your instance.
Re-run the build command after editing. The iPhone must be able to reach the API address; when using a LAN address, don't write `localhost` — on the iPhone it points at the phone itself.
<Callout type="warning">
-Editing `.env.production` changes the production configuration of the current checkout. Committing the change writes your personal API address into the repository's production configuration.
+Editing `.env.production` directly changes the production configuration of the current checkout. Keep personal values in the gitignored `.env.production.local`.
</Callout>
For mobile development, using the Simulator, or connecting to staging, see [`apps/mobile/README.md`](https://github.com/multica-ai/multica/blob/main/apps/mobile/README.md) in the repository.
diff --git a/apps/docs/content/docs/mobile-app.zh.mdx b/apps/docs/content/docs/mobile-app.zh.mdx
index c7f98ce0b4..60d6c6ecca 100644
--- a/apps/docs/content/docs/mobile-app.zh.mdx
+++ b/apps/docs/content/docs/mobile-app.zh.mdx
@@ -70,19 +70,21 @@ pnpm ios:mobile:device:prod:release
## 连接自托管实例
-Release 构建会把 API 地址写入 App。要连接自托管实例,先修改 `apps/mobile/.env.production`:
+Release 构建会把 API 地址写入 App。`apps/mobile/.env.production` 已随仓库提交,默认指向 multica.ai 的公开后端,干净克隆即可构建生产版本。
+
+要连接自托管实例,把 `apps/mobile/.env.production.example` 复制为 `apps/mobile/.env.production.local` 并修改副本:
```dotenv
EXPO_PUBLIC_API_URL=https://api.example.com
EXPO_PUBLIC_WEB_URL=https://app.example.com
```
-`EXPO_PUBLIC_API_URL` 必填;`EXPO_PUBLIC_WEB_URL` 可选,用于 "Copy link"、"Open on web" 等入口,不设置时这些菜单项不会显示。
+`.local` 文件会按 key 覆盖提交的默认值,且已被 gitignore,个人 API 地址不会进入仓库。`EXPO_PUBLIC_API_URL` 必填;`EXPO_PUBLIC_WEB_URL` 用于 "Copy link"、"Open on web" 等入口。两个都要在副本里设置:没写的 key 会沿用 multica.ai 的默认值,这些入口就会打开 multica.ai,而不是你的实例。
修改后重新运行构建命令。iPhone 必须能访问这个 API 地址;使用局域网地址时,不要写 `localhost`,因为它在 iPhone 上指向手机本身。
<Callout type="warning">
-修改 `.env.production` 会改变当前 checkout 的生产配置。提交该修改会把个人 API 地址写进仓库的生产配置。
+直接修改 `.env.production` 会改变当前 checkout 的生产配置。个人配置请放在 gitignore 的 `.env.production.local` 中。
</Callout>
开发移动端、使用 Simulator 或连接 staging 的说明见仓库中的 [`apps/mobile/README.md`](https://github.com/multica-ai/multica/blob/main/apps/mobile/README.md)。
diff --git a/apps/mobile/.env.production.example b/apps/mobile/.env.production.example
new file mode 100644
index 0000000000..3b858429ee
--- /dev/null
+++ b/apps/mobile/.env.production.example
@@ -0,0 +1,11 @@
+# Copy this file to .env.production.local and edit it before running a
+# production-variant build. The .local file is gitignored.
+#
+# These are the public Multica defaults. Replace them if you run a private
+# backend.
+EXPO_PUBLIC_API_URL=https://api.multica.ai
+EXPO_PUBLIC_WEB_URL=https://multica.ai
+
+# Optional: use your own reverse-domain if your Apple ID cannot sign the
+# default production bundle ID.
+# EXPO_BUNDLE_IDENTIFIER_PROD=com.yourname.multica
diff --git a/apps/mobile/README.md b/apps/mobile/README.md
index e2e22b1578..26b9c73d30 100644
--- a/apps/mobile/README.md
+++ b/apps/mobile/README.md
@@ -10,7 +10,7 @@ Multica isn't on the App Store yet — until that changes, anyone who wants it o
pnpm ios:mobile:device:prod:release
```
-This connects to the same backend as `multica.ai`, so your existing account just works.
+This connects to the same backend as `multica.ai`, so your existing account just works. To use a private backend or your own bundle ID, copy `apps/mobile/.env.production.example` to `apps/mobile/.env.production.local` and edit the copy — it overrides the committed `.env.production` key by key and is gitignored, so personal values stay local.
**Prerequisites**: Mac with Xcode, a free Apple ID added under Xcode → Settings → Accounts, iPhone connected via USB with [Developer Mode enabled](https://docs.expo.dev/guides/ios-developer-mode/). Walk through Expo's [Set up your environment](https://docs.expo.dev/get-started/set-up-your-environment/) (pick **Development build → iOS Device**) if any of that is missing.
@@ -40,7 +40,7 @@ Everything below is for app developers — you can ignore the rest if you only w
|---|---|---|
| `pnpm dev:mobile` | Metro only (reuse existing install) | local (`.env.development.local`) |
| `pnpm dev:mobile:staging` | Metro only (reuse existing install) | staging (`.env.staging`) |
-| `pnpm dev:mobile:prod` | Metro only (reuse existing install) | production (`.env.production`) |
+| `pnpm dev:mobile:prod` | Metro only (reuse existing install) | production (`.env.production`, overridden by `.env.production.local`) |
| `pnpm ios:mobile` | Full rebuild + install on **iOS Simulator**, Debug | local |
| `pnpm ios:mobile:staging` | Full rebuild + install on **iOS Simulator**, Debug | staging |
| `pnpm ios:mobile:prod` | Full rebuild + install on **iOS Simulator**, Debug | production |
@@ -63,7 +63,7 @@ cp apps/mobile/.env.example apps/mobile/.env.development.local
# then edit EXPO_PUBLIC_API_URL inside it to your Mac's LAN IP, e.g. http://192.168.1.42:8080
```
-If your Apple ID isn't on the Multica Apple Developer team yet, also uncomment and set `EXPO_BUNDLE_IDENTIFIER_DEV` to a reverse-domain you own (e.g. `com.yourname.multica.dev`). This **only** overrides the dev variant — staging / production bundle ids are intentionally not overridable so variants can coexist.
+If your Apple ID isn't on the Multica Apple Developer team yet, also set `EXPO_BUNDLE_IDENTIFIER_DEV` to a reverse-domain you own (e.g. `com.yourname.multica.dev`). For a personal production build, set `EXPO_BUNDLE_IDENTIFIER_PROD` in `.env.production.local`.
If your Apple ID belongs to more than one Apple Developer team, also set `EXPO_APPLE_TEAM_ID` to the team that should sign your builds. Unlike the bundle id overrides it applies to every variant, and it is re-applied on each run — so it also fixes a checkout that has already latched onto the wrong team.
@@ -105,7 +105,7 @@ A free Apple ID signs builds for **7 days only**, Debug and Release both. After
## Pointing at a different backend
-Edit `EXPO_PUBLIC_API_URL` in `.env.staging`, `.env.production`, or `.env.development.local` (whichever variant you're running). Then:
+Edit `EXPO_PUBLIC_API_URL` in `.env.staging`, `.env.production.local`, or `.env.development.local` (whichever variant you're running). Then:
- For an installed **Debug build**: restart Metro (`pnpm dev:mobile:staging`) so the next JS bundle picks up the new value.
- For an installed **Release build**: re-run the `ios:mobile:device:staging:release` command — the value is baked into the embedded bundle at build time.
diff --git a/apps/mobile/app/(app)/[workspace]/(tabs)/_layout.tsx b/apps/mobile/app/(app)/[workspace]/(tabs)/_layout.tsx
index 676d1346ea..4f178ed62d 100644
--- a/apps/mobile/app/(app)/[workspace]/(tabs)/_layout.tsx
+++ b/apps/mobile/app/(app)/[workspace]/(tabs)/_layout.tsx
@@ -33,6 +33,7 @@ import {
useChatUnreadMessageCount,
} from "@/lib/unread-counts";
import { MoreTabDropdownAnchor } from "@/components/nav/more-tab-dropdown";
+import { useT } from "@/lib/i18n";
// Only override backgroundColor — @react-navigation/elements Badge internally
// sets borderRadius = size/2, height = size, minWidth = size, so a single
@@ -45,7 +46,8 @@ const BADGE_STYLE = {
export default function TabsLayout() {
const { colorScheme } = useColorScheme();
- const t = THEME[colorScheme];
+ const theme = THEME[colorScheme];
+ const { t } = useT("navigation");
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
const inboxUnread = useInboxUnreadCount(wsId);
@@ -68,16 +70,16 @@ export default function TabsLayout() {
<Tabs
screenOptions={{
headerShown: false,
- tabBarActiveTintColor: t.foreground,
- tabBarInactiveTintColor: t.mutedForeground,
- tabBarStyle: { backgroundColor: t.background },
+ tabBarActiveTintColor: theme.foreground,
+ tabBarInactiveTintColor: theme.mutedForeground,
+ tabBarStyle: { backgroundColor: theme.background },
tabBarLabelStyle: { fontSize: 11 },
}}
>
<Tabs.Screen
name="inbox"
options={{
- title: "Inbox",
+ title: t("tabs.inbox"),
tabBarBadge: inboxBadge,
tabBarBadgeStyle: BADGE_STYLE,
tabBarIcon: ({ color, size, focused }) => (
@@ -92,7 +94,7 @@ export default function TabsLayout() {
<Tabs.Screen
name="my-issues"
options={{
- title: "My Issues",
+ title: t("tabs.my_issues"),
tabBarIcon: ({ color, size, focused }) => (
<Image
source={focused ? "sf:checklist" : "sf:checklist.unchecked"}
@@ -105,7 +107,7 @@ export default function TabsLayout() {
<Tabs.Screen
name="chat"
options={{
- title: "Chat",
+ title: t("tabs.chat"),
tabBarBadge: chatBadge,
tabBarBadgeStyle: BADGE_STYLE,
tabBarIcon: ({ color, size, focused }) => (
@@ -120,7 +122,7 @@ export default function TabsLayout() {
<Tabs.Screen
name="more"
options={{
- title: "More",
+ title: t("tabs.more"),
tabBarIcon: ({ color, size }) => (
<Image
source="sf:ellipsis"
diff --git a/apps/mobile/app/(app)/[workspace]/(tabs)/chat.tsx b/apps/mobile/app/(app)/[workspace]/(tabs)/chat.tsx
index e378859548..d4dbfcad2e 100644
--- a/apps/mobile/app/(app)/[workspace]/(tabs)/chat.tsx
+++ b/apps/mobile/app/(app)/[workspace]/(tabs)/chat.tsx
@@ -79,7 +79,10 @@ import {
seedAcceptedPendingTask,
} from "@/data/realtime/chat-ws-updaters";
import { useWorkspaceAgentAvailability } from "@/lib/workspace-agent-availability";
-import { sendFailureMessage } from "@/lib/dispatch-reason";
+import {
+ dispatchReasonCode,
+} from "@/lib/dispatch-reason";
+import { useT } from "@/lib/i18n";
import { useAgentPresence } from "@/lib/use-agent-presence";
import { Header } from "@/components/ui/header";
import { ChatTitleButton } from "@/components/chat/chat-title-button";
@@ -92,10 +95,24 @@ import { OfflineBanner } from "@/components/chat/offline-banner";
import { RuntimeRequiredBanner } from "@/components/chat/runtime-required-banner";
import { useChatSelectStore } from "@/data/chat-select-store";
import { isAgentRuntimeBound } from "@/lib/is-agent-runtime-bound";
-import { chatSessionDisplayTitle } from "@/lib/chat-session-title";
export default function ChatTab() {
const qc = useQueryClient();
+ const { t } = useT("chat");
+ const sendFailureMessage = useCallback((err: unknown) => {
+ switch (dispatchReasonCode(err)) {
+ case "invocation_not_allowed":
+ return t("failure.invocation_not_allowed");
+ case "agent_runtime_required":
+ return t("failure.agent_runtime_required");
+ case "runtime_access_denied":
+ return t("failure.runtime_access_denied", {
+ detail: t("failure.runtime_access_recovery"),
+ });
+ default:
+ return t("failure.default");
+ }
+ }, [t]);
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
const wsSlug = useWorkspaceStore((s) => s.currentWorkspaceSlug);
const userId = useAuthStore((s) => s.user?.id);
@@ -288,15 +305,15 @@ export default function ChatTab() {
// this state; this is the belt-and-braces guard.
if (accessRevoked) {
Alert.alert(
- "No permission to run this agent",
- "You no longer have permission to run this agent, so the message was not sent. Ask its owner for access.",
+ t("alerts.no_permission_title"),
+ t("alerts.no_permission_message"),
);
return;
}
if (!runtimeBound) {
Alert.alert(
- "Runtime required",
- "Bind a runtime to this agent on web or desktop before sending a message.",
+ t("alerts.runtime_title"),
+ t("alerts.runtime_message"),
);
return;
}
@@ -309,7 +326,7 @@ export default function ChatTab() {
// Session create runs the same invoke gate as a send, so a permission
// change refuses here too — and this is the only layer that sees the
// reason code (MUL-6380).
- Alert.alert("Message not sent", sendFailureMessage(err));
+ Alert.alert(t("alerts.not_sent"), sendFailureMessage(err));
throw err;
}
if (!sessionId) return;
@@ -391,7 +408,7 @@ export default function ChatTab() {
// The composer restores the draft on a thrown rejection but says nothing
// about it, so a revoked-permission 403 used to read as a silent no-op
// (MUL-6380). Name the cause here: only this layer sees the error body.
- Alert.alert("Message not sent", sendFailureMessage(err));
+ Alert.alert(t("alerts.not_sent"), sendFailureMessage(err));
throw err;
}
},
@@ -402,6 +419,8 @@ export default function ChatTab() {
runtimeBound,
ensureSession,
qc,
+ sendFailureMessage,
+ t,
promoteNewDraft,
clearDraft,
],
@@ -450,12 +469,12 @@ export default function ChatTab() {
const handleDeleteActive = useCallback(() => {
if (!activeSession) return;
Alert.alert(
- "Delete this chat?",
- chatSessionDisplayTitle(activeSession.title),
+ t("alerts.delete_title"),
+ activeSession.title || t("sessions.new_chat"),
[
- { text: "Cancel", style: "cancel" },
+ { text: t("common:actions.cancel"), style: "cancel" },
{
- text: "Delete",
+ text: t("alerts.delete_confirm"),
style: "destructive",
onPress: () => {
const id = activeSession.id;
@@ -466,7 +485,7 @@ export default function ChatTab() {
],
{ cancelable: true },
);
- }, [activeSession, deleteSession]);
+ }, [activeSession, deleteSession, t]);
// ── Composer disabled-state ────────────────────────────────────────────
const disabled =
@@ -476,15 +495,15 @@ export default function ChatTab() {
isArchived === true ||
!runtimeBound;
const disabledReason = !currentAgent
- ? "No agent selected"
+ ? t("composer.no_agent")
: accessRevoked
- ? "You can no longer run this agent"
+ ? t("composer.revoked")
: availability === "none"
- ? "No agents in this workspace"
+ ? t("composer.no_agents")
: isArchived
- ? "This chat is archived"
+ ? t("composer.archived")
: !runtimeBound
- ? "Agent needs a runtime"
+ ? t("composer.runtime_required")
: undefined;
return (
diff --git a/apps/mobile/app/(app)/[workspace]/(tabs)/inbox.tsx b/apps/mobile/app/(app)/[workspace]/(tabs)/inbox.tsx
index 60494d938e..12b48b9374 100644
--- a/apps/mobile/app/(app)/[workspace]/(tabs)/inbox.tsx
+++ b/apps/mobile/app/(app)/[workspace]/(tabs)/inbox.tsx
@@ -28,12 +28,14 @@ import {
import { useWorkspaceStore } from "@/data/workspace-store";
import { useColorScheme } from "@/lib/use-color-scheme";
import { THEME } from "@/lib/theme";
+import { useT } from "@/lib/i18n";
import {
deduplicateInboxItems,
getInboxNavigationTarget,
} from "@/lib/inbox-display";
export default function Inbox() {
+ const { t } = useT("inbox");
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
const wsSlug = useWorkspaceStore((s) => s.currentWorkspaceSlug);
const { colorScheme } = useColorScheme();
@@ -71,18 +73,18 @@ export default function Inbox() {
// the iOS red treatment + Alert confirm.
const onPressMenu = () => {
const options = [
- "Cancel",
- "Mark all read",
- "Archive all read",
- "Archive completed",
- "Archive all",
+ t("common:actions.cancel"),
+ t("actions.mark_all_read"),
+ t("actions.archive_all_read"),
+ t("actions.archive_completed"),
+ t("actions.archive_all"),
];
ActionSheetIOS.showActionSheetWithOptions(
{
options,
cancelButtonIndex: 0,
destructiveButtonIndex: 4,
- title: "Inbox",
+ title: t("title"),
},
(i) => {
if (i === 1) markAllRead.mutate();
@@ -90,12 +92,12 @@ export default function Inbox() {
else if (i === 3) archiveCompleted.mutate();
else if (i === 4) {
Alert.alert(
- "Archive all?",
- "This archives every inbox item, read or unread. You can still find them via the issue pages.",
+ t("archive.confirm_title"),
+ t("archive.confirm_body"),
[
- { text: "Cancel", style: "cancel" },
+ { text: t("common:actions.cancel"), style: "cancel" },
{
- text: "Archive all",
+ text: t("actions.archive_all"),
style: "destructive",
onPress: () => archiveAll.mutate(),
},
@@ -109,13 +111,13 @@ export default function Inbox() {
return (
<View className="flex-1 bg-background">
<Header
- title="Inbox"
+ title={t("title")}
right={
<>
<IconButton
name="ellipsis-horizontal"
onPress={onPressMenu}
- accessibilityLabel="Inbox actions"
+ accessibilityLabel={t("actions.inbox_actions")}
/>
<HeaderActions />
</>
@@ -126,11 +128,12 @@ export default function Inbox() {
) : error ? (
<View className="px-4 gap-3 pt-4">
<Text className="text-sm text-destructive">
- Failed to load inbox:{" "}
- {error instanceof Error ? error.message : "unknown error"}
+ {t("errors.load_failed", {
+ message: error instanceof Error ? error.message : "unknown",
+ })}
</Text>
<Button variant="outline" onPress={() => refetch()}>
- <Text>Retry</Text>
+ <Text>{t("common:actions.retry")}</Text>
</Button>
</View>
) : !data || data.length === 0 ? (
@@ -178,14 +181,16 @@ function InboxLoading() {
}
function InboxEmpty({ iconColor }: { iconColor: string }) {
+ const { t } = useT("inbox");
+
return (
<View className="flex-1 items-center justify-center px-8 gap-3">
<Ionicons name="mail-open-outline" size={42} color={iconColor} />
<Text className="text-base font-medium text-foreground text-center">
- Inbox zero
+ {t("empty.title")}
</Text>
<Text className="text-sm text-muted-foreground text-center">
- Mentions, assignments, and agent updates appear here.
+ {t("empty.body")}
</Text>
</View>
);
diff --git a/apps/mobile/app/(app)/[workspace]/(tabs)/my-issues.tsx b/apps/mobile/app/(app)/[workspace]/(tabs)/my-issues.tsx
index e9c0151598..ffaa6cd706 100644
--- a/apps/mobile/app/(app)/[workspace]/(tabs)/my-issues.tsx
+++ b/apps/mobile/app/(app)/[workspace]/(tabs)/my-issues.tsx
@@ -39,6 +39,7 @@ import { useWorkspaceStore } from "@/data/workspace-store";
import { useMyIssuesViewStore } from "@/data/stores/my-issues-view-store";
import { useClearFiltersOnWorkspaceChange } from "@/lib/use-clear-filters-on-workspace-change";
import { PRIORITY_LABEL } from "@/lib/issue-status";
+import { useT } from "@/lib/i18n";
import { useIssueStatuses } from "@/lib/use-issue-statuses";
import { groupIssuesByStatus } from "@/lib/group-issues-by-status";
import { filterIssues } from "@/lib/filter-issues";
@@ -51,17 +52,14 @@ import { THEME } from "@/lib/theme";
// under Dynamic Type. Semantics unchanged: same backend predicate
// (`involves_user_id`, MUL-2397) covers owned agents + related squads; the
// empty state copy still says "agents or squads".
-const SCOPES: { value: MyIssuesScope; label: string }[] = [
- { value: "assigned", label: "Assigned" },
- { value: "created", label: "Created" },
- { value: "agents", label: "Agents" },
-];
+const SCOPES: MyIssuesScope[] = ["assigned", "created", "agents"];
export default function MyIssues() {
const isFocused = useIsFocused();
const userId = useAuthStore((s) => s.user?.id ?? null);
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
const wsSlug = useWorkspaceStore((s) => s.currentWorkspaceSlug);
+ const { t } = useT("issues");
const scope = useMyIssuesViewStore((s) => s.scope);
const setScope = useMyIssuesViewStore((s) => s.setScope);
@@ -105,15 +103,19 @@ export default function MyIssues() {
const hasActiveFilters =
statusFilters.length > 0 || priorityFilters.length > 0;
+ const scopeItems = SCOPES.map((value) => ({
+ value,
+ label: t(`tabs.${value}`),
+ }));
const showEmptyState =
!isLoading && !error && filtered.length === 0;
return (
<View className="flex-1 bg-background">
- <Header title="My Issues" right={<HeaderActions />} />
+ <Header title={t("navigation:tabs.my_issues")} right={<HeaderActions />} />
<ScopeToolbar
- scopes={SCOPES}
+ scopes={scopeItems}
scope={scope}
onChange={(v) => setScope(v)}
onOpenFilter={openFilter}
@@ -137,19 +139,20 @@ export default function MyIssues() {
) : error ? (
<View className="px-4 gap-3 pt-4">
<Text className="text-sm text-destructive">
- Failed to load issues:{" "}
- {error instanceof Error ? error.message : "unknown error"}
+ {t("errors.load_failed", {
+ message: error instanceof Error ? error.message : "unknown",
+ })}
</Text>
<Button variant="outline" onPress={() => refetch()}>
- <Text>Retry</Text>
+ <Text>{t("common:actions.retry")}</Text>
</Button>
</View>
) : showEmptyState ? (
<EmptyState
message={
hasActiveFilters
- ? "No issues match the current filters."
- : emptyMessageForScope(scope)
+ ? t("empty.filtered")
+ : t(`empty.${scope}`)
}
/>
) : (
@@ -199,6 +202,7 @@ function FilterButton({
onPress: () => void;
hasActiveFilters: boolean;
}) {
+ const { t } = useT("issues");
const { colorScheme } = useColorScheme();
return (
<View style={{ position: "relative" }} className="ml-2">
@@ -206,7 +210,7 @@ function FilterButton({
variant="outline"
size="sm"
onPress={onPress}
- accessibilityLabel="Filter"
+ accessibilityLabel={t("header_filter")}
className="w-9 px-0"
>
<Ionicons
@@ -292,13 +296,14 @@ function ActiveFilterChips({
onClearStatus: (s: IssueStatus) => void;
onClearPriority: (p: IssuePriority) => void;
}) {
+ const { t } = useT("issues");
return (
<View className="flex-row flex-wrap gap-1.5 px-4 pb-2">
{statusFilters.map((s) => (
<Chip key={`s-${s}`} label={statusLabelOf(s)} onClear={() => onClearStatus(s)} />
))}
{priorityFilters.map((p) => (
- <Chip key={`p-${p}`} label={PRIORITY_LABEL[p]} onClear={() => onClearPriority(p)} />
+ <Chip key={`p-${p}`} label={t(PRIORITY_LABEL[p])} onClear={() => onClearPriority(p)} />
))}
</View>
);
@@ -351,14 +356,3 @@ function EmptyState({ message }: { message: string }) {
</View>
);
}
-
-function emptyMessageForScope(scope: MyIssuesScope): string {
- switch (scope) {
- case "assigned":
- return "No issues assigned to you.";
- case "created":
- return "You haven't created any issues.";
- case "agents":
- return "No issues assigned to your agents or squads yet.";
- }
-}
diff --git a/apps/mobile/app/(app)/[workspace]/_layout.tsx b/apps/mobile/app/(app)/[workspace]/_layout.tsx
index 4eebd15dff..2b34cf6337 100644
--- a/apps/mobile/app/(app)/[workspace]/_layout.tsx
+++ b/apps/mobile/app/(app)/[workspace]/_layout.tsx
@@ -17,6 +17,7 @@ import { ModalCloseButton } from "@/components/ui/modal-close-button";
import { useNewIssueDraftResetOnWorkspaceChange } from "@/data/stores/new-issue-draft-store";
import { useNewProjectDraftResetOnWorkspaceChange } from "@/data/stores/new-project-draft-store";
import { useChatSessionPickerResetOnWorkspaceChange } from "@/data/stores/chat-session-picker-store";
+import { useT } from "@/lib/i18n";
/**
* Shared Stack.Screen options for every iOS formSheet-presented sheet route.
@@ -101,6 +102,7 @@ function RealtimeSubscriptions() {
*/
export default function WorkspaceLayout() {
const { workspace: slug } = useLocalSearchParams<{ workspace: string }>();
+ const { t } = useT("navigation");
const { data: workspaces, isLoading } = useQuery(workspaceListOptions());
const setCurrentWorkspace = useWorkspaceStore((s) => s.setCurrentWorkspace);
@@ -135,21 +137,21 @@ export default function WorkspaceLayout() {
<Stack.Screen
name="issue/[id]"
options={{
- title: "Issue",
- headerBackTitle: "Back",
+ title: t("navigation:routes.issue"),
+ headerBackTitle: t("back"),
}}
/>
<Stack.Screen
name="project/[id]"
options={{
- title: "Project",
- headerBackTitle: "Back",
+ title: t("navigation:routes.project"),
+ headerBackTitle: t("back"),
}}
/>
<Stack.Screen
name="project/[id]/edit"
options={{
- title: "Edit Project",
+ title: t("navigation:routes.edit_project"),
presentation: "modal",
headerLeft: () => <ModalCloseButton />,
}}
@@ -157,7 +159,7 @@ export default function WorkspaceLayout() {
<Stack.Screen
name="issue/[id]/edit"
options={{
- title: "Edit Issue",
+ title: t("navigation:routes.edit_issue"),
presentation: "modal",
headerLeft: () => <ModalCloseButton />,
}}
@@ -165,7 +167,7 @@ export default function WorkspaceLayout() {
<Stack.Screen
name="project/new"
options={{
- title: "New Project",
+ title: t("navigation:routes.new_project"),
presentation: "modal",
headerLeft: () => <ModalCloseButton />,
}}
@@ -196,7 +198,7 @@ export default function WorkspaceLayout() {
options={{
...SHEET_OPTIONS,
headerShown: true,
- title: "Assignee",
+ title: t("navigation:routes.assignee"),
}}
/>
<Stack.Screen
@@ -208,7 +210,7 @@ export default function WorkspaceLayout() {
options={{
...SHEET_OPTIONS,
headerShown: true,
- title: "Mention",
+ title: t("navigation:routes.mention"),
}}
/>
<Stack.Screen
@@ -261,7 +263,7 @@ export default function WorkspaceLayout() {
options={{
...SHEET_OPTIONS,
headerShown: true,
- title: "Assignee",
+ title: t("navigation:routes.assignee"),
}}
/>
<Stack.Screen
@@ -292,36 +294,57 @@ export default function WorkspaceLayout() {
<Stack.Screen name="switch-workspace" options={SHEET_OPTIONS} />
<Stack.Screen
name="more/issues"
- options={{ title: "Issues", headerBackTitle: "Back" }}
+ options={{
+ title: t("navigation:routes.issues"),
+ headerBackTitle: t("back"),
+ }}
/>
<Stack.Screen
name="more/projects"
- options={{ title: "Projects", headerBackTitle: "Back" }}
+ options={{
+ title: t("navigation:routes.projects"),
+ headerBackTitle: t("back"),
+ }}
/>
<Stack.Screen
name="more/agents"
- options={{ title: "Agents", headerBackTitle: "Back" }}
+ options={{
+ title: t("navigation:routes.agents"),
+ headerBackTitle: t("back"),
+ }}
/>
<Stack.Screen
name="more/pins"
- options={{ title: "Pinned", headerBackTitle: "Back" }}
+ options={{
+ title: t("navigation:routes.pinned"),
+ headerBackTitle: t("back"),
+ }}
/>
<Stack.Screen
name="more/settings"
- options={{ title: "Settings", headerBackTitle: "Back" }}
+ options={{
+ title: t("navigation:routes.settings"),
+ headerBackTitle: t("back"),
+ }}
/>
<Stack.Screen
name="more/settings/profile"
- options={{ title: "Profile", headerBackTitle: "Settings" }}
+ options={{
+ title: t("navigation:routes.profile"),
+ headerBackTitle: t("navigation:routes.settings"),
+ }}
/>
<Stack.Screen
name="more/settings/notifications"
- options={{ title: "Notifications", headerBackTitle: "Settings" }}
+ options={{
+ title: t("navigation:routes.notifications"),
+ headerBackTitle: t("navigation:routes.settings"),
+ }}
/>
<Stack.Screen
name="new-issue"
options={{
- title: "New Issue",
+ title: t("navigation:routes.new_issue"),
presentation: "modal",
headerLeft: () => <ModalCloseButton />,
}}
@@ -329,7 +352,7 @@ export default function WorkspaceLayout() {
<Stack.Screen
name="search"
options={{
- title: "Search",
+ title: t("navigation:routes.search"),
presentation: "modal",
headerLeft: () => <ModalCloseButton />,
}}
diff --git a/apps/mobile/app/(app)/[workspace]/chat-sessions.tsx b/apps/mobile/app/(app)/[workspace]/chat-sessions.tsx
index 4a5b65db50..72b498ffce 100644
--- a/apps/mobile/app/(app)/[workspace]/chat-sessions.tsx
+++ b/apps/mobile/app/(app)/[workspace]/chat-sessions.tsx
@@ -20,10 +20,11 @@ import { useDeleteChatSession } from "@/data/mutations/chat";
import { useChatSessionPickerStore } from "@/data/stores/chat-session-picker-store";
import { useWorkspaceStore } from "@/data/workspace-store";
import { cn } from "@/lib/utils";
-import { chatSessionDisplayTitle } from "@/lib/chat-session-title";
+import { useT } from "@/lib/i18n";
export default function ChatSessionsRoute() {
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
+ const { t } = useT("chat");
const { data: sessions = [] } = useQuery(chatSessionsOptions(wsId));
const activeSessionId = useChatSessionPickerStore((s) => s.activeSessionId);
const requestSelect = useChatSessionPickerStore((s) => s.requestSelect);
@@ -31,12 +32,12 @@ export default function ChatSessionsRoute() {
const confirmDelete = (session: ChatSession) => {
Alert.alert(
- "Delete this chat?",
- chatSessionDisplayTitle(session.title),
+ t("alerts.delete_title"),
+ session.title || t("sessions.new_chat"),
[
- { text: "Cancel", style: "cancel" },
+ { text: t("common:actions.cancel"), style: "cancel" },
{
- text: "Delete",
+ text: t("alerts.delete_confirm"),
style: "destructive",
onPress: () => {
deleteSession.mutate(session.id);
@@ -55,13 +56,15 @@ export default function ChatSessionsRoute() {
return (
<View className="flex-1">
<View className="px-4 pt-4 pb-3">
- <Text className="text-base font-semibold text-foreground">Chats</Text>
+ <Text className="text-base font-semibold text-foreground">
+ {t("sessions.title")}
+ </Text>
</View>
<ScrollView className="flex-1" showsVerticalScrollIndicator={false}>
{sessions.length === 0 ? (
<View className="px-4 py-8">
<Text className="text-sm text-muted-foreground text-center">
- No chats yet.
+ {t("sessions.empty")}
</Text>
</View>
) : (
@@ -101,11 +104,11 @@ export default function ChatSessionsRoute() {
)}
numberOfLines={1}
>
- {chatSessionDisplayTitle(session.title)}
+ {session.title || t("sessions.new_chat")}
</Text>
{archived ? (
<Text className="text-xs text-muted-foreground mt-0.5">
- archived
+ {t("sessions.archived")}
</Text>
) : null}
</View>
diff --git a/apps/mobile/app/(app)/[workspace]/inbox/[id].tsx b/apps/mobile/app/(app)/[workspace]/inbox/[id].tsx
index a9357a2835..108143107f 100644
--- a/apps/mobile/app/(app)/[workspace]/inbox/[id].tsx
+++ b/apps/mobile/app/(app)/[workspace]/inbox/[id].tsx
@@ -15,6 +15,7 @@ import {
workspaceSubscriptionSummaryOptions,
} from "@/data/queries/billing";
import { useWorkspaceStore } from "@/data/workspace-store";
+import { useT } from "@/lib/i18n";
import {
getAutopilotQuotaBody,
getInboxDisplayTitle,
@@ -27,20 +28,20 @@ function BillingRecovery({
recovery: BillingRecoveryKind;
billingUrl: string | null;
}) {
+ const { t } = useT("inbox");
switch (recovery) {
case "checking":
return <ActivityIndicator />;
case "billing_disabled":
return (
<Text className="text-sm leading-5 text-muted-foreground">
- Billing changes are unavailable for this workspace. Contact your
- workspace administrator for help.
+ {t("detail.billing_disabled")}
</Text>
);
case "contact_admin":
return (
<Text className="text-sm leading-5 text-muted-foreground">
- Ask a workspace owner or admin to review the billing options.
+ {t("detail.contact_admin")}
</Text>
);
case "checkout":
@@ -50,13 +51,13 @@ function BillingRecovery({
return billingUrl ? (
<Button
onPress={() => void Linking.openURL(billingUrl)}
- accessibilityLabel="Review billing options"
+ accessibilityLabel={t("detail.review_billing")}
>
- <Text>Review billing options</Text>
+ <Text>{t("detail.review_billing")}</Text>
</Button>
) : (
<Text className="text-sm leading-5 text-muted-foreground">
- Open Multica on the web to review billing options.
+ {t("detail.review_billing_web")}
</Text>
);
}
@@ -66,6 +67,7 @@ export default function InboxNoticeDetail() {
const { id } = useLocalSearchParams<{ id: string }>();
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
const wsSlug = useWorkspaceStore((s) => s.currentWorkspaceSlug);
+ const { t } = useT("inbox");
const { data: items, isLoading } = useQuery(inboxListOptions(wsId));
// Read the raw workspace-scoped cache: deduplication can replace a row,
@@ -105,14 +107,14 @@ export default function InboxNoticeDetail() {
<View className="flex-1 bg-background">
<View className="flex-row items-center border-b border-border px-4 py-3">
<Text className="flex-1 text-lg font-semibold text-foreground">
- {item ? getInboxDisplayTitle(item) : "Notification"}
+ {item ? getInboxDisplayTitle(item) : t("detail.notification")}
</Text>
<IconButton
name="close"
variant="secondary"
className="size-7 rounded-full"
onPress={() => router.back()}
- accessibilityLabel="Close notification"
+ accessibilityLabel={t("detail.close")}
/>
</View>
@@ -125,7 +127,7 @@ export default function InboxNoticeDetail() {
item.type !== "autopilot_paused") ? (
<View className="px-4 py-8">
<Text className="text-sm text-muted-foreground text-center">
- This notification is no longer available.
+ {t("detail.unavailable")}
</Text>
</View>
) : (
diff --git a/apps/mobile/app/(app)/[workspace]/issue/[id].tsx b/apps/mobile/app/(app)/[workspace]/issue/[id].tsx
index c064c0c96e..91f2b8e4dc 100644
--- a/apps/mobile/app/(app)/[workspace]/issue/[id].tsx
+++ b/apps/mobile/app/(app)/[workspace]/issue/[id].tsx
@@ -42,6 +42,7 @@ import { useWorkspaceStore } from "@/data/workspace-store";
import { useViewedIssuesStore } from "@/data/viewed-issues-store";
import { useCommentSelectStore } from "@/data/comment-select-store";
import { useReplyTargetStore } from "@/data/stores/reply-target-store";
+import { useT } from "@/lib/i18n";
export default function IssueDetail() {
// `highlight` + `h` come from inbox deep-link (apps/mobile/app/(app)/
@@ -104,6 +105,7 @@ export default function IssueDetail() {
!!pins?.some((p) => p.item_type === "issue" && p.item_id === issue.id);
const createPin = useCreatePin();
const deletePin = useDeletePin();
+ const { t } = useT("issues");
// Three-dot menu: Pin/Unpin / Copy link / Open on web (if web URL set) /
// Delete. Mirrors apps/mobile/app/(app)/[workspace]/project/[id].tsx — same
@@ -116,12 +118,27 @@ export default function IssueDetail() {
const issueLink = webUrl
? `${webUrl}/${wsSlug}/issue/${issue.identifier}`
: null;
- const options: string[] = ["Cancel"];
- options.push(isPinned ? "Unpin" : "Pin");
- options.push("Edit details");
- if (issueLink) options.push("Copy link");
- if (issueLink) options.push("Open on web");
- options.push("Delete issue");
+ const actions = ["cancel", "pin"];
+ if (isPinned) actions[1] = "unpin";
+ actions.push("edit");
+ if (issueLink) actions.push("copy_link");
+ if (issueLink) actions.push("open_web");
+ actions.push("delete");
+ const options = actions.map((action) =>
+ action === "cancel"
+ ? t("common:actions.cancel")
+ : action === "pin"
+ ? t("menu.pin")
+ : action === "unpin"
+ ? t("menu.unpin")
+ : action === "edit"
+ ? t("menu.edit_details")
+ : action === "copy_link"
+ ? t("menu.copy_link")
+ : action === "open_web"
+ ? t("menu.open_web")
+ : t("menu.delete_issue"),
+ );
const destructiveIndex = options.length - 1;
ActionSheetIOS.showActionSheetWithOptions(
{
@@ -131,19 +148,19 @@ export default function IssueDetail() {
title: issue.identifier,
},
(i) => {
- const label = options[i];
- if (label === "Pin") {
+ const action = actions[i];
+ if (action === "pin") {
createPin.mutate({ item_type: "issue", item_id: issue.id });
- } else if (label === "Unpin") {
+ } else if (action === "unpin") {
deletePin.mutate({ itemType: "issue", itemId: issue.id });
- } else if (label === "Edit details") {
+ } else if (action === "edit") {
if (wsSlug) router.push(`/${wsSlug}/issue/${issue.id}/edit`);
- } else if (label === "Copy link" && issueLink) {
+ } else if (action === "copy_link" && issueLink) {
Clipboard.setStringAsync(issueLink);
- } else if (label === "Open on web" && issueLink) {
+ } else if (action === "open_web" && issueLink) {
Linking.openURL(issueLink);
- } else if (label === "Delete issue") {
- confirmDelete(issue, () =>
+ } else if (action === "delete") {
+ confirmDelete(issue, t, () =>
deleteIssue.mutate(issue.id, {
onSuccess: () => router.back(),
}),
@@ -151,14 +168,14 @@ export default function IssueDetail() {
}
},
);
- }, [issue, wsSlug, deleteIssue, isPinned, createPin, deletePin]);
+ }, [issue, wsSlug, deleteIssue, isPinned, createPin, deletePin, t]);
return (
<View className="flex-1 bg-background">
<Stack.Screen
options={{
- title: issue?.identifier ?? "Issue",
- headerBackTitle: "Back",
+ title: issue?.identifier ?? t("navigation:routes.issue"),
+ headerBackTitle: t("common:actions.back"),
headerRight: issue
? () => (
<View className="flex-row items-center gap-2">
@@ -169,7 +186,7 @@ export default function IssueDetail() {
<IconButton
name="ellipsis-horizontal"
onPress={onPressMore}
- accessibilityLabel="Issue actions"
+ accessibilityLabel={t("menu.issue_actions")}
/>
</View>
)
@@ -183,13 +200,15 @@ export default function IssueDetail() {
) : detail.error || !issue ? (
<View className="flex-1 items-center justify-center px-6 gap-3">
<Text className="text-sm text-destructive text-center">
- Failed to load issue:{" "}
- {detail.error instanceof Error
- ? detail.error.message
- : "not found"}
+ {t("errors.load_failed", {
+ message:
+ detail.error instanceof Error
+ ? detail.error.message
+ : "not found",
+ })}
</Text>
<Button variant="outline" onPress={() => detail.refetch()}>
- <Text>Retry</Text>
+ <Text>{t("common:actions.retry")}</Text>
</Button>
</View>
) : (
@@ -210,13 +229,17 @@ export default function IssueDetail() {
);
}
-function confirmDelete(issue: Issue, onConfirm: () => void) {
+function confirmDelete(
+ issue: Issue,
+ t: (key: string, options?: Record<string, unknown>) => string,
+ onConfirm: () => void,
+) {
Alert.alert(
- "Delete issue?",
- `${issue.identifier} and its comments, reactions, and attachments will be permanently deleted. This cannot be undone.`,
+ t("delete.title"),
+ t("delete.message", { identifier: issue.identifier }),
[
- { text: "Cancel", style: "cancel" },
- { text: "Delete", style: "destructive", onPress: onConfirm },
+ { text: t("common:actions.cancel"), style: "cancel" },
+ { text: t("common:actions.delete"), style: "destructive", onPress: onConfirm },
],
);
}
diff --git a/apps/mobile/app/(app)/[workspace]/issue/[id]/edit.tsx b/apps/mobile/app/(app)/[workspace]/issue/[id]/edit.tsx
index c803c9b465..ef6eed572a 100644
--- a/apps/mobile/app/(app)/[workspace]/issue/[id]/edit.tsx
+++ b/apps/mobile/app/(app)/[workspace]/issue/[id]/edit.tsx
@@ -39,11 +39,13 @@ import { issueDetailOptions } from "@/data/queries/issues";
import { useUpdateIssue } from "@/data/mutations/issues";
import { buildIssueTextUpdate } from "@/data/issue-edit";
import { useWorkspaceStore } from "@/data/workspace-store";
+import { useT } from "@/lib/i18n";
import { useMentionInput } from "@/lib/use-mention-input";
export default function EditIssue() {
const { id } = useLocalSearchParams<{ id: string }>();
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
+ const { t } = useT("issues");
const detail = useQuery(issueDetailOptions(wsId, id));
const update = useUpdateIssue(id);
@@ -89,18 +91,18 @@ export default function EditIssue() {
return;
}
Alert.alert(
- "Discard changes?",
- "Your edits to this issue will be lost.",
+ t("form.discard_title"),
+ t("form.discard_message_issue"),
[
- { text: "Keep editing", style: "cancel" },
+ { text: t("form.keep_editing"), style: "cancel" },
{
- text: "Discard",
+ text: t("common:actions.discard"),
style: "destructive",
onPress: () => router.back(),
},
],
);
- }, [dirty]);
+ }, [dirty, t]);
const onSave = useCallback(() => {
if (!canSave) return;
@@ -115,20 +117,20 @@ export default function EditIssue() {
onSuccess: () => router.back(),
onError: (err) => {
Alert.alert(
- "Failed to save",
- err instanceof Error ? err.message : "Unknown error",
+ t("form.save_failed"),
+ err instanceof Error ? err.message : t("common:states.error"),
);
},
});
- }, [canSave, title, currentDescription, update]);
+ }, [canSave, title, currentDescription, update, t]);
const headerLeft = useCallback(
() => (
<Pressable onPress={onCancel} className="px-1 py-1">
- <Text className="text-base text-brand">Cancel</Text>
+ <Text className="text-base text-brand">{t("common:actions.cancel")}</Text>
</Pressable>
),
- [onCancel],
+ [onCancel, t],
);
const headerRight = useCallback(
@@ -139,11 +141,11 @@ export default function EditIssue() {
className={canSave ? "px-1 py-1" : "px-1 py-1 opacity-40"}
>
<Text className="text-base text-brand font-semibold">
- {update.isPending ? "Saving…" : "Save"}
+ {update.isPending ? t("edit.saving") : t("edit.save")}
</Text>
</Pressable>
),
- [canSave, onSave, update.isPending],
+ [canSave, onSave, update.isPending, t],
);
return (
@@ -159,14 +161,16 @@ export default function EditIssue() {
keyboardShouldPersistTaps="handled"
>
{!detail.data ? (
- <Text className="text-sm text-muted-foreground">Loading…</Text>
+ <Text className="text-sm text-muted-foreground">
+ {t("common:states.loading")}
+ </Text>
) : (
<>
- <Field label="Title">
+ <Field label={t("common:fields.title")}>
<TextInput
value={title}
onChangeText={setTitle}
- placeholder="Issue title"
+ placeholder={t("new.title_placeholder")}
placeholderTextColor={MOBILE_PLACEHOLDER_COLOR}
className="text-base text-foreground bg-secondary/50 rounded-md px-3 py-2"
returnKeyType="next"
@@ -174,7 +178,7 @@ export default function EditIssue() {
/>
</Field>
- <Field label="Description">
+ <Field label={t("common:fields.description")}>
<DescriptionField
description={description}
disabled={update.isPending}
diff --git a/apps/mobile/app/(app)/[workspace]/issue/[id]/picker/assignee.tsx b/apps/mobile/app/(app)/[workspace]/issue/[id]/picker/assignee.tsx
index ba473567ae..00957821ca 100644
--- a/apps/mobile/app/(app)/[workspace]/issue/[id]/picker/assignee.tsx
+++ b/apps/mobile/app/(app)/[workspace]/issue/[id]/picker/assignee.tsx
@@ -11,13 +11,15 @@ import { issueDetailOptions } from "@/data/queries/issues";
import { useUpdateIssue } from "@/data/mutations/issues";
import { useWorkspaceStore } from "@/data/workspace-store";
import { useNativeSearchBar } from "@/lib/use-native-search-bar";
+import { useT } from "@/lib/i18n";
export default function IssueAssigneePickerRoute() {
+ const { t } = useT("issues");
const { id } = useLocalSearchParams<{ id: string }>();
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
const { data: issue } = useQuery(issueDetailOptions(wsId, id));
const updateIssue = useUpdateIssue(id);
- const query = useNativeSearchBar("Search people", { autoFocus: true });
+ const query = useNativeSearchBar(t("picker.search_people"), { autoFocus: true });
const value =
issue?.assignee_type && issue?.assignee_id
diff --git a/apps/mobile/app/(app)/[workspace]/issue/[id]/picker/due-date.tsx b/apps/mobile/app/(app)/[workspace]/issue/[id]/picker/due-date.tsx
index 490b8275ef..e86c5483a4 100644
--- a/apps/mobile/app/(app)/[workspace]/issue/[id]/picker/due-date.tsx
+++ b/apps/mobile/app/(app)/[workspace]/issue/[id]/picker/due-date.tsx
@@ -20,6 +20,7 @@ import {
import { issueDetailOptions } from "@/data/queries/issues";
import { useUpdateIssue } from "@/data/mutations/issues";
import { useWorkspaceStore } from "@/data/workspace-store";
+import { useT } from "@/lib/i18n";
export default function IssueDueDatePickerRoute() {
const { id } = useLocalSearchParams<{ id: string }>();
@@ -58,9 +59,12 @@ function DueDateHeader({
onDone: () => void;
onClear: () => void;
}) {
+ const { t } = useT("issues");
return (
<View className="flex-row items-center justify-between px-4 pt-4 pb-2">
- <Text className="text-base font-semibold text-foreground">Due date</Text>
+ <Text className="text-base font-semibold text-foreground">
+ {t("common:fields.due_date")}
+ </Text>
<View className="flex-row items-center gap-1">
{hasValue ? (
<Pressable
@@ -68,7 +72,9 @@ function DueDateHeader({
hitSlop={6}
className="px-2 py-1 rounded-md active:bg-secondary"
>
- <Text className="text-sm text-destructive">Clear</Text>
+ <Text className="text-sm text-destructive">
+ {t("picker.clear")}
+ </Text>
</Pressable>
) : null}
<Pressable
@@ -76,7 +82,9 @@ function DueDateHeader({
hitSlop={6}
className="px-2 py-1 rounded-md active:bg-secondary"
>
- <Text className="text-sm font-medium text-primary">Done</Text>
+ <Text className="text-sm font-medium text-primary">
+ {t("common:actions.done")}
+ </Text>
</Pressable>
</View>
</View>
diff --git a/apps/mobile/app/(app)/[workspace]/issue/[id]/picker/label.tsx b/apps/mobile/app/(app)/[workspace]/issue/[id]/picker/label.tsx
index 49dc4d0786..0440803ff2 100644
--- a/apps/mobile/app/(app)/[workspace]/issue/[id]/picker/label.tsx
+++ b/apps/mobile/app/(app)/[workspace]/issue/[id]/picker/label.tsx
@@ -16,15 +16,17 @@ import {
import { useCreateLabel } from "@/data/mutations/labels";
import { useWorkspaceStore } from "@/data/workspace-store";
import { useNativeSearchBar } from "@/lib/use-native-search-bar";
+import { useT } from "@/lib/i18n";
export default function IssueLabelPickerRoute() {
+ const { t } = useT("issues");
const { id } = useLocalSearchParams<{ id: string }>();
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
const { data: issue } = useQuery(issueDetailOptions(wsId, id));
const attachLabel = useAttachLabel(id);
const detachLabel = useDetachLabel(id);
const createLabel = useCreateLabel();
- const query = useNativeSearchBar("Search labels", { autoFocus: true });
+ const query = useNativeSearchBar(t("picker.search_labels"), { autoFocus: true });
// Synchronous lock to prevent double-submit on rapid taps on the Create
// row before React state updates — mirrors web's `creatingRef` pattern in
diff --git a/apps/mobile/app/(app)/[workspace]/issue/[id]/picker/project.tsx b/apps/mobile/app/(app)/[workspace]/issue/[id]/picker/project.tsx
index 6e9c79d5d0..32db814a9b 100644
--- a/apps/mobile/app/(app)/[workspace]/issue/[id]/picker/project.tsx
+++ b/apps/mobile/app/(app)/[workspace]/issue/[id]/picker/project.tsx
@@ -12,14 +12,16 @@ import { findProject, projectListOptions } from "@/data/queries/projects";
import { useUpdateIssue } from "@/data/mutations/issues";
import { useWorkspaceStore } from "@/data/workspace-store";
import { useNativeSearchBar } from "@/lib/use-native-search-bar";
+import { useT } from "@/lib/i18n";
export default function IssueProjectPickerRoute() {
+ const { t } = useT("issues");
const { id } = useLocalSearchParams<{ id: string }>();
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
const { data: issue } = useQuery(issueDetailOptions(wsId, id));
const { data: projects = [] } = useQuery(projectListOptions(wsId));
const updateIssue = useUpdateIssue(id);
- const query = useNativeSearchBar("Search projects", { autoFocus: true });
+ const query = useNativeSearchBar(t("picker.search_projects"), { autoFocus: true });
const project = useMemo(
() => findProject(projects, issue?.project_id ?? null),
diff --git a/apps/mobile/app/(app)/[workspace]/issue/[id]/runs.tsx b/apps/mobile/app/(app)/[workspace]/issue/[id]/runs.tsx
index b2bbbc0890..340358463b 100644
--- a/apps/mobile/app/(app)/[workspace]/issue/[id]/runs.tsx
+++ b/apps/mobile/app/(app)/[workspace]/issue/[id]/runs.tsx
@@ -23,6 +23,7 @@ import {
issueTasksOptions,
} from "@/data/queries/issues";
import { useWorkspaceStore } from "@/data/workspace-store";
+import { useT } from "@/lib/i18n";
const PAST_STATUS_ORDER: Record<AgentTask["status"], number> = {
failed: 0,
@@ -38,6 +39,7 @@ const PAST_STATUS_ORDER: Record<AgentTask["status"], number> = {
export default function IssueRunsRoute() {
const { id } = useLocalSearchParams<{ id: string }>();
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
+ const { t } = useT("issues");
const { data: activeTasks = [] } = useQuery(
issueActiveTasksOptions(wsId, id),
);
@@ -69,20 +71,20 @@ export default function IssueRunsRoute() {
<View className="flex-1">
<View className="px-4 pt-4 pb-3">
<Text className="text-base font-semibold text-foreground">
- Agent Runs
+ {t("runs.title")}
</Text>
</View>
<ScrollView showsVerticalScrollIndicator={false}>
<View className="px-4 gap-3 pb-4">
{active.length > 0 ? (
- <Section title="Active">
+ <Section title={t("runs.active")}>
{active.map((task) => (
<RunRow key={task.id} task={task} issueId={id} />
))}
</Section>
) : null}
{past.length > 0 ? (
- <Section title="Past">
+ <Section title={t("runs.past")}>
{past.map((task) => (
<RunRow key={task.id} task={task} issueId={id} />
))}
diff --git a/apps/mobile/app/(app)/[workspace]/issues-filter.tsx b/apps/mobile/app/(app)/[workspace]/issues-filter.tsx
index 559f611cb1..c7ab63c2bc 100644
--- a/apps/mobile/app/(app)/[workspace]/issues-filter.tsx
+++ b/apps/mobile/app/(app)/[workspace]/issues-filter.tsx
@@ -19,6 +19,7 @@ import { useIssuesViewStore } from "@/data/stores/issues-view-store";
import { useMyIssuesViewStore } from "@/data/stores/my-issues-view-store";
import { statusOptions } from "@/lib/issue-status";
import { useIssueStatuses } from "@/lib/use-issue-statuses";
+import { useT } from "@/lib/i18n";
import { cn } from "@/lib/utils";
// Mirrors PRIORITY_ORDER in packages/core/issues/config/priority.ts.
@@ -30,20 +31,19 @@ const PRIORITY_ORDER: IssuePriority[] = [
"none",
];
-// Label map duplicated across several mobile files — out of scope to
-// consolidate per the SheetShell migration plan.
const PRIORITY_LABEL: Record<IssuePriority, string> = {
- urgent: "Urgent",
- high: "High",
- medium: "Medium",
- low: "Low",
- none: "No priority",
+ urgent: "issues:priority.urgent",
+ high: "issues:priority.high",
+ medium: "issues:priority.medium",
+ low: "issues:priority.low",
+ none: "issues:priority.none",
};
type Scope = "my" | "all";
export default function IssuesFilterRoute() {
const { scope } = useLocalSearchParams<{ scope?: string }>();
+ const { t } = useT("issues");
const resolvedScope: Scope = scope === "all" ? "all" : "my";
const statusFilters = useScopedFilters(resolvedScope, "status");
@@ -80,19 +80,23 @@ export default function IssuesFilterRoute() {
return (
<View className="flex-1">
<View className="flex-row items-center justify-between px-4 pt-4 pb-3">
- <Text className="text-base font-semibold text-foreground">Filter</Text>
+ <Text className="text-base font-semibold text-foreground">
+ {t("filters.title")}
+ </Text>
{hasActive ? (
<Pressable
onPress={onClearFilters}
hitSlop={8}
className="px-2 py-1 active:opacity-60"
>
- <Text className="text-sm text-primary font-medium">Reset</Text>
+ <Text className="text-sm text-primary font-medium">
+ {t("filters.clear")}
+ </Text>
</Pressable>
) : null}
</View>
<ScrollView className="flex-1" showsVerticalScrollIndicator={false}>
- <SectionLabel>Status</SectionLabel>
+ <SectionLabel>{t("filters.status")}</SectionLabel>
{statusChoices.map((option) => {
const checked = statusFilters.includes(option.key);
return (
@@ -111,14 +115,14 @@ export default function IssuesFilterRoute() {
size={16}
/>
<Text className="flex-1 text-sm text-foreground">
- {option.label}
+ {catalog.labelOf(option.key)}
</Text>
<CheckMark checked={checked} />
</Pressable>
);
})}
- <SectionLabel>Priority</SectionLabel>
+ <SectionLabel>{t("filters.priority")}</SectionLabel>
{PRIORITY_ORDER.map((priority) => {
const checked = priorityFilters.includes(priority);
return (
@@ -132,7 +136,7 @@ export default function IssuesFilterRoute() {
>
<PriorityIcon priority={priority} />
<Text className="flex-1 text-sm text-foreground">
- {PRIORITY_LABEL[priority]}
+ {t(PRIORITY_LABEL[priority])}
</Text>
<CheckMark checked={checked} />
</Pressable>
diff --git a/apps/mobile/app/(app)/[workspace]/mention-picker.tsx b/apps/mobile/app/(app)/[workspace]/mention-picker.tsx
index c4a4f7ebce..7f6f4e6b03 100644
--- a/apps/mobile/app/(app)/[workspace]/mention-picker.tsx
+++ b/apps/mobile/app/(app)/[workspace]/mention-picker.tsx
@@ -19,14 +19,18 @@
import { useLocalSearchParams } from "expo-router";
import { MentionPickerBody } from "@/components/issue/pickers/mention-picker-body";
import { useNativeSearchBar } from "@/lib/use-native-search-bar";
+import { useT } from "@/lib/i18n";
type Mode = "comment" | "chat";
export default function MentionPickerRoute() {
const { mode: rawMode } = useLocalSearchParams<{ mode?: string }>();
+ const { t } = useT("issues");
const mode: Mode = rawMode === "chat" ? "chat" : "comment";
const placeholder =
- mode === "chat" ? "Reference an issue" : "Search people or issues";
+ mode === "chat"
+ ? t("picker.reference_issue")
+ : t("picker.search_people_issues");
const query = useNativeSearchBar(placeholder, { autoFocus: true });
return <MentionPickerBody mode={mode} query={query} />;
}
diff --git a/apps/mobile/app/(app)/[workspace]/more/agents.tsx b/apps/mobile/app/(app)/[workspace]/more/agents.tsx
index f1d3e5b767..35c6074b1f 100644
--- a/apps/mobile/app/(app)/[workspace]/more/agents.tsx
+++ b/apps/mobile/app/(app)/[workspace]/more/agents.tsx
@@ -1,11 +1,13 @@
import { View } from "react-native";
import { Text } from "@/components/ui/text";
+import { useT } from "@/lib/i18n";
export default function AgentsPage() {
+ const { t } = useT("workspace");
return (
<View className="flex-1 items-center justify-center bg-background px-6">
<Text className="text-sm text-muted-foreground text-center">
- Agents coming soon.
+ {t("agent.coming_soon")}
</Text>
</View>
);
diff --git a/apps/mobile/app/(app)/[workspace]/more/issues.tsx b/apps/mobile/app/(app)/[workspace]/more/issues.tsx
index de469c8745..07a1788cc6 100644
--- a/apps/mobile/app/(app)/[workspace]/more/issues.tsx
+++ b/apps/mobile/app/(app)/[workspace]/more/issues.tsx
@@ -46,6 +46,7 @@ import {
} from "@/data/stores/issues-view-store";
import { useClearFiltersOnWorkspaceChange } from "@/lib/use-clear-filters-on-workspace-change";
import { PRIORITY_LABEL } from "@/lib/issue-status";
+import { useT } from "@/lib/i18n";
import { useIssueStatuses } from "@/lib/use-issue-statuses";
import { groupIssuesByStatus } from "@/lib/group-issues-by-status";
import { filterIssues } from "@/lib/filter-issues";
@@ -57,15 +58,12 @@ import { THEME } from "@/lib/theme";
// either, and on SE3 (375pt) "(123)" appended to each label pushes the
// row past the safe width when filter icon shares the row. Per-status
// counts still appear on the SectionList headers below.
-const SCOPES: { value: IssuesScope; label: string }[] = [
- { value: "all", label: "All" },
- { value: "members", label: "Members" },
- { value: "agents", label: "Agents" },
-];
+const SCOPES: IssuesScope[] = ["all", "members", "agents"];
export default function IssuesPage() {
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
const wsSlug = useWorkspaceStore((s) => s.currentWorkspaceSlug);
+ const { t } = useT("issues");
const scope = useIssuesViewStore((s) => s.scope);
const setScope = useIssuesViewStore((s) => s.setScope);
@@ -93,11 +91,10 @@ export default function IssuesPage() {
// category the server already resolved onto each issue. (MUL-6243)
const catalog = useIssueStatuses();
- const allIssues = data ?? [];
-
// Scope pre-filter — mirrors web `issues-page.tsx:90-94`. Applied before
// status/priority filtering so chip filters operate on the visible slice.
const scopedIssues = useMemo(() => {
+ const allIssues = data ?? [];
if (scope === "members") {
return allIssues.filter((i) => i.assignee_type === "member");
}
@@ -107,7 +104,7 @@ export default function IssuesPage() {
);
}
return allIssues;
- }, [allIssues, scope]);
+ }, [data, scope]);
const filtered = useMemo(
() => filterIssues(scopedIssues, statusFilters, priorityFilters),
@@ -118,13 +115,17 @@ export default function IssuesPage() {
const hasActiveFilters =
statusFilters.length > 0 || priorityFilters.length > 0;
+ const scopeItems = SCOPES.map((value) => ({
+ value,
+ label: t(`tabs.${value}`),
+ }));
const showEmptyState = !isLoading && !error && filtered.length === 0;
return (
<View className="flex-1 bg-background">
<ScopeToolbar
- scopes={SCOPES}
+ scopes={scopeItems}
scope={scope}
onChange={(v) => setScope(v)}
onOpenFilter={openFilter}
@@ -148,19 +149,20 @@ export default function IssuesPage() {
) : error ? (
<View className="px-4 gap-3 pt-4">
<Text className="text-sm text-destructive">
- Failed to load issues:{" "}
- {error instanceof Error ? error.message : "unknown error"}
+ {t("errors.load_failed", {
+ message: error instanceof Error ? error.message : "unknown",
+ })}
</Text>
<Button variant="outline" onPress={() => refetch()}>
- <Text>Retry</Text>
+ <Text>{t("common:actions.retry")}</Text>
</Button>
</View>
) : showEmptyState ? (
<EmptyState
message={
hasActiveFilters
- ? "No issues match the current filters."
- : emptyMessageForScope(scope)
+ ? t("empty.filtered")
+ : t(`empty.${scope}`)
}
/>
) : (
@@ -206,6 +208,7 @@ function FilterButton({
onPress: () => void;
hasActiveFilters: boolean;
}) {
+ const { t } = useT("issues");
const { colorScheme } = useColorScheme();
return (
<View style={{ position: "relative" }} className="ml-2">
@@ -213,7 +216,7 @@ function FilterButton({
variant="outline"
size="sm"
onPress={onPress}
- accessibilityLabel="Filter"
+ accessibilityLabel={t("filters.title")}
className="w-9 px-0"
>
<Ionicons
@@ -299,6 +302,7 @@ function ActiveFilterChips({
onClearStatus: (s: IssueStatus) => void;
onClearPriority: (p: IssuePriority) => void;
}) {
+ const { t } = useT("issues");
return (
<View className="flex-row flex-wrap gap-1.5 px-4 pb-2">
{statusFilters.map((s) => (
@@ -311,7 +315,7 @@ function ActiveFilterChips({
{priorityFilters.map((p) => (
<Chip
key={`p-${p}`}
- label={PRIORITY_LABEL[p]}
+ label={t(PRIORITY_LABEL[p])}
onClear={() => onClearPriority(p)}
/>
))}
@@ -366,14 +370,3 @@ function EmptyState({ message }: { message: string }) {
</View>
);
}
-
-function emptyMessageForScope(scope: IssuesScope): string {
- switch (scope) {
- case "all":
- return "No issues in this workspace.";
- case "members":
- return "No issues assigned to a member.";
- case "agents":
- return "No issues assigned to agents or squads.";
- }
-}
diff --git a/apps/mobile/app/(app)/[workspace]/more/pins.tsx b/apps/mobile/app/(app)/[workspace]/more/pins.tsx
index 60bd2970a7..b7ecb983f6 100644
--- a/apps/mobile/app/(app)/[workspace]/more/pins.tsx
+++ b/apps/mobile/app/(app)/[workspace]/more/pins.tsx
@@ -47,11 +47,13 @@ import { useAuthStore } from "@/data/auth-store";
import { useWorkspaceStore } from "@/data/workspace-store";
import { useColorScheme } from "@/lib/use-color-scheme";
import { THEME } from "@/lib/theme";
+import { useT } from "@/lib/i18n";
export default function PinsPage() {
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
const wsSlug = useWorkspaceStore((s) => s.currentWorkspaceSlug);
const userId = useAuthStore((s) => s.user?.id ?? null);
+ const { t } = useT("workspace");
const { data, isLoading, error, refetch, isRefetching } = useQuery(
pinListOptions(wsId, userId),
@@ -76,11 +78,12 @@ export default function PinsPage() {
return (
<View className="flex-1 bg-background px-4 gap-3 pt-4">
<Text className="text-sm text-destructive">
- Failed to load pins:{" "}
- {error instanceof Error ? error.message : "unknown error"}
+ {t("pins.errors.load_failed", {
+ message: error instanceof Error ? error.message : "unknown",
+ })}
</Text>
<Button variant="outline" onPress={() => refetch()}>
- <Text>Retry</Text>
+ <Text>{t("common:actions.retry")}</Text>
</Button>
</View>
);
@@ -90,8 +93,7 @@ export default function PinsPage() {
return (
<View className="flex-1 items-center justify-center bg-background px-6">
<Text className="text-sm text-muted-foreground text-center">
- No pins yet. Pin an issue or project from its actions menu to
- surface it here.
+ {t("pins.empty")}
</Text>
</View>
);
@@ -216,11 +218,16 @@ function MissingPinRow({
}) {
const { colorScheme } = useColorScheme();
const deletePin = useDeletePin();
+ const { t } = useT("workspace");
return (
<Pressable
onPress={() => deletePin.mutate({ itemType, itemId })}
className="px-4 py-3 flex-row items-center gap-3 active:bg-secondary opacity-60"
- accessibilityLabel={`Unavailable ${itemType}, tap to unpin`}
+ accessibilityLabel={
+ itemType === "issue"
+ ? t("pins.unavailable_issue")
+ : t("pins.unavailable_project")
+ }
>
<Ionicons
name="alert-circle-outline"
@@ -228,7 +235,9 @@ function MissingPinRow({
color={THEME[colorScheme].mutedForeground}
/>
<Text className="flex-1 text-sm text-muted-foreground" numberOfLines={1}>
- Unavailable {itemType} — tap to unpin
+ {itemType === "issue"
+ ? t("pins.unavailable_issue")
+ : t("pins.unavailable_project")}
</Text>
</Pressable>
);
diff --git a/apps/mobile/app/(app)/[workspace]/more/projects.tsx b/apps/mobile/app/(app)/[workspace]/more/projects.tsx
index cac1c88465..940782c5e2 100644
--- a/apps/mobile/app/(app)/[workspace]/more/projects.tsx
+++ b/apps/mobile/app/(app)/[workspace]/more/projects.tsx
@@ -28,10 +28,12 @@ import { IconButton } from "@/components/ui/icon-button";
import { ProjectRow } from "@/components/project/project-row";
import { projectListOptions } from "@/data/queries/projects";
import { useWorkspaceStore } from "@/data/workspace-store";
+import { useT } from "@/lib/i18n";
export default function ProjectsPage() {
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
const wsSlug = useWorkspaceStore((s) => s.currentWorkspaceSlug);
+ const { t } = useT("projects");
const { data, isLoading, error, refetch, isRefetching } = useQuery(
projectListOptions(wsId),
@@ -64,11 +66,12 @@ export default function ProjectsPage() {
) : error ? (
<View className="px-4 gap-3 pt-4">
<Text className="text-sm text-destructive">
- Failed to load projects:{" "}
- {error instanceof Error ? error.message : "unknown error"}
+ {t("errors.load_failed", {
+ message: error instanceof Error ? error.message : "unknown",
+ })}
</Text>
<Button variant="outline" onPress={() => refetch()}>
- <Text>Retry</Text>
+ <Text>{t("common:actions.retry")}</Text>
</Button>
</View>
) : sorted.length === 0 ? (
@@ -99,23 +102,25 @@ export default function ProjectsPage() {
}
function PlusButton({ onPress }: { onPress: () => void }) {
+ const { t } = useT("projects");
return (
<IconButton
name="add"
onPress={onPress}
- accessibilityLabel="New project"
+ accessibilityLabel={t("navigation:routes.new_project")}
/>
);
}
function EmptyState({ onCreate }: { onCreate: () => void }) {
+ const { t } = useT("projects");
return (
<View className="flex-1 items-center justify-center px-6 gap-4">
<Text className="text-base font-medium text-foreground">
- No projects yet
+ {t("list.empty")}
</Text>
<Button variant="default" onPress={onCreate}>
- <Text>Create project</Text>
+ <Text>{t("common:actions.create")}</Text>
</Button>
</View>
);
diff --git a/apps/mobile/app/(app)/[workspace]/more/settings.tsx b/apps/mobile/app/(app)/[workspace]/more/settings.tsx
index b06e708792..7e41923ad1 100644
--- a/apps/mobile/app/(app)/[workspace]/more/settings.tsx
+++ b/apps/mobile/app/(app)/[workspace]/more/settings.tsx
@@ -30,13 +30,11 @@ import {
type ThemePreference,
} from "@/lib/use-color-scheme";
import { THEME } from "@/lib/theme";
+import { useLocalePreference, useT, type LocalePreference } from "@/lib/i18n";
import { cn } from "@/lib/utils";
-const THEME_OPTIONS: Array<{ value: ThemePreference; label: string }> = [
- { value: "light", label: "Light" },
- { value: "dark", label: "Dark" },
- { value: "system", label: "System" },
-];
+const THEME_OPTIONS: ThemePreference[] = ["light", "dark", "system"];
+const LANGUAGE_OPTIONS: LocalePreference[] = ["system", "en", "zh-Hans"];
function initialsOf(name: string | undefined): string {
if (!name) return "?";
@@ -57,7 +55,18 @@ export default function SettingsPage() {
const clearWorkspace = useWorkspaceStore((s) => s.clear);
const { data, isLoading, error } = useQuery(workspaceListOptions());
const { preference, setPreference, colorScheme } = useColorScheme();
+ const {
+ preference: localePreference,
+ setPreference: setLocalePreference,
+ } = useLocalePreference();
+ const { t } = useT("settings");
+ const { t: tCommon } = useT();
const mutedFg = THEME[colorScheme].mutedForeground;
+ const localeLabels = {
+ system: t("language.system"),
+ en: t("language.english"),
+ "zh-Hans": t("language.chinese_simplified"),
+ };
const onSwitch = async (ws: Workspace) => {
if (ws.slug === currentSlug) return;
@@ -67,12 +76,12 @@ export default function SettingsPage() {
const onSignOut = () => {
Alert.alert(
- "Sign out",
- "You'll need to sign in again to use Multica on this device.",
+ t("account.sign_out"),
+ t("account.sign_out_message"),
[
- { text: "Cancel", style: "cancel" },
+ { text: tCommon("actions.cancel"), style: "cancel" },
{
- text: "Sign out",
+ text: t("account.sign_out"),
style: "destructive",
onPress: async () => {
await clearWorkspace();
@@ -92,12 +101,12 @@ export default function SettingsPage() {
className="flex-1 bg-background"
contentContainerClassName="px-4 py-4 gap-6"
>
- <SectionGroup title="Account">
+ <SectionGroup title={t("account.title")}>
<NavRow
onPress={goProfile}
chevronColor={mutedFg}
leading={
- <Avatar alt={user?.name ?? "User avatar"} className="size-10">
+ <Avatar alt={user?.name ?? t("profile.name")} className="size-10">
{user?.avatar_url ? (
<AvatarImage source={{ uri: user.avatar_url }} />
) : null}
@@ -115,12 +124,12 @@ export default function SettingsPage() {
<NavRow
onPress={goNotifications}
chevronColor={mutedFg}
- title="Notifications"
- subtitle="Inbox and system alerts"
+ title={t("notifications.title")}
+ subtitle={t("account.notifications_subtitle")}
/>
</SectionGroup>
- <SectionGroup title="Workspaces">
+ <SectionGroup title={t("account.workspaces")}>
{isLoading ? (
<View className="py-4 items-center">
<ActivityIndicator />
@@ -128,7 +137,7 @@ export default function SettingsPage() {
) : error ? (
<View className="p-4">
<Text className="text-sm text-destructive">
- Failed to load workspaces
+ {t("account.load_failed")}
</Text>
</View>
) : (
@@ -151,7 +160,7 @@ export default function SettingsPage() {
)}
</SectionGroup>
- <SectionGroup title="Appearance">
+ <SectionGroup title={t("appearance.title")}>
{/* Two converging entry points by design, NOT a double-fire:
- Tap on small radio circle → RadioGroupItem (Pressable, inner) consumes → onValueChange fires
- Tap on text / row padding → outer Pressable.onPress fires
@@ -167,14 +176,40 @@ export default function SettingsPage() {
{THEME_OPTIONS.map((opt, idx) => {
const isLast = idx === THEME_OPTIONS.length - 1;
return (
- <View key={opt.value}>
+ <View key={opt}>
+ <Pressable
+ onPress={() => setPreference(opt)}
+ className="flex-row items-center px-4 py-3.5 active:bg-secondary gap-3"
+ >
+ <RadioGroupItem value={opt} />
+ <Text className="flex-1 text-base font-medium text-foreground">
+ {t(`appearance.${opt}`)}
+ </Text>
+ </Pressable>
+ {!isLast ? <Separator /> : null}
+ </View>
+ );
+ })}
+ </RadioGroup>
+ </SectionGroup>
+
+ <SectionGroup title={t("language.title")}>
+ <RadioGroup
+ value={localePreference}
+ onValueChange={(v) => setLocalePreference(v as LocalePreference)}
+ className="gap-0"
+ >
+ {LANGUAGE_OPTIONS.map((opt, idx) => {
+ const isLast = idx === LANGUAGE_OPTIONS.length - 1;
+ return (
+ <View key={opt}>
<Pressable
- onPress={() => setPreference(opt.value)}
+ onPress={() => setLocalePreference(opt)}
className="flex-row items-center px-4 py-3.5 active:bg-secondary gap-3"
>
- <RadioGroupItem value={opt.value} />
+ <RadioGroupItem value={opt} />
<Text className="flex-1 text-base font-medium text-foreground">
- {opt.label}
+ {localeLabels[opt]}
</Text>
</Pressable>
{!isLast ? <Separator /> : null}
@@ -186,7 +221,7 @@ export default function SettingsPage() {
<View className="pt-2">
<Button variant="destructive" onPress={onSignOut}>
- <Text>Sign out</Text>
+ <Text>{t("account.sign_out")}</Text>
</Button>
</View>
</ScrollView>
diff --git a/apps/mobile/app/(app)/[workspace]/more/settings/notifications.tsx b/apps/mobile/app/(app)/[workspace]/more/settings/notifications.tsx
index 9a90a6ed4e..0bef74efa7 100644
--- a/apps/mobile/app/(app)/[workspace]/more/settings/notifications.tsx
+++ b/apps/mobile/app/(app)/[workspace]/more/settings/notifications.tsx
@@ -2,10 +2,9 @@
* Notification preferences subscreen. 6 inbox groups + system_notifications
* toggle, each backed by an optimistic PATCH /api/notification-preferences.
*
- * Copy mirrors packages/views/settings/components/notifications-tab.tsx but
- * hardcoded English (mobile has no i18n infra yet). The group labels MUST
- * stay in sync with web — they describe the same server-side semantics,
- * and divergent labels would violate behavioral parity (apps/mobile/CLAUDE.md).
+ * Copy mirrors packages/views/settings/components/notifications-tab.tsx.
+ * Group labels describe the same server-side semantics as web; divergent
+ * labels would violate behavioral parity (apps/mobile/CLAUDE.md).
*/
import { ActivityIndicator, ScrollView, View } from "react-native";
import { useQuery } from "@tanstack/react-query";
@@ -19,45 +18,47 @@ import { Separator } from "@/components/ui/separator";
import { useWorkspaceStore } from "@/data/workspace-store";
import { notificationPreferenceOptions } from "@/data/queries/notification-preferences";
import { useUpdateNotificationPreferences } from "@/data/mutations/notification-preferences";
+import { useT } from "@/lib/i18n";
const INBOX_GROUPS: {
key: Exclude<NotificationGroupKey, "system_notifications">;
- label: string;
- description?: string;
+ labelKey: string;
+ descriptionKey?: string;
}[] = [
{
key: "assignments",
- label: "Assignments",
- description: "Assigned or unassigned.",
+ labelKey: "groups.assignments",
+ descriptionKey: "groups.assignments_description",
},
{
key: "status_changes",
- label: "Status changes",
+ labelKey: "groups.status_changes",
},
{
key: "comments",
- label: "Comments",
- description: "New comments on issues you're subscribed to.",
+ labelKey: "groups.comments",
+ descriptionKey: "groups.comments_description",
},
{
key: "mentions",
- label: "Mentions",
- description: "When someone @mentions you, including @all and @squad.",
+ labelKey: "groups.mentions",
+ descriptionKey: "groups.mentions_description",
},
{
key: "updates",
- label: "Issue updates",
- description: "Edits to title, description, labels, priority, or due date.",
+ labelKey: "groups.updates",
+ descriptionKey: "groups.updates_description",
},
{
key: "agent_activity",
- label: "Agent activity",
- description: "When an agent run fails.",
+ labelKey: "groups.agent_activity",
+ descriptionKey: "groups.agent_activity_description",
},
];
export default function NotificationsSettingsScreen() {
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
+ const { t } = useT("settings");
const { data, isLoading, error } = useQuery(
notificationPreferenceOptions(wsId),
);
@@ -90,7 +91,7 @@ export default function NotificationsSettingsScreen() {
return (
<View className="flex-1 items-center justify-center bg-background px-6">
<Text className="text-sm text-destructive text-center">
- Failed to load notification preferences.
+ {t("errors.load_failed")}
</Text>
</View>
);
@@ -102,7 +103,7 @@ export default function NotificationsSettingsScreen() {
contentContainerClassName="px-4 py-4 gap-6"
>
<Section
- title="Inbox notifications"
+ title={t("groups.inbox_notifications")}
>
{INBOX_GROUPS.map((group, idx) => {
const enabled = preferences[group.key] !== "muted";
@@ -112,11 +113,11 @@ export default function NotificationsSettingsScreen() {
<View className="flex-row items-center px-4 py-3 gap-3">
<View className="flex-1">
<Text className="text-base font-medium text-foreground">
- {group.label}
+ {t(group.labelKey)}
</Text>
- {group.description ? (
+ {group.descriptionKey ? (
<Text className="text-xs text-muted-foreground mt-0.5">
- {group.description}
+ {t(group.descriptionKey)}
</Text>
) : null}
</View>
@@ -132,15 +133,15 @@ export default function NotificationsSettingsScreen() {
</Section>
<Section
- title="System"
+ title={t("groups.system")}
>
<View className="flex-row items-center px-4 py-3 gap-3">
<View className="flex-1">
<Text className="text-base font-medium text-foreground">
- System notifications
+ {t("groups.system_notifications")}
</Text>
<Text className="text-xs text-muted-foreground mt-0.5">
- Account changes, security alerts, product updates.
+ {t("groups.system_description")}
</Text>
</View>
<Switch
diff --git a/apps/mobile/app/(app)/[workspace]/more/settings/profile.tsx b/apps/mobile/app/(app)/[workspace]/more/settings/profile.tsx
index 4324243c6d..7d4571401f 100644
--- a/apps/mobile/app/(app)/[workspace]/more/settings/profile.tsx
+++ b/apps/mobile/app/(app)/[workspace]/more/settings/profile.tsx
@@ -28,6 +28,7 @@ import { Separator } from "@/components/ui/separator";
import { useAuthStore } from "@/data/auth-store";
import { api } from "@/data/api";
import type { FileAsset } from "@/data/api";
+import { useT } from "@/lib/i18n";
const MAX_AVATAR_BYTES = 5 * 1024 * 1024; // 5 MB — matches what's reasonable on cellular.
@@ -45,6 +46,7 @@ function initialsOf(name: string | undefined): string {
export default function ProfileSettingsScreen() {
const user = useAuthStore((s) => s.user);
const setUser = useAuthStore((s) => s.setUser);
+ const { t } = useT("settings");
const [name, setName] = useState(user?.name ?? "");
const [saving, setSaving] = useState(false);
@@ -59,10 +61,20 @@ export default function ProfileSettingsScreen() {
const dirty = name.trim() !== (user?.name ?? "") && name.trim().length > 0;
const handleAvatarPick = () => {
- const options = ["Take Photo", "Choose from Library", "Remove Photo", "Cancel"];
+ const actions = ["camera", "library"];
+ if (user?.avatar_url) actions.push("remove");
+ actions.push("cancel");
const removeIndex = user?.avatar_url ? 2 : -1;
- const cancelIndex = user?.avatar_url ? 3 : 2;
- const visibleOptions = user?.avatar_url ? options : options.filter((_, i) => i !== 2);
+ const cancelIndex = actions.length - 1;
+ const visibleOptions = actions.map((action) =>
+ action === "camera"
+ ? t("avatar.take")
+ : action === "library"
+ ? t("avatar.library")
+ : action === "remove"
+ ? t("avatar.remove")
+ : t("common:actions.cancel"),
+ );
ActionSheetIOS.showActionSheetWithOptions(
{
@@ -72,9 +84,10 @@ export default function ProfileSettingsScreen() {
},
async (index) => {
if (index === cancelIndex) return;
- if (index === 0) await pickFromCamera();
- else if (index === 1) await pickFromLibrary();
- else if (index === removeIndex) await removeAvatar();
+ const action = actions[index];
+ if (action === "camera") await pickFromCamera();
+ else if (action === "library") await pickFromLibrary();
+ else if (action === "remove") await removeAvatar();
},
);
};
@@ -82,7 +95,10 @@ export default function ProfileSettingsScreen() {
const pickFromCamera = async () => {
const perm = await ImagePicker.requestCameraPermissionsAsync();
if (!perm.granted) {
- Alert.alert("Permission needed", "Camera access is required to take a photo.");
+ Alert.alert(
+ t("avatar.permission_title"),
+ t("avatar.permission_message"),
+ );
return;
}
const result = await ImagePicker.launchCameraAsync({
@@ -106,7 +122,7 @@ export default function ProfileSettingsScreen() {
const uploadAvatar = async (asset: ImagePicker.ImagePickerAsset) => {
if (asset.fileSize && asset.fileSize > MAX_AVATAR_BYTES) {
- Alert.alert("Image too large", "Pick an image under 5 MB.");
+ Alert.alert(t("avatar.too_large_title"), t("avatar.too_large_message"));
return;
}
const fileAsset: FileAsset = {
@@ -124,8 +140,10 @@ export default function ProfileSettingsScreen() {
setUser(updated);
} catch (err) {
Alert.alert(
- "Upload failed",
- err instanceof Error ? err.message : "Could not upload avatar.",
+ t("avatar.upload_failed"),
+ err instanceof Error
+ ? err.message
+ : t("avatar.upload_failed_default"),
);
} finally {
setUploading(false);
@@ -139,8 +157,10 @@ export default function ProfileSettingsScreen() {
setUser(updated);
} catch (err) {
Alert.alert(
- "Remove failed",
- err instanceof Error ? err.message : "Could not remove avatar.",
+ t("avatar.remove_failed"),
+ err instanceof Error
+ ? err.message
+ : t("avatar.remove_failed_default"),
);
} finally {
setUploading(false);
@@ -155,8 +175,8 @@ export default function ProfileSettingsScreen() {
setUser(updated);
} catch (err) {
Alert.alert(
- "Save failed",
- err instanceof Error ? err.message : "Could not update profile.",
+ t("errors.save_failed"),
+ err instanceof Error ? err.message : t("errors.save_failed_default"),
);
} finally {
setSaving(false);
@@ -171,7 +191,7 @@ export default function ProfileSettingsScreen() {
>
<View className="items-center gap-3">
<Pressable onPress={handleAvatarPick} disabled={uploading}>
- <Avatar alt={user?.name ?? "Your avatar"} className="size-24">
+ <Avatar alt={user?.name ?? t("profile.name")} className="size-24">
{user?.avatar_url ? (
<AvatarImage source={{ uri: user.avatar_url }} />
) : null}
@@ -186,7 +206,7 @@ export default function ProfileSettingsScreen() {
<ActivityIndicator />
) : (
<Text className="text-xs text-muted-foreground">
- Tap to change photo
+ {t("avatar.change_hint")}
</Text>
)}
</View>
@@ -195,31 +215,35 @@ export default function ProfileSettingsScreen() {
<View className="gap-4">
<View>
- <Text className="text-xs text-muted-foreground mb-1.5">Name</Text>
+ <Text className="text-xs text-muted-foreground mb-1.5">
+ {t("profile.name")}
+ </Text>
<TextField
value={name}
onChangeText={setName}
- placeholder="Your name"
+ placeholder={t("profile.name")}
autoCapitalize="words"
autoCorrect={false}
returnKeyType="done"
/>
</View>
<View>
- <Text className="text-xs text-muted-foreground mb-1.5">Email</Text>
+ <Text className="text-xs text-muted-foreground mb-1.5">
+ {t("profile.email")}
+ </Text>
<View className="rounded-md border border-border bg-muted px-3 py-2.5">
<Text className="text-base text-muted-foreground">
{user?.email ?? "—"}
</Text>
</View>
<Text className="text-xs text-muted-foreground mt-1.5">
- Email is set at sign-up and can&apos;t be changed here.
+ {t("email_fixed")}
</Text>
</View>
</View>
<Button onPress={handleSave} disabled={!dirty || saving}>
- <Text>{saving ? "Saving…" : "Save"}</Text>
+ <Text>{saving ? t("profile.saving") : t("common:actions.save")}</Text>
</Button>
</ScrollView>
);
diff --git a/apps/mobile/app/(app)/[workspace]/new-issue-picker/assignee.tsx b/apps/mobile/app/(app)/[workspace]/new-issue-picker/assignee.tsx
index 2684e8abde..620e0c66d7 100644
--- a/apps/mobile/app/(app)/[workspace]/new-issue-picker/assignee.tsx
+++ b/apps/mobile/app/(app)/[workspace]/new-issue-picker/assignee.tsx
@@ -8,11 +8,13 @@ import { router } from "expo-router";
import { AssigneePickerBody } from "@/components/issue/pickers/assignee-picker-body";
import { useNewIssueDraftStore } from "@/data/stores/new-issue-draft-store";
import { useNativeSearchBar } from "@/lib/use-native-search-bar";
+import { useT } from "@/lib/i18n";
export default function NewIssueAssigneePickerRoute() {
+ const { t } = useT("issues");
const assignee = useNewIssueDraftStore((s) => s.assignee);
const setAssignee = useNewIssueDraftStore((s) => s.setAssignee);
- const query = useNativeSearchBar("Search people", { autoFocus: true });
+ const query = useNativeSearchBar(t("picker.search_people"), { autoFocus: true });
return (
<AssigneePickerBody
diff --git a/apps/mobile/app/(app)/[workspace]/new-issue-picker/due-date.tsx b/apps/mobile/app/(app)/[workspace]/new-issue-picker/due-date.tsx
index c90e9ba468..a059d0ca0c 100644
--- a/apps/mobile/app/(app)/[workspace]/new-issue-picker/due-date.tsx
+++ b/apps/mobile/app/(app)/[workspace]/new-issue-picker/due-date.tsx
@@ -14,17 +14,19 @@ import {
type DueDatePickerBodyHandle,
} from "@/components/issue/pickers/due-date-picker-body";
import { useNewIssueDraftStore } from "@/data/stores/new-issue-draft-store";
+import { useT } from "@/lib/i18n";
export default function NewIssueDueDatePickerRoute() {
const dueDate = useNewIssueDraftStore((s) => s.dueDate);
const setDueDate = useNewIssueDraftStore((s) => s.setDueDate);
+ const { t } = useT("issues");
const ref = useRef<DueDatePickerBodyHandle>(null);
return (
<View className="flex-1">
<View className="flex-row items-center justify-between px-4 pt-4 pb-2">
<Text className="text-base font-semibold text-foreground">
- Due date
+ {t("common:fields.due_date")}
</Text>
<View className="flex-row items-center gap-1">
{dueDate ? (
@@ -36,7 +38,9 @@ export default function NewIssueDueDatePickerRoute() {
hitSlop={6}
className="px-2 py-1 rounded-md active:bg-secondary"
>
- <Text className="text-sm text-destructive">Clear</Text>
+ <Text className="text-sm text-destructive">
+ {t("picker.clear")}
+ </Text>
</Pressable>
) : null}
<Pressable
@@ -48,7 +52,9 @@ export default function NewIssueDueDatePickerRoute() {
hitSlop={6}
className="px-2 py-1 rounded-md active:bg-secondary"
>
- <Text className="text-sm font-medium text-primary">Done</Text>
+ <Text className="text-sm font-medium text-primary">
+ {t("common:actions.done")}
+ </Text>
</Pressable>
</View>
</View>
diff --git a/apps/mobile/app/(app)/[workspace]/new-issue-picker/project.tsx b/apps/mobile/app/(app)/[workspace]/new-issue-picker/project.tsx
index 0799de7842..094fb2ad97 100644
--- a/apps/mobile/app/(app)/[workspace]/new-issue-picker/project.tsx
+++ b/apps/mobile/app/(app)/[workspace]/new-issue-picker/project.tsx
@@ -7,11 +7,13 @@ import { router } from "expo-router";
import { ProjectPickerBody } from "@/components/issue/pickers/project-picker-body";
import { useNewIssueDraftStore } from "@/data/stores/new-issue-draft-store";
import { useNativeSearchBar } from "@/lib/use-native-search-bar";
+import { useT } from "@/lib/i18n";
export default function NewIssueProjectPickerRoute() {
+ const { t } = useT("issues");
const project = useNewIssueDraftStore((s) => s.project);
const setProject = useNewIssueDraftStore((s) => s.setProject);
- const query = useNativeSearchBar("Search projects", { autoFocus: true });
+ const query = useNativeSearchBar(t("picker.search_projects"), { autoFocus: true });
return (
<ProjectPickerBody
diff --git a/apps/mobile/app/(app)/[workspace]/new-issue.tsx b/apps/mobile/app/(app)/[workspace]/new-issue.tsx
index 4ba9fc086a..5e81db8dfe 100644
--- a/apps/mobile/app/(app)/[workspace]/new-issue.tsx
+++ b/apps/mobile/app/(app)/[workspace]/new-issue.tsx
@@ -31,8 +31,10 @@ import { MOBILE_PLACEHOLDER_COLOR } from "@/components/ui/input-tokens";
import { useCreateIssue } from "@/data/mutations/issues";
import { useNewIssueDraftStore } from "@/data/stores/new-issue-draft-store";
import { useMentionInput } from "@/lib/use-mention-input";
+import { useT } from "@/lib/i18n";
export default function NewIssueModal() {
+ const { t } = useT("issues");
const [title, setTitle] = useState("");
const description = useMentionInput();
// Attribute chips (status / priority / assignee / due date / project)
@@ -78,8 +80,8 @@ export default function NewIssueModal() {
router.back();
} catch (err) {
Alert.alert(
- "Failed to create issue",
- err instanceof Error ? err.message : "Unknown error",
+ t("errors.create_failed"),
+ err instanceof Error ? err.message : t("common:states.error"),
);
}
}, [
@@ -91,6 +93,7 @@ export default function NewIssueModal() {
dueDate,
project,
createIssue,
+ t,
]);
const headerRight = useCallback(
@@ -119,7 +122,7 @@ export default function NewIssueModal() {
<TextInput
value={title}
onChangeText={setTitle}
- placeholder="Issue title"
+ placeholder={t("new.title_placeholder")}
placeholderTextColor={MOBILE_PLACEHOLDER_COLOR}
className="text-2xl font-semibold text-foreground py-2"
autoFocus
diff --git a/apps/mobile/app/(app)/[workspace]/project/[id].tsx b/apps/mobile/app/(app)/[workspace]/project/[id].tsx
index 67c0c612d7..6211ff8ac3 100644
--- a/apps/mobile/app/(app)/[workspace]/project/[id].tsx
+++ b/apps/mobile/app/(app)/[workspace]/project/[id].tsx
@@ -44,6 +44,7 @@ import { useCreatePin, useDeletePin } from "@/data/mutations/pins";
import { useAuthStore } from "@/data/auth-store";
import { useProjectRealtime } from "@/data/realtime/use-project-realtime";
import { useWorkspaceStore } from "@/data/workspace-store";
+import { useT } from "@/lib/i18n";
export default function ProjectDetail() {
const { id } = useLocalSearchParams<{ id: string }>();
@@ -83,17 +84,27 @@ export default function ProjectDetail() {
);
const createPin = useCreatePin();
const deletePin = useDeletePin();
+ const { t } = useT("projects");
const onPressMore = () => {
if (!project) return;
const wsUrl = process.env.EXPO_PUBLIC_WEB_URL;
- const options = [
- "Cancel",
- isPinned ? "Unpin" : "Pin",
- "Edit details",
- ...(wsUrl ? ["Open on web"] : []),
- "Delete",
- ];
+ const actions = ["cancel", isPinned ? "unpin" : "pin", "edit"];
+ if (wsUrl) actions.push("open_web");
+ actions.push("delete");
+ const options = actions.map((action) =>
+ action === "cancel"
+ ? t("common:actions.cancel")
+ : action === "pin"
+ ? t("menu.pin")
+ : action === "unpin"
+ ? t("menu.unpin")
+ : action === "edit"
+ ? t("menu.edit_details")
+ : action === "open_web"
+ ? t("menu.open_web")
+ : t("common:actions.delete"),
+ );
const destructiveIndex = options.length - 1;
ActionSheetIOS.showActionSheetWithOptions(
{
@@ -102,20 +113,20 @@ export default function ProjectDetail() {
destructiveButtonIndex: destructiveIndex,
},
(i) => {
- const label = options[i];
- if (label === "Pin") {
+ const action = actions[i];
+ if (action === "pin") {
createPin.mutate({ item_type: "project", item_id: project.id });
return;
}
- if (label === "Unpin") {
+ if (action === "unpin") {
deletePin.mutate({ itemType: "project", itemId: project.id });
return;
}
- if (label === "Edit details") {
+ if (action === "edit") {
if (wsSlug) router.push(`/${wsSlug}/project/${id}/edit`);
return;
}
- if (label === "Open on web" && wsUrl) {
+ if (action === "open_web" && wsUrl) {
Linking.openURL(`${wsUrl}/${wsSlug}/projects/${id}`);
return;
}
@@ -128,12 +139,12 @@ export default function ProjectDetail() {
const onDelete = () => {
Alert.alert(
- "Delete project?",
- "This cannot be undone. Issues in this project will become unassigned from any project.",
+ t("delete.title"),
+ t("delete.message"),
[
- { text: "Cancel", style: "cancel" },
+ { text: t("common:actions.cancel"), style: "cancel" },
{
- text: "Delete",
+ text: t("common:actions.delete"),
style: "destructive",
onPress: () => {
deleteProject.mutate(undefined, {
@@ -149,14 +160,14 @@ export default function ProjectDetail() {
<SafeAreaView className="flex-1 bg-background" edges={["bottom"]}>
<Stack.Screen
options={{
- title: project?.title || "Project",
- headerBackTitle: "Back",
+ title: project?.title || t("navigation:routes.project"),
+ headerBackTitle: t("common:actions.back"),
headerRight: project
? () => (
<IconButton
name="ellipsis-horizontal"
onPress={onPressMore}
- accessibilityLabel="Project actions"
+ accessibilityLabel={t("menu.project_actions")}
/>
)
: undefined,
@@ -169,13 +180,15 @@ export default function ProjectDetail() {
) : detail.error || projectMissing ? (
<View className="flex-1 items-center justify-center px-6 gap-3">
<Text className="text-sm text-destructive text-center">
- Failed to load project:{" "}
- {detail.error instanceof Error
- ? detail.error.message
- : "not found"}
+ {t("errors.load_failed", {
+ message:
+ detail.error instanceof Error
+ ? detail.error.message
+ : "not found",
+ })}
</Text>
<Button variant="outline" onPress={() => detail.refetch()}>
- <Text>Retry</Text>
+ <Text>{t("common:actions.retry")}</Text>
</Button>
</View>
) : (
diff --git a/apps/mobile/app/(app)/[workspace]/project/[id]/add-resource.tsx b/apps/mobile/app/(app)/[workspace]/project/[id]/add-resource.tsx
index c447a62a1e..b946814a3d 100644
--- a/apps/mobile/app/(app)/[workspace]/project/[id]/add-resource.tsx
+++ b/apps/mobile/app/(app)/[workspace]/project/[id]/add-resource.tsx
@@ -25,12 +25,14 @@ import {
import { Text } from "@/components/ui/text";
import { TextField } from "@/components/ui/text-field";
import { useCreateProjectResource } from "@/data/mutations/projects";
+import { i18n, useT } from "@/lib/i18n";
const GITHUB_PATTERN = /^https:\/\/github\.com\/[\w.-]+\/[\w.-]+(\/|$)/i;
export default function AddResourceRoute() {
const { id } = useLocalSearchParams<{ id: string }>();
const createResource = useCreateProjectResource(id);
+ const { t } = useT("issues");
const [url, setUrl] = useState("");
const [ref, setRef] = useState("");
@@ -71,19 +73,19 @@ export default function AddResourceRoute() {
onSuccess: () => router.back(),
onError: (err) => {
Alert.alert(
- "Failed to attach resource",
- err instanceof Error ? err.message : "Unknown error",
+ t("resources.failed"),
+ err instanceof Error ? err.message : t("resources.error"),
);
},
},
);
- }, [valid, submitting, createResource, url, ref, label]);
+ }, [valid, submitting, createResource, url, ref, label, t]);
return (
<View className="flex-1">
<View className="flex-row items-center justify-between px-4 pt-4 pb-2">
<Text className="text-base font-semibold text-foreground">
- Attach repository
+ {t("resources.title")}
</Text>
<Pressable
onPress={onSubmit}
@@ -94,13 +96,15 @@ export default function AddResourceRoute() {
}`}
>
<Text className="text-sm font-semibold text-primary">
- {submitting ? "Attaching…" : "Attach"}
+ {submitting ? t("resources.attaching") : t("resources.attach")}
</Text>
</Pressable>
</View>
<View className="px-4 pt-4 gap-4">
<View className="gap-1">
- <Text className="text-xs text-muted-foreground">Repository URL</Text>
+ <Text className="text-xs text-muted-foreground">
+ {t("resources.url")}
+ </Text>
<TextField
value={url}
onChangeText={onUrlChange}
@@ -113,7 +117,7 @@ export default function AddResourceRoute() {
</View>
<View className="gap-1">
<Text className="text-xs text-muted-foreground">
- Starting branch (optional)
+ {t("resources.branch")}
</Text>
<TextField
value={ref}
@@ -125,13 +129,12 @@ export default function AddResourceRoute() {
<Text
className={`text-xs ${refMessage === null ? "text-muted-foreground" : "text-destructive"}`}
>
- {refMessage ??
- "Tasks start from this branch and open their pull requests against it. Leave empty to use the repository's default branch."}
+ {refMessage ?? t("resources.branch_hint")}
</Text>
</View>
<View className="gap-1">
<Text className="text-xs text-muted-foreground">
- Label (optional)
+ {t("resources.label")}
</Text>
<TextField
value={label}
@@ -153,17 +156,18 @@ export default function AddResourceRoute() {
* makes it wrong here is that this field names a branch to deliver back to.
*/
function refErrorMessage(value: string): string | null {
+ const t = i18n.t.bind(i18n);
if (looksLikeCommitSha(value)) {
- return "That's a commit, not a branch. Tasks deliver back to the branch they start from — for a one-off revision, pass --ref to multica repo checkout.";
+ return t("issues:resources.commit");
}
const validation = validateGitRef(value);
if (validation.ok) return null;
switch (validation.reason) {
case "too_long":
- return "Use at most 255 characters.";
+ return t("issues:resources.too_long");
case "invalid_characters":
- return "A branch name can't contain spaces or any of ~ ^ : ? * [ \\";
+ return t("issues:resources.invalid_characters");
default:
- return "Not a valid branch name.";
+ return t("issues:resources.invalid");
}
}
diff --git a/apps/mobile/app/(app)/[workspace]/project/[id]/edit.tsx b/apps/mobile/app/(app)/[workspace]/project/[id]/edit.tsx
index 1190a23207..b6587bcdd4 100644
--- a/apps/mobile/app/(app)/[workspace]/project/[id]/edit.tsx
+++ b/apps/mobile/app/(app)/[workspace]/project/[id]/edit.tsx
@@ -27,10 +27,12 @@ import {
import { projectDetailOptions } from "@/data/queries/projects";
import { useUpdateProject } from "@/data/mutations/projects";
import { useWorkspaceStore } from "@/data/workspace-store";
+import { useT } from "@/lib/i18n";
export default function EditProject() {
const { id } = useLocalSearchParams<{ id: string }>();
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
+ const { t } = useT("projects");
const detail = useQuery(projectDetailOptions(wsId, id));
const update = useUpdateProject(id);
@@ -68,18 +70,18 @@ export default function EditProject() {
return;
}
Alert.alert(
- "Discard changes?",
- "Your edits to this project will be lost.",
+ t("form.discard_title"),
+ t("form.discard_message"),
[
- { text: "Keep editing", style: "cancel" },
+ { text: t("form.keep_editing"), style: "cancel" },
{
- text: "Discard",
+ text: t("common:actions.discard"),
style: "destructive",
onPress: () => router.back(),
},
],
);
- }, [dirty]);
+ }, [dirty, t]);
const onSave = useCallback(() => {
if (!canSave) return;
@@ -92,20 +94,20 @@ export default function EditProject() {
onSuccess: () => router.back(),
onError: (err) => {
Alert.alert(
- "Failed to save",
- err instanceof Error ? err.message : "Unknown error",
+ t("form.save_failed_edit"),
+ err instanceof Error ? err.message : t("common:states.error"),
);
},
});
- }, [canSave, title, description, icon, update]);
+ }, [canSave, title, description, icon, update, t]);
const headerLeft = useCallback(() => {
return (
<Pressable onPress={onCancel} className="px-1 py-1">
- <Text className="text-base text-brand">Cancel</Text>
+ <Text className="text-base text-brand">{t("common:actions.cancel")}</Text>
</Pressable>
);
- }, [onCancel]);
+ }, [onCancel, t]);
const headerRight = useCallback(() => {
return (
@@ -115,11 +117,11 @@ export default function EditProject() {
className={canSave ? "px-1 py-1" : "px-1 py-1 opacity-40"}
>
<Text className="text-base text-brand font-semibold">
- {update.isPending ? "Saving…" : "Save"}
+ {update.isPending ? t("actions.saving") : t("common:actions.save")}
</Text>
</Pressable>
);
- }, [canSave, onSave, update.isPending]);
+ }, [canSave, onSave, update.isPending, t]);
return (
<>
@@ -134,10 +136,12 @@ export default function EditProject() {
keyboardShouldPersistTaps="handled"
>
{!detail.data ? (
- <Text className="text-sm text-muted-foreground">Loading…</Text>
+ <Text className="text-sm text-muted-foreground">
+ {t("common:states.loading")}
+ </Text>
) : (
<>
- <Field label="Icon (emoji)">
+ <Field label={t("form.icon_emoji")}>
<TextInput
value={icon}
onChangeText={(v) => {
@@ -153,11 +157,11 @@ export default function EditProject() {
/>
</Field>
- <Field label="Title">
+ <Field label={t("form.title")}>
<TextInput
value={title}
onChangeText={setTitle}
- placeholder="Project title"
+ placeholder={t("form.title_placeholder")}
placeholderTextColor={MOBILE_PLACEHOLDER_COLOR}
className="text-base text-foreground bg-secondary/50 rounded-md px-3 py-2"
autoFocus={!detail.data?.title}
@@ -165,11 +169,11 @@ export default function EditProject() {
/>
</Field>
- <Field label="Description">
+ <Field label={t("form.description")}>
<AutosizeTextArea
value={description}
onChangeText={setDescription}
- placeholder="What is this project about?"
+ placeholder={t("form.description_placeholder")}
className="bg-secondary/50 rounded-md px-3 py-2"
minHeight={MIN_BODY_INPUT_HEIGHT_PX}
/>
@@ -198,4 +202,3 @@ function Field({
</View>
);
}
-
diff --git a/apps/mobile/app/(app)/[workspace]/project/[id]/picker/lead.tsx b/apps/mobile/app/(app)/[workspace]/project/[id]/picker/lead.tsx
index e99230d7a0..65f7aaab57 100644
--- a/apps/mobile/app/(app)/[workspace]/project/[id]/picker/lead.tsx
+++ b/apps/mobile/app/(app)/[workspace]/project/[id]/picker/lead.tsx
@@ -10,13 +10,15 @@ import { projectDetailOptions } from "@/data/queries/projects";
import { useUpdateProject } from "@/data/mutations/projects";
import { useWorkspaceStore } from "@/data/workspace-store";
import { useNativeSearchBar } from "@/lib/use-native-search-bar";
+import { useT } from "@/lib/i18n";
export default function ProjectLeadPickerRoute() {
+ const { t } = useT("issues");
const { id } = useLocalSearchParams<{ id: string }>();
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
const { data: project } = useQuery(projectDetailOptions(wsId, id));
const updateProject = useUpdateProject(id);
- const query = useNativeSearchBar("Search members or agents", {
+ const query = useNativeSearchBar(t("picker.search_members_agents"), {
autoFocus: true,
});
diff --git a/apps/mobile/app/(app)/[workspace]/project/new.tsx b/apps/mobile/app/(app)/[workspace]/project/new.tsx
index a5d745cb3b..f1d8339dbd 100644
--- a/apps/mobile/app/(app)/[workspace]/project/new.tsx
+++ b/apps/mobile/app/(app)/[workspace]/project/new.tsx
@@ -42,6 +42,7 @@ import {
import { useCreateProject } from "@/data/mutations/projects";
import { useNewProjectDraftStore } from "@/data/stores/new-project-draft-store";
import { useWorkspaceStore } from "@/data/workspace-store";
+import { useT } from "@/lib/i18n";
/**
* Typed map of new-project picker route pathnames. Keeps `router.push` calls
@@ -56,6 +57,7 @@ const NEW_PROJECT_PICKER_PATHNAMES = {
export default function NewProject() {
const wsSlug = useWorkspaceStore((s) => s.currentWorkspaceSlug);
+ const { t } = useT("projects");
const create = useCreateProject();
const [title, setTitle] = useState("");
@@ -92,12 +94,12 @@ export default function NewProject() {
return;
}
Alert.alert(
- "Discard project?",
- "Your draft will be lost.",
+ t("form.discard_title"),
+ t("form.discard_message"),
[
- { text: "Keep editing", style: "cancel" },
+ { text: t("form.keep_editing"), style: "cancel" },
{
- text: "Discard",
+ text: t("common:actions.discard"),
style: "destructive",
onPress: () => {
resetDraft();
@@ -106,7 +108,7 @@ export default function NewProject() {
},
],
);
- }, [dirty, resetDraft]);
+ }, [dirty, resetDraft, t]);
const onCreate = useCallback(() => {
if (!canCreate) return;
@@ -133,8 +135,8 @@ export default function NewProject() {
},
onError: (err) => {
Alert.alert(
- "Failed to create project",
- err instanceof Error ? err.message : "Unknown error",
+ t("form.save_failed"),
+ err instanceof Error ? err.message : t("common:states.error"),
);
},
},
@@ -149,15 +151,16 @@ export default function NewProject() {
priority,
wsSlug,
resetDraft,
+ t,
]);
const headerLeft = useCallback(() => {
return (
<Pressable onPress={onCancel} className="px-1 py-1">
- <Text className="text-base text-brand">Cancel</Text>
+ <Text className="text-base text-brand">{t("common:actions.cancel")}</Text>
</Pressable>
);
- }, [onCancel]);
+ }, [onCancel, t]);
const headerRight = useCallback(() => {
return (
@@ -167,11 +170,11 @@ export default function NewProject() {
className={canCreate ? "px-1 py-1" : "px-1 py-1 opacity-40"}
>
<Text className="text-base text-brand font-semibold">
- {create.isPending ? "Creating…" : "Create"}
+ {create.isPending ? t("actions.creating") : t("common:actions.create")}
</Text>
</Pressable>
);
- }, [canCreate, onCreate, create.isPending]);
+ }, [canCreate, onCreate, create.isPending, t]);
return (
<>
@@ -185,7 +188,7 @@ export default function NewProject() {
contentContainerClassName="px-4 pt-4 pb-6 gap-4"
keyboardShouldPersistTaps="handled"
>
- <Field label="Icon (emoji)">
+ <Field label={t("form.icon_emoji")}>
<TextInput
value={icon}
onChangeText={(v) => setIcon(v.slice(0, 4))}
@@ -196,11 +199,11 @@ export default function NewProject() {
/>
</Field>
- <Field label="Title">
+ <Field label={t("form.title")}>
<TextInput
value={title}
onChangeText={setTitle}
- placeholder="Project title"
+ placeholder={t("form.title_placeholder")}
placeholderTextColor={MOBILE_PLACEHOLDER_COLOR}
className="text-base text-foreground bg-secondary/50 rounded-md px-3 py-2"
autoFocus
@@ -208,11 +211,11 @@ export default function NewProject() {
/>
</Field>
- <Field label="Description">
+ <Field label={t("form.description")}>
<AutosizeTextArea
value={description}
onChangeText={setDescription}
- placeholder="What is this project about?"
+ placeholder={t("form.description_placeholder")}
className="bg-secondary/50 rounded-md px-3 py-2"
minHeight={MIN_BODY_INPUT_HEIGHT_PX}
/>
@@ -220,7 +223,7 @@ export default function NewProject() {
<View className="flex-row gap-2">
<View className="flex-1">
- <Field label="Status">
+ <Field label={t("properties.status")}>
<Pressable
onPress={() => openPicker("status")}
className="flex-row items-center gap-2 bg-secondary/50 rounded-md px-3 py-2.5"
@@ -233,7 +236,7 @@ export default function NewProject() {
</Field>
</View>
<View className="flex-1">
- <Field label="Priority">
+ <Field label={t("properties.priority")}>
<Pressable
onPress={() => openPicker("priority")}
className="flex-row items-center gap-2 bg-secondary/50 rounded-md px-3 py-2.5"
diff --git a/apps/mobile/app/(app)/[workspace]/search.tsx b/apps/mobile/app/(app)/[workspace]/search.tsx
index 9e68088575..4b976102dc 100644
--- a/apps/mobile/app/(app)/[workspace]/search.tsx
+++ b/apps/mobile/app/(app)/[workspace]/search.tsx
@@ -40,6 +40,7 @@ import { ProjectIcon } from "@/components/ui/project-icon";
import { ProjectStatusIcon } from "@/components/ui/project-status-icon";
import { api } from "@/data/api";
import { useWorkspaceStore } from "@/data/workspace-store";
+import { useT } from "@/lib/i18n";
import {
selectViewedIssueIds,
useViewedIssuesStore,
@@ -55,6 +56,15 @@ const ISSUE_LIMIT = 20;
const PROJECT_LIMIT = 10;
const RECENT_LIMIT = 5;
+// `buildSearchRows` stays pure; it supplies stable section identities and the
+// localized render owns the label lookup.
+const SEARCH_HEADER_LABELS: Record<string, string> = {
+ "h-recent": "navigation:routes.recent",
+ "h-projects": "navigation:routes.projects",
+ "h-issues": "navigation:routes.issues",
+ "h-cancelled": "issues:status.cancelled",
+};
+
// =====================================================
// HighlightText — mobile port of web's HighlightText
// =====================================================
@@ -308,6 +318,7 @@ const EMPTY_RESULTS: SearchResultsState = { issues: [], projects: [] };
export default function SearchModal() {
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
const slug = useWorkspaceStore((s) => s.currentWorkspaceSlug);
+ const { t } = useT("issues");
const [query, setQuery] = useState("");
const [results, setResults] = useState<SearchResultsState>(EMPTY_RESULTS);
@@ -419,7 +430,7 @@ export default function SearchModal() {
case "header":
return (
<Text className="px-4 pt-4 pb-1 text-xs font-medium text-muted-foreground uppercase">
- {item.title}
+ {t(SEARCH_HEADER_LABELS[item.key] ?? item.title)}
</Text>
);
case "issue":
@@ -430,7 +441,7 @@ export default function SearchModal() {
return <RecentRow item={item.issue} slug={slug} />;
}
},
- [slug],
+ [slug, t],
);
return (
@@ -445,7 +456,7 @@ export default function SearchModal() {
<TextInput
value={query}
onChangeText={handleChange}
- placeholder="Search issues and projects"
+ placeholder={t("list.search_placeholder")}
placeholderTextColor="#a1a1aa"
autoFocus
autoCorrect={false}
diff --git a/apps/mobile/app/(app)/[workspace]/switch-workspace.tsx b/apps/mobile/app/(app)/[workspace]/switch-workspace.tsx
index 26a01fcde6..bbc9ed9147 100644
--- a/apps/mobile/app/(app)/[workspace]/switch-workspace.tsx
+++ b/apps/mobile/app/(app)/[workspace]/switch-workspace.tsx
@@ -35,23 +35,25 @@ import { workspaceListOptions } from "@/data/queries/workspaces";
import { useWorkspaceStore } from "@/data/workspace-store";
import { useColorScheme } from "@/lib/use-color-scheme";
import { THEME } from "@/lib/theme";
+import { useT } from "@/lib/i18n";
import { cn } from "@/lib/utils";
export default function SwitchWorkspaceRoute() {
const activeSlug = useWorkspaceStore((s) => s.currentWorkspaceSlug);
const { colorScheme } = useColorScheme();
- const t = THEME[colorScheme];
+ const theme = THEME[colorScheme];
const { data, isLoading } = useQuery(workspaceListOptions());
+ const { t } = useT("workspace");
const onSelect = (ws: Workspace) => {
if (ws.slug === activeSlug) return;
Alert.alert(
- "Switch workspace",
- `Switch to "${ws.name}"?`,
+ t("switch.title"),
+ t("switch.message", { name: ws.name }),
[
- { text: "Cancel", style: "cancel" },
+ { text: t("common:actions.cancel"), style: "cancel" },
{
- text: "Switch",
+ text: t("switch.confirm"),
onPress: () => {
router.dismiss();
router.replace(`/${ws.slug}/inbox`);
@@ -65,7 +67,7 @@ export default function SwitchWorkspaceRoute() {
<View className="flex-1">
<View className="px-4 pt-4 pb-3">
<Text className="text-base font-semibold text-foreground">
- Switch workspace
+ {t("switch.title")}
</Text>
</View>
{isLoading ? (
@@ -80,7 +82,7 @@ export default function SwitchWorkspaceRoute() {
workspace={ws}
active={ws.slug === activeSlug}
onPress={() => onSelect(ws)}
- iconTint={t.foreground}
+ iconTint={theme.foreground}
/>
))}
</ScrollView>
@@ -100,14 +102,15 @@ function WorkspaceRow({
onPress: () => void;
iconTint: string;
}) {
+ const { t } = useT("workspace");
return (
<Pressable
onPress={onPress}
disabled={active}
accessibilityLabel={
active
- ? `${workspace.name}, current workspace`
- : `Switch to ${workspace.name}`
+ ? t("switch.current_a11y", { name: workspace.name })
+ : t("switch.switch_a11y", { name: workspace.name })
}
className={cn(
"flex-row items-center gap-3 px-4 py-3 active:bg-secondary",
diff --git a/apps/mobile/app/(app)/select-workspace.tsx b/apps/mobile/app/(app)/select-workspace.tsx
index d1f77ef388..7dc851b261 100644
--- a/apps/mobile/app/(app)/select-workspace.tsx
+++ b/apps/mobile/app/(app)/select-workspace.tsx
@@ -8,11 +8,13 @@ import { CardPressable } from "@/components/ui/card";
import { workspaceListOptions } from "@/data/queries/workspaces";
import { useAuthStore } from "@/data/auth-store";
import { useWorkspaceStore } from "@/data/workspace-store";
+import { useT } from "@/lib/i18n";
export default function SelectWorkspace() {
const user = useAuthStore((s) => s.user);
const logout = useAuthStore((s) => s.logout);
const setCurrentWorkspace = useWorkspaceStore((s) => s.setCurrentWorkspace);
+ const { t } = useT("workspace");
const { data, isLoading, error, refetch } = useQuery(workspaceListOptions());
const onSelect = async (id: string, slug: string) => {
@@ -25,14 +27,14 @@ export default function SelectWorkspace() {
<ScrollView contentContainerClassName="px-6 py-6 gap-6">
<View className="gap-1">
<Text className="text-xs uppercase tracking-wider text-muted-foreground">
- Signed in as
+ {t("auth.signed_in_as")}
</Text>
<Text className="text-base text-foreground">{user?.email}</Text>
</View>
<View className="gap-3">
<Text className="text-2xl font-semibold text-foreground">
- Select a workspace
+ {t("title")}
</Text>
{isLoading ? (
@@ -42,17 +44,18 @@ export default function SelectWorkspace() {
) : error ? (
<View className="gap-3">
<Text className="text-sm text-destructive">
- Failed to load workspaces:{" "}
- {error instanceof Error ? error.message : "unknown error"}
+ {t("errors.load_failed", {
+ message:
+ error instanceof Error ? error.message : "unknown",
+ })}
</Text>
<Button variant="outline" onPress={() => refetch()}>
- <Text>Retry</Text>
+ <Text>{t("common:actions.retry")}</Text>
</Button>
</View>
) : !data || data.length === 0 ? (
<Text className="text-sm text-muted-foreground">
- You don&apos;t belong to any workspaces yet. Contact your workspace
- admin to be invited.
+ {t("empty")}
</Text>
) : (
<View className="gap-3">
@@ -80,7 +83,7 @@ export default function SelectWorkspace() {
<View className="pt-4 border-t border-border">
<Button variant="outline" onPress={() => logout()}>
- <Text>Sign out</Text>
+ <Text>{t("actions.sign_out")}</Text>
</Button>
</View>
</ScrollView>
diff --git a/apps/mobile/app/(auth)/login.tsx b/apps/mobile/app/(auth)/login.tsx
index 95b007f9d5..d6c7d0e3a5 100644
--- a/apps/mobile/app/(auth)/login.tsx
+++ b/apps/mobile/app/(auth)/login.tsx
@@ -8,9 +8,11 @@ import { TextField } from "@/components/ui/text-field";
import { Button } from "@/components/ui/button";
import { MulticaLogo } from "@/components/brand/multica-logo";
import { useAuthStore } from "@/data/auth-store";
+import { i18n, useT } from "@/lib/i18n";
import { mapAuthError } from "@/lib/auth-error";
export default function Login() {
+ const { t } = useT("auth");
const sendCode = useAuthStore((s) => s.sendCode);
const [email, setEmail] = useState("");
const [submitting, setSubmitting] = useState(false);
@@ -27,7 +29,7 @@ export default function Login() {
router.push({ pathname: "/verify", params: { email: trimmed } });
} catch (err) {
void Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error);
- setError(mapAuthError(err, "Couldn't send the code. Try again."));
+ setError(mapAuthError(err, t("login.send_failed"), (key) => i18n.t(`auth:${key}`)));
} finally {
setSubmitting(false);
}
@@ -44,10 +46,10 @@ export default function Login() {
<MulticaLogo size={32} />
<View className="gap-1 items-center">
<Text className="text-2xl font-semibold text-foreground">
- Sign in to Multica
+ {t("login.title")}
</Text>
<Text className="text-sm text-muted-foreground text-center">
- Enter your email and we&apos;ll send you a verification code.
+ {t("login.subtitle")}
</Text>
</View>
</View>
@@ -58,7 +60,7 @@ export default function Login() {
autoComplete="email"
autoFocus
keyboardType="email-address"
- placeholder="[email protected]"
+ placeholder={t("login.email_placeholder")}
value={email}
onChangeText={setEmail}
onSubmitEditing={onSubmit}
@@ -76,7 +78,7 @@ export default function Login() {
disabled={submitting || !email.trim()}
onPress={onSubmit}
>
- <Text>{submitting ? "Sending..." : "Send code"}</Text>
+ <Text>{submitting ? t("login.sending") : t("login.send_code")}</Text>
</Button>
</View>
</KeyboardAvoidingView>
diff --git a/apps/mobile/app/(auth)/verify.tsx b/apps/mobile/app/(auth)/verify.tsx
index 6ac2cf01ea..c0f19d04fa 100644
--- a/apps/mobile/app/(auth)/verify.tsx
+++ b/apps/mobile/app/(auth)/verify.tsx
@@ -8,6 +8,7 @@ import { OtpInput, type OtpInputRef } from "@/components/ui/otp-input";
import { Button } from "@/components/ui/button";
import { MulticaLogo } from "@/components/brand/multica-logo";
import { useAuthStore } from "@/data/auth-store";
+import { i18n, useT } from "@/lib/i18n";
import { mapAuthError } from "@/lib/auth-error";
const CODE_LENGTH = 6;
@@ -23,6 +24,7 @@ export default function Verify() {
const [cooldown, setCooldown] = useState(RESEND_COOLDOWN_SECONDS);
const [resending, setResending] = useState(false);
const otpRef = useRef<OtpInputRef>(null);
+ const { t } = useT("auth");
useEffect(() => {
if (cooldown <= 0) return;
@@ -43,7 +45,7 @@ export default function Verify() {
router.replace("/");
} catch (err) {
void Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error);
- setError(mapAuthError(err, "Couldn't verify the code. Try again."));
+ setError(mapAuthError(err, t("verify.verify_failed"), (key) => i18n.t(`auth:${key}`)));
setSubmitting(false);
otpRef.current?.clear();
setCode("");
@@ -62,7 +64,7 @@ export default function Verify() {
setCode("");
} catch (err) {
void Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error);
- setError(mapAuthError(err, "Couldn't resend the code. Try again."));
+ setError(mapAuthError(err, t("verify.resend_failed"), (key) => i18n.t(`auth:${key}`)));
} finally {
setResending(false);
}
@@ -79,10 +81,10 @@ export default function Verify() {
<MulticaLogo size={32} />
<View className="gap-1 items-center">
<Text className="text-2xl font-semibold text-foreground">
- Enter verification code
+ {t("verify.enter_title")}
</Text>
<Text className="text-sm text-muted-foreground text-center">
- We sent a 6-digit code to {email}
+ {t("verify.sent_to", { email })}
</Text>
</View>
</View>
@@ -108,7 +110,7 @@ export default function Verify() {
disabled={submitting || code.length < CODE_LENGTH}
onPress={() => submit(code)}
>
- <Text>{submitting ? "Verifying..." : "Verify"}</Text>
+ <Text>{submitting ? t("verify.verifying") : t("verify.verify")}</Text>
</Button>
<Pressable
@@ -124,10 +126,10 @@ export default function Verify() {
}
>
{resending
- ? "Sending..."
+ ? t("login.sending")
: cooldown > 0
- ? `Resend code in ${cooldown}s`
- : "Resend code"}
+ ? t("verify.resend_in", { count: cooldown })
+ : t("verify.resend")}
</Text>
</Pressable>
@@ -136,7 +138,7 @@ export default function Verify() {
disabled={submitting}
onPress={() => router.back()}
>
- <Text>Use a different email</Text>
+ <Text>{t("verify.change_email")}</Text>
</Button>
</View>
</View>
diff --git a/apps/mobile/app/_layout.tsx b/apps/mobile/app/_layout.tsx
index 0277ffc70f..bad1480a5a 100644
--- a/apps/mobile/app/_layout.tsx
+++ b/apps/mobile/app/_layout.tsx
@@ -19,6 +19,7 @@ import { SessionActivityBoundary } from "@/components/auth/session-activity-boun
import { LightboxProvider, prewarmHighlighter } from "@/lib/markdown";
import { NAV_THEME } from "@/lib/theme";
import { useColorScheme } from "@/lib/use-color-scheme";
+import { MobileI18nProvider } from "@/lib/i18n";
// Kick off Shiki highlighter init at module load — fires once per process,
// finishes before the user navigates to any screen with a code block. If
@@ -79,27 +80,29 @@ export default function RootLayout() {
const { colorScheme, isDarkColorScheme } = useColorScheme();
return (
<GestureHandlerRootView style={{ flex: 1 }}>
- <SafeAreaProvider>
- <KeyboardProvider>
- <QueryClientProvider client={queryClient}>
- <ThemeProvider value={NAV_THEME[colorScheme]}>
- <AuthInitializer>
- <SessionActivityBoundary>
- <LightboxProvider>
- <StatusBar style={isDarkColorScheme ? "light" : "dark"} />
- <Stack screenOptions={{ headerShown: false }}>
- <Stack.Screen name="index" />
- <Stack.Screen name="(auth)" />
- <Stack.Screen name="(app)" />
- </Stack>
- <PortalHost />
- </LightboxProvider>
- </SessionActivityBoundary>
- </AuthInitializer>
- </ThemeProvider>
- </QueryClientProvider>
- </KeyboardProvider>
- </SafeAreaProvider>
+ <MobileI18nProvider>
+ <SafeAreaProvider>
+ <KeyboardProvider>
+ <QueryClientProvider client={queryClient}>
+ <ThemeProvider value={NAV_THEME[colorScheme]}>
+ <AuthInitializer>
+ <SessionActivityBoundary>
+ <LightboxProvider>
+ <StatusBar style={isDarkColorScheme ? "light" : "dark"} />
+ <Stack screenOptions={{ headerShown: false }}>
+ <Stack.Screen name="index" />
+ <Stack.Screen name="(auth)" />
+ <Stack.Screen name="(app)" />
+ </Stack>
+ <PortalHost />
+ </LightboxProvider>
+ </SessionActivityBoundary>
+ </AuthInitializer>
+ </ThemeProvider>
+ </QueryClientProvider>
+ </KeyboardProvider>
+ </SafeAreaProvider>
+ </MobileI18nProvider>
</GestureHandlerRootView>
);
}
diff --git a/apps/mobile/components/chat/agent-picker-sheet.tsx b/apps/mobile/components/chat/agent-picker-sheet.tsx
index fe0d276f0b..554c90f72b 100644
--- a/apps/mobile/components/chat/agent-picker-sheet.tsx
+++ b/apps/mobile/components/chat/agent-picker-sheet.tsx
@@ -20,6 +20,7 @@ import { ActorAvatar } from "@/components/ui/actor-avatar";
import { cn } from "@/lib/utils";
import { isAgentRuntimeBound } from "@/lib/is-agent-runtime-bound";
import { continuousCorners } from "@/lib/radius";
+import { useT } from "@/lib/i18n";
interface Props {
visible: boolean;
@@ -36,6 +37,8 @@ export function AgentPickerSheet({
onPick,
onClose,
}: Props) {
+ const { t } = useT("chat");
+
return (
<Modal
visible={visible}
@@ -52,7 +55,7 @@ export function AgentPickerSheet({
>
<View className="px-4 py-3 border-b border-border">
<Text className="text-base font-semibold text-foreground">
- Choose an agent
+ {t("picker.title")}
</Text>
</View>
@@ -60,7 +63,7 @@ export function AgentPickerSheet({
{agents.length === 0 ? (
<View className="px-4 py-8">
<Text className="text-sm text-muted-foreground text-center">
- No agents available.
+ {t("picker.empty")}
</Text>
</View>
) : (
@@ -100,7 +103,7 @@ export function AgentPickerSheet({
</View>
{!runtimeBound ? (
<Text className="text-xs font-medium text-warning">
- Needs runtime
+ {t("picker.needs_runtime")}
</Text>
) : null}
{selected ? (
diff --git a/apps/mobile/components/chat/chat-composer.tsx b/apps/mobile/components/chat/chat-composer.tsx
index 994e4ce386..d3ddd5b80f 100644
--- a/apps/mobile/components/chat/chat-composer.tsx
+++ b/apps/mobile/components/chat/chat-composer.tsx
@@ -29,12 +29,12 @@
import { useCallback } from "react";
import { Pressable, View } from "react-native";
import Animated, { FadeIn, FadeOut } from "react-native-reanimated";
-import { Ionicons } from "@expo/vector-icons";
import * as Haptics from "expo-haptics";
import { MessageComposer } from "@/components/composer/message-composer";
import { useWorkspaceStore } from "@/data/workspace-store";
import { useColorScheme } from "@/lib/use-color-scheme";
import { THEME } from "@/lib/theme";
+import { useT } from "@/lib/i18n";
interface Props {
/** Current draft text (controlled). Empty string = no draft. */
@@ -72,6 +72,7 @@ export function ChatComposer({
disabledReason,
}: Props) {
const wsSlug = useWorkspaceStore((s) => s.currentWorkspaceSlug);
+ const { t } = useT("chat");
const onSubmit = useCallback(
async ({
@@ -104,13 +105,13 @@ export function ChatComposer({
pathname: "/[workspace]/mention-picker",
params: { workspace: wsSlug ?? "", mode: "chat" },
}}
- placeholder={sending ? "Agent is working…" : "Message…"}
+ placeholder={sending ? t("composer.working") : t("composer.message")}
pillLabel={
sending
- ? "Agent is working…"
+ ? t("composer.working")
: disabled
- ? (disabledReason ?? "Chat unavailable")
- : "Message…"
+ ? (disabledReason ?? t("composer.unavailable"))
+ : t("composer.message")
}
pillIcon="chatbubble-ellipses-outline"
disabled={disabled}
@@ -124,6 +125,7 @@ export function ChatComposer({
function StopButton({ onPress }: { onPress: () => void }) {
const { colorScheme } = useColorScheme();
+ const { t } = useT("chat");
const theme = THEME[colorScheme];
return (
<Animated.View
@@ -136,7 +138,7 @@ function StopButton({ onPress }: { onPress: () => void }) {
className="h-8 w-8 items-center justify-center rounded-full bg-foreground active:opacity-80"
hitSlop={12}
accessibilityRole="button"
- accessibilityLabel="Stop agent"
+ accessibilityLabel={t("composer.stop_agent")}
>
<View
style={{
diff --git a/apps/mobile/components/chat/chat-empty-state.tsx b/apps/mobile/components/chat/chat-empty-state.tsx
index e08b1b1d3c..43671e749d 100644
--- a/apps/mobile/components/chat/chat-empty-state.tsx
+++ b/apps/mobile/components/chat/chat-empty-state.tsx
@@ -19,22 +19,13 @@ import { View } from "react-native";
import type { Agent, AgentConversationStarter } from "@multica/core/types";
import { Text } from "@/components/ui/text";
import { Button } from "@/components/ui/button";
+import { useT } from "@/lib/i18n";
-const FALLBACK_CONVERSATION_STARTERS: AgentConversationStarter[] = [
- {
- label: "What can you help with?",
- prompt: "What are you best at helping with? Give me a concise overview.",
- },
- {
- label: "Suggest a first task",
- prompt: "Suggest three useful tasks I could delegate to you.",
- },
- {
- label: "Recommend an action",
- prompt:
- "Review what you know about my workspace and recommend a useful first action.",
- },
-];
+const FALLBACK_CONVERSATION_STARTER_KEYS = [
+ { labelKey: "empty.starter_help_label", promptKey: "empty.starter_help_prompt" },
+ { labelKey: "empty.starter_task_label", promptKey: "empty.starter_task_prompt" },
+ { labelKey: "empty.starter_action_label", promptKey: "empty.starter_action_prompt" },
+] as const;
interface Props {
hasSessions: boolean;
@@ -43,11 +34,20 @@ interface Props {
}
export function ChatEmptyState({ hasSessions, agent, onPickPrompt }: Props) {
- const title = agent ? `Hi, I'm ${agent.name}` : "Chat with your agents";
+ const { t } = useT("chat");
+ const title = agent
+ ? t("empty.greeting", { name: agent.name })
+ : t("empty.no_agent_title");
const configured = (agent?.conversation_starters ?? []).filter(
(item) => item.label.trim() && item.prompt.trim(),
);
- const starters = configured.length > 0 ? configured : FALLBACK_CONVERSATION_STARTERS;
+ const fallbackStarters: AgentConversationStarter[] = FALLBACK_CONVERSATION_STARTER_KEYS.map(
+ (starter) => ({
+ label: t(starter.labelKey),
+ prompt: t(starter.promptKey),
+ }),
+ );
+ const starters = configured.length > 0 ? configured : fallbackStarters;
return (
<View className="flex-1 items-center justify-center px-6 py-8 gap-5">
<View className="items-center gap-1">
@@ -61,7 +61,7 @@ export function ChatEmptyState({ hasSessions, agent, onPickPrompt }: Props) {
) : null}
{!hasSessions ? (
<Text className="text-sm text-muted-foreground text-center">
- Examples fill the composer without sending.
+ {t("empty.examples")}
</Text>
) : null}
</View>
diff --git a/apps/mobile/components/chat/chat-message-list.tsx b/apps/mobile/components/chat/chat-message-list.tsx
index 92bff06819..b78f459a96 100644
--- a/apps/mobile/components/chat/chat-message-list.tsx
+++ b/apps/mobile/components/chat/chat-message-list.tsx
@@ -58,7 +58,7 @@ import { taskMessagesOptions } from "@/data/queries/chat";
import { Text } from "@/components/ui/text";
import { Markdown } from "@/lib/markdown";
import { ImageSequenceProvider } from "@/lib/markdown/image-sequence";
-import { failureReasonLabel } from "@/lib/failure-reason-label";
+import { failureReasonKey } from "@/lib/failure-reason-label";
import { formatElapsedMs } from "@/lib/format-elapsed";
import { cn } from "@/lib/utils";
import { useChatSelectStore } from "@/data/chat-select-store";
@@ -75,6 +75,7 @@ import {
CollapsibleContent,
CollapsibleTrigger,
} from "@/components/ui/collapsible";
+import { useT } from "@/lib/i18n";
interface Props {
messages: ChatMessage[];
@@ -273,6 +274,7 @@ function MessageRow({
quickActionsDisabled: boolean;
}) {
const isUser = message.role === "user";
+ const { t } = useT("chat");
const isFailure = !!message.failure_reason;
const isSelecting = useChatSelectStore(
(s) => s.selectingId === message.id,
@@ -282,7 +284,7 @@ function MessageRow({
if (isFailure) {
return (
<FailureBubble
- reasonLabel={failureReasonLabel(message.failure_reason)}
+ reasonLabel={t(failureReasonKey(message.failure_reason))}
rawError={message.content}
elapsedMs={message.elapsed_ms ?? null}
isSelecting={isSelecting}
@@ -386,6 +388,7 @@ function AssistantRow({
// instead of an empty Markdown block; caption reads "Finished in" not
// "Replied in".
const isNoResponse = message.message_kind === "no_response";
+ const { t } = useT("chat");
const body = (
<View className="gap-1.5">
{timeline.length > 0 ? (
@@ -393,7 +396,7 @@ function AssistantRow({
) : null}
{isNoResponse ? (
<Text className="text-sm italic text-muted-foreground">
- The agent finished this turn without a text reply.
+ {t("no_response")}
</Text>
) : (
<Markdown
@@ -448,6 +451,7 @@ function QuickActions({
onSelect: (action: ChatQuickAction) => void | Promise<unknown>;
}) {
const [submitting, setSubmitting] = useState(false);
+ const { t } = useT("chat");
const blocked = disabled || submitting;
const handleSelect = async (action: ChatQuickAction) => {
@@ -466,7 +470,7 @@ function QuickActions({
return (
<View
className="flex-row flex-wrap gap-2 pt-0.5"
- accessibilityLabel="Suggested follow-ups"
+ accessibilityLabel={t("a11y.suggested_followups")}
>
{actions.slice(0, 3).map((action, index) => (
<Pressable
@@ -511,12 +515,13 @@ function ElapsedCaption({
variant: "replied" | "failed" | "finished";
elapsedMs: number;
}) {
+ const { t } = useT("chat");
const label =
variant === "replied"
- ? `Replied in ${formatElapsedMs(elapsedMs)}`
+ ? t("elapsed.replied", { time: formatElapsedMs(elapsedMs) })
: variant === "finished"
- ? `Finished in ${formatElapsedMs(elapsedMs)}`
- : `Failed after ${formatElapsedMs(elapsedMs)}`;
+ ? t("elapsed.finished", { time: formatElapsedMs(elapsedMs) })
+ : t("elapsed.failed", { time: formatElapsedMs(elapsedMs) });
return (
<Text className="text-xs text-muted-foreground/80 mt-1">{label}</Text>
);
@@ -536,6 +541,7 @@ function FailureBubble({
longPress: ReturnType<typeof useChatMessageLongPress>;
}) {
const hasRawError = rawError.trim().length > 0;
+ const { t } = useT("chat");
// B6: pass `selectable={isSelecting}` rather than hard-coding
// `selectable` — otherwise UIKit's text-selection gesture pre-empts
@@ -561,7 +567,7 @@ function FailureBubble({
<CollapsibleTrigger asChild>
<View
accessibilityRole="button"
- accessibilityLabel="Show error details"
+ accessibilityLabel={t("a11y.show_error_details")}
className="mt-1 flex-row items-center gap-1 active:opacity-70"
>
<Ionicons
@@ -570,7 +576,7 @@ function FailureBubble({
color="#71717a"
/>
<Text className="text-xs text-muted-foreground">
- Show details
+ {t("details.show")}
</Text>
</View>
</CollapsibleTrigger>
diff --git a/apps/mobile/components/chat/chat-session-actions.tsx b/apps/mobile/components/chat/chat-session-actions.tsx
index 730b9deee1..4e055a1a73 100644
--- a/apps/mobile/components/chat/chat-session-actions.tsx
+++ b/apps/mobile/components/chat/chat-session-actions.tsx
@@ -8,6 +8,7 @@
* rest of the header toolbar.
*/
import { IconButton } from "@/components/ui/icon-button";
+import { useT } from "@/lib/i18n";
interface Props {
showMore: boolean;
@@ -20,20 +21,21 @@ export function ChatSessionActions({
onMorePress,
onNewPress,
}: Props) {
+ const { t } = useT("chat");
return (
<>
{showMore ? (
<IconButton
name="ellipsis-horizontal"
onPress={onMorePress}
- accessibilityLabel="Session actions"
+ accessibilityLabel={t("a11y.session_actions")}
/>
) : null}
<IconButton
name="add"
iconSize={24}
onPress={onNewPress}
- accessibilityLabel="New chat"
+ accessibilityLabel={t("a11y.new_chat")}
/>
</>
);
diff --git a/apps/mobile/components/chat/chat-timeline.tsx b/apps/mobile/components/chat/chat-timeline.tsx
index c001d8de45..bf24d7822e 100644
--- a/apps/mobile/components/chat/chat-timeline.tsx
+++ b/apps/mobile/components/chat/chat-timeline.tsx
@@ -29,6 +29,7 @@ import {
CollapsibleContent,
CollapsibleTrigger,
} from "@/components/ui/collapsible";
+import { useT } from "@/lib/i18n";
interface Props {
items: TaskMessagePayload[];
@@ -39,6 +40,7 @@ interface Props {
export function ChatTimeline({ items, isStreaming = false }: Props) {
const processSteps = items.filter((i) => i.type !== "text");
+ const { t } = useT("chat");
if (processSteps.length === 0) return null;
return (
@@ -46,15 +48,15 @@ export function ChatTimeline({ items, isStreaming = false }: Props) {
<CollapsibleTrigger asChild>
<View
accessibilityRole="button"
- accessibilityLabel={`${processSteps.length} step${processSteps.length === 1 ? "" : "s"}`}
+ accessibilityLabel={t("timeline.steps_count", {
+ count: processSteps.length,
+ })}
className="flex-row items-center gap-1 active:opacity-70"
>
<Ionicons name="chevron-forward" size={12} color="#71717a" />
{isStreaming ? <StreamingDot /> : null}
<Text className="text-xs text-muted-foreground">
- {processSteps.length === 1
- ? "1 step"
- : `${processSteps.length} steps`}
+ {t("timeline.steps_count", { count: processSteps.length })}
</Text>
</View>
</CollapsibleTrigger>
@@ -124,6 +126,7 @@ function ThinkingRow({ item }: { item: TaskMessagePayload }) {
function ToolCallRow({ item }: { item: TaskMessagePayload }) {
const summary = getToolSummary(item);
+ const { t } = useT("chat");
const hasInput = !!item.input && Object.keys(item.input).length > 0;
// If the call has no expandable input, render a non-interactive row —
// wrapping a static row in Collapsible adds a wasted tap target.
@@ -132,7 +135,7 @@ function ToolCallRow({ item }: { item: TaskMessagePayload }) {
<View className="py-0.5 flex-row items-center gap-1.5">
<View style={{ width: 12 }} />
<Text className="text-xs font-medium text-foreground">
- {item.tool ?? "tool"}
+ {item.tool ?? t("timeline.tool")}
</Text>
{summary ? (
<Text
@@ -151,7 +154,7 @@ function ToolCallRow({ item }: { item: TaskMessagePayload }) {
<View className="py-0.5 flex-row items-center gap-1.5 active:opacity-70">
<Ionicons name="chevron-forward" size={12} color="#71717a" />
<Text className="text-xs font-medium text-foreground">
- {item.tool ?? "tool"}
+ {item.tool ?? t("timeline.tool")}
</Text>
{summary ? (
<Text
@@ -176,9 +179,12 @@ function ToolCallRow({ item }: { item: TaskMessagePayload }) {
function ToolResultRow({ item }: { item: TaskMessagePayload }) {
const output = item.output ?? "";
+ const { t } = useT("chat");
if (!output) return null;
const preview = output.length > 80 ? `${output.slice(0, 80)}…` : output;
- const prefix = item.tool ? `${item.tool} result: ` : "result: ";
+ const prefix = item.tool
+ ? t("timeline.tool_result_named", { tool: item.tool })
+ : t("timeline.tool_result_unnamed");
return (
<Collapsible>
<CollapsibleTrigger asChild>
@@ -202,7 +208,7 @@ function ToolResultRow({ item }: { item: TaskMessagePayload }) {
<View className="ml-4 mt-1 rounded-xs bg-muted/40 px-2 py-1.5">
<Text className="text-xs text-muted-foreground">
{output.length > 4000
- ? `${output.slice(0, 4000)}\n…(truncated)`
+ ? `${output.slice(0, 4000)}\n${t("timeline.truncated")}`
: output}
</Text>
</View>
@@ -212,6 +218,7 @@ function ToolResultRow({ item }: { item: TaskMessagePayload }) {
}
function ErrorRow({ item }: { item: TaskMessagePayload }) {
+ const { t } = useT("chat");
return (
<View className="py-0.5 flex-row items-start gap-1.5">
<Ionicons
@@ -221,7 +228,7 @@ function ErrorRow({ item }: { item: TaskMessagePayload }) {
style={{ marginTop: 2 }}
/>
<Text className="flex-1 text-xs text-destructive" numberOfLines={3}>
- {item.content}
+ {item.content || t("timeline.error")}
</Text>
</View>
);
diff --git a/apps/mobile/components/chat/chat-title-button.tsx b/apps/mobile/components/chat/chat-title-button.tsx
index 3d938dd5a4..b7e7a766b3 100644
--- a/apps/mobile/components/chat/chat-title-button.tsx
+++ b/apps/mobile/components/chat/chat-title-button.tsx
@@ -8,7 +8,7 @@ import { Pressable, View } from "react-native";
import type { Agent, ChatSession } from "@multica/core/types";
import { Text } from "@/components/ui/text";
import { ActorAvatar } from "@/components/ui/actor-avatar";
-import { chatSessionDisplayTitle } from "@/lib/chat-session-title";
+import { useT } from "@/lib/i18n";
interface Props {
currentSession: ChatSession | null;
@@ -21,8 +21,9 @@ export function ChatTitleButton({
currentAgent,
onPress,
}: Props) {
- const agentName = currentAgent?.name ?? "Chat";
- const subtitle = chatSessionDisplayTitle(currentSession?.title);
+ const { t } = useT("chat");
+ const agentName = currentAgent?.name ?? t("title.fallback");
+ const subtitle = currentSession?.title || t("sessions.new_chat");
return (
<Pressable
@@ -30,7 +31,7 @@ export function ChatTitleButton({
hitSlop={4}
className="flex-row items-center gap-2 px-2 py-1 rounded-lg active:bg-secondary"
accessibilityRole="button"
- accessibilityLabel="Sessions and agent picker"
+ accessibilityLabel={t("a11y.sessions_agent_picker")}
>
<ActorAvatar
type={currentAgent ? "agent" : null}
diff --git a/apps/mobile/components/chat/message-long-press.tsx b/apps/mobile/components/chat/message-long-press.tsx
index 7818cf74db..d2e4081b6d 100644
--- a/apps/mobile/components/chat/message-long-press.tsx
+++ b/apps/mobile/components/chat/message-long-press.tsx
@@ -21,11 +21,13 @@ import * as Clipboard from "expo-clipboard";
import * as Haptics from "expo-haptics";
import type { ChatMessage } from "@multica/core/types";
import { useChatSelectStore } from "@/data/chat-select-store";
+import { useT } from "@/lib/i18n";
export function useChatMessageLongPress(
message: ChatMessage,
): { onLongPress: () => void; isPressed: boolean } {
const [isPressed, setIsPressed] = useState(false);
+ const { t } = useT("issues");
const onLongPress = useCallback(() => {
const hasContent = !!message.content;
@@ -46,10 +48,10 @@ export function useChatMessageLongPress(
};
if (hasContent) {
- push("Copy", { kind: "copy" });
- push("Select Text", { kind: "select" });
+ push(t("comments.copy"), { kind: "copy" });
+ push(t("comments.select_text"), { kind: "select" });
}
- push("Cancel", { kind: "cancel" });
+ push(t("common:actions.cancel"), { kind: "cancel" });
const cancelButtonIndex = options.length - 1;
@@ -75,7 +77,7 @@ export function useChatMessageLongPress(
}
},
);
- }, [message]);
+ }, [message, t]);
return { onLongPress, isPressed };
}
diff --git a/apps/mobile/components/chat/no-agent-banner.tsx b/apps/mobile/components/chat/no-agent-banner.tsx
index e7d89e0c22..aa9f6b577c 100644
--- a/apps/mobile/components/chat/no-agent-banner.tsx
+++ b/apps/mobile/components/chat/no-agent-banner.tsx
@@ -10,9 +10,11 @@ import { Pressable } from "react-native";
import { router } from "expo-router";
import { Text } from "@/components/ui/text";
import { useWorkspaceStore } from "@/data/workspace-store";
+import { useT } from "@/lib/i18n";
export function NoAgentBanner() {
const wsSlug = useWorkspaceStore((s) => s.currentWorkspaceSlug);
+ const { t } = useT("chat");
const handlePress = () => {
if (!wsSlug) return;
@@ -24,13 +26,13 @@ export function NoAgentBanner() {
onPress={handlePress}
className="mx-3 mt-2 mb-1 rounded-xl border border-border bg-secondary/50 px-3 py-2 active:opacity-80"
accessibilityRole="button"
- accessibilityLabel="No agents available, open agents settings"
+ accessibilityLabel={t("a11y.no_agents")}
>
<Text className="text-sm font-medium text-foreground">
- No agents available
+ {t("banners.no_agent")}
</Text>
<Text className="text-xs text-muted-foreground mt-0.5">
- Add or enable an agent in More → Agents to start chatting.
+ {t("banners.no_agent_action")}
</Text>
</Pressable>
);
diff --git a/apps/mobile/components/chat/offline-banner.tsx b/apps/mobile/components/chat/offline-banner.tsx
index 4d6a40fbbc..0dad453c88 100644
--- a/apps/mobile/components/chat/offline-banner.tsx
+++ b/apps/mobile/components/chat/offline-banner.tsx
@@ -16,6 +16,7 @@ import { Ionicons } from "@expo/vector-icons";
import { View } from "react-native";
import type { AgentAvailability } from "@multica/core/agents";
import { Text } from "@/components/ui/text";
+import { useT } from "@/lib/i18n";
interface Props {
/** Display name for the copy. */
@@ -29,8 +30,9 @@ interface Props {
}
export function OfflineBanner({ agentName, availability }: Props) {
+ const { t } = useT("chat");
if (availability !== "offline" && availability !== "unstable") return null;
- const name = agentName?.trim() || "This agent";
+ const name = agentName?.trim() || t("title.this_agent");
if (availability === "unstable") {
return (
@@ -40,7 +42,7 @@ export function OfflineBanner({ agentName, availability }: Props) {
className="flex-1 text-xs text-warning"
numberOfLines={1}
>
- {name} may have just disconnected — your message will queue.
+ {t("banners.offline_unstable", { name })}
</Text>
</View>
);
@@ -53,7 +55,7 @@ export function OfflineBanner({ agentName, availability }: Props) {
className="flex-1 text-xs text-muted-foreground"
numberOfLines={1}
>
- {name} is offline. Messages will wait until its runtime is back.
+ {t("banners.offline", { name })}
</Text>
</View>
);
diff --git a/apps/mobile/components/chat/runtime-required-banner.tsx b/apps/mobile/components/chat/runtime-required-banner.tsx
index 7f7fae7ab6..ef4b4ca763 100644
--- a/apps/mobile/components/chat/runtime-required-banner.tsx
+++ b/apps/mobile/components/chat/runtime-required-banner.tsx
@@ -1,14 +1,16 @@
import { Ionicons } from "@expo/vector-icons";
import { View } from "react-native";
import { Text } from "@/components/ui/text";
+import { useT } from "@/lib/i18n";
export function RuntimeRequiredBanner({ agentName }: { agentName?: string }) {
- const name = agentName?.trim() || "This agent";
+ const { t } = useT("chat");
+ const name = agentName?.trim() || t("title.this_agent");
return (
<View className="mx-3 mb-1.5 flex-row items-center gap-1.5 rounded-md bg-warning/15 px-2.5 py-1.5">
<Ionicons name="server-outline" size={14} color="#a16207" />
<Text className="flex-1 text-xs text-warning">
- {name} needs a runtime before it can run. Bind one on web or desktop.
+ {t("banners.runtime_required_name", { name })}
</Text>
</View>
);
diff --git a/apps/mobile/components/chat/status-pill.tsx b/apps/mobile/components/chat/status-pill.tsx
index 8f41612540..7e1df2028c 100644
--- a/apps/mobile/components/chat/status-pill.tsx
+++ b/apps/mobile/components/chat/status-pill.tsx
@@ -41,6 +41,7 @@ import { Text } from "@/components/ui/text";
import { formatElapsedSecs } from "@/lib/format-elapsed";
import { useColorScheme } from "@/lib/use-color-scheme";
import { THEME } from "@/lib/theme";
+import { useT } from "@/lib/i18n";
interface Props {
pendingTask: ChatPendingTask | null | undefined;
@@ -58,41 +59,42 @@ interface Stage {
}
const TOOL_LABELS: Record<string, string> = {
- bash: "Running command",
- exec: "Running command",
- read: "Reading files",
- glob: "Reading files",
- grep: "Searching code",
- write: "Making edits",
- edit: "Making edits",
- multi_edit: "Making edits",
- multiedit: "Making edits",
- web_search: "Searching web",
- websearch: "Searching web",
+ bash: "chat:status.running_command",
+ exec: "chat:status.running_command",
+ read: "chat:status.reading_files",
+ glob: "chat:status.reading_files",
+ grep: "chat:status.searching_code",
+ write: "chat:status.making_edits",
+ edit: "chat:status.making_edits",
+ multi_edit: "chat:status.making_edits",
+ multiedit: "chat:status.making_edits",
+ web_search: "chat:status.searching_web",
+ websearch: "chat:status.searching_web",
};
function pickStage(
status: string | undefined,
taskMessages: readonly TaskMessagePayload[],
availability: AgentAvailability | undefined,
+ t: (key: string) => string,
): Stage {
// Mirrors web: deferred is an older turn waiting for retry backoff, not
// active model work, so it must not fall through to "Thinking".
- if (status === "deferred") return { label: "Retrying" };
+ if (status === "deferred") return { label: t("chat:status.retrying") };
if (
(status === "queued" || status === "dispatched") &&
availability === "offline"
) {
- return { label: "Offline", static: true };
+ return { label: t("chat:status.offline"), static: true };
}
if (
(status === "queued" || status === "dispatched") &&
availability === "unstable"
) {
- return { label: "Reconnecting" };
+ return { label: t("chat:status.reconnecting") };
}
- if (status === "queued") return { label: "Queued" };
- if (status === "dispatched") return { label: "Starting up" };
+ if (status === "queued") return { label: t("chat:status.queued") };
+ if (status === "dispatched") return { label: t("chat:status.starting") };
let latest: TaskMessagePayload | null = null;
for (let i = taskMessages.length - 1; i >= 0; i--) {
@@ -102,14 +104,15 @@ function pickStage(
break;
}
}
- if (!latest) return { label: "Thinking" };
- if (latest.type === "thinking") return { label: "Thinking" };
- if (latest.type === "text") return { label: "Typing" };
+ if (!latest) return { label: t("chat:status.thinking") };
+ if (latest.type === "thinking") return { label: t("chat:status.thinking") };
+ if (latest.type === "text") return { label: t("chat:status.typing") };
if (latest.type === "tool_use") {
const slug = (latest.tool ?? "").toLowerCase();
- return { label: TOOL_LABELS[slug] ?? "Working" };
+ const key = TOOL_LABELS[slug];
+ return { label: key ? t(key) : t("chat:status.working") };
}
- return { label: "Thinking" };
+ return { label: t("chat:status.thinking") };
}
// Tabular figures for the 1Hz counter — proportional digits change the text
@@ -129,6 +132,7 @@ export function StatusPill({
}: Props) {
const taskId = pendingTask?.task_id;
const createdAt = pendingTask?.created_at;
+ const { t } = useT("chat");
// Anchor — locked per task. Reset on task_id change so a new run
// restarts the timer from 0; mid-run we never reassign, otherwise the
@@ -154,7 +158,7 @@ export function StatusPill({
? "running"
: pendingTask?.status;
const elapsedSec = Math.max(0, Math.floor((Date.now() - anchorMs) / 1000));
- const stage = pickStage(status, taskMessages, availability);
+ const stage = pickStage(status, taskMessages, availability, t);
return (
<View
diff --git a/apps/mobile/components/composer/message-composer.tsx b/apps/mobile/components/composer/message-composer.tsx
index 8e7c98d9b3..cc13e79f72 100644
--- a/apps/mobile/components/composer/message-composer.tsx
+++ b/apps/mobile/components/composer/message-composer.tsx
@@ -65,6 +65,7 @@ import {
type ComposerAttachmentItem,
type MentionChip,
} from "@/components/issue/composer-attachment-row";
+import { useT } from "@/lib/i18n";
export interface MessageComposerReplyTarget {
actorName: string;
@@ -159,8 +160,8 @@ export function MessageComposer({
onSubmit,
mentionPickerPath,
uploadContext,
- placeholder = "Type a message…",
- pillLabel = "Type a message…",
+ placeholder,
+ pillLabel,
pillIcon = "chatbubble-ellipses-outline",
value: controlledValue,
onChangeText: controlledOnChange,
@@ -175,6 +176,9 @@ export function MessageComposer({
}: Props) {
const { colorScheme } = useColorScheme();
const theme = THEME[colorScheme];
+ const { t } = useT("chat");
+ const resolvedPlaceholder = placeholder ?? t("composer.default_placeholder");
+ const resolvedPillLabel = pillLabel ?? t("composer.default_placeholder");
const insets = useSafeAreaInsets();
const inputRef = useRef<TextInput>(null);
const [expanded, setExpanded] = useState(false);
@@ -326,7 +330,8 @@ export function MessageComposer({
),
);
} catch (err) {
- const message = err instanceof Error ? err.message : "Unknown error";
+ const message =
+ err instanceof Error ? err.message : t("common:states.error");
setAttachments((prev) =>
prev.map((it) =>
it.localId === localId
@@ -336,7 +341,7 @@ export function MessageComposer({
);
}
},
- [uploadContext],
+ [uploadContext, t],
);
const onImagePress = useCallback(async () => {
@@ -348,7 +353,10 @@ export function MessageComposer({
const picked = picker.assets[0];
if (!picked) return;
if (picked.fileSize != null && picked.fileSize > MAX_FILE_SIZE) {
- Alert.alert("File too large", "Files must be smaller than 100 MB.");
+ Alert.alert(
+ t("composer.file_too_large_title"),
+ t("composer.file_too_large_message"),
+ );
return;
}
const filename = picked.fileName ?? `image-${Date.now()}.jpg`;
@@ -370,7 +378,7 @@ export function MessageComposer({
name: filename,
type: mimeType,
});
- }, [startUpload]);
+ }, [startUpload, t]);
const onFilePress = useCallback(async () => {
const picker = await DocumentPicker.getDocumentAsync({
@@ -381,7 +389,10 @@ export function MessageComposer({
const picked = picker.assets[0];
if (!picked) return;
if (picked.size != null && picked.size > MAX_FILE_SIZE) {
- Alert.alert("File too large", "Files must be smaller than 100 MB.");
+ Alert.alert(
+ t("composer.file_too_large_title"),
+ t("composer.file_too_large_message"),
+ );
return;
}
const mimeType = picked.mimeType ?? "application/octet-stream";
@@ -402,7 +413,7 @@ export function MessageComposer({
name: picked.name,
type: mimeType,
});
- }, [startUpload]);
+ }, [startUpload, t]);
const onRemoveAttachment = useCallback((localId: string) => {
setAttachments((prev) => prev.filter((it) => it.localId !== localId));
@@ -469,7 +480,7 @@ export function MessageComposer({
color={theme.mutedForeground}
/>
<Text className="text-base text-muted-foreground">
- {disabled && disabledReason ? disabledReason : pillLabel}
+ {disabled && disabledReason ? disabledReason : resolvedPillLabel}
</Text>
</Pressable>
</View>
@@ -492,13 +503,13 @@ export function MessageComposer({
className="flex-1 text-xs font-medium text-muted-foreground"
numberOfLines={1}
>
- Replying to {replyTarget.actorName}
+ {t("composer.replying_to", { name: replyTarget.actorName })}
</Text>
<Pressable
onPress={onClearReplyTarget}
hitSlop={8}
accessibilityRole="button"
- accessibilityLabel="Cancel reply"
+ accessibilityLabel={t("composer.cancel_reply")}
>
<Ionicons
name="close-circle"
@@ -539,7 +550,7 @@ export function MessageComposer({
value={text}
onChangeText={setText}
onBlur={onBlur}
- placeholder={placeholder}
+ placeholder={resolvedPlaceholder}
placeholderTextColor={theme.mutedForeground}
multiline
editable={!disabled}
@@ -556,21 +567,21 @@ export function MessageComposer({
iconSize={20}
color={mentions.length > 0 ? theme.primary : undefined}
onPress={onAtPress}
- accessibilityLabel="Mention someone or an issue"
+ accessibilityLabel={t("composer.mention")}
className="h-8 w-8"
/>
<IconButton
name="image-outline"
iconSize={20}
onPress={onImagePress}
- accessibilityLabel="Upload image"
+ accessibilityLabel={t("composer.upload_image")}
className="h-8 w-8"
/>
<IconButton
name="attach-outline"
iconSize={20}
onPress={onFilePress}
- accessibilityLabel="Upload file"
+ accessibilityLabel={t("composer.upload_file")}
className="h-8 w-8"
/>
<View className="flex-1" />
@@ -586,7 +597,7 @@ export function MessageComposer({
disabled={!canSend}
hitSlop={12}
className="h-8 w-8 rounded-full"
- accessibilityLabel="Send"
+ accessibilityLabel={t("composer.send")}
accessibilityState={{ disabled: !canSend }}
/>
)}
diff --git a/apps/mobile/components/editor/markdown-toolbar.tsx b/apps/mobile/components/editor/markdown-toolbar.tsx
index 0fd09b26a2..8a5964440c 100644
--- a/apps/mobile/components/editor/markdown-toolbar.tsx
+++ b/apps/mobile/components/editor/markdown-toolbar.tsx
@@ -18,6 +18,7 @@
import { Pressable, View } from "react-native";
import { Ionicons } from "@expo/vector-icons";
import { Text } from "@/components/ui/text";
+import { useT } from "@/lib/i18n";
import { cn } from "@/lib/utils";
export interface MarkdownToolbarProps {
@@ -51,38 +52,39 @@ export function MarkdownToolbar({
onFile,
disabled,
}: MarkdownToolbarProps) {
+ const { t } = useT("editor");
return (
<View className="flex-row items-center gap-1 px-2 py-1.5 border-t border-border bg-background">
<ToolbarButton
- accessibilityLabel="Mention someone"
+ accessibilityLabel={t("a11y.mention_someone")}
onPress={onAt}
disabled={disabled}
>
<Text className="text-base text-muted-foreground leading-none">@</Text>
</ToolbarButton>
<ToolbarButton
- accessibilityLabel="Bullet list"
+ accessibilityLabel={t("a11y.bullet_list")}
onPress={onList}
disabled={disabled}
>
<Ionicons name="list-outline" size={18} color={ICON_COLOR} />
</ToolbarButton>
<ToolbarButton
- accessibilityLabel="Checklist"
+ accessibilityLabel={t("a11y.checklist")}
onPress={onCheckbox}
disabled={disabled}
>
<Ionicons name="checkbox-outline" size={18} color={ICON_COLOR} />
</ToolbarButton>
<ToolbarButton
- accessibilityLabel="Code block"
+ accessibilityLabel={t("a11y.code_block")}
onPress={onCode}
disabled={disabled}
>
<Ionicons name="code-slash-outline" size={18} color={ICON_COLOR} />
</ToolbarButton>
<ToolbarButton
- accessibilityLabel="Quote"
+ accessibilityLabel={t("a11y.quote")}
onPress={onQuote}
disabled={disabled}
>
@@ -94,7 +96,7 @@ export function MarkdownToolbar({
</ToolbarButton>
{onImage ? (
<ToolbarButton
- accessibilityLabel="Attach image"
+ accessibilityLabel={t("a11y.attach_image")}
onPress={onImage}
disabled={disabled}
>
@@ -103,7 +105,7 @@ export function MarkdownToolbar({
) : null}
{onFile ? (
<ToolbarButton
- accessibilityLabel="Attach file"
+ accessibilityLabel={t("a11y.attach_file")}
onPress={onFile}
disabled={disabled}
>
diff --git a/apps/mobile/components/editor/use-file-attach.ts b/apps/mobile/components/editor/use-file-attach.ts
index 19bca28c09..d991e7df3e 100644
--- a/apps/mobile/components/editor/use-file-attach.ts
+++ b/apps/mobile/components/editor/use-file-attach.ts
@@ -21,6 +21,7 @@ import { Alert } from "react-native";
import * as ImagePicker from "expo-image-picker";
import * as DocumentPicker from "expo-document-picker";
import { api, MAX_FILE_SIZE, type FileAsset } from "@/data/api";
+import { useT } from "@/lib/i18n";
export interface FileAttachResult {
/** Attachment id from the server. Callers MUST carry this to the mutation
@@ -43,6 +44,7 @@ interface PickedAsset extends FileAsset {
}
export function useFileAttach() {
+ const { t } = useT("editor");
const [uploading, setUploading] = useState(false);
const upload = useCallback(
@@ -52,8 +54,8 @@ export function useFileAttach() {
): Promise<FileAttachResult | null> => {
if (asset.size != null && asset.size > MAX_FILE_SIZE) {
Alert.alert(
- "File too large",
- "Files must be smaller than 100 MB.",
+ t("upload.file_too_large_title"),
+ t("upload.file_too_large_message"),
);
return null;
}
@@ -67,15 +69,15 @@ export function useFileAttach() {
};
} catch (err) {
Alert.alert(
- "Upload failed",
- err instanceof Error ? err.message : "Unknown error",
+ t("upload.failed"),
+ err instanceof Error ? err.message : t("upload.error"),
);
return null;
} finally {
setUploading(false);
}
},
- [],
+ [t],
);
const pickAndUploadImage = useCallback(
diff --git a/apps/mobile/components/inbox/detail-label.tsx b/apps/mobile/components/inbox/detail-label.tsx
index 504c2e6878..55a7b67a9b 100644
--- a/apps/mobile/components/inbox/detail-label.tsx
+++ b/apps/mobile/components/inbox/detail-label.tsx
@@ -7,8 +7,7 @@
* status to ✓ Done", mobile must show "Set status to ✓ Done" (rendered
* with mobile primitives, not the literal HTML).
*
- * Web is i18n-driven (useT). Mobile v1 is English-only; when mobile ships
- * i18n, mirror the namespace structure.
+ * Copy is i18n-driven and mirrors the web namespace structure.
*/
import { View } from "react-native";
import type {
@@ -22,45 +21,50 @@ import { StatusIcon } from "@/components/ui/status-icon";
import { PriorityIcon } from "@/components/ui/priority-icon";
import { useActorLookup } from "@/data/use-actor-name";
import { useIssueStatuses } from "@/lib/use-issue-statuses";
+import { i18n, useT } from "@/lib/i18n";
import { cn } from "@/lib/utils";
// Mirrors PRIORITY_CONFIG.label in packages/core/issues/config/priority.ts
const PRIORITY_LABEL: Record<IssuePriority, string> = {
- urgent: "Urgent",
- high: "High",
- medium: "Medium",
- low: "Low",
- none: "No priority",
+ urgent: "issues:priority.urgent",
+ high: "issues:priority.high",
+ medium: "issues:priority.medium",
+ low: "issues:priority.low",
+ none: "issues:priority.none",
};
// Mirrors useTypeLabels in packages/views/inbox/components/inbox-detail-label.tsx
-const TYPE_LABEL: Record<InboxItemType, string> = {
- issue_assigned: "Assigned",
- issue_subscribed: "Subscribed",
- unassigned: "Unassigned",
- assignee_changed: "Reassigned",
- status_changed: "Status changed",
- priority_changed: "Priority changed",
- start_date_changed: "Start date changed",
- due_date_changed: "Due date changed",
- new_comment: "New comment",
- mentioned: "Mentioned",
- review_requested: "Review requested",
- task_completed: "Task completed",
- task_failed: "Task failed",
- agent_blocked: "Agent blocked",
- agent_completed: "Agent completed",
- reaction_added: "Reaction added",
- quick_create_done: "Quick-create done",
- quick_create_failed: "Quick-create failed",
- quick_create_unconfirmed: "Quick-create needs a check",
- autopilot_paused: "Autopilot paused",
- autopilot_quota_exceeded: "Autopilot run limit reached",
+const TYPE_KEY: Record<InboxItemType, string> = {
+ issue_assigned: "type.assigned",
+ issue_subscribed: "type.subscribed",
+ unassigned: "type.unassigned",
+ assignee_changed: "type.reassigned",
+ status_changed: "type.status_changed",
+ priority_changed: "type.priority_changed",
+ start_date_changed: "type.start_date_changed",
+ due_date_changed: "type.due_date_changed",
+ new_comment: "type.new_comment",
+ mentioned: "type.mentioned",
+ review_requested: "type.review_requested",
+ task_completed: "type.task_completed",
+ task_failed: "type.task_failed",
+ agent_blocked: "type.agent_blocked",
+ agent_completed: "type.agent_completed",
+ reaction_added: "type.reaction_added",
+ quick_create_done: "type.quick_create_done",
+ quick_create_failed: "type.quick_create_failed",
+ quick_create_unconfirmed: "type.quick_create_unconfirmed",
+ autopilot_paused: "type.autopilot_paused",
+ autopilot_quota_exceeded: "type.autopilot_quota_exceeded",
};
// due_date is a calendar day — format timezone-safely (no offset day shift).
function shortDate(dateStr: string): string {
- return formatDateOnly(dateStr, { month: "short", day: "numeric" }, "en-US");
+ return formatDateOnly(
+ dateStr,
+ { month: "short", day: "numeric" },
+ i18n.resolvedLanguage ?? i18n.language,
+ );
}
function singleLine(value: string | null | undefined): string {
@@ -75,6 +79,7 @@ export function InboxDetailLabel({
className?: string;
}) {
const { getName } = useActorLookup();
+ const { t } = useT("inbox");
// `details.to` is a status KEY and may be a custom one, so its name, colour
// and glyph all resolve through the workspace catalog. (MUL-6243)
const { categoryOf, colorOf, labelOf, iconOf } = useIssueStatuses();
@@ -85,7 +90,9 @@ export function InboxDetailLabel({
const status = details.to;
return (
<View className={cn("flex-row items-center gap-1", className)}>
- <Text className="text-xs text-muted-foreground">Set status to</Text>
+ <Text className="text-xs text-muted-foreground">
+ {t("type.set_status")}
+ </Text>
<StatusIcon
status={status}
category={categoryOf(status)}
@@ -103,17 +110,19 @@ export function InboxDetailLabel({
const priority = details.to as IssuePriority;
return (
<View className={cn("flex-row items-center gap-1", className)}>
- <Text className="text-xs text-muted-foreground">Set priority to</Text>
+ <Text className="text-xs text-muted-foreground">
+ {t("type.set_priority")}
+ </Text>
<PriorityIcon priority={priority} size={12} />
<Text className="text-xs text-muted-foreground" numberOfLines={1}>
- {PRIORITY_LABEL[priority] ?? priority}
+ {t(PRIORITY_LABEL[priority])}
</Text>
</View>
);
}
// Single-string cases.
- const text = (() => {
+ const text: string = (() => {
switch (item.type) {
case "issue_assigned":
case "assignee_changed":
@@ -122,40 +131,40 @@ export function InboxDetailLabel({
(details.new_assignee_type ?? "member") as "member" | "agent",
details.new_assignee_id,
);
- return `Assigned to ${name}`;
+ return t("type.assigned_to", { name });
}
- return TYPE_LABEL[item.type];
+ return t(TYPE_KEY[item.type]);
case "unassigned":
- return "Removed assignee";
+ return t("type.removed_assignee");
case "due_date_changed":
return details.to
- ? `Set due date to ${shortDate(details.to)}`
- : "Removed due date";
+ ? t("type.set_due_date", { date: shortDate(details.to) })
+ : t("type.removed_due_date");
case "new_comment":
- return singleLine(item.body) || TYPE_LABEL[item.type];
+ return singleLine(item.body) || t(TYPE_KEY[item.type]);
case "reaction_added":
return details.emoji
- ? `Reacted with ${details.emoji}`
- : TYPE_LABEL[item.type];
+ ? t("type.reacted_with", { emoji: details.emoji })
+ : t(TYPE_KEY[item.type]);
case "quick_create_done":
return details.identifier
- ? `Created with agent: ${details.identifier}`
- : TYPE_LABEL[item.type];
+ ? t("type.created_with_agent", { identifier: details.identifier })
+ : t(TYPE_KEY[item.type]);
case "quick_create_failed": {
const detail = singleLine(details.error) || singleLine(item.body);
- return detail ? `Failed: ${detail}` : TYPE_LABEL[item.type];
+ return detail ? t("type.failed_with_detail", { detail }) : t(TYPE_KEY[item.type]);
}
// Mirrors packages/views/inbox/components/inbox-detail-label.tsx: the
// unconfirmed outcome deliberately drops the "Failed:" prefix, because
// the issue may actually have been created.
case "quick_create_unconfirmed": {
const detail = singleLine(details.error) || singleLine(item.body);
- return detail || TYPE_LABEL[item.type];
+ return detail || t(TYPE_KEY[item.type]);
}
case "autopilot_quota_exceeded":
- return "Run blocked because the limit was reached";
+ return t("type.run_limit_blocked");
default:
- return TYPE_LABEL[item.type] ?? item.type;
+ return t(TYPE_KEY[item.type]) ?? item.type;
}
})();
diff --git a/apps/mobile/components/inbox/swipeable-inbox-row.tsx b/apps/mobile/components/inbox/swipeable-inbox-row.tsx
index 8d680f147a..54e3fae5fe 100644
--- a/apps/mobile/components/inbox/swipeable-inbox-row.tsx
+++ b/apps/mobile/components/inbox/swipeable-inbox-row.tsx
@@ -42,6 +42,7 @@ import * as Haptics from "expo-haptics";
import type { InboxItem } from "@multica/core/types";
import { Text } from "@/components/ui/text";
import { InboxRow } from "./inbox-row";
+import { useT } from "@/lib/i18n";
const ACTION_WIDTH = 80;
@@ -82,6 +83,7 @@ function ArchiveAction({
onPress: () => void;
drag: SharedValue<number>;
}) {
+ const { t } = useT("inbox");
// One-shot haptic when the drag crosses the action width threshold.
// useAnimatedReaction runs on the UI thread; runOnJS bridges to the
// Haptics.impactAsync call which has to live on JS.
@@ -99,12 +101,12 @@ function ArchiveAction({
<Animated.View style={{ width: ACTION_WIDTH }}>
<Pressable
onPress={onPress}
- accessibilityLabel="Archive"
+ accessibilityLabel={t("actions.archive")}
className="flex-1 items-center justify-center bg-destructive"
>
<View className="items-center gap-0.5">
<Ionicons name="archive-outline" size={20} color="white" />
- <Text className="text-xs text-white">Archive</Text>
+ <Text className="text-xs text-white">{t("actions.archive")}</Text>
</View>
</Pressable>
</Animated.View>
diff --git a/apps/mobile/components/issue/agent-activity-row.tsx b/apps/mobile/components/issue/agent-activity-row.tsx
index 6e543709a3..f7409dd830 100644
--- a/apps/mobile/components/issue/agent-activity-row.tsx
+++ b/apps/mobile/components/issue/agent-activity-row.tsx
@@ -26,6 +26,7 @@ import {
import { useWorkspaceStore } from "@/data/workspace-store";
import { useColorScheme } from "@/lib/use-color-scheme";
import { THEME } from "@/lib/theme";
+import { useT } from "@/lib/i18n";
interface Props {
issueId: string;
@@ -87,20 +88,26 @@ export function AgentActivityRow({ issueId }: Props) {
}
function ActiveContent({ actors }: { actors: StackActor[] }) {
+ const { t } = useT("projects");
return (
<View className="flex-1 flex-row items-center gap-2">
<AvatarStack actors={actors} max={3} size={24} />
<PulseDot />
- <Text className="text-sm font-medium text-foreground">Working</Text>
+ <Text className="text-sm font-medium text-foreground">
+ {t("runs.working")}
+ </Text>
</View>
);
}
function IdleContent({ count, mutedFg }: { count: number; mutedFg: string }) {
+ const { t } = useT("projects");
return (
<View className="flex-1 flex-row items-center gap-2">
<Ionicons name="time-outline" size={16} color={mutedFg} />
- <Text className="text-sm text-foreground">Runs · {count}</Text>
+ <Text className="text-sm text-foreground">
+ {t("runs.count", { count })}
+ </Text>
</View>
);
}
diff --git a/apps/mobile/components/issue/agent-header-badge.tsx b/apps/mobile/components/issue/agent-header-badge.tsx
index b040fb17d0..80cb920734 100644
--- a/apps/mobile/components/issue/agent-header-badge.tsx
+++ b/apps/mobile/components/issue/agent-header-badge.tsx
@@ -21,6 +21,7 @@ import { AvatarStack, type StackActor } from "@/components/ui/avatar-stack";
import { PulseDot } from "@/components/ui/pulse-dot";
import { issueActiveTasksOptions } from "@/data/queries/issues";
import { useWorkspaceStore } from "@/data/workspace-store";
+import { useT } from "@/lib/i18n";
interface Props {
issueId: string;
@@ -28,6 +29,7 @@ interface Props {
export function AgentHeaderBadge({ issueId }: Props) {
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
+ const { t } = useT("issues");
const wsSlug = useWorkspaceStore((s) => s.currentWorkspaceSlug);
const { data: active = [] } = useQuery(
issueActiveTasksOptions(wsId, issueId),
@@ -50,7 +52,7 @@ export function AgentHeaderBadge({ issueId }: Props) {
});
}}
hitSlop={8}
- accessibilityLabel="Agent working — open runs"
+ accessibilityLabel={t("a11y.agent_working")}
className="flex-row items-center gap-1.5 px-2 py-1 active:opacity-60"
>
<AvatarStack actors={actors} max={2} size={20} />
diff --git a/apps/mobile/components/issue/attribute-row.tsx b/apps/mobile/components/issue/attribute-row.tsx
index 0d7f162b79..62c0f4e948 100644
--- a/apps/mobile/components/issue/attribute-row.tsx
+++ b/apps/mobile/components/issue/attribute-row.tsx
@@ -35,12 +35,13 @@ import { findProject, projectListOptions } from "@/data/queries/projects";
import { useWorkspaceStore } from "@/data/workspace-store";
import { PRIORITY_LABEL as PRIORITY_FULL_LABEL } from "@/lib/issue-status";
import { useIssueStatuses } from "@/lib/use-issue-statuses";
+import { i18n, useT } from "@/lib/i18n";
// Chip placeholder shortens `none` from "No priority" → "Priority" so the
// unset chip reads as a placeholder, not as a confusing assigned value.
const PRIORITY_CHIP_LABEL: Record<IssuePriority, string> = {
...PRIORITY_FULL_LABEL,
- none: "Priority",
+ none: "issues:filters.priority",
};
/**
@@ -70,13 +71,20 @@ const ISSUE_PICKER_PATHNAMES = {
// with the viewer's offset. Mirrors web's formatDate in list-row/board-card.
function formatDueDate(iso: string | null): string | null {
if (!iso) return null;
- return formatDateOnly(iso, { month: "short", day: "numeric" }, "en-US") || null;
+ return (
+ formatDateOnly(
+ iso,
+ { month: "short", day: "numeric" },
+ i18n.resolvedLanguage ?? i18n.language,
+ ) || null
+ );
}
export function AttributeRow({ issue }: { issue: Issue }) {
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
const wsSlug = useWorkspaceStore((s) => s.currentWorkspaceSlug);
const { getName } = useActorLookup();
+ const { t } = useT("issues");
// The chip shows the issue's own status, which may be a custom one — name
// and colour come from the workspace catalog, the glyph from its category.
// (MUL-6243)
@@ -130,7 +138,7 @@ export function AttributeRow({ issue }: { issue: Issue }) {
{/* Priority */}
<AttributeChip
icon={<PriorityIcon priority={issue.priority} size={14} />}
- label={PRIORITY_CHIP_LABEL[issue.priority]}
+ label={t(PRIORITY_CHIP_LABEL[issue.priority])}
variant={issue.priority === "none" ? "dimmed" : "filled"}
onPress={() => openPicker("priority")}
/>
@@ -146,7 +154,7 @@ export function AttributeRow({ issue }: { issue: Issue }) {
showPresence
/>
}
- label={assigneeName ?? "Unknown"}
+ label={assigneeName ?? t("picker.unknown")}
variant="filled"
onPress={() => openPicker("assignee")}
/>
@@ -155,7 +163,7 @@ export function AttributeRow({ issue }: { issue: Issue }) {
icon={
<View className="size-4 rounded-full border border-dashed border-muted-foreground/40" />
}
- label="Assignee"
+ label={t("filters.assignee")}
variant="dimmed"
onPress={() => openPicker("assignee")}
/>
@@ -182,7 +190,7 @@ export function AttributeRow({ issue }: { issue: Issue }) {
{labels.length === 0 ? (
<AttributeChip
icon={<Text className="text-xs text-muted-foreground/70">◯</Text>}
- label="Label"
+ label={t("filters.label")}
variant="dimmed"
onPress={() => openPicker("label")}
/>
@@ -201,7 +209,7 @@ export function AttributeRow({ issue }: { issue: Issue }) {
icon={
<View className="size-3.5 rounded-sm border border-dashed border-muted-foreground/40" />
}
- label="Project"
+ label={t("filters.project")}
variant="dimmed"
onPress={() => openPicker("project")}
/>
@@ -210,7 +218,7 @@ export function AttributeRow({ issue }: { issue: Issue }) {
{/* Due date */}
<AttributeChip
icon={<Text className="text-xs text-muted-foreground/80">📅</Text>}
- label={dueLabel ?? "Due date"}
+ label={dueLabel ?? t("common:fields.due_date")}
variant={dueLabel ? "filled" : "dimmed"}
onPress={() => openPicker("due-date")}
/>
diff --git a/apps/mobile/components/issue/comment-card.tsx b/apps/mobile/components/issue/comment-card.tsx
index cec46c737d..cd74dd3811 100644
--- a/apps/mobile/components/issue/comment-card.tsx
+++ b/apps/mobile/components/issue/comment-card.tsx
@@ -57,6 +57,7 @@ import { useColorScheme } from "@/lib/use-color-scheme";
import { THEME } from "@/lib/theme";
import { cn } from "@/lib/utils";
import { continuousCorners } from "@/lib/radius";
+import { useT } from "@/lib/i18n";
import { ReactionBar } from "./reaction-bar";
import { useCommentLongPress } from "./comment-context-menu";
import { useCommentSelectStore } from "@/data/comment-select-store";
@@ -232,6 +233,7 @@ function ResolvedThreadBar({
onExpand: () => void;
}) {
const { getName } = useActorLookup();
+ const { t } = useT("issues");
const { colorScheme } = useColorScheme();
const mutedFg = THEME[colorScheme].mutedForeground;
@@ -273,15 +275,20 @@ function ResolvedThreadBar({
className="flex-row items-center gap-2.5 px-4 py-3 rounded-xl bg-surface-1 active:opacity-70"
style={continuousCorners}
accessibilityRole="button"
- accessibilityLabel={`Resolved thread by ${authorsLabel}, ${total} ${total === 1 ? "message" : "messages"}. Tap to expand.`}
+ accessibilityLabel={t(
+ total === 1 ? "resolved.a11y_folded_one" : "resolved.a11y_folded_other",
+ { authors: authorsLabel, count: total },
+ )}
>
<Ionicons name="checkmark-circle" size={18} color={mutedFg} />
<Text
className="flex-1 text-sm text-muted-foreground"
numberOfLines={1}
>
- Resolved · {total} {total === 1 ? "message" : "messages"} by{" "}
- {authorsLabel}
+ {t(total === 1 ? "resolved.summary_one" : "resolved.summary_other", {
+ count: total,
+ authors: authorsLabel,
+ })}
</Text>
<Ionicons name="chevron-down" size={14} color={mutedFg} />
</Pressable>
@@ -307,6 +314,7 @@ function ResolvedIndicator({
onCollapse: () => void;
}) {
const { getName } = useActorLookup();
+ const { t } = useT("issues");
const { colorScheme } = useColorScheme();
const mutedFg = THEME[colorScheme].mutedForeground;
const resolverName = getName(
@@ -319,17 +327,16 @@ function ResolvedIndicator({
onPress={onCollapse}
className="flex-row items-center gap-2 active:opacity-60"
accessibilityRole="button"
- accessibilityLabel="Collapse resolved thread"
+ accessibilityLabel={t("resolved.collapse_a11y")}
>
<Ionicons name="checkmark-circle" size={14} color={mutedFg} />
<Text className="text-xs text-muted-foreground flex-1" numberOfLines={1}>
- Resolved by{" "}
- <Text className="text-xs text-foreground font-medium">
- {resolverName}
- </Text>
+ {t("resolved.resolved_by", { name: resolverName })}
{entry.resolved_at ? ` · ${timeAgo(entry.resolved_at)}` : ""}
</Text>
- <Text className="text-xs text-muted-foreground">Collapse</Text>
+ <Text className="text-xs text-muted-foreground">
+ {t("resolved.collapse")}
+ </Text>
</Pressable>
);
}
@@ -448,7 +455,10 @@ function CommentBody({
// Reactions live on TimelineEntry.reactions (mirrored from Comment).
// Pass through to the bar; toggle finds existing match by emoji + actor.
- const reactions: Reaction[] = (entry.reactions ?? []) as Reaction[];
+ const reactions = useMemo(
+ () => (entry.reactions ?? []) as Reaction[],
+ [entry.reactions],
+ );
const onToggleReaction = useCallback(
(emoji: string) => {
@@ -589,6 +599,7 @@ function FailedActions({
onDiscard: () => void;
}) {
const { colorScheme } = useColorScheme();
+ const { t } = useT("issues");
const destructive = THEME[colorScheme].destructive;
return (
<View className="flex-row items-center gap-2 mt-0.5">
@@ -597,24 +608,26 @@ function FailedActions({
className="flex-1 text-xs text-destructive"
numberOfLines={1}
>
- {error || "Couldn't send"}
+ {error || t("failed.send")}
</Text>
<Pressable
onPress={onRetry}
hitSlop={6}
accessibilityRole="button"
- accessibilityLabel="Retry sending comment"
+ accessibilityLabel={t("failed.retry_a11y")}
>
- <Text className="text-xs text-primary font-medium">Retry</Text>
+ <Text className="text-xs text-primary font-medium">
+ {t("failed.retry")}
+ </Text>
</Pressable>
<Pressable
onPress={onDiscard}
hitSlop={6}
accessibilityRole="button"
- accessibilityLabel="Discard failed comment"
+ accessibilityLabel={t("failed.discard_a11y")}
>
<Text className="text-xs text-muted-foreground font-medium">
- Discard
+ {t("failed.discard")}
</Text>
</Pressable>
</View>
diff --git a/apps/mobile/components/issue/comment-context-menu.tsx b/apps/mobile/components/issue/comment-context-menu.tsx
index b91937d4a9..8b5caf57a5 100644
--- a/apps/mobile/components/issue/comment-context-menu.tsx
+++ b/apps/mobile/components/issue/comment-context-menu.tsx
@@ -37,6 +37,7 @@ import {
} from "@/data/mutations/issues";
import { appConfigOptions } from "@/data/queries/billing";
import { QUICK_EMOJIS } from "@/lib/quick-emojis";
+import { i18n, useT } from "@/lib/i18n";
const QUICK_ROW_SIZE = 5;
@@ -58,6 +59,7 @@ export function useCommentLongPress(
...appConfigOptions(),
select: commentDeleteKeepsReplies,
});
+ const { t } = useT("issues");
const onLongPress = useCallback(() => {
const isOwn = entry.actor_type === "member" && entry.actor_id === userId;
@@ -88,20 +90,20 @@ export function useCommentLongPress(
actions.push(action);
};
- push("Reply", { kind: "reply" });
- push("React…", { kind: "react" });
+ push(t("comments.reply"), { kind: "reply" });
+ push(t("comments.react"), { kind: "react" });
if (hasContent) {
- push("Copy", { kind: "copy" });
- push("Select Text", { kind: "select" });
+ push(t("comments.copy"), { kind: "copy" });
+ push(t("comments.select_text"), { kind: "select" });
}
- if (canCopyLink) push("Copy Link", { kind: "copyLink" });
+ if (canCopyLink) push(t("menu.copy_link"), { kind: "copyLink" });
if (isRoot) {
- push(resolved ? "Unresolve Thread" : "Resolve Thread", {
+ push(resolved ? t("comments.unresolve") : t("comments.resolve"), {
kind: "resolve",
});
}
- if (isOwn) push("Delete", { kind: "delete" });
- push("Cancel", { kind: "cancel" });
+ if (isOwn) push(t("common:actions.delete"), { kind: "delete" });
+ push(t("common:actions.cancel"), { kind: "cancel" });
const cancelButtonIndex = options.length - 1;
const destructiveButtonIndex = isOwn
@@ -135,7 +137,7 @@ export function useCommentLongPress(
);
useReplyTargetStore.getState().setTarget({
commentId: entry.id,
- actorName: actorName || "comment",
+ actorName: actorName || t("comments.fallback_actor"),
preview: entry.content ?? "",
});
return;
@@ -185,16 +187,16 @@ export function useCommentLongPress(
return;
case "delete":
Alert.alert(
- "Delete comment?",
+ t("comments.delete_title"),
// Promise kept replies only when the server declares it (#8296);
// older servers delete the replies too.
keepReplies
- ? "This comment will be permanently deleted. Any replies to it stay in the thread. This cannot be undone."
- : "This comment will be permanently deleted. Replies in the thread will also be removed. This cannot be undone.",
+ ? t("comments.delete_keep_replies")
+ : t("comments.delete_with_replies"),
[
- { text: "Cancel", style: "cancel" },
+ { text: t("common:actions.cancel"), style: "cancel" },
{
- text: "Delete",
+ text: t("common:actions.delete"),
style: "destructive",
onPress: () => deleteComment.mutate(entry.id),
},
@@ -215,6 +217,7 @@ export function useCommentLongPress(
resolveComment,
getName,
keepReplies,
+ t,
]);
return { onLongPress, isPressed };
@@ -230,7 +233,12 @@ function presentReactSheet(args: {
}) {
const { entry, reactions, userId, wsSlug, issueId, toggle } = args;
const emojis = QUICK_EMOJIS.slice(0, QUICK_ROW_SIZE);
- const options = [...emojis, "More reactions…", "Cancel"];
+ const t = i18n.t.bind(i18n);
+ const options = [
+ ...emojis,
+ t("issues:comments.more_reactions"),
+ t("common:actions.cancel"),
+ ];
const cancelButtonIndex = options.length - 1;
ActionSheetIOS.showActionSheetWithOptions(
diff --git a/apps/mobile/components/issue/composer-attachment-row.tsx b/apps/mobile/components/issue/composer-attachment-row.tsx
index f7a016dba8..00f588a8bc 100644
--- a/apps/mobile/components/issue/composer-attachment-row.tsx
+++ b/apps/mobile/components/issue/composer-attachment-row.tsx
@@ -33,6 +33,7 @@ import { useLightbox } from "@/lib/markdown/lightbox-provider";
import { useColorScheme } from "@/lib/use-color-scheme";
import { THEME } from "@/lib/theme";
import { Text } from "@/components/ui/text";
+import { useT } from "@/lib/i18n";
/** Mention chip data — composer-local state. No store, no cross-route
* sharing. The composer owns the array and passes it in. */
@@ -131,6 +132,7 @@ function MentionChipView({
mention: MentionChip;
onRemove: (type: MentionChipType, id: string) => void;
}) {
+ const { t } = useT("issues");
const { colorScheme } = useColorScheme();
const theme = THEME[colorScheme];
@@ -155,7 +157,7 @@ function MentionChipView({
onPress={() => onRemove(mention.type, mention.id)}
hitSlop={8}
accessibilityRole="button"
- accessibilityLabel={`Remove mention ${mention.name}`}
+ accessibilityLabel={t("a11y.remove_mention", { name: mention.name })}
className="h-4 w-4 items-center justify-center"
>
<Ionicons name="close" size={12} color={theme.mutedForeground} />
@@ -178,6 +180,7 @@ function AttachmentChipView({ item, onRemove, onRetry }: AttachmentChipProps) {
const { colorScheme } = useColorScheme();
const theme = THEME[colorScheme];
const { open } = useLightbox();
+ const { t } = useT("issues");
const isImage = useMemo(
() => item.mimeType.startsWith("image/"),
@@ -220,8 +223,8 @@ function AttachmentChipView({ item, onRemove, onRetry }: AttachmentChipProps) {
accessibilityRole={item.status === "failed" ? "button" : "image"}
accessibilityLabel={
item.status === "failed"
- ? `Retry upload of ${item.filename}`
- : `Open ${item.filename}`
+ ? t("a11y.retry_upload", { name: item.filename })
+ : t("a11y.open_file", { name: item.filename })
}
className="flex-row items-center gap-1 h-7 px-2 rounded-full bg-secondary active:opacity-80"
>
@@ -248,7 +251,7 @@ function AttachmentChipView({ item, onRemove, onRetry }: AttachmentChipProps) {
onPress={() => onRemove(item.localId)}
hitSlop={8}
accessibilityRole="button"
- accessibilityLabel={`Remove ${item.filename}`}
+ accessibilityLabel={t("a11y.remove_file", { name: item.filename })}
className="h-4 w-4 items-center justify-center"
>
<Ionicons name="close" size={12} color={theme.mutedForeground} />
diff --git a/apps/mobile/components/issue/create-form-attribute-row.tsx b/apps/mobile/components/issue/create-form-attribute-row.tsx
index 6d4f71daca..fb136db9d4 100644
--- a/apps/mobile/components/issue/create-form-attribute-row.tsx
+++ b/apps/mobile/components/issue/create-form-attribute-row.tsx
@@ -24,6 +24,7 @@ import { useNewIssueDraftStore } from "@/data/stores/new-issue-draft-store";
import { useWorkspaceStore } from "@/data/workspace-store";
import { PRIORITY_LABEL } from "@/lib/issue-status";
import { useIssueStatuses } from "@/lib/use-issue-statuses";
+import { useT } from "@/lib/i18n";
/**
* Picker fields the new-issue draft form can open. Bound to a typed map
@@ -46,6 +47,7 @@ const NEW_ISSUE_PICKER_PATHNAMES = {
} as const satisfies Record<NewIssuePickerField, string>;
export function CreateFormAttributeRow() {
+ const { t } = useT("issues");
const wsSlug = useWorkspaceStore((s) => s.currentWorkspaceSlug);
const status = useNewIssueDraftStore((s) => s.status);
const priority = useNewIssueDraftStore((s) => s.priority);
@@ -58,9 +60,9 @@ export function CreateFormAttributeRow() {
const { categoryOf, colorOf, labelOf, iconOf } = useIssueStatuses();
const assigneeLabel = assignee
? getName(assignee.type, assignee.id)
- : "Assignee";
- const priorityLabel =
- priority === "none" ? "Priority" : PRIORITY_LABEL[priority];
+ : t("filters.assignee");
+ const priorityLabel: string =
+ priority === "none" ? t("filters.priority") : t(PRIORITY_LABEL[priority]);
const open = (field: NewIssuePickerField) => {
if (!wsSlug) return;
@@ -82,7 +84,7 @@ export function CreateFormAttributeRow() {
size={12}
/>
}
- label={labelOf(status)}
+ label={String(labelOf(status))}
variant="filled"
onPress={() => open("status")}
/>
@@ -121,7 +123,11 @@ export function CreateFormAttributeRow() {
color={dueDate ? undefined : "#a1a1aa"}
/>
}
- label={dueDate ? formatDueDate(dueDate) : "Due date"}
+ label={
+ dueDate
+ ? formatDueDate(dueDate) || t("common:fields.due_date")
+ : t("common:fields.due_date")
+ }
variant={dueDate ? "filled" : "dimmed"}
onPress={() => open("due-date")}
/>
@@ -133,7 +139,7 @@ export function CreateFormAttributeRow() {
<Ionicons name="folder-outline" size={14} color="#a1a1aa" />
)
}
- label={project?.title ?? "Project"}
+ label={project?.title ?? t("common:fields.project")}
variant={project ? "filled" : "dimmed"}
onPress={() => open("project")}
/>
@@ -143,6 +149,7 @@ export function CreateFormAttributeRow() {
}
// due_date is a calendar day — format timezone-safely (no offset day shift).
+// An unparseable value falls back to the caller's localized chip label.
function formatDueDate(iso: string): string {
- return formatDateOnly(iso, { month: "short", day: "numeric" }) || "Due date";
+ return formatDateOnly(iso, { month: "short", day: "numeric" });
}
diff --git a/apps/mobile/components/issue/description-field.tsx b/apps/mobile/components/issue/description-field.tsx
index 8fafedc2a4..a85f8f0acc 100644
--- a/apps/mobile/components/issue/description-field.tsx
+++ b/apps/mobile/components/issue/description-field.tsx
@@ -15,19 +15,22 @@ import { View } from "react-native";
import { AutosizeTextArea } from "@/components/ui/autosize-textarea";
import { MIN_BODY_INPUT_HEIGHT_PX } from "@/components/ui/input-tokens";
import { cn } from "@/lib/utils";
+import { useT } from "@/lib/i18n";
import type { UseMentionInputReturn } from "@/lib/use-mention-input";
import { continuousCorners } from "@/lib/radius";
export function DescriptionField({
description,
disabled,
- placeholder = "Description… (type @ to mention)",
+ placeholder,
}: {
description: UseMentionInputReturn;
disabled: boolean;
placeholder?: string;
}) {
+ const { t } = useT("issues");
const [focused, setFocused] = useState(false);
+ const resolvedPlaceholder = placeholder ?? t("new.description_placeholder");
return (
<View
className={cn(
@@ -45,7 +48,7 @@ export function DescriptionField({
onSelectionChange={description.handlers.onSelectionChange}
onFocus={() => setFocused(true)}
onBlur={() => setFocused(false)}
- placeholder={placeholder}
+ placeholder={resolvedPlaceholder}
className="py-2"
minHeight={MIN_BODY_INPUT_HEIGHT_PX}
editable={!disabled}
diff --git a/apps/mobile/components/issue/inline-comment-composer.tsx b/apps/mobile/components/issue/inline-comment-composer.tsx
index 5ecab37255..5d155007b6 100644
--- a/apps/mobile/components/issue/inline-comment-composer.tsx
+++ b/apps/mobile/components/issue/inline-comment-composer.tsx
@@ -17,9 +17,11 @@ import { useCreateComment } from "@/data/mutations/issues";
import { useReplyTargetStore } from "@/data/stores/reply-target-store";
import { useWorkspaceStore } from "@/data/workspace-store";
import { MessageComposer } from "@/components/composer/message-composer";
+import { useT } from "@/lib/i18n";
export function InlineCommentComposer({ issueId }: { issueId: string }) {
const createComment = useCreateComment(issueId);
+ const { t } = useT("issues");
const wsSlug = useWorkspaceStore((s) => s.currentWorkspaceSlug);
const replyTarget = useReplyTargetStore((s) => s.target);
const clearReplyTarget = useReplyTargetStore((s) => s.clear);
@@ -56,8 +58,8 @@ export function InlineCommentComposer({ issueId }: { issueId: string }) {
params: { workspace: wsSlug ?? "", mode: "comment" },
}}
uploadContext={{ issueId }}
- placeholder="Add a comment…"
- pillLabel="Add a comment, @ to mention…"
+ placeholder={t("comments.composer_placeholder")}
+ pillLabel={t("comments.composer_pill")}
pillIcon="chatbubble-ellipses-outline"
replyTarget={
replyTarget
diff --git a/apps/mobile/components/issue/issue-reaction-row.tsx b/apps/mobile/components/issue/issue-reaction-row.tsx
index 02c4fe11f6..6223b1335a 100644
--- a/apps/mobile/components/issue/issue-reaction-row.tsx
+++ b/apps/mobile/components/issue/issue-reaction-row.tsx
@@ -8,16 +8,19 @@
* Renders nothing when there are no reactions. Adding a reaction is
* deferred to a long-press affordance on the issue body (TODO).
*/
-import { useCallback } from "react";
+import { useCallback, useMemo } from "react";
import { View } from "react-native";
-import type { Issue, IssueReaction } from "@multica/core/types";
+import type { Issue } from "@multica/core/types";
import { ReactionBar } from "./reaction-bar";
import { useToggleIssueReaction } from "@/data/mutations/issues";
import { useAuthStore } from "@/data/auth-store";
export function IssueReactionRow({ issue }: { issue: Issue }) {
const userId = useAuthStore((s) => s.user?.id);
- const reactions: IssueReaction[] = issue.reactions ?? [];
+ const reactions = useMemo(
+ () => issue.reactions ?? [],
+ [issue.reactions],
+ );
const toggle = useToggleIssueReaction(issue.id);
const onToggle = useCallback(
diff --git a/apps/mobile/components/issue/mention-suggestion-bar.tsx b/apps/mobile/components/issue/mention-suggestion-bar.tsx
index 3fea33b1eb..26fe86bfb1 100644
--- a/apps/mobile/components/issue/mention-suggestion-bar.tsx
+++ b/apps/mobile/components/issue/mention-suggestion-bar.tsx
@@ -36,6 +36,7 @@ import {
issueColumnCategory,
} from "@/lib/issue-status";
import { useIssueStatuses } from "@/lib/use-issue-statuses";
+import { useT } from "@/lib/i18n";
import { memberListOptions } from "@/data/queries/members";
import { agentListOptions } from "@/data/queries/agents";
import { squadListOptions } from "@/data/queries/squads";
@@ -85,6 +86,7 @@ export function MentionSuggestionBar({
// Rows are icon-only, so colour is the only thing that can carry a custom
// status's identity here. (MUL-6243)
const catalog = useIssueStatuses();
+ const { t } = useT("issues");
// Comment-mode data — disabled in chat mode to avoid wasted fetches.
const { data: members = [] } = useQuery({
@@ -147,11 +149,11 @@ export function MentionSuggestionBar({
const out: Row[] = [];
if (matchedRecent.length > 0) {
- out.push({ kind: "section", label: "Recent" });
+ out.push({ kind: "section", label: t("suggestions.recent") });
for (const i of matchedRecent) out.push({ kind: "issue", issue: i });
}
if (matchedMine.length > 0) {
- out.push({ kind: "section", label: "My issues" });
+ out.push({ kind: "section", label: t("suggestions.my_issues") });
for (const i of matchedMine) out.push({ kind: "issue", issue: i });
}
if (out.length === 0) out.push({ kind: "empty" });
@@ -200,20 +202,20 @@ export function MentionSuggestionBar({
const out: Row[] = [];
if (showAll) out.push({ kind: "all" });
if (matchedMembers.length > 0) {
- out.push({ kind: "section", label: "Members" });
+ out.push({ kind: "section", label: t("picker.people") });
for (const m of matchedMembers) out.push({ kind: "member", member: m });
}
if (matchedAgents.length > 0) {
- out.push({ kind: "section", label: "Agents" });
+ out.push({ kind: "section", label: t("picker.agents") });
for (const a of matchedAgents) out.push({ kind: "agent", agent: a });
}
if (matchedSquads.length > 0) {
- out.push({ kind: "section", label: "Squads" });
+ out.push({ kind: "section", label: t("picker.squads") });
for (const s of matchedSquads) out.push({ kind: "squad", squad: s });
}
if (out.length === 0) out.push({ kind: "empty" });
return out;
- }, [isChat, query, recentIssues, myIssuesAll, members, agents, squads, userId]);
+ }, [isChat, query, recentIssues, myIssuesAll, members, agents, squads, userId, t]);
if (!visible) return null;
@@ -280,9 +282,9 @@ export function MentionSuggestionBar({
<Text className="text-xs font-medium text-brand">@</Text>
</View>
<Text className="flex-1 text-sm text-foreground">
- Everyone
+ {t("suggestions.everyone")}
</Text>
- <Badge label="All" />
+ <Badge label={t("suggestions.all")} />
</Pressable>
);
}
@@ -306,7 +308,7 @@ export function MentionSuggestionBar({
<Text className="flex-1 text-sm text-foreground">
{item.member.name}
</Text>
- <Badge label="Member" />
+ <Badge label={t("suggestions.member")} />
</Pressable>
);
}
@@ -332,7 +334,9 @@ export function MentionSuggestionBar({
{item.agent.name}
</Text>
<Badge
- label={runtimeBound ? "Agent" : "Needs runtime"}
+ label={runtimeBound
+ ? t("picker.agent")
+ : t("picker.needs_runtime")}
tone={runtimeBound ? "brand" : "outline"}
/>
</Pressable>
@@ -354,7 +358,7 @@ export function MentionSuggestionBar({
<Text className="flex-1 text-sm text-foreground">
{item.squad.name}
</Text>
- <Badge label="Squad" tone="outline" />
+ <Badge label={t("picker.squad")} tone="outline" />
</Pressable>
);
}
diff --git a/apps/mobile/components/issue/pickers/assignee-picker-body.tsx b/apps/mobile/components/issue/pickers/assignee-picker-body.tsx
index ad33de65b2..da381b34e2 100644
--- a/apps/mobile/components/issue/pickers/assignee-picker-body.tsx
+++ b/apps/mobile/components/issue/pickers/assignee-picker-body.tsx
@@ -33,6 +33,7 @@ import { useScrollToTopOnChange } from "@/lib/use-scroll-to-top-on-change";
import { THEME } from "@/lib/theme";
import { cn } from "@/lib/utils";
import { isAgentRuntimeBound } from "@/lib/is-agent-runtime-bound";
+import { useT } from "@/lib/i18n";
const AVATAR_SIZE = 36;
@@ -65,6 +66,7 @@ function isRowSelected(value: AssigneeValue, row: Row): boolean {
export function AssigneePickerBody({ value, query, onChange }: Props) {
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
+ const { t } = useT("issues");
const { data: members = [] } = useQuery(memberListOptions(wsId));
const { data: agents = [] } = useQuery(agentListOptions(wsId));
const { data: squads = [] } = useQuery(squadListOptions(wsId));
@@ -184,7 +186,7 @@ export function AssigneePickerBody({ value, query, onChange }: Props) {
)}
<Text className="flex-1 text-base text-foreground">
{item.kind === "unassigned"
- ? "Unassigned"
+ ? t("picker.unassigned")
: item.kind === "member"
? item.member.name
: item.kind === "agent"
@@ -197,11 +199,15 @@ export function AssigneePickerBody({ value, query, onChange }: Props) {
the same row. Members carry no tag (they're the default actor). */}
{item.kind === "agent" ? (
<Text className="text-sm text-muted-foreground">
- {isAgentRuntimeBound(item.agent) ? "Agent" : "Needs runtime"}
+ {isAgentRuntimeBound(item.agent)
+ ? t("picker.agent")
+ : t("picker.needs_runtime")}
</Text>
) : item.kind === "squad" ? (
<Text className="text-sm text-muted-foreground">
- {needsRuntime ? "Leader needs runtime" : "Squad"}
+ {needsRuntime
+ ? t("picker.leader_needs_runtime")
+ : t("picker.squad")}
</Text>
) : null}
{isSelected(item) ? (
@@ -212,7 +218,9 @@ export function AssigneePickerBody({ value, query, onChange }: Props) {
}}
ListEmptyComponent={
<View className="px-3 py-8 items-center">
- <Text className="text-sm text-muted-foreground">No matches.</Text>
+ <Text className="text-sm text-muted-foreground">
+ {t("picker.no_matches")}
+ </Text>
</View>
}
/>
diff --git a/apps/mobile/components/issue/pickers/due-date-picker-body.tsx b/apps/mobile/components/issue/pickers/due-date-picker-body.tsx
index 671a8fe08a..873e25bdde 100644
--- a/apps/mobile/components/issue/pickers/due-date-picker-body.tsx
+++ b/apps/mobile/components/issue/pickers/due-date-picker-body.tsx
@@ -13,6 +13,7 @@ import { useState, useEffect, useImperativeHandle, forwardRef } from "react";
import { View } from "react-native";
import DateTimePicker from "@react-native-community/datetimepicker";
import { toDateOnly, dateOnlyToLocalDate } from "@multica/core/issues/date";
+import { i18n } from "@/lib/i18n";
interface Props {
value: string | null;
@@ -45,6 +46,7 @@ export const DueDatePickerBody = forwardRef<DueDatePickerBodyHandle, Props>(
value={draft}
mode="date"
display="inline"
+ locale={i18n.resolvedLanguage ?? i18n.language}
onChange={(_event, selected) => {
if (selected) setDraft(selected);
}}
diff --git a/apps/mobile/components/issue/pickers/label-picker-body.tsx b/apps/mobile/components/issue/pickers/label-picker-body.tsx
index 82cd074192..a3fd64f37d 100644
--- a/apps/mobile/components/issue/pickers/label-picker-body.tsx
+++ b/apps/mobile/components/issue/pickers/label-picker-body.tsx
@@ -25,6 +25,7 @@ import { useWorkspaceStore } from "@/data/workspace-store";
import { useScrollToTopOnChange } from "@/lib/use-scroll-to-top-on-change";
import { pickInlineColor } from "@/lib/inline-color";
import { THEME } from "@/lib/theme";
+import { useT } from "@/lib/i18n";
type Row =
| { kind: "create"; name: string }
@@ -47,6 +48,7 @@ export function LabelPickerBody({
onCreate,
}: Props) {
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
+ const { t } = useT("issues");
const { data: labels = [] } = useQuery(labelListOptions(wsId));
const listRef = useScrollToTopOnChange(query);
const { colorScheme } = useColorScheme();
@@ -118,7 +120,7 @@ export function LabelPickerBody({
style={{ backgroundColor: pickInlineColor(item.name) }}
/>
<Text className="flex-1 text-base text-foreground">
- Create &ldquo;{item.name}&rdquo;
+ {t("picker.create_label", { name: item.name })}
</Text>
<Ionicons name="add" size={20} color={checkColor} />
</Pressable>
@@ -147,8 +149,8 @@ export function LabelPickerBody({
<View className="px-3 py-8 items-center">
<Text className="text-sm text-muted-foreground text-center">
{query
- ? "No matches."
- : "No labels in this workspace yet."}
+ ? t("picker.no_matches")
+ : t("picker.no_labels")}
</Text>
</View>
}
diff --git a/apps/mobile/components/issue/pickers/mention-picker-body.tsx b/apps/mobile/components/issue/pickers/mention-picker-body.tsx
index cc491676f1..461addf09c 100644
--- a/apps/mobile/components/issue/pickers/mention-picker-body.tsx
+++ b/apps/mobile/components/issue/pickers/mention-picker-body.tsx
@@ -49,6 +49,7 @@ import { useScrollToTopOnChange } from "@/lib/use-scroll-to-top-on-change";
import { THEME } from "@/lib/theme";
import { isAgentRuntimeBound } from "@/lib/is-agent-runtime-bound";
import { cn } from "@/lib/utils";
+import { useT } from "@/lib/i18n";
const AVATAR_SIZE = 36;
@@ -72,6 +73,7 @@ interface Props {
export function MentionPickerBody({ query, mode = "comment" }: Props) {
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
+ const { t } = useT("issues");
// Rows are icon-only here too — colour is what names a custom status.
const catalog = useIssueStatuses();
const { data: members = [] } = useQuery(memberListOptions(wsId));
@@ -152,32 +154,32 @@ export function MentionPickerBody({ query, mode = "comment" }: Props) {
.sort((a, b) => a.name.localeCompare(b.name))
.map((m): Row => ({ kind: "member", member: m }));
if (memberRows.length > 0) {
- out.push({ kind: "section", label: "People" }, ...memberRows);
+ out.push({ kind: "section", label: t("picker.people") }, ...memberRows);
}
const agentRows = [...agents]
.filter((a) => matchName(a.name))
.sort((a, b) => a.name.localeCompare(b.name))
.map((a): Row => ({ kind: "agent", agent: a }));
if (agentRows.length > 0) {
- out.push({ kind: "section", label: "Agents" }, ...agentRows);
+ out.push({ kind: "section", label: t("picker.agents") }, ...agentRows);
}
const squadRows = [...squads]
.filter((s) => !s.archived_at && matchName(s.name))
.sort((a, b) => a.name.localeCompare(b.name))
.map((s): Row => ({ kind: "squad", squad: s }));
if (squadRows.length > 0) {
- out.push({ kind: "section", label: "Squads" }, ...squadRows);
+ out.push({ kind: "section", label: t("picker.squads") }, ...squadRows);
}
}
if (issueResults.length > 0) {
- out.push({ kind: "section", label: "Issues" });
+ out.push({ kind: "section", label: t("picker.issues") });
for (const i of issueResults) {
out.push({ kind: "issue", issue: i });
}
}
return out;
- }, [mode, members, agents, squads, issueResults, query]);
+ }, [mode, members, agents, squads, issueResults, query, t]);
const pick = (row: Row) => {
let chip: MentionChipDraft | null = null;
@@ -288,7 +290,7 @@ export function MentionPickerBody({ query, mode = "comment" }: Props) {
) : (
<Text className="flex-1 text-base text-foreground">
{item.kind === "all"
- ? "Everyone (@all)"
+ ? t("picker.everyone")
: item.kind === "member"
? item.member.name
: item.kind === "agent"
@@ -298,11 +300,15 @@ export function MentionPickerBody({ query, mode = "comment" }: Props) {
)}
{item.kind === "agent" ? (
<Text className="text-sm text-muted-foreground">
- {isAgentRuntimeBound(item.agent) ? "Agent" : "Needs runtime"}
+ {isAgentRuntimeBound(item.agent)
+ ? t("picker.agent")
+ : t("picker.needs_runtime")}
</Text>
) : item.kind === "squad" ? (
<Text className="text-sm text-muted-foreground">
- {needsRuntime ? "Leader needs runtime" : "Squad"}
+ {needsRuntime
+ ? t("picker.leader_needs_runtime")
+ : t("picker.squad")}
</Text>
) : null}
{isSelected(item) ? (
@@ -313,7 +319,9 @@ export function MentionPickerBody({ query, mode = "comment" }: Props) {
}}
ListEmptyComponent={
<View className="px-3 py-8 items-center">
- <Text className="text-sm text-muted-foreground">No matches.</Text>
+ <Text className="text-sm text-muted-foreground">
+ {t("picker.no_matches")}
+ </Text>
</View>
}
/>
diff --git a/apps/mobile/components/issue/pickers/priority-picker-body.tsx b/apps/mobile/components/issue/pickers/priority-picker-body.tsx
index cdefc933f3..d15fd4a4b0 100644
--- a/apps/mobile/components/issue/pickers/priority-picker-body.tsx
+++ b/apps/mobile/components/issue/pickers/priority-picker-body.tsx
@@ -10,6 +10,7 @@ import { Text } from "@/components/ui/text";
import { PriorityIcon } from "@/components/ui/priority-icon";
import { PRIORITY_LABEL } from "@/lib/issue-status";
import { THEME } from "@/lib/theme";
+import { useT } from "@/lib/i18n";
// Display order: severity descending (urgent → none).
const PRIORITY_OPTIONS: IssuePriority[] = [
@@ -27,13 +28,16 @@ interface Props {
export function PriorityPickerBody({ value, onChange }: Props) {
const { colorScheme } = useColorScheme();
+ const { t } = useT("issues");
const checkColor =
colorScheme === "dark" ? THEME.dark.primary : THEME.light.primary;
return (
<ScrollView showsVerticalScrollIndicator={false}>
<View className="px-4 pt-3 pb-2">
- <Text className="text-lg font-semibold text-foreground">Priority</Text>
+ <Text className="text-lg font-semibold text-foreground">
+ {t("filters.priority")}
+ </Text>
</View>
<View className="px-2">
{PRIORITY_OPTIONS.map((v) => {
@@ -46,7 +50,7 @@ export function PriorityPickerBody({ value, onChange }: Props) {
>
<PriorityIcon priority={v} size={16} />
<Text className="flex-1 text-base text-foreground">
- {PRIORITY_LABEL[v]}
+ {t(PRIORITY_LABEL[v])}
</Text>
{selected ? (
<Ionicons name="checkmark" size={20} color={checkColor} />
diff --git a/apps/mobile/components/issue/pickers/project-picker-body.tsx b/apps/mobile/components/issue/pickers/project-picker-body.tsx
index 68004ef846..cc4c8e2a9f 100644
--- a/apps/mobile/components/issue/pickers/project-picker-body.tsx
+++ b/apps/mobile/components/issue/pickers/project-picker-body.tsx
@@ -19,6 +19,7 @@ import { projectListOptions } from "@/data/queries/projects";
import { useWorkspaceStore } from "@/data/workspace-store";
import { useScrollToTopOnChange } from "@/lib/use-scroll-to-top-on-change";
import { THEME } from "@/lib/theme";
+import { useT } from "@/lib/i18n";
type Row = { kind: "none" } | { kind: "project"; project: Project };
@@ -30,6 +31,7 @@ interface Props {
export function ProjectPickerBody({ value, query, onChange }: Props) {
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
+ const { t } = useT("issues");
const { data: projects = [] } = useQuery(projectListOptions(wsId));
const listRef = useScrollToTopOnChange(query);
const { colorScheme } = useColorScheme();
@@ -96,7 +98,9 @@ export function ProjectPickerBody({ value, query, onChange }: Props) {
className="flex-1 text-base text-foreground"
numberOfLines={1}
>
- {item.kind === "none" ? "No project" : item.project.title}
+ {item.kind === "none"
+ ? t("picker.no_project")
+ : item.project.title}
</Text>
{isSelected(item) ? (
<Ionicons name="checkmark" size={20} color={checkColor} />
@@ -107,8 +111,8 @@ export function ProjectPickerBody({ value, query, onChange }: Props) {
<View className="px-3 py-8 items-center">
<Text className="text-sm text-muted-foreground text-center">
{query
- ? "No matches."
- : "No projects in this workspace yet.\nCreate them on web."}
+ ? t("picker.no_matches")
+ : t("picker.no_projects")}
</Text>
</View>
}
diff --git a/apps/mobile/components/issue/pickers/status-picker-body.tsx b/apps/mobile/components/issue/pickers/status-picker-body.tsx
index 603929de43..50710a4a8b 100644
--- a/apps/mobile/components/issue/pickers/status-picker-body.tsx
+++ b/apps/mobile/components/issue/pickers/status-picker-body.tsx
@@ -23,6 +23,7 @@ import { StatusIcon } from "@/components/ui/status-icon";
import { statusOptions } from "@/lib/issue-status";
import { useIssueStatuses } from "@/lib/use-issue-statuses";
import { THEME } from "@/lib/theme";
+import { useT } from "@/lib/i18n";
interface Props {
value: IssueStatus;
@@ -34,12 +35,15 @@ export function StatusPickerBody({ value, onChange }: Props) {
const checkColor =
colorScheme === "dark" ? THEME.dark.primary : THEME.light.primary;
const catalog = useIssueStatuses();
+ const { t } = useT("issues");
const options = statusOptions(catalog);
return (
<ScrollView showsVerticalScrollIndicator={false}>
<View className="px-4 pt-3 pb-2">
- <Text className="text-lg font-semibold text-foreground">Status</Text>
+ <Text className="text-lg font-semibold text-foreground">
+ {t("filters.status")}
+ </Text>
</View>
<View className="px-2">
{options.map((option) => {
@@ -57,7 +61,7 @@ export function StatusPickerBody({ value, onChange }: Props) {
size={18}
/>
<Text className="flex-1 text-base text-foreground">
- {option.label}
+ {catalog.labelOf(option.key)}
</Text>
{selected ? (
<Ionicons name="checkmark" size={20} color={checkColor} />
diff --git a/apps/mobile/components/issue/run-row.tsx b/apps/mobile/components/issue/run-row.tsx
index 874c9e1b7c..f11bc1e328 100644
--- a/apps/mobile/components/issue/run-row.tsx
+++ b/apps/mobile/components/issue/run-row.tsx
@@ -18,6 +18,7 @@ import { useCancelTask } from "@/data/mutations/issues";
import { useActorLookup } from "@/data/use-actor-name";
import { runFailureBadgeLabel } from "@/lib/run-failure-badge";
import { timeAgo } from "@/lib/time-ago";
+import { useT } from "@/lib/i18n";
interface Props {
task: AgentTask;
@@ -32,8 +33,10 @@ const ACTIVE_STATUSES: readonly AgentTask["status"][] = [
export function RunRow({ task, issueId }: Props) {
const { getName } = useActorLookup();
+ const { t } = useT("issues");
const isActive = ACTIVE_STATUSES.includes(task.status);
- const summary = task.trigger_summary?.trim() || fallbackSummary(task);
+ const summary =
+ task.trigger_summary?.trim() || fallbackSummary(task, t);
// Past tasks use completed_at when present (server fills it for terminal
// statuses); active tasks fall back to created_at so the user sees how
// long it's been waiting.
@@ -63,7 +66,8 @@ export function RunRow({ task, issueId }: Props) {
}
function StatusBadge({ task }: { task: AgentTask }) {
- const label = STATUS_LABEL[task.status] ?? task.status;
+ const { t } = useT("issues");
+ const label = t(`runs.status.${task.status}`);
const cls = STATUS_CLASS[task.status] ?? "text-muted-foreground";
// For failed tasks, surface the failure_reason inline so users don't have
// to drill in. Missing / empty / unrecognised stays as just "Failed".
@@ -88,15 +92,16 @@ function CancelButton({
issueId: string;
}) {
const mutation = useCancelTask(issueId);
+ const { t } = useT("issues");
const onPress = () => {
Alert.alert(
- "Cancel task?",
- "The agent will stop after the current step.",
+ t("cancel.title"),
+ t("cancel.message"),
[
- { text: "Keep running", style: "cancel" },
+ { text: t("cancel.keep_running"), style: "cancel" },
{
- text: "Cancel task",
+ text: t("cancel.cancel_task"),
style: "destructive",
onPress: () => mutation.mutate(taskId),
},
@@ -110,38 +115,32 @@ function CancelButton({
disabled={mutation.isPending}
className="px-3 py-1.5 rounded-md bg-secondary active:opacity-70"
>
- <Text className="text-xs font-medium text-foreground">Cancel</Text>
+ <Text className="text-xs font-medium text-foreground">
+ {t("common:actions.cancel")}
+ </Text>
</Pressable>
);
}
-function fallbackSummary(task: AgentTask): string {
+function fallbackSummary(
+ task: AgentTask,
+ t: (key: string) => string,
+): string {
switch (task.kind) {
case "comment":
- return "Comment task";
+ return t("summary.comment");
case "autopilot":
- return "Autopilot run";
+ return t("summary.autopilot");
case "chat":
- return "Chat task";
+ return t("summary.chat");
case "quick_create":
- return "Quick create";
+ return t("summary.quick_create");
case "direct":
default:
- return "Task";
+ return t("summary.direct");
}
}
-const STATUS_LABEL: Record<AgentTask["status"], string> = {
- queued: "Queued",
- deferred: "Queued",
- dispatched: "Starting",
- waiting_local_directory: "Waiting for directory",
- running: "Running",
- completed: "Done",
- failed: "Failed",
- cancelled: "Cancelled",
-};
-
const STATUS_CLASS: Record<AgentTask["status"], string> = {
queued: "text-muted-foreground",
deferred: "text-muted-foreground",
diff --git a/apps/mobile/components/issue/submit-issue-button.tsx b/apps/mobile/components/issue/submit-issue-button.tsx
index 196d3029e6..229b7af978 100644
--- a/apps/mobile/components/issue/submit-issue-button.tsx
+++ b/apps/mobile/components/issue/submit-issue-button.tsx
@@ -8,6 +8,7 @@
import { ActivityIndicator, Pressable, View } from "react-native";
import { Ionicons } from "@expo/vector-icons";
import { cn } from "@/lib/utils";
+import { useT } from "@/lib/i18n";
interface Props {
disabled: boolean;
@@ -16,12 +17,13 @@ interface Props {
}
export function SubmitIssueButton({ disabled, onPress, loading }: Props) {
+ const { t } = useT("issues");
const interactive = !disabled && !loading;
return (
<Pressable
onPress={interactive ? onPress : undefined}
hitSlop={8}
- accessibilityLabel="Create issue"
+ accessibilityLabel={t("new.create")}
accessibilityState={{ disabled: !interactive, busy: loading }}
className={cn(interactive && "active:opacity-60")}
>
diff --git a/apps/mobile/components/issue/timeline-list.tsx b/apps/mobile/components/issue/timeline-list.tsx
index fee16f0a76..20b2e513f9 100644
--- a/apps/mobile/components/issue/timeline-list.tsx
+++ b/apps/mobile/components/issue/timeline-list.tsx
@@ -104,6 +104,7 @@ import { useWorkspaceStore } from "@/data/workspace-store";
import type { ImageSequenceBlock } from "@multica/core/attachments/image-sequence";
import { useColorScheme } from "@/lib/use-color-scheme";
import { THEME } from "@/lib/theme";
+import { useT } from "@/lib/i18n";
import { useCommentSelectStore } from "@/data/comment-select-store";
interface Props {
@@ -499,11 +500,12 @@ function RowSeparator() {
* disappears the next time the user scrolls past and unmounts the screen).
*/
function UnreadDivider() {
+ const { t } = useT("issues");
return (
<View className="flex-row items-center gap-2 px-4">
<View className="flex-1 h-px bg-destructive/40" />
<Text className="text-[10px] uppercase tracking-wider font-medium text-destructive">
- New
+ {t("new_badge")}
</Text>
<View className="flex-1 h-px bg-destructive/40" />
</View>
@@ -529,13 +531,17 @@ function NewCommentChip({
onPress: () => void;
}) {
const { colorScheme } = useColorScheme();
+ const { t } = useT("issues");
const fg = THEME[colorScheme].primaryForeground;
return (
<Pressable
onPress={onPress}
className="absolute bottom-3 self-center px-3.5 py-1.5 rounded-full bg-primary active:opacity-80 flex-row items-center gap-1.5"
accessibilityRole="button"
- accessibilityLabel={`Jump to ${count} new ${count === 1 ? "message" : "messages"}`}
+ accessibilityLabel={t(
+ count === 1 ? "jump_a11y_one" : "jump_a11y_other",
+ { count },
+ )}
style={{
// shadow comes from system, not Tailwind — keeps the chip readable
// against either light or dark timeline content beneath.
diff --git a/apps/mobile/components/nav/more-tab-dropdown.tsx b/apps/mobile/components/nav/more-tab-dropdown.tsx
index 9aac93b8e1..c2f231d88b 100644
--- a/apps/mobile/components/nav/more-tab-dropdown.tsx
+++ b/apps/mobile/components/nav/more-tab-dropdown.tsx
@@ -54,6 +54,7 @@ import { WorkspaceAvatar } from "@/components/workspace/workspace-avatar";
import { workspaceListOptions } from "@/data/queries/workspaces";
import { useAuthStore } from "@/data/auth-store";
import { useWorkspaceStore } from "@/data/workspace-store";
+import { useT } from "@/lib/i18n";
import { useColorScheme } from "@/lib/use-color-scheme";
import { THEME } from "@/lib/theme";
import { cn } from "@/lib/utils";
@@ -66,7 +67,7 @@ import { cn } from "@/lib/utils";
const TAB_BAR_HEIGHT = 49;
interface NavItem {
- label: string;
+ labelKey: "more_menu.pinned" | "more_menu.issues" | "more_menu.projects";
/** SF Symbol name, rendered via expo-image `source: "sf:<name>"`. */
icon: string;
/** Path under /:slug/ — final href is `/${slug}${path}`. */
@@ -74,9 +75,9 @@ interface NavItem {
}
const NAV_ITEMS: NavItem[] = [
- { label: "Pinned", icon: "pin", path: "/more/pins" },
- { label: "Issues", icon: "list.bullet", path: "/more/issues" },
- { label: "Projects", icon: "square.stack", path: "/more/projects" },
+ { labelKey: "more_menu.pinned", icon: "pin", path: "/more/pins" },
+ { labelKey: "more_menu.issues", icon: "list.bullet", path: "/more/issues" },
+ { labelKey: "more_menu.projects", icon: "square.stack", path: "/more/projects" },
];
export function MoreTabDropdownAnchor({
@@ -89,7 +90,8 @@ export function MoreTabDropdownAnchor({
const user = useAuthStore((s) => s.user);
const pathname = usePathname();
const { colorScheme } = useColorScheme();
- const t = THEME[colorScheme];
+ const { t } = useT("navigation");
+ const theme = THEME[colorScheme];
const currentWorkspace = useCurrentWorkspace(slug);
const isActive = (path: string) => {
@@ -132,7 +134,7 @@ export function MoreTabDropdownAnchor({
<UserCard
user={user}
onPress={() => slug && router.push(`/${slug}/more/settings`)}
- chevronTint={t.mutedForeground}
+ chevronTint={theme.mutedForeground}
/>
<DropdownMenuSeparator />
@@ -143,7 +145,7 @@ export function MoreTabDropdownAnchor({
onPress={() =>
slug && router.push(`/${slug}/switch-workspace`)
}
- chevronTint={t.mutedForeground}
+ chevronTint={theme.mutedForeground}
/>
<DropdownMenuSeparator />
@@ -152,7 +154,7 @@ export function MoreTabDropdownAnchor({
<DropdownMenuItem
key={item.path}
onPress={() => slug && router.push(`/${slug}${item.path}`)}
- accessibilityLabel={item.label}
+ accessibilityLabel={t(item.labelKey)}
className={cn(
"h-9 gap-3",
isActive(item.path) && "bg-secondary",
@@ -160,10 +162,10 @@ export function MoreTabDropdownAnchor({
>
<ExpoImage
source={`sf:${item.icon}`}
- tintColor={t.foreground}
+ tintColor={theme.foreground}
style={{ width: 18, height: 18 }}
/>
- <Text className="text-sm text-foreground">{item.label}</Text>
+ <Text className="text-sm text-foreground">{t(item.labelKey)}</Text>
</DropdownMenuItem>
))}
</DropdownMenuContent>
@@ -188,11 +190,12 @@ function UserCard({
chevronTint: string;
}) {
const initial = (user?.name ?? user?.email ?? "U").charAt(0).toUpperCase();
+ const { t } = useT("navigation");
return (
<DropdownMenuItem
onPress={onPress}
className="h-12 gap-3"
- accessibilityLabel="Account settings"
+ accessibilityLabel={t("more_menu.account_settings")}
>
{user?.avatar_url ? (
<Image
@@ -257,6 +260,7 @@ function WorkspaceCard({
onPress: () => void;
chevronTint: string;
}) {
+ const { t } = useT("navigation");
const { data } = useQuery(workspaceListOptions());
const canSwitch = (data?.length ?? 0) > 1;
@@ -266,11 +270,13 @@ function WorkspaceCard({
disabled={!canSwitch}
className="h-12 gap-3"
accessibilityLabel={
- canSwitch ? "Switch workspace" : currentWorkspaceName ?? "Workspace"
+ canSwitch
+ ? t("settings:workspace.switch")
+ : currentWorkspaceName ?? t("settings:account.workspace")
}
>
<WorkspaceAvatar
- name={currentWorkspaceName ?? "Workspace"}
+ name={currentWorkspaceName ?? t("settings:account.workspace")}
avatarUrl={currentWorkspaceAvatarUrl}
size={32}
/>
@@ -279,7 +285,7 @@ function WorkspaceCard({
className="text-sm font-medium text-foreground"
numberOfLines={1}
>
- {currentWorkspaceName ?? "Workspace"}
+ {currentWorkspaceName ?? t("settings:account.workspace")}
</Text>
</View>
{canSwitch ? (
diff --git a/apps/mobile/components/project/pickers/project-lead-picker-body.tsx b/apps/mobile/components/project/pickers/project-lead-picker-body.tsx
index d721f6a0d9..073566a554 100644
--- a/apps/mobile/components/project/pickers/project-lead-picker-body.tsx
+++ b/apps/mobile/components/project/pickers/project-lead-picker-body.tsx
@@ -24,6 +24,7 @@ import { memberListOptions } from "@/data/queries/members";
import { useWorkspaceStore } from "@/data/workspace-store";
import { useScrollToTopOnChange } from "@/lib/use-scroll-to-top-on-change";
import { THEME } from "@/lib/theme";
+import { useT } from "@/lib/i18n";
const AVATAR_SIZE = 36;
@@ -53,6 +54,7 @@ function isRowSelected(value: LeadValue | null, row: Row): boolean {
export function ProjectLeadPickerBody({ value, query, onChange }: Props) {
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
+ const { t } = useT("issues");
const { data: members = [] } = useQuery(memberListOptions(wsId));
const { data: agents = [] } = useQuery(agentListOptions(wsId));
const listRef = useScrollToTopOnChange(query);
@@ -141,14 +143,16 @@ export function ProjectLeadPickerBody({ value, query, onChange }: Props) {
numberOfLines={1}
>
{item.kind === "unassigned"
- ? "Unassigned"
+ ? t("picker.unassigned")
: item.kind === "member"
? item.member.name
: item.agent.name}
</Text>
{/* Inline type tag — Apple UITableViewCellStyleValue1. */}
{item.kind === "agent" ? (
- <Text className="text-sm text-muted-foreground">Agent</Text>
+ <Text className="text-sm text-muted-foreground">
+ {t("picker.agent")}
+ </Text>
) : null}
{isRowSelected(value, item) ? (
<Ionicons name="checkmark" size={20} color={checkColor} />
@@ -159,8 +163,8 @@ export function ProjectLeadPickerBody({ value, query, onChange }: Props) {
<View className="px-3 py-8 items-center">
<Text className="text-sm text-muted-foreground text-center">
{query
- ? "No matches."
- : "No members or agents in this workspace yet."}
+ ? t("picker.no_matches")
+ : t("picker.no_members_agents")}
</Text>
</View>
}
diff --git a/apps/mobile/components/project/pickers/project-priority-picker-body.tsx b/apps/mobile/components/project/pickers/project-priority-picker-body.tsx
index 0a8f792c77..08c47c3b77 100644
--- a/apps/mobile/components/project/pickers/project-priority-picker-body.tsx
+++ b/apps/mobile/components/project/pickers/project-priority-picker-body.tsx
@@ -11,9 +11,10 @@ import { Text } from "@/components/ui/text";
import { ProjectPriorityIcon } from "@/components/ui/project-priority-icon";
import {
PROJECT_PRIORITIES,
- PROJECT_PRIORITY_LABEL,
+ projectPriorityLabel,
} from "@/lib/project-status";
import { THEME } from "@/lib/theme";
+import { useT } from "@/lib/i18n";
interface Props {
value: ProjectPriority | string;
@@ -22,13 +23,16 @@ interface Props {
export function ProjectPriorityPickerBody({ value, onChange }: Props) {
const { colorScheme } = useColorScheme();
+ const { t } = useT();
const checkColor =
colorScheme === "dark" ? THEME.dark.primary : THEME.light.primary;
return (
<ScrollView showsVerticalScrollIndicator={false}>
<View className="px-4 pt-3 pb-2">
- <Text className="text-lg font-semibold text-foreground">Priority</Text>
+ <Text className="text-lg font-semibold text-foreground">
+ {t("fields.priority")}
+ </Text>
</View>
<View className="px-2">
{PROJECT_PRIORITIES.map((priority) => {
@@ -41,7 +45,7 @@ export function ProjectPriorityPickerBody({ value, onChange }: Props) {
>
<ProjectPriorityIcon priority={priority} size={18} />
<Text className="flex-1 text-base text-foreground">
- {PROJECT_PRIORITY_LABEL[priority]}
+ {projectPriorityLabel(priority)}
</Text>
{selected ? (
<Ionicons name="checkmark" size={20} color={checkColor} />
diff --git a/apps/mobile/components/project/pickers/project-status-picker-body.tsx b/apps/mobile/components/project/pickers/project-status-picker-body.tsx
index 77ed89b46f..01ada51da7 100644
--- a/apps/mobile/components/project/pickers/project-status-picker-body.tsx
+++ b/apps/mobile/components/project/pickers/project-status-picker-body.tsx
@@ -11,9 +11,10 @@ import { Text } from "@/components/ui/text";
import { ProjectStatusIcon } from "@/components/ui/project-status-icon";
import {
PROJECT_STATUSES,
- PROJECT_STATUS_LABEL,
+ projectStatusLabel,
} from "@/lib/project-status";
import { THEME } from "@/lib/theme";
+import { useT } from "@/lib/i18n";
interface Props {
value: ProjectStatus | string;
@@ -22,13 +23,16 @@ interface Props {
export function ProjectStatusPickerBody({ value, onChange }: Props) {
const { colorScheme } = useColorScheme();
+ const { t } = useT();
const checkColor =
colorScheme === "dark" ? THEME.dark.primary : THEME.light.primary;
return (
<ScrollView showsVerticalScrollIndicator={false}>
<View className="px-4 pt-3 pb-2">
- <Text className="text-lg font-semibold text-foreground">Status</Text>
+ <Text className="text-lg font-semibold text-foreground">
+ {t("fields.status")}
+ </Text>
</View>
<View className="px-2">
{PROJECT_STATUSES.map((status) => {
@@ -41,7 +45,7 @@ export function ProjectStatusPickerBody({ value, onChange }: Props) {
>
<ProjectStatusIcon status={status} size={18} />
<Text className="flex-1 text-base text-foreground">
- {PROJECT_STATUS_LABEL[status]}
+ {projectStatusLabel(status)}
</Text>
{selected ? (
<Ionicons name="checkmark" size={20} color={checkColor} />
diff --git a/apps/mobile/components/project/project-properties-section.tsx b/apps/mobile/components/project/project-properties-section.tsx
index 36a5f8612f..af8f83c289 100644
--- a/apps/mobile/components/project/project-properties-section.tsx
+++ b/apps/mobile/components/project/project-properties-section.tsx
@@ -23,6 +23,7 @@ import {
import { useActorLookup } from "@/data/use-actor-name";
import { useColorScheme } from "@/lib/use-color-scheme";
import { THEME } from "@/lib/theme";
+import { useT } from "@/lib/i18n";
interface Props {
project: Project;
@@ -38,6 +39,7 @@ export function ProjectPropertiesSection({
onPressLead,
}: Props) {
const { getName } = useActorLookup();
+ const { t } = useT("projects");
const leadName =
project.lead_type && project.lead_id
? getName(project.lead_type, project.lead_id)
@@ -46,7 +48,7 @@ export function ProjectPropertiesSection({
return (
<View className="border-y border-border bg-background">
<Row
- label="Status"
+ label={t("properties.status")}
onPress={onPressStatus}
left={<ProjectStatusIcon status={project.status} size={16} />}
right={
@@ -57,7 +59,7 @@ export function ProjectPropertiesSection({
/>
<Separator />
<Row
- label="Priority"
+ label={t("properties.priority")}
onPress={onPressPriority}
left={<ProjectPriorityIcon priority={project.priority} size={16} />}
right={
@@ -68,7 +70,7 @@ export function ProjectPropertiesSection({
/>
<Separator />
<Row
- label="Lead"
+ label={t("properties.lead")}
onPress={onPressLead}
left={
leadName ? (
@@ -90,7 +92,7 @@ export function ProjectPropertiesSection({
: "text-sm text-muted-foreground"
}
>
- {leadName ?? "Unassigned"}
+ {leadName ?? t("properties.unassigned")}
</Text>
}
/>
diff --git a/apps/mobile/components/project/project-related-issues.tsx b/apps/mobile/components/project/project-related-issues.tsx
index 38ffa2022c..fb91d4f917 100644
--- a/apps/mobile/components/project/project-related-issues.tsx
+++ b/apps/mobile/components/project/project-related-issues.tsx
@@ -13,6 +13,7 @@ import { projectIssuesOptions } from "@/data/queries/projects";
import { useWorkspaceStore } from "@/data/workspace-store";
import { groupIssuesByStatus } from "@/lib/group-issues-by-status";
import { useIssueStatuses } from "@/lib/use-issue-statuses";
+import { useT } from "@/lib/i18n";
interface Props {
projectId: string;
@@ -21,6 +22,7 @@ interface Props {
export function ProjectRelatedIssues({ projectId }: Props) {
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
const wsSlug = useWorkspaceStore((s) => s.currentWorkspaceSlug);
+ const { t } = useT("issues");
const { data, isLoading, error, refetch } = useQuery(
projectIssuesOptions(wsId, projectId),
);
@@ -38,11 +40,12 @@ export function ProjectRelatedIssues({ projectId }: Props) {
return (
<View className="px-4 py-6 gap-3">
<Text className="text-sm text-destructive">
- Failed to load issues:{" "}
- {error instanceof Error ? error.message : "unknown error"}
+ {t("errors.load_failed", {
+ message: error instanceof Error ? error.message : "unknown",
+ })}
</Text>
<Button variant="outline" onPress={() => refetch()}>
- <Text>Retry</Text>
+ <Text>{t("common:actions.retry")}</Text>
</Button>
</View>
);
@@ -51,7 +54,7 @@ export function ProjectRelatedIssues({ projectId }: Props) {
if ((data?.length ?? 0) === 0) {
return (
<View className="px-4 py-6">
- <Text className="text-sm text-muted-foreground">No issues yet.</Text>
+ <Text className="text-sm text-muted-foreground">{t("list.empty")}</Text>
</View>
);
}
diff --git a/apps/mobile/components/project/project-resources-section.tsx b/apps/mobile/components/project/project-resources-section.tsx
index 1f53a1276d..553bcff5c1 100644
--- a/apps/mobile/components/project/project-resources-section.tsx
+++ b/apps/mobile/components/project/project-resources-section.tsx
@@ -21,6 +21,7 @@ import { useDeleteProjectResource } from "@/data/mutations/projects";
import { useWorkspaceStore } from "@/data/workspace-store";
import { useColorScheme } from "@/lib/use-color-scheme";
import { THEME } from "@/lib/theme";
+import { useT } from "@/lib/i18n";
interface Props {
projectId: string;
@@ -29,6 +30,7 @@ interface Props {
export function ProjectResourcesSection({ projectId, onAdd }: Props) {
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
+ const { t } = useT("projects");
const { data: resources, isLoading } = useQuery(
projectResourcesOptions(wsId, projectId),
);
@@ -45,12 +47,12 @@ export function ProjectResourcesSection({ projectId, onAdd }: Props) {
const onLongPress = (resource: ProjectResource) => {
Alert.alert(
- "Detach resource?",
+ t("resources.detach_title"),
describeResource(resource),
[
- { text: "Cancel", style: "cancel" },
+ { text: t("common:actions.cancel"), style: "cancel" },
{
- text: "Detach",
+ text: t("resources.detach"),
style: "destructive",
onPress: () => remove.mutate(resource.id),
},
@@ -62,10 +64,10 @@ export function ProjectResourcesSection({ projectId, onAdd }: Props) {
<View>
<View className="flex-row items-center justify-between px-4 py-2 bg-background">
<Text className="text-xs uppercase tracking-wider text-muted-foreground font-medium">
- Resources
+ {t("resources.title")}
</Text>
<Pressable onPress={onAdd} className="px-2 py-1 active:bg-secondary rounded-xs">
- <Text className="text-xs text-brand">Add</Text>
+ <Text className="text-xs text-brand">{t("resources.add")}</Text>
</Pressable>
</View>
{isLoading ? (
@@ -75,7 +77,7 @@ export function ProjectResourcesSection({ projectId, onAdd }: Props) {
) : !resources || resources.length === 0 ? (
<View className="px-4 py-3">
<Text className="text-sm text-muted-foreground/70">
- No resources attached.
+ {t("resources.empty")}
</Text>
</View>
) : (
diff --git a/apps/mobile/components/ui/app-header-actions.tsx b/apps/mobile/components/ui/app-header-actions.tsx
index 9ddc81ea62..06b42cceab 100644
--- a/apps/mobile/components/ui/app-header-actions.tsx
+++ b/apps/mobile/components/ui/app-header-actions.tsx
@@ -11,9 +11,11 @@
import { router } from "expo-router";
import { IconButton } from "@/components/ui/icon-button";
import { useWorkspaceStore } from "@/data/workspace-store";
+import { useT } from "@/lib/i18n";
export function HeaderActions() {
const slug = useWorkspaceStore((s) => s.currentWorkspaceSlug);
+ const { t } = useT();
const onSearch = () => {
if (slug) router.push(`/${slug}/search`);
@@ -27,13 +29,13 @@ export function HeaderActions() {
<IconButton
name="search"
onPress={onSearch}
- accessibilityLabel="Search"
+ accessibilityLabel={t("common:actions.search")}
/>
<IconButton
name="add"
iconSize={24}
onPress={onCreate}
- accessibilityLabel="New issue"
+ accessibilityLabel={t("navigation:routes.new_issue")}
/>
</>
);
diff --git a/apps/mobile/components/ui/modal-close-button.tsx b/apps/mobile/components/ui/modal-close-button.tsx
index 9825807125..dc76f61ffb 100644
--- a/apps/mobile/components/ui/modal-close-button.tsx
+++ b/apps/mobile/components/ui/modal-close-button.tsx
@@ -14,8 +14,10 @@
*/
import { router } from "expo-router";
import { IconButton } from "@/components/ui/icon-button";
+import { useT } from "@/lib/i18n";
export function ModalCloseButton() {
+ const { t } = useT();
return (
<IconButton
name="close"
@@ -23,7 +25,7 @@ export function ModalCloseButton() {
variant="secondary"
className="size-7 rounded-full"
onPress={() => router.back()}
- accessibilityLabel="Close"
+ accessibilityLabel={t("common:actions.close")}
/>
);
}
diff --git a/apps/mobile/data/api.ts b/apps/mobile/data/api.ts
index c8628a5283..9d89a10d19 100644
--- a/apps/mobile/data/api.ts
+++ b/apps/mobile/data/api.ts
@@ -143,8 +143,8 @@ const API_URL = process.env.EXPO_PUBLIC_API_URL;
if (!API_URL) {
throw new Error(
- "EXPO_PUBLIC_API_URL is not set. Add it to apps/mobile/.env.development.local " +
- "(see apps/mobile/.env.staging for an example).",
+ "EXPO_PUBLIC_API_URL is not set. Add it to the apps/mobile env file for " +
+ "the variant you are running (see apps/mobile/README.md).",
);
}
diff --git a/apps/mobile/lib/auth-error.ts b/apps/mobile/lib/auth-error.ts
index d830435fd1..cbf88169e8 100644
--- a/apps/mobile/lib/auth-error.ts
+++ b/apps/mobile/lib/auth-error.ts
@@ -4,20 +4,22 @@
* we map the known shapes to friendlier copy and fall back to the caller's
* default for anything unrecognised.
*/
-export function mapAuthError(err: unknown, fallback: string): string {
+type Translate = (key: string) => string;
+
+export function mapAuthError(err: unknown, fallback: string, t?: Translate): string {
if (!(err instanceof Error)) return fallback;
const msg = err.message.toLowerCase();
if (/invalid|incorrect|wrong/.test(msg)) {
- return "That code didn't match. Double-check and try again.";
+ return t ? t("verify.mismatch") : "That code didn't match. Double-check and try again.";
}
if (/expired/.test(msg)) {
- return "That code has expired. Tap resend to get a new one.";
+ return t ? t("verify.expired") : "That code has expired. Tap resend to get a new one.";
}
if (/rate.?limit|too many|throttle/.test(msg)) {
- return "Too many attempts. Wait a moment and try again.";
+ return t ? t("verify.rate_limited") : "Too many attempts. Wait a moment and try again.";
}
if (/network|fetch|timeout|unreachable/.test(msg)) {
- return "Can't reach Multica. Check your connection and retry.";
+ return t ? t("verify.network") : "Can't reach Multica. Check your connection and retry.";
}
return fallback;
}
diff --git a/apps/mobile/lib/failure-reason-label.test.ts b/apps/mobile/lib/failure-reason-label.test.ts
index 948adc52f0..2f46e016ab 100644
--- a/apps/mobile/lib/failure-reason-label.test.ts
+++ b/apps/mobile/lib/failure-reason-label.test.ts
@@ -1,13 +1,43 @@
// @vitest-environment node
import { describe, expect, it } from "vitest";
-import { failureReasonLabel } from "./failure-reason-label";
-
+import chatEn from "../locales/en/chat.json";
+import chatZh from "../locales/zh-Hans/chat.json";
+import { failureReasonKey, REASONS } from "./failure-reason-label";
describe("failureReasonLabel", () => {
- it("uses actionable recovery copy for persisted runtime access denial", () => {
- const label = failureReasonLabel("runtime_access_denied");
- expect(label).toMatch(/make the runtime public/i);
- expect(label).toMatch(/rebind\/copy/i);
- expect(label).not.toBe("Failed");
+ it("maps known reasons to i18n keys", () => {
+ expect(failureReasonKey("runtime_access_denied")).toBe(
+ "failure_reason.runtime_access_denied",
+ );
+ expect(
+ failureReasonKey("agent_error.provider_auth_or_access"),
+ ).toBe("failure_reason.agent_error_provider_auth_or_access");
+ });
+
+ it("falls back to a user-friendly unknown reason", () => {
+ expect(failureReasonKey("not_known_yet")).toBe(
+ "failure_reason.default",
+ );
+ expect(failureReasonKey(null)).toBe("failure_reason.default");
+ });
+
+ // The REASONS set and the locale bundles drifted once before: keys existed
+ // in the locales but not in the set, so real runs fell through to the
+ // generic "Run failed" copy. Pin the two together.
+ it("covers exactly the failure_reason keys in the locale bundles", () => {
+ const localeKeys = (bundle: { failure_reason: Record<string, string> }) =>
+ new Set(
+ Object.keys(bundle.failure_reason).map((key) => `failure_reason.${key}`),
+ );
+ const enKeys = localeKeys(chatEn);
+ const zhKeys = localeKeys(chatZh);
+
+ expect(zhKeys).toEqual(enKeys);
+
+ const setKeys = new Set([...REASONS].map((reason) => failureReasonKey(reason)));
+ const expected = new Set(
+ [...enKeys].filter((key) => key !== "failure_reason.default"),
+ );
+ expect(setKeys).toEqual(expected);
});
});
diff --git a/apps/mobile/lib/failure-reason-label.ts b/apps/mobile/lib/failure-reason-label.ts
index ff1661218d..bb5c11d7ef 100644
--- a/apps/mobile/lib/failure-reason-label.ts
+++ b/apps/mobile/lib/failure-reason-label.ts
@@ -1,5 +1,3 @@
-import { RUNTIME_ACCESS_DENIED_RECOVERY_COPY } from "./runtime-access-copy";
-
/**
* Mirror of `packages/views/agents/components/tabs/task-failure.ts:REASON_LABEL`.
*
@@ -19,45 +17,62 @@ import { RUNTIME_ACCESS_DENIED_RECOVERY_COPY } from "./runtime-access-copy";
* a message, so an unrecognised reason degrades to a plain "Failed" instead of
* leaking an enum string at them.
*/
-const LABELS: Record<string, string> = {
+/**
+ * Must stay in lockstep with the `failure_reason` keys in
+ * `locales/en/chat.json`; the drift test in `failure-reason-label.test.ts`
+ * enforces both directions.
+ */
+export const REASONS = new Set([
// Platform / scheduler side.
- queued_expired: "Expired in queue",
- runtime_offline: "Daemon offline",
- runtime_recovery: "Daemon restarted",
- timeout: "Task timed out",
- iteration_limit: "Hit the iteration limit",
- agent_blocked: "Waiting on human input",
- api_invalid_request: "Rejected by the model API",
- skill_bundle_unavailable: "Couldn't download the agent's skills",
- runtime_cli_timeout: "Local runtime CLI timed out",
- environment_prepare_failed: "Couldn't prepare the execution environment",
- runtime_access_denied: RUNTIME_ACCESS_DENIED_RECOVERY_COPY,
+ "queued_expired",
+ "runtime_offline",
+ "runtime_reconnect_timeout",
+ "runtime_recovery",
+ "timeout",
+ "iteration_limit",
+ "agent_blocked",
+ "api_invalid_request",
+ "skill_bundle_unavailable",
+ "runtime_cli_timeout",
+ "environment_prepare_failed",
+ "invalid_task_identity",
+ "runtime_access_denied",
// Agent process side — provider.
- "agent_error.provider_auth_or_access": "Provider auth failed",
- "agent_error.provider_quota_limit": "Provider quota exhausted",
- "agent_error.provider_capacity_or_rate_limit": "Rate limited by provider",
- "agent_error.provider_server_error": "Provider server error",
- "agent_error.provider_network": "Network error reaching provider",
+ "agent_error.provider_auth_or_access",
+ "agent_error.provider_quota_limit",
+ "agent_error.provider_capacity_or_rate_limit",
+ "agent_error.provider_server_error",
+ "agent_error.provider_network",
// Agent process side — agent / runner.
- "agent_error.process_failure": "Agent process crashed",
- "agent_error.empty_or_unparseable_output": "Agent returned no usable output",
- "agent_error.agent_timeout": "Agent timed out",
- "agent_error.context_overflow": "Context window exceeded",
- "agent_error.missing_config": "Missing API key or configuration",
- "agent_error.model_not_found_or_unavailable": "Model unavailable",
- "agent_error.runtime_version_unsupported": "Runner CLI version unsupported",
- "agent_error.runtime_missing_executable": "Runner CLI not installed",
- "agent_error.unknown": "Agent execution error",
+ "agent_error.process_failure",
+ "agent_error.empty_or_unparseable_output",
+ "agent_error.agent_timeout",
+ "agent_error.context_overflow",
+ "agent_error.missing_config",
+ "agent_error.model_not_found_or_unavailable",
+ "agent_error.runtime_version_unsupported",
+ "agent_error.runtime_missing_executable",
+ "agent_error.unknown",
+
+ // Daemon operational reasons, outside the canonical taxonomy.
+ "agent_fallback_message",
+ "codex_resume_oversized",
+ "idle_watchdog",
+ "local_directory_error",
+ "cancelled",
- // Pre-MUL-1949 coarse values, still present on historical rows.
- agent_error: "Agent execution error",
- codex_semantic_inactivity: "Codex semantic inactivity timeout",
- manual: "Cancelled by user",
-};
+ // Coarse values, still present on historical rows.
+ "agent_error",
+ "codex_semantic_inactivity",
+ "manual",
+ "user_cancelled",
+]);
-export function failureReasonLabel(reason: string | null | undefined): string {
- if (!reason) return "Failed";
- return LABELS[reason] ?? "Failed";
+export function failureReasonKey(reason: string | null | undefined): string {
+ if (!reason || !REASONS.has(reason)) return "failure_reason.default";
+ // Refined wire reasons use dots (`agent_error.provider_auth_or_access`);
+ // the mobile bundle deliberately stores those as flat snake_case keys.
+ return `failure_reason.${reason.replaceAll(".", "_")}`;
}
diff --git a/apps/mobile/lib/format-activity.test.ts b/apps/mobile/lib/format-activity.test.ts
new file mode 100644
index 0000000000..1e42f21d22
--- /dev/null
+++ b/apps/mobile/lib/format-activity.test.ts
@@ -0,0 +1,67 @@
+// @vitest-environment node
+import { afterEach, describe, expect, it } from "vitest";
+import type { TimelineEntry } from "@multica/core/types";
+
+import { formatActivity } from "./format-activity";
+import { i18n } from "./i18n/singleton";
+
+const noActor = () => "";
+
+function entry(action: string, details: Record<string, unknown>): TimelineEntry {
+ return {
+ type: "activity",
+ id: "a1",
+ actor_type: "member",
+ actor_id: "m1",
+ created_at: "2026-09-24T00:00:00Z",
+ action,
+ details,
+ };
+}
+
+describe("formatActivity duplicate marks (MUL-7349)", () => {
+ afterEach(async () => {
+ await i18n.changeLanguage("en");
+ });
+
+ it("keeps the English copy web uses", async () => {
+ await i18n.changeLanguage("en");
+ const f = (action: string, details: Record<string, unknown>) =>
+ formatActivity(entry(action, details), noActor);
+
+ expect(f("duplicate_marked", { original_identifier: "MUL-1" })).toBe(
+ "marked this issue as a duplicate of MUL-1",
+ );
+ expect(
+ f("duplicate_unmarked", {
+ original_identifier: "MUL-1",
+ reason: "original_deleted",
+ }),
+ ).toBe("removed the duplicate mark, MUL-1 was deleted");
+ expect(
+ f("duplicate_unmarked", { original_identifier: "MUL-1", to: "todo" }),
+ ).toBe("unmarked this issue as a duplicate of MUL-1 and moved it to Todo");
+ expect(f("duplicate_unmarked", { original_identifier: "MUL-1" })).toBe(
+ "unmarked this issue as a duplicate of MUL-1",
+ );
+ expect(f("duplicate_added", { duplicate_identifier: "MUL-2" })).toBe(
+ "marked MUL-2 as a duplicate of this issue",
+ );
+ expect(f("duplicate_removed", { duplicate_identifier: "MUL-2" })).toBe(
+ "unmarked MUL-2 as a duplicate of this issue",
+ );
+ });
+
+ it("renders Chinese copy with the status as its lowercase identifier", async () => {
+ await i18n.changeLanguage("zh-Hans");
+ expect(
+ formatActivity(
+ entry("duplicate_unmarked", { original_identifier: "MUL-1", to: "todo" }),
+ noActor,
+ ),
+ ).toBe("取消了这个任务对 MUL-1 的重复标记,并移至 todo");
+ expect(
+ formatActivity(entry("duplicate_added", { duplicate_identifier: "MUL-2" }), noActor),
+ ).toBe("把 MUL-2 标记为这个任务的重复");
+ });
+});
diff --git a/apps/mobile/lib/format-activity.ts b/apps/mobile/lib/format-activity.ts
index cf1632200d..5c21c46a65 100644
--- a/apps/mobile/lib/format-activity.ts
+++ b/apps/mobile/lib/format-activity.ts
@@ -1,8 +1,7 @@
/**
* Activity-row text formatter. Subset of the web `formatActivity` in
* packages/views/issues/components/issue-detail.tsx:95 — same actions,
- * English-only copy (mobile v1 is English-only; mirror the structure when
- * mobile gains i18n).
+ * Copy is localized through the shared mobile i18n instance.
*
* Unknown actions fall through to the raw string in `entry.action`. NEVER
* throw and NEVER drop the row — that's the API Response Compatibility rule
@@ -12,14 +11,15 @@
*/
import type { IssuePriority, TimelineEntry } from "@multica/core/types";
import { formatDateOnly } from "@multica/core/issues/date";
+import { i18n } from "@/lib/i18n/singleton";
import { STATUS_LABEL, isBuiltInIssueStatus } from "@/lib/issue-status";
const PRIORITY_LABEL: Record<IssuePriority, string> = {
- urgent: "Urgent",
- high: "High",
- medium: "Medium",
- low: "Low",
- none: "No priority",
+ urgent: "issues:priority.urgent",
+ high: "issues:priority.high",
+ medium: "issues:priority.medium",
+ low: "issues:priority.low",
+ none: "issues:priority.none",
};
/**
@@ -36,11 +36,12 @@ function statusName(
): string {
if (!s) return "?";
if (resolveLabel) return resolveLabel(s);
- return isBuiltInIssueStatus(s) ? STATUS_LABEL[s] : s;
+ if (isBuiltInIssueStatus(s)) return i18n.t(STATUS_LABEL[s]);
+ return s;
}
function priorityName(p: string | undefined): string {
- if (p && p in PRIORITY_LABEL) return PRIORITY_LABEL[p as IssuePriority];
+ if (p && p in PRIORITY_LABEL) return i18n.t(PRIORITY_LABEL[p as IssuePriority]);
return p ?? "?";
}
@@ -48,7 +49,11 @@ function priorityName(p: string | undefined): string {
// day shift). Mirrors web's formatActivity in issue-detail.tsx.
function shortDate(date: string | undefined): string {
if (!date) return "?";
- return formatDateOnly(date, { month: "short", day: "numeric" }, "en-US");
+ return formatDateOnly(
+ date,
+ { month: "short", day: "numeric" },
+ i18n.resolvedLanguage ?? i18n.language,
+ );
}
export function formatActivity(
@@ -60,62 +65,85 @@ export function formatActivity(
resolveStatusLabel?: (statusKey: string) => string,
): string {
const details = (entry.details ?? {}) as Record<string, string>;
+ const t = i18n.t.bind(i18n);
switch (entry.action) {
case "created":
- return "created the issue";
+ return t("issues:activity.created");
case "status_changed":
- return `changed status: ${statusName(details.from, resolveStatusLabel)} → ${statusName(details.to, resolveStatusLabel)}`;
+ return t("issues:activity.status_changed", {
+ from: statusName(details.from, resolveStatusLabel),
+ to: statusName(details.to, resolveStatusLabel),
+ });
case "priority_changed":
- return `changed priority: ${priorityName(details.from)} → ${priorityName(details.to)}`;
+ return t("issues:activity.priority_changed", {
+ from: priorityName(details.from),
+ to: priorityName(details.to),
+ });
case "assignee_changed": {
const isSelf =
details.to_type === entry.actor_type &&
details.to_id === entry.actor_id;
- if (isSelf) return "self-assigned";
- if (details.from_id && !details.to_id) return "removed assignee";
+ if (isSelf) return t("issues:activity.self_assigned");
+ if (details.from_id && !details.to_id) {
+ return t("issues:activity.removed_assignee");
+ }
const toName =
details.to_id && details.to_type
? resolveActorName(details.to_type, details.to_id)
: null;
- if (toName) return `assigned to ${toName}`;
- return "changed assignee";
+ if (toName) return t("issues:activity.assigned_to", { name: toName });
+ return t("issues:activity.assignee_changed");
}
case "start_date_changed": {
- if (!details.to) return "removed start date";
- return `set start date to ${shortDate(details.to)}`;
+ if (!details.to) return t("issues:activity.start_date_removed");
+ return t("issues:activity.start_date_set", { date: shortDate(details.to) });
}
case "due_date_changed": {
- if (!details.to) return "removed due date";
- return `set due date to ${shortDate(details.to)}`;
+ if (!details.to) return t("issues:activity.due_date_removed");
+ return t("issues:activity.due_date_set", { date: shortDate(details.to) });
}
case "title_changed":
- return `renamed: "${details.from ?? "?"}" → "${details.to ?? "?"}"`;
+ return t("issues:activity.title_changed", {
+ from: details.from ?? "?",
+ to: details.to ?? "?",
+ });
case "description_updated":
- return "updated description";
+ return t("issues:activity.description_updated");
// Duplicate marks (MUL-7349); copy mirrors packages/views/locales/en.
case "duplicate_marked":
- return `marked this issue as a duplicate of ${details.original_identifier ?? "?"}`;
+ return t("issues:activity.duplicate_marked", {
+ identifier: details.original_identifier ?? "?",
+ });
case "duplicate_unmarked": {
const identifier = details.original_identifier ?? "?";
if (details.reason === "original_deleted") {
- return `removed the duplicate mark, ${identifier} was deleted`;
+ return t("issues:activity.duplicate_unmarked_original_deleted", {
+ identifier,
+ });
}
if (details.to) {
- return `unmarked this issue as a duplicate of ${identifier} and moved it to ${statusName(details.to, resolveStatusLabel)}`;
+ return t("issues:activity.duplicate_unmarked_to", {
+ identifier,
+ status: statusName(details.to, resolveStatusLabel),
+ });
}
- return `unmarked this issue as a duplicate of ${identifier}`;
+ return t("issues:activity.duplicate_unmarked", { identifier });
}
case "duplicate_added":
- return `marked ${details.duplicate_identifier ?? "?"} as a duplicate of this issue`;
+ return t("issues:activity.duplicate_added", {
+ identifier: details.duplicate_identifier ?? "?",
+ });
case "duplicate_removed":
- return `unmarked ${details.duplicate_identifier ?? "?"} as a duplicate of this issue`;
+ return t("issues:activity.duplicate_removed", {
+ identifier: details.duplicate_identifier ?? "?",
+ });
case "task_completed": {
const n = entry.coalesced_count ?? 1;
- return n > 1 ? `completed ${n} tasks` : "completed a task";
+ return t("issues:activity.tasks_completed", { count: n });
}
case "task_failed": {
const n = entry.coalesced_count ?? 1;
- return n > 1 ? `failed ${n} tasks` : "failed a task";
+ return t("issues:activity.tasks_failed", { count: n });
}
case "squad_leader_evaluated": {
// Copy mirrors packages/views/locales/en/issues.json
@@ -125,18 +153,18 @@ export function formatActivity(
switch (details.outcome) {
case "action":
return reason
- ? `evaluated and took action: ${reason}`
- : "evaluated and took action";
+ ? t("issues:activity.squad_action_with_reason", { reason })
+ : t("issues:activity.squad_action");
case "no_action":
return reason
- ? `evaluated: no action needed (${reason})`
- : "evaluated: no action needed";
+ ? t("issues:activity.squad_no_action_with_reason", { reason })
+ : t("issues:activity.squad_no_action");
case "failed":
return reason
- ? `evaluation failed: ${reason}`
- : "evaluation failed";
+ ? t("issues:activity.squad_failed_with_reason", { reason })
+ : t("issues:activity.squad_failed");
default:
- return "evaluated the squad trigger";
+ return t("issues:activity.squad_evaluated");
}
}
default:
diff --git a/apps/mobile/lib/i18n/config.tsx b/apps/mobile/lib/i18n/config.tsx
new file mode 100644
index 0000000000..1958f919d3
--- /dev/null
+++ b/apps/mobile/lib/i18n/config.tsx
@@ -0,0 +1,122 @@
+import {
+ createContext,
+ useContext,
+ useEffect,
+ useMemo,
+ useState,
+ type ReactNode,
+} from "react";
+import * as SecureStore from "expo-secure-store";
+import * as Localization from "expo-localization";
+import { I18nextProvider, useTranslation } from "react-i18next";
+
+import { i18n } from "./singleton";
+import type { SupportedLocale } from "./types";
+import "./resources-types";
+
+const LOCALE_STORAGE_KEY = "mobile.locale_preference";
+const DEFAULT_LOCALE: SupportedLocale = "en";
+const SYSTEM_LOCALE = matchSupportedLocale(systemLocaleCandidates());
+
+export type LocalePreference = SupportedLocale | "system";
+
+function normalizeLanguage(value?: string | null): string | null {
+ if (!value) return null;
+ return value.replace(/_/g, "-");
+}
+
+function systemLocaleCandidates(): string[] {
+ return (Localization.getLocales() ?? [])
+ .map((locale) => normalizeLanguage(locale.languageTag))
+ .filter((tag): tag is string => !!tag);
+}
+
+function matchSupportedLocale(candidates: string[]): SupportedLocale {
+ for (const candidate of candidates) {
+ if (!candidate) continue;
+ const lowered = candidate.toLowerCase();
+ // Simplified Chinese is the only Chinese bundle today. Do not silently
+ // rewrite Traditional Chinese (zh-Hant/TW/HK/MO) to Simplified.
+ if (
+ lowered.startsWith("zh-hant") ||
+ ["zh-tw", "zh-hk", "zh-mo"].includes(lowered)
+ ) {
+ return DEFAULT_LOCALE;
+ }
+ if (lowered.startsWith("zh")) return "zh-Hans";
+ if (lowered.startsWith("en")) return "en";
+ }
+ return DEFAULT_LOCALE;
+}
+
+// The singleton initializes to English so pure helpers are safe before mount.
+// Apply the device language once React Native modules are available.
+void i18n.changeLanguage(SYSTEM_LOCALE);
+
+type LocalePreferenceContextValue = {
+ preference: LocalePreference;
+ setPreference: (preference: LocalePreference) => void;
+};
+
+const LocalePreferenceContext = createContext<LocalePreferenceContextValue>({
+ preference: "system",
+ setPreference: () => {},
+});
+
+export function MobileI18nProvider({ children }: { children: ReactNode }) {
+ const [preference, setPreferenceState] = useState<LocalePreference>("system");
+
+ useEffect(() => {
+ let cancelled = false;
+
+ void SecureStore.getItemAsync(LOCALE_STORAGE_KEY)
+ .then((stored) => {
+ if (cancelled || !stored) return;
+ if (stored !== "system" && stored !== "en" && stored !== "zh-Hans") {
+ return;
+ }
+ setPreferenceState(stored);
+ if (stored !== "system") {
+ setPreferenceState(stored);
+ void i18n.changeLanguage(stored);
+ }
+ })
+ .catch(() => {
+ // A missing or unreadable preference safely falls back to system.
+ });
+
+ return () => {
+ cancelled = true;
+ };
+ }, []);
+
+ const value = useMemo<LocalePreferenceContextValue>(
+ () => ({
+ preference,
+ setPreference: (next) => {
+ setPreferenceState(next);
+ void i18n.changeLanguage(next === "system" ? SYSTEM_LOCALE : next);
+ void SecureStore.setItemAsync(LOCALE_STORAGE_KEY, next).catch(() => {
+ // Keep the in-memory choice if secure storage is unavailable.
+ });
+ },
+ }),
+ [preference],
+ );
+
+ return (
+ <LocalePreferenceContext.Provider value={value}>
+ <I18nextProvider i18n={i18n}>{children}</I18nextProvider>
+ </LocalePreferenceContext.Provider>
+ );
+}
+
+export function useLocalePreference() {
+ return useContext(LocalePreferenceContext);
+}
+
+// Mobile call sites use string keys because navigation options and item arrays
+// frequently need locale-independent key constants.
+export { useTranslation as useT };
+export { SYSTEM_LOCALE };
+export type { SupportedLocale };
diff --git a/apps/mobile/lib/i18n/index.ts b/apps/mobile/lib/i18n/index.ts
new file mode 100644
index 0000000000..9d6ad9f292
--- /dev/null
+++ b/apps/mobile/lib/i18n/index.ts
@@ -0,0 +1,9 @@
+export {
+ MobileI18nProvider,
+ useLocalePreference,
+ useT,
+ type LocalePreference,
+} from "./config";
+export { i18n } from "./singleton";
+export { useLocale } from "./use-locale";
+export { useTimeAgo } from "./use-time-ago";
diff --git a/apps/mobile/lib/i18n/resources-types.ts b/apps/mobile/lib/i18n/resources-types.ts
new file mode 100644
index 0000000000..c0df532435
--- /dev/null
+++ b/apps/mobile/lib/i18n/resources-types.ts
@@ -0,0 +1,15 @@
+import "i18next";
+
+declare global {
+ // No application-specific interface is needed: mobile call sites
+ // intentionally use string keys because navigation option objects,
+ // item maps, and enum-label maps resolve keys dynamically.
+}
+
+declare module "i18next" {
+ interface CustomTypeOptions {
+ defaultNS: "common";
+ resources: Record<string, Record<string, unknown>>;
+ enableSelector: false;
+ }
+}
diff --git a/apps/mobile/lib/i18n/resources.test.ts b/apps/mobile/lib/i18n/resources.test.ts
new file mode 100644
index 0000000000..05adbc8a63
--- /dev/null
+++ b/apps/mobile/lib/i18n/resources.test.ts
@@ -0,0 +1,73 @@
+// @vitest-environment node
+import fs from "node:fs";
+import path from "node:path";
+import { describe, expect, it } from "vitest";
+
+const LOCALES_ROOT = path.resolve(__dirname, "../../locales");
+
+function readLocale(locale: string): [string, unknown][] {
+ return fs
+ .readdirSync(path.join(LOCALES_ROOT, locale))
+ .filter((file) => file.endsWith(".json"))
+ .map((file): [string, unknown] => [
+ file,
+ JSON.parse(
+ fs.readFileSync(path.join(LOCALES_ROOT, locale, file), "utf8"),
+ ),
+ ]);
+}
+
+function flatten(value: unknown, prefix = ""): Set<string> {
+ const keys = new Set<string>();
+ if (typeof value !== "object" || value === null) {
+ keys.add(prefix);
+ return keys;
+ }
+ for (const [key, child] of Object.entries(value)) {
+ const nextKey = prefix ? `${prefix}.${key}` : key;
+ for (const childKey of flatten(child, nextKey)) keys.add(childKey);
+ }
+ return keys;
+}
+
+describe("mobile i18n resources", () => {
+ it("has an English resource for every supported namespace and locale", () => {
+ const enNamespaces = fs
+ .readdirSync(path.join(LOCALES_ROOT, "en"))
+ .filter((file) => file.endsWith(".json"))
+ .sort();
+ const zhNamespaces = fs
+ .readdirSync(path.join(LOCALES_ROOT, "zh-Hans"))
+ .filter((file) => file.endsWith(".json"))
+ .sort();
+ expect(zhNamespaces).toEqual(enNamespaces);
+ });
+
+ it("keeps Simplified Chinese keys aligned with English", () => {
+ const enResources = readLocale("en");
+ const zhResources = new Map(readLocale("zh-Hans"));
+
+ for (const [namespace, value] of enResources) {
+ const zhValue = zhResources.get(namespace);
+ expect(zhValue, `missing zh-Hans namespace: ${namespace}`).toBeDefined();
+ const enKeys = flatten(value);
+ const zhKeys = flatten(zhValue);
+ // i18next plural rules use `_one` / `_other`; Chinese has only `_other`.
+ const missing = [...enKeys].filter((key) => {
+ if (zhKeys.has(key)) return false;
+ if (key.endsWith("_one") && zhKeys.has(`${key.slice(0, -4)}_other`)) {
+ return false;
+ }
+ return true;
+ });
+ expect(
+ missing,
+ `missing zh-Hans keys in ${namespace}`,
+ ).toEqual([]);
+ expect(
+ [...zhKeys].filter((key) => !enKeys.has(key)),
+ `extra zh-Hans keys in ${namespace}`,
+ ).toEqual([]);
+ }
+ });
+});
diff --git a/apps/mobile/lib/i18n/resources.ts b/apps/mobile/lib/i18n/resources.ts
new file mode 100644
index 0000000000..c1180411b0
--- /dev/null
+++ b/apps/mobile/lib/i18n/resources.ts
@@ -0,0 +1,47 @@
+import authEn from "@/locales/en/auth.json";
+import chatEn from "@/locales/en/chat.json";
+import commonEn from "@/locales/en/common.json";
+import editorEn from "@/locales/en/editor.json";
+import inboxEn from "@/locales/en/inbox.json";
+import issuesEn from "@/locales/en/issues.json";
+import navigationEn from "@/locales/en/navigation.json";
+import projectsEn from "@/locales/en/projects.json";
+import settingsEn from "@/locales/en/settings.json";
+import workspaceEn from "@/locales/en/workspace.json";
+import authZh from "@/locales/zh-Hans/auth.json";
+import chatZh from "@/locales/zh-Hans/chat.json";
+import commonZh from "@/locales/zh-Hans/common.json";
+import editorZh from "@/locales/zh-Hans/editor.json";
+import inboxZh from "@/locales/zh-Hans/inbox.json";
+import issuesZh from "@/locales/zh-Hans/issues.json";
+import navigationZh from "@/locales/zh-Hans/navigation.json";
+import projectsZh from "@/locales/zh-Hans/projects.json";
+import settingsZh from "@/locales/zh-Hans/settings.json";
+import workspaceZh from "@/locales/zh-Hans/workspace.json";
+
+export const resources = {
+ en: {
+ auth: authEn,
+ chat: chatEn,
+ common: commonEn,
+ editor: editorEn,
+ inbox: inboxEn,
+ issues: issuesEn,
+ navigation: navigationEn,
+ projects: projectsEn,
+ settings: settingsEn,
+ workspace: workspaceEn,
+ },
+ "zh-Hans": {
+ auth: authZh,
+ chat: chatZh,
+ common: commonZh,
+ editor: editorZh,
+ inbox: inboxZh,
+ issues: issuesZh,
+ navigation: navigationZh,
+ projects: projectsZh,
+ settings: settingsZh,
+ workspace: workspaceZh,
+ },
+} as const;
diff --git a/apps/mobile/lib/i18n/singleton.test.ts b/apps/mobile/lib/i18n/singleton.test.ts
new file mode 100644
index 0000000000..2439a15b24
--- /dev/null
+++ b/apps/mobile/lib/i18n/singleton.test.ts
@@ -0,0 +1,38 @@
+// @vitest-environment node
+import { afterEach, describe, expect, it } from "vitest";
+
+import { i18n } from "./singleton";
+
+describe("mobile i18n singleton", () => {
+ afterEach(async () => {
+ await i18n.changeLanguage("en");
+ });
+
+ it("loads the English and Simplified Chinese bundles", async () => {
+ await i18n.changeLanguage("en");
+ expect(i18n.t("actions.cancel")).toBe("Cancel");
+ expect(i18n.t("common:actions.cancel")).toBe("Cancel");
+ expect(i18n.t("navigation:tabs.inbox")).toBe("Inbox");
+
+ await i18n.changeLanguage("zh-Hans");
+ expect(i18n.t("actions.cancel")).toBe("取消");
+ expect(i18n.t("common:actions.cancel")).toBe("取消");
+ expect(i18n.t("navigation:tabs.inbox")).toBe("收件箱");
+ });
+
+ it("formats counts with interpolation", async () => {
+ await i18n.changeLanguage("zh-Hans");
+ expect(i18n.t("issues:list.count_other", { count: 3 })).toBe(
+ "3 个任务",
+ );
+ });
+
+ it("renders issue status enums as lowercase English and run statuses translated in Chinese", async () => {
+ await i18n.changeLanguage("zh-Hans");
+ expect(i18n.t("issues:status.todo")).toBe("todo");
+ expect(i18n.t("issues:status.in_review")).toBe("in_review");
+ expect(i18n.t("issues:status.cancelled")).toBe("cancelled");
+ expect(i18n.t("issues:runs.status.queued")).toBe("排队中");
+ expect(i18n.t("issues:runs.status.completed")).toBe("运行成功");
+ });
+});
diff --git a/apps/mobile/lib/i18n/singleton.ts b/apps/mobile/lib/i18n/singleton.ts
new file mode 100644
index 0000000000..8decfefbe4
--- /dev/null
+++ b/apps/mobile/lib/i18n/singleton.ts
@@ -0,0 +1,17 @@
+import { createInstance, type i18n as I18nInstance } from "i18next";
+
+import { resources } from "./resources";
+import { DEFAULT_LOCALE } from "./types";
+
+// Keep this module free of React Native imports so pure formatting helpers
+// and Node-side tests can use the same initialized i18next instance.
+export const i18n: I18nInstance = createInstance();
+
+void i18n.init({
+ defaultNS: "common",
+ fallbackLng: DEFAULT_LOCALE,
+ resources,
+ interpolation: { escapeValue: false },
+ initAsync: false,
+ react: { useSuspense: false },
+});
diff --git a/apps/mobile/lib/i18n/types.ts b/apps/mobile/lib/i18n/types.ts
new file mode 100644
index 0000000000..8d3bb86147
--- /dev/null
+++ b/apps/mobile/lib/i18n/types.ts
@@ -0,0 +1,4 @@
+export type SupportedLocale = "en" | "zh-Hans";
+
+export const SUPPORTED_LOCALES: SupportedLocale[] = ["en", "zh-Hans"];
+export const DEFAULT_LOCALE: SupportedLocale = "en";
diff --git a/apps/mobile/lib/i18n/use-locale.ts b/apps/mobile/lib/i18n/use-locale.ts
new file mode 100644
index 0000000000..54252d0308
--- /dev/null
+++ b/apps/mobile/lib/i18n/use-locale.ts
@@ -0,0 +1,8 @@
+import { useT } from "./config";
+
+// Use the UI locale for dates and numbers. The phone locale can differ from
+// the selected app language, which would otherwise render mixed-language UI.
+export function useLocale(): string {
+ const { i18n } = useT();
+ return i18n.resolvedLanguage ?? i18n.language;
+}
diff --git a/apps/mobile/lib/i18n/use-time-ago.ts b/apps/mobile/lib/i18n/use-time-ago.ts
new file mode 100644
index 0000000000..6c35adb509
--- /dev/null
+++ b/apps/mobile/lib/i18n/use-time-ago.ts
@@ -0,0 +1,26 @@
+import { useT } from "./config";
+
+export function useTimeAgo() {
+ const { t } = useT("common");
+
+ return (dateStr: string): string => {
+ const diff = Date.now() - new Date(dateStr).getTime();
+ const minutes = Math.floor(diff / 60000);
+
+ if (minutes < 1) return t("time.just_now");
+ if (minutes < 60) return t("time.minutes_ago_other", { count: minutes });
+ if (minutes < 60 * 24) {
+ return t("time.hours_ago_other", { count: Math.floor(minutes / 60) });
+ }
+ if (minutes < 60 * 24 * 7) {
+ return t("time.days_ago_other", { count: Math.floor(minutes / (60 * 24)) });
+ }
+ if (minutes < 60 * 24 * 35) {
+ return t("time.weeks_ago_other", { count: Math.floor(minutes / (60 * 24 * 7)) });
+ }
+
+ return new Intl.DateTimeFormat(undefined, { month: "short", day: "numeric" }).format(
+ new Date(dateStr),
+ );
+ };
+}
diff --git a/apps/mobile/lib/inbox-display.ts b/apps/mobile/lib/inbox-display.ts
index 3137750c8c..5cff69fa12 100644
--- a/apps/mobile/lib/inbox-display.ts
+++ b/apps/mobile/lib/inbox-display.ts
@@ -7,12 +7,13 @@
* web for the same item. When the web version changes, sync this file.
*/
import type { InboxItem } from "@multica/core/types";
+import { i18n } from "@/lib/i18n/singleton";
function formatResetAt(value: string | undefined): string {
if (!value) return "";
const date = new Date(value);
if (Number.isNaN(date.getTime())) return "";
- return new Intl.DateTimeFormat(undefined, {
+ return new Intl.DateTimeFormat(i18n.resolvedLanguage ?? i18n.language, {
dateStyle: "medium",
timeStyle: "short",
}).format(date);
@@ -23,10 +24,18 @@ export function getAutopilotQuotaBody(item: InboxItem): string | null {
const details = item.details ?? {};
const resetAt = formatResetAt(details.reset_at);
if (!details.limit || !resetAt) return item.body;
+ const t = i18n.t.bind(i18n);
if (details.autopilot_title) {
- return `Autopilot “${details.autopilot_title}” was not started because this workspace has reached its limit of ${details.limit} runs for the current period. The allowance resets ${resetAt}.`;
+ return t("inbox:body.autopilot_title_limit", {
+ title: details.autopilot_title,
+ limit: details.limit,
+ resetAt,
+ });
}
- return `This workspace has reached its limit of ${details.limit} autopilot runs for the current period. This execution was not started. The allowance resets ${resetAt}.`;
+ return t("inbox:body.autopilot_limit", {
+ limit: details.limit,
+ resetAt,
+ });
}
function singleLine(value: string | null | undefined): string {
@@ -56,11 +65,11 @@ export function stripQuickCreatePrefix(
export function getInboxDisplayTitle(item: InboxItem): string {
const details = item.details ?? {};
- // Mobile is English-only today. Mirror web's localized system-notice titles
+ // Resolve system-notice titles through the selected UI locale. Mirror
// rather than exposing backend fallback copy that can include raw counts.
switch (item.type) {
case "autopilot_quota_exceeded":
- return "Autopilot run limit reached";
+ return i18n.t("inbox:type.autopilot_quota_exceeded");
}
if (item.type === "quick_create_done") {
const cleanedTitle = stripQuickCreatePrefix(item.title, details.identifier);
diff --git a/apps/mobile/lib/issue-status.test.ts b/apps/mobile/lib/issue-status.test.ts
index 97a3cab253..1e6e956c7a 100644
--- a/apps/mobile/lib/issue-status.test.ts
+++ b/apps/mobile/lib/issue-status.test.ts
@@ -106,7 +106,7 @@ describe("buildIssueStatusCatalog", () => {
for (const key of ["backlog", "todo", "in_progress", "in_review", "done", "blocked", "cancelled"]) {
expect(c.categoryOf(key)).toBe(issueColumnCategory(issue({ status: key })));
}
- expect(c.labelOf("in_review")).toBe("In Review");
+ expect(c.labelOf("in_review")).toBe("issues:status.in_review");
expect(c.colorOf("in_review")).toBeNull();
});
@@ -136,7 +136,7 @@ describe("buildIssueStatusCatalog", () => {
color: "#22c55e",
});
const c = buildIssueStatusCatalog([builtIn, entry("qa", "started", { name: "QA" })]);
- expect(c.labelOf("in_review")).toBe("In Review");
+ expect(c.labelOf("in_review")).toBe("issues:status.in_review");
expect(c.colorOf("in_review")).toBeNull();
expect(c.colorOf("qa")).toBe("#123456");
});
@@ -198,7 +198,7 @@ describe("statusOptions", () => {
]);
const inReview = statusOptions(c).filter((o) => o.category === "started");
expect(inReview.map((o) => o.key)).toEqual(["in_review", "human_review"]);
- expect(inReview.map((o) => o.label)).toEqual(["In Review", "Human Review"]);
+ expect(inReview.map((o) => o.label)).toEqual(["issues:status.in_review", "Human Review"]);
expect(inReview.map((o) => o.color)).toEqual([null, "#123456"]);
});
diff --git a/apps/mobile/lib/issue-status.ts b/apps/mobile/lib/issue-status.ts
index f4e7da7cbb..c340e8537a 100644
--- a/apps/mobile/lib/issue-status.ts
+++ b/apps/mobile/lib/issue-status.ts
@@ -74,28 +74,28 @@ export const BOARD_CATEGORIES: IssueStatusCategory[] = STATUS_CATEGORIES.filter(
* statuses through the catalog (`useStatusLabel`).
*/
export const STATUS_LABEL: Record<BuiltInIssueStatus, string> = {
- backlog: "Backlog",
- todo: "Todo",
- in_progress: "In Progress",
- in_review: "In Review",
- done: "Done",
- blocked: "Blocked",
- cancelled: "Cancelled",
+ backlog: "issues:status.backlog",
+ todo: "issues:status.todo",
+ in_progress: "issues:status.in_progress",
+ in_review: "issues:status.in_review",
+ done: "issues:status.done",
+ blocked: "issues:status.blocked",
+ cancelled: "issues:status.cancelled",
};
export const CATEGORY_LABEL: Record<IssueStatusCategory, string> = {
- unstarted: "Unstarted",
- started: "Started",
- done: "Done",
- closed: "Closed",
+ unstarted: "issues:category.unstarted",
+ started: "issues:category.started",
+ done: "issues:category.done",
+ closed: "issues:category.closed",
};
export const PRIORITY_LABEL: Record<IssuePriority, string> = {
- none: "No priority",
- low: "Low",
- medium: "Medium",
- high: "High",
- urgent: "Urgent",
+ none: "issues:priority.none",
+ low: "issues:priority.low",
+ medium: "issues:priority.medium",
+ high: "issues:priority.high",
+ urgent: "issues:priority.urgent",
};
const CATEGORY_SET = new Set<string>(STATUS_CATEGORIES);
diff --git a/apps/mobile/lib/markdown/code-block.tsx b/apps/mobile/lib/markdown/code-block.tsx
index fa9c3879e8..014bc6f116 100644
--- a/apps/mobile/lib/markdown/code-block.tsx
+++ b/apps/mobile/lib/markdown/code-block.tsx
@@ -38,6 +38,7 @@ import Svg, { Path, Rect } from "react-native-svg";
import { Text } from "@/components/ui/text";
import { THEME } from "@/lib/theme";
import { useColorScheme } from "@/lib/use-color-scheme";
+import { useT } from "@/lib/i18n";
import {
CODE_BLOCK_CONTAINER_CLASS,
CODE_BLOCK_LANG_LABEL_CLASS,
@@ -166,9 +167,10 @@ function HighlightedCode({
function CodeBlockHeader({ code, lang }: Props) {
const { isDarkColorScheme } = useColorScheme();
- const t = isDarkColorScheme ? THEME.dark : THEME.light;
+ const theme = isDarkColorScheme ? THEME.dark : THEME.light;
const [copied, setCopied] = useState(false);
const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);
+ const { t } = useT("editor");
// Cancel pending reset on unmount so an in-flight setTimeout doesn't fire
// setState on a dead component.
@@ -209,12 +211,12 @@ function CodeBlockHeader({ code, lang }: Props) {
onPress={onCopy}
hitSlop={8}
accessibilityRole="button"
- accessibilityLabel={copied ? "Code copied" : "Copy code"}
+ accessibilityLabel={copied ? t("code.copied") : t("code.copy")}
>
{copied ? (
- <CheckIcon color={t.success} />
+ <CheckIcon color={theme.success} />
) : (
- <CopyIcon color={t.mutedForeground} />
+ <CopyIcon color={theme.mutedForeground} />
)}
</Pressable>
</View>
diff --git a/apps/mobile/lib/project-status.ts b/apps/mobile/lib/project-status.ts
index e0476e1e81..4d19a47167 100644
--- a/apps/mobile/lib/project-status.ts
+++ b/apps/mobile/lib/project-status.ts
@@ -14,6 +14,7 @@
* mobile picks an i18n lib (web uses i18next).
*/
import type { ProjectPriority, ProjectStatus } from "@multica/core/types";
+import { i18n } from "@/lib/i18n/singleton";
export const PROJECT_STATUSES: ProjectStatus[] = [
"planned",
@@ -32,19 +33,19 @@ export const PROJECT_PRIORITIES: ProjectPriority[] = [
];
export const PROJECT_STATUS_LABEL: Record<ProjectStatus, string> = {
- planned: "Planned",
- in_progress: "In Progress",
- paused: "Paused",
- completed: "Completed",
- cancelled: "Cancelled",
+ planned: "projects:status.planned",
+ in_progress: "projects:status.in_progress",
+ paused: "projects:status.paused",
+ completed: "projects:status.completed",
+ cancelled: "projects:status.cancelled",
};
export const PROJECT_PRIORITY_LABEL: Record<ProjectPriority, string> = {
- urgent: "Urgent",
- high: "High",
- medium: "Medium",
- low: "Low",
- none: "No priority",
+ urgent: "projects:priority.urgent",
+ high: "projects:priority.high",
+ medium: "projects:priority.medium",
+ low: "projects:priority.low",
+ none: "projects:priority.none",
};
// Single hex per status, used by the SVG status icon (NativeWind classes
@@ -72,13 +73,16 @@ export const PROJECT_PRIORITY_BARS: Record<ProjectPriority, number> = {
// (root CLAUDE.md "API Response Compatibility"). Returns a sensible default
// so a future enum value still renders a labelled chip.
export function projectStatusLabel(value: string): string {
- return (PROJECT_STATUS_LABEL as Record<string, string>)[value] ?? value;
+ const key = (PROJECT_STATUS_LABEL as Record<string, string>)[value];
+ return key ? i18n.t(key) : value;
}
export function projectPriorityLabel(value: string): string {
- return (PROJECT_PRIORITY_LABEL as Record<string, string>)[value] ?? value;
+ const key = (PROJECT_PRIORITY_LABEL as Record<string, string>)[value];
+ return key ? i18n.t(key) : value;
}
+
export function projectStatusColor(value: string): string {
return (PROJECT_STATUS_COLOR as Record<string, string>)[value] ?? "#71717a";
}
diff --git a/apps/mobile/lib/time-ago.ts b/apps/mobile/lib/time-ago.ts
index 3ac5da4d3e..28e4827da7 100644
--- a/apps/mobile/lib/time-ago.ts
+++ b/apps/mobile/lib/time-ago.ts
@@ -1,23 +1,28 @@
+import { i18n } from "@/lib/i18n/singleton";
+
/**
- * Mobile time-ago formatter. Mirrors the algorithm in
- * packages/views/inbox/components/inbox-list-item.tsx `useTimeAgo` so
- * "X minutes ago" reads identically across web/desktop and mobile (Behavioral
- * parity rule in apps/mobile/CLAUDE.md). The web version is i18n-driven via
- * useT; mobile v1 is English-only — when mobile ships i18n, mirror that
- * structure.
+ * Mobile time-ago formatter. Uses the app UI locale so relative timestamps
+ * never disagree with surrounding strings, even when the device locale is
+ * different from the user's explicit Multica language choice.
*/
export function timeAgo(dateStr: string): string {
+ const t = i18n.t.bind(i18n);
const diff = Date.now() - new Date(dateStr).getTime();
const minutes = Math.floor(diff / 60000);
- if (minutes < 1) return "Just now";
- if (minutes < 60) return `${minutes}m ago`;
+
+ if (minutes < 1) return t("common:time.just_now");
+ if (minutes < 60) {
+ return t("common:time.minutes_ago_other", { count: minutes });
+ }
const hours = Math.floor(minutes / 60);
- if (hours < 24) return `${hours}h ago`;
+ if (hours < 24) return t("common:time.hours_ago_other", { count: hours });
const days = Math.floor(hours / 24);
- if (days < 7) return `${days}d ago`;
+ if (days < 7) return t("common:time.days_ago_other", { count: days });
const weeks = Math.floor(days / 7);
- if (weeks < 5) return `${weeks}w ago`;
- return new Date(dateStr).toLocaleDateString("en-US", {
+ if (weeks < 5) return t("common:time.weeks_ago_other", { count: weeks });
+
+ const locale = i18n.resolvedLanguage ?? i18n.language;
+ return new Date(dateStr).toLocaleDateString(locale, {
month: "short",
day: "numeric",
});
diff --git a/apps/mobile/lib/use-issue-statuses.ts b/apps/mobile/lib/use-issue-statuses.ts
index ab9802c116..815b97fe35 100644
--- a/apps/mobile/lib/use-issue-statuses.ts
+++ b/apps/mobile/lib/use-issue-statuses.ts
@@ -23,11 +23,25 @@ import { issueStatusListOptions } from "@/data/queries/issue-statuses";
import { useWorkspaceStore } from "@/data/workspace-store";
import {
buildIssueStatusCatalog,
+ isBuiltInIssueStatus,
type IssueStatusCatalog,
} from "@/lib/issue-status";
+import { useT } from "@/lib/i18n";
export function useIssueStatuses(): IssueStatusCatalog {
const wsId = useWorkspaceStore((s) => s.currentWorkspaceId);
+ const { t } = useT();
const { data } = useQuery(issueStatusListOptions(wsId));
- return useMemo(() => buildIssueStatusCatalog(data), [data]);
+ return useMemo(() => {
+ const catalog = buildIssueStatusCatalog(data);
+ return {
+ ...catalog,
+ labelOf: (key: string) => {
+ const label = catalog.labelOf(key);
+ // Only i18next keys are translatable. A custom status name may itself
+ // contain a colon, so its catalog name must pass through unchanged.
+ return isBuiltInIssueStatus(key) ? t(label) : label;
+ },
+ };
+ }, [data, t]);
}
diff --git a/apps/mobile/locales/en/auth.json b/apps/mobile/locales/en/auth.json
new file mode 100644
index 0000000000..c4e408ba2b
--- /dev/null
+++ b/apps/mobile/locales/en/auth.json
@@ -0,0 +1,35 @@
+{
+ "login": {
+ "title": "Sign in to Multica",
+ "subtitle": "Enter your email and we'll send you a verification code.",
+ "email_label": "Email",
+ "email_placeholder": "[email protected]",
+ "send_code": "Send code",
+ "sending": "Sending...",
+ "continue": "Continue",
+ "invalid_email": "Enter a valid email address",
+ "send_failed": "Couldn't send the sign-in code. Try again."
+ },
+ "verify": {
+ "title": "Enter your code",
+ "enter_title": "Enter verification code",
+ "sent_to": "We sent a 6-digit code to {{email}}",
+ "code_label": "Verification code",
+ "verify": "Verify",
+ "verifying": "Verifying...",
+ "resend": "Resend code",
+ "resend_in": "Resend code in {{count}}s",
+ "invalid_code": "That code isn't valid or has expired.",
+ "expired": "That code has expired. Tap resend to get a new one.",
+ "mismatch": "That code didn't match. Double-check and try again.",
+ "rate_limited": "Too many attempts. Wait a moment and try again.",
+ "network": "Can't reach Multica. Check your connection and retry.",
+ "send_failed": "Couldn't send the code. Try again.",
+ "verify_failed": "Couldn't verify the code. Try again.",
+ "resend_failed": "Couldn't resend the code. Try again.",
+ "change_email": "Use a different email"
+ },
+ "errors": {
+ "sign_in_failed": "Sign-in failed. Try again."
+ }
+}
diff --git a/apps/mobile/locales/en/chat.json b/apps/mobile/locales/en/chat.json
new file mode 100644
index 0000000000..ace515ba0c
--- /dev/null
+++ b/apps/mobile/locales/en/chat.json
@@ -0,0 +1,157 @@
+{
+ "tabs": {
+ "title": "Chat"
+ },
+ "composer": {
+ "no_agent": "No agent selected",
+ "revoked": "You can no longer run this agent",
+ "no_agents": "No agents in this workspace",
+ "archived": "This chat is archived",
+ "runtime_required": "Agent needs a runtime",
+ "replying_to": "Replying to {{name}}",
+ "cancel_reply": "Cancel reply",
+ "mention": "Mention someone or an issue",
+ "upload_image": "Upload image",
+ "upload_file": "Upload file",
+ "send": "Send",
+ "default_placeholder": "Type a message…",
+ "unavailable": "Chat unavailable",
+ "stop_agent": "Stop agent",
+ "file_too_large_title": "File too large",
+ "file_too_large_message": "Files must be smaller than 100 MB.",
+ "working": "Agent is working…",
+ "message": "Message…"
+ },
+ "empty": {
+ "greeting": "Hi, I'm {{name}}",
+ "no_agent_title": "Chat with your agents",
+ "examples": "Examples fill the composer without sending.",
+ "starter_help_label": "What can you help with?",
+ "starter_help_prompt": "What are you best at helping with? Give me a concise overview.",
+ "starter_task_label": "Suggest a first task",
+ "starter_task_prompt": "Suggest three useful tasks I could delegate to you.",
+ "starter_action_label": "Recommend an action",
+ "starter_action_prompt": "Review what you know about my workspace and recommend a useful first action."
+ },
+ "picker": {
+ "title": "Choose an agent",
+ "placeholder": "Search agents...",
+ "empty": "No agents available.",
+ "needs_runtime": "Needs runtime"
+ },
+ "banners": {
+ "no_agent": "No agents available",
+ "runtime_required": "This agent needs a runtime before it can run.",
+ "offline": "{{name}} is offline. Messages will wait until its runtime is back.",
+ "no_agent_action": "Add or enable an agent in More → Agents to start chatting.",
+ "offline_unstable": "{{name}} may have just disconnected — your message will queue.",
+ "runtime_required_name": "{{name}} needs a runtime before it can run. Bind one on web or desktop."
+ },
+ "status": {
+ "offline": "Offline",
+ "reconnecting": "Reconnecting",
+ "queued": "Queued",
+ "starting": "Starting up",
+ "thinking": "Thinking",
+ "typing": "Typing",
+ "working": "Working",
+ "running_command": "Running command",
+ "reading_files": "Reading files",
+ "searching_code": "Searching code",
+ "making_edits": "Making edits",
+ "searching_web": "Searching web",
+ "retrying": "Retrying"
+ },
+ "alerts": {
+ "no_permission_title": "No permission to run this agent",
+ "no_permission_message": "You no longer have permission to run this agent, so the message was not sent. Ask its owner for access.",
+ "runtime_title": "Runtime required",
+ "runtime_message": "Bind a runtime to this agent on web or desktop before sending a message.",
+ "not_sent": "Message not sent",
+ "delete_title": "Delete this chat?",
+ "delete_confirm": "Delete"
+ },
+ "failure": {
+ "invocation_not_allowed": "You no longer have permission to run this agent, so the message was not sent.",
+ "agent_runtime_required": "Bind a runtime to this agent before sending a message.",
+ "runtime_access_denied": "Message not sent — {{detail}}",
+ "default": "Your message could not be sent. Please try again.",
+ "runtime_access_recovery": "This agent can't run on its private runtime. Make the runtime public, or rebind/copy the agent to a runtime its owner can use."
+ },
+ "a11y": {
+ "suggested_followups": "Suggested follow-ups",
+ "show_error_details": "Show error details",
+ "no_agents": "No agents available",
+ "session_actions": "Chat session actions",
+ "new_chat": "New chat",
+ "sessions_agent_picker": "Chat sessions and agent picker"
+ },
+ "title": {
+ "fallback": "Chat",
+ "this_agent": "This agent"
+ },
+ "elapsed": {
+ "replied": "Replied in {{time}}",
+ "finished": "Finished in {{time}}",
+ "failed": "Failed after {{time}}"
+ },
+ "details": {
+ "show": "Show details"
+ },
+ "sessions": {
+ "title": "Chats",
+ "empty": "No chats yet.",
+ "archived": "archived",
+ "new_chat": "New chat"
+ },
+ "picker.title": "Choose an agent",
+ "no_response": "The agent finished this turn without a text reply.",
+ "failure_reason": {
+ "default": "Run failed",
+ "queued_expired": "Expired in queue",
+ "runtime_offline": "Daemon offline",
+ "runtime_reconnect_timeout": "Daemon did not reconnect in time",
+ "runtime_recovery": "Daemon restarted",
+ "timeout": "Run timed out",
+ "iteration_limit": "Hit the iteration limit",
+ "agent_blocked": "Waiting on human input",
+ "api_invalid_request": "Rejected by the model API",
+ "skill_bundle_unavailable": "Couldn't download the agent's skills",
+ "runtime_cli_timeout": "Local runtime CLI timed out",
+ "environment_prepare_failed": "Couldn't prepare the execution environment",
+ "runtime_access_denied": "This agent can't run on its private runtime, so it couldn't reply. Make the runtime public, or rebind/copy the agent to a runtime its owner can use.",
+ "invalid_task_identity": "Run identity mismatch",
+ "agent_error_provider_auth_or_access": "Provider auth failed",
+ "agent_error_provider_quota_limit": "Provider quota exhausted",
+ "agent_error_provider_capacity_or_rate_limit": "Rate limited by provider",
+ "agent_error_provider_server_error": "Provider server error",
+ "agent_error_provider_network": "Network error reaching provider",
+ "agent_error_process_failure": "Agent process crashed",
+ "agent_error_empty_or_unparseable_output": "Agent returned no usable output",
+ "agent_error_agent_timeout": "Agent timed out",
+ "agent_error_context_overflow": "Context window exceeded",
+ "agent_error_missing_config": "Missing API key or configuration",
+ "agent_error_model_not_found_or_unavailable": "Model unavailable",
+ "agent_error_runtime_version_unsupported": "Runner CLI version unsupported",
+ "agent_error_runtime_missing_executable": "Runner CLI not installed",
+ "agent_error_unknown": "Agent execution error",
+ "agent_fallback_message": "Agent returned a fallback message",
+ "codex_resume_oversized": "Session too large to resume",
+ "idle_watchdog": "Agent stopped after inactivity",
+ "local_directory_error": "Local directory error",
+ "cancelled": "Cancelled by the system",
+ "agent_error": "Agent execution error",
+ "codex_semantic_inactivity": "Codex semantic inactivity timeout",
+ "manual": "Cancelled by user",
+ "user_cancelled": "Cancelled by user"
+ },
+ "timeline": {
+ "steps_count_one": "{{count}} step",
+ "steps_count_other": "{{count}} steps",
+ "tool": "Tool",
+ "tool_result_named": "{{tool}} result: ",
+ "tool_result_unnamed": "result: ",
+ "truncated": "…(truncated)",
+ "error": "Error"
+ }
+}
diff --git a/apps/mobile/locales/en/common.json b/apps/mobile/locales/en/common.json
new file mode 100644
index 0000000000..0cb399dc6b
--- /dev/null
+++ b/apps/mobile/locales/en/common.json
@@ -0,0 +1,53 @@
+{
+ "actions": {
+ "add": "Add",
+ "back": "Back",
+ "cancel": "Cancel",
+ "close": "Close",
+ "confirm": "Confirm",
+ "continue": "Continue",
+ "copy": "Copy",
+ "create": "Create",
+ "delete": "Delete",
+ "discard": "Discard",
+ "done": "Done",
+ "download": "Download",
+ "edit": "Edit",
+ "more": "More",
+ "open": "Open",
+ "remove": "Remove",
+ "retry": "Retry",
+ "save": "Save",
+ "search": "Search",
+ "send": "Send",
+ "share": "Share",
+ "upload": "Upload"
+ },
+ "fields": {
+ "assignee": "Assignee",
+ "description": "Description",
+ "due_date": "Due date",
+ "email": "Email",
+ "label": "Label",
+ "name": "Name",
+ "priority": "Priority",
+ "project": "Project",
+ "status": "Status",
+ "title": "Title"
+ },
+ "states": {
+ "loading": "Loading...",
+ "saving": "Saving...",
+ "sending": "Sending...",
+ "offline": "Offline",
+ "empty": "Nothing here yet",
+ "error": "Something went wrong"
+ },
+ "time": {
+ "just_now": "Just now",
+ "minutes_ago_other": "{{count}}m ago",
+ "hours_ago_other": "{{count}}h ago",
+ "days_ago_other": "{{count}}d ago",
+ "weeks_ago_other": "{{count}}w ago"
+ }
+}
diff --git a/apps/mobile/locales/en/editor.json b/apps/mobile/locales/en/editor.json
new file mode 100644
index 0000000000..47e7458836
--- /dev/null
+++ b/apps/mobile/locales/en/editor.json
@@ -0,0 +1,21 @@
+{
+ "a11y": {
+ "mention_someone": "Mention someone",
+ "bullet_list": "Bullet list",
+ "checklist": "Checklist",
+ "code_block": "Code block",
+ "quote": "Quote",
+ "attach_image": "Attach image",
+ "attach_file": "Attach file"
+ },
+ "code": {
+ "copied": "Code copied",
+ "copy": "Copy code"
+ },
+ "upload": {
+ "file_too_large_title": "File too large",
+ "file_too_large_message": "Files must be smaller than 100 MB.",
+ "failed": "Upload failed",
+ "error": "Unknown error"
+ }
+}
diff --git a/apps/mobile/locales/en/inbox.json b/apps/mobile/locales/en/inbox.json
new file mode 100644
index 0000000000..0952a939ab
--- /dev/null
+++ b/apps/mobile/locales/en/inbox.json
@@ -0,0 +1,83 @@
+{
+ "title": "Inbox",
+ "empty": {
+ "title": "You're all caught up",
+ "body": "Notifications and agent updates appear here."
+ },
+ "actions": {
+ "mark_read": "Mark read",
+ "mark_unread": "Mark unread",
+ "mark_all_read": "Mark all read",
+ "archive": "Archive",
+ "archive_all": "Archive all",
+ "archive_all_read": "Archive all read",
+ "archive_completed": "Archive completed",
+ "inbox_actions": "Inbox actions"
+ },
+ "filters": {
+ "all": "All",
+ "unread": "Unread"
+ },
+ "archive": {
+ "confirm_title": "Archive all?",
+ "confirm_body": "This archives every inbox item, read or unread. You can still find them via the issue pages."
+ },
+ "errors": {
+ "load_failed": "Failed to load inbox: {{message}}"
+ },
+ "detail": {
+ "priority_none": "No priority",
+ "priority_low": "Low",
+ "priority_medium": "Medium",
+ "priority_high": "High",
+ "priority_urgent": "Urgent",
+ "status_todo": "Todo",
+ "status_in_progress": "In Progress",
+ "status_done": "Done",
+ "status_blocked": "Blocked",
+ "notification": "Notification",
+ "close": "Close notification",
+ "unavailable": "This notification is no longer available.",
+ "billing_disabled": "Billing changes are unavailable for this workspace. Contact your workspace administrator for help.",
+ "contact_admin": "Ask a workspace owner or admin to review the billing options.",
+ "review_billing": "Review billing options",
+ "review_billing_web": "Open Multica on the web to review billing options."
+ },
+ "type": {
+ "assigned": "Assigned",
+ "subscribed": "Subscribed",
+ "unassigned": "Unassigned",
+ "reassigned": "Reassigned",
+ "status_changed": "Status changed",
+ "priority_changed": "Priority changed",
+ "start_date_changed": "Start date changed",
+ "due_date_changed": "Due date changed",
+ "new_comment": "New comment",
+ "mentioned": "Mentioned",
+ "review_requested": "Review requested",
+ "task_completed": "Task completed",
+ "task_failed": "Task failed",
+ "agent_blocked": "Agent blocked",
+ "agent_completed": "Agent completed",
+ "reaction_added": "Reaction added",
+ "quick_create_done": "Quick-create done",
+ "quick_create_failed": "Quick-create failed",
+ "quick_create_unconfirmed": "Quick-create needs a check",
+ "autopilot_paused": "Autopilot paused",
+ "autopilot_quota_exceeded": "Autopilot run limit reached",
+ "set_status": "Set status to",
+ "set_priority": "Set priority to",
+ "assigned_to": "Assigned to {{name}}",
+ "removed_assignee": "Removed assignee",
+ "set_due_date": "Set due date to {{date}}",
+ "removed_due_date": "Removed due date",
+ "reacted_with": "Reacted with {{emoji}}",
+ "created_with_agent": "Created with agent: {{identifier}}",
+ "failed_with_detail": "Failed: {{detail}}",
+ "run_limit_blocked": "Run blocked because the limit was reached"
+ },
+ "body": {
+ "autopilot_title_limit": "Autopilot \"{{title}}\" was not started because this workspace has reached its limit of {{limit}} runs for the current period. The allowance resets {{resetAt}}.",
+ "autopilot_limit": "This workspace has reached its limit of {{limit}} autopilot runs for the current period. This execution was not started. The allowance resets {{resetAt}}."
+ }
+}
diff --git a/apps/mobile/locales/en/issues.json b/apps/mobile/locales/en/issues.json
new file mode 100644
index 0000000000..b557a22c88
--- /dev/null
+++ b/apps/mobile/locales/en/issues.json
@@ -0,0 +1,271 @@
+{
+ "tabs": {
+ "all": "All",
+ "created": "Created",
+ "assigned": "Assigned",
+ "agents": "Agents",
+ "members": "Members"
+ },
+ "status": {
+ "queued": "Queued",
+ "deferred": "Queued",
+ "dispatched": "Starting",
+ "waiting_local_directory": "Waiting for directory",
+ "running": "Running",
+ "completed": "Done",
+ "failed": "Failed",
+ "cancelled": "Cancelled",
+ "backlog": "Backlog",
+ "todo": "Todo",
+ "in_progress": "In Progress",
+ "in_review": "In Review",
+ "done": "Done",
+ "blocked": "Blocked"
+ },
+ "category": {
+ "unstarted": "Unstarted",
+ "started": "Started",
+ "done": "Done",
+ "closed": "Closed"
+ },
+ "priority": {
+ "none": "No priority",
+ "low": "Low",
+ "medium": "Medium",
+ "high": "High",
+ "urgent": "Urgent"
+ },
+ "filters": {
+ "title": "Filters",
+ "status": "Status",
+ "priority": "Priority",
+ "assignee": "Assignee",
+ "project": "Project",
+ "label": "Label",
+ "clear": "Clear filters",
+ "apply": "Apply",
+ "due_date": "Due date"
+ },
+ "list": {
+ "empty": "No issues match your filters",
+ "count_other": "{{count}} issues",
+ "search_placeholder": "Search issues and projects"
+ },
+ "detail": {
+ "properties": "Properties",
+ "activity": "Activity",
+ "comments": "Comments",
+ "comment": "Comment",
+ "reply": "Reply",
+ "add_comment": "Add comment...",
+ "description": "Description",
+ "add_description": "Add description...",
+ "runs": "Runs",
+ "copy_link": "Copy link",
+ "open_on_web": "Open on web",
+ "delete_comment": "Delete comment",
+ "edit_comment": "Edit comment",
+ "no_runs": "No runs yet"
+ },
+ "new": {
+ "title": "New issue",
+ "title_placeholder": "Issue title",
+ "create": "Create issue",
+ "creating": "Creating...",
+ "description_placeholder": "Description... (type @ to mention)"
+ },
+ "edit": {
+ "title": "Edit issue",
+ "save": "Save changes",
+ "saving": "Saving..."
+ },
+ "activity": {
+ "created": "created the issue",
+ "status_changed": "changed status: {{from}} → {{to}}",
+ "priority_changed": "changed priority: {{from}} → {{to}}",
+ "self_assigned": "self-assigned",
+ "removed_assignee": "removed assignee",
+ "assigned_to": "assigned to {{name}}",
+ "assignee_changed": "changed assignee",
+ "start_date_set": "set start date to {{date}}",
+ "start_date_removed": "removed start date",
+ "due_date_set": "set due date to {{date}}",
+ "due_date_removed": "removed due date",
+ "title_changed": "renamed: \"{{from}}\" → \"{{to}}\"",
+ "description_updated": "updated description",
+ "duplicate_marked": "marked this issue as a duplicate of {{identifier}}",
+ "duplicate_unmarked": "unmarked this issue as a duplicate of {{identifier}}",
+ "duplicate_unmarked_to": "unmarked this issue as a duplicate of {{identifier}} and moved it to {{status}}",
+ "duplicate_unmarked_original_deleted": "removed the duplicate mark, {{identifier}} was deleted",
+ "duplicate_added": "marked {{identifier}} as a duplicate of this issue",
+ "duplicate_removed": "unmarked {{identifier}} as a duplicate of this issue",
+ "tasks_completed_one": "completed {{count}} run",
+ "tasks_completed_other": "completed {{count}} runs",
+ "tasks_failed_one": "failed {{count}} run",
+ "tasks_failed_other": "failed {{count}} runs",
+ "squad_action_with_reason": "evaluated and took action: {{reason}}",
+ "squad_action": "evaluated and took action",
+ "squad_no_action_with_reason": "evaluated: no action needed ({{reason}})",
+ "squad_no_action": "evaluated: no action needed",
+ "squad_failed_with_reason": "evaluation failed: {{reason}}",
+ "squad_failed": "evaluation failed",
+ "squad_evaluated": "evaluated the squad trigger",
+ "commented": "commented"
+ },
+ "errors": {
+ "create_failed": "Failed to create issue",
+ "load_failed": "Failed to load issues: {{message}}"
+ },
+ "empty": {
+ "filtered": "No issues match the current filters.",
+ "assigned": "No issues assigned to you.",
+ "created": "You haven't created any issues.",
+ "agents": "No issues assigned to agents or squads.",
+ "all": "No issues in this workspace.",
+ "members": "No issues assigned to a member."
+ },
+ "menu": {
+ "pin": "Pin",
+ "unpin": "Unpin",
+ "edit_details": "Edit details",
+ "copy_link": "Copy link",
+ "open_web": "Open on web",
+ "delete_issue": "Delete issue",
+ "issue_actions": "Issue actions"
+ },
+ "delete": {
+ "title": "Delete issue?",
+ "message": "{{identifier}} and its comments, reactions, and attachments will be permanently deleted. This cannot be undone."
+ },
+ "summary": {
+ "comment": "Comment run",
+ "autopilot": "Autopilot run",
+ "chat": "Chat run",
+ "quick_create": "Quick create",
+ "direct": "Run"
+ },
+ "cancel": {
+ "title": "Cancel run?",
+ "message": "The agent will stop after the current step.",
+ "keep_running": "Keep running",
+ "cancel_task": "Cancel run"
+ },
+ "form": {
+ "discard_title": "Discard changes?",
+ "discard_message_issue": "Your edits to this issue will be lost.",
+ "keep_editing": "Keep editing",
+ "save_failed": "Failed to save"
+ },
+ "picker": {
+ "unassigned": "Unassigned",
+ "agent": "Agent",
+ "needs_runtime": "Needs runtime",
+ "leader_needs_runtime": "Leader needs runtime",
+ "squad": "Squad",
+ "no_matches": "No matches.",
+ "no_project": "No project",
+ "no_projects": "No projects in this workspace yet.\nCreate them on web.",
+ "no_labels": "No labels in this workspace yet.",
+ "create_label": "Create \"{{name}}\"",
+ "no_members_agents": "No members or agents in this workspace yet.",
+ "people": "People",
+ "agents": "Agents",
+ "squads": "Squads",
+ "issues": "Issues",
+ "everyone": "Everyone (@all)",
+ "unknown": "Unknown",
+ "search_people": "Search people",
+ "search_projects": "Search projects",
+ "search_labels": "Search labels",
+ "search_members_agents": "Search members or agents",
+ "search_people_issues": "Search people or issues",
+ "reference_issue": "Reference an issue",
+ "clear": "Clear"
+ },
+ "comments": {
+ "reply": "Reply",
+ "react": "React...",
+ "copy": "Copy",
+ "select_text": "Select Text",
+ "copy_link": "Copy Link",
+ "resolve": "Resolve Thread",
+ "unresolve": "Unresolve Thread",
+ "delete": "Delete",
+ "delete_title": "Delete comment?",
+ "delete_keep_replies": "This comment will be permanently deleted. Any replies to it stay in the thread. This cannot be undone.",
+ "delete_with_replies": "This comment will be permanently deleted. Replies in the thread will also be removed. This cannot be undone.",
+ "more_reactions": "More reactions...",
+ "fallback_actor": "comment",
+ "composer_placeholder": "Add a comment…",
+ "composer_pill": "Add a comment, type @ to mention..."
+ },
+ "suggestions": {
+ "everyone": "Everyone",
+ "all": "All",
+ "member": "Member",
+ "recent": "Recent",
+ "my_issues": "My issues"
+ },
+ "resolved": {
+ "a11y_folded_one": "Resolved thread by {{authors}}, {{count}} message. Tap to expand.",
+ "a11y_folded_other": "Resolved thread by {{authors}}, {{count}} messages. Tap to expand.",
+ "summary_one": "Resolved · {{count}} message by {{authors}}",
+ "summary_other": "Resolved · {{count}} messages by {{authors}}",
+ "resolved_by": "Resolved by {{name}}",
+ "collapse": "Collapse",
+ "collapse_a11y": "Collapse resolved thread"
+ },
+ "failed": {
+ "send": "Couldn't send",
+ "retry": "Retry",
+ "retry_a11y": "Retry sending comment",
+ "discard": "Discard",
+ "discard_a11y": "Discard failed comment"
+ },
+ "resources": {
+ "title": "Attach repository",
+ "url": "Repository URL",
+ "branch": "Starting branch (optional)",
+ "label": "Label (optional)",
+ "attach": "Attach",
+ "attaching": "Attaching...",
+ "branch_hint": "Runs start from this branch and open their pull requests against it. Leave empty to use the repository default branch.",
+ "commit": "This is a commit ID, not a branch. Runs deliver back to the branch they start from. For a one-off revision, pass --ref to multica repo checkout.",
+ "too_long": "Use at most 255 characters.",
+ "invalid_characters": "A branch name can't contain spaces or any of ~ ^ : ? * [ \\",
+ "invalid": "Not a valid branch name.",
+ "failed": "Failed to attach resource",
+ "error": "Unknown error"
+ },
+ "runs": {
+ "active": "Active",
+ "past": "Past",
+ "title": "Agent Runs",
+ "status": {
+ "queued": "Queued",
+ "deferred": "Deferred",
+ "dispatched": "Dispatched to agent",
+ "running": "Running",
+ "waiting_local_directory": "Waiting for local directory",
+ "completed": "Run succeeded",
+ "failed": "Run failed",
+ "cancelled": "Cancelled"
+ }
+ },
+ "header_filter": "Filter",
+ "new_badge": "New",
+ "jump_a11y_one": "Jump to {{count}} new message",
+ "jump_a11y_other": "Jump to {{count}} new messages",
+ "a11y": {
+ "agent_working": "Agent working — open runs",
+ "remove_mention": "Remove mention {{name}}",
+ "retry_upload": "Retry upload of {{name}}",
+ "open_file": "Open {{name}}",
+ "remove_file": "Remove {{name}}"
+ },
+ "summary.comment": "Comment run",
+ "summary.chat": "Chat run",
+ "summary.direct": "Run",
+ "cancel.title": "Cancel run?",
+ "cancel.cancel_task": "Cancel run"
+}
diff --git a/apps/mobile/locales/en/navigation.json b/apps/mobile/locales/en/navigation.json
new file mode 100644
index 0000000000..8efe99f692
--- /dev/null
+++ b/apps/mobile/locales/en/navigation.json
@@ -0,0 +1,37 @@
+{
+ "back": "Back",
+ "tabs": {
+ "inbox": "Inbox",
+ "my_issues": "My Issues",
+ "chat": "Chat",
+ "more": "More"
+ },
+ "more_menu": {
+ "pinned": "Pinned",
+ "issues": "Issues",
+ "projects": "Projects",
+ "account_settings": "Account settings"
+ },
+ "routes": {
+ "issues": "Issues",
+ "projects": "Projects",
+ "settings": "Settings",
+ "profile": "Profile",
+ "notifications": "Notifications",
+ "search": "Search",
+ "issue": "Issue",
+ "project": "Project",
+ "assignee": "Assignee",
+ "mention": "Mention",
+ "agents": "Agents",
+ "pinned": "Pinned",
+ "switch_workspace": "Switch workspace",
+ "new_issue": "New issue",
+ "new_project": "New project",
+ "edit_issue": "Edit issue",
+ "edit_project": "Edit project",
+ "runs": "Runs",
+ "add_resource": "Add resource",
+ "recent": "Recent"
+ }
+}
diff --git a/apps/mobile/locales/en/projects.json b/apps/mobile/locales/en/projects.json
new file mode 100644
index 0000000000..c7a8449f1b
--- /dev/null
+++ b/apps/mobile/locales/en/projects.json
@@ -0,0 +1,76 @@
+{
+ "list": {
+ "title": "Projects",
+ "empty": "No projects yet",
+ "search_placeholder": "Search projects..."
+ },
+ "status": {
+ "planned": "Planned",
+ "in_progress": "In Progress",
+ "paused": "Paused",
+ "completed": "Completed",
+ "cancelled": "Cancelled"
+ },
+ "priority": {
+ "urgent": "Urgent",
+ "high": "High",
+ "medium": "Medium",
+ "low": "Low",
+ "none": "No priority"
+ },
+ "detail": {
+ "properties": "Properties",
+ "related_issues": "Related issues",
+ "resources": "Resources",
+ "lead": "Lead",
+ "no_resources": "No resources attached.",
+ "add_resource": "Add resource"
+ },
+ "form": {
+ "icon_emoji": "Icon (emoji)",
+ "title": "Title",
+ "title_placeholder": "Project title",
+ "description": "Description",
+ "description_placeholder": "What is this project about?",
+ "discard_title": "Discard project?",
+ "discard_message": "Your draft will be lost.",
+ "keep_editing": "Keep editing",
+ "save_failed": "Failed to create project",
+ "save_failed_edit": "Failed to save"
+ },
+ "errors": {
+ "load_failed": "Failed to load project: {{message}}"
+ },
+ "actions": {
+ "creating": "Creating...",
+ "saving": "Saving..."
+ },
+ "menu": {
+ "pin": "Pin",
+ "unpin": "Unpin",
+ "edit_details": "Edit details",
+ "open_web": "Open on web",
+ "project_actions": "Project actions"
+ },
+ "delete": {
+ "title": "Delete project?",
+ "message": "This cannot be undone. Issues in this project will become unassigned from any project."
+ },
+ "properties": {
+ "status": "Status",
+ "priority": "Priority",
+ "lead": "Lead",
+ "unassigned": "Unassigned"
+ },
+ "resources": {
+ "title": "Resources",
+ "add": "Add",
+ "detach_title": "Detach resource?",
+ "detach": "Detach",
+ "empty": "No resources attached."
+ },
+ "runs": {
+ "working": "Working",
+ "count": "Runs · {{count}}"
+ }
+}
diff --git a/apps/mobile/locales/en/settings.json b/apps/mobile/locales/en/settings.json
new file mode 100644
index 0000000000..2e3ee0bca3
--- /dev/null
+++ b/apps/mobile/locales/en/settings.json
@@ -0,0 +1,84 @@
+{
+ "title": "Settings",
+ "account": {
+ "title": "Account",
+ "sign_out": "Sign out",
+ "sign_out_message": "You'll need to sign in again to use Multica on this device.",
+ "workspace": "Workspace",
+ "workspaces": "Workspaces",
+ "notifications_subtitle": "Inbox and system alerts",
+ "load_failed": "Failed to load workspaces"
+ },
+ "profile": {
+ "title": "Profile",
+ "name": "Name",
+ "email": "Email",
+ "save": "Save profile",
+ "saving": "Saving..."
+ },
+ "appearance": {
+ "title": "Appearance",
+ "theme": "Theme",
+ "light": "Light",
+ "dark": "Dark",
+ "system": "System"
+ },
+ "language": {
+ "title": "Language",
+ "system": "System",
+ "english": "English",
+ "chinese_simplified": "Simplified Chinese"
+ },
+ "notifications": {
+ "title": "Notifications",
+ "issues": "Issues",
+ "inbox": "Inbox",
+ "chat": "Chat",
+ "mentions": "Mentions",
+ "assignments": "Assignments",
+ "status_changes": "Status changes",
+ "saved": "Notification settings saved"
+ },
+ "workspace": {
+ "switch": "Switch workspace",
+ "select": "Select workspace",
+ "empty": "No workspaces yet"
+ },
+ "avatar": {
+ "take": "Take Photo",
+ "library": "Choose from Library",
+ "remove": "Remove Photo",
+ "change_hint": "Tap to change photo",
+ "permission_title": "Permission needed",
+ "permission_message": "Camera access is required to take a photo.",
+ "too_large_title": "Image too large",
+ "too_large_message": "Pick an image under 5 MB.",
+ "upload_failed": "Upload failed",
+ "upload_failed_default": "Could not upload avatar.",
+ "remove_failed": "Remove failed",
+ "remove_failed_default": "Could not remove avatar."
+ },
+ "errors": {
+ "load_failed": "Failed to load notification preferences.",
+ "save_failed": "Failed to save profile.",
+ "save_failed_default": "Could not save your profile."
+ },
+ "email_fixed": "Email is set at sign-up and can't be changed here.",
+ "groups": {
+ "assignments": "Assignments",
+ "assignments_description": "Assigned or unassigned.",
+ "status_changes": "Status changes",
+ "comments": "Comments",
+ "comments_description": "New comments on issues you're subscribed to.",
+ "mentions": "Mentions",
+ "mentions_description": "When someone @mentions you, including @all and @squad.",
+ "updates": "Issue updates",
+ "updates_description": "Edits to title, description, labels, priority, or due date.",
+ "agent_activity": "Agent activity",
+ "agent_activity_description": "When an agent run fails.",
+ "inbox_notifications": "Inbox notifications",
+ "system": "System",
+ "system_notifications": "System notifications",
+ "system_description": "Account changes, security alerts, product updates."
+ }
+}
diff --git a/apps/mobile/locales/en/workspace.json b/apps/mobile/locales/en/workspace.json
new file mode 100644
index 0000000000..722a2229f7
--- /dev/null
+++ b/apps/mobile/locales/en/workspace.json
@@ -0,0 +1,38 @@
+{
+ "title": "Select a workspace",
+ "members": "Members",
+ "agents": "Agents",
+ "select": "Select workspace",
+ "switch": {
+ "title": "Switch workspace",
+ "message": "Switch to {{name}}?",
+ "confirm": "Switch",
+ "current_a11y": "{{name}} is the current workspace",
+ "switch_a11y": "Switch to {{name}}"
+ },
+ "empty": "You don't belong to any workspaces yet. Contact your workspace admin to be invited.",
+ "agent": {
+ "coming_soon": "Agents coming soon.",
+ "title": "Agents",
+ "empty": "No agents yet",
+ "search_placeholder": "Search agents..."
+ },
+ "actions": {
+ "retry": "Retry",
+ "sign_out": "Sign out"
+ },
+ "auth": {
+ "signed_in_as": "Signed in as"
+ },
+ "errors": {
+ "load_failed": "Failed to load workspaces: {{message}}"
+ },
+ "pins": {
+ "errors": {
+ "load_failed": "Failed to load pins: {{message}}"
+ },
+ "empty": "No pinned items yet.",
+ "unavailable_issue": "This pinned issue is unavailable.",
+ "unavailable_project": "This pinned project is unavailable."
+ }
+}
diff --git a/apps/mobile/locales/zh-Hans/auth.json b/apps/mobile/locales/zh-Hans/auth.json
new file mode 100644
index 0000000000..72b80817b6
--- /dev/null
+++ b/apps/mobile/locales/zh-Hans/auth.json
@@ -0,0 +1,37 @@
+{
+ "login": {
+ "title": "登录 Multica",
+ "subtitle": "输入邮箱,我们会发送验证码。",
+ "email_label": "邮箱",
+ "email_placeholder": "[email protected]",
+ "send_code": "发送验证码",
+ "sending": "发送中...",
+ "continue": "继续",
+ "invalid_email": "请输入有效的邮箱地址",
+ "send_failed": "无法发送登录验证码,请重试。"
+ },
+ "verify": {
+ "title": "输入验证码",
+ "enter_title": "输入验证码",
+ "sent_to": "我们已将 6 位验证码发送到 {{email}}",
+ "code_label": "验证码",
+ "verify": "验证",
+ "verifying": "验证中...",
+ "resend": "重新发送验证码",
+ "resend_in": "{{count}} 秒后可重新发送",
+ "invalid_code": "验证码无效或已过期。",
+ "expired": "验证码已过期,请点按重新发送。",
+ "mismatch": "验证码不匹配,请检查后重试。",
+ "rate_limited": "尝试次数过多,请稍后再试。",
+ "network": "无法连接 Multica,请检查网络后重试。",
+ "send_failed": "无法发送验证码,请重试。",
+ "verify_failed": "无法验证验证码,请重试。",
+ "resend_failed": "无法重新发送验证码,请重试。",
+ "change_email": "使用其他邮箱"
+ },
+ "errors": {
+ "sign_in_failed": "登录失败,请重试。"
+ },
+ "login.invalid_email": "请输入有效的邮箱地址",
+ "verify.expired": "验证码已过期,请点按重新发送。"
+}
diff --git a/apps/mobile/locales/zh-Hans/chat.json b/apps/mobile/locales/zh-Hans/chat.json
new file mode 100644
index 0000000000..8b0496b2da
--- /dev/null
+++ b/apps/mobile/locales/zh-Hans/chat.json
@@ -0,0 +1,169 @@
+{
+ "tabs": {
+ "title": "聊天"
+ },
+ "composer": {
+ "no_agent": "未选择智能体",
+ "revoked": "你已无法运行该智能体",
+ "no_agents": "该工作区没有智能体",
+ "archived": "该聊天已归档",
+ "runtime_required": "智能体需要运行时",
+ "replying_to": "回复 {{name}}",
+ "cancel_reply": "取消回复",
+ "mention": "提及成员或任务",
+ "upload_image": "上传图片",
+ "upload_file": "上传文件",
+ "send": "发送",
+ "default_placeholder": "输入消息...",
+ "unavailable": "聊天不可用",
+ "stop_agent": "停止智能体",
+ "file_too_large_title": "文件过大",
+ "file_too_large_message": "文件必须小于 100 MB。",
+ "working": "智能体正在处理...",
+ "message": "消息..."
+ },
+ "empty": {
+ "greeting": "你好,我是 {{name}}",
+ "no_agent_title": "与智能体聊天",
+ "examples": "示例会填充输入框,不会直接发送。",
+ "starter_help_label": "你能帮我做什么?",
+ "starter_help_prompt": "你最擅长帮我做什么?请简要概述。",
+ "starter_task_label": "建议第一个任务",
+ "starter_task_prompt": "建议三个适合委托给你的有用任务。",
+ "starter_action_label": "推荐一个操作",
+ "starter_action_prompt": "了解我的工作区后,推荐一个有用的首要操作。"
+ },
+ "picker": {
+ "title": "选择智能体",
+ "placeholder": "搜索智能体...",
+ "empty": "没有可用智能体。",
+ "needs_runtime": "需要运行时"
+ },
+ "banners": {
+ "no_agent": "没有可用智能体",
+ "runtime_required": "该智能体需要先配置运行时才能运行。",
+ "offline": "{{name}} 已离线。消息会等待其运行时恢复后发送。",
+ "no_agent_action": "在 \"更多 → 智能体\" 中添加或启用智能体即可开始聊天。",
+ "offline_unstable": "{{name}} 可能刚断开连接,你的消息会先排队。",
+ "runtime_required_name": "{{name}} 需要先配置运行时才能运行。请在网页端或桌面端绑定。"
+ },
+ "status": {
+ "offline": "离线",
+ "reconnecting": "重新连接中",
+ "queued": "排队中",
+ "starting": "启动中",
+ "thinking": "思考中",
+ "typing": "输入中",
+ "working": "处理中",
+ "running_command": "正在运行命令",
+ "reading_files": "正在读取文件",
+ "searching_code": "正在搜索代码",
+ "making_edits": "正在修改",
+ "searching_web": "正在搜索网页",
+ "retrying": "重试中"
+ },
+ "alerts": {
+ "no_permission_title": "无权运行该智能体",
+ "no_permission_message": "你已无权运行该智能体,消息未发送。请联系该智能体的所有者申请权限。",
+ "runtime_title": "需要运行时",
+ "runtime_message": "发送消息前,请先在网页端或桌面端为该智能体绑定运行时。",
+ "not_sent": "消息未发送",
+ "delete_title": "删除这个聊天?",
+ "delete_confirm": "删除"
+ },
+ "failure": {
+ "invocation_not_allowed": "你已无权运行该智能体,消息未发送。",
+ "agent_runtime_required": "发送消息前,请先为该智能体绑定运行时。",
+ "runtime_access_denied": "消息未发送:{{detail}}",
+ "default": "消息无法发送,请重试。",
+ "runtime_access_recovery": "该智能体无法在其私有运行时上运行。请将该运行时设为公开,或将智能体重新绑定/复制到其所有者可用的运行时。"
+ },
+ "a11y": {
+ "suggested_followups": "建议的后续操作",
+ "show_error_details": "显示错误详情",
+ "no_agents": "没有可用智能体",
+ "session_actions": "聊天会话操作",
+ "new_chat": "新建聊天",
+ "sessions_agent_picker": "聊天会话和智能体选择器"
+ },
+ "title": {
+ "fallback": "聊天",
+ "this_agent": "该智能体"
+ },
+ "elapsed": {
+ "replied": "用时 {{time}} 回复",
+ "finished": "用时 {{time}} 完成",
+ "failed": "运行 {{time}} 后失败"
+ },
+ "details": {
+ "show": "显示详情"
+ },
+ "sessions": {
+ "title": "聊天",
+ "empty": "还没有聊天。",
+ "archived": "已归档",
+ "new_chat": "新建聊天"
+ },
+ "picker.title": "选择智能体",
+ "no_response": "本轮已结束,智能体没有返回文字回复。",
+ "failure_reason": {
+ "default": "运行失败",
+ "queued_expired": "排队已过期",
+ "runtime_offline": "守护进程离线",
+ "runtime_reconnect_timeout": "守护进程未及时重新连接",
+ "runtime_recovery": "守护进程已重启",
+ "timeout": "运行超时",
+ "iteration_limit": "达到迭代次数上限",
+ "agent_blocked": "等待人工输入",
+ "api_invalid_request": "模型 API 拒绝了请求",
+ "skill_bundle_unavailable": "无法下载智能体的 skill",
+ "runtime_cli_timeout": "本地运行时 CLI 超时",
+ "environment_prepare_failed": "无法准备执行环境",
+ "runtime_access_denied": "该智能体无法在其私有运行时上运行,暂时无法回复。请将该运行时设为公开,或将智能体重新绑定/复制到其所有者可用的运行时。",
+ "invalid_task_identity": "运行身份不匹配",
+ "agent_error_provider_auth_or_access": "提供商认证失败",
+ "agent_error_provider_quota_limit": "提供商配额已用尽",
+ "agent_error_provider_capacity_or_rate_limit": "受到提供商速率限制",
+ "agent_error_provider_server_error": "提供商服务器出错",
+ "agent_error_provider_network": "连接提供商时网络出错",
+ "agent_error_process_failure": "智能体进程崩溃",
+ "agent_error_empty_or_unparseable_output": "智能体未返回可用输出",
+ "agent_error_agent_timeout": "智能体运行超时",
+ "agent_error_context_overflow": "上下文窗口已超限",
+ "agent_error_missing_config": "缺少 API 密钥或配置",
+ "agent_error_model_not_found_or_unavailable": "模型不可用",
+ "agent_error_runtime_version_unsupported": "运行器 CLI 版本不受支持",
+ "agent_error_runtime_missing_executable": "未安装运行器 CLI",
+ "agent_error_unknown": "智能体执行出错",
+ "agent_fallback_message": "智能体返回了兜底消息",
+ "codex_resume_oversized": "会话过大,无法恢复",
+ "idle_watchdog": "智能体长时间无活动,运行已停止",
+ "local_directory_error": "本地目录出错",
+ "cancelled": "系统已取消",
+ "agent_error": "智能体执行出错",
+ "codex_semantic_inactivity": "Codex 长时间没有语义进展",
+ "manual": "用户取消",
+ "user_cancelled": "用户取消"
+ },
+ "timeline": {
+ "steps_count_other": "{{count}} 个步骤",
+ "tool": "工具",
+ "tool_result_named": "{{tool}} 结果:",
+ "tool_result_unnamed": "结果:",
+ "truncated": "…(已截断)",
+ "error": "错误"
+ },
+ "empty.starter_help_prompt": "你最擅长帮我做什么?请简要概述。",
+ "status.reconnecting": "重新连接中",
+ "status.running_command": "正在运行命令",
+ "status.reading_files": "正在读取文件",
+ "status.searching_code": "正在搜索代码",
+ "status.making_edits": "正在修改",
+ "status.searching_web": "正在搜索网页",
+ "elapsed.replied": "用时 {{time}} 回复",
+ "elapsed.finished": "用时 {{time}} 完成",
+ "elapsed.failed": "运行 {{time}} 后失败",
+ "alerts.no_permission_message": "你已无权运行该智能体,消息未发送。请联系该智能体的所有者申请权限。",
+ "failure.runtime_access_denied": "消息未发送:{{detail}}",
+ "banners.no_agent_action": "在 \"更多 → 智能体\" 中添加或启用智能体即可开始聊天。"
+}
diff --git a/apps/mobile/locales/zh-Hans/common.json b/apps/mobile/locales/zh-Hans/common.json
new file mode 100644
index 0000000000..1888f1eecc
--- /dev/null
+++ b/apps/mobile/locales/zh-Hans/common.json
@@ -0,0 +1,55 @@
+{
+ "actions": {
+ "add": "添加",
+ "back": "返回",
+ "cancel": "取消",
+ "close": "关闭",
+ "confirm": "确认",
+ "continue": "继续",
+ "copy": "复制",
+ "create": "创建",
+ "delete": "删除",
+ "discard": "放弃",
+ "done": "完成",
+ "download": "下载",
+ "edit": "编辑",
+ "more": "更多",
+ "open": "打开",
+ "remove": "移除",
+ "retry": "重试",
+ "save": "保存",
+ "search": "搜索",
+ "send": "发送",
+ "share": "分享",
+ "upload": "上传"
+ },
+ "fields": {
+ "assignee": "负责人",
+ "description": "描述",
+ "due_date": "截止日期",
+ "email": "邮箱",
+ "label": "标签",
+ "name": "名称",
+ "priority": "优先级",
+ "project": "项目",
+ "status": "状态",
+ "title": "标题"
+ },
+ "states": {
+ "loading": "加载中...",
+ "saving": "保存中...",
+ "sending": "发送中...",
+ "offline": "离线",
+ "empty": "暂无内容",
+ "error": "出现错误"
+ },
+ "time": {
+ "just_now": "刚刚",
+ "minutes_ago_other": "{{count}} 分钟前",
+ "hours_ago_other": "{{count}} 小时前",
+ "days_ago_other": "{{count}} 天前",
+ "weeks_ago_other": "{{count}} 周前"
+ },
+ "states.empty": "暂无内容",
+ "states.error": "出现错误"
+}
diff --git a/apps/mobile/locales/zh-Hans/editor.json b/apps/mobile/locales/zh-Hans/editor.json
new file mode 100644
index 0000000000..f36973ecd8
--- /dev/null
+++ b/apps/mobile/locales/zh-Hans/editor.json
@@ -0,0 +1,22 @@
+{
+ "a11y": {
+ "mention_someone": "提及某人",
+ "bullet_list": "无序列表",
+ "checklist": "清单",
+ "code_block": "代码块",
+ "quote": "引用",
+ "attach_image": "添加图片",
+ "attach_file": "添加文件"
+ },
+ "code": {
+ "copied": "代码已复制",
+ "copy": "复制代码"
+ },
+ "upload": {
+ "file_too_large_title": "文件过大",
+ "file_too_large_message": "文件必须小于 100 MB。",
+ "failed": "上传失败",
+ "error": "未知错误"
+ },
+ "a11y.mention_someone": "提及某人"
+}
diff --git a/apps/mobile/locales/zh-Hans/inbox.json b/apps/mobile/locales/zh-Hans/inbox.json
new file mode 100644
index 0000000000..51c3da73dc
--- /dev/null
+++ b/apps/mobile/locales/zh-Hans/inbox.json
@@ -0,0 +1,91 @@
+{
+ "title": "收件箱",
+ "empty": {
+ "title": "已处理全部通知",
+ "body": "通知和智能体更新会显示在这里。"
+ },
+ "actions": {
+ "mark_read": "标记已读",
+ "mark_unread": "标记未读",
+ "mark_all_read": "全部标为已读",
+ "archive": "归档",
+ "archive_all": "全部归档",
+ "archive_all_read": "归档已读",
+ "archive_completed": "归档已完成项",
+ "inbox_actions": "收件箱操作"
+ },
+ "filters": {
+ "all": "全部",
+ "unread": "未读"
+ },
+ "archive": {
+ "confirm_title": "全部归档?",
+ "confirm_body": "这会归档所有收件箱项目,包括已读和未读。你仍可在任务页中找到它们。"
+ },
+ "errors": {
+ "load_failed": "收件箱加载失败:{{message}}"
+ },
+ "detail": {
+ "priority_none": "无优先级",
+ "priority_low": "低",
+ "priority_medium": "中",
+ "priority_high": "高",
+ "priority_urgent": "紧急",
+ "status_todo": "todo",
+ "status_in_progress": "in_progress",
+ "status_done": "done",
+ "status_blocked": "blocked",
+ "notification": "通知",
+ "close": "关闭通知",
+ "unavailable": "此通知已不可用。",
+ "billing_disabled": "该工作区无法修改账单设置。请联系工作区管理员。",
+ "contact_admin": "请让工作区所有者或管理员查看账单选项。",
+ "review_billing": "查看账单选项",
+ "review_billing_web": "在网页端打开 Multica 查看账单选项。"
+ },
+ "type": {
+ "assigned": "已分配",
+ "subscribed": "已订阅",
+ "unassigned": "已取消分配",
+ "reassigned": "重新分配",
+ "status_changed": "状态已更改",
+ "priority_changed": "优先级已更改",
+ "start_date_changed": "开始日期已更改",
+ "due_date_changed": "截止日期已更改",
+ "new_comment": "新评论",
+ "mentioned": "提到了你",
+ "review_requested": "请求审核",
+ "task_completed": "运行完成",
+ "task_failed": "运行失败",
+ "agent_blocked": "智能体受阻",
+ "agent_completed": "智能体已完成",
+ "reaction_added": "添加了表情",
+ "quick_create_done": "快速创建完成",
+ "quick_create_failed": "快速创建失败",
+ "quick_create_unconfirmed": "快速创建需要确认",
+ "autopilot_paused": "自动化已暂停",
+ "autopilot_quota_exceeded": "自动化运行次数已达上限",
+ "set_status": "状态设为",
+ "set_priority": "优先级设为",
+ "assigned_to": "分配给 {{name}}",
+ "removed_assignee": "移除了负责人",
+ "set_due_date": "截止日期设为 {{date}}",
+ "removed_due_date": "移除了截止日期",
+ "reacted_with": "回应了 {{emoji}}",
+ "created_with_agent": "由智能体创建:{{identifier}}",
+ "failed_with_detail": "失败:{{detail}}",
+ "run_limit_blocked": "已达到上限,本次运行被阻止"
+ },
+ "body": {
+ "autopilot_title_limit": "自动化 \"{{title}}\" 未启动,因为该工作区已达到当前周期 {{limit}} 次运行的上限。额度将在 {{resetAt}} 重置。",
+ "autopilot_limit": "该工作区已达到当前周期 {{limit}} 次自动化运行的上限。此执行未启动。额度将在 {{resetAt}} 重置。"
+ },
+ "actions.archive_completed": "归档已完成项",
+ "detail.status_todo": "todo",
+ "detail.status_done": "done",
+ "detail.status_blocked": "blocked",
+ "type.task_completed": "运行完成",
+ "type.task_failed": "运行失败",
+ "type.run_limit_blocked": "已达到上限,本次运行被阻止",
+ "body.autopilot_title_limit": "自动化 \"{{title}}\" 未启动,因为该工作区已达到当前周期 {{limit}} 次运行的上限。额度将在 {{resetAt}} 重置。"
+}
diff --git a/apps/mobile/locales/zh-Hans/issues.json b/apps/mobile/locales/zh-Hans/issues.json
new file mode 100644
index 0000000000..9c95b11931
--- /dev/null
+++ b/apps/mobile/locales/zh-Hans/issues.json
@@ -0,0 +1,270 @@
+{
+ "tabs": {
+ "all": "全部",
+ "created": "我创建的",
+ "assigned": "我负责的",
+ "agents": "智能体",
+ "members": "成员"
+ },
+ "status": {
+ "queued": "排队中",
+ "deferred": "排队中",
+ "dispatched": "启动中",
+ "waiting_local_directory": "等待目录",
+ "running": "运行中",
+ "completed": "完成",
+ "failed": "失败",
+ "cancelled": "cancelled",
+ "backlog": "backlog",
+ "todo": "todo",
+ "in_progress": "in_progress",
+ "in_review": "in_review",
+ "done": "done",
+ "blocked": "blocked"
+ },
+ "category": {
+ "unstarted": "unstarted",
+ "started": "started",
+ "done": "done",
+ "closed": "closed"
+ },
+ "priority": {
+ "none": "无优先级",
+ "low": "低",
+ "medium": "中",
+ "high": "高",
+ "urgent": "紧急"
+ },
+ "filters": {
+ "title": "筛选",
+ "status": "状态",
+ "priority": "优先级",
+ "assignee": "负责人",
+ "project": "项目",
+ "label": "标签",
+ "clear": "清除筛选",
+ "apply": "应用",
+ "due_date": "截止日期"
+ },
+ "list": {
+ "empty": "没有符合筛选条件的任务",
+ "count_other": "{{count}} 个任务",
+ "search_placeholder": "搜索任务和项目"
+ },
+ "detail": {
+ "properties": "属性",
+ "activity": "动态",
+ "comments": "评论",
+ "comment": "评论",
+ "reply": "回复",
+ "add_comment": "添加评论...",
+ "description": "描述",
+ "add_description": "添加描述...",
+ "runs": "运行",
+ "copy_link": "复制链接",
+ "open_on_web": "在网页打开",
+ "delete_comment": "删除评论",
+ "edit_comment": "编辑评论",
+ "no_runs": "暂无运行"
+ },
+ "new": {
+ "title": "新建任务",
+ "title_placeholder": "任务标题",
+ "create": "创建任务",
+ "creating": "创建中...",
+ "description_placeholder": "描述...(输入 @ 提及)"
+ },
+ "edit": {
+ "title": "编辑任务",
+ "save": "保存修改",
+ "saving": "保存中..."
+ },
+ "activity": {
+ "created": "创建了任务",
+ "status_changed": "更改了状态:{{from}} → {{to}}",
+ "priority_changed": "更改了优先级:{{from}} → {{to}}",
+ "self_assigned": "指派给了自己",
+ "removed_assignee": "移除了负责人",
+ "assigned_to": "分配给 {{name}}",
+ "assignee_changed": "更改了负责人",
+ "start_date_set": "将开始日期设为 {{date}}",
+ "start_date_removed": "移除了开始日期",
+ "due_date_set": "将截止日期设为 {{date}}",
+ "due_date_removed": "移除了截止日期",
+ "title_changed": "重命名:\"{{from}}\" → \"{{to}}\"",
+ "description_updated": "更新了描述",
+ "duplicate_marked": "把这个任务标记为 {{identifier}} 的重复",
+ "duplicate_unmarked": "取消了这个任务对 {{identifier}} 的重复标记",
+ "duplicate_unmarked_to": "取消了这个任务对 {{identifier}} 的重复标记,并移至 {{status}}",
+ "duplicate_unmarked_original_deleted": "移除了重复标记,{{identifier}} 已被删除",
+ "duplicate_added": "把 {{identifier}} 标记为这个任务的重复",
+ "duplicate_removed": "取消了 {{identifier}} 对这个任务的重复标记",
+ "tasks_completed_other": "完成了 {{count}} 次运行",
+ "tasks_failed_other": "有 {{count}} 次运行失败",
+ "squad_action_with_reason": "评估后执行操作:{{reason}}",
+ "squad_action": "评估后执行操作",
+ "squad_no_action_with_reason": "评估结果:无需操作({{reason}})",
+ "squad_no_action": "评估结果:无需操作",
+ "squad_failed_with_reason": "评估失败:{{reason}}",
+ "squad_failed": "评估失败",
+ "squad_evaluated": "评估了小队触发器",
+ "commented": "发表了评论"
+ },
+ "errors": {
+ "create_failed": "创建任务失败",
+ "load_failed": "任务加载失败:{{message}}"
+ },
+ "empty": {
+ "filtered": "没有符合当前筛选条件的任务。",
+ "assigned": "没有分配给你的任务。",
+ "created": "你还没有创建任务。",
+ "agents": "没有分配给智能体或小队的任务。",
+ "all": "该工作区还没有任务。",
+ "members": "没有分配给成员的任务。"
+ },
+ "menu": {
+ "pin": "固定",
+ "unpin": "取消固定",
+ "edit_details": "编辑详情",
+ "copy_link": "复制链接",
+ "open_web": "在网页打开",
+ "delete_issue": "删除任务",
+ "issue_actions": "任务操作"
+ },
+ "delete": {
+ "title": "删除任务?",
+ "message": "{{identifier}} 及其评论、表情和附件将被永久删除,且无法撤销。"
+ },
+ "summary": {
+ "comment": "评论运行",
+ "autopilot": "自动化运行",
+ "chat": "聊天运行",
+ "quick_create": "快速创建",
+ "direct": "运行"
+ },
+ "cancel": {
+ "title": "取消运行?",
+ "message": "智能体会在当前步骤结束后停止。",
+ "keep_running": "继续运行",
+ "cancel_task": "取消运行"
+ },
+ "form": {
+ "discard_title": "放弃修改?",
+ "discard_message_issue": "你对这个任务的修改将会丢失。",
+ "keep_editing": "继续编辑",
+ "save_failed": "保存失败"
+ },
+ "picker": {
+ "unassigned": "未分配",
+ "agent": "智能体",
+ "needs_runtime": "需要运行时",
+ "leader_needs_runtime": "负责人需要运行时",
+ "squad": "小队",
+ "no_matches": "没有匹配结果。",
+ "no_project": "无项目",
+ "no_projects": "该工作区还没有项目。\n请在网页端创建。",
+ "no_labels": "该工作区还没有标签。",
+ "create_label": "创建 \"{{name}}\"",
+ "no_members_agents": "该工作区还没有成员或智能体。",
+ "people": "成员",
+ "agents": "智能体",
+ "squads": "小队",
+ "issues": "任务",
+ "everyone": "所有人(@all)",
+ "unknown": "未知",
+ "search_people": "搜索成员",
+ "search_projects": "搜索项目",
+ "search_labels": "搜索标签",
+ "search_members_agents": "搜索成员或智能体",
+ "search_people_issues": "搜索成员或任务",
+ "reference_issue": "引用任务",
+ "clear": "清除"
+ },
+ "comments": {
+ "reply": "回复",
+ "react": "回应...",
+ "copy": "复制",
+ "select_text": "选择文本",
+ "copy_link": "复制链接",
+ "resolve": "解决讨论",
+ "unresolve": "重新打开讨论",
+ "delete": "删除",
+ "delete_title": "删除评论?",
+ "delete_keep_replies": "该评论将被永久删除。其回复会保留在讨论中。此操作无法撤销。",
+ "delete_with_replies": "该评论将被永久删除,讨论中的回复也会一并移除。此操作无法撤销。",
+ "more_reactions": "更多表情...",
+ "fallback_actor": "评论",
+ "composer_placeholder": "添加评论...",
+ "composer_pill": "添加评论,输入 @ 提及..."
+ },
+ "suggestions": {
+ "everyone": "所有人",
+ "all": "全部",
+ "member": "成员",
+ "recent": "最近",
+ "my_issues": "我的任务"
+ },
+ "resolved": {
+ "a11y_folded_other": "由 {{authors}} 解决的讨论,{{count}} 条消息。点按展开。",
+ "summary_other": "已解决 · {{count}} 条消息,由 {{authors}} 处理",
+ "resolved_by": "由 {{name}} 解决",
+ "collapse": "收起",
+ "collapse_a11y": "收起已解决讨论"
+ },
+ "failed": {
+ "send": "无法发送",
+ "retry": "重试",
+ "retry_a11y": "重试发送评论",
+ "discard": "放弃",
+ "discard_a11y": "放弃失败的评论"
+ },
+ "resources": {
+ "title": "添加仓库",
+ "url": "仓库 URL",
+ "branch": "起始分支(可选)",
+ "label": "标签(可选)",
+ "attach": "添加",
+ "attaching": "添加中...",
+ "branch_hint": "运行会从这个分支开始,并针对它创建 Pull Request。留空则使用仓库默认分支。",
+ "commit": "这是提交 ID,不是分支。运行会回传到起始分支。如需一次性修订,请给 multica repo checkout 传入 --ref。",
+ "too_long": "最多使用 255 个字符。",
+ "invalid_characters": "分支名不能包含空格或 ~ ^ : ? * [ \\",
+ "invalid": "不是有效的分支名。",
+ "failed": "添加资源失败",
+ "error": "未知错误"
+ },
+ "runs": {
+ "active": "进行中",
+ "past": "历史",
+ "title": "智能体运行",
+ "status": {
+ "queued": "排队中",
+ "deferred": "已延后",
+ "dispatched": "已交给智能体",
+ "running": "运行中",
+ "waiting_local_directory": "等待本地目录可用",
+ "completed": "运行成功",
+ "failed": "运行失败",
+ "cancelled": "已取消"
+ }
+ },
+ "header_filter": "筛选",
+ "new_badge": "新",
+ "jump_a11y_other": "跳到 {{count}} 条新消息",
+ "a11y": {
+ "agent_working": "智能体处理中 — 打开运行",
+ "remove_mention": "移除提及 {{name}}",
+ "retry_upload": "重试上传 {{name}}",
+ "open_file": "打开 {{name}}",
+ "remove_file": "移除 {{name}}"
+ },
+ "summary.comment": "评论运行",
+ "summary.chat": "聊天运行",
+ "summary.direct": "运行",
+ "cancel.title": "取消运行?",
+ "cancel.cancel_task": "取消运行",
+ "picker.create_label": "创建 \"{{name}}\"",
+ "comments.composer_pill": "添加评论,输入 @ 提及...",
+ "resources.branch_hint": "运行会从这个分支开始,并针对它创建 Pull Request。留空则使用仓库默认分支。",
+ "resources.commit": "这是提交 ID,不是分支。运行会回传到起始分支。如需一次性修订,请给 multica repo checkout 传入 --ref。"
+}
diff --git a/apps/mobile/locales/zh-Hans/navigation.json b/apps/mobile/locales/zh-Hans/navigation.json
new file mode 100644
index 0000000000..43b70daf05
--- /dev/null
+++ b/apps/mobile/locales/zh-Hans/navigation.json
@@ -0,0 +1,37 @@
+{
+ "back": "返回",
+ "tabs": {
+ "inbox": "收件箱",
+ "my_issues": "我的任务",
+ "chat": "聊天",
+ "more": "更多"
+ },
+ "more_menu": {
+ "pinned": "已固定",
+ "issues": "任务",
+ "projects": "项目",
+ "account_settings": "账号设置"
+ },
+ "routes": {
+ "issues": "任务",
+ "projects": "项目",
+ "settings": "设置",
+ "profile": "个人资料",
+ "notifications": "通知",
+ "search": "搜索",
+ "issue": "任务",
+ "project": "项目",
+ "assignee": "负责人",
+ "mention": "提及",
+ "agents": "智能体",
+ "pinned": "已固定",
+ "switch_workspace": "切换工作区",
+ "new_issue": "新建任务",
+ "new_project": "新建项目",
+ "edit_issue": "编辑任务",
+ "edit_project": "编辑项目",
+ "runs": "运行",
+ "add_resource": "添加资源",
+ "recent": "最近"
+ }
+}
diff --git a/apps/mobile/locales/zh-Hans/projects.json b/apps/mobile/locales/zh-Hans/projects.json
new file mode 100644
index 0000000000..a09611029f
--- /dev/null
+++ b/apps/mobile/locales/zh-Hans/projects.json
@@ -0,0 +1,78 @@
+{
+ "list": {
+ "title": "项目",
+ "empty": "还没有项目",
+ "search_placeholder": "搜索项目..."
+ },
+ "status": {
+ "planned": "计划中",
+ "in_progress": "进行中",
+ "paused": "已暂停",
+ "completed": "已完成",
+ "cancelled": "已取消"
+ },
+ "priority": {
+ "urgent": "紧急",
+ "high": "高",
+ "medium": "中",
+ "low": "低",
+ "none": "无优先级"
+ },
+ "detail": {
+ "properties": "属性",
+ "related_issues": "相关任务",
+ "resources": "资源",
+ "lead": "负责人",
+ "no_resources": "尚未添加资源。",
+ "add_resource": "添加资源"
+ },
+ "form": {
+ "icon_emoji": "图标(emoji)",
+ "title": "标题",
+ "title_placeholder": "项目标题",
+ "description": "描述",
+ "description_placeholder": "这个项目是做什么的?",
+ "discard_title": "放弃项目?",
+ "discard_message": "草稿将会丢失。",
+ "keep_editing": "继续编辑",
+ "save_failed": "创建项目失败",
+ "save_failed_edit": "保存失败"
+ },
+ "errors": {
+ "load_failed": "项目加载失败:{{message}}"
+ },
+ "actions": {
+ "creating": "创建中...",
+ "saving": "保存中..."
+ },
+ "menu": {
+ "pin": "固定",
+ "unpin": "取消固定",
+ "edit_details": "编辑详情",
+ "open_web": "在网页打开",
+ "project_actions": "项目操作"
+ },
+ "delete": {
+ "title": "删除项目?",
+ "message": "此操作无法撤销。该项目中的任务将不再关联任何项目。"
+ },
+ "properties": {
+ "status": "状态",
+ "priority": "优先级",
+ "lead": "负责人",
+ "unassigned": "未分配"
+ },
+ "resources": {
+ "title": "资源",
+ "add": "添加",
+ "detach_title": "移除资源?",
+ "detach": "移除",
+ "empty": "尚未添加资源。"
+ },
+ "runs": {
+ "working": "处理中",
+ "count": "运行 · {{count}}"
+ },
+ "status.planned": "计划中",
+ "form.description_placeholder": "这个项目是做什么的?"
+}
diff --git a/apps/mobile/locales/zh-Hans/settings.json b/apps/mobile/locales/zh-Hans/settings.json
new file mode 100644
index 0000000000..c57e150952
--- /dev/null
+++ b/apps/mobile/locales/zh-Hans/settings.json
@@ -0,0 +1,86 @@
+{
+ "title": "设置",
+ "account": {
+ "title": "账号",
+ "sign_out": "退出登录",
+ "sign_out_message": "你需要重新登录才能在此设备上使用 Multica。",
+ "workspace": "工作区",
+ "workspaces": "工作区",
+ "notifications_subtitle": "收件箱和系统提醒",
+ "load_failed": "工作区加载失败"
+ },
+ "profile": {
+ "title": "个人资料",
+ "name": "姓名",
+ "email": "邮箱",
+ "save": "保存个人资料",
+ "saving": "保存中..."
+ },
+ "appearance": {
+ "title": "外观",
+ "theme": "主题",
+ "light": "浅色",
+ "dark": "深色",
+ "system": "跟随系统"
+ },
+ "language": {
+ "title": "语言",
+ "system": "跟随系统",
+ "english": "English",
+ "chinese_simplified": "简体中文"
+ },
+ "notifications": {
+ "title": "通知",
+ "issues": "任务",
+ "inbox": "收件箱",
+ "chat": "聊天",
+ "mentions": "提及",
+ "assignments": "分配给我的",
+ "status_changes": "状态变更",
+ "saved": "通知设置已保存"
+ },
+ "workspace": {
+ "switch": "切换工作区",
+ "select": "选择工作区",
+ "empty": "还没有工作区"
+ },
+ "avatar": {
+ "take": "拍照",
+ "library": "从相册选择",
+ "remove": "移除头像",
+ "change_hint": "点按更换头像",
+ "permission_title": "需要权限",
+ "permission_message": "拍照需要相机权限。",
+ "too_large_title": "图片过大",
+ "too_large_message": "请选择小于 5 MB 的图片。",
+ "upload_failed": "上传失败",
+ "upload_failed_default": "无法上传头像。",
+ "remove_failed": "移除失败",
+ "remove_failed_default": "无法移除头像。"
+ },
+ "errors": {
+ "load_failed": "通知偏好设置加载失败。",
+ "save_failed": "个人资料保存失败。",
+ "save_failed_default": "无法保存你的个人资料。"
+ },
+ "email_fixed": "邮箱在注册时设置,无法在这里修改。",
+ "groups": {
+ "assignments": "分配给我的",
+ "assignments_description": "任务分配给我或取消分配给我时。",
+ "status_changes": "状态变更",
+ "comments": "评论",
+ "comments_description": "你订阅的任务有新评论时。",
+ "mentions": "提及",
+ "mentions_description": "有人用 @ 提到你时,包括 @all 和 @squad。",
+ "updates": "任务更新",
+ "updates_description": "标题、描述、标签、优先级或截止日期变更时。",
+ "agent_activity": "智能体动态",
+ "agent_activity_description": "智能体运行失败时。",
+ "inbox_notifications": "收件箱通知",
+ "system": "系统",
+ "system_notifications": "系统通知",
+ "system_description": "账号变更、安全提醒和产品更新。"
+ },
+ "groups.assignments_description": "任务分配给我或取消分配给我时。",
+ "groups.mentions_description": "有人用 @ 提到你时,包括 @all 和 @squad。"
+}
diff --git a/apps/mobile/locales/zh-Hans/workspace.json b/apps/mobile/locales/zh-Hans/workspace.json
new file mode 100644
index 0000000000..a94fc838fc
--- /dev/null
+++ b/apps/mobile/locales/zh-Hans/workspace.json
@@ -0,0 +1,38 @@
+{
+ "title": "选择工作区",
+ "members": "成员",
+ "agents": "智能体",
+ "select": "选择工作区",
+ "switch": {
+ "title": "切换工作区",
+ "message": "切换到 {{name}}?",
+ "confirm": "切换",
+ "current_a11y": "{{name}} 是当前工作区",
+ "switch_a11y": "切换到 {{name}}"
+ },
+ "empty": "你还没有加入任何工作区。请联系工作区管理员以获取邀请。",
+ "agent": {
+ "title": "智能体",
+ "empty": "还没有智能体",
+ "search_placeholder": "搜索智能体...",
+ "coming_soon": "智能体功能即将上线。"
+ },
+ "actions": {
+ "retry": "重试",
+ "sign_out": "退出登录"
+ },
+ "auth": {
+ "signed_in_as": "当前登录账号"
+ },
+ "errors": {
+ "load_failed": "工作区加载失败:{{message}}"
+ },
+ "pins": {
+ "errors": {
+ "load_failed": "固定项加载失败:{{message}}"
+ },
+ "empty": "还没有固定项。",
+ "unavailable_issue": "该固定任务不可用。",
+ "unavailable_project": "该固定项目不可用。"
+ }
+}
diff --git a/apps/mobile/package.json b/apps/mobile/package.json
index 7b8494ecc6..ff02e5c0a8 100644
--- a/apps/mobile/package.json
+++ b/apps/mobile/package.json
@@ -6,15 +6,15 @@
"scripts": {
"dev": "expo start",
"dev:staging": "dotenv -e .env.staging -- cross-env APP_ENV=staging expo start",
- "dev:prod": "dotenv -e .env.production -- cross-env APP_ENV=production expo start",
+ "dev:prod": "dotenv -e .env.production.local -e .env.production -- cross-env APP_ENV=production expo start",
"ios": "./scripts/ios-run.sh",
"ios:staging": "dotenv -e .env.staging -- cross-env APP_ENV=staging ./scripts/ios-run.sh",
- "ios:prod": "dotenv -e .env.production -- cross-env APP_ENV=production ./scripts/ios-run.sh",
+ "ios:prod": "dotenv -e .env.production.local -e .env.production -- cross-env APP_ENV=production ./scripts/ios-run.sh",
"ios:device": "./scripts/ios-run.sh --device",
"ios:device:staging": "dotenv -e .env.staging -- cross-env APP_ENV=staging ./scripts/ios-run.sh --device",
"ios:device:staging:release": "dotenv -e .env.staging -- cross-env APP_ENV=staging ./scripts/ios-run.sh --device --configuration Release",
- "ios:device:prod": "dotenv -e .env.production -- cross-env APP_ENV=production ./scripts/ios-run.sh --device",
- "ios:device:prod:release": "dotenv -e .env.production -- cross-env APP_ENV=production ./scripts/ios-run.sh --device --configuration Release",
+ "ios:device:prod": "dotenv -e .env.production.local -e .env.production -- cross-env APP_ENV=production ./scripts/ios-run.sh --device",
+ "ios:device:prod:release": "dotenv -e .env.production.local -e .env.production -- cross-env APP_ENV=production ./scripts/ios-run.sh --device --configuration Release",
"lint": "expo lint",
"typecheck": "tsc --noEmit",
"test": "vitest run && bash scripts/ios-run.test.sh"
@@ -53,15 +53,18 @@
"expo-image": "^55.0.10",
"expo-image-picker": "~55.0.20",
"expo-linking": "~55.0.0",
+ "expo-localization": "~55.0.19",
"expo-router": "~55.0.14",
"expo-secure-store": "~55.0.13",
"expo-status-bar": "~55.0.0",
"expo-system-ui": "~55.0.0",
+ "i18next": "catalog:",
"input-otp-native": "^0.5.0",
"marked": "^18.0.3",
"nativewind": "^4.1.23",
"react": "19.2.0",
"react-dom": "19.2.0",
+ "react-i18next": "catalog:",
"react-native": "0.83.6",
"react-native-enriched-markdown": "^0.6.0",
"react-native-gesture-handler": "~2.30.1",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index e00b009dd9..82b958d384 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -434,6 +434,9 @@ importers:
expo-linking:
specifier: ~55.0.0
+ expo-localization:
+ specifier: ~55.0.19
expo-router:
specifier: ~55.0.14
version: 55.0.14(28857138dad78e037ca803b5df54c4f8)
@@ -446,6 +449,9 @@ importers:
expo-system-ui:
specifier: ~55.0.0
+ i18next:
+ specifier: 'catalog:'
+ version: 26.0.8([email protected])
input-otp-native:
specifier: ^0.5.0
@@ -461,6 +467,9 @@ importers:
react-dom:
specifier: 19.2.0
version: 19.2.0([email protected])
+ react-i18next:
+ specifier: 'catalog:'
react-native:
specifier: 0.83.6
version: 0.83.6(@babel/[email protected])(@types/[email protected])([email protected])
@@ -642,16 +651,16 @@ importers:
version: 17.4.1
fumadocs-core:
specifier: ^15.5.2
fumadocs-mdx:
specifier: ^12.0.3
lucide-react:
specifier: 'catalog:'
version: 1.0.1([email protected])
next:
specifier: ^16.3.4
react:
specifier: 'catalog:'
version: 19.2.3
@@ -706,7 +715,7 @@ importers:
version: 5.9.3
vitest:
specifier: 'catalog:'
packages/core:
dependencies:
@@ -1161,15 +1170,6 @@ importers:
packages:
- resolution: {integrity: sha512-oz68bhsnFWnpDf1ZR8daiQbYpXUnM2h2J6hl9Zg2rTpM/DU6vCqe1E+CpqmqLnJucMZetHZeifSAfJ+geN9lcA==}
- peerDependencies:
- react: '>=16.8.0'
- react-dom: '>=16.8.0'
-
- resolution: {integrity: sha512-LY7OHnJZxHwT5UlzNa9bbhHHDbzB6yE5+3MIPwJEQKRvSCt/T4G7epsj+9j2BExUIIfXFIJGsIXUKdfrK9Q5tA==}
-
resolution: {integrity: sha512-ukTPVhqG4jNzMro2qA9HSCSSVJN3aN7tlb+hfqYCt3ER0yWroeA2VR38MNrOHLQ/cVj+DaIMad0kFCtWWowh/A==}
@@ -5721,6 +5721,9 @@ packages:
resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==}
engines: {node: '>=12.5.0'}
+ resolution: {integrity: sha512-LY7OHnJZxHwT5UlzNa9bbhHHDbzB6yE5+3MIPwJEQKRvSCt/T4G7epsj+9j2BExUIIfXFIJGsIXUKdfrK9Q5tA==}
+
resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==}
engines: {node: '>= 0.8'}
@@ -6777,6 +6780,12 @@ packages:
react: '*'
react-native: '*'
+ resolution: {integrity: sha512-rw8pcC4QL8HC3K8Vs5pdVCB+ayFkaVD0f+Ul+jHgM6W7XdzGtCzd0x7rI3M/9PzP1YpAgQ4jYZid/g+UKi9IIA==}
+ peerDependencies:
+ expo: '*'
+ react: '*'
+
resolution: {integrity: sha512-vKZvFivX3usVJKfBODKQcFHso0g38zlGbRGqGAppz+il0zKvG6umpJ47OZbzLod7iJpjd+ZDD2AGuOxacixonA==}
peerDependencies:
@@ -9449,6 +9458,12 @@ packages:
resolution: {integrity: sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==}
engines: {node: '>= 0.10'}
+ resolution: {integrity: sha512-oz68bhsnFWnpDf1ZR8daiQbYpXUnM2h2J6hl9Zg2rTpM/DU6vCqe1E+CpqmqLnJucMZetHZeifSAfJ+geN9lcA==}
+ peerDependencies:
+ react: '>=16.8.0'
+ react-dom: '>=16.8.0'
+
resolution: {integrity: sha512-tBaoDWjPwe0M5pGrum4H0SR6Lyk+BO9oHnp9JbKpGKW2mlraNPgP9BMfsg5pWpwrssARmeqk7YBl2oXutZTaHA==}
engines: {node: '>=18'}
@@ -9976,6 +9991,9 @@ packages:
resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==}
engines: {node: '>= 18'}
+ resolution: {integrity: sha512-PGMBq03+TTG/p/cRB7HCLKJ1MgDIi07+QU1faSjiYRfmY5UsAttV9Hs08jDAHVwcOwmVLcSJkpwyfXszVjWfIQ==}
+
resolution: {integrity: sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==}
engines: {node: '>=18'}
@@ -11224,13 +11242,6 @@ packages:
resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==}
snapshots:
- dependencies:
- react: 19.2.3
- react-dom: 19.2.3([email protected])
-
-
@@ -16441,6 +16452,8 @@ snapshots:
color-convert: 2.0.1
color-string: 1.9.1
+
dependencies:
delayed-stream: 1.0.0
@@ -17809,6 +17822,12 @@ snapshots:
- expo
- supports-color
+ dependencies:
+ react: 19.2.0
+ rtl-detect: 1.1.2
+
dependencies:
@@ -18268,7 +18287,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
'@formatjs/intl-localematcher': 0.6.2
'@orama/orama': 3.1.18
@@ -18291,7 +18310,7 @@ snapshots:
optionalDependencies:
'@types/react': 19.2.14
lucide-react: 1.0.1([email protected])
react: 19.2.3
react-dom: 19.2.3([email protected])
@@ -18324,14 +18343,14 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
'@mdx-js/mdx': 3.1.1
'@standard-schema/spec': 1.1.0
chokidar: 4.0.3
esbuild: 0.25.12
estree-util-value-to-estree: 3.5.0
js-yaml: 4.1.1
lru-cache: 11.2.7
mdast-util-to-markdown: 2.1.2
@@ -18344,7 +18363,7 @@ snapshots:
unist-util-visit: 5.1.0
zod: 4.3.6
optionalDependencies:
react: 19.2.3
transitivePeerDependencies:
- supports-color
@@ -20429,7 +20448,7 @@ snapshots:
postcss: 8.5.26
react: 19.2.3
react-dom: 19.2.3([email protected])
- styled-jsx: 5.1.6(@babel/[email protected])([email protected])
+ styled-jsx: 5.1.6([email protected])
optionalDependencies:
'@next/swc-darwin-arm64': 15.5.18
'@next/swc-darwin-x64': 15.5.18
@@ -20447,7 +20466,7 @@ snapshots:
- '@babel/core'
- babel-plugin-macros
dependencies:
'@next/env': 16.3.4
'@swc/helpers': 0.5.23
@@ -20456,7 +20475,7 @@ snapshots:
postcss: 8.5.26
react: 19.2.3
react-dom: 19.2.3([email protected])
- styled-jsx: 5.1.6(@babel/[email protected])([email protected])
+ styled-jsx: 5.1.6([email protected])
optionalDependencies:
'@next/swc-darwin-arm64': 16.3.4
'@next/swc-darwin-x64': 16.3.4
@@ -21216,6 +21235,11 @@ snapshots:
iconv-lite: 0.7.2
unpipe: 1.0.0
+ dependencies:
+ react: 19.2.3
+ react-dom: 19.2.3([email protected])
+
dependencies:
'@date-fns/tz': 1.4.1
@@ -21254,6 +21278,18 @@ snapshots:
dependencies:
react: 19.2.0
+ dependencies:
+ '@babel/runtime': 7.29.2
+ html-parse-stringify: 3.0.1
+ i18next: 26.0.8([email protected])
+ react: 19.2.0
+ use-sync-external-store: 1.6.0([email protected])
+ optionalDependencies:
+ react-dom: 19.2.0([email protected])
+ react-native: 0.83.6(@babel/[email protected])(@types/[email protected])([email protected])
+ typescript: 5.9.3
+
dependencies:
'@babel/runtime': 7.29.2
@@ -21944,6 +21980,8 @@ snapshots:
transitivePeerDependencies:
- supports-color
+
@@ -22499,12 +22537,10 @@ snapshots:
dependencies:
inline-style-parser: 0.2.7
dependencies:
client-only: 0.0.1
react: 19.2.3
- optionalDependencies:
- '@babel/core': 7.29.0