Skip to content

⭐️⭐️⭐️ Open-source, self-hosted alternative to Linear and Plane. Project management and issue tracking where teams and AI agents work side by side to plan and ship products.

feat(web): localize UI with en/uk support (#123)

Croffbf3beaffd659
diff --git a/apps/api/src/user-preferences/__tests__/integration/user-preferences.test.ts b/apps/api/src/user-preferences/__tests__/integration/user-preferences.test.ts
index 42c7ea9b..b0e1d3e6 100644
--- a/apps/api/src/user-preferences/__tests__/integration/user-preferences.test.ts
+++ b/apps/api/src/user-preferences/__tests__/integration/user-preferences.test.ts
@@ -18,6 +18,7 @@ describe('user preferences', () => {
expect(res.status).toBe(200);
expect(res.data).toEqual({
timezone: 'UTC',
+ locale: 'en',
theme: 'system',
issueOpenMode: 'panel',
startPage: 'work-items',
@@ -37,6 +38,7 @@ describe('user preferences', () => {
const res = await client.account.preferences.patch({
timezone: 'Europe/Berlin',
+ locale: 'uk',
theme: 'dark',
issueOpenMode: 'page',
startPage: 'inbox',
@@ -52,6 +54,7 @@ describe('user preferences', () => {
const stored = await client.account.preferences.get();
expect(stored.data).toEqual({
timezone: 'Europe/Berlin',
+ locale: 'uk',
theme: 'dark',
issueOpenMode: 'page',
startPage: 'inbox',
@@ -94,6 +97,16 @@ describe('user preferences', () => {
expect(res.status).toBe(400);
});
+ it('rejects an unsupported locale', async () => {
+ const u = await signUpTestUser();
+
+ const res = await authedApi(u.cookie).account.preferences.patch({
+ locale: 'de' as 'uk',
+ });
+
+ expect(res.status).toBe(400);
+ });
+
it('rejects an unknown issue stats view', async () => {
const u = await signUpTestUser();
diff --git a/apps/api/src/user-preferences/routes.ts b/apps/api/src/user-preferences/routes.ts
index 339b73d4..ffc5042e 100644
--- a/apps/api/src/user-preferences/routes.ts
+++ b/apps/api/src/user-preferences/routes.ts
@@ -7,6 +7,7 @@ import { ErrorResponse } from '../shared/responses';
import { HotkeyCombosSchema } from '../settings/hotkeys';
import { getPreferences, isValidTimezone, updatePreferences } from './store';
+const Locale = t.Union([t.Literal('en'), t.Literal('uk')]);
const Theme = t.Union([t.Literal('light'), t.Literal('dark'), t.Literal('system')]);
const IssueOpenMode = t.Union([t.Literal('panel'), t.Literal('page')]);
const StartPage = t.Union([
@@ -22,6 +23,7 @@ const IssueActivityView = t.Union([t.Literal('flat'), t.Literal('grouped')]);
const PreferenceResponse = t.Object({
timezone: t.String(),
+ locale: Locale,
theme: Theme,
issueOpenMode: IssueOpenMode,
startPage: StartPage,
@@ -36,6 +38,7 @@ const PreferenceResponse = t.Object({
const PreferencePatch = t.Object({
timezone: t.Optional(t.String({ minLength: 1, maxLength: 64 })),
+ locale: t.Optional(Locale),
theme: t.Optional(Theme),
issueOpenMode: t.Optional(IssueOpenMode),
startPage: t.Optional(StartPage),
@@ -50,7 +53,7 @@ const PreferencePatch = t.Object({
hotkeys: t.Optional(HotkeyCombosSchema),
});
-// The session user's own interface preferences: timezone, theme, how a clicked issue
+// The session user's own interface preferences: timezone, language, theme, how a clicked issue
// opens, which section the app root lands on, whether the floating AI chat starts
// visible, how an issue's status stats section starts out, whether they are
// subscribed to the issues they touch, and the project they were in last. Every
diff --git a/apps/api/src/user-preferences/store.ts b/apps/api/src/user-preferences/store.ts
index 55d0ae57..32ec3759 100644
--- a/apps/api/src/user-preferences/store.ts
+++ b/apps/api/src/user-preferences/store.ts
@@ -6,12 +6,14 @@ import { eq, sql } from 'drizzle-orm';
// defaults below apply, so a read never fails. Timestamps stay UTC everywhere in the
// API — `timezone` only tells the web app which zone to render them in.
+export const LOCALES = ['en', 'uk'] as const;
export const THEMES = ['light', 'dark', 'system'] as const;
export const ISSUE_OPEN_MODES = ['panel', 'page'] as const;
export const START_PAGES = ['inbox', 'dashboard', 'work-items', 'initiatives', 'ai-chat'] as const;
export const ISSUE_STATS_VIEWS = ['compact', 'timeline'] as const;
export const ISSUE_ACTIVITY_VIEWS = ['flat', 'grouped'] as const;
+export type Locale = (typeof LOCALES)[number];
export type Theme = (typeof THEMES)[number];
export type IssueOpenMode = (typeof ISSUE_OPEN_MODES)[number];
export type StartPage = (typeof START_PAGES)[number];
@@ -20,6 +22,8 @@ export type IssueActivityView = (typeof ISSUE_ACTIVITY_VIEWS)[number];
export interface UserPreferenceDto {
timezone: string;
+ // The interface language, also used for this user's emails and bot messages.
+ locale: Locale;
theme: Theme;
issueOpenMode: IssueOpenMode;
startPage: StartPage;
@@ -48,6 +52,7 @@ export type UserPreferencePatch = Partial<UserPreferenceDto>;
export function defaults(): UserPreferenceDto {
return {
timezone: 'UTC',
+ locale: 'en',
theme: 'system',
issueOpenMode: 'panel',
startPage: 'work-items',
@@ -74,6 +79,7 @@ export function isValidTimezone(value: string): boolean {
function toDto(row: {
timezone: string;
+ locale: string;
theme: string;
issueOpenMode: string;
startPage: string;
@@ -87,6 +93,7 @@ function toDto(row: {
}): UserPreferenceDto {
return {
timezone: row.timezone,
+ locale: row.locale as Locale,
theme: row.theme as Theme,
issueOpenMode: row.issueOpenMode as IssueOpenMode,
startPage: row.startPage as StartPage,
@@ -105,6 +112,7 @@ export async function getPreferences(userId: string): Promise<UserPreferenceDto>
const rows = await db
.select({
timezone: userPreference.timezone,
+ locale: userPreference.locale,
theme: userPreference.theme,
issueOpenMode: userPreference.issueOpenMode,
startPage: userPreference.startPage,
diff --git a/apps/web/AGENTS.md b/apps/web/AGENTS.md
index cc7aa4ea..ef1a197c 100644
--- a/apps/web/AGENTS.md
+++ b/apps/web/AGENTS.md
@@ -49,6 +49,24 @@ Next.js App Router, SSR (not SPA). Tailwind v4 + shadcn/ui. See root `AGENTS.md`
files carry a `.service.ts` suffix (`passkeys.service.ts`). Other non-component files use plain
descriptive names (the folder gives the context).
+## Translations
+
+next-intl, language from the `NEXT_LOCALE` cookie — no `[locale]` route segment.
+`messages/<locale>/<namespace>.json`, one file per namespace, namespaces are domains
+(`issue`, `settings`) not pages.
+
+- English is the source: `src/i18n/messages.ts` imports it statically, merges the chosen
+ language over it, and types every `t('…')`. A new key goes there first or typecheck fails;
+ an untranslated one renders its English text.
+- A new namespace needs its file in every language plus an entry in `defaultMessages`.
+- A new language: `messages/<code>/`, `src/i18n/locales.ts`, `src/hooks/useDateFnsLocale.ts`,
+ and `LOCALES`/`Locale` in `apps/api/src/user-preferences/`. No migration — the `locale`
+ column has no CHECK.
+- Don't subset messages per route with `pick()`: a missing namespace then fails at runtime
+ instead of at typecheck.
+
+`docs/dev/i18n.md` has the whole picture, including how a switch reaches the server render.
+
## Rules
- Prefer Server Components and server-side data fetching; reach for client components only for
diff --git a/apps/web/global.d.ts b/apps/web/global.d.ts
new file mode 100644
index 00000000..086b30e0
--- /dev/null
+++ b/apps/web/global.d.ts
@@ -0,0 +1,9 @@
+import type { Messages } from './src/i18n/messages';
+
+// Types every translation key against the English catalogue: a `t('…')` for a key
+// that does not exist there fails typecheck instead of rendering the key path.
+declare module 'next-intl' {
+ interface AppConfig {
+ Messages: Messages;
+ }
+}
diff --git a/apps/web/messages/en/account.json b/apps/web/messages/en/account.json
new file mode 100644
index 00000000..ca9aa647
--- /dev/null
+++ b/apps/web/messages/en/account.json
@@ -0,0 +1,150 @@
+{
+ "profile": {
+ "label": "Profile",
+ "title": "Profile",
+ "avatarTitle": "Avatar",
+ "avatarDescription": "Shown next to your name in comments, assignees, and members.",
+ "nameTitle": "Name",
+ "displayName": "Display name",
+ "uploading": "Uploading…",
+ "change": "Change",
+ "upload": "Upload",
+ "avatarUpdated": "Avatar updated",
+ "avatarRemoved": "Avatar removed",
+ "avatarUploadFailed": "Could not upload avatar.",
+ "avatarRemoveFailed": "Could not remove avatar.",
+ "nameUpdated": "Name updated",
+ "nameUpdateFailed": "Could not update name.",
+ "description": "Your name and avatar are shown across the app. Signed in as {email}.",
+ "avatarTooLarge": "Image exceeds the {mb} MB limit",
+ "avatarFormats": "PNG, JPEG, GIF, WebP, or AVIF.",
+ "avatarMaxSize": "Up to {mb} MB."
+ },
+ "security": {
+ "label": "Security",
+ "title": "Security",
+ "passwordTitle": "Password",
+ "passwordDescription": "Changing your password signs out your other sessions.",
+ "passkeysTitle": "Passkeys",
+ "passkeysDescription": "Sign in without a password using Touch ID, Windows Hello, or a security key.",
+ "currentPassword": "Current password",
+ "newPassword": "New password",
+ "confirmNewPassword": "Confirm new password",
+ "changePassword": "Change password",
+ "changing": "Changing…",
+ "passwordChanged": "Password changed",
+ "passwordChangeFailed": "Could not change password.",
+ "passwordsDoNotMatch": "New passwords do not match",
+ "addPasskey": "Add passkey",
+ "waitingForPasskey": "Waiting for passkey…",
+ "notSignedIn": "Not signed in",
+ "addPasskeyFailed": "Could not add passkey.",
+ "removePasskey": "Remove passkey",
+ "removePasskeyTitle": "Remove passkey?",
+ "removePasskeyFailed": "Could not remove passkey.",
+ "description": "How you sign in to {email}.",
+ "empty": "No passkeys yet. Add one to sign in without a password.",
+ "thisDevice": "This device",
+ "deleteWarning": "You will no longer be able to sign in with this passkey. This cannot be undone.",
+ "passkeyFallback": "Passkey",
+ "passkeysLoadFailed": "Could not load passkeys."
+ },
+ "accounts": {
+ "label": "Accounts",
+ "title": "Accounts",
+ "description": "Connect external accounts to sign in with them or receive notifications there.",
+ "googleDescription": "Sign in with your Google account.",
+ "connected": "Connected",
+ "setPasswordFirst": "Set a password first",
+ "googleConnectFailed": "Could not connect Google.",
+ "googleDisconnected": "Google disconnected",
+ "telegramConnected": "Telegram connected",
+ "telegramDisconnected": "Telegram disconnected",
+ "telegramWaiting": "Waiting for you to press Start in the bot chat…",
+ "telegramDescription": "Receive notifications in Telegram.",
+ "connect": "Connect",
+ "disconnect": "Disconnect",
+ "telegramConnectedLabel": "Connected",
+ "loadFailed": "Could not load connected accounts.",
+ "connectFailed": "Could not connect Google.",
+ "disconnectFailed": "Could not disconnect this account."
+ },
+ "preferences": {
+ "label": "Preferences",
+ "title": "Preferences",
+ "description": "How the app looks and behaves for you. Every change saves right away and applies wherever you sign in.",
+ "saved": "Preferences saved",
+ "sections": {
+ "appearance": "Appearance",
+ "dateAndTime": "Date and time",
+ "dateAndTimeDescription": "Timestamps are stored in UTC and shown in the zone you pick here.",
+ "navigation": "Navigation",
+ "navigationDescription": "Where the app takes you, and how issues open.",
+ "issueSettings": "Issue settings",
+ "issueSettingsDescription": "How the stats and the activity log of an issue start out. Switching them while an issue is open does not change these.",
+ "notifications": "Notifications",
+ "notificationsDescription": "Watching an issue brings you its comments and status changes.",
+ "aiChat": "AI chat",
+ "shortcuts": "Keyboard shortcuts",
+ "shortcutsDescription": "Press Change, then the keys you want. Reset takes a shortcut back to the one set for this instance."
+ },
+ "theme": "Theme",
+ "themeDescription": "Match system follows your operating system setting.",
+ "themeOptions": {
+ "system": "Match system",
+ "light": "Light",
+ "dark": "Dark"
+ },
+ "language": "Language",
+ "languageDescription": "The language of the interface, your emails, and the Telegram bot.",
+ "timezone": "Timezone",
+ "timezoneDescription": "Pick the zone you work in.",
+ "timezonePlaceholder": "Select a timezone",
+ "timezoneEmpty": "No timezones found.",
+ "timezoneGroups": {
+ "America": "Americas",
+ "Europe": "Europe",
+ "Africa": "Africa",
+ "Asia": "Asia",
+ "Australia": "Australia",
+ "Pacific": "Pacific",
+ "Atlantic": "Atlantic",
+ "Indian": "Indian Ocean",
+ "Antarctica": "Antarctica",
+ "Other": "Other"
+ },
+ "issueOpenMode": "Open issues in",
+ "issueOpenModeDescription": "What happens when you click an issue on a board, table, calendar, or timeline.",
+ "issueOpenModeOptions": {
+ "panel": "Side panel",
+ "page": "Full page"
+ },
+ "startPage": "Start page",
+ "startPageDescription": "The section that opens when you enter the app, in your last active project.",
+ "startPageOptions": {
+ "work-items": "Work items",
+ "inbox": "Inbox",
+ "dashboard": "Dashboards",
+ "initiatives": "Initiatives",
+ "ai-chat": "AI chat"
+ },
+ "showStats": "Show stats",
+ "showStatsDescription": "Whether the stats section starts expanded when you open an issue.",
+ "statsView": "Show stats as",
+ "statsViewDescription": "Compact is one bar with a share per status; Timeline gives each status its own lane on a time axis.",
+ "statsViewOptions": {
+ "compact": "Compact bar",
+ "timeline": "Timeline"
+ },
+ "activityView": "Show activity as",
+ "activityViewDescription": "Flat is every entry newest first; Grouped splits the log by the status the issue was in.",
+ "activityViewOptions": {
+ "flat": "Flat",
+ "grouped": "Grouped by status"
+ },
+ "autoWatch": "Watch issues automatically",
+ "autoWatchDescription": "The ones you create, get assigned, comment on, or are mentioned in.",
+ "showChatByDefault": "Show chat by default",
+ "showChatByDefaultDescription": "The chat button stays on screen in a project. The chat window opens only when you click it."
+ }
+}
diff --git a/apps/web/messages/en/aiChat.json b/apps/web/messages/en/aiChat.json
new file mode 100644
index 00000000..5f733585
--- /dev/null
+++ b/apps/web/messages/en/aiChat.json
@@ -0,0 +1,25 @@
+{
+ "noAccess": "You do not have access to AI agents in this project.",
+ "emptyTitle": "No agents to chat with",
+ "emptyDescription": "Only internal agents can chat here, in test mode.",
+ "createAgent": "Create an agent",
+ "agents": "Agents",
+ "agentsAvailable": "{count, plural, one {# agent} other {# agents}} available",
+ "chats": "Chats",
+ "newChat": "New chat",
+ "memoryOff": "Memory off",
+ "noAgents": "No agents",
+ "addInternalAgent": "Add an internal agent",
+ "noInternalAgents": "No internal agents to chat with yet.",
+ "history": "History",
+ "backToChat": "Back to chat",
+ "minimize": "Minimize",
+ "minimizeChat": "Minimize chat",
+ "openChat": "Open chat",
+ "hideChat": "Hide chat",
+ "untitledThread": "New conversation",
+ "deleteThread": "Delete conversation",
+ "deleteThreadConfirm": "“{title}” and its messages are deleted permanently.",
+ "noThreads": "No conversations yet. Send a message to start one.",
+ "noModel": "No model set"
+}
diff --git a/apps/web/messages/en/apiKeys.json b/apps/web/messages/en/apiKeys.json
new file mode 100644
index 00000000..c8d95fae
--- /dev/null
+++ b/apps/web/messages/en/apiKeys.json
@@ -0,0 +1,32 @@
+{
+ "label": "API keys",
+ "title": "API keys",
+ "description": "Personal API keys authenticate requests to the API as your account ({email}). A key's value is shown only once, when you create it.",
+ "sectionTitle": "Your API keys",
+ "create": "Create API key",
+ "empty": "No API keys yet. Create one to authenticate requests to the API.",
+ "fallbackName": "API key",
+ "createdAt": "Created {date}",
+ "deleteAction": "Delete API key",
+ "createDialog": {
+ "title": "Create API key",
+ "nameLabel": "Name",
+ "namePlaceholder": "e.g. CI pipeline",
+ "nameHint": "A label to recognize this key later.",
+ "submit": "Create key",
+ "submitPending": "Creating…",
+ "error": "Could not create API key."
+ },
+ "createdDialog": {
+ "title": "API key created",
+ "description": "Copy your key now. For security, it is shown only once and cannot be retrieved later.",
+ "copy": "Copy key"
+ },
+ "deleteDialog": {
+ "title": "Delete API key?",
+ "confirm": "Delete key",
+ "description": "Any request using this key will stop working immediately. This cannot be undone.",
+ "error": "Could not delete API key."
+ },
+ "loadFailed": "Could not load API keys."
+}
diff --git a/apps/web/messages/en/auth.json b/apps/web/messages/en/auth.json
new file mode 100644
index 00000000..f50e282c
--- /dev/null
+++ b/apps/web/messages/en/auth.json
@@ -0,0 +1,87 @@
+{
+ "legal": {
+ "both": "By continuing you agree to our <terms>Terms of Service</terms> and <privacy>Privacy Policy</privacy>.",
+ "termsOnly": "By continuing you agree to our <terms>Terms of Service</terms>.",
+ "privacyOnly": "By continuing you agree to our <privacy>Privacy Policy</privacy>."
+ },
+ "fields": {
+ "email": "Email",
+ "emailPlaceholder": "[email protected]",
+ "password": "Password",
+ "newPassword": "New password",
+ "confirmPassword": "Confirm password",
+ "passwordHint": "Must be at least 8 characters long."
+ },
+ "login": {
+ "title": "Welcome back",
+ "subtitleVerified": "Your email is confirmed. Sign in to continue.",
+ "subtitleReset": "Your password is changed. Sign in with it.",
+ "subtitleLink": "We will email you a link that signs you in",
+ "subtitlePassword": "Sign in with your email and password",
+ "submit": "Sign in",
+ "submitPending": "Signing in…",
+ "sendLink": "Send sign-in link",
+ "sendLinkPending": "Sending…",
+ "forgotPassword": "Forgot password?",
+ "or": "Or",
+ "noAccount": "Don't have an account?",
+ "signUp": "Sign up",
+ "linkSentTitle": "Check your email",
+ "linkSentDescription": "We sent a sign-in link to {email}. Open it to sign in.",
+ "backToSignIn": "Back to sign in",
+ "withPassword": "Sign in with a password",
+ "withLink": "Email me a sign-in link",
+ "withGoogle": "Continue with Google",
+ "withPasskey": "Sign in with passkey",
+ "unconfirmedResent": "Confirmation email sent. Check your inbox, and your spam folder.",
+ "unconfirmedPrompt": "Check your spam folder, or <resend>send a new confirmation email</resend>."
+ },
+ "register": {
+ "title": "Create your account",
+ "subtitle": "Sign up with your email and password",
+ "subtitleInviteOnly": "This instance is invite only. Use the address you were invited with.",
+ "submit": "Create account",
+ "submitPending": "Creating account…",
+ "or": "Or",
+ "withGoogle": "Continue with Google",
+ "haveAccount": "Already have an account?",
+ "signIn": "Sign in",
+ "confirmTitle": "Confirm your email",
+ "confirmDescription": "We sent a link to {email}. Open it to finish creating your account.",
+ "backToSignIn": "Back to sign in",
+ "closedTitle": "Registration is closed",
+ "closedDescription": "This instance is not accepting new accounts."
+ },
+ "forgotPassword": {
+ "title": "Reset your password",
+ "subtitle": "We will email you a link to set a new one",
+ "submit": "Send reset link",
+ "submitPending": "Sending…",
+ "sentTitle": "Check your email",
+ "sentDescription": "If an account exists for {email}, a reset link is on its way.",
+ "backToSignIn": "Back to sign in",
+ "remembered": "Remembered it?",
+ "signIn": "Sign in"
+ },
+ "resetPassword": {
+ "title": "Set a new password",
+ "subtitle": "Choose a password you have not used here before",
+ "submit": "Set new password",
+ "submitPending": "Saving…",
+ "deadLinkTitle": "This link no longer works",
+ "deadLinkDescription": "Reset links expire and can be used once. Request a new one.",
+ "sendNewLink": "Send a new link"
+ },
+ "errors": {
+ "generic": "Something went wrong. Please try again.",
+ "passkey": "Could not sign in with your passkey. Please try again.",
+ "passwordsDoNotMatch": "Passwords do not match.",
+ "google": "Could not sign in with Google. Please try again.",
+ "linkRefused": "This email already has an account. Sign in with its password and confirm the address first, then Google can be used.",
+ "signupDisabled": "This instance is not accepting new accounts.",
+ "emailNotFound": "Google did not return an email address for this account.",
+ "tokenExpired": "This confirmation link has expired. Sign in below to get a new one.",
+ "invalidToken": "This confirmation link is not valid. Sign in below to get a new one.",
+ "userNotFound": "This confirmation link belongs to an account that no longer exists."
+ }
+}
diff --git a/apps/web/messages/en/common.json b/apps/web/messages/en/common.json
new file mode 100644
index 00000000..9d96bf48
--- /dev/null
+++ b/apps/web/messages/en/common.json
@@ -0,0 +1,129 @@
+{
+ "cancel": "Cancel",
+ "done": "Done",
+ "loading": "Loading…",
+ "signOut": "Sign out",
+ "member": "Member",
+ "owner": "Owner",
+ "delete": "Delete",
+ "more": "More",
+ "back": "Back",
+ "save": "Save",
+ "saving": "Saving…",
+ "close": "Close",
+ "name": "Name",
+ "edit": "Edit",
+ "language": "Language",
+ "toggleTheme": "Toggle theme",
+ "priority": {
+ "label": "Priority",
+ "tooltip": "{priority} priority",
+ "setTo": "Set priority to…",
+ "none": "No priority",
+ "urgent": "Urgent",
+ "high": "High",
+ "medium": "Medium",
+ "low": "Low"
+ },
+ "add": "Add",
+ "showMore": "Show more",
+ "archived": "Archived",
+ "clear": "Clear",
+ "noLabels": "No labels.",
+ "enabled": "Enabled",
+ "fullscreen": "Fullscreen",
+ "exitFullscreen": "Exit fullscreen",
+ "resizeTitleColumn": "Resize the title column",
+ "openGeneralSettings": "Open General settings",
+ "noSectionAccess": "You do not have access to this section.",
+ "brandSubtitle": "Plan issues on a board. Sign in to open your projects.",
+ "hotkeys": {
+ "pressKeys": "Press keys",
+ "fixed": "Fixed",
+ "resetShortcut": "Reset this shortcut",
+ "groups": {
+ "general": "General",
+ "workItems": "Work items"
+ },
+ "commands": {
+ "palette": {
+ "toggle": "Open the command palette"
+ },
+ "project": {
+ "switch": "Switch to project 1–9",
+ "new": "New project",
+ "settings": "Open project settings"
+ },
+ "sidebar": {
+ "toggle": "Show or hide the sidebar"
+ },
+ "issue": {
+ "new": "New issue"
+ },
+ "view": {
+ "kanban": "Board layout",
+ "table": "Table layout",
+ "timeline": "Timeline layout",
+ "calendar": "Calendar layout"
+ },
+ "board": {
+ "select-all": "Select all issues on the board"
+ }
+ },
+ "conflict": "Already used by {command}"
+ },
+ "agentChat": {
+ "emptyHint": "Send a message to test how this agent replies and which tools it uses.",
+ "messagePlaceholder": "Message {agent}…",
+ "reset": "Reset conversation",
+ "send": "Send",
+ "loadingEarlier": "Loading earlier messages…",
+ "messages": "Conversation messages",
+ "usingTool": "Using {tool}…",
+ "thinking": "Thinking…",
+ "title": "Chat with {agent}",
+ "unreachable": "Could not reach the agent. Try again."
+ },
+ "share": {
+ "createFailed": "Could not create the link. Try again.",
+ "changeFailed": "Could not change what the link shows. Try again.",
+ "stopFailed": "Could not stop sharing. Try again.",
+ "copyFailed": "Could not copy the link. Select it and copy by hand.",
+ "hint": "Anyone with the link can read it. No account needed.",
+ "shareLink": "Share link",
+ "fullDetails": "Full issue details",
+ "fullDetailsHint": "Assignees, labels, custom fields and activity.",
+ "stopSharing": "Stop sharing",
+ "createLink": "Create link",
+ "copy": "Copy",
+ "copied": "Copied"
+ },
+ "actions": "Actions",
+ "clearSearch": "Clear search",
+ "hide": "Hide",
+ "show": "Show",
+ "copy": "Copy",
+ "copied": "Copied",
+ "change": "Change",
+ "featureOffHint": "An owner can turn this section back on in General settings.",
+ "description": "Description",
+ "pickColor": "Pick color",
+ "new": "New",
+ "features": {
+ "initiatives": "Initiatives",
+ "cycles": "Cycles",
+ "dashboards": "Dashboards",
+ "notes": "Notes",
+ "subtasks": "Subtasks",
+ "checklists": "Checklists",
+ "issueStats": "Issue stats"
+ },
+ "featureOffTitle": "{feature} are turned off",
+ "toggleSidebar": "Toggle sidebar",
+ "system": "System",
+ "genericError": "Something went wrong",
+ "commandPalette": "Command palette",
+ "commandPaletteHint": "Search for a command to run…",
+ "scrollToEnd": "Scroll to end",
+ "scrollToStart": "Scroll to start"
+}
diff --git a/apps/web/messages/en/cycles.json b/apps/web/messages/en/cycles.json
new file mode 100644
index 00000000..e53db30e
--- /dev/null
+++ b/apps/web/messages/en/cycles.json
@@ -0,0 +1,58 @@
+{
+ "title": "Cycles",
+ "newCycle": "New cycle",
+ "status": {
+ "upcoming": "Upcoming",
+ "active": "Active",
+ "completed": "Completed"
+ },
+ "views": {
+ "table": "Table",
+ "timeline": "Timeline"
+ },
+ "columns": {
+ "name": "Name",
+ "dates": "Dates",
+ "length": "Length",
+ "issues": "Issues",
+ "progress": "Progress"
+ },
+ "emptyTitle": "No cycles yet",
+ "emptyDescription": "A cycle is a time-boxed period the team plans its issues into.",
+ "nothingPlannedTitle": "Nothing planned",
+ "nothingPlannedDescription": "The timeline shows active and upcoming cycles. Finished ones are in the table.",
+ "options": "Cycle options",
+ "transferIssues": "Transfer unfinished issues",
+ "form": {
+ "editTitle": "Edit cycle",
+ "newTitle": "New cycle",
+ "name": "Name",
+ "goal": "Goal",
+ "goalPlaceholder": "What should this cycle deliver?",
+ "length": "Length",
+ "starts": "Starts",
+ "ends": "Ends",
+ "create": "Create cycle",
+ "saveFailed": "Could not save the cycle"
+ },
+ "weeks": "{count, plural, one {# week} other {# weeks}}",
+ "transfer": {
+ "title": "Transfer unfinished issues",
+ "description": "Issues that are not completed or canceled move to the cycle you pick. The rest stay here.",
+ "moveTo": "Move to",
+ "noCycle": "No cycle",
+ "submit": "Move issues",
+ "moving": "Moving…",
+ "moved": "{count, plural, one {# issue moved} other {# issues moved}}",
+ "failed": "Could not move the issues"
+ },
+ "details": "Cycle details",
+ "goal": "Goal",
+ "noGoal": "No goal set.",
+ "progress": "Progress",
+ "openCycle": "Open cycle",
+ "dragFailed": "Could not move the cycle",
+ "notFound": "Cycle not found.",
+ "defaultName": "Sprint {n}",
+ "issuesDone": "Issues done"
+}
diff --git a/apps/web/messages/en/dashboards.json b/apps/web/messages/en/dashboards.json
new file mode 100644
index 00000000..59a4f6be
--- /dev/null
+++ b/apps/web/messages/en/dashboards.json
@@ -0,0 +1,202 @@
+{
+ "noAccess": "You do not have access to dashboards.",
+ "defaultName": "Overview",
+ "newDashboard": "New dashboard",
+ "renameDashboard": "Rename dashboard",
+ "namePlaceholder": "Dashboard name",
+ "options": "Dashboard options",
+ "rename": "Rename",
+ "editLayout": "Edit layout",
+ "discard": "Discard",
+ "saveDashboard": "Save dashboard",
+ "saveChanges": "Save changes",
+ "noWidgets": "No widgets yet. Add one to build this dashboard.",
+ "addWidget": "Add widget",
+ "addWidgetTitle": "Add a widget",
+ "addWidgetDescription": "Pick a widget to add to this dashboard.",
+ "searchWidgets": "Search widgets",
+ "clearSearch": "Clear search",
+ "noWidgetMatches": "No widget matches “{query}”.",
+ "dragToMove": "Drag to move",
+ "widgetName": "Widget name",
+ "widgetSettings": "Widget settings",
+ "widgetOptions": "Widget options",
+ "removeWidget": "Remove widget",
+ "lastDays": "Last {days} days",
+ "showRows": "Show {count}",
+ "widgetGroups": {
+ "issues": "Issues",
+ "agents": "AI agents & webhooks"
+ },
+ "widgets": {
+ "stat": {
+ "label": "Number",
+ "description": "Count of issues matching a filter"
+ },
+ "recent_issues": {
+ "label": "Recent issues",
+ "description": "Latest issues by created or updated time"
+ },
+ "activity_feed": {
+ "label": "Activity feed",
+ "description": "Project-wide change log, filterable by actor and action"
+ },
+ "pulse": {
+ "label": "Pulse",
+ "description": "GitHub-style heatmap of daily activity"
+ },
+ "throughput": {
+ "label": "Throughput",
+ "description": "Created vs closed issues per week"
+ },
+ "breakdown": {
+ "label": "Breakdown",
+ "description": "Issue counts by status, priority, type, or assignee"
+ },
+ "agent_runs": {
+ "label": "Agent runs",
+ "description": "Recent AI agent runs with their outcome"
+ },
+ "agent_health": {
+ "label": "Agent health",
+ "description": "Agent run success rate and failures over a window"
+ },
+ "webhook_health": {
+ "label": "Webhook health",
+ "description": "Webhook delivery outcomes and disabled endpoints"
+ },
+ "agent_workload": {
+ "label": "Agent workload",
+ "description": "Delegated issues and run outcomes per agent"
+ }
+ },
+ "breakdown": {
+ "empty": "No issues yet.",
+ "by": {
+ "status": "State",
+ "priority": "Priority",
+ "type": "Type",
+ "assignee": "Assignee",
+ "delegate": "Delegate"
+ },
+ "caption": {
+ "status": "By state",
+ "priority": "By priority",
+ "type": "By type",
+ "assignee": "By assignee",
+ "delegate": "By delegate"
+ }
+ },
+ "recentIssues": {
+ "empty": "No issues match this filter.",
+ "captionCreated": "Newest first",
+ "captionUpdated": "Recently updated",
+ "filterCount": "{count, plural, one {# filter} other {# filters}}",
+ "sort": {
+ "created": "Newest",
+ "updated": "Updated"
+ }
+ },
+ "activityFeed": {
+ "empty": "No activity matches this filter.",
+ "someone": "Someone",
+ "filterCount": "{count, plural, one {# filter} other {# filters}}",
+ "actions": {
+ "all": "All activity",
+ "status": "Status changes",
+ "assignee": "Assignments",
+ "priority": "Priority",
+ "created": "Created"
+ },
+ "verbs": {
+ "comment": "commented on",
+ "created": "created",
+ "title": "renamed",
+ "description": "updated the description of",
+ "status": "changed the status of",
+ "assignee": "changed the assignee of",
+ "priority": "changed the priority of",
+ "type": "changed the type of",
+ "start_date": "changed the start date of",
+ "due_date": "changed the due date of",
+ "label_add": "added a label to",
+ "label_remove": "removed a label from",
+ "field": "updated a field on",
+ "other": "updated"
+ }
+ },
+ "pulse": {
+ "caption": {
+ "hour": "By hour",
+ "day": "By day",
+ "week": "By week"
+ },
+ "unit": {
+ "hour": "Hours",
+ "day": "Days",
+ "week": "Weeks"
+ },
+ "events": "{count, plural, one {# event} other {# events}}",
+ "eventNoun": "{count, plural, one {event} other {events}}",
+ "active": "{count} active",
+ "less": "Less",
+ "more": "More"
+ },
+ "throughput": {
+ "empty": "No activity in this period.",
+ "lastWeeks": "Last {weeks} weeks",
+ "created": "Created",
+ "closed": "Closed"
+ },
+ "agentRuns": {
+ "empty": "No agent runs yet.",
+ "filters": {
+ "all": "All runs",
+ "failed": "Failed",
+ "pending": "Queued",
+ "success": "Succeeded"
+ },
+ "status": {
+ "pending": "queued",
+ "success": "success",
+ "failed": "failed"
+ },
+ "trigger": {
+ "mention": "ran on mention in",
+ "delegation": "ran on delegation of",
+ "manual": "ran manually",
+ "schedule": "ran on schedule"
+ }
+ },
+ "agentHealth": {
+ "empty": "No agent runs.",
+ "successRate": "success rate",
+ "runs": "{count, plural, one {# run} other {# runs}}",
+ "failed": "{count} failed",
+ "queued": "{count} queued"
+ },
+ "webhookHealth": {
+ "deliveries": "deliveries",
+ "failed": "{count} failed",
+ "pending": "{count} pending",
+ "allDelivered": "all delivered",
+ "disabled": "{count, plural, one {# disabled endpoint} other {# disabled endpoints}}"
+ },
+ "agentWorkload": {
+ "empty": "No agents in this project.",
+ "agent": "Agent",
+ "delegated": "Delegated",
+ "runs": "Runs",
+ "failed": "{count} failed",
+ "kind": {
+ "external": "External",
+ "internal": "Internal"
+ }
+ },
+ "defaultWidgets": {
+ "open": "Open",
+ "inProgress": "In progress",
+ "backlog": "Backlog",
+ "unassigned": "Unassigned"
+ }
+}
diff --git a/apps/web/messages/en/display.json b/apps/web/messages/en/display.json
new file mode 100644
index 00000000..ab1bb1b8
--- /dev/null
+++ b/apps/web/messages/en/display.json
@@ -0,0 +1,92 @@
+{
+ "title": "Display",
+ "layouts": {
+ "kanban": "Kanban",
+ "table": "Table",
+ "timeline": "Timeline",
+ "calendar": "Calendar"
+ },
+ "sortFields": {
+ "manual": "Manual",
+ "title": "Title",
+ "identifier": "Issue number",
+ "status": "State",
+ "priority": "Priority",
+ "assignee": "Assignee",
+ "type": "Type",
+ "startDate": "Start date",
+ "dueDate": "Due date",
+ "created": "Created",
+ "updated": "Updated"
+ },
+ "groupFields": {
+ "none": "No grouping",
+ "status": "State",
+ "assignee": "Assignee",
+ "delegate": "Delegate",
+ "priority": "Priority",
+ "type": "Type",
+ "initiative": "Initiative",
+ "cycle": "Cycle"
+ },
+ "properties": {
+ "id": "ID",
+ "status": "State",
+ "priority": "Priority",
+ "type": "Type",
+ "assignee": "Assignee",
+ "delegate": "Delegate",
+ "initiative": "Initiative",
+ "cycle": "Cycle",
+ "labels": "Labels",
+ "startDate": "Start date",
+ "dueDate": "Due date",
+ "created": "Created",
+ "updated": "Updated",
+ "statusAge": "Time in status"
+ },
+ "stateTypes": {
+ "backlog": "Backlog",
+ "unstarted": "Unstarted",
+ "started": "Started",
+ "completed": "Completed",
+ "canceled": "Canceled"
+ },
+ "timelineScales": {
+ "week": "Week",
+ "month": "Month",
+ "quarter": "Quarter"
+ },
+ "weekStart": {
+ "0": "Sunday",
+ "1": "Monday"
+ },
+ "dateFields": {
+ "dueDate": "Due date",
+ "startDate": "Start date"
+ },
+ "rows": {
+ "columns": "Columns",
+ "grouping": "Grouping",
+ "swimlanes": "Swimlanes",
+ "subGrouping": "Sub-grouping",
+ "ordering": "Ordering",
+ "ascending": "Ascending",
+ "descending": "Descending",
+ "showEmptyColumns": "Show empty columns",
+ "showEmptyGroups": "Show empty groups",
+ "showLinks": "Show links",
+ "separateSubtaskCards": "Show subtasks as separate cards",
+ "separateSubtaskRows": "Show subtasks as separate rows",
+ "showNestedSubtasks": "Show nested subtasks",
+ "nestedSubtasks": "Nested subtasks",
+ "displayProperties": "Display properties",
+ "placeBy": "Place by",
+ "startWeekOn": "Start week on",
+ "startCollapsed": "Start with groups collapsed",
+ "scale": "Scale",
+ "addCustomField": "Add custom field",
+ "viewIcon": "View icon"
+ },
+ "layoutCommand": "{layout} layout"
+}
diff --git a/apps/web/messages/en/filters.json b/apps/web/messages/en/filters.json
new file mode 100644
index 00000000..3bc272b0
--- /dev/null
+++ b/apps/web/messages/en/filters.json
@@ -0,0 +1,39 @@
+{
+ "add": "Add filter",
+ "remove": "Remove filter",
+ "valuePlaceholder": "value",
+ "noOptions": "No options",
+ "selected": "{count} selected",
+ "operators": {
+ "is": "is",
+ "is_not": "is not",
+ "before": "before",
+ "after": "after",
+ "is_set": "is set",
+ "is_not_set": "is not set",
+ "contains": "contains",
+ "not_contains": "does not contain"
+ },
+ "boolean": {
+ "true": "True",
+ "false": "False"
+ },
+ "fields": {
+ "status": "State",
+ "statusType": "State type",
+ "assignee": "Assignee",
+ "delegate": "Delegate",
+ "priority": "Priority",
+ "type": "Type",
+ "labels": "Labels",
+ "dueDate": "Due date",
+ "startDate": "Start date",
+ "created": "Created",
+ "updated": "Updated"
+ },
+ "unset": {
+ "assignee": "No assignee",
+ "delegate": "No delegate",
+ "type": "No type"
+ }
+}
diff --git a/apps/web/messages/en/god.json b/apps/web/messages/en/god.json
new file mode 100644
index 00000000..89cee049
--- /dev/null
+++ b/apps/web/messages/en/god.json
@@ -0,0 +1,211 @@
+{
+ "pager": {
+ "perPage": "Per page",
+ "rowsPerPage": "Rows per page",
+ "range": "{first}-{last} of {total}",
+ "previous": "Previous page",
+ "next": "Next page"
+ },
+ "access": {
+ "owner": "An owner has full access: the role matrix is not consulted.",
+ "role": "Resolved from the \"{role}\" role.",
+ "default": "No role assigned: the default member permissions apply.",
+ "joined": "joined {date}"
+ },
+ "providers": {
+ "credential": "Password",
+ "google": "Google",
+ "passkey": "Passkey"
+ },
+ "users": {
+ "empty": "No accounts match these filters.",
+ "searchPlaceholder": "Search by name or email",
+ "kind": "Account kind",
+ "kinds": {
+ "human": "Humans",
+ "agent": "AI bots",
+ "all": "All accounts"
+ },
+ "columns": {
+ "account": "Account",
+ "role": "Role",
+ "signIn": "Sign-in",
+ "projects": "Projects",
+ "lastSeen": "Last seen",
+ "email": "Email"
+ },
+ "registered": "joined {date}",
+ "roleGod": "God",
+ "roleUser": "User",
+ "agent": "Agent",
+ "noProviders": "none",
+ "neverSeen": "never",
+ "verified": "Verified",
+ "notVerified": "Not verified",
+ "open": "Open account",
+ "showAccess": "Show project access"
+ },
+ "userPanel": {
+ "instanceOwner": "Instance owner",
+ "user": "User",
+ "aiAgent": "AI agent",
+ "emailVerified": "Email verified",
+ "unconfirmedTitle": "Email address not confirmed",
+ "unconfirmedHint": "Confirm it here when the link never reached them.",
+ "verify": "Mark verified",
+ "verifying": "Confirming…",
+ "verifyDone": "Email address confirmed",
+ "signInMethods": "Sign-in methods",
+ "noProviders": "None linked",
+ "projects": "Projects",
+ "noProjects": "None",
+ "registered": "Registered",
+ "lastSeen": "Last seen",
+ "neverSignedIn": "Never signed in",
+ "projectAccess": "Project access",
+ "noAccessTitle": "No project access",
+ "noAccessHint": "This account reaches nothing until someone invites it to a project.",
+ "deleteHint": "Issues and comments stay, with the author unassigned.",
+ "deleteTitle": "Delete account",
+ "deleteConfirm": "Delete account",
+ "deleteConfirmWithProjects": "{count, plural, one {Delete account and project} other {Delete account and projects}}",
+ "deleteMessage": "<strong>{name}</strong> loses access to this instance. Issues and comments they wrote stay, with the author unassigned. This cannot be undone.",
+ "soleOwnerTitle": "{count, plural, one {Only owner of a project} other {Only owner of # projects}}",
+ "soleOwnerHint": "{count, plural, one {Once the account is gone, nobody can manage it.} other {Once the account is gone, nobody can manage them.}}",
+ "deleteWithProjects": "{count, plural, one {Delete the project with the account} other {Delete the projects with the account}}",
+ "deleteWithProjectsOn": "Everything inside goes too.",
+ "deleteWithProjectsOff": "Or cancel and add a second owner first.",
+ "deleted": "Account deleted",
+ "deletedWithProjects": "Account and its projects deleted"
+ },
+ "projects": {
+ "empty": "No projects match this search.",
+ "searchPlaceholder": "Search by key or name",
+ "columns": {
+ "project": "Project",
+ "members": "Members",
+ "issues": "Issues",
+ "agents": "Agents",
+ "lastActivity": "Last activity",
+ "mcp": "MCP"
+ },
+ "created": "created {date}",
+ "archived": "{count} archived",
+ "neverActive": "never",
+ "mcpEnabled": "Enabled",
+ "mcpOff": "Off",
+ "open": "Open project",
+ "showDetails": "Show project details"
+ },
+ "projectPanel": {
+ "mcpEnabled": "MCP enabled",
+ "mcpOff": "MCP off",
+ "created": "created {date}",
+ "lastActivity": "Last activity: {value}",
+ "noActivity": "none yet",
+ "statTitle": "{label}: {value}",
+ "stats": {
+ "issues": "Issues",
+ "archivedIssues": "Archived issues",
+ "initiatives": "Initiatives",
+ "members": "Members",
+ "dashboards": "Dashboards",
+ "views": "Views",
+ "agents": "AI agents",
+ "skills": "Skills",
+ "tools": "Tools",
+ "integrations": "Integrations"
+ },
+ "members": "Members",
+ "noMembersTitle": "No members",
+ "noMembersHint": "Nobody can reach this project until someone is invited to it."
+ },
+ "authentication": {
+ "saved": "Authentication settings saved",
+ "registration": "Registration",
+ "registrationHint": "Who may create an account on this instance.",
+ "modes": {
+ "open": {
+ "label": "Open",
+ "description": "Anyone who reaches the sign-up page can create an account."
+ },
+ "invite": {
+ "label": "Invite only",
+ "description": "An account can only be created through an invite link."
+ },
+ "closed": {
+ "label": "Closed",
+ "description": "No new accounts. Existing ones keep signing in."
+ }
+ },
+ "signIn": "Sign-in options",
+ "signInHint": "Options that need outbound mail. They stay off until a provider is configured.",
+ "needsProvider": "Set up the Email provider under Integrations first.",
+ "requireVerification": "Require email confirmation",
+ "requireVerificationHint": "A new account must confirm its address before it can sign in.",
+ "magicLink": "Sign-in links",
+ "magicLinkHint": "Offer signing in with a link sent by email, alongside the password."
+ },
+ "hotkeys": {
+ "saved": "Keyboard shortcuts saved"
+ },
+ "storage": {
+ "saved": "Storage settings saved",
+ "fileSize": "File size",
+ "fileSizeHint": "The largest single file an upload may carry. A bigger file is refused before it is stored.",
+ "attachmentMb": "Attachment size (MB)",
+ "attachmentHint": "Applies to issue attachments, files pasted into a description, and attachments added by agents.",
+ "avatarMb": "Avatar size (MB)",
+ "avatarHint": "The profile picture people upload for their account.",
+ "mimeTypes": "Accepted attachment types",
+ "mimeTypesHint": "One content type per line. Leave empty to accept any file.",
+ "mimeTypesNote": "A line is a full type (application/pdf) or a wildcard (image/*). Files already stored are kept whatever the list says.",
+ "quota": "Project quota",
+ "quotaHint": "Total attachment storage one project may use. 0 means no limit.",
+ "quotaMb": "Storage per project (MB)",
+ "quotaNote": "Once a project reaches the quota, new uploads are refused until someone deletes attachments."
+ },
+ "telegram": {
+ "saved": "Telegram settings saved",
+ "bot": "Bot",
+ "botConfigured": "People connect their Telegram account by opening a chat with this bot from their profile.",
+ "botMissing": "Create a bot with @BotFather in Telegram and paste its token here.",
+ "botToken": "Bot token",
+ "botTokenHint": "The token is verified with Telegram when you save, so a wrong one is refused here rather than failing silently later.",
+ "resolvedHint": "Resolved from the token. This is the bot people will see when connecting."
+ },
+ "email": {
+ "saved": "Email provider saved",
+ "provider": "Email provider",
+ "providerHint": "Choose one provider. Credentials are stored encrypted.",
+ "from": "From address",
+ "fromHint": "Required for Resend. With SMTP it defaults to the username.",
+ "host": "Host",
+ "port": "Port",
+ "encryption": "Encryption",
+ "encryptionOptions": {
+ "none": "None",
+ "ssl": "SSL",
+ "tls": "TLS"
+ },
+ "username": "Username",
+ "password": "Password",
+ "passwordPlaceholder": "SMTP password",
+ "timeout": "Timeout (s)",
+ "optional": "Optional",
+ "apiKey": "API key",
+ "projectNotifications": "Project notifications",
+ "projectNotificationsHint": "Let projects deliver their notifications through this provider instead of configuring one of their own. Each project still chooses whether to use it."
+ },
+ "authProvider": {
+ "saved": "Auth provider saved",
+ "google": "Google",
+ "googleConfigured": "An address without an account gets one; an address that already has a confirmed account signs into it.",
+ "googleMissing": "Add the client ID and secret first.",
+ "clientId": "Client ID",
+ "clientSecret": "Client secret",
+ "redirectUri": "Redirect URI",
+ "redirectUriHint": "Register this on the OAuth client in the Google Cloud console. Google refuses the sign-in if it does not match exactly.",
+ "copyRedirectUri": "Copy redirect URI"
+ }
+}
diff --git a/apps/web/messages/en/inbox.json b/apps/web/messages/en/inbox.json
new file mode 100644
index 00000000..93db67ba
--- /dev/null
+++ b/apps/web/messages/en/inbox.json
@@ -0,0 +1,37 @@
+{
+ "title": "Inbox",
+ "empty": "No notifications",
+ "selectNotification": "Select a notification",
+ "backToList": "Inbox",
+ "filter": "Filter",
+ "display": "Display",
+ "notificationType": "Notification type",
+ "showRead": "Show read",
+ "showSnoozed": "Show snoozed",
+ "markAllRead": "Mark all as read",
+ "deleteAllRead": "Delete all read",
+ "deleteAllReadCompleted": "Delete all read for completed issues",
+ "types": {
+ "assigned": "Assigned",
+ "mentioned": "Mentioned",
+ "commented": "Commented",
+ "state_changed": "Status changed"
+ },
+ "actions": {
+ "markRead": "Mark as read",
+ "markUnread": "Mark as unread",
+ "snooze": "Snooze",
+ "unsnooze": "Unsnooze",
+ "tomorrow": "Tomorrow",
+ "inAWeek": "In a week",
+ "pickDate": "Pick a date…"
+ },
+ "event": {
+ "someone": "Someone",
+ "assigned": "{who} assigned the issue to you",
+ "mentioned": "{who} mentioned you",
+ "commented": "{who} commented",
+ "stateChanged": "{who} changed the status from {from} to {to}",
+ "stateChangedPlain": "{who} changed the status"
+ }
+}
diff --git a/apps/web/messages/en/initiatives.json b/apps/web/messages/en/initiatives.json
new file mode 100644
index 00000000..b18ef5a5
--- /dev/null
+++ b/apps/web/messages/en/initiatives.json
@@ -0,0 +1,144 @@
+{
+ "title": "Initiatives",
+ "newInitiative": "New initiative",
+ "notFound": "Initiative not found.",
+ "options": "Initiative options",
+ "showDescription": "Show description",
+ "noDescription": "No description.",
+ "noOwner": "No owner",
+ "targetDate": "Target date",
+ "progress": "Progress",
+ "activity": "Activity",
+ "noActivity": "No activity yet.",
+ "noIssuesLinked": "No issues linked yet.",
+ "inProgress": "In progress",
+ "emptyTitle": "No initiatives yet",
+ "emptyDescription": "An initiative groups related issues under one goal.",
+ "emptyTabDescription": "Initiatives move between tabs as their status changes.",
+ "emptyTab": {
+ "active": "No active initiatives",
+ "planned": "No planned initiatives",
+ "proposed": "No proposed initiatives",
+ "completed": "No completed initiatives"
+ },
+ "tabs": {
+ "active": "Active",
+ "planned": "Planned",
+ "proposed": "Proposed",
+ "completed": "Completed",
+ "all": "All initiatives"
+ },
+ "detailTabs": {
+ "overview": "Overview",
+ "issues": "Issues"
+ },
+ "columns": {
+ "name": "Name",
+ "priority": "Priority",
+ "owner": "Owner",
+ "target": "Target",
+ "progress": "Progress",
+ "health": "Health"
+ },
+ "status": {
+ "proposed": "Proposed",
+ "planned": "Planned",
+ "active": "Active",
+ "completed": "Completed",
+ "canceled": "Canceled"
+ },
+ "stateGroups": {
+ "backlog": "Backlog",
+ "unstarted": "Todo",
+ "started": "In Progress",
+ "completed": "Done",
+ "canceled": "Canceled"
+ },
+ "health": {
+ "on_track": "On track",
+ "at_risk": "At risk",
+ "off_track": "Off track",
+ "unknown": "No update"
+ },
+ "healthInfo": {
+ "trigger": "How is health calculated?",
+ "title": "Health",
+ "description": "Compares work done against time elapsed. Updates automatically.",
+ "legend": {
+ "on_track": "Work is keeping pace with the schedule.",
+ "at_risk": "Work is slipping behind the schedule.",
+ "off_track": "Work is well behind, or the target date has passed.",
+ "unknown": "Not enough data yet: no issues or no target date."
+ },
+ "howCalculated": "How it's calculated",
+ "workDone": "Work done",
+ "timeElapsed": "Time elapsed",
+ "trail": "How far work trails time",
+ "trailOnTrack": "up to 10% behind",
+ "trailAtRisk": "10-25% behind",
+ "trailOffTrack": "over 25% behind"
+ },
+ "timeline": {
+ "title": "Timeline",
+ "started": "Started",
+ "target": "Target",
+ "remaining": "Remaining",
+ "overdue": "{days}d overdue",
+ "dueToday": "Due today",
+ "left": "{days}d left",
+ "timeElapsed": "Time elapsed",
+ "workDone": "Work done",
+ "noTargetDate": "Set a target date to track pace."
+ },
+ "form": {
+ "title": "Title",
+ "titlePlaceholder": "Q3 Launch",
+ "description": "Description",
+ "descriptionPlaceholder": "What is this initiative about?",
+ "create": "Create initiative",
+ "creating": "Creating…",
+ "editTitle": "Edit initiative",
+ "save": "Save changes"
+ },
+ "pagination": {
+ "range": "{from}–{to} of {total}",
+ "previous": "Previous page",
+ "next": "Next page"
+ },
+ "select": {
+ "label": "Initiative",
+ "search": "Link to initiative…",
+ "empty": "No initiatives.",
+ "none": "No initiative"
+ },
+ "feed": {
+ "system": "System",
+ "createdInitiative": "created the initiative",
+ "createdIssue": "created the issue",
+ "renamed": "renamed to “{title}”",
+ "descriptionUpdated": "updated the description",
+ "descriptionCleared": "cleared the description",
+ "statusSet": "set status to {status}",
+ "statusMoved": "moved from {from} to {to}",
+ "prioritySet": "set priority to {priority}",
+ "priorityRemoved": "removed priority",
+ "ownerSet": "set owner to {name}",
+ "ownerRemoved": "removed owner {name}",
+ "assigneeSet": "assigned to {name}",
+ "assigneeRemoved": "removed assignee {name}",
+ "delegateSet": "delegated to {name}",
+ "delegateRemoved": "removed delegate {name}",
+ "targetDateSet": "set target date to {date}",
+ "targetDateRemoved": "removed target date",
+ "startDateSet": "set start date to {date}",
+ "startDateRemoved": "removed start date",
+ "dueDateSet": "set due date to {date}",
+ "dueDateRemoved": "removed due date",
+ "labelAdded": "added label {label}",
+ "labelRemoved": "removed label {label}",
+ "typeSet": "set type to {type}",
+ "typeRemoved": "removed type",
+ "linked": "linked to {name}",
+ "unlinked": "unlinked from the initiative"
+ }
+}
diff --git a/apps/web/messages/en/invite.json b/apps/web/messages/en/invite.json
new file mode 100644
index 00000000..09e6f1d1
--- /dev/null
+++ b/apps/web/messages/en/invite.json
@@ -0,0 +1,40 @@
+{
+ "title": "Join the project",
+ "subtitle": "Accept your invitation to start collaborating",
+ "notFoundTitle": "Invite not found",
+ "notFoundSubtitle": "This link is invalid or no longer active",
+ "notFoundMessage": "This invite link is invalid or has been revoked.",
+ "goToSignIn": "Go to sign in",
+ "closedTitle": "Invitation closed",
+ "closedSubtitle": "This invite was already {status, select, accepted {accepted} rejected {declined} other {closed}}",
+ "brandSubtitle": "You have been invited to collaborate on a project.",
+ "invitedTo": "You have been invited to join",
+ "invitationFor": "Invitation for <strong>{email}</strong>",
+ "alreadyHandled": "This invite has already been {status, select, accepted {accepted} rejected {declined} other {closed}}.",
+ "goToApp": "Go to the app",
+ "wrongAccount": "This invite was sent to <invited>{email}</invited>, but you are signed in as <current>{sessionEmail}</current>. Sign out to accept it with the invited email.",
+ "accept": "Accept invitation",
+ "accepting": "Joining…",
+ "decline": "Decline",
+ "declining": "Declining…",
+ "acceptError": "Could not accept the invite.",
+ "declineError": "Could not decline the invite.",
+ "emailLabel": "Email",
+ "emailHint": "The invite is tied to this email.",
+ "passwordLabel": "Password",
+ "passwordHint": "Must be at least 8 characters long.",
+ "confirmPasswordLabel": "Confirm password",
+ "register": "Create account & join",
+ "registering": "Creating account…",
+ "signIn": "Sign in",
+ "signingIn": "Signing in…",
+ "haveAccount": "Already have an account?",
+ "needAccount": "Need a new account?",
+ "switchToSignIn": "Sign in",
+ "switchToRegister": "Create one",
+ "existingAccountNotice": "This email already has an account. Sign in with your password.",
+ "passwordsDoNotMatch": "Passwords do not match.",
+ "genericError": "Something went wrong. Please try again.",
+ "registerFailed": "Could not create your account.",
+ "signInFailed": "Could not sign you in."
+}
diff --git a/apps/web/messages/en/issue.json b/apps/web/messages/en/issue.json
new file mode 100644
index 00000000..261710c1
--- /dev/null
+++ b/apps/web/messages/en/issue.json
@@ -0,0 +1,311 @@
+{
+ "system": "System",
+ "viewValue": "view",
+ "notFound": "Issue not found.",
+ "openAsPage": "Open as page",
+ "titlePlaceholder": "Issue title",
+ "noActivity": "No activity yet.",
+ "fields": {
+ "state": "State",
+ "priority": "Priority",
+ "assignee": "Assignee",
+ "delegate": "Delegate",
+ "watching": "Watching",
+ "type": "Type",
+ "labels": "Labels",
+ "initiative": "Initiative",
+ "cycle": "Cycle",
+ "startDate": "Start date",
+ "dueDate": "Due date",
+ "properties": "Properties",
+ "empty": "Empty",
+ "openInNewTab": "Open in new tab"
+ },
+ "menu": {
+ "preview": "Preview",
+ "goToIssue": "Go to issue",
+ "status": "Status",
+ "priority": "Priority",
+ "assignee": "Assignee",
+ "delegate": "Delegate",
+ "initiative": "Initiative",
+ "cycle": "Cycle",
+ "dueDate": "Due date",
+ "clearDueDate": "Clear due date",
+ "labels": "Labels",
+ "copyPrompt": "Copy Prompt",
+ "restore": "Restore",
+ "archive": "Archive",
+ "noAssignee": "No assignee",
+ "noDelegate": "No delegate",
+ "noInitiative": "No initiative",
+ "noCycle": "No cycle",
+ "promptCopied": "Prompt copied to clipboard"
+ },
+ "commands": {
+ "preview": "Preview issue",
+ "goToIssue": "Go to issue",
+ "status": "Change status",
+ "statusPlaceholder": "Set status to…",
+ "priority": "Set priority",
+ "assignee": "Assign to",
+ "assigneePlaceholder": "Assign to…",
+ "noAssignee": "No assignee",
+ "delegate": "Delegate to agent",
+ "delegatePlaceholder": "Delegate to…",
+ "noDelegate": "No delegate",
+ "dueDate": "Set due date",
+ "dueDatePlaceholder": "Set due date to…",
+ "clearDueDate": "Clear due date",
+ "labels": "Toggle labels",
+ "labelsPlaceholder": "Toggle a label…",
+ "copyShortLink": "Copy short link",
+ "copyPrompt": "Copy prompt",
+ "restore": "Restore issue",
+ "archive": "Archive issue",
+ "delete": "Delete issue",
+ "promptCopied": "Prompt copied to clipboard",
+ "shortLinkCopied": "Short link copied"
+ },
+ "dueDatePresets": {
+ "tomorrow": "Tomorrow",
+ "endOfWeek": "End of this week",
+ "inOneWeek": "In one week"
+ },
+ "actionsBar": {
+ "shortLinkCopied": "Short link copied",
+ "copyShortLink": "Copy short link",
+ "copied": "Copied!",
+ "copyPrompt": "Copy Prompt",
+ "sharedPublicly": "Shared publicly",
+ "sharePublicly": "Share publicly",
+ "restore": "Restore issue",
+ "archive": "Archive issue",
+ "delete": "Delete issue",
+ "shareIssue": "Share issue"
+ },
+ "actions": {
+ "deleteTitle": "Delete issue",
+ "archiveTitle": "Archive issue",
+ "apply": "Apply",
+ "cannotBeUndone": "This cannot be undone.",
+ "deleteDescription": "Delete {issue}? This removes the issue, its comments, activity and attachments.",
+ "archiveDescription": "Archive {issue}? It leaves the board and can be restored later.",
+ "applyDescription": "Apply <v>{action}</v> to this issue?"
+ },
+ "create": {
+ "title": "New issue",
+ "titlePlaceholder": "Issue title",
+ "addFieldPlaceholder": "Add field…",
+ "noFields": "No fields.",
+ "description": "Description",
+ "other": "Other",
+ "submit": "Create issue"
+ },
+ "attachments": {
+ "title": "Attachments",
+ "add": "Add",
+ "uploading": "Uploading…",
+ "empty": "No attachments yet.",
+ "emptyHint": "Drop files here, or use Add to upload.",
+ "dropToUpload": "Drop files to upload",
+ "uploadFailed": "Upload failed",
+ "uploadFailedCount": "{count, plural, one {Could not upload the file} other {Could not upload # files}}",
+ "dragIntoDescription": "Drag into the description",
+ "openPreview": "Open preview",
+ "open": "Open {name}",
+ "insertIntoDescription": "Insert into the description",
+ "insert": "Insert {name} into the description",
+ "annotate": "Annotate",
+ "annotateFile": "Annotate {name}",
+ "download": "Download",
+ "downloadFile": "Download {name}",
+ "deleteFile": "Delete {name}",
+ "preview": "Preview {name}",
+ "remove": "Remove {name}",
+ "removeShort": "Remove",
+ "attachFiles": "Attach files",
+ "drop": "Drop files",
+ "dropCount": "{count, plural, one {Drop the file} other {Drop # files}}",
+ "dropHint": "Added to the description and attached to the issue",
+ "insertShort": "Insert",
+ "attachedCount": "{count, plural, one {# file attached} other {# files attached}}"
+ },
+ "checklists": {
+ "title": "Checklists",
+ "empty": "No checklists yet.",
+ "emptyHint": "Use Add to track small steps without creating subtasks.",
+ "titlePlaceholder": "Checklist title…",
+ "addItem": "Add an item…",
+ "dragToReorder": "Drag to reorder",
+ "removeItem": "Remove {item}",
+ "deleteChecklist": "Delete checklist {title}",
+ "addItemButton": "Add an item"
+ },
+ "links": {
+ "title": "Links",
+ "remove": "Remove the link to {issue}",
+ "emptyHint": "Use Add to link an issue that blocks, duplicates or relates to this one.",
+ "newIssue": "New issue"
+ },
+ "linkDialog": {
+ "title": "Link an issue: {relation}",
+ "searchPrompt": "Search issues this one is {relation}…",
+ "failed": "Could not link the issues",
+ "noMatches": "No issues match.",
+ "typeToSearch": "Type to search this project’s issues."
+ },
+ "subtasks": {
+ "title": "Subtasks",
+ "parent": "Parent",
+ "newSubtask": "New subtask",
+ "addExisting": "Add an existing issue as a subtask",
+ "empty": "No subtasks yet.",
+ "emptyHint": "Use Add to break this issue down into subtasks.",
+ "detach": "Detach {subtask}",
+ "detachFromParent": "Detach from {parent}",
+ "subtaskOf": "Subtask of {issue}",
+ "existingIssue": "Existing issue",
+ "searchPrompt": "Search issues to add as a subtask…"
+ },
+ "subtaskDisposal": {
+ "intro": "{issues, plural, one {This issue has} other {These issues have}} {count, plural, one {# subtask} other {# subtasks}}.",
+ "deleteToo": "{count, plural, one {Delete it too} other {Delete them too}}",
+ "archiveToo": "{count, plural, one {Archive it too} other {Archive them too}}",
+ "detach": "{count, plural, one {Keep it without a parent} other {Keep them without a parent}}",
+ "reassign": "{count, plural, one {Move it to another issue} other {Move them to another issue}}",
+ "reassignTitle": "Move the subtasks to another issue",
+ "change": "Change",
+ "searchParent": "Search the new parent issue…"
+ },
+ "comments": {
+ "you": "You",
+ "commentAs": "Comment as {name}",
+ "placeholder": "Write a comment… use @ to mention",
+ "posting": "Posting…",
+ "comment": "Comment",
+ "toSend": "to send",
+ "unknownAuthor": "Unknown"
+ },
+ "stats": {
+ "title": "Stats",
+ "compact": "Compact",
+ "timeline": "Timeline",
+ "leadTime": "Lead time",
+ "cycleTime": "Cycle time",
+ "unknownStatus": "Unknown status"
+ },
+ "customFields": {
+ "noOptions": "No options.",
+ "yes": "Yes",
+ "no": "No"
+ },
+ "editor": {
+ "linkUrl": "Link URL",
+ "insertImage": "Insert image",
+ "insertNamed": "Insert {name}",
+ "descriptionPlaceholder": "Add description…",
+ "noImages": "No images attached yet. Upload one from the Attachments panel, or drop it straight onto the editor.",
+ "codeBlock": "Code block",
+ "image": "Image"
+ },
+ "cycleSelect": {
+ "label": "Cycle",
+ "search": "Plan into cycle…",
+ "empty": "No cycles.",
+ "none": "No cycle"
+ },
+ "annotator": {
+ "title": "Annotate image",
+ "loading": "Loading the image…",
+ "loadFailed": "Could not load the image",
+ "undo": "Undo",
+ "color": "Color {color}",
+ "tools": {
+ "marker": "Marker",
+ "rect": "Rectangle",
+ "ellipse": "Ellipse"
+ }
+ },
+ "activity": {
+ "linkedTo": "linked to",
+ "created": "created the issue",
+ "titleChanged": "changed the title",
+ "renamed": "renamed to <v>“{title}”</v>",
+ "descriptionUpdated": "updated the description",
+ "descriptionCleared": "cleared the description",
+ "statusMoved": "moved from <v>{from}</v> to <v>{to}</v>",
+ "statusSet": "set status to <v>{status}</v>",
+ "assigneeRemoved": "removed assignee <v>{name}</v>",
+ "assigneeChanged": "re-assigned to <v>{name}</v>",
+ "assigneeSet": "assigned to <v>{name}</v>",
+ "delegateRemoved": "removed delegate <v>{name}</v>",
+ "delegateChanged": "re-delegated to <v>{name}</v>",
+ "delegateSet": "delegated to <v>{name}</v>",
+ "prioritySet": "set priority to <v>{priority}</v>",
+ "priorityRemoved": "removed priority",
+ "typeSet": "set type to <v>{type}</v>",
+ "typeRemoved": "removed type",
+ "cycleRemoved": "removed from cycle <v>{cycle}</v>",
+ "cycleMoved": "moved from cycle <v>{from}</v> to <v>{to}</v>",
+ "cycleSet": "planned into cycle <v>{cycle}</v>",
+ "startDateSet": "set start date to <v>{date}</v>",
+ "startDateRemoved": "removed start date",
+ "dueDateSet": "set due date to <v>{date}</v>",
+ "dueDateRemoved": "removed due date",
+ "labelAdded": "added label <v>{label}</v>",
+ "labelRemoved": "removed label <v>{label}</v>",
+ "linkAdded": "marked this issue as {relation} <v>{issue}</v>",
+ "linkRemoved": "no longer {relation} <v>{issue}</v>",
+ "parentDetached": "detached from <v>{parent}</v>",
+ "parentMoved": "moved from <v>{from}</v> to <v>{to}</v>",
+ "parentSet": "made this a subtask of <v>{parent}</v>",
+ "subtaskAdded": "added subtask <v>{subtask}</v>",
+ "subtaskRemoved": "removed subtask <v>{subtask}</v>",
+ "checklistAdded": "added checklist <v>“{checklist}”</v>",
+ "checklistRenamed": "renamed checklist <v>“{from}”</v> to <v>“{to}”</v>",
+ "checklistRemoved": "removed checklist <v>“{checklist}”</v>",
+ "checklistItemAdded": "added <v>“{item}”</v> to <v>{checklist}</v>",
+ "checklistItemRemoved": "removed <v>“{item}”</v> from <v>{checklist}</v>",
+ "fieldUpdated": "updated <v>{field}</v>",
+ "fieldSet": "set <v>{field}</v> to <v>{value}</v>",
+ "fieldCleared": "cleared <v>{field}</v>",
+ "archived": "archived the issue",
+ "restored": "restored the issue",
+ "pullRequestMerged": "merged pull request <v>{pr}</v>",
+ "pullRequestOpened": "opened pull request <v>{pr}</v>"
+ },
+ "archived": "Archived",
+ "activityHeading": "Activity",
+ "feedFlat": "Flat",
+ "feedGrouped": "Grouped",
+ "shareUnavailable": "This shared issue is not available. The link may have been revoked.",
+ "fieldSelects": {
+ "changeState": "Change state…",
+ "changeType": "Change type…",
+ "noType": "No type",
+ "noAssignee": "No assignee",
+ "assignTo": "Assign to…",
+ "you": "You",
+ "members": "Members",
+ "delegateTo": "Delegate to…",
+ "noDelegate": "No delegate",
+ "noAgents": "No agents.",
+ "noState": "No state.",
+ "noMembers": "No members.",
+ "state": "State",
+ "type": "Type",
+ "labels": "Labels",
+ "labelCount": "{count, plural, one {# label} other {# labels}}"
+ },
+ "watchers": {
+ "watch": "Watch",
+ "unwatch": "Unwatch"
+ },
+ "effects": {
+ "cleared": "Cleared",
+ "noAssignee": "No assignee",
+ "noType": "No type",
+ "noLabels": "None"
+ }
+}
diff --git a/apps/web/messages/en/issueLinks.json b/apps/web/messages/en/issueLinks.json
new file mode 100644
index 00000000..b73a63a9
--- /dev/null
+++ b/apps/web/messages/en/issueLinks.json
@@ -0,0 +1,16 @@
+{
+ "relations": {
+ "blocked_by": "Blocked by",
+ "blocks": "Blocks",
+ "duplicates": "Duplicates",
+ "duplicated_by": "Duplicated by",
+ "relates": "Related"
+ },
+ "phrases": {
+ "blocked_by": "blocked by",
+ "blocks": "blocking",
+ "duplicates": "a duplicate of",
+ "duplicated_by": "duplicated by",
+ "relates": "related to"
+ }
+}
diff --git a/apps/web/messages/en/mcp.json b/apps/web/messages/en/mcp.json
new file mode 100644
index 00000000..312fd55d
--- /dev/null
+++ b/apps/web/messages/en/mcp.json
@@ -0,0 +1,29 @@
+{
+ "title": "MCP Server",
+ "description": "Connect AI agents to this project over the Model Context Protocol. An agent gets the access of the API key it uses.",
+ "access": "MCP access",
+ "enabled": "Enabled",
+ "disabled": "Disabled",
+ "ownerOnly": "Only a project owner can turn MCP access on or off.",
+ "toggleAria": "Toggle MCP access",
+ "connectClient": "Connect a client",
+ "keyHint": "Create a personal key on the <link>API keys</link> page, then replace <code>{apiKey}</code> in the snippet.",
+ "endpoint": "Endpoint",
+ "clientTabsAria": "Client",
+ "addToFile": "Add to <code>{file}</code>",
+ "copyAria": "Copy",
+ "copied": "Copied to clipboard",
+ "notes": {
+ "claudeCode": "Run this in your terminal.",
+ "vscode": "Needs GitHub Copilot.",
+ "claudeDesktop": "Claude Desktop reaches remote servers through the mcp-remote bridge. Needs Node.js.",
+ "other": "Any client that supports MCP over Streamable HTTP works. Point it at the endpoint and send an Authorization: Bearer {apiKey} header."
+ },
+ "clients": {
+ "other": "Other"
+ },
+ "toast": {
+ "enabled": "MCP access enabled",
+ "disabled": "MCP access disabled"
+ }
+}
diff --git a/apps/web/messages/en/members.json b/apps/web/messages/en/members.json
new file mode 100644
index 00000000..5d82fd83
--- /dev/null
+++ b/apps/web/messages/en/members.json
@@ -0,0 +1,103 @@
+{
+ "title": "Members",
+ "description": "People with access to this project. Invite people by email; owners can revoke access.",
+ "columns": {
+ "member": "Member",
+ "role": "Role",
+ "actions": "Actions"
+ },
+ "you": "(you)",
+ "aiAgent": "AI Agent",
+ "joined": "· joined {date}",
+ "leaveProject": "Leave project",
+ "revokeAccess": "Revoke access",
+ "lastOwner": "A project must keep at least one owner",
+ "leaveTitle": "Leave this project",
+ "leaveDescription": "You will lose access to this project and its issues. An owner can invite you back later.",
+ "revokeTitle": "Revoke access for {name}",
+ "revokeDescription": "{name} will lose access to this project. They can be invited back later.",
+ "selectRole": "Select role",
+ "editDescription": "Edit description",
+ "descriptionQuestionSelf": "What do you do in this project?",
+ "descriptionQuestionOther": "What does this person do in this project?",
+ "descriptionPlaceholder": "e.g. Backend engineer, owns the API and integrations",
+ "invites": {
+ "emailPlaceholder": "[email protected]",
+ "rolePlaceholder": "Role",
+ "invite": "Invite",
+ "inviting": "Inviting…",
+ "pendingCount": "{count, plural, one {# pending invite} other {# pending invites}}",
+ "copyLink": "Copy link",
+ "copied": "Copied",
+ "revokeAction": "Revoke invite",
+ "removeAction": "Remove invite",
+ "invitedBy": "Invited by {name} · ",
+ "createdAt": "created {date}",
+ "respondedAt": "{status, select, accepted {accepted} rejected {rejected} other {updated}} {date}",
+ "status": {
+ "pending": "Pending",
+ "accepted": "Accepted",
+ "rejected": "Rejected"
+ },
+ "revokeTitle": "Revoke invite for {email}",
+ "revokeConfirm": "Revoke invite",
+ "revokeDescription": "The invite link will stop working. You can invite this email again later."
+ },
+ "roles": {
+ "title": "Roles",
+ "description": "Custom roles and the permissions each grants. Assign a role to a member from the Members list.",
+ "ownerOnly": "Only project owners can manage roles.",
+ "empty": "No roles yet. Create one to grant scoped access.",
+ "columns": {
+ "role": "Role",
+ "permissions": "Permissions",
+ "actions": "Actions"
+ },
+ "default": "Default",
+ "editAction": "Edit role",
+ "deleteAction": "Delete role",
+ "defaultUndeletable": "The default role cannot be deleted",
+ "deleteTitle": "Delete role \"{name}\"",
+ "deleteDescription": "Members with this role will be moved to the default role. This cannot be undone.",
+ "newRole": "New role",
+ "editorTitleEdit": "Edit role",
+ "editorTitleNew": "New role",
+ "editorSubtitle": "role permissions",
+ "namePlaceholder": "e.g. Contributor",
+ "resourceColumn": "Resource",
+ "toggleActionAll": "Toggle {action} for all resources",
+ "toggleGroupAll": "Toggle all {group} permissions",
+ "toggleActionGroup": "Toggle {action} for {group}",
+ "cellAria": "{resource}: {action}",
+ "saveRole": "Save role",
+ "createRole": "Create role",
+ "importExport": "Role import and export",
+ "copyRoles": "Copy roles",
+ "pasteRoles": "Paste roles",
+ "nothingToCopy": "No custom roles to copy.",
+ "copiedRoles": "Copied {count, plural, one {# role} other {# roles}}.",
+ "copyFailed": "Could not copy to the clipboard.",
+ "readFailed": "Could not read the clipboard.",
+ "parseFailed": "Could not read roles from the clipboard.",
+ "import": {
+ "title": "Apply roles from clipboard",
+ "summary": "{count, plural, one {# role} other {# roles}} will be applied. Overwriting a role replaces its permission matrix; members keep the role.",
+ "preview": "Preview permissions",
+ "apply": "Apply {count, plural, =0 {roles} one {# role} other {# roles}}",
+ "applied": "Applied roles: {created} created, {updated} updated{skipped, plural, =0 {} other {, # skipped}}.",
+ "actions": {
+ "create": "New",
+ "update": "Overwrite",
+ "skip": "Skip (default)"
+ }
+ },
+ "transferErrors": {
+ "invalidJson": "Clipboard does not contain valid JSON.",
+ "notAnExport": "Clipboard does not contain a roles export.",
+ "empty": "The roles export is empty."
+ }
+ },
+ "promoted": "Member promoted to owner",
+ "roleUpdated": "Member role updated",
+ "descriptionUpdated": "Member description updated"
+}
diff --git a/apps/web/messages/en/meta.json b/apps/web/messages/en/meta.json
new file mode 100644
index 00000000..07a2c4aa
--- /dev/null
+++ b/apps/web/messages/en/meta.json
@@ -0,0 +1,4 @@
+{
+ "title": "It's a Plan: issue tracking for people and agents",
+ "description": "A self-hosted, open-source issue tracker with AI agents built in. Assign work to people or agents, and drive it through the API, webhooks and MCP."
+}
diff --git a/apps/web/messages/en/nav.json b/apps/web/messages/en/nav.json
new file mode 100644
index 00000000..f7538d4b
--- /dev/null
+++ b/apps/web/messages/en/nav.json
@@ -0,0 +1,46 @@
+{
+ "inbox": "Inbox",
+ "dashboards": "Dashboards",
+ "workItems": "Work items",
+ "initiatives": "Initiatives",
+ "cycles": "Cycles",
+ "notes": "Notes",
+ "aiTeam": "AI Team",
+ "chat": "Chat",
+ "chatWithAiTeam": "Chat with AI Team",
+ "configure": "Configure",
+ "aiAgents": "AI agents",
+ "configuration": "Configuration",
+ "members": "Members",
+ "notifications": "Notifications",
+ "notificationPreferences": "Notification preferences",
+ "projectSettings": "Project settings",
+ "backToProject": "Back to project",
+ "roles": "Roles",
+ "apiDocs": "API docs",
+ "api": "API",
+ "mcpServer": "MCP Server",
+ "godMode": "God mode",
+ "godModeSection": "God mode: {section}",
+ "instanceSettings": "Instance settings",
+ "backToApp": "Back to app",
+ "integrations": "Integrations",
+ "projects": "Projects",
+ "noProjects": "No projects yet",
+ "newProject": "New project",
+ "manageProjects": "Manage projects",
+ "role": "Role: {role}",
+ "search": "Search or run a command…",
+ "searchHint": "Search or run a command ({key})",
+ "newIssueHint": "New issue ({key})",
+ "aiChat": "AI chat",
+ "sections": "Sections",
+ "doubleClickToRename": "Double-click to rename",
+ "groups": {
+ "project": "Project",
+ "workflow": "Workflow",
+ "automation": "Automation"
+ },
+ "godModeOwnerOnly": "God mode is open to the instance owner only.",
+ "project": "Project"
+}
diff --git a/apps/web/messages/en/newProject.json b/apps/web/messages/en/newProject.json
new file mode 100644
index 00000000..480bb76e
--- /dev/null
+++ b/apps/web/messages/en/newProject.json
@@ -0,0 +1,54 @@
+{
+ "name": "Name",
+ "key": "Key (short, e.g. MKT)",
+ "copyKey": "Key",
+ "description": "Description",
+ "issueTypes": "Issue types",
+ "typesCreated": "{count, plural, one {# issue type} other {# issue types}} will be created",
+ "defaultType": "New issues get {type} by default. Types are editable in settings.",
+ "presets": {
+ "general": "General",
+ "software": "Software",
+ "product": "Product",
+ "content": "Content",
+ "marketing": "Marketing",
+ "design": "Design",
+ "sales": "Sales",
+ "operations": "Operations",
+ "support": "Support",
+ "recruiting": "Recruiting"
+ },
+ "copyConfiguration": "Copy configuration",
+ "selectAll": "Select all",
+ "clearAll": "Clear all",
+ "copyGroups": {
+ "workflow": "Workflow",
+ "automation": "Automation",
+ "project": "Project",
+ "views": "Views",
+ "aiTeam": "AI Team"
+ },
+ "copyItems": {
+ "states": "States",
+ "issueTypes": "Issue types",
+ "labels": "Labels",
+ "customFields": "Custom fields",
+ "views": "Views",
+ "dashboards": "Dashboards",
+ "actions": "Actions",
+ "configuration": "Configuration",
+ "roles": "Roles",
+ "notificationProviders": "Notification providers",
+ "webhooks": "Webhooks",
+ "integrations": "Integrations",
+ "tools": "Tools",
+ "skills": "Skills",
+ "agents": "Agents",
+ "schedules": "Schedules"
+ },
+ "title": "New project",
+ "copyTitle": "Copy project \"{name}\"",
+ "create": "Create project",
+ "copyAction": "Copy project",
+ "copyName": "{name} copy"
+}
diff --git a/apps/web/messages/en/notes.json b/apps/web/messages/en/notes.json
new file mode 100644
index 00000000..3191f840
--- /dev/null
+++ b/apps/web/messages/en/notes.json
@@ -0,0 +1,57 @@
+{
+ "noAccess": "You do not have access to notes.",
+ "allBoards": "All boards",
+ "searchBoards": "Search boards…",
+ "noBoardsFound": "No boards found.",
+ "boardAccess": "Board access",
+ "boardAccessPlaceholder": "Board access…",
+ "nothingFound": "Nothing found.",
+ "noAccessShort": "No access",
+ "agent": "Agent",
+ "members": "Members",
+ "agents": "Agents",
+ "newBoard": "New board",
+ "boardOptions": "Board options",
+ "renameBoard": "Rename board",
+ "newBoardDescription": "A freeform canvas for sticky notes.",
+ "boardName": "Name",
+ "boardNamePlaceholder": "Board name",
+ "makePublic": "Make public",
+ "makePrivate": "Make private",
+ "privateHint": "Only you can see this board. You can share it with picked members later.",
+ "publicHint": "Everyone in the project can see this board.",
+ "createBoard": "Create board",
+ "emptyTitle": "No boards yet",
+ "emptyDescription": "A board is a freeform canvas for sticky notes.",
+ "backgroundColor": "Background color",
+ "fullscreen": "Fullscreen",
+ "exitFullscreen": "Exit fullscreen",
+ "notePlaceholder": "Write a note…",
+ "noteTitlePlaceholder": "Title",
+ "dragNote": "Drag note",
+ "bold": "Bold",
+ "italic": "Italic",
+ "checklist": "Checklist",
+ "convertToIssue": "Convert to issue",
+ "deleteNote": "Delete note",
+ "save": {
+ "unsaved": "Unsaved changes",
+ "saving": "Saving…",
+ "saved": "Saved",
+ "error": "Save failed"
+ },
+ "visibility": {
+ "public": "Public",
+ "private": "Private",
+ "restricted": "Restricted"
+ },
+ "visibilityHint": {
+ "public": "Every project member can see this board",
+ "private": "Only its creator can see this board",
+ "restricted": "Only its creator and the chosen members can see this board"
+ },
+ "addNote": "Add note",
+ "accessHint": "Only these people can open it",
+ "createdBy": "Created by {name}",
+ "backgroundColors": "Background colors"
+}
diff --git a/apps/web/messages/en/palette.json b/apps/web/messages/en/palette.json
new file mode 100644
index 00000000..23c8c263
--- /dev/null
+++ b/apps/web/messages/en/palette.json
@@ -0,0 +1,12 @@
+{
+ "placeholder": "Type a command or search…",
+ "noResults": "No results found.",
+ "issues": "Issues",
+ "searching": "Searching…",
+ "selectAllIssues": "Select all issues",
+ "newIssue": "New issue",
+ "newProject": "New project",
+ "board": "Board",
+ "commands": "Commands",
+ "switchProject": "Switch project"
+}
diff --git a/apps/web/messages/en/permissions.json b/apps/web/messages/en/permissions.json
new file mode 100644
index 00000000..0d190307
--- /dev/null
+++ b/apps/web/messages/en/permissions.json
@@ -0,0 +1,46 @@
+{
+ "viewPermissions": "View permissions",
+ "none": "No permissions granted",
+ "grantedCount": "{count, plural, one {# permission} other {# permissions}} granted",
+ "resources": {
+ "work_items": "Work items",
+ "initiatives": "Initiatives",
+ "cycles": "Cycles",
+ "dashboards": "Dashboards",
+ "views": "Work item views",
+ "members_invite": "Invites",
+ "members_manage": "Members",
+ "states": "States",
+ "issue_types": "Issue types",
+ "labels": "Labels",
+ "ai_agents": "AI agents",
+ "integrations": "Integrations",
+ "agent_skills": "Agent skills",
+ "agent_tools": "Agent tools",
+ "custom_fields": "Custom fields",
+ "workflow_config": "Workflow configuration",
+ "actions": "Actions",
+ "webhooks": "Webhooks",
+ "note_boards": "Note boards",
+ "danger_zone": "Danger zone"
+ },
+ "actions": {
+ "create": "Create",
+ "edit": "Edit",
+ "read": "Read",
+ "delete": "Delete"
+ },
+ "groups": {
+ "workItems": "Work items",
+ "dashboards": "Dashboards",
+ "notes": "Notes",
+ "ai": "AI",
+ "configuration": "Configuration",
+ "members": "Members",
+ "project": "Project",
+ "other": "Other"
+ },
+ "resourceColumn": "Resource",
+ "allowed": "allowed",
+ "notAllowed": "not allowed"
+}
diff --git a/apps/web/messages/en/projects.json b/apps/web/messages/en/projects.json
new file mode 100644
index 00000000..d3c7e055
--- /dev/null
+++ b/apps/web/messages/en/projects.json
@@ -0,0 +1,31 @@
+{
+ "label": "Manage projects",
+ "title": "Manage projects",
+ "description": "Every project you belong to, with your permissions in each. Copy one to start a new project from its setup. Owners can delete a project; members can leave one. Deleting permanently removes the project and everything in it.",
+ "empty": "You are not a member of any project yet.",
+ "columns": {
+ "project": "Project",
+ "role": "Role",
+ "permissions": "Permissions",
+ "actions": "Actions"
+ },
+ "yourPermissions": "Your permissions",
+ "copyAction": "Copy project",
+ "deleteAction": "Delete project",
+ "leaveAction": "Leave project",
+ "roles": {
+ "owner": "Owner",
+ "member": "Member"
+ },
+ "deleteDialog": {
+ "title": "Delete {name}?",
+ "confirm": "Delete permanently",
+ "description": "This permanently deletes <strong>{name}</strong> and everything in it: issues, comments, attachments, and settings. This cannot be undone.",
+ "typeToConfirm": "Type <code>{key}</code> to confirm."
+ },
+ "leaveDialog": {
+ "title": "Leave {name}?",
+ "confirm": "Leave project",
+ "description": "You will lose access to <strong>{name}</strong> and its work items. To join again you need a new invite from an owner."
+ }
+}
diff --git a/apps/web/messages/en/sections.json b/apps/web/messages/en/sections.json
new file mode 100644
index 00000000..55f0dcf2
--- /dev/null
+++ b/apps/web/messages/en/sections.json
@@ -0,0 +1,109 @@
+{
+ "account": {
+ "profile": "Profile",
+ "preferences": "Preferences",
+ "accounts": "Accounts",
+ "security": "Security",
+ "api-keys": "API keys"
+ },
+ "godGroups": {
+ "management": "Management",
+ "instance": "Instance"
+ },
+ "god": {
+ "users": {
+ "label": "Users",
+ "description": "Every account on this instance: the global role, whether the address is confirmed, and the projects each user can reach."
+ },
+ "projects": {
+ "label": "Projects",
+ "description": "Every project on this instance: what each one holds, when it was last active, and who can reach it."
+ },
+ "authentication": {
+ "label": "Authentication",
+ "description": "Who may register on this instance, how accounts are confirmed, and the providers people sign in with."
+ },
+ "hotkeys": {
+ "label": "Keyboard shortcuts",
+ "description": "The key each command is bound to for everyone on this instance. Each person can rebind a shortcut for their own account in their preferences."
+ },
+ "storage": {
+ "label": "Storage",
+ "description": "How much people may upload: the size of a single file, the attachment types accepted, and the storage each project gets."
+ },
+ "telegram": {
+ "label": "Telegram",
+ "description": "The bot people connect their Telegram account to, and the one that delivers Telegram notifications for projects that set no bot of their own."
+ },
+ "email": {
+ "label": "Email provider",
+ "description": "The mail provider the instance sends through: password resets, address confirmation, and sign-in links."
+ },
+ "auth-provider": {
+ "label": "Auth provider",
+ "description": "The external accounts people may sign in with."
+ }
+ },
+ "settings": {
+ "general": {
+ "label": "General",
+ "description": "The project's name, description, and the sections it shows."
+ },
+ "notifications": {
+ "label": "Notification providers",
+ "description": "The email (SMTP or Resend) and Telegram bot credentials this project delivers notifications through."
+ },
+ "states": {
+ "label": "States",
+ "description": "The workflow states issues move through, each shown as a column."
+ },
+ "issue-types": {
+ "label": "Issue types",
+ "description": "The kinds of issues this project can hold, each with its own fields."
+ },
+ "labels": {
+ "label": "Labels",
+ "description": "Tags for organizing and filtering issues across the project."
+ },
+ "custom-fields": {
+ "label": "Custom fields",
+ "description": "Extra fields shown on issues, global or scoped to an issue type."
+ },
+ "configuration": {
+ "label": "Configuration",
+ "description": "How subtasks close with their parent, and when stale issues are archived."
+ },
+ "actions": {
+ "label": "Actions",
+ "description": "Buttons on an issue that set fields in one click."
+ },
+ "schedules": {
+ "label": "Schedules",
+ "description": "Run agent tasks on a recurring schedule."
+ },
+ "webhooks": {
+ "label": "Webhooks",
+ "description": "Send project events to external URLs, signed with a per-webhook secret."
+ },
+ "github": {
+ "label": "GitHub",
+ "description": "Close issues automatically when their pull requests merge on GitHub."
+ },
+ "ai-agents": {
+ "label": "Agents",
+ "description": "Bot users you can delegate issues to."
+ },
+ "integrations": {
+ "label": "Integrations",
+ "description": "Credentials your agents use to reach AI providers and tools."
+ },
+ "agent-skills": {
+ "label": "Skills",
+ "description": "Reusable instructions internal agents load on demand."
+ },
+ "agent-tools": {
+ "label": "Tools",
+ "description": "Tools agents can call, each connected to an integration credential."
+ }
+ }
+}
diff --git a/apps/web/messages/en/settings.json b/apps/web/messages/en/settings.json
new file mode 100644
index 00000000..1d302aba
--- /dev/null
+++ b/apps/web/messages/en/settings.json
@@ -0,0 +1,594 @@
+{
+ "schedules": {
+ "newTitle": "New schedule",
+ "editTitle": "Edit schedule",
+ "create": "Create schedule",
+ "creating": "Creating…",
+ "save": "Save schedule",
+ "dialogDescription": "Choose an agent, describe the task, and set when it should run.",
+ "namePlaceholder": "Daily task review",
+ "agent": "Agent",
+ "selectAgent": "Select agent",
+ "task": "Task",
+ "taskPlaceholder": "Review open tasks and update anything that needs attention.",
+ "taskHint": "The agent receives this task on every run.",
+ "scheduleUtc": "Schedule (UTC)",
+ "schedule": "Schedule",
+ "nextRun": "Next run",
+ "lastRun": "Last run",
+ "showPresets": "Show preset schedules",
+ "inputPlaceholder": "Every weekday at 9:00 AM or 0 9 * * 1-5",
+ "runs": "Runs: {description} UTC",
+ "cronLabel": "Cron:",
+ "runsSuffix": "{description} UTC",
+ "statusActive": "Active",
+ "statusPaused": "Paused",
+ "viewTask": "View task",
+ "noRunsShort": "No runs yet",
+ "pause": "Pause schedule",
+ "resume": "Resume schedule",
+ "runHistory": "Run history",
+ "moreActions": "More actions",
+ "runNow": "Run now",
+ "edit": "Edit schedule",
+ "delete": "Delete schedule",
+ "runStatus": {
+ "success": "Succeeded",
+ "failed": "Failed",
+ "pending": "Pending"
+ },
+ "noRuns": "No runs yet.",
+ "error": "Error",
+ "result": "Result",
+ "noOutput": "No output",
+ "loadFailed": "Couldn't load schedules",
+ "loadFailedHint": "Check your connection and try again.",
+ "tryAgain": "Try again",
+ "noAgents": "No agents to schedule",
+ "noAgentsHint": "A schedule runs a task for one of your internal agents.",
+ "createAgent": "Create an agent",
+ "empty": "No schedules yet",
+ "emptyHint": "Pick an agent, a task, and how often it runs.",
+ "deleteMessage": "The schedule <v>{name}</v> and its run history will be removed. This cannot be undone."
+ },
+ "integrations": {
+ "add": "Add credential",
+ "edit": "Edit credential",
+ "delete": "Delete credential",
+ "back": "Back to integrations",
+ "label": "Label (optional)",
+ "labelPlaceholder": "e.g. Team account",
+ "labelHint": "Helps tell apart credentials of the same integration. Secrets are stored encrypted.",
+ "noFields": "No fields",
+ "search": "Search integrations",
+ "noMatches": "No integration matches “{query}”.",
+ "empty": "No credentials yet",
+ "emptyHint": "Agents can't use an AI provider or a tool without one.",
+ "deleteMessage": "Delete the {integration} credential? Agents and tools using it will stop working until you add a new one.",
+ "groups": {
+ "llm": {
+ "title": "AI providers",
+ "hint": "The model an internal agent runs on"
+ },
+ "tool": {
+ "title": "Tools",
+ "hint": "Integrations an agent can call as tools"
+ }
+ },
+ "columns": {
+ "integration": "Integration",
+ "credentials": "Credentials"
+ }
+ },
+ "agents": {
+ "newAgent": "New agent",
+ "create": "Create agent",
+ "save": "Save agent",
+ "delete": "Delete agent",
+ "edit": "Edit agent",
+ "empty": "No agents yet",
+ "emptyHint": "An agent runs on the built-in runtime or through the API.",
+ "agent": "Agent",
+ "sheetSubtitle": "A bot user you can delegate issues to",
+ "agentSettings": "Agent settings",
+ "basics": "Basics",
+ "kind": "Kind",
+ "kindLabel": {
+ "external": "External",
+ "internal": "Internal"
+ },
+ "kindHint": {
+ "external": "Driven through the API",
+ "internal": "Run by the built-in runtime"
+ },
+ "namePlaceholder": "e.g. Triage bot",
+ "username": "Username",
+ "usernamePlaceholder": "e.g. triage-bot",
+ "usernameHint": "Letters, digits, dots, dashes, and underscores. Up to 64 characters.",
+ "access": "Access",
+ "accessHint": "The permissions the agent acts under",
+ "role": "Role",
+ "chooseRole": "Choose a role",
+ "defaultRole": "Default role",
+ "roleHintExternal": "The agent's API requests are limited to what this role permits.",
+ "roleHintInternal": "The agent can only do what both this role and its actions allow. An action the role denies fails at runtime.",
+ "model": "Model",
+ "modelHint": "Provider, model, and system prompt",
+ "credential": "Credential",
+ "chooseCredential": "Choose a credential",
+ "noCredential": "Add an AI provider key first",
+ "noCredentialHint": "The agent needs a provider key to pick a model.",
+ "addKey": "Add a key on Integrations",
+ "chooseModel": "Choose a model",
+ "searchModel": "Search or type a model id",
+ "loadingModels": "Loading models…",
+ "noModel": "No model set",
+ "instructions": "Instructions",
+ "instructionsPlaceholder": "How the agent should behave and any rules to follow",
+ "expandInstructions": "Expand instructions editor",
+ "expandEditor": "Expand editor",
+ "triggers": "Triggers",
+ "triggersHint": "When the agent runs on its own",
+ "onMention": "React to mentions",
+ "onMentionHint": "Run when @-mentioned in a comment.",
+ "onDelegation": "React to delegation",
+ "onDelegationHint": "Run when set as an issue's delegate.",
+ "actions": "Actions",
+ "actionsHint": "What the agent can do in the project",
+ "noActions": "No actions available.",
+ "clearAll": "Clear all",
+ "selectAll": "Select all",
+ "skills": "Skills",
+ "skillsHint": "Reusable instructions the agent can load",
+ "noSkills": "No skills in the library yet. Add one on the Skills page.",
+ "searchSkills": "Search skills",
+ "noDescription": "No description",
+ "tools": "Tools",
+ "toolsHint": "External integrations the agent can call",
+ "noTools": "No tools configured yet. Add one on the Tools page.",
+ "searchTools": "Search tools",
+ "advanced": "Advanced",
+ "advancedHint": "Sampling, step limit, and memory",
+ "temperature": "Temperature",
+ "optional": "Optional",
+ "maxSteps": "Max steps",
+ "memory": "Conversation memory",
+ "memoryHint": "Recall recent messages within a conversation thread.",
+ "memoryCount": "Remember last N messages",
+ "memoryCountPlaceholder": "e.g. 20",
+ "keyWarning": "Copy this key now. For security, it is shown only once and cannot be retrieved later.",
+ "copyKey": "Copy key",
+ "dismiss": "Dismiss",
+ "regenerateTitle": "Regenerate API key",
+ "regenerateConfirm": "Regenerate key",
+ "keyRegenerated": "Key regenerated",
+ "apiKey": "API key",
+ "apiKeyValue": "API key {start}…",
+ "runHistory": "Run history",
+ "noRuns": "No runs yet. Runs appear here when the agent is mentioned in a comment or an issue is delegated to it.",
+ "loadMore": "Load 25 more",
+ "endOfHistory": "End of history",
+ "manualTask": "Manual task",
+ "scheduledTask": "Scheduled task",
+ "failed": "Failed",
+ "task": "Task",
+ "error": "Error",
+ "queue": "Queue",
+ "testChat": "Test chat",
+ "moreActions": "More actions",
+ "createdOn": "Created {date}",
+ "runsSubtitle": "@{username} · mention and delegation runs",
+ "regenerateMessage": "A new key will be issued for <v>{name}</v> and the current one will stop working immediately. Every existing connection using it will break until it is updated with the new key.",
+ "deleteMessage": "<v>{name}</v> and its API key will be removed, and it will be cleared from any issues it was assigned or delegated to. This cannot be undone.",
+ "actionCount": "{count, plural, one {# action} other {# actions}}",
+ "toolCount": "{count, plural, one {# tool} other {# tools}}",
+ "skillCount": "{count, plural, one {# skill} other {# skills}}",
+ "triggersNone": "None",
+ "triggerMention": "Mention",
+ "triggerDelegation": "Delegation",
+ "noMatch": "No match for “{query}”.",
+ "useCustomModel": "Use \"{query}\"",
+ "readOnlyAlwaysOn": "Read-only access is always on and can't be turned off.",
+ "instructionsLabel": "Instructions",
+ "done": "Done",
+ "columns": {
+ "triggers": "Triggers",
+ "configuration": "Configuration"
+ },
+ "created": "Agent @{username} created",
+ "saved": "Agent @{username} saved"
+ },
+ "skills": {
+ "newSkill": "New skill",
+ "create": "Create skill",
+ "delete": "Delete skill",
+ "edit": "Edit skill",
+ "empty": "No skills yet",
+ "emptyHint": "Write markdown, upload a file, or import from GitHub.",
+ "name": "Name (optional)",
+ "namePlaceholder": "Defaults to the SKILL.md frontmatter name",
+ "descriptionPlaceholder": "Shown to the agent to decide when to load this skill",
+ "noDescription": "No description",
+ "unsaved": "Unsaved changes",
+ "addReference": "Add reference",
+ "source": {
+ "inline": "Inline",
+ "upload": "Uploaded",
+ "github": "GitHub"
+ },
+ "tabInline": "Write markdown",
+ "tabUpload": "Upload a file",
+ "tabGithub": "Import from GitHub",
+ "skillFile": "SKILL.md file",
+ "loaded": "Loaded {file}",
+ "trustWarning": "Import only skills you trust",
+ "trustWarning1": "A skill becomes instructions your agents follow. Review the source first.",
+ "trustWarning2": "Only SKILL.md and its markdown references are imported. Scripts are skipped.",
+ "githubUrl": "GitHub URL",
+ "githubUrlPlaceholder": "https://github.com/owner/repo or a skill folder",
+ "githubUrlHint": "A repository, a folder, or a SKILL.md.",
+ "findSkills": "Find skills",
+ "importTitle": "Import skills from GitHub",
+ "foundCount": "{count, plural, one {Found # skill. Pick which to import.} other {Found # skills. Pick which to import.}}",
+ "matchCount": "{shown} of {total, plural, one {# skill} other {# skills}} match",
+ "selectAll": "Select all",
+ "searchPlaceholder": "Search by name or description",
+ "noMatches": "No skills match “{query}”.",
+ "importCount": "{count, plural, =0 {Import skills} one {Import # skill} other {Import # skills}}",
+ "files": "Files",
+ "skill": "Skill",
+ "description": "Description",
+ "referenceCount": "{count, plural, one {# reference} other {# references}}"
+ },
+ "tools": {
+ "add": "Add tool",
+ "delete": "Delete tool",
+ "back": "Back to tools",
+ "tool": "Tool",
+ "scopes": "Scopes",
+ "noScopes": "No scopes",
+ "empty": "No tools yet",
+ "emptyHint": "Configure a tool once, then enable it on any agent.",
+ "search": "Search tools",
+ "noMatches": "No tool matches “{query}”.",
+ "scopesLabel": "Required token permissions",
+ "credential": "Credential",
+ "chooseCredential": "Choose a credential",
+ "noCredential": "No {integration} credential yet. Add one on the Integrations page first.",
+ "deleteMessage": "Remove {tool}? Agents using it will lose access to this tool.",
+ "scopesUpper": "Scopes"
+ },
+ "notifications": {
+ "title": "Notifications",
+ "description": "Choose which issue events you get and where.",
+ "email": "Email",
+ "telegram": "Telegram",
+ "events": {
+ "assigned": "Assigned to an issue",
+ "mentioned": "Mentioned in a comment",
+ "commented": "New comment on an issue you watch",
+ "state_changed": "State changed on an issue you watch"
+ },
+ "eventsTitle": "Events",
+ "emailProvider": "Email provider",
+ "emailProviderHint": "Send through the system provider or one of your own. Credentials are stored encrypted.",
+ "systemAvailable": "Notifications are sent through the provider configured for this instance. No credentials needed here.",
+ "systemUnavailable": "The instance provider is not available. Ask the administrator to configure it and share it with projects, or set up a provider for this project.",
+ "host": "Host",
+ "port": "Port",
+ "encryption": "Encryption",
+ "encryptionOptions": {
+ "none": "None",
+ "ssl": "SSL",
+ "tls": "TLS"
+ },
+ "username": "Username",
+ "password": "Password",
+ "passwordPlaceholder": "SMTP password",
+ "timeout": "Timeout (s)",
+ "optional": "Optional",
+ "apiKey": "API key",
+ "telegramBot": "Telegram bot",
+ "telegramBotHint": "The bot that delivers notifications. Members choose their own chat in their preferences. The token is stored encrypted.",
+ "botToken": "Bot API token (optional)",
+ "telegramAccount": "Telegram account",
+ "telegramAccountHint": "Telegram notifications go to the account connected to your profile, for every project you are in.",
+ "noTelegramAccount": "No Telegram account connected",
+ "emailSaved": "Email provider saved",
+ "telegramSaved": "Telegram provider saved",
+ "preferencesSaved": "Notification preferences saved"
+ },
+ "transfer": {
+ "actions": {
+ "create": "New",
+ "update": "Update color",
+ "unchanged": "No change"
+ },
+ "copyFailed": "Could not copy to the clipboard.",
+ "readFailed": "Could not read the clipboard.",
+ "errors": {
+ "invalidJson": "Clipboard does not contain valid JSON.",
+ "wrongPayload": "Clipboard does not contain the expected export.",
+ "empty": "The export is empty."
+ }
+ },
+ "general": {
+ "saved": "Project updated",
+ "project": "Project",
+ "projectHint": "The key prefixes every issue and cannot change.",
+ "key": "Key",
+ "features": "Features",
+ "featuresHint": "Sections this project shows. Turning one off hides it and keeps its content.",
+ "featureHints": {
+ "dashboards": "Charts and metrics on saved dashboards.",
+ "initiatives": "Groups of issues tracked as one piece of work.",
+ "cycles": "Time-boxed periods of work the issues are planned into.",
+ "notes": "Freeform boards of sticky notes.",
+ "subtasks": "Issues broken down into subtasks under a parent.",
+ "checklists": "Lists of steps tracked inside an issue.",
+ "issueStats": "How long an issue spent in each state."
+ },
+ "featureOn": "{feature} turned on",
+ "featureOff": "{feature} turned off"
+ },
+ "configuration": {
+ "saved": "Changes saved",
+ "subtasks": "Subtasks",
+ "subtasksHint": "Only closing is synced. Moving an issue between open states changes nothing else.",
+ "completeParent": "Close the parent when its subtasks are done",
+ "completeParentHint": "The parent moves to the state its last subtask closed in.",
+ "closeSubtasks": "Close subtasks when the parent closes",
+ "closeSubtasksHint": "Open subtasks move to the state the parent closed in.",
+ "archive": "Archive",
+ "archiveHint": "Archive stale closed issues so the board stays clear.",
+ "completedIssues": "Completed issues",
+ "canceledIssues": "Canceled issues",
+ "staleHint": "Archive after this many days without activity.",
+ "days": "days"
+ },
+ "states": {
+ "addState": "Add {type} state",
+ "emptyTitle": "No {type} states",
+ "emptyHint": "Add a workflow state for this group.",
+ "newState": "New state",
+ "namePlaceholder": "State name",
+ "dragToReorder": "Drag to reorder",
+ "edit": "Edit state",
+ "delete": "Delete state",
+ "deleteTitle": "Delete state \"{name}\"",
+ "deleteConfirm": "Delete state",
+ "moveAndDelete": "Move & delete state",
+ "deleteNoIssues": "This state has no issues. It will be removed.",
+ "deleteHasIssues": "This state has {count, plural, one {# issue} other {# issues}}. Choose what happens to them.",
+ "moveIssues": "Move issues to another state",
+ "selectState": "Select a state",
+ "stateOption": "{name} ({type})",
+ "deleteIssues": "Delete issues permanently",
+ "menu": "State import and export",
+ "copy": "Copy states",
+ "paste": "Paste states",
+ "nothingToCopy": "No states to copy.",
+ "copied": "{count, plural, one {Copied # state.} other {Copied # states.}}",
+ "parseFailed": "Could not read states from the clipboard.",
+ "importTitle": "Apply states from clipboard",
+ "importSummary": "{count, plural, one {# state} other {# states}} will be applied. A matching state keeps its group; only its color is updated.",
+ "importApply": "{count, plural, one {Apply # state} other {Apply # states}}",
+ "imported": "Applied states: {created} created, {updated} updated."
+ },
+ "issueTypes": {
+ "add": "Add type",
+ "namePlaceholder": "Type name",
+ "default": "Default",
+ "emptyTitle": "No issue types yet",
+ "emptyHint": "Add the kinds of issues this project can hold, each with its own fields.",
+ "columns": {
+ "type": "Type",
+ "issues": "Issues"
+ },
+ "issueCount": "{count, plural, =0 {No issues} one {# issue} other {# issues}}",
+ "edit": "Edit issue type",
+ "delete": "Delete issue type",
+ "deleteTitle": "Delete type \"{name}\"",
+ "deleteConfirm": "Delete type",
+ "deleteMessage": "{count, plural, =0 {No issues use this type.} one {# issue uses this type and will no longer have a type.} other {# issues use this type and will no longer have a type.}} Custom fields specific to this type are also removed. This cannot be undone.",
+ "menu": "Issue type import and export",
+ "copy": "Copy issue types",
+ "paste": "Paste issue types",
+ "nothingToCopy": "No issue types to copy.",
+ "copied": "{count, plural, one {Copied # issue type.} other {Copied # issue types.}}",
+ "parseFailed": "Could not read issue types from the clipboard.",
+ "importTitle": "Apply issue types from clipboard",
+ "importSummary": "{count, plural, one {# issue type} other {# issue types}} will be applied. A matching type only has its color updated.",
+ "importApply": "{count, plural, one {Apply # type} other {Apply # types}}",
+ "imported": "Applied issue types: {created} created, {updated} updated."
+ },
+ "labels": {
+ "add": "Add",
+ "newLabel": "New label",
+ "newGroup": "New group",
+ "namePlaceholder": "Label name",
+ "groupNamePlaceholder": "Group name",
+ "ungrouped": "Ungrouped",
+ "groups": "Groups",
+ "labels": "Labels",
+ "noLabels": "No labels",
+ "dropHere": "Drop here",
+ "addLabelTo": "Add label to {name}",
+ "addLabel": "Add label",
+ "editGroup": "Edit group",
+ "deleteGroup": "Delete group",
+ "editLabel": "Edit label",
+ "deleteLabel": "Delete label",
+ "dragToGroup": "Drag to a group",
+ "dragLabel": "Drag label",
+ "issueCount": "{count, plural, one {# issue} other {# issues}}",
+ "deleteLabelTitle": "Delete label \"{name}\"",
+ "deleteLabelMessage": "{count, plural, =0 {No issues use this label.} one {This label is on # issue and will be removed from it.} other {This label is on # issues and will be removed from them.}} This cannot be undone.",
+ "deleteGroupTitle": "Delete group \"{name}\"",
+ "deleteGroupMessage": "{count, plural, =0 {This group has no labels.} one {# label will be ungrouped but kept.} other {# labels will be ungrouped but kept.}} This cannot be undone.",
+ "menu": "Label import and export",
+ "copy": "Copy labels",
+ "paste": "Paste labels",
+ "nothingToCopy": "No labels to copy.",
+ "copied": "{count, plural, one {Copied # label.} other {Copied # labels.}}",
+ "parseFailed": "Could not read labels from the clipboard.",
+ "importTitle": "Apply labels from clipboard",
+ "importSummary": "{count, plural, one {# item} other {# items}} will be applied. A matching label keeps its group; only its color is updated.",
+ "importApply": "{count, plural, one {Apply # item} other {Apply # items}}",
+ "imported": "Applied labels: {created} created, {updated} updated.",
+ "dropToUngroup": "Drop a label here to remove it from its group",
+ "dropToGroup": "Drop a label here to add it to {name}"
+ },
+ "customFields": {
+ "fieldTypes": {
+ "text": "text",
+ "markdown": "markdown",
+ "url": "url",
+ "number": "number",
+ "boolean": "checkbox",
+ "date": "date",
+ "select": "select",
+ "multi_select": "multi-select"
+ },
+ "global": "Global (all types)",
+ "globalShort": "Global",
+ "addField": "Add field",
+ "addFieldTo": "Add field to {group}",
+ "noFields": "No fields yet.",
+ "editField": "Edit field",
+ "deleteField": "Delete field",
+ "deleteTitle": "Delete field \"{name}\"",
+ "deleteMessage": "This field and any values set for it on issues will be removed. This cannot be undone.",
+ "namePlaceholder": "Field name",
+ "optionsPlaceholder": "Options: Low, Medium, High",
+ "type": "Type",
+ "mainInfo": "Main info",
+ "mainInfoTooltip": "Shows in the issue body, not Properties",
+ "mainInfoMeta": "main info",
+ "menu": "Custom field import and export",
+ "copy": "Copy custom fields",
+ "paste": "Paste custom fields",
+ "nothingToCopy": "No custom fields to copy.",
+ "copied": "{count, plural, one {Copied # field.} other {Copied # fields.}}",
+ "parseFailed": "Could not read custom fields from the clipboard.",
+ "copyTitle": "Copy custom fields",
+ "copyQuestion": "This project has {scoped, plural, one {# field} other {# fields}} scoped to an issue type. Copy those too, or only the {global, plural, one {# global field} other {# global fields}}?",
+ "copyGlobalOnly": "Global only",
+ "copyIncludeScoped": "Include type-scoped",
+ "importTitle": "Apply custom fields from clipboard",
+ "importSummary": "{count, plural, one {# field} other {# fields}} will be added.",
+ "importSummaryWithTypes": "{count, plural, one {# field} other {# fields}} will be added, and {types, plural, one {# new issue type} other {# new issue types}} created: {names}.",
+ "importApply": "{count, plural, one {Apply # field} other {Apply # fields}}",
+ "actionNew": "New",
+ "actionExists": "Exists",
+ "imported": "Applied custom fields: {created} created.",
+ "importedWithTypes": "Applied custom fields: {created} created, {types} issue types added."
+ },
+ "actions": {
+ "new": "New action",
+ "emptyTitle": "No actions yet",
+ "emptyHint": "Pick which issues an action shows on, then what it sets.",
+ "columns": {
+ "action": "Action",
+ "thenSet": "Then set"
+ },
+ "when": "When",
+ "alwaysAvailable": "Always available",
+ "noChanges": "No changes",
+ "edit": "Edit action",
+ "duplicate": "Duplicate action",
+ "delete": "Delete action",
+ "copySuffix": "{name} copy",
+ "deleteTitle": "Delete action \"{name}\"",
+ "deleteMessage": "This action will be removed from every issue. This cannot be undone.",
+ "dialogNew": "New action",
+ "dialogEdit": "Edit action",
+ "dialogHint": "Pick an icon, name the action, and set which issues it applies to and what it changes.",
+ "namePlaceholder": "Action name (e.g. Approve)",
+ "availableWhen": "Available when",
+ "noConditions": "No conditions. Always available.",
+ "thenSet": "Then set",
+ "create": "Create action",
+ "creating": "Creating…",
+ "save": "Save action",
+ "addField": "Add field",
+ "removeField": "Remove field",
+ "icon": "Action icon",
+ "searchIcons": "Search icons",
+ "noIcons": "No icons found",
+ "setDate": "Set date"
+ },
+ "webhooks": {
+ "new": "New webhook",
+ "emptyTitle": "No webhooks yet",
+ "emptyHint": "Set a payload URL and choose which events to send.",
+ "columns": {
+ "endpoint": "Endpoint",
+ "events": "Events"
+ },
+ "active": "Active",
+ "disabled": "Disabled",
+ "hideSecret": "Hide secret",
+ "revealSecret": "Reveal secret",
+ "copySecret": "Copy secret",
+ "deliveryHistory": "Delivery history",
+ "moreActions": "More actions",
+ "edit": "Edit webhook",
+ "delete": "Delete webhook",
+ "deleteTitle": "Delete webhook",
+ "deleteMessage": "Deliveries to <v>{url}</v> will stop. This cannot be undone.",
+ "dialogNew": "New webhook",
+ "dialogEdit": "Edit webhook",
+ "dialogHint": "Set the payload URL and choose which project events to send.",
+ "payloadUrl": "Payload URL",
+ "events": "Events",
+ "create": "Create webhook",
+ "creating": "Creating…",
+ "save": "Save webhook",
+ "noDeliveries": "No deliveries yet.",
+ "loadMore": "Load 25 more",
+ "endOfHistory": "End of history",
+ "queued": "Queued",
+ "attempts": "·{count} attempts",
+ "sent": "Sent",
+ "response": "Response",
+ "responseWithStatus": "Response · HTTP {status}",
+ "noResponse": "(no response)",
+ "statuses": {
+ "success": "Success",
+ "failed": "Failed",
+ "pending": "Pending"
+ }
+ },
+ "github": {
+ "enable": "Enable GitHub integration",
+ "enableHint": "A pull request that mentions an issue, like “Closes KEY-123”, is linked to it.",
+ "connection": "Connection",
+ "connectionHint": "Connect a GitHub repository to this project.",
+ "connectionRestricted": "Only members who can edit integrations can see the connection details.",
+ "tabCli": "GitHub CLI",
+ "tabManual": "Manual",
+ "payloadUrl": "Payload URL",
+ "webhookSecret": "Webhook secret",
+ "regenerate": "Regenerate",
+ "secretRegenerated": "New secret created. Update it in your GitHub webhook too.",
+ "manualHint": "In your GitHub repository, open <b>Settings → Webhooks → Add webhook</b>. Paste the payload URL and secret, set the content type to <code>application/json</code>, and choose only the <b>Pull requests</b> event.",
+ "cliHint": "Requires the <link>GitHub CLI</link>. Copy this command, replace <code>{placeholder}</code> with your repository, and run it in a terminal.",
+ "commandCopied": "Command copied. Replace <owner>/<repo>, then run it.",
+ "copied": "{label} copied",
+ "lastDelivery": "Last delivery",
+ "lastDeliveryAt": "Received {ago}",
+ "lastDeliveryFrom": "Received {ago} from {repo}",
+ "noDelivery": "Nothing received yet.",
+ "automations": "Pull request automations",
+ "automationsHint": "Write a magic word and an issue ID in a pull request title or description, like “Closes KEY-123”. Close, fix, resolve, complete, and implement close the issue when the PR merges. Ref, part of, and related to link it without closing. Write “skip KEY-123” to leave an issue out.",
+ "onMerge": "When a linked PR is merged",
+ "onMergeHint": "The issue moves to this state when the PR merges into the default branch.",
+ "onMergeNone": "First completed state",
+ "onOpen": "When a linked PR is opened",
+ "onOpenHint": "Only moves issues that haven't been started. Issues in progress or closed stay where they are.",
+ "onOpenNone": "No action",
+ "changeState": "Change state…",
+ "noState": "No state."
+ }
+}
diff --git a/apps/web/messages/en/shell.json b/apps/web/messages/en/shell.json
new file mode 100644
index 00000000..15b43723
--- /dev/null
+++ b/apps/web/messages/en/shell.json
@@ -0,0 +1,8 @@
+{
+ "noProjectAccess": "You do not have access to this project.",
+ "projectUnavailable": "This project is not available.",
+ "noProjects": "No projects yet, create one to get started.",
+ "noProjectsTitle": "No projects yet",
+ "noProjectsHint": "Create your first project to start planning issues on a board.",
+ "createProject": "Create project"
+}
diff --git a/apps/web/messages/en/updates.json b/apps/web/messages/en/updates.json
new file mode 100644
index 00000000..0afd5a38
--- /dev/null
+++ b/apps/web/messages/en/updates.json
@@ -0,0 +1,16 @@
+{
+ "updateAvailable": "Update available",
+ "releaseHistory": "Release history",
+ "runningOutdated": "You're running {current}. Latest is {latest}.",
+ "runningUnknown": "You're running {current}. Latest release unknown.",
+ "runningLatest": "You're running {current}, the latest release.",
+ "noReleases": "No release notes shipped with this build.",
+ "badgeRunning": "Running",
+ "badgeNew": "New",
+ "earlier": "Earlier releases",
+ "check": "Check for updates",
+ "checking": "Checking",
+ "lastChecked": "Last checked {date}",
+ "allReleases": "All releases",
+ "noNotes": "This release has no notes."
+}
diff --git a/apps/web/messages/en/views.json b/apps/web/messages/en/views.json
new file mode 100644
index 00000000..515605e0
--- /dev/null
+++ b/apps/web/messages/en/views.json
@@ -0,0 +1,14 @@
+{
+ "all": "All",
+ "newView": "New view",
+ "switchView": "Switch view",
+ "searchViews": "Search views…",
+ "noViews": "No views found.",
+ "options": "View options",
+ "share": "Share",
+ "shared": "Shared",
+ "editView": "Edit view",
+ "shareBoard": "Share board",
+ "newViewHint": "Create a view from the current filters and display",
+ "filter": "Filter"
+}
diff --git a/apps/web/messages/en/workItems.json b/apps/web/messages/en/workItems.json
new file mode 100644
index 00000000..ec84201f
--- /dev/null
+++ b/apps/web/messages/en/workItems.json
@@ -0,0 +1,105 @@
+{
+ "newIssue": "New issue",
+ "collapse": "Collapse",
+ "expand": "Expand",
+ "hide": "Hide",
+ "show": "Show",
+ "hiddenColumns": "Hidden columns",
+ "hiddenGroups": "Hidden groups",
+ "selectAll": "Select all",
+ "deselectAll": "Deselect all",
+ "resizeColumn": "Resize the column",
+ "viewNamePlaceholder": "All issues",
+ "sortedOrder": "Issues are ordered by {field}. Switch ordering to Manual to move them.",
+ "statusSince": "In current status since {date}",
+ "createdOn": "Created {date}",
+ "updatedOn": "Updated {date}",
+ "subtasksProgress": "Subtasks {done}/{total}",
+ "subtasksDone": "{done} of {total} subtasks done",
+ "columns": {
+ "title": "Title",
+ "status": "State",
+ "statusAge": "In status",
+ "priority": "Priority",
+ "type": "Type",
+ "initiative": "Initiative",
+ "cycle": "Cycle",
+ "labels": "Labels",
+ "startDate": "Start",
+ "dueDate": "Due",
+ "created": "Created",
+ "updated": "Updated"
+ },
+ "calendar": {
+ "previousMonth": "Previous month",
+ "nextMonth": "Next month",
+ "today": "Today",
+ "moreIssues": "+{count} more",
+ "issueCount": "{count, plural, one {# issue} other {# issues}}",
+ "weekdays": {
+ "sun": "Sun",
+ "mon": "Mon",
+ "tue": "Tue",
+ "wed": "Wed",
+ "thu": "Thu",
+ "fri": "Fri",
+ "sat": "Sat"
+ },
+ "noDate": {
+ "dueDate": "No due date",
+ "startDate": "No start date"
+ },
+ "allDated": {
+ "dueDate": "Everything has a due date.",
+ "startDate": "Everything has a start date."
+ }
+ },
+ "timeline": {
+ "empty": "No issues to place on the timeline yet.",
+ "expandGroup": "Expand group",
+ "collapseGroup": "Collapse group",
+ "inferredStart": "Start inferred from the created date",
+ "inferredStartDraggable": "Start inferred from the created date — drag to set it"
+ },
+ "bulk": {
+ "selected": "{count} selected",
+ "status": "Status",
+ "priority": "Priority",
+ "assignee": "Assignee",
+ "delegate": "Delegate",
+ "initiative": "Initiative",
+ "cycle": "Cycle",
+ "labels": "Labels",
+ "noAssignee": "No assignee",
+ "noDelegate": "No delegate",
+ "noInitiative": "No initiative",
+ "noCycle": "No cycle",
+ "archive": "Archive",
+ "clearSelection": "Clear selection"
+ },
+ "removal": {
+ "archive": {
+ "title": "{count, plural, one {Archive issue} other {Archive issues}}",
+ "confirm": "{count, plural, one {Archive # issue} other {Archive # issues}}",
+ "description": "{count, plural, one {Archive # selected issue? It leaves the board and can be restored later.} other {Archive # selected issues? They leave the board and can be restored later.}}"
+ },
+ "delete": {
+ "title": "{count, plural, one {Delete issue} other {Delete issues}}",
+ "confirm": "{count, plural, one {Delete # issue} other {Delete # issues}}",
+ "description": "{count, plural, one {Delete # selected issue?} other {Delete # selected issues?}} This also removes comments, activity and attachments. This cannot be undone."
+ }
+ },
+ "share": {
+ "issueTitle": "Issue",
+ "issueUnavailable": "This issue is not available.",
+ "boardUnavailable": "This shared board is not available. The link may have been revoked."
+ },
+ "groups": {
+ "noAssignee": "No assignee",
+ "noDelegate": "No delegate",
+ "noPriority": "No priority",
+ "noType": "No type",
+ "noInitiative": "No initiative",
+ "noCycle": "No cycle"
+ }
+}
diff --git a/apps/web/messages/uk/account.json b/apps/web/messages/uk/account.json
new file mode 100644
index 00000000..62c0b399
--- /dev/null
+++ b/apps/web/messages/uk/account.json
@@ -0,0 +1,150 @@
+{
+ "profile": {
+ "label": "Профіль",
+ "title": "Профіль",
+ "avatarTitle": "Аватар",
+ "avatarDescription": "Показується поруч з вашим імʼям у коментарях, виконавцях та учасниках.",
+ "nameTitle": "Імʼя",
+ "displayName": "Відображуване імʼя",
+ "uploading": "Завантаження…",
+ "change": "Змінити",
+ "upload": "Завантажити",
+ "avatarUpdated": "Аватар оновлено",
+ "avatarRemoved": "Аватар прибрано",
+ "avatarUploadFailed": "Не вдалося завантажити аватар.",
+ "avatarRemoveFailed": "Не вдалося прибрати аватар.",
+ "nameUpdated": "Імʼя оновлено",
+ "nameUpdateFailed": "Не вдалося оновити імʼя.",
+ "description": "Ваше ім'я та аватар показуються по всьому застосунку. Ви увійшли як {email}.",
+ "avatarTooLarge": "Зображення більше за ліміт у {mb} МБ",
+ "avatarFormats": "PNG, JPEG, GIF, WebP або AVIF.",
+ "avatarMaxSize": "До {mb} МБ."
+ },
+ "security": {
+ "label": "Безпека",
+ "title": "Безпека",
+ "passwordTitle": "Пароль",
+ "passwordDescription": "Зміна пароля завершує ваші інші сесії.",
+ "passkeysTitle": "Passkeys",
+ "passkeysDescription": "Входьте без пароля за допомогою Touch ID, Windows Hello або ключа безпеки.",
+ "currentPassword": "Поточний пароль",
+ "newPassword": "Новий пароль",
+ "confirmNewPassword": "Підтвердіть новий пароль",
+ "changePassword": "Змінити пароль",
+ "changing": "Зміна…",
+ "passwordChanged": "Пароль змінено",
+ "passwordChangeFailed": "Не вдалося змінити пароль.",
+ "passwordsDoNotMatch": "Нові паролі не збігаються",
+ "addPasskey": "Додати passkey",
+ "waitingForPasskey": "Очікування passkey…",
+ "notSignedIn": "Ви не увійшли",
+ "addPasskeyFailed": "Не вдалося додати passkey.",
+ "removePasskey": "Прибрати passkey",
+ "removePasskeyTitle": "Прибрати passkey?",
+ "removePasskeyFailed": "Не вдалося прибрати passkey.",
+ "description": "Як ви входите до {email}.",
+ "empty": "Passkey ще немає. Додайте, щоб входити без пароля.",
+ "thisDevice": "Цей пристрій",
+ "deleteWarning": "Ви більше не зможете входити за цим passkey. Цю дію не можна скасувати.",
+ "passkeyFallback": "Passkey",
+ "passkeysLoadFailed": "Не вдалося завантажити passkey."
+ },
+ "accounts": {
+ "label": "Акаунти",
+ "title": "Акаунти",
+ "description": "Підключіть зовнішні акаунти, щоб входити через них або отримувати там сповіщення.",
+ "googleDescription": "Входьте через свій акаунт Google.",
+ "connected": "Підключено",
+ "setPasswordFirst": "Спочатку задайте пароль",
+ "googleConnectFailed": "Не вдалося підключити Google.",
+ "googleDisconnected": "Google відключено",
+ "telegramConnected": "Telegram підключено",
+ "telegramDisconnected": "Telegram відключено",
+ "telegramWaiting": "Очікуємо, поки ви натиснете Start у чаті з ботом…",
+ "telegramDescription": "Отримуйте сповіщення в Telegram.",
+ "connect": "Підключити",
+ "disconnect": "Відключити",
+ "telegramConnectedLabel": "Підключено",
+ "loadFailed": "Не вдалося завантажити підключені акаунти.",
+ "connectFailed": "Не вдалося підключити Google.",
+ "disconnectFailed": "Не вдалося відключити цей акаунт."
+ },
+ "preferences": {
+ "label": "Налаштування",
+ "title": "Налаштування",
+ "description": "Як застосунок виглядає й поводиться саме для вас. Кожна зміна зберігається одразу й діє скрізь, де ви входите.",
+ "saved": "Налаштування збережено",
+ "sections": {
+ "appearance": "Вигляд",
+ "dateAndTime": "Дата й час",
+ "dateAndTimeDescription": "Позначки часу зберігаються в UTC і показуються в обраному вами поясі.",
+ "navigation": "Навігація",
+ "navigationDescription": "Куди застосунок вас веде і як відкриваються задачі.",
+ "issueSettings": "Налаштування задач",
+ "issueSettingsDescription": "Якими спочатку є статистика та журнал активності задачі. Перемикання їх у відкритій задачі цього не змінює.",
+ "notifications": "Сповіщення",
+ "notificationsDescription": "Стеження за задачею приносить вам її коментарі та зміни статусу.",
+ "aiChat": "AI-чат",
+ "shortcuts": "Клавіатурні скорочення",
+ "shortcutsDescription": "Натисніть «Змінити», потім потрібні клавіші. «Скинути» повертає скорочення до заданого для цього інстансу."
+ },
+ "theme": "Тема",
+ "themeDescription": "«Як у системі» слідує налаштуванню вашої операційної системи.",
+ "themeOptions": {
+ "system": "Як у системі",
+ "light": "Світла",
+ "dark": "Темна"
+ },
+ "language": "Мова",
+ "languageDescription": "Мова інтерфейсу, ваших листів і Telegram-бота.",
+ "timezone": "Часовий пояс",
+ "timezoneDescription": "Виберіть пояс, у якому працюєте.",
+ "timezonePlaceholder": "Виберіть часовий пояс",
+ "timezoneEmpty": "Часових поясів не знайдено.",
+ "timezoneGroups": {
+ "America": "Америка",
+ "Europe": "Європа",
+ "Africa": "Африка",
+ "Asia": "Азія",
+ "Australia": "Австралія",
+ "Pacific": "Тихий океан",
+ "Atlantic": "Атлантика",
+ "Indian": "Індійський океан",
+ "Antarctica": "Антарктида",
+ "Other": "Інше"
+ },
+ "issueOpenMode": "Відкривати задачі в",
+ "issueOpenModeDescription": "Що відбувається, коли ви клікаєте задачу на дошці, у таблиці, календарі чи таймлайні.",
+ "issueOpenModeOptions": {
+ "panel": "Бічній панелі",
+ "page": "Окремій сторінці"
+ },
+ "startPage": "Стартова сторінка",
+ "startPageDescription": "Розділ, який відкривається при вході в застосунок, у вашому останньому проєкті.",
+ "startPageOptions": {
+ "work-items": "Задачі",
+ "inbox": "Вхідні",
+ "dashboard": "Дашборди",
+ "initiatives": "Ініціативи",
+ "ai-chat": "AI-чат"
+ },
+ "showStats": "Показувати статистику",
+ "showStatsDescription": "Чи розгорнутий блок статистики, коли ви відкриваєте задачу.",
+ "statsView": "Вигляд статистики",
+ "statsViewDescription": "«Компактна» — одна смуга з часткою на статус; «Таймлайн» дає кожному статусу свою доріжку на осі часу.",
+ "statsViewOptions": {
+ "compact": "Компактна смуга",
+ "timeline": "Таймлайн"
+ },
+ "activityView": "Вигляд активності",
+ "activityViewDescription": "«Плоский» — усі записи, найновіші згори; «Згрупований» ділить журнал за статусом, у якому була задача.",
+ "activityViewOptions": {
+ "flat": "Плоский",
+ "grouped": "Згрупований за статусом"
+ },
+ "autoWatch": "Автоматично стежити за задачами",
+ "autoWatchDescription": "За тими, які ви створюєте, отримуєте, коментуєте або де вас згадують.",
+ "showChatByDefault": "Показувати чат за замовчуванням",
+ "showChatByDefaultDescription": "Кнопка чату залишається на екрані в проєкті. Вікно чату відкривається лише за кліком."
+ }
+}
diff --git a/apps/web/messages/uk/aiChat.json b/apps/web/messages/uk/aiChat.json
new file mode 100644
index 00000000..c706437c
--- /dev/null
+++ b/apps/web/messages/uk/aiChat.json
@@ -0,0 +1,25 @@
+{
+ "noAccess": "У вас немає доступу до AI-агентів у цьому проєкті.",
+ "emptyTitle": "Немає агентів для чату",
+ "emptyDescription": "Тут можуть спілкуватися лише внутрішні агенти, у тестовому режимі.",
+ "createAgent": "Створити агента",
+ "agents": "Агенти",
+ "agentsAvailable": "Доступно: {count, plural, one {# агент} few {# агенти} many {# агентів} other {# агента}}",
+ "chats": "Чати",
+ "newChat": "Новий чат",
+ "memoryOff": "Памʼять вимкнена",
+ "noAgents": "Немає агентів",
+ "addInternalAgent": "Додайте внутрішнього агента",
+ "noInternalAgents": "Внутрішніх агентів для чату ще немає.",
+ "history": "Історія",
+ "backToChat": "Назад до чату",
+ "minimize": "Згорнути",
+ "minimizeChat": "Згорнути чат",
+ "openChat": "Відкрити чат",
+ "hideChat": "Сховати чат",
+ "untitledThread": "Нова розмова",
+ "deleteThread": "Видалити розмову",
+ "deleteThreadConfirm": "«{title}» та її повідомлення буде видалено назавжди.",
+ "noThreads": "Розмов ще немає. Надішліть повідомлення, щоб почати.",
+ "noModel": "Модель не задано"
+}
diff --git a/apps/web/messages/uk/apiKeys.json b/apps/web/messages/uk/apiKeys.json
new file mode 100644
index 00000000..e1e73d62
--- /dev/null
+++ b/apps/web/messages/uk/apiKeys.json
@@ -0,0 +1,32 @@
+{
+ "label": "API-ключі",
+ "title": "API-ключі",
+ "description": "Персональні API-ключі автентифікують запити до API від імені вашого акаунта ({email}). Значення ключа показується лише один раз — коли ви його створюєте.",
+ "sectionTitle": "Ваші API-ключі",
+ "create": "Створити API-ключ",
+ "empty": "API-ключів ще немає. Створіть ключ, щоб автентифікувати запити до API.",
+ "fallbackName": "API-ключ",
+ "createdAt": "Створено {date}",
+ "deleteAction": "Видалити API-ключ",
+ "createDialog": {
+ "title": "Створити API-ключ",
+ "nameLabel": "Назва",
+ "namePlaceholder": "напр. CI pipeline",
+ "nameHint": "Підпис, за яким ви впізнаєте цей ключ згодом.",
+ "submit": "Створити ключ",
+ "submitPending": "Створення…",
+ "error": "Не вдалося створити API-ключ."
+ },
+ "createdDialog": {
+ "title": "API-ключ створено",
+ "description": "Скопіюйте ключ зараз. З міркувань безпеки він показується лише один раз і його не можна отримати пізніше.",
+ "copy": "Скопіювати ключ"
+ },
+ "deleteDialog": {
+ "title": "Видалити API-ключ?",
+ "confirm": "Видалити ключ",
+ "description": "Будь-який запит із цим ключем одразу перестане працювати. Дію не можна скасувати.",
+ "error": "Не вдалося видалити API-ключ."
+ },
+ "loadFailed": "Не вдалося завантажити API-ключі."
+}
diff --git a/apps/web/messages/uk/auth.json b/apps/web/messages/uk/auth.json
new file mode 100644
index 00000000..ac100e0e
--- /dev/null
+++ b/apps/web/messages/uk/auth.json
@@ -0,0 +1,87 @@
+{
+ "legal": {
+ "both": "Продовжуючи, ви погоджуєтесь з <terms>Умовами використання</terms> та <privacy>Політикою конфіденційності</privacy>.",
+ "termsOnly": "Продовжуючи, ви погоджуєтесь з <terms>Умовами використання</terms>.",
+ "privacyOnly": "Продовжуючи, ви погоджуєтесь з <privacy>Політикою конфіденційності</privacy>."
+ },
+ "fields": {
+ "email": "Пошта",
+ "emailPlaceholder": "[email protected]",
+ "password": "Пароль",
+ "newPassword": "Новий пароль",
+ "confirmPassword": "Підтвердіть пароль",
+ "passwordHint": "Щонайменше 8 символів."
+ },
+ "login": {
+ "title": "З поверненням",
+ "subtitleVerified": "Пошту підтверджено. Увійдіть, щоб продовжити.",
+ "subtitleReset": "Пароль змінено. Увійдіть з ним.",
+ "subtitleLink": "Ми надішлемо на пошту посилання для входу",
+ "subtitlePassword": "Увійдіть з поштою і паролем",
+ "submit": "Увійти",
+ "submitPending": "Вхід…",
+ "sendLink": "Надіслати посилання",
+ "sendLinkPending": "Надсилання…",
+ "forgotPassword": "Забули пароль?",
+ "or": "Або",
+ "noAccount": "Ще немає акаунта?",
+ "signUp": "Зареєструватися",
+ "linkSentTitle": "Перевірте пошту",
+ "linkSentDescription": "Ми надіслали посилання для входу на {email}. Відкрийте його, щоб увійти.",
+ "backToSignIn": "Назад до входу",
+ "withPassword": "Увійти з паролем",
+ "withLink": "Надіслати посилання на пошту",
+ "withGoogle": "Продовжити з Google",
+ "withPasskey": "Увійти за passkey",
+ "unconfirmedResent": "Лист із підтвердженням надіслано. Перевірте вхідні та теку зі спамом.",
+ "unconfirmedPrompt": "Перевірте теку зі спамом або <resend>надішліть новий лист із підтвердженням</resend>."
+ },
+ "register": {
+ "title": "Створіть акаунт",
+ "subtitle": "Зареєструйтеся з поштою і паролем",
+ "subtitleInviteOnly": "Цей інстанс лише за запрошеннями. Використайте адресу, на яку вас запросили.",
+ "submit": "Створити акаунт",
+ "submitPending": "Створення акаунта…",
+ "or": "Або",
+ "withGoogle": "Продовжити з Google",
+ "haveAccount": "Вже маєте акаунт?",
+ "signIn": "Увійти",
+ "confirmTitle": "Підтвердіть пошту",
+ "confirmDescription": "Ми надіслали посилання на {email}. Відкрийте його, щоб завершити створення акаунта.",
+ "backToSignIn": "Назад до входу",
+ "closedTitle": "Реєстрацію закрито",
+ "closedDescription": "Цей інстанс не приймає нових акаунтів."
+ },
+ "forgotPassword": {
+ "title": "Скидання пароля",
+ "subtitle": "Ми надішлемо на пошту посилання, щоб задати новий",
+ "submit": "Надіслати посилання",
+ "submitPending": "Надсилання…",
+ "sentTitle": "Перевірте пошту",
+ "sentDescription": "Якщо акаунт для {email} існує, посилання для скидання вже в дорозі.",
+ "backToSignIn": "Назад до входу",
+ "remembered": "Згадали пароль?",
+ "signIn": "Увійти"
+ },
+ "resetPassword": {
+ "title": "Задайте новий пароль",
+ "subtitle": "Виберіть пароль, який тут ще не використовували",
+ "submit": "Зберегти пароль",
+ "submitPending": "Збереження…",
+ "deadLinkTitle": "Це посилання більше не працює",
+ "deadLinkDescription": "Посилання для скидання діють обмежений час і лише один раз. Запросіть нове.",
+ "sendNewLink": "Надіслати нове посилання"
+ },
+ "errors": {
+ "generic": "Щось пішло не так. Спробуйте ще раз.",
+ "passkey": "Не вдалося увійти за passkey. Спробуйте ще раз.",
+ "passwordsDoNotMatch": "Паролі не збігаються.",
+ "google": "Не вдалося увійти через Google. Спробуйте ще раз.",
+ "linkRefused": "Для цієї пошти вже є акаунт. Увійдіть із його паролем і підтвердіть адресу — після цього можна буде користуватися Google.",
+ "signupDisabled": "Цей інстанс не приймає нових акаунтів.",
+ "emailNotFound": "Google не повернув адресу пошти для цього акаунта.",
+ "tokenExpired": "Термін дії посилання для підтвердження минув. Увійдіть нижче, щоб отримати нове.",
+ "invalidToken": "Посилання для підтвердження недійсне. Увійдіть нижче, щоб отримати нове.",
+ "userNotFound": "Посилання для підтвердження належить акаунту, якого більше не існує."
+ }
+}
diff --git a/apps/web/messages/uk/common.json b/apps/web/messages/uk/common.json
new file mode 100644
index 00000000..bcd0145f
--- /dev/null
+++ b/apps/web/messages/uk/common.json
@@ -0,0 +1,129 @@
+{
+ "cancel": "Скасувати",
+ "done": "Готово",
+ "loading": "Завантаження…",
+ "signOut": "Вийти",
+ "member": "Учасник",
+ "owner": "Власник",
+ "delete": "Видалити",
+ "more": "Ще",
+ "back": "Назад",
+ "save": "Зберегти",
+ "saving": "Збереження…",
+ "close": "Закрити",
+ "name": "Назва",
+ "edit": "Редагувати",
+ "language": "Мова",
+ "toggleTheme": "Перемкнути тему",
+ "priority": {
+ "label": "Пріоритет",
+ "tooltip": "Пріоритет: {priority}",
+ "setTo": "Встановити пріоритет…",
+ "none": "Без пріоритету",
+ "urgent": "Терміновий",
+ "high": "Високий",
+ "medium": "Середній",
+ "low": "Низький"
+ },
+ "add": "Додати",
+ "showMore": "Показати ще",
+ "archived": "Архівовано",
+ "clear": "Очистити",
+ "noLabels": "Міток немає.",
+ "enabled": "Увімкнено",
+ "fullscreen": "На весь екран",
+ "exitFullscreen": "Вийти з повноекранного режиму",
+ "resizeTitleColumn": "Змінити ширину колонки назв",
+ "openGeneralSettings": "Відкрити загальні налаштування",
+ "noSectionAccess": "У вас немає доступу до цього розділу.",
+ "brandSubtitle": "Плануйте задачі на дошці. Увійдіть, щоб відкрити свої проєкти.",
+ "hotkeys": {
+ "pressKeys": "Натисніть клавіші",
+ "fixed": "Фіксоване",
+ "resetShortcut": "Скинути це скорочення",
+ "groups": {
+ "general": "Загальні",
+ "workItems": "Задачі"
+ },
+ "commands": {
+ "palette": {
+ "toggle": "Відкрити палітру команд"
+ },
+ "project": {
+ "switch": "Перейти до проєкту 1–9",
+ "new": "Новий проєкт",
+ "settings": "Відкрити налаштування проєкту"
+ },
+ "sidebar": {
+ "toggle": "Показати або сховати бічну панель"
+ },
+ "issue": {
+ "new": "Нова задача"
+ },
+ "view": {
+ "kanban": "Вигляд «Дошка»",
+ "table": "Вигляд «Таблиця»",
+ "timeline": "Вигляд «Таймлайн»",
+ "calendar": "Вигляд «Календар»"
+ },
+ "board": {
+ "select-all": "Вибрати всі задачі на дошці"
+ }
+ },
+ "conflict": "Уже використовується для «{command}»"
+ },
+ "agentChat": {
+ "emptyHint": "Надішліть повідомлення, щоб перевірити, як агент відповідає і які інструменти використовує.",
+ "messagePlaceholder": "Повідомлення для {agent}…",
+ "reset": "Скинути розмову",
+ "send": "Надіслати",
+ "loadingEarlier": "Завантаження попередніх повідомлень…",
+ "messages": "Повідомлення розмови",
+ "usingTool": "Використовує {tool}…",
+ "thinking": "Думає…",
+ "title": "Чат з {agent}",
+ "unreachable": "Не вдалося зв'язатися з агентом. Спробуйте ще раз."
+ },
+ "share": {
+ "createFailed": "Не вдалося створити посилання. Спробуйте ще раз.",
+ "changeFailed": "Не вдалося змінити, що показує посилання. Спробуйте ще раз.",
+ "stopFailed": "Не вдалося закрити доступ. Спробуйте ще раз.",
+ "copyFailed": "Не вдалося скопіювати посилання. Виділіть і скопіюйте вручну.",
+ "hint": "Будь-хто з посиланням може це прочитати. Акаунт не потрібен.",
+ "shareLink": "Посилання",
+ "fullDetails": "Повні деталі задачі",
+ "fullDetailsHint": "Виконавці, мітки, власні поля та активність.",
+ "stopSharing": "Закрити доступ",
+ "createLink": "Створити посилання",
+ "copy": "Скопіювати",
+ "copied": "Скопійовано"
+ },
+ "actions": "Дії",
+ "clearSearch": "Очистити пошук",
+ "hide": "Сховати",
+ "show": "Показати",
+ "copy": "Скопіювати",
+ "copied": "Скопійовано",
+ "change": "Змінити",
+ "featureOffHint": "Власник може знову увімкнути цей розділ у загальних налаштуваннях.",
+ "description": "Опис",
+ "pickColor": "Вибрати колір",
+ "new": "Новий",
+ "features": {
+ "initiatives": "Ініціативи",
+ "cycles": "Цикли",
+ "dashboards": "Дашборди",
+ "notes": "Нотатки",
+ "subtasks": "Підзадачі",
+ "checklists": "Чеклісти",
+ "issueStats": "Статистика задач"
+ },
+ "featureOffTitle": "Розділ «{feature}» вимкнено",
+ "toggleSidebar": "Показати або сховати бічну панель",
+ "system": "Системний",
+ "genericError": "Щось пішло не так",
+ "commandPalette": "Палітра команд",
+ "commandPaletteHint": "Знайдіть команду для виконання…",
+ "scrollToEnd": "Прокрутити вниз",
+ "scrollToStart": "Прокрутити вгору"
+}
diff --git a/apps/web/messages/uk/cycles.json b/apps/web/messages/uk/cycles.json
new file mode 100644
index 00000000..5e110392
--- /dev/null
+++ b/apps/web/messages/uk/cycles.json
@@ -0,0 +1,58 @@
+{
+ "title": "Цикли",
+ "newCycle": "Новий цикл",
+ "status": {
+ "upcoming": "Заплановано",
+ "active": "Активний",
+ "completed": "Завершено"
+ },
+ "views": {
+ "table": "Таблиця",
+ "timeline": "Таймлайн"
+ },
+ "columns": {
+ "name": "Назва",
+ "dates": "Дати",
+ "length": "Тривалість",
+ "issues": "Задачі",
+ "progress": "Прогрес"
+ },
+ "emptyTitle": "Циклів ще немає",
+ "emptyDescription": "Цикл — це обмежений у часі період, у який команда планує свої задачі.",
+ "nothingPlannedTitle": "Нічого не заплановано",
+ "nothingPlannedDescription": "Таймлайн показує активні та майбутні цикли. Завершені — у таблиці.",
+ "options": "Дії циклу",
+ "transferIssues": "Перенести незавершені задачі",
+ "form": {
+ "editTitle": "Редагувати цикл",
+ "newTitle": "Новий цикл",
+ "name": "Назва",
+ "goal": "Мета",
+ "goalPlaceholder": "Що має дати цей цикл?",
+ "length": "Тривалість",
+ "starts": "Початок",
+ "ends": "Кінець",
+ "create": "Створити цикл",
+ "saveFailed": "Не вдалося зберегти цикл"
+ },
+ "weeks": "{count, plural, one {# тиждень} few {# тижні} many {# тижнів} other {# тижня}}",
+ "transfer": {
+ "title": "Перенести незавершені задачі",
+ "description": "Задачі, які не завершені й не скасовані, перейдуть у вибраний цикл. Решта залишиться тут.",
+ "moveTo": "Перенести до",
+ "noCycle": "Без циклу",
+ "submit": "Перенести задачі",
+ "moving": "Перенесення…",
+ "moved": "Перенесено {count, plural, one {# задачу} few {# задачі} many {# задач} other {# задачі}}",
+ "failed": "Не вдалося перенести задачі"
+ },
+ "details": "Деталі циклу",
+ "goal": "Мета",
+ "noGoal": "Мету не задано.",
+ "progress": "Прогрес",
+ "openCycle": "Відкрити цикл",
+ "dragFailed": "Не вдалося перемістити цикл",
+ "notFound": "Цикл не знайдено.",
+ "defaultName": "Спринт {n}",
+ "issuesDone": "Задач виконано"
+}
diff --git a/apps/web/messages/uk/dashboards.json b/apps/web/messages/uk/dashboards.json
new file mode 100644
index 00000000..c72da140
--- /dev/null
+++ b/apps/web/messages/uk/dashboards.json
@@ -0,0 +1,202 @@
+{
+ "noAccess": "У вас немає доступу до дашбордів.",
+ "defaultName": "Огляд",
+ "newDashboard": "Новий дашборд",
+ "renameDashboard": "Перейменувати дашборд",
+ "namePlaceholder": "Назва дашборда",
+ "options": "Дії з дашбордом",
+ "rename": "Перейменувати",
+ "editLayout": "Редагувати розкладку",
+ "discard": "Скасувати зміни",
+ "saveDashboard": "Зберегти дашборд",
+ "saveChanges": "Зберегти зміни",
+ "noWidgets": "Віджетів ще немає. Додайте перший, щоб зібрати дашборд.",
+ "addWidget": "Додати віджет",
+ "addWidgetTitle": "Додати віджет",
+ "addWidgetDescription": "Виберіть віджет для цього дашборда.",
+ "searchWidgets": "Пошук віджетів",
+ "clearSearch": "Очистити пошук",
+ "noWidgetMatches": "Немає віджетів за запитом «{query}».",
+ "dragToMove": "Перетягніть, щоб перемістити",
+ "widgetName": "Назва віджета",
+ "widgetSettings": "Налаштування віджета",
+ "widgetOptions": "Дії з віджетом",
+ "removeWidget": "Видалити віджет",
+ "lastDays": "Останні {days} дн.",
+ "showRows": "Показати {count}",
+ "widgetGroups": {
+ "issues": "Задачі",
+ "agents": "AI-агенти та вебхуки"
+ },
+ "widgets": {
+ "stat": {
+ "label": "Число",
+ "description": "Кількість задач, що відповідають фільтру"
+ },
+ "recent_issues": {
+ "label": "Останні задачі",
+ "description": "Найновіші задачі за часом створення або оновлення"
+ },
+ "activity_feed": {
+ "label": "Стрічка активності",
+ "description": "Журнал змін по проєкту з фільтром за автором і дією"
+ },
+ "pulse": {
+ "label": "Пульс",
+ "description": "Теплова карта щоденної активності"
+ },
+ "throughput": {
+ "label": "Пропускна здатність",
+ "description": "Створені та закриті задачі за тиждень"
+ },
+ "breakdown": {
+ "label": "Розподіл",
+ "description": "Кількість задач за статусом, пріоритетом, типом чи виконавцем"
+ },
+ "agent_runs": {
+ "label": "Запуски агентів",
+ "description": "Останні запуски AI-агентів та їхній результат"
+ },
+ "agent_health": {
+ "label": "Стан агентів",
+ "description": "Частка успішних запусків і збої за період"
+ },
+ "webhook_health": {
+ "label": "Стан вебхуків",
+ "description": "Результати доставок і вимкнені ендпоінти"
+ },
+ "agent_workload": {
+ "label": "Завантаження агентів",
+ "description": "Делеговані задачі та результати запусків по агентах"
+ }
+ },
+ "breakdown": {
+ "empty": "Задач ще немає.",
+ "by": {
+ "status": "Статус",
+ "priority": "Пріоритет",
+ "type": "Тип",
+ "assignee": "Виконавець",
+ "delegate": "Делегат"
+ },
+ "caption": {
+ "status": "За статусом",
+ "priority": "За пріоритетом",
+ "type": "За типом",
+ "assignee": "За виконавцем",
+ "delegate": "За делегатом"
+ }
+ },
+ "recentIssues": {
+ "empty": "Немає задач за цим фільтром.",
+ "captionCreated": "Спочатку найновіші",
+ "captionUpdated": "Нещодавно оновлені",
+ "filterCount": "{count, plural, one {# фільтр} few {# фільтри} many {# фільтрів} other {# фільтра}}",
+ "sort": {
+ "created": "Найновіші",
+ "updated": "Оновлені"
+ }
+ },
+ "activityFeed": {
+ "empty": "Немає активності за цим фільтром.",
+ "someone": "Хтось",
+ "filterCount": "{count, plural, one {# фільтр} few {# фільтри} many {# фільтрів} other {# фільтра}}",
+ "actions": {
+ "all": "Уся активність",
+ "status": "Зміни статусу",
+ "assignee": "Призначення",
+ "priority": "Пріоритет",
+ "created": "Створення"
+ },
+ "verbs": {
+ "comment": "прокоментував(-ла)",
+ "created": "створив(-ла)",
+ "title": "перейменував(-ла)",
+ "description": "оновив(-ла) опис",
+ "status": "змінив(-ла) статус",
+ "assignee": "змінив(-ла) виконавця",
+ "priority": "змінив(-ла) пріоритет",
+ "type": "змінив(-ла) тип",
+ "start_date": "змінив(-ла) дату початку",
+ "due_date": "змінив(-ла) дедлайн",
+ "label_add": "додав(-ла) мітку",
+ "label_remove": "прибрав(-ла) мітку",
+ "field": "оновив(-ла) поле",
+ "other": "оновив(-ла)"
+ }
+ },
+ "pulse": {
+ "caption": {
+ "hour": "За годинами",
+ "day": "За днями",
+ "week": "За тижнями"
+ },
+ "unit": {
+ "hour": "Години",
+ "day": "Дні",
+ "week": "Тижні"
+ },
+ "events": "{count, plural, one {# подія} few {# події} many {# подій} other {# події}}",
+ "eventNoun": "{count, plural, one {подія} few {події} many {подій} other {події}}",
+ "active": "{count} активних",
+ "less": "Менше",
+ "more": "Більше"
+ },
+ "throughput": {
+ "empty": "Немає активності за цей період.",
+ "lastWeeks": "Останні {weeks} тиж.",
+ "created": "Створено",
+ "closed": "Закрито"
+ },
+ "agentRuns": {
+ "empty": "Запусків агентів ще немає.",
+ "filters": {
+ "all": "Усі запуски",
+ "failed": "Невдалі",
+ "pending": "У черзі",
+ "success": "Успішні"
+ },
+ "status": {
+ "pending": "у черзі",
+ "success": "успіх",
+ "failed": "збій"
+ },
+ "trigger": {
+ "mention": "запущений згадкою в",
+ "delegation": "запущений делегуванням",
+ "manual": "запущений вручну",
+ "schedule": "запущений за розкладом"
+ }
+ },
+ "agentHealth": {
+ "empty": "Запусків агентів немає.",
+ "successRate": "успішних запусків",
+ "runs": "{count, plural, one {# запуск} few {# запуски} many {# запусків} other {# запуску}}",
+ "failed": "{count} зі збоєм",
+ "queued": "{count} у черзі"
+ },
+ "webhookHealth": {
+ "deliveries": "доставок",
+ "failed": "{count} зі збоєм",
+ "pending": "{count} в очікуванні",
+ "allDelivered": "усі доставлені",
+ "disabled": "{count, plural, one {# вимкнений ендпоінт} few {# вимкнені ендпоінти} many {# вимкнених ендпоінтів} other {# вимкненого ендпоінта}}"
+ },
+ "agentWorkload": {
+ "empty": "У цьому проєкті немає агентів.",
+ "agent": "Агент",
+ "delegated": "Делеговано",
+ "runs": "Запуски",
+ "failed": "{count} зі збоєм",
+ "kind": {
+ "external": "Зовнішній",
+ "internal": "Внутрішній"
+ }
+ },
+ "defaultWidgets": {
+ "open": "Відкриті",
+ "inProgress": "В роботі",
+ "backlog": "Беклог",
+ "unassigned": "Без виконавця"
+ }
+}
diff --git a/apps/web/messages/uk/display.json b/apps/web/messages/uk/display.json
new file mode 100644
index 00000000..8a29dd37
--- /dev/null
+++ b/apps/web/messages/uk/display.json
@@ -0,0 +1,92 @@
+{
+ "title": "Відображення",
+ "layouts": {
+ "kanban": "Канбан",
+ "table": "Таблиця",
+ "timeline": "Таймлайн",
+ "calendar": "Календар"
+ },
+ "sortFields": {
+ "manual": "Вручну",
+ "title": "Назва",
+ "identifier": "Номер задачі",
+ "status": "Статус",
+ "priority": "Пріоритет",
+ "assignee": "Виконавець",
+ "type": "Тип",
+ "startDate": "Дата початку",
+ "dueDate": "Дедлайн",
+ "created": "Створено",
+ "updated": "Оновлено"
+ },
+ "groupFields": {
+ "none": "Без групування",
+ "status": "Статус",
+ "assignee": "Виконавець",
+ "delegate": "Делегат",
+ "priority": "Пріоритет",
+ "type": "Тип",
+ "initiative": "Ініціатива",
+ "cycle": "Цикл"
+ },
+ "properties": {
+ "id": "ID",
+ "status": "Статус",
+ "priority": "Пріоритет",
+ "type": "Тип",
+ "assignee": "Виконавець",
+ "delegate": "Делегат",
+ "initiative": "Ініціатива",
+ "cycle": "Цикл",
+ "labels": "Мітки",
+ "startDate": "Дата початку",
+ "dueDate": "Дедлайн",
+ "created": "Створено",
+ "updated": "Оновлено",
+ "statusAge": "Час у статусі"
+ },
+ "stateTypes": {
+ "backlog": "Беклог",
+ "unstarted": "Не розпочато",
+ "started": "У роботі",
+ "completed": "Завершено",
+ "canceled": "Скасовано"
+ },
+ "timelineScales": {
+ "week": "Тиждень",
+ "month": "Місяць",
+ "quarter": "Квартал"
+ },
+ "weekStart": {
+ "0": "Неділя",
+ "1": "Понеділок"
+ },
+ "dateFields": {
+ "dueDate": "Дедлайн",
+ "startDate": "Дата початку"
+ },
+ "rows": {
+ "columns": "Колонки",
+ "grouping": "Групування",
+ "swimlanes": "Доріжки",
+ "subGrouping": "Підгрупування",
+ "ordering": "Сортування",
+ "ascending": "За зростанням",
+ "descending": "За спаданням",
+ "showEmptyColumns": "Показувати порожні колонки",
+ "showEmptyGroups": "Показувати порожні групи",
+ "showLinks": "Показувати зв'язки",
+ "separateSubtaskCards": "Показувати підзадачі окремо",
+ "separateSubtaskRows": "Показувати підзадачі окремо",
+ "showNestedSubtasks": "Показувати вкладені підзадачі",
+ "nestedSubtasks": "Вкладені підзадачі",
+ "displayProperties": "Властивості",
+ "placeBy": "Розміщувати за",
+ "startWeekOn": "Початок тижня",
+ "startCollapsed": "Починати зі згорнутими групами",
+ "scale": "Масштаб",
+ "addCustomField": "Додати власне поле",
+ "viewIcon": "Іконка подання"
+ },
+ "layoutCommand": "Розкладка «{layout}»"
+}
diff --git a/apps/web/messages/uk/filters.json b/apps/web/messages/uk/filters.json
new file mode 100644
index 00000000..f002861c
--- /dev/null
+++ b/apps/web/messages/uk/filters.json
@@ -0,0 +1,39 @@
+{
+ "add": "Додати фільтр",
+ "remove": "Прибрати фільтр",
+ "valuePlaceholder": "значення",
+ "noOptions": "Немає варіантів",
+ "selected": "Вибрано: {count}",
+ "operators": {
+ "is": "дорівнює",
+ "is_not": "не дорівнює",
+ "before": "до",
+ "after": "після",
+ "is_set": "задано",
+ "is_not_set": "не задано",
+ "contains": "містить",
+ "not_contains": "не містить"
+ },
+ "boolean": {
+ "true": "Так",
+ "false": "Ні"
+ },
+ "fields": {
+ "status": "Статус",
+ "statusType": "Тип статусу",
+ "assignee": "Виконавець",
+ "delegate": "Делегат",
+ "priority": "Пріоритет",
+ "type": "Тип",
+ "labels": "Мітки",
+ "dueDate": "Дедлайн",
+ "startDate": "Дата початку",
+ "created": "Створено",
+ "updated": "Оновлено"
+ },
+ "unset": {
+ "assignee": "Без виконавця",
+ "delegate": "Без делегата",
+ "type": "Без типу"
+ }
+}
diff --git a/apps/web/messages/uk/god.json b/apps/web/messages/uk/god.json
new file mode 100644
index 00000000..c8147032
--- /dev/null
+++ b/apps/web/messages/uk/god.json
@@ -0,0 +1,211 @@
+{
+ "pager": {
+ "perPage": "На сторінці",
+ "rowsPerPage": "Рядків на сторінці",
+ "range": "{first}-{last} з {total}",
+ "previous": "Попередня сторінка",
+ "next": "Наступна сторінка"
+ },
+ "access": {
+ "owner": "Власник має повний доступ: матриця ролей не застосовується.",
+ "role": "Визначено роллю «{role}».",
+ "default": "Роль не призначена: діють типові дозволи учасника.",
+ "joined": "приєднався {date}"
+ },
+ "providers": {
+ "credential": "Пароль",
+ "google": "Google",
+ "passkey": "Passkey"
+ },
+ "users": {
+ "empty": "Немає акаунтів за цими фільтрами.",
+ "searchPlaceholder": "Пошук за іменем або поштою",
+ "kind": "Тип акаунта",
+ "kinds": {
+ "human": "Люди",
+ "agent": "AI-боти",
+ "all": "Усі акаунти"
+ },
+ "columns": {
+ "account": "Акаунт",
+ "role": "Роль",
+ "signIn": "Вхід",
+ "projects": "Проєкти",
+ "lastSeen": "Останній візит",
+ "email": "Пошта"
+ },
+ "registered": "зареєстровано {date}",
+ "roleGod": "Адміністратор",
+ "roleUser": "Користувач",
+ "agent": "Агент",
+ "noProviders": "немає",
+ "neverSeen": "ніколи",
+ "verified": "Підтверджено",
+ "notVerified": "Не підтверджено",
+ "open": "Відкрити акаунт",
+ "showAccess": "Показати доступ до проєктів"
+ },
+ "userPanel": {
+ "instanceOwner": "Власник інстансу",
+ "user": "Користувач",
+ "aiAgent": "AI-агент",
+ "emailVerified": "Пошту підтверджено",
+ "unconfirmedTitle": "Адресу пошти не підтверджено",
+ "unconfirmedHint": "Підтвердьте її тут, якщо лист так і не дійшов.",
+ "verify": "Підтвердити",
+ "verifying": "Підтвердження…",
+ "verifyDone": "Адресу пошти підтверджено",
+ "signInMethods": "Способи входу",
+ "noProviders": "Не підключено",
+ "projects": "Проєкти",
+ "noProjects": "Немає",
+ "registered": "Зареєстровано",
+ "lastSeen": "Останній візит",
+ "neverSignedIn": "Жодного входу",
+ "projectAccess": "Доступ до проєктів",
+ "noAccessTitle": "Немає доступу до проєктів",
+ "noAccessHint": "Акаунт нічого не бачить, доки його не запросять у проєкт.",
+ "deleteHint": "Задачі та коментарі залишаться, але без автора.",
+ "deleteTitle": "Видалити акаунт",
+ "deleteConfirm": "Видалити акаунт",
+ "deleteConfirmWithProjects": "{count, plural, one {Видалити акаунт і проєкт} other {Видалити акаунт і проєкти}}",
+ "deleteMessage": "<strong>{name}</strong> втратить доступ до цього інстансу. Задачі та коментарі, які він написав, залишаться, але без автора. Це не можна скасувати.",
+ "soleOwnerTitle": "{count, plural, one {Єдиний власник проєкту} other {Єдиний власник # проєктів}}",
+ "soleOwnerHint": "{count, plural, one {Щойно акаунт зникне, ним не зможе керувати ніхто.} other {Щойно акаунт зникне, ними не зможе керувати ніхто.}}",
+ "deleteWithProjects": "{count, plural, one {Видалити проєкт разом з акаунтом} other {Видалити проєкти разом з акаунтом}}",
+ "deleteWithProjectsOn": "Усе, що всередині, теж зникне.",
+ "deleteWithProjectsOff": "Або скасуйте і спершу додайте другого власника.",
+ "deleted": "Акаунт видалено",
+ "deletedWithProjects": "Акаунт і його проєкти видалено"
+ },
+ "projects": {
+ "empty": "Немає проєктів за цим запитом.",
+ "searchPlaceholder": "Пошук за ключем або назвою",
+ "columns": {
+ "project": "Проєкт",
+ "members": "Учасники",
+ "issues": "Задачі",
+ "agents": "Агенти",
+ "lastActivity": "Остання активність",
+ "mcp": "MCP"
+ },
+ "created": "створено {date}",
+ "archived": "{count} в архіві",
+ "neverActive": "ніколи",
+ "mcpEnabled": "Увімкнено",
+ "mcpOff": "Вимкнено",
+ "open": "Відкрити проєкт",
+ "showDetails": "Показати деталі проєкту"
+ },
+ "projectPanel": {
+ "mcpEnabled": "MCP увімкнено",
+ "mcpOff": "MCP вимкнено",
+ "created": "створено {date}",
+ "lastActivity": "Остання активність: {value}",
+ "noActivity": "ще не було",
+ "statTitle": "{label}: {value}",
+ "stats": {
+ "issues": "Задачі",
+ "archivedIssues": "Задачі в архіві",
+ "initiatives": "Ініціативи",
+ "members": "Учасники",
+ "dashboards": "Дашборди",
+ "views": "Подання",
+ "agents": "AI-агенти",
+ "skills": "Навички",
+ "tools": "Інструменти",
+ "integrations": "Інтеграції"
+ },
+ "members": "Учасники",
+ "noMembersTitle": "Немає учасників",
+ "noMembersHint": "Ніхто не бачить цей проєкт, доки когось не запросять."
+ },
+ "authentication": {
+ "saved": "Налаштування автентифікації збережено",
+ "registration": "Реєстрація",
+ "registrationHint": "Хто може створити акаунт у цьому інстансі.",
+ "modes": {
+ "open": {
+ "label": "Відкрита",
+ "description": "Будь-хто, хто відкриє сторінку реєстрації, може створити акаунт."
+ },
+ "invite": {
+ "label": "Лише за запрошенням",
+ "description": "Акаунт можна створити тільки за посиланням-запрошенням."
+ },
+ "closed": {
+ "label": "Закрита",
+ "description": "Нових акаунтів немає. Наявні продовжують входити."
+ }
+ },
+ "signIn": "Способи входу",
+ "signInHint": "Опції, яким потрібна вихідна пошта. Вони вимкнені, доки не налаштовано провайдера.",
+ "needsProvider": "Спершу налаштуйте поштового провайдера в розділі «Інтеграції».",
+ "requireVerification": "Вимагати підтвердження пошти",
+ "requireVerificationHint": "Новий акаунт має підтвердити адресу, перш ніж зможе увійти.",
+ "magicLink": "Посилання для входу",
+ "magicLinkHint": "Пропонувати вхід за посиланням із листа, поряд із паролем."
+ },
+ "hotkeys": {
+ "saved": "Клавіатурні скорочення збережено"
+ },
+ "storage": {
+ "saved": "Налаштування сховища збережено",
+ "fileSize": "Розмір файлу",
+ "fileSizeHint": "Найбільший розмір одного файлу. Більший файл відхиляється до збереження.",
+ "attachmentMb": "Розмір вкладення (МБ)",
+ "attachmentHint": "Стосується вкладень до задач, файлів, вставлених в опис, і вкладень, доданих агентами.",
+ "avatarMb": "Розмір аватара (МБ)",
+ "avatarHint": "Фото профілю, яке люди завантажують для свого акаунта.",
+ "mimeTypes": "Дозволені типи вкладень",
+ "mimeTypesHint": "Один тип вмісту на рядок. Залиште порожнім, щоб приймати будь-які файли.",
+ "mimeTypesNote": "Рядок — це повний тип (application/pdf) або шаблон (image/*). Уже збережені файли залишаються незалежно від списку.",
+ "quota": "Квота проєкту",
+ "quotaHint": "Загальний обсяг вкладень, який може зайняти один проєкт. 0 — без обмеження.",
+ "quotaMb": "Сховище на проєкт (МБ)",
+ "quotaNote": "Щойно проєкт вичерпає квоту, нові завантаження відхиляються, доки хтось не видалить вкладення."
+ },
+ "telegram": {
+ "saved": "Налаштування Telegram збережено",
+ "bot": "Бот",
+ "botConfigured": "Люди підключають свій Telegram, відкривши чат із цим ботом зі свого профілю.",
+ "botMissing": "Створіть бота через @BotFather у Telegram і вставте його токен сюди.",
+ "botToken": "Токен бота",
+ "botTokenHint": "Токен перевіряється в Telegram під час збереження, тож хибний відхиляється одразу, а не мовчки ламається згодом.",
+ "resolvedHint": "Отримано з токена. Саме цього бота побачать люди під час підключення."
+ },
+ "email": {
+ "saved": "Поштового провайдера збережено",
+ "provider": "Поштовий провайдер",
+ "providerHint": "Виберіть одного провайдера. Облікові дані зберігаються зашифрованими.",
+ "from": "Адреса відправника",
+ "fromHint": "Обовʼязкова для Resend. Для SMTP типово береться імʼя користувача.",
+ "host": "Хост",
+ "port": "Порт",
+ "encryption": "Шифрування",
+ "encryptionOptions": {
+ "none": "Немає",
+ "ssl": "SSL",
+ "tls": "TLS"
+ },
+ "username": "Імʼя користувача",
+ "password": "Пароль",
+ "passwordPlaceholder": "Пароль SMTP",
+ "timeout": "Таймаут (с)",
+ "optional": "Необовʼязково",
+ "apiKey": "API-ключ",
+ "projectNotifications": "Сповіщення проєктів",
+ "projectNotificationsHint": "Дозволити проєктам надсилати сповіщення через цього провайдера замість власного. Кожен проєкт сам вирішує, чи користуватись ним."
+ },
+ "authProvider": {
+ "saved": "Провайдера входу збережено",
+ "google": "Google",
+ "googleConfigured": "Адреса без акаунта отримує новий; адреса з підтвердженим акаунтом входить у нього.",
+ "googleMissing": "Спершу додайте client ID і секрет.",
+ "clientId": "Client ID",
+ "clientSecret": "Client secret",
+ "redirectUri": "Redirect URI",
+ "redirectUriHint": "Зареєструйте його для OAuth-клієнта в Google Cloud console. Google відхилить вхід, якщо він не збігається точно.",
+ "copyRedirectUri": "Скопіювати redirect URI"
+ }
+}
diff --git a/apps/web/messages/uk/inbox.json b/apps/web/messages/uk/inbox.json
new file mode 100644
index 00000000..eae18961
--- /dev/null
+++ b/apps/web/messages/uk/inbox.json
@@ -0,0 +1,37 @@
+{
+ "title": "Вхідні",
+ "empty": "Сповіщень немає",
+ "selectNotification": "Виберіть сповіщення",
+ "backToList": "Вхідні",
+ "filter": "Фільтр",
+ "display": "Відображення",
+ "notificationType": "Тип сповіщення",
+ "showRead": "Показувати прочитані",
+ "showSnoozed": "Показувати відкладені",
+ "markAllRead": "Позначити всі прочитаними",
+ "deleteAllRead": "Видалити всі прочитані",
+ "deleteAllReadCompleted": "Видалити прочитані для завершених задач",
+ "types": {
+ "assigned": "Призначено",
+ "mentioned": "Згадано",
+ "commented": "Прокоментовано",
+ "state_changed": "Статус змінено"
+ },
+ "actions": {
+ "markRead": "Позначити прочитаним",
+ "markUnread": "Позначити непрочитаним",
+ "snooze": "Відкласти",
+ "unsnooze": "Повернути",
+ "tomorrow": "Завтра",
+ "inAWeek": "Через тиждень",
+ "pickDate": "Вибрати дату…"
+ },
+ "event": {
+ "someone": "Хтось",
+ "assigned": "{who} призначив(ла) задачу вам",
+ "mentioned": "{who} згадав(ла) вас",
+ "commented": "{who} залишив(ла) коментар",
+ "stateChanged": "{who} змінив(ла) статус з {from} на {to}",
+ "stateChangedPlain": "{who} змінив(ла) статус"
+ }
+}
diff --git a/apps/web/messages/uk/initiatives.json b/apps/web/messages/uk/initiatives.json
new file mode 100644
index 00000000..638d6852
--- /dev/null
+++ b/apps/web/messages/uk/initiatives.json
@@ -0,0 +1,144 @@
+{
+ "title": "Ініціативи",
+ "newInitiative": "Нова ініціатива",
+ "notFound": "Ініціативу не знайдено.",
+ "options": "Дії з ініціативою",
+ "showDescription": "Показати опис",
+ "noDescription": "Опису немає.",
+ "noOwner": "Без власника",
+ "targetDate": "Цільова дата",
+ "progress": "Прогрес",
+ "activity": "Активність",
+ "noActivity": "Активності ще немає.",
+ "noIssuesLinked": "Задач ще не прив'язано.",
+ "inProgress": "У роботі",
+ "emptyTitle": "Ініціатив ще немає",
+ "emptyDescription": "Ініціатива об'єднує пов'язані задачі під однією ціллю.",
+ "emptyTabDescription": "Ініціативи переходять між вкладками разом зі зміною статусу.",
+ "emptyTab": {
+ "active": "Активних ініціатив немає",
+ "planned": "Запланованих ініціатив немає",
+ "proposed": "Запропонованих ініціатив немає",
+ "completed": "Завершених ініціатив немає"
+ },
+ "tabs": {
+ "active": "Активні",
+ "planned": "Заплановані",
+ "proposed": "Запропоновані",
+ "completed": "Завершені",
+ "all": "Усі ініціативи"
+ },
+ "detailTabs": {
+ "overview": "Огляд",
+ "issues": "Задачі"
+ },
+ "columns": {
+ "name": "Назва",
+ "priority": "Пріоритет",
+ "owner": "Власник",
+ "target": "Ціль",
+ "progress": "Прогрес",
+ "health": "Стан"
+ },
+ "status": {
+ "proposed": "Запропонована",
+ "planned": "Запланована",
+ "active": "Активна",
+ "completed": "Завершена",
+ "canceled": "Скасована"
+ },
+ "stateGroups": {
+ "backlog": "Беклог",
+ "unstarted": "До виконання",
+ "started": "У роботі",
+ "completed": "Готово",
+ "canceled": "Скасовано"
+ },
+ "health": {
+ "on_track": "За планом",
+ "at_risk": "Є ризик",
+ "off_track": "Відставання",
+ "unknown": "Немає даних"
+ },
+ "healthInfo": {
+ "trigger": "Як розраховується стан?",
+ "title": "Стан",
+ "description": "Порівнює виконану роботу з витраченим часом. Оновлюється автоматично.",
+ "legend": {
+ "on_track": "Робота встигає за графіком.",
+ "at_risk": "Робота починає відставати від графіка.",
+ "off_track": "Робота суттєво відстає або цільова дата минула.",
+ "unknown": "Даних ще замало: немає задач або цільової дати."
+ },
+ "howCalculated": "Як це розраховується",
+ "workDone": "Виконана робота",
+ "timeElapsed": "Витрачений час",
+ "trail": "Наскільки робота відстає від часу",
+ "trailOnTrack": "до 10% відставання",
+ "trailAtRisk": "10-25% відставання",
+ "trailOffTrack": "понад 25% відставання"
+ },
+ "timeline": {
+ "title": "Терміни",
+ "started": "Початок",
+ "target": "Ціль",
+ "remaining": "Залишилось",
+ "overdue": "прострочено на {days} дн.",
+ "dueToday": "Термін сьогодні",
+ "left": "{days} дн. залишилось",
+ "timeElapsed": "Витрачений час",
+ "workDone": "Виконана робота",
+ "noTargetDate": "Вкажіть цільову дату, щоб бачити темп."
+ },
+ "form": {
+ "title": "Назва",
+ "titlePlaceholder": "Запуск у 3 кварталі",
+ "description": "Опис",
+ "descriptionPlaceholder": "Про що ця ініціатива?",
+ "create": "Створити ініціативу",
+ "creating": "Створення…",
+ "editTitle": "Редагувати ініціативу",
+ "save": "Зберегти зміни"
+ },
+ "pagination": {
+ "range": "{from}–{to} з {total}",
+ "previous": "Попередня сторінка",
+ "next": "Наступна сторінка"
+ },
+ "select": {
+ "label": "Ініціатива",
+ "search": "Прив'язати до ініціативи…",
+ "empty": "Ініціатив немає.",
+ "none": "Без ініціативи"
+ },
+ "feed": {
+ "system": "Система",
+ "createdInitiative": "створив(-ла) ініціативу",
+ "createdIssue": "створив(-ла) задачу",
+ "renamed": "перейменував(-ла) на «{title}»",
+ "descriptionUpdated": "оновив(-ла) опис",
+ "descriptionCleared": "очистив(-ла) опис",
+ "statusSet": "встановив(-ла) статус {status}",
+ "statusMoved": "перемістив(-ла) з {from} до {to}",
+ "prioritySet": "встановив(-ла) пріоритет {priority}",
+ "priorityRemoved": "прибрав(-ла) пріоритет",
+ "ownerSet": "призначив(-ла) власником {name}",
+ "ownerRemoved": "прибрав(-ла) власника {name}",
+ "assigneeSet": "призначив(-ла) виконавцем {name}",
+ "assigneeRemoved": "прибрав(-ла) виконавця {name}",
+ "delegateSet": "делегував(-ла) {name}",
+ "delegateRemoved": "прибрав(-ла) делегата {name}",
+ "targetDateSet": "встановив(-ла) цільову дату {date}",
+ "targetDateRemoved": "прибрав(-ла) цільову дату",
+ "startDateSet": "встановив(-ла) дату початку {date}",
+ "startDateRemoved": "прибрав(-ла) дату початку",
+ "dueDateSet": "встановив(-ла) дедлайн {date}",
+ "dueDateRemoved": "прибрав(-ла) дедлайн",
+ "labelAdded": "додав(-ла) мітку {label}",
+ "labelRemoved": "прибрав(-ла) мітку {label}",
+ "typeSet": "встановив(-ла) тип {type}",
+ "typeRemoved": "прибрав(-ла) тип",
+ "linked": "прив'язав(-ла) до {name}",
+ "unlinked": "відв'язав(-ла) від ініціативи"
+ }
+}
diff --git a/apps/web/messages/uk/invite.json b/apps/web/messages/uk/invite.json
new file mode 100644
index 00000000..2ef24337
--- /dev/null
+++ b/apps/web/messages/uk/invite.json
@@ -0,0 +1,40 @@
+{
+ "title": "Приєднатися до проєкту",
+ "subtitle": "Прийміть запрошення, щоб почати працювати разом",
+ "notFoundTitle": "Запрошення не знайдено",
+ "notFoundSubtitle": "Це посилання недійсне або більше не активне",
+ "notFoundMessage": "Це посилання-запрошення недійсне або було відкликане.",
+ "goToSignIn": "Перейти до входу",
+ "closedTitle": "Запрошення закрите",
+ "closedSubtitle": "Це запрошення вже {status, select, accepted {прийнято} rejected {відхилено} other {закрито}}",
+ "brandSubtitle": "Вас запросили до спільної роботи над проєктом.",
+ "invitedTo": "Вас запросили приєднатися до",
+ "invitationFor": "Запрошення для <strong>{email}</strong>",
+ "alreadyHandled": "Це запрошення вже {status, select, accepted {прийнято} rejected {відхилено} other {закрито}}.",
+ "goToApp": "Перейти до застосунку",
+ "wrongAccount": "Це запрошення надіслали на <invited>{email}</invited>, але ви увійшли як <current>{sessionEmail}</current>. Вийдіть, щоб прийняти його з запрошеної адреси.",
+ "accept": "Прийняти запрошення",
+ "accepting": "Приєднання…",
+ "decline": "Відхилити",
+ "declining": "Відхилення…",
+ "acceptError": "Не вдалося прийняти запрошення.",
+ "declineError": "Не вдалося відхилити запрошення.",
+ "emailLabel": "Пошта",
+ "emailHint": "Запрошення привʼязане до цієї адреси.",
+ "passwordLabel": "Пароль",
+ "passwordHint": "Щонайменше 8 символів.",
+ "confirmPasswordLabel": "Підтвердіть пароль",
+ "register": "Створити акаунт і приєднатися",
+ "registering": "Створення акаунта…",
+ "signIn": "Увійти",
+ "signingIn": "Вхід…",
+ "haveAccount": "Вже маєте акаунт?",
+ "needAccount": "Потрібен новий акаунт?",
+ "switchToSignIn": "Увійти",
+ "switchToRegister": "Створити",
+ "existingAccountNotice": "Для цієї пошти вже є акаунт. Увійдіть зі своїм паролем.",
+ "passwordsDoNotMatch": "Паролі не збігаються.",
+ "genericError": "Щось пішло не так. Спробуйте ще раз.",
+ "registerFailed": "Не вдалося створити акаунт.",
+ "signInFailed": "Не вдалося виконати вхід."
+}
diff --git a/apps/web/messages/uk/issue.json b/apps/web/messages/uk/issue.json
new file mode 100644
index 00000000..6f318c44
--- /dev/null
+++ b/apps/web/messages/uk/issue.json
@@ -0,0 +1,311 @@
+{
+ "system": "Система",
+ "viewValue": "переглянути",
+ "notFound": "Задачу не знайдено.",
+ "openAsPage": "Відкрити як сторінку",
+ "titlePlaceholder": "Назва задачі",
+ "noActivity": "Активності ще немає.",
+ "fields": {
+ "state": "Статус",
+ "priority": "Пріоритет",
+ "assignee": "Виконавець",
+ "delegate": "Делегат",
+ "watching": "Стеження",
+ "type": "Тип",
+ "labels": "Мітки",
+ "initiative": "Ініціатива",
+ "cycle": "Цикл",
+ "startDate": "Дата початку",
+ "dueDate": "Дедлайн",
+ "properties": "Властивості",
+ "empty": "Порожньо",
+ "openInNewTab": "Відкрити в новій вкладці"
+ },
+ "menu": {
+ "preview": "Попередній перегляд",
+ "goToIssue": "Перейти до задачі",
+ "status": "Статус",
+ "priority": "Пріоритет",
+ "assignee": "Виконавець",
+ "delegate": "Делегат",
+ "initiative": "Ініціатива",
+ "cycle": "Цикл",
+ "dueDate": "Дедлайн",
+ "clearDueDate": "Прибрати дедлайн",
+ "labels": "Мітки",
+ "copyPrompt": "Скопіювати промпт",
+ "restore": "Відновити",
+ "archive": "Архівувати",
+ "noAssignee": "Без виконавця",
+ "noDelegate": "Без делегата",
+ "noInitiative": "Без ініціативи",
+ "noCycle": "Без циклу",
+ "promptCopied": "Промпт скопійовано"
+ },
+ "commands": {
+ "preview": "Переглянути задачу",
+ "goToIssue": "Перейти до задачі",
+ "status": "Змінити статус",
+ "statusPlaceholder": "Встановити статус…",
+ "priority": "Встановити пріоритет",
+ "assignee": "Призначити",
+ "assigneePlaceholder": "Призначити…",
+ "noAssignee": "Без виконавця",
+ "delegate": "Делегувати агенту",
+ "delegatePlaceholder": "Делегувати…",
+ "noDelegate": "Без делегата",
+ "dueDate": "Встановити дедлайн",
+ "dueDatePlaceholder": "Встановити дедлайн…",
+ "clearDueDate": "Прибрати дедлайн",
+ "labels": "Перемкнути мітки",
+ "labelsPlaceholder": "Перемкнути мітку…",
+ "copyShortLink": "Скопіювати коротке посилання",
+ "copyPrompt": "Скопіювати промпт",
+ "restore": "Відновити задачу",
+ "archive": "Архівувати задачу",
+ "delete": "Видалити задачу",
+ "promptCopied": "Промпт скопійовано",
+ "shortLinkCopied": "Коротке посилання скопійовано"
+ },
+ "dueDatePresets": {
+ "tomorrow": "Завтра",
+ "endOfWeek": "Кінець цього тижня",
+ "inOneWeek": "Через тиждень"
+ },
+ "actionsBar": {
+ "shortLinkCopied": "Коротке посилання скопійовано",
+ "copyShortLink": "Скопіювати коротке посилання",
+ "copied": "Скопійовано!",
+ "copyPrompt": "Скопіювати промпт",
+ "sharedPublicly": "У спільному доступі",
+ "sharePublicly": "Відкрити доступ",
+ "restore": "Відновити задачу",
+ "archive": "Архівувати задачу",
+ "delete": "Видалити задачу",
+ "shareIssue": "Поділитися задачею"
+ },
+ "actions": {
+ "deleteTitle": "Видалити задачу",
+ "archiveTitle": "Архівувати задачу",
+ "apply": "Застосувати",
+ "cannotBeUndone": "Цю дію не можна скасувати.",
+ "deleteDescription": "Видалити {issue}? Разом з нею буде видалено коментарі, активність і вкладення.",
+ "archiveDescription": "Архівувати {issue}? Вона зникне з дошки, її можна буде відновити пізніше.",
+ "applyDescription": "Застосувати <v>{action}</v> до цієї задачі?"
+ },
+ "create": {
+ "title": "Нова задача",
+ "titlePlaceholder": "Назва задачі",
+ "addFieldPlaceholder": "Додати поле…",
+ "noFields": "Полів немає.",
+ "description": "Опис",
+ "other": "Інше",
+ "submit": "Створити задачу"
+ },
+ "attachments": {
+ "title": "Вкладення",
+ "add": "Додати",
+ "uploading": "Завантаження…",
+ "empty": "Вкладень ще немає.",
+ "emptyHint": "Перетягніть файли сюди або натисніть «Додати».",
+ "dropToUpload": "Відпустіть файли для завантаження",
+ "uploadFailed": "Не вдалося завантажити",
+ "uploadFailedCount": "{count, plural, one {Не вдалося завантажити файл} few {Не вдалося завантажити # файли} many {Не вдалося завантажити # файлів} other {Не вдалося завантажити # файла}}",
+ "dragIntoDescription": "Перетягніть в опис",
+ "openPreview": "Відкрити перегляд",
+ "open": "Відкрити {name}",
+ "insertIntoDescription": "Вставити в опис",
+ "insert": "Вставити {name} в опис",
+ "annotate": "Розмітити",
+ "annotateFile": "Розмітити {name}",
+ "download": "Завантажити",
+ "downloadFile": "Завантажити {name}",
+ "deleteFile": "Видалити {name}",
+ "preview": "Переглянути {name}",
+ "remove": "Прибрати {name}",
+ "removeShort": "Прибрати",
+ "attachFiles": "Прикріпити файли",
+ "drop": "Відпустіть файли",
+ "dropCount": "{count, plural, one {Відпустіть файл} few {Відпустіть # файли} many {Відпустіть # файлів} other {Відпустіть # файла}}",
+ "dropHint": "Буде додано в опис і прикріплено до задачі",
+ "insertShort": "Вставити",
+ "attachedCount": "{count, plural, one {Прикріплено # файл} few {Прикріплено # файли} many {Прикріплено # файлів} other {Прикріплено # файла}}"
+ },
+ "checklists": {
+ "title": "Чеклісти",
+ "empty": "Чеклістів ще немає.",
+ "emptyHint": "Натисніть «Додати», щоб фіксувати дрібні кроки без окремих підзадач.",
+ "titlePlaceholder": "Назва чекліста…",
+ "addItem": "Додати пункт…",
+ "dragToReorder": "Перетягніть, щоб змінити порядок",
+ "removeItem": "Прибрати {item}",
+ "deleteChecklist": "Видалити чекліст {title}",
+ "addItemButton": "Додати пункт"
+ },
+ "links": {
+ "title": "Зв'язки",
+ "remove": "Прибрати зв'язок з {issue}",
+ "emptyHint": "Натисніть «Додати», щоб зв'язати задачу, яка блокує, дублює або стосується цієї.",
+ "newIssue": "Нова задача"
+ },
+ "linkDialog": {
+ "title": "Зв'язати задачу: {relation}",
+ "searchPrompt": "Пошук задач, з якими ця {relation}…",
+ "failed": "Не вдалося зв'язати задачі",
+ "noMatches": "Задач не знайдено.",
+ "typeToSearch": "Почніть вводити, щоб знайти задачі проєкту."
+ },
+ "subtasks": {
+ "title": "Підзадачі",
+ "parent": "Батьківська задача",
+ "newSubtask": "Нова підзадача",
+ "addExisting": "Додати наявну задачу як підзадачу",
+ "empty": "Підзадач ще немає.",
+ "emptyHint": "Натисніть «Додати», щоб розбити задачу на підзадачі.",
+ "detach": "Відв'язати {subtask}",
+ "detachFromParent": "Відв'язати від {parent}",
+ "subtaskOf": "Підзадача {issue}",
+ "existingIssue": "Наявна задача",
+ "searchPrompt": "Пошук задач, щоб додати підзадачею…"
+ },
+ "subtaskDisposal": {
+ "intro": "{issues, plural, one {Ця задача має} other {Ці задачі мають}} {count, plural, one {# підзадачу} few {# підзадачі} many {# підзадач} other {# підзадачі}}.",
+ "deleteToo": "{count, plural, one {Видалити її також} other {Видалити їх також}}",
+ "archiveToo": "{count, plural, one {Архівувати її також} other {Архівувати їх також}}",
+ "detach": "{count, plural, one {Залишити її без батьківської задачі} other {Залишити їх без батьківської задачі}}",
+ "reassign": "{count, plural, one {Перенести її до іншої задачі} other {Перенести їх до іншої задачі}}",
+ "reassignTitle": "Перенести підзадачі до іншої задачі",
+ "change": "Змінити",
+ "searchParent": "Пошук нової батьківської задачі…"
+ },
+ "comments": {
+ "you": "Ви",
+ "commentAs": "Коментувати як {name}",
+ "placeholder": "Напишіть коментар… @ — щоб згадати",
+ "posting": "Надсилання…",
+ "comment": "Коментувати",
+ "toSend": "щоб надіслати",
+ "unknownAuthor": "Невідомий"
+ },
+ "stats": {
+ "title": "Статистика",
+ "compact": "Компактно",
+ "timeline": "Таймлайн",
+ "leadTime": "Загальний час",
+ "cycleTime": "Час у роботі",
+ "unknownStatus": "Невідомий статус"
+ },
+ "customFields": {
+ "noOptions": "Варіантів немає.",
+ "yes": "Так",
+ "no": "Ні"
+ },
+ "editor": {
+ "linkUrl": "URL посилання",
+ "insertImage": "Вставити зображення",
+ "insertNamed": "Вставити {name}",
+ "descriptionPlaceholder": "Додайте опис…",
+ "noImages": "Зображень ще немає. Завантажте з панелі вкладень або перетягніть просто в редактор.",
+ "codeBlock": "Блок коду",
+ "image": "Зображення"
+ },
+ "cycleSelect": {
+ "label": "Цикл",
+ "search": "Запланувати в цикл…",
+ "empty": "Циклів немає.",
+ "none": "Без циклу"
+ },
+ "annotator": {
+ "title": "Розмітити зображення",
+ "loading": "Завантаження зображення…",
+ "loadFailed": "Не вдалося завантажити зображення",
+ "undo": "Скасувати",
+ "color": "Колір {color}",
+ "tools": {
+ "marker": "Маркер",
+ "rect": "Прямокутник",
+ "ellipse": "Еліпс"
+ }
+ },
+ "activity": {
+ "linkedTo": "пов'язана з",
+ "created": "створив(-ла) задачу",
+ "titleChanged": "змінив(-ла) назву",
+ "renamed": "перейменував(-ла) на <v>«{title}»</v>",
+ "descriptionUpdated": "оновив(-ла) опис",
+ "descriptionCleared": "очистив(-ла) опис",
+ "statusMoved": "перемістив(-ла) з <v>{from}</v> до <v>{to}</v>",
+ "statusSet": "встановив(-ла) статус <v>{status}</v>",
+ "assigneeRemoved": "прибрав(-ла) виконавця <v>{name}</v>",
+ "assigneeChanged": "переназначив(-ла) на <v>{name}</v>",
+ "assigneeSet": "призначив(-ла) на <v>{name}</v>",
+ "delegateRemoved": "прибрав(-ла) делегата <v>{name}</v>",
+ "delegateChanged": "переделегував(-ла) на <v>{name}</v>",
+ "delegateSet": "делегував(-ла) <v>{name}</v>",
+ "prioritySet": "встановив(-ла) пріоритет <v>{priority}</v>",
+ "priorityRemoved": "прибрав(-ла) пріоритет",
+ "typeSet": "встановив(-ла) тип <v>{type}</v>",
+ "typeRemoved": "прибрав(-ла) тип",
+ "cycleRemoved": "прибрав(-ла) з циклу <v>{cycle}</v>",
+ "cycleMoved": "перемістив(-ла) з циклу <v>{from}</v> до <v>{to}</v>",
+ "cycleSet": "запланував(-ла) в цикл <v>{cycle}</v>",
+ "startDateSet": "встановив(-ла) дату початку <v>{date}</v>",
+ "startDateRemoved": "прибрав(-ла) дату початку",
+ "dueDateSet": "встановив(-ла) дедлайн <v>{date}</v>",
+ "dueDateRemoved": "прибрав(-ла) дедлайн",
+ "labelAdded": "додав(-ла) мітку <v>{label}</v>",
+ "labelRemoved": "прибрав(-ла) мітку <v>{label}</v>",
+ "linkAdded": "позначив(-ла) цю задачу як {relation} <v>{issue}</v>",
+ "linkRemoved": "більше не {relation} <v>{issue}</v>",
+ "parentDetached": "відв'язав(-ла) від <v>{parent}</v>",
+ "parentMoved": "перемістив(-ла) з <v>{from}</v> до <v>{to}</v>",
+ "parentSet": "зробив(-ла) підзадачею <v>{parent}</v>",
+ "subtaskAdded": "додав(-ла) підзадачу <v>{subtask}</v>",
+ "subtaskRemoved": "прибрав(-ла) підзадачу <v>{subtask}</v>",
+ "checklistAdded": "додав(-ла) чекліст <v>«{checklist}»</v>",
+ "checklistRenamed": "перейменував(-ла) чекліст <v>«{from}»</v> на <v>«{to}»</v>",
+ "checklistRemoved": "видалив(-ла) чекліст <v>«{checklist}»</v>",
+ "checklistItemAdded": "додав(-ла) <v>«{item}»</v> до <v>{checklist}</v>",
+ "checklistItemRemoved": "прибрав(-ла) <v>«{item}»</v> з <v>{checklist}</v>",
+ "fieldUpdated": "оновив(-ла) <v>{field}</v>",
+ "fieldSet": "встановив(-ла) <v>{field}</v> у <v>{value}</v>",
+ "fieldCleared": "очистив(-ла) <v>{field}</v>",
+ "archived": "архівував(-ла) задачу",
+ "restored": "відновив(-ла) задачу",
+ "pullRequestMerged": "змержив(-ла) пул-реквест <v>{pr}</v>",
+ "pullRequestOpened": "відкрив(-ла) пул-реквест <v>{pr}</v>"
+ },
+ "archived": "Архівовано",
+ "activityHeading": "Активність",
+ "feedFlat": "Списком",
+ "feedGrouped": "За статусами",
+ "shareUnavailable": "Ця спільна задача недоступна. Можливо, посилання відкликали.",
+ "fieldSelects": {
+ "changeState": "Змінити статус…",
+ "changeType": "Змінити тип…",
+ "noType": "Без типу",
+ "noAssignee": "Без виконавця",
+ "assignTo": "Призначити…",
+ "you": "Ви",
+ "members": "Учасники",
+ "delegateTo": "Делегувати…",
+ "noDelegate": "Без делегата",
+ "noAgents": "Агентів немає.",
+ "noState": "Статусів немає.",
+ "noMembers": "Учасників немає.",
+ "state": "Статус",
+ "type": "Тип",
+ "labels": "Мітки",
+ "labelCount": "{count, plural, one {# мітка} few {# мітки} many {# міток} other {# мітки}}"
+ },
+ "watchers": {
+ "watch": "Стежити",
+ "unwatch": "Не стежити"
+ },
+ "effects": {
+ "cleared": "Очищено",
+ "noAssignee": "Без виконавця",
+ "noType": "Без типу",
+ "noLabels": "Немає"
+ }
+}
diff --git a/apps/web/messages/uk/issueLinks.json b/apps/web/messages/uk/issueLinks.json
new file mode 100644
index 00000000..19c0e4cf
--- /dev/null
+++ b/apps/web/messages/uk/issueLinks.json
@@ -0,0 +1,16 @@
+{
+ "relations": {
+ "blocked_by": "Заблокована",
+ "blocks": "Блокує",
+ "duplicates": "Дублює",
+ "duplicated_by": "Продубльована",
+ "relates": "Пов'язана"
+ },
+ "phrases": {
+ "blocked_by": "заблокована",
+ "blocks": "блокує",
+ "duplicates": "дублює",
+ "duplicated_by": "продубльована",
+ "relates": "пов'язана з"
+ }
+}
diff --git a/apps/web/messages/uk/mcp.json b/apps/web/messages/uk/mcp.json
new file mode 100644
index 00000000..f0f61fa9
--- /dev/null
+++ b/apps/web/messages/uk/mcp.json
@@ -0,0 +1,29 @@
+{
+ "title": "MCP-сервер",
+ "description": "Підключайте AI-агентів до цього проєкту через Model Context Protocol. Агент отримує доступ того API-ключа, який використовує.",
+ "access": "Доступ MCP",
+ "enabled": "Увімкнено",
+ "disabled": "Вимкнено",
+ "ownerOnly": "Вмикати й вимикати доступ MCP може лише власник проєкту.",
+ "toggleAria": "Перемкнути доступ MCP",
+ "connectClient": "Підключити клієнта",
+ "keyHint": "Створіть персональний ключ на сторінці <link>API-ключі</link>, потім замініть <code>{apiKey}</code> у сніпеті.",
+ "endpoint": "Endpoint",
+ "clientTabsAria": "Клієнт",
+ "addToFile": "Додайте до <code>{file}</code>",
+ "copyAria": "Копіювати",
+ "copied": "Скопійовано в буфер обміну",
+ "notes": {
+ "claudeCode": "Виконайте це в терміналі.",
+ "vscode": "Потрібен GitHub Copilot.",
+ "claudeDesktop": "Claude Desktop зʼєднується з віддаленими серверами через міст mcp-remote. Потрібен Node.js.",
+ "other": "Підходить будь-який клієнт з підтримкою MCP через Streamable HTTP. Вкажіть йому endpoint і надсилайте заголовок Authorization: Bearer {apiKey}."
+ },
+ "clients": {
+ "other": "Інший"
+ },
+ "toast": {
+ "enabled": "MCP-доступ увімкнено",
+ "disabled": "MCP-доступ вимкнено"
+ }
+}
diff --git a/apps/web/messages/uk/members.json b/apps/web/messages/uk/members.json
new file mode 100644
index 00000000..09af6973
--- /dev/null
+++ b/apps/web/messages/uk/members.json
@@ -0,0 +1,103 @@
+{
+ "title": "Учасники",
+ "description": "Люди з доступом до цього проєкту. Запрошуйте поштою; власники можуть відкликати доступ.",
+ "columns": {
+ "member": "Учасник",
+ "role": "Роль",
+ "actions": "Дії"
+ },
+ "you": "(ви)",
+ "aiAgent": "AI-агент",
+ "joined": "· приєднався {date}",
+ "leaveProject": "Вийти з проєкту",
+ "revokeAccess": "Відкликати доступ",
+ "lastOwner": "У проєкті має залишатися щонайменше один власник",
+ "leaveTitle": "Вийти з цього проєкту",
+ "leaveDescription": "Ви втратите доступ до цього проєкту та його задач. Власник зможе запросити вас знову.",
+ "revokeTitle": "Відкликати доступ для {name}",
+ "revokeDescription": "{name} втратить доступ до цього проєкту. Його можна буде запросити знову.",
+ "selectRole": "Виберіть роль",
+ "editDescription": "Редагувати опис",
+ "descriptionQuestionSelf": "Чим ви займаєтесь у цьому проєкті?",
+ "descriptionQuestionOther": "Чим ця людина займається в цьому проєкті?",
+ "descriptionPlaceholder": "напр. Backend-інженер, відповідає за API та інтеграції",
+ "invites": {
+ "emailPlaceholder": "[email protected]",
+ "rolePlaceholder": "Роль",
+ "invite": "Запросити",
+ "inviting": "Надсилання…",
+ "pendingCount": "{count, plural, one {# запрошення в очікуванні} few {# запрошення в очікуванні} many {# запрошень в очікуванні} other {# запрошення в очікуванні}}",
+ "copyLink": "Скопіювати посилання",
+ "copied": "Скопійовано",
+ "revokeAction": "Відкликати запрошення",
+ "removeAction": "Прибрати запрошення",
+ "invitedBy": "Запросив {name} · ",
+ "createdAt": "створено {date}",
+ "respondedAt": "{status, select, accepted {прийнято} rejected {відхилено} other {оновлено}} {date}",
+ "status": {
+ "pending": "В очікуванні",
+ "accepted": "Прийнято",
+ "rejected": "Відхилено"
+ },
+ "revokeTitle": "Відкликати запрошення для {email}",
+ "revokeConfirm": "Відкликати запрошення",
+ "revokeDescription": "Посилання-запрошення перестане працювати. Ви зможете запросити цю адресу знову."
+ },
+ "roles": {
+ "title": "Ролі",
+ "description": "Власні ролі та права, які кожна з них надає. Призначити роль учаснику можна зі списку учасників.",
+ "ownerOnly": "Керувати ролями можуть лише власники проєкту.",
+ "empty": "Ролей ще немає. Створіть роль, щоб надати обмежений доступ.",
+ "columns": {
+ "role": "Роль",
+ "permissions": "Права",
+ "actions": "Дії"
+ },
+ "default": "За замовчуванням",
+ "editAction": "Редагувати роль",
+ "deleteAction": "Видалити роль",
+ "defaultUndeletable": "Роль за замовчуванням видалити не можна",
+ "deleteTitle": "Видалити роль «{name}»",
+ "deleteDescription": "Учасників із цією роллю буде переведено на роль за замовчуванням. Дію не можна скасувати.",
+ "newRole": "Нова роль",
+ "editorTitleEdit": "Редагувати роль",
+ "editorTitleNew": "Нова роль",
+ "editorSubtitle": "права ролі",
+ "namePlaceholder": "напр. Contributor",
+ "resourceColumn": "Ресурс",
+ "toggleActionAll": "Перемкнути «{action}» для всіх ресурсів",
+ "toggleGroupAll": "Перемкнути всі права групи {group}",
+ "toggleActionGroup": "Перемкнути «{action}» для {group}",
+ "cellAria": "{resource}: {action}",
+ "saveRole": "Зберегти роль",
+ "createRole": "Створити роль",
+ "importExport": "Імпорт і експорт ролей",
+ "copyRoles": "Скопіювати ролі",
+ "pasteRoles": "Вставити ролі",
+ "nothingToCopy": "Немає власних ролей для копіювання.",
+ "copiedRoles": "Скопійовано {count, plural, one {# роль} few {# ролі} many {# ролей} other {# ролі}}.",
+ "copyFailed": "Не вдалося скопіювати в буфер обміну.",
+ "readFailed": "Не вдалося прочитати буфер обміну.",
+ "parseFailed": "Не вдалося прочитати ролі з буфера обміну.",
+ "import": {
+ "title": "Застосувати ролі з буфера обміну",
+ "summary": "Буде застосовано {count, plural, one {# роль} few {# ролі} many {# ролей} other {# ролі}}. Перезапис ролі замінює її матрицю прав; учасники зберігають роль.",
+ "preview": "Попередній перегляд прав",
+ "apply": "Застосувати {count, plural, =0 {ролі} one {# роль} few {# ролі} many {# ролей} other {# ролі}}",
+ "applied": "Ролі застосовано: створено {created}, оновлено {updated}{skipped, plural, =0 {} other {, пропущено #}}.",
+ "actions": {
+ "create": "Нова",
+ "update": "Перезаписати",
+ "skip": "Пропустити (за замовчуванням)"
+ }
+ },
+ "transferErrors": {
+ "invalidJson": "У буфері обміну немає коректного JSON.",
+ "notAnExport": "У буфері обміну немає експорту ролей.",
+ "empty": "Експорт ролей порожній."
+ }
+ },
+ "promoted": "Учасника призначено власником",
+ "roleUpdated": "Роль учасника оновлено",
+ "descriptionUpdated": "Опис учасника оновлено"
+}
diff --git a/apps/web/messages/uk/meta.json b/apps/web/messages/uk/meta.json
new file mode 100644
index 00000000..c470807d
--- /dev/null
+++ b/apps/web/messages/uk/meta.json
@@ -0,0 +1,4 @@
+{
+ "title": "It's a Plan: трекер задач для людей і агентів",
+ "description": "Self-hosted трекер задач з відкритим кодом і вбудованими AI-агентами. Призначайте роботу людям або агентам і керуйте нею через API, вебхуки та MCP."
+}
diff --git a/apps/web/messages/uk/nav.json b/apps/web/messages/uk/nav.json
new file mode 100644
index 00000000..4e202da8
--- /dev/null
+++ b/apps/web/messages/uk/nav.json
@@ -0,0 +1,46 @@
+{
+ "inbox": "Вхідні",
+ "dashboards": "Дашборди",
+ "workItems": "Задачі",
+ "initiatives": "Ініціативи",
+ "cycles": "Цикли",
+ "notes": "Нотатки",
+ "aiTeam": "AI-команда",
+ "chat": "Чат",
+ "chatWithAiTeam": "Чат з AI-командою",
+ "configure": "Налаштувати",
+ "aiAgents": "AI-агенти",
+ "configuration": "Конфігурація",
+ "members": "Учасники",
+ "notifications": "Сповіщення",
+ "notificationPreferences": "Налаштування сповіщень",
+ "projectSettings": "Налаштування проєкту",
+ "backToProject": "Назад до проєкту",
+ "roles": "Ролі",
+ "apiDocs": "Документація API",
+ "api": "API",
+ "mcpServer": "MCP-сервер",
+ "godMode": "Режим адміністратора",
+ "godModeSection": "Режим адміністратора: {section}",
+ "instanceSettings": "Налаштування інстансу",
+ "backToApp": "Назад до застосунку",
+ "integrations": "Інтеграції",
+ "projects": "Проєкти",
+ "noProjects": "Проєктів ще немає",
+ "newProject": "Новий проєкт",
+ "manageProjects": "Керування проєктами",
+ "role": "Роль: {role}",
+ "search": "Пошук або команда…",
+ "searchHint": "Пошук або команда ({key})",
+ "newIssueHint": "Нова задача ({key})",
+ "aiChat": "AI-чат",
+ "sections": "Розділи",
+ "doubleClickToRename": "Подвійний клік, щоб перейменувати",
+ "groups": {
+ "project": "Проєкт",
+ "workflow": "Робочий процес",
+ "automation": "Автоматизація"
+ },
+ "godModeOwnerOnly": "Режим адміністратора доступний лише власнику інстансу.",
+ "project": "Проєкт"
+}
diff --git a/apps/web/messages/uk/newProject.json b/apps/web/messages/uk/newProject.json
new file mode 100644
index 00000000..55f1736b
--- /dev/null
+++ b/apps/web/messages/uk/newProject.json
@@ -0,0 +1,54 @@
+{
+ "name": "Назва",
+ "key": "Ключ (короткий, напр. MKT)",
+ "copyKey": "Ключ",
+ "description": "Опис",
+ "issueTypes": "Типи задач",
+ "typesCreated": "Буде створено {count, plural, one {# тип задачі} few {# типи задач} many {# типів задач} other {# типів задач}}",
+ "defaultType": "Нові задачі типово отримують тип {type}. Типи можна змінити в налаштуваннях.",
+ "presets": {
+ "general": "Загальний",
+ "software": "Розробка",
+ "product": "Продукт",
+ "content": "Контент",
+ "marketing": "Маркетинг",
+ "design": "Дизайн",
+ "sales": "Продажі",
+ "operations": "Операційна робота",
+ "support": "Підтримка",
+ "recruiting": "Рекрутинг"
+ },
+ "copyConfiguration": "Скопіювати конфігурацію",
+ "selectAll": "Вибрати все",
+ "clearAll": "Зняти все",
+ "copyGroups": {
+ "workflow": "Робочий процес",
+ "automation": "Автоматизація",
+ "project": "Проєкт",
+ "views": "Подання",
+ "aiTeam": "AI-команда"
+ },
+ "copyItems": {
+ "states": "Статуси",
+ "issueTypes": "Типи задач",
+ "labels": "Мітки",
+ "customFields": "Власні поля",
+ "views": "Подання",
+ "dashboards": "Дашборди",
+ "actions": "Дії",
+ "configuration": "Конфігурація",
+ "roles": "Ролі",
+ "notificationProviders": "Провайдери сповіщень",
+ "webhooks": "Вебхуки",
+ "integrations": "Інтеграції",
+ "tools": "Інструменти",
+ "skills": "Навички",
+ "agents": "Агенти",
+ "schedules": "Розклади"
+ },
+ "title": "Новий проєкт",
+ "copyTitle": "Копіювати проєкт «{name}»",
+ "create": "Створити проєкт",
+ "copyAction": "Копіювати проєкт",
+ "copyName": "{name} — копія"
+}
diff --git a/apps/web/messages/uk/notes.json b/apps/web/messages/uk/notes.json
new file mode 100644
index 00000000..d193dad7
--- /dev/null
+++ b/apps/web/messages/uk/notes.json
@@ -0,0 +1,57 @@
+{
+ "noAccess": "У вас немає доступу до нотаток.",
+ "allBoards": "Усі дошки",
+ "searchBoards": "Пошук дошок…",
+ "noBoardsFound": "Дошок не знайдено.",
+ "boardAccess": "Доступ до дошки",
+ "boardAccessPlaceholder": "Доступ до дошки…",
+ "nothingFound": "Нічого не знайдено.",
+ "noAccessShort": "Немає доступу",
+ "agent": "Агент",
+ "members": "Учасники",
+ "agents": "Агенти",
+ "newBoard": "Нова дошка",
+ "boardOptions": "Дії дошки",
+ "renameBoard": "Перейменувати дошку",
+ "newBoardDescription": "Вільне полотно для стікерів.",
+ "boardName": "Назва",
+ "boardNamePlaceholder": "Назва дошки",
+ "makePublic": "Зробити публічною",
+ "makePrivate": "Зробити приватною",
+ "privateHint": "Цю дошку бачите лише ви. Пізніше можна поділитися нею з обраними учасниками.",
+ "publicHint": "Цю дошку бачать усі в проєкті.",
+ "createBoard": "Створити дошку",
+ "emptyTitle": "Дошок ще немає",
+ "emptyDescription": "Дошка — це вільне полотно для стікерів.",
+ "backgroundColor": "Колір фону",
+ "fullscreen": "На весь екран",
+ "exitFullscreen": "Вийти з повноекранного режиму",
+ "notePlaceholder": "Напишіть нотатку…",
+ "noteTitlePlaceholder": "Заголовок",
+ "dragNote": "Перетягнути нотатку",
+ "bold": "Жирний",
+ "italic": "Курсив",
+ "checklist": "Список задач",
+ "convertToIssue": "Перетворити на задачу",
+ "deleteNote": "Видалити нотатку",
+ "save": {
+ "unsaved": "Незбережені зміни",
+ "saving": "Збереження…",
+ "saved": "Збережено",
+ "error": "Не вдалося зберегти"
+ },
+ "visibility": {
+ "public": "Публічна",
+ "private": "Приватна",
+ "restricted": "Обмежена"
+ },
+ "visibilityHint": {
+ "public": "Цю дошку бачить кожен учасник проєкту",
+ "private": "Цю дошку бачить лише її автор",
+ "restricted": "Цю дошку бачать її автор і обрані учасники"
+ },
+ "addNote": "Додати нотатку",
+ "accessHint": "Відкрити можуть лише ці люди",
+ "createdBy": "Створив(-ла) {name}",
+ "backgroundColors": "Кольори фону"
+}
diff --git a/apps/web/messages/uk/palette.json b/apps/web/messages/uk/palette.json
new file mode 100644
index 00000000..bacc51e1
--- /dev/null
+++ b/apps/web/messages/uk/palette.json
@@ -0,0 +1,12 @@
+{
+ "placeholder": "Введіть команду або пошуковий запит…",
+ "noResults": "Нічого не знайдено.",
+ "issues": "Задачі",
+ "searching": "Пошук…",
+ "selectAllIssues": "Вибрати всі задачі",
+ "newIssue": "Нова задача",
+ "newProject": "Новий проєкт",
+ "board": "Дошка",
+ "commands": "Команди",
+ "switchProject": "Змінити проєкт"
+}
diff --git a/apps/web/messages/uk/permissions.json b/apps/web/messages/uk/permissions.json
new file mode 100644
index 00000000..c0db03b4
--- /dev/null
+++ b/apps/web/messages/uk/permissions.json
@@ -0,0 +1,46 @@
+{
+ "viewPermissions": "Переглянути права",
+ "none": "Прав не надано",
+ "grantedCount": "Надано {count, plural, one {# право} few {# права} many {# прав} other {# права}}",
+ "resources": {
+ "work_items": "Задачі",
+ "initiatives": "Ініціативи",
+ "cycles": "Цикли",
+ "dashboards": "Дашборди",
+ "views": "Подання задач",
+ "members_invite": "Запрошення",
+ "members_manage": "Учасники",
+ "states": "Статуси",
+ "issue_types": "Типи задач",
+ "labels": "Мітки",
+ "ai_agents": "AI-агенти",
+ "integrations": "Інтеграції",
+ "agent_skills": "Навички агентів",
+ "agent_tools": "Інструменти агентів",
+ "custom_fields": "Власні поля",
+ "workflow_config": "Налаштування робочого процесу",
+ "actions": "Дії",
+ "webhooks": "Вебхуки",
+ "note_boards": "Дошки нотаток",
+ "danger_zone": "Небезпечна зона"
+ },
+ "actions": {
+ "create": "Створення",
+ "edit": "Редагування",
+ "read": "Читання",
+ "delete": "Видалення"
+ },
+ "groups": {
+ "workItems": "Задачі",
+ "dashboards": "Дашборди",
+ "notes": "Нотатки",
+ "ai": "AI",
+ "configuration": "Налаштування",
+ "members": "Учасники",
+ "project": "Проєкт",
+ "other": "Інше"
+ },
+ "resourceColumn": "Ресурс",
+ "allowed": "дозволено",
+ "notAllowed": "не дозволено"
+}
diff --git a/apps/web/messages/uk/projects.json b/apps/web/messages/uk/projects.json
new file mode 100644
index 00000000..d80f6c90
--- /dev/null
+++ b/apps/web/messages/uk/projects.json
@@ -0,0 +1,31 @@
+{
+ "label": "Керування проєктами",
+ "title": "Керування проєктами",
+ "description": "Усі проєкти, до яких ви належите, і ваші права в кожному. Скопіюйте проєкт, щоб почати новий з його налаштуваннями. Власники можуть видалити проєкт, учасники — вийти з нього. Видалення назавжди прибирає проєкт і все, що в ньому.",
+ "empty": "Ви ще не є учасником жодного проєкту.",
+ "columns": {
+ "project": "Проєкт",
+ "role": "Роль",
+ "permissions": "Права",
+ "actions": "Дії"
+ },
+ "yourPermissions": "Ваші права",
+ "copyAction": "Скопіювати проєкт",
+ "deleteAction": "Видалити проєкт",
+ "leaveAction": "Вийти з проєкту",
+ "roles": {
+ "owner": "Власник",
+ "member": "Учасник"
+ },
+ "deleteDialog": {
+ "title": "Видалити {name}?",
+ "confirm": "Видалити назавжди",
+ "description": "Це назавжди видалить <strong>{name}</strong> і все, що в ньому: задачі, коментарі, вкладення й налаштування. Дію не можна скасувати.",
+ "typeToConfirm": "Введіть <code>{key}</code> для підтвердження."
+ },
+ "leaveDialog": {
+ "title": "Вийти з {name}?",
+ "confirm": "Вийти з проєкту",
+ "description": "Ви втратите доступ до <strong>{name}</strong> та його задач. Щоб приєднатися знову, потрібне нове запрошення від власника."
+ }
+}
diff --git a/apps/web/messages/uk/sections.json b/apps/web/messages/uk/sections.json
new file mode 100644
index 00000000..b350797f
--- /dev/null
+++ b/apps/web/messages/uk/sections.json
@@ -0,0 +1,109 @@
+{
+ "account": {
+ "profile": "Профіль",
+ "preferences": "Налаштування",
+ "accounts": "Акаунти",
+ "security": "Безпека",
+ "api-keys": "API-ключі"
+ },
+ "godGroups": {
+ "management": "Керування",
+ "instance": "Інстанс"
+ },
+ "god": {
+ "users": {
+ "label": "Користувачі",
+ "description": "Усі акаунти цього інстансу: глобальна роль, чи підтверджена адреса, і до яких проєктів має доступ кожен користувач."
+ },
+ "projects": {
+ "label": "Проєкти",
+ "description": "Усі проєкти цього інстансу: що в кожному, коли була остання активність і хто має доступ."
+ },
+ "authentication": {
+ "label": "Автентифікація",
+ "description": "Хто може реєструватися в цьому інстансі, як підтверджуються акаунти і через яких провайдерів люди входять."
+ },
+ "hotkeys": {
+ "label": "Клавіатурні скорочення",
+ "description": "Клавіша, призначена кожній команді для всіх у цьому інстансі. Кожен може перепризначити скорочення для свого акаунта в налаштуваннях."
+ },
+ "storage": {
+ "label": "Сховище",
+ "description": "Скільки можна завантажувати: розмір одного файлу, дозволені типи вкладень і обсяг сховища на проєкт."
+ },
+ "telegram": {
+ "label": "Telegram",
+ "description": "Бот, до якого люди підключають свій Telegram, і бот, що доставляє Telegram-сповіщення для проєктів без власного бота."
+ },
+ "email": {
+ "label": "Поштовий провайдер",
+ "description": "Провайдер, через який інстанс надсилає пошту: скидання пароля, підтвердження адреси та посилання для входу."
+ },
+ "auth-provider": {
+ "label": "Провайдер входу",
+ "description": "Зовнішні акаунти, через які можна входити."
+ }
+ },
+ "settings": {
+ "general": {
+ "label": "Загальні",
+ "description": "Назва проєкту, опис і розділи, які він показує."
+ },
+ "notifications": {
+ "label": "Провайдери сповіщень",
+ "description": "Дані пошти (SMTP чи Resend) і Telegram-бота, через які проєкт доставляє сповіщення."
+ },
+ "states": {
+ "label": "Статуси",
+ "description": "Статуси робочого процесу, через які проходять задачі; кожен показано як колонку."
+ },
+ "issue-types": {
+ "label": "Типи задач",
+ "description": "Види задач, які може містити проєкт, кожен зі своїми полями."
+ },
+ "labels": {
+ "label": "Мітки",
+ "description": "Теги для впорядкування та фільтрації задач у проєкті."
+ },
+ "custom-fields": {
+ "label": "Власні поля",
+ "description": "Додаткові поля на задачах — загальні або прив'язані до типу задачі."
+ },
+ "configuration": {
+ "label": "Конфігурація",
+ "description": "Як підзадачі закриваються разом з батьківською і коли застарілі задачі архівуються."
+ },
+ "actions": {
+ "label": "Дії",
+ "description": "Кнопки на задачі, які встановлюють поля одним кліком."
+ },
+ "schedules": {
+ "label": "Розклади",
+ "description": "Запуск задач агентів за регулярним розкладом."
+ },
+ "webhooks": {
+ "label": "Вебхуки",
+ "description": "Надсилання подій проєкту на зовнішні URL, підписані окремим секретом кожного вебхука."
+ },
+ "github": {
+ "label": "GitHub",
+ "description": "Автоматичне закриття задач, коли їхні пул-реквести змержено в GitHub."
+ },
+ "ai-agents": {
+ "label": "Агенти",
+ "description": "Бот-користувачі, яким можна делегувати задачі."
+ },
+ "integrations": {
+ "label": "Інтеграції",
+ "description": "Облікові дані, якими агенти дістаються до AI-провайдерів та інструментів."
+ },
+ "agent-skills": {
+ "label": "Навички",
+ "description": "Багаторазові інструкції, які внутрішні агенти завантажують за потреби."
+ },
+ "agent-tools": {
+ "label": "Інструменти",
+ "description": "Інструменти, які можуть викликати агенти; кожен прив'язаний до облікових даних інтеграції."
+ }
+ }
+}
diff --git a/apps/web/messages/uk/settings.json b/apps/web/messages/uk/settings.json
new file mode 100644
index 00000000..5a9dafce
--- /dev/null
+++ b/apps/web/messages/uk/settings.json
@@ -0,0 +1,594 @@
+{
+ "schedules": {
+ "newTitle": "Новий розклад",
+ "editTitle": "Редагувати розклад",
+ "create": "Створити розклад",
+ "creating": "Створення…",
+ "save": "Зберегти розклад",
+ "dialogDescription": "Виберіть агента, опишіть задачу і вкажіть, коли її запускати.",
+ "namePlaceholder": "Щоденний огляд задач",
+ "agent": "Агент",
+ "selectAgent": "Виберіть агента",
+ "task": "Задача",
+ "taskPlaceholder": "Перегляньте відкриті задачі та оновіть те, що потребує уваги.",
+ "taskHint": "Агент отримує цю задачу на кожному запуску.",
+ "scheduleUtc": "Розклад (UTC)",
+ "schedule": "Розклад",
+ "nextRun": "Наступний запуск",
+ "lastRun": "Останній запуск",
+ "showPresets": "Показати готові розклади",
+ "inputPlaceholder": "Every weekday at 9:00 AM або 0 9 * * 1-5",
+ "runs": "Запуск: {description} UTC",
+ "cronLabel": "Cron:",
+ "runsSuffix": "{description} UTC",
+ "statusActive": "Активний",
+ "statusPaused": "На паузі",
+ "viewTask": "Переглянути задачу",
+ "noRunsShort": "Запусків ще немає",
+ "pause": "Призупинити розклад",
+ "resume": "Відновити розклад",
+ "runHistory": "Історія запусків",
+ "moreActions": "Інші дії",
+ "runNow": "Запустити зараз",
+ "edit": "Редагувати розклад",
+ "delete": "Видалити розклад",
+ "runStatus": {
+ "success": "Успішно",
+ "failed": "Збій",
+ "pending": "В очікуванні"
+ },
+ "noRuns": "Запусків ще немає.",
+ "error": "Помилка",
+ "result": "Результат",
+ "noOutput": "Без виводу",
+ "loadFailed": "Не вдалося завантажити розклади",
+ "loadFailedHint": "Перевірте з'єднання і спробуйте ще раз.",
+ "tryAgain": "Спробувати ще раз",
+ "noAgents": "Немає агентів для розкладу",
+ "noAgentsHint": "Розклад запускає задачу для одного з ваших внутрішніх агентів.",
+ "createAgent": "Створити агента",
+ "empty": "Розкладів ще немає",
+ "emptyHint": "Виберіть агента, задачу і як часто вона запускається.",
+ "deleteMessage": "Розклад <v>{name}</v> та його історію запусків буде видалено. Цю дію не можна скасувати."
+ },
+ "integrations": {
+ "add": "Додати облікові дані",
+ "edit": "Редагувати облікові дані",
+ "delete": "Видалити облікові дані",
+ "back": "Назад до інтеграцій",
+ "label": "Підпис (необов'язково)",
+ "labelPlaceholder": "напр. Командний акаунт",
+ "labelHint": "Допомагає розрізняти облікові дані однієї інтеграції. Секрети зберігаються зашифрованими.",
+ "noFields": "Полів немає",
+ "search": "Пошук інтеграцій",
+ "noMatches": "Немає інтеграцій за запитом «{query}».",
+ "empty": "Облікових даних ще немає",
+ "emptyHint": "Без них агенти не зможуть користуватися AI-провайдером чи інструментом.",
+ "deleteMessage": "Видалити облікові дані {integration}? Агенти та інструменти, що їх використовують, перестануть працювати, доки ви не додасте нові.",
+ "groups": {
+ "llm": {
+ "title": "AI-провайдери",
+ "hint": "Модель, на якій працює внутрішній агент"
+ },
+ "tool": {
+ "title": "Інструменти",
+ "hint": "Інтеграції, які агент може викликати як інструменти"
+ }
+ },
+ "columns": {
+ "integration": "Інтеграція",
+ "credentials": "Облікові дані"
+ }
+ },
+ "agents": {
+ "newAgent": "Новий агент",
+ "create": "Створити агента",
+ "save": "Зберегти агента",
+ "delete": "Видалити агента",
+ "edit": "Редагувати агента",
+ "empty": "Агентів ще немає",
+ "emptyHint": "Агент працює на вбудованому рантаймі або через API.",
+ "agent": "Агент",
+ "sheetSubtitle": "Бот-користувач, якому можна делегувати задачі",
+ "agentSettings": "Налаштування агента",
+ "basics": "Основне",
+ "kind": "Тип",
+ "kindLabel": {
+ "external": "Зовнішній",
+ "internal": "Внутрішній"
+ },
+ "kindHint": {
+ "external": "Керується через API",
+ "internal": "Працює на вбудованому рантаймі"
+ },
+ "namePlaceholder": "напр. Бот тріажу",
+ "username": "Ім'я користувача",
+ "usernamePlaceholder": "напр. triage-bot",
+ "usernameHint": "Літери, цифри, крапки, дефіси та підкреслення. До 64 символів.",
+ "access": "Доступ",
+ "accessHint": "Права, під якими діє агент",
+ "role": "Роль",
+ "chooseRole": "Виберіть роль",
+ "defaultRole": "Роль за замовчуванням",
+ "roleHintExternal": "API-запити агента обмежені тим, що дозволяє ця роль.",
+ "roleHintInternal": "Агент може робити лише те, що дозволяють і роль, і його дії. Дія, заборонена роллю, впаде під час виконання.",
+ "model": "Модель",
+ "modelHint": "Провайдер, модель і системний промпт",
+ "credential": "Облікові дані",
+ "chooseCredential": "Виберіть облікові дані",
+ "noCredential": "Спочатку додайте ключ AI-провайдера",
+ "noCredentialHint": "Щоб вибрати модель, агенту потрібен ключ провайдера.",
+ "addKey": "Додати ключ в Інтеграціях",
+ "chooseModel": "Виберіть модель",
+ "searchModel": "Пошук або введіть id моделі",
+ "loadingModels": "Завантаження моделей…",
+ "noModel": "Модель не задано",
+ "instructions": "Інструкції",
+ "instructionsPlaceholder": "Як має поводитися агент і яких правил дотримуватися",
+ "expandInstructions": "Розгорнути редактор інструкцій",
+ "expandEditor": "Розгорнути редактор",
+ "triggers": "Тригери",
+ "triggersHint": "Коли агент запускається сам",
+ "onMention": "Реагувати на згадки",
+ "onMentionHint": "Запускатися, коли згадали через @ у коментарі.",
+ "onDelegation": "Реагувати на делегування",
+ "onDelegationHint": "Запускатися, коли призначений делегатом задачі.",
+ "actions": "Дії",
+ "actionsHint": "Що агент може робити в проєкті",
+ "noActions": "Дій немає.",
+ "clearAll": "Зняти все",
+ "selectAll": "Вибрати все",
+ "skills": "Навички",
+ "skillsHint": "Багаторазові інструкції, які агент може завантажити",
+ "noSkills": "У бібліотеці ще немає навичок. Додайте на сторінці «Навички».",
+ "searchSkills": "Пошук навичок",
+ "noDescription": "Без опису",
+ "tools": "Інструменти",
+ "toolsHint": "Зовнішні інтеграції, які агент може викликати",
+ "noTools": "Інструментів ще не налаштовано. Додайте на сторінці «Інструменти».",
+ "searchTools": "Пошук інструментів",
+ "advanced": "Додатково",
+ "advancedHint": "Семплінг, ліміт кроків і пам'ять",
+ "temperature": "Температура",
+ "optional": "Необов'язково",
+ "maxSteps": "Макс. кроків",
+ "memory": "Пам'ять розмови",
+ "memoryHint": "Пам'ятати останні повідомлення в межах гілки.",
+ "memoryCount": "Пам'ятати останні N повідомлень",
+ "memoryCountPlaceholder": "напр. 20",
+ "keyWarning": "Скопіюйте ключ зараз. З міркувань безпеки він показується один раз і його не можна отримати пізніше.",
+ "copyKey": "Скопіювати ключ",
+ "dismiss": "Закрити",
+ "regenerateTitle": "Перегенерувати API-ключ",
+ "regenerateConfirm": "Перегенерувати ключ",
+ "keyRegenerated": "Ключ перегенеровано",
+ "apiKey": "API-ключ",
+ "apiKeyValue": "API-ключ {start}…",
+ "runHistory": "Історія запусків",
+ "noRuns": "Запусків ще немає. Вони з'являться тут, коли агента згадають у коментарі або делегують йому задачу.",
+ "loadMore": "Завантажити ще 25",
+ "endOfHistory": "Кінець історії",
+ "manualTask": "Ручна задача",
+ "scheduledTask": "Задача за розкладом",
+ "failed": "Збій",
+ "task": "Задача",
+ "error": "Помилка",
+ "queue": "Черга",
+ "testChat": "Тестовий чат",
+ "moreActions": "Інші дії",
+ "createdOn": "Створено {date}",
+ "runsSubtitle": "@{username} · запуски за згадками і делегуванням",
+ "regenerateMessage": "Для <v>{name}</v> буде видано новий ключ, а поточний одразу перестане працювати. Кожне з'єднання, що ним користується, зламається, доки його не оновлять новим ключем.",
+ "deleteMessage": "<v>{name}</v> та його API-ключ буде видалено, а сам агент прибереться з усіх задач, де він був виконавцем чи делегатом. Цю дію не можна скасувати.",
+ "actionCount": "{count, plural, one {# дія} few {# дії} many {# дій} other {# дії}}",
+ "toolCount": "{count, plural, one {# інструмент} few {# інструменти} many {# інструментів} other {# інструмента}}",
+ "skillCount": "{count, plural, one {# навичка} few {# навички} many {# навичок} other {# навички}}",
+ "triggersNone": "Немає",
+ "triggerMention": "Згадка",
+ "triggerDelegation": "Делегування",
+ "noMatch": "Нічого не знайдено за «{query}».",
+ "useCustomModel": "Використати «{query}»",
+ "readOnlyAlwaysOn": "Доступ лише на читання завжди увімкнений, його не можна вимкнути.",
+ "instructionsLabel": "Інструкції",
+ "done": "Готово",
+ "columns": {
+ "triggers": "Тригери",
+ "configuration": "Конфігурація"
+ },
+ "created": "Агента @{username} створено",
+ "saved": "Агента @{username} збережено"
+ },
+ "skills": {
+ "newSkill": "Нова навичка",
+ "create": "Створити навичку",
+ "delete": "Видалити навичку",
+ "edit": "Редагувати навичку",
+ "empty": "Навичок ще немає",
+ "emptyHint": "Напишіть markdown, завантажте файл або імпортуйте з GitHub.",
+ "name": "Назва (необов'язково)",
+ "namePlaceholder": "За замовчуванням — назва з frontmatter у SKILL.md",
+ "descriptionPlaceholder": "Показується агенту, щоб він вирішив, коли завантажити цю навичку",
+ "noDescription": "Без опису",
+ "unsaved": "Незбережені зміни",
+ "addReference": "Додати посилання",
+ "source": {
+ "inline": "Вписана",
+ "upload": "Завантажена",
+ "github": "GitHub"
+ },
+ "tabInline": "Написати markdown",
+ "tabUpload": "Завантажити файл",
+ "tabGithub": "Імпорт з GitHub",
+ "skillFile": "Файл SKILL.md",
+ "loaded": "Завантажено {file}",
+ "trustWarning": "Імпортуйте лише навички, яким довіряєте",
+ "trustWarning1": "Навичка стає інструкціями, яких дотримуються ваші агенти. Спершу перегляньте джерело.",
+ "trustWarning2": "Імпортуються лише SKILL.md та markdown-файли, на які він посилається. Скрипти пропускаються.",
+ "githubUrl": "GitHub URL",
+ "githubUrlPlaceholder": "https://github.com/owner/repo або тека навички",
+ "githubUrlHint": "Репозиторій, тека або SKILL.md.",
+ "findSkills": "Знайти навички",
+ "importTitle": "Імпорт навичок з GitHub",
+ "foundCount": "{count, plural, one {Знайдено # навичку. Виберіть, що імпортувати.} few {Знайдено # навички. Виберіть, що імпортувати.} many {Знайдено # навичок. Виберіть, що імпортувати.} other {Знайдено # навички. Виберіть, що імпортувати.}}",
+ "matchCount": "{shown} з {total, plural, one {# навички} few {# навичок} many {# навичок} other {# навички}} збігається",
+ "selectAll": "Вибрати все",
+ "searchPlaceholder": "Пошук за назвою або описом",
+ "noMatches": "Немає навичок за запитом «{query}».",
+ "importCount": "{count, plural, =0 {Імпортувати навички} one {Імпортувати # навичку} few {Імпортувати # навички} many {Імпортувати # навичок} other {Імпортувати # навички}}",
+ "files": "Файли",
+ "skill": "Навичка",
+ "description": "Опис",
+ "referenceCount": "{count, plural, one {# посилання} few {# посилання} many {# посилань} other {# посилання}}"
+ },
+ "tools": {
+ "add": "Додати інструмент",
+ "delete": "Видалити інструмент",
+ "back": "Назад до інструментів",
+ "tool": "Інструмент",
+ "scopes": "Дозволи",
+ "noScopes": "Без дозволів",
+ "empty": "Інструментів ще немає",
+ "emptyHint": "Налаштуйте інструмент один раз — і вмикайте його будь-якому агенту.",
+ "search": "Пошук інструментів",
+ "noMatches": "Немає інструментів за запитом «{query}».",
+ "scopesLabel": "Потрібні дозволи токена",
+ "credential": "Облікові дані",
+ "chooseCredential": "Виберіть облікові дані",
+ "noCredential": "Облікових даних {integration} ще немає. Спершу додайте їх на сторінці «Інтеграції».",
+ "deleteMessage": "Прибрати {tool}? Агенти, що ним користуються, втратять до нього доступ.",
+ "scopesUpper": "Скоупи"
+ },
+ "notifications": {
+ "title": "Сповіщення",
+ "description": "Виберіть, про які події ви дізнаєтесь і куди.",
+ "email": "Пошта",
+ "telegram": "Telegram",
+ "events": {
+ "assigned": "Призначено на задачу",
+ "mentioned": "Згадали в коментарі",
+ "commented": "Новий коментар до задачі, за якою ви стежите",
+ "state_changed": "Змінився статус задачі, за якою ви стежите"
+ },
+ "eventsTitle": "Події",
+ "emailProvider": "Поштовий провайдер",
+ "emailProviderHint": "Надсилайте через системний провайдер або власний. Облікові дані зберігаються зашифрованими.",
+ "systemAvailable": "Сповіщення надсилаються через провайдер, налаштований для цього інстансу. Облікові дані тут не потрібні.",
+ "systemUnavailable": "Провайдер інстансу недоступний. Попросіть адміністратора налаштувати його і поділитися з проєктами — або налаштуйте провайдер для цього проєкту.",
+ "host": "Хост",
+ "port": "Порт",
+ "encryption": "Шифрування",
+ "encryptionOptions": {
+ "none": "Немає",
+ "ssl": "SSL",
+ "tls": "TLS"
+ },
+ "username": "Ім'я користувача",
+ "password": "Пароль",
+ "passwordPlaceholder": "Пароль SMTP",
+ "timeout": "Таймаут (с)",
+ "optional": "Необов'язково",
+ "apiKey": "API-ключ",
+ "telegramBot": "Telegram-бот",
+ "telegramBotHint": "Бот, який доставляє сповіщення. Учасники обирають власний чат у своїх налаштуваннях. Токен зберігається зашифрованим.",
+ "botToken": "API-токен бота (необов'язково)",
+ "telegramAccount": "Акаунт Telegram",
+ "telegramAccountHint": "Telegram-сповіщення йдуть на акаунт, підключений до вашого профілю, для всіх проєктів, де ви є.",
+ "noTelegramAccount": "Акаунт Telegram не підключено",
+ "emailSaved": "Поштового провайдера збережено",
+ "telegramSaved": "Telegram-провайдера збережено",
+ "preferencesSaved": "Налаштування сповіщень збережено"
+ },
+ "transfer": {
+ "actions": {
+ "create": "Новий",
+ "update": "Оновити колір",
+ "unchanged": "Без змін"
+ },
+ "copyFailed": "Не вдалося скопіювати в буфер обміну.",
+ "readFailed": "Не вдалося прочитати буфер обміну.",
+ "errors": {
+ "invalidJson": "У буфері обміну немає коректного JSON.",
+ "wrongPayload": "У буфері обміну немає потрібного експорту.",
+ "empty": "Експорт порожній."
+ }
+ },
+ "general": {
+ "saved": "Проєкт оновлено",
+ "project": "Проєкт",
+ "projectHint": "Ключ додається до кожної задачі і не змінюється.",
+ "key": "Ключ",
+ "features": "Розділи",
+ "featuresHint": "Розділи, які показує цей проєкт. Вимкнений розділ ховається, а його вміст залишається.",
+ "featureHints": {
+ "dashboards": "Графіки та метрики на збережених дашбордах.",
+ "initiatives": "Групи задач, які ведуться як одна робота.",
+ "cycles": "Обмежені в часі періоди роботи, у які плануються задачі.",
+ "notes": "Вільні дошки зі стікерами.",
+ "subtasks": "Задачі, розбиті на підзадачі під батьківською.",
+ "checklists": "Списки кроків усередині задачі.",
+ "issueStats": "Скільки часу задача пробула в кожному статусі."
+ },
+ "featureOn": "Розділ «{feature}» увімкнено",
+ "featureOff": "Розділ «{feature}» вимкнено"
+ },
+ "configuration": {
+ "saved": "Зміни збережено",
+ "subtasks": "Підзадачі",
+ "subtasksHint": "Синхронізується лише закриття. Переміщення задачі між відкритими статусами нічого не змінює.",
+ "completeParent": "Закривати батьківську задачу, коли підзадачі виконано",
+ "completeParentHint": "Батьківська задача переходить у статус, у якому закрилася остання підзадача.",
+ "closeSubtasks": "Закривати підзадачі, коли закривається батьківська",
+ "closeSubtasksHint": "Відкриті підзадачі переходять у статус, у якому закрилася батьківська.",
+ "archive": "Архів",
+ "archiveHint": "Архівувати застояні закриті задачі, щоб дошка залишалася чистою.",
+ "completedIssues": "Виконані задачі",
+ "canceledIssues": "Скасовані задачі",
+ "staleHint": "Архівувати після такої кількості днів без активності.",
+ "days": "днів"
+ },
+ "states": {
+ "addState": "Додати статус групи «{type}»",
+ "emptyTitle": "Немає статусів у групі «{type}»",
+ "emptyHint": "Додайте статус робочого процесу для цієї групи.",
+ "newState": "Новий статус",
+ "namePlaceholder": "Назва статусу",
+ "dragToReorder": "Перетягніть, щоб змінити порядок",
+ "edit": "Редагувати статус",
+ "delete": "Видалити статус",
+ "deleteTitle": "Видалити статус «{name}»",
+ "deleteConfirm": "Видалити статус",
+ "moveAndDelete": "Перенести і видалити статус",
+ "deleteNoIssues": "У цьому статусі немає задач. Його буде видалено.",
+ "deleteHasIssues": "У цьому статусі {count, plural, one {# задача} few {# задачі} many {# задач} other {# задач}}. Виберіть, що з ними зробити.",
+ "moveIssues": "Перенести задачі в інший статус",
+ "selectState": "Виберіть статус",
+ "stateOption": "{name} ({type})",
+ "deleteIssues": "Видалити задачі назавжди",
+ "menu": "Імпорт і експорт статусів",
+ "copy": "Скопіювати статуси",
+ "paste": "Вставити статуси",
+ "nothingToCopy": "Немає статусів для копіювання.",
+ "copied": "{count, plural, one {Скопійовано # статус.} few {Скопійовано # статуси.} many {Скопійовано # статусів.} other {Скопійовано # статусів.}}",
+ "parseFailed": "Не вдалося прочитати статуси з буфера обміну.",
+ "importTitle": "Застосувати статуси з буфера обміну",
+ "importSummary": "Буде застосовано {count, plural, one {# статус} few {# статуси} many {# статусів} other {# статусів}}. Статус, що збігся, залишає свою групу; оновлюється лише колір.",
+ "importApply": "{count, plural, one {Застосувати # статус} few {Застосувати # статуси} many {Застосувати # статусів} other {Застосувати # статусів}}",
+ "imported": "Застосовано статуси: {created} створено, {updated} оновлено."
+ },
+ "issueTypes": {
+ "add": "Додати тип",
+ "namePlaceholder": "Назва типу",
+ "default": "Типовий",
+ "emptyTitle": "Типів задач ще немає",
+ "emptyHint": "Додайте типи задач, які може містити цей проєкт, кожен зі своїми полями.",
+ "columns": {
+ "type": "Тип",
+ "issues": "Задачі"
+ },
+ "issueCount": "{count, plural, =0 {Немає задач} one {# задача} few {# задачі} many {# задач} other {# задач}}",
+ "edit": "Редагувати тип задачі",
+ "delete": "Видалити тип задачі",
+ "deleteTitle": "Видалити тип «{name}»",
+ "deleteConfirm": "Видалити тип",
+ "deleteMessage": "{count, plural, =0 {Жодна задача не використовує цей тип.} one {# задача використовує цей тип і залишиться без типу.} few {# задачі використовують цей тип і залишаться без типу.} many {# задач використовують цей тип і залишаться без типу.} other {# задач використовують цей тип і залишаться без типу.}} Власні поля, специфічні для цього типу, теж буде видалено. Це не можна скасувати.",
+ "menu": "Імпорт і експорт типів задач",
+ "copy": "Скопіювати типи задач",
+ "paste": "Вставити типи задач",
+ "nothingToCopy": "Немає типів задач для копіювання.",
+ "copied": "{count, plural, one {Скопійовано # тип задачі.} few {Скопійовано # типи задач.} many {Скопійовано # типів задач.} other {Скопійовано # типів задач.}}",
+ "parseFailed": "Не вдалося прочитати типи задач з буфера обміну.",
+ "importTitle": "Застосувати типи задач з буфера обміну",
+ "importSummary": "Буде застосовано {count, plural, one {# тип задачі} few {# типи задач} many {# типів задач} other {# типів задач}}. У типу, що збігся, оновлюється лише колір.",
+ "importApply": "{count, plural, one {Застосувати # тип} few {Застосувати # типи} many {Застосувати # типів} other {Застосувати # типів}}",
+ "imported": "Застосовано типи задач: {created} створено, {updated} оновлено."
+ },
+ "labels": {
+ "add": "Додати",
+ "newLabel": "Нова мітка",
+ "newGroup": "Нова група",
+ "namePlaceholder": "Назва мітки",
+ "groupNamePlaceholder": "Назва групи",
+ "ungrouped": "Без групи",
+ "groups": "Групи",
+ "labels": "Мітки",
+ "noLabels": "Немає міток",
+ "dropHere": "Перетягніть сюди",
+ "addLabelTo": "Додати мітку до «{name}»",
+ "addLabel": "Додати мітку",
+ "editGroup": "Редагувати групу",
+ "deleteGroup": "Видалити групу",
+ "editLabel": "Редагувати мітку",
+ "deleteLabel": "Видалити мітку",
+ "dragToGroup": "Перетягніть у групу",
+ "dragLabel": "Перетягнути мітку",
+ "issueCount": "{count, plural, one {# задача} few {# задачі} many {# задач} other {# задач}}",
+ "deleteLabelTitle": "Видалити мітку «{name}»",
+ "deleteLabelMessage": "{count, plural, =0 {Жодна задача не використовує цю мітку.} one {Ця мітка стоїть на # задачі і буде з неї знята.} few {Ця мітка стоїть на # задачах і буде з них знята.} many {Ця мітка стоїть на # задачах і буде з них знята.} other {Ця мітка стоїть на # задачах і буде з них знята.}} Це не можна скасувати.",
+ "deleteGroupTitle": "Видалити групу «{name}»",
+ "deleteGroupMessage": "{count, plural, =0 {У цій групі немає міток.} one {# мітка залишиться без групи, але не зникне.} few {# мітки залишаться без групи, але не зникнуть.} many {# міток залишаться без групи, але не зникнуть.} other {# міток залишаться без групи, але не зникнуть.}} Це не можна скасувати.",
+ "menu": "Імпорт і експорт міток",
+ "copy": "Скопіювати мітки",
+ "paste": "Вставити мітки",
+ "nothingToCopy": "Немає міток для копіювання.",
+ "copied": "{count, plural, one {Скопійовано # мітку.} few {Скопійовано # мітки.} many {Скопійовано # міток.} other {Скопійовано # міток.}}",
+ "parseFailed": "Не вдалося прочитати мітки з буфера обміну.",
+ "importTitle": "Застосувати мітки з буфера обміну",
+ "importSummary": "Буде застосовано {count, plural, one {# елемент} few {# елементи} many {# елементів} other {# елементів}}. Мітка, що збіглася, залишає свою групу; оновлюється лише колір.",
+ "importApply": "{count, plural, one {Застосувати # елемент} few {Застосувати # елементи} many {Застосувати # елементів} other {Застосувати # елементів}}",
+ "imported": "Застосовано мітки: {created} створено, {updated} оновлено.",
+ "dropToUngroup": "Перетягніть мітку сюди, щоб прибрати її з групи",
+ "dropToGroup": "Перетягніть мітку сюди, щоб додати її до «{name}»"
+ },
+ "customFields": {
+ "fieldTypes": {
+ "text": "текст",
+ "markdown": "markdown",
+ "url": "посилання",
+ "number": "число",
+ "boolean": "прапорець",
+ "date": "дата",
+ "select": "вибір",
+ "multi_select": "мультивибір"
+ },
+ "global": "Загальні (усі типи)",
+ "globalShort": "Загальне",
+ "addField": "Додати поле",
+ "addFieldTo": "Додати поле до «{group}»",
+ "noFields": "Полів ще немає.",
+ "editField": "Редагувати поле",
+ "deleteField": "Видалити поле",
+ "deleteTitle": "Видалити поле «{name}»",
+ "deleteMessage": "Поле і всі його значення в задачах буде видалено. Це не можна скасувати.",
+ "namePlaceholder": "Назва поля",
+ "optionsPlaceholder": "Варіанти: Низький, Середній, Високий",
+ "type": "Тип",
+ "mainInfo": "Основне",
+ "mainInfoTooltip": "Показувати в тілі задачі, а не у властивостях",
+ "mainInfoMeta": "основне",
+ "menu": "Імпорт і експорт власних полів",
+ "copy": "Скопіювати власні поля",
+ "paste": "Вставити власні поля",
+ "nothingToCopy": "Немає власних полів для копіювання.",
+ "copied": "{count, plural, one {Скопійовано # поле.} few {Скопійовано # поля.} many {Скопійовано # полів.} other {Скопійовано # полів.}}",
+ "parseFailed": "Не вдалося прочитати власні поля з буфера обміну.",
+ "copyTitle": "Скопіювати власні поля",
+ "copyQuestion": "У цьому проєкті {scoped, plural, one {# поле привʼязане} few {# поля привʼязані} many {# полів привʼязані} other {# полів привʼязані}} до типу задачі. Скопіювати їх теж чи лише {global, plural, one {# загальне поле} few {# загальні поля} many {# загальних полів} other {# загальних полів}}?",
+ "copyGlobalOnly": "Лише загальні",
+ "copyIncludeScoped": "Разом із привʼязаними",
+ "importTitle": "Застосувати власні поля з буфера обміну",
+ "importSummary": "Буде додано {count, plural, one {# поле} few {# поля} many {# полів} other {# полів}}.",
+ "importSummaryWithTypes": "Буде додано {count, plural, one {# поле} few {# поля} many {# полів} other {# полів}} і створено {types, plural, one {# новий тип задачі} few {# нові типи задач} many {# нових типів задач} other {# нових типів задач}}: {names}.",
+ "importApply": "{count, plural, one {Застосувати # поле} few {Застосувати # поля} many {Застосувати # полів} other {Застосувати # полів}}",
+ "actionNew": "Нове",
+ "actionExists": "Існує",
+ "imported": "Застосовано власні поля: {created} створено.",
+ "importedWithTypes": "Застосовано власні поля: {created} створено, {types} типів задач додано."
+ },
+ "actions": {
+ "new": "Нова дія",
+ "emptyTitle": "Дій ще немає",
+ "emptyHint": "Виберіть, на яких задачах показувати дію, і що вона встановлює.",
+ "columns": {
+ "action": "Дія",
+ "thenSet": "Встановлює"
+ },
+ "when": "Коли",
+ "alwaysAvailable": "Доступна завжди",
+ "noChanges": "Без змін",
+ "edit": "Редагувати дію",
+ "duplicate": "Дублювати дію",
+ "delete": "Видалити дію",
+ "copySuffix": "{name} — копія",
+ "deleteTitle": "Видалити дію «{name}»",
+ "deleteMessage": "Дію буде прибрано з усіх задач. Це не можна скасувати.",
+ "dialogNew": "Нова дія",
+ "dialogEdit": "Редагувати дію",
+ "dialogHint": "Виберіть іконку, назвіть дію і вкажіть, до яких задач вона застосовується та що змінює.",
+ "namePlaceholder": "Назва дії (напр. Погодити)",
+ "availableWhen": "Доступна коли",
+ "noConditions": "Умов немає. Доступна завжди.",
+ "thenSet": "Встановити",
+ "create": "Створити дію",
+ "creating": "Створення…",
+ "save": "Зберегти дію",
+ "addField": "Додати поле",
+ "removeField": "Прибрати поле",
+ "icon": "Іконка дії",
+ "searchIcons": "Пошук іконок",
+ "noIcons": "Іконок не знайдено",
+ "setDate": "Вибрати дату"
+ },
+ "webhooks": {
+ "new": "Новий вебхук",
+ "emptyTitle": "Вебхуків ще немає",
+ "emptyHint": "Вкажіть URL і виберіть, які події надсилати.",
+ "columns": {
+ "endpoint": "Ендпоїнт",
+ "events": "Події"
+ },
+ "active": "Активний",
+ "disabled": "Вимкнений",
+ "hideSecret": "Сховати секрет",
+ "revealSecret": "Показати секрет",
+ "copySecret": "Скопіювати секрет",
+ "deliveryHistory": "Історія доставок",
+ "moreActions": "Ще дії",
+ "edit": "Редагувати вебхук",
+ "delete": "Видалити вебхук",
+ "deleteTitle": "Видалити вебхук",
+ "deleteMessage": "Доставки на <v>{url}</v> припиняться. Це не можна скасувати.",
+ "dialogNew": "Новий вебхук",
+ "dialogEdit": "Редагувати вебхук",
+ "dialogHint": "Вкажіть URL і виберіть, які події проєкту надсилати.",
+ "payloadUrl": "URL для запитів",
+ "events": "Події",
+ "create": "Створити вебхук",
+ "creating": "Створення…",
+ "save": "Зберегти вебхук",
+ "noDeliveries": "Доставок ще не було.",
+ "loadMore": "Завантажити ще 25",
+ "endOfHistory": "Кінець історії",
+ "queued": "У черзі",
+ "attempts": "·{count} спроб",
+ "sent": "Надіслано",
+ "response": "Відповідь",
+ "responseWithStatus": "Відповідь · HTTP {status}",
+ "noResponse": "(без відповіді)",
+ "statuses": {
+ "success": "Успіх",
+ "failed": "Помилка",
+ "pending": "Очікує"
+ }
+ },
+ "github": {
+ "enable": "Увімкнути інтеграцію з GitHub",
+ "enableHint": "Pull request, який згадує задачу, як-от «Closes KEY-123», привʼязується до неї.",
+ "connection": "Підключення",
+ "connectionHint": "Підключіть репозиторій GitHub до цього проєкту.",
+ "connectionRestricted": "Дані підключення бачать лише учасники, які можуть редагувати інтеграції.",
+ "tabCli": "GitHub CLI",
+ "tabManual": "Вручну",
+ "payloadUrl": "URL для запитів",
+ "webhookSecret": "Секрет вебхука",
+ "regenerate": "Оновити",
+ "secretRegenerated": "Створено новий секрет. Оновіть його і у вебхуку на GitHub.",
+ "manualHint": "У репозиторії на GitHub відкрийте <b>Settings → Webhooks → Add webhook</b>. Вставте URL і секрет, вкажіть тип вмісту <code>application/json</code> і виберіть лише подію <b>Pull requests</b>.",
+ "cliHint": "Потрібен <link>GitHub CLI</link>. Скопіюйте цю команду, замініть <code>{placeholder}</code> на свій репозиторій і виконайте її в терміналі.",
+ "commandCopied": "Команду скопійовано. Замініть <owner>/<repo> і виконайте її.",
+ "copied": "{label} скопійовано",
+ "lastDelivery": "Остання доставка",
+ "lastDeliveryAt": "Отримано {ago}",
+ "lastDeliveryFrom": "Отримано {ago} з {repo}",
+ "noDelivery": "Ще нічого не надходило.",
+ "automations": "Автоматизації pull request",
+ "automationsHint": "Напишіть ключове слово та ID задачі в заголовку чи описі pull request, як-от «Closes KEY-123». Close, fix, resolve, complete та implement закривають задачу, коли PR змерджено. Ref, part of і related to лише привʼязують її. Напишіть «skip KEY-123», щоб пропустити задачу.",
+ "onMerge": "Коли привʼязаний PR змерджено",
+ "onMergeHint": "Задача переходить у цей статус, коли PR зливається в гілку за замовчуванням.",
+ "onMergeNone": "Перший статус групи «Виконано»",
+ "onOpen": "Коли привʼязаний PR відкрито",
+ "onOpenHint": "Переносить лише задачі, які ще не почали. Задачі в роботі чи закриті залишаються на місці.",
+ "onOpenNone": "Нічого не робити",
+ "changeState": "Змінити статус…",
+ "noState": "Немає статусів."
+ }
+}
diff --git a/apps/web/messages/uk/shell.json b/apps/web/messages/uk/shell.json
new file mode 100644
index 00000000..19eb6686
--- /dev/null
+++ b/apps/web/messages/uk/shell.json
@@ -0,0 +1,8 @@
+{
+ "noProjectAccess": "У вас немає доступу до цього проєкту.",
+ "projectUnavailable": "Цей проєкт недоступний.",
+ "noProjects": "Проєктів ще немає — створіть перший, щоб почати.",
+ "noProjectsTitle": "Проєктів ще немає",
+ "noProjectsHint": "Створіть перший проєкт, щоб планувати задачі на дошці.",
+ "createProject": "Створити проєкт"
+}
diff --git a/apps/web/messages/uk/updates.json b/apps/web/messages/uk/updates.json
new file mode 100644
index 00000000..92f849dd
--- /dev/null
+++ b/apps/web/messages/uk/updates.json
@@ -0,0 +1,16 @@
+{
+ "updateAvailable": "Доступне оновлення",
+ "releaseHistory": "Історія релізів",
+ "runningOutdated": "У вас {current}. Найновіша — {latest}.",
+ "runningUnknown": "У вас {current}. Найновіший реліз невідомий.",
+ "runningLatest": "У вас {current} — найновіший реліз.",
+ "noReleases": "Ця збірка не містить нотаток до релізів.",
+ "badgeRunning": "Поточна",
+ "badgeNew": "Нове",
+ "earlier": "Попередні релізи",
+ "check": "Перевірити оновлення",
+ "checking": "Перевірка",
+ "lastChecked": "Перевірено {date}",
+ "allReleases": "Усі релізи",
+ "noNotes": "Цей реліз без нотаток."
+}
diff --git a/apps/web/messages/uk/views.json b/apps/web/messages/uk/views.json
new file mode 100644
index 00000000..49833037
--- /dev/null
+++ b/apps/web/messages/uk/views.json
@@ -0,0 +1,14 @@
+{
+ "all": "Усі",
+ "newView": "Нове подання",
+ "switchView": "Змінити подання",
+ "searchViews": "Пошук подань…",
+ "noViews": "Подань не знайдено.",
+ "options": "Дії з поданням",
+ "share": "Поділитися",
+ "shared": "Спільне",
+ "editView": "Редагувати подання",
+ "shareBoard": "Поділитися дошкою",
+ "newViewHint": "Створити подання з поточних фільтрів і налаштувань",
+ "filter": "Фільтр"
+}
diff --git a/apps/web/messages/uk/workItems.json b/apps/web/messages/uk/workItems.json
new file mode 100644
index 00000000..e6dd2458
--- /dev/null
+++ b/apps/web/messages/uk/workItems.json
@@ -0,0 +1,105 @@
+{
+ "newIssue": "Нова задача",
+ "collapse": "Згорнути",
+ "expand": "Розгорнути",
+ "hide": "Сховати",
+ "show": "Показати",
+ "hiddenColumns": "Сховані колонки",
+ "hiddenGroups": "Сховані групи",
+ "selectAll": "Вибрати всі",
+ "deselectAll": "Зняти вибір",
+ "resizeColumn": "Змінити ширину колонки",
+ "viewNamePlaceholder": "Усі задачі",
+ "sortedOrder": "Задачі відсортовані за полем «{field}». Перемкніть сортування на «Вручну», щоб їх переміщати.",
+ "statusSince": "У поточному статусі з {date}",
+ "createdOn": "Створено {date}",
+ "updatedOn": "Оновлено {date}",
+ "subtasksProgress": "Підзадачі {done}/{total}",
+ "subtasksDone": "Виконано {done} з {total} підзадач",
+ "columns": {
+ "title": "Назва",
+ "status": "Статус",
+ "statusAge": "У статусі",
+ "priority": "Пріоритет",
+ "type": "Тип",
+ "initiative": "Ініціатива",
+ "cycle": "Цикл",
+ "labels": "Мітки",
+ "startDate": "Початок",
+ "dueDate": "Дедлайн",
+ "created": "Створено",
+ "updated": "Оновлено"
+ },
+ "calendar": {
+ "previousMonth": "Попередній місяць",
+ "nextMonth": "Наступний місяць",
+ "today": "Сьогодні",
+ "moreIssues": "+{count} ще",
+ "issueCount": "{count, plural, one {# задача} few {# задачі} many {# задач} other {# задачі}}",
+ "weekdays": {
+ "sun": "Нд",
+ "mon": "Пн",
+ "tue": "Вт",
+ "wed": "Ср",
+ "thu": "Чт",
+ "fri": "Пт",
+ "sat": "Сб"
+ },
+ "noDate": {
+ "dueDate": "Без дедлайну",
+ "startDate": "Без дати початку"
+ },
+ "allDated": {
+ "dueDate": "Усе має дедлайн.",
+ "startDate": "Усе має дату початку."
+ }
+ },
+ "timeline": {
+ "empty": "Ще немає задач для таймлайну.",
+ "expandGroup": "Розгорнути групу",
+ "collapseGroup": "Згорнути групу",
+ "inferredStart": "Початок виведено з дати створення",
+ "inferredStartDraggable": "Початок виведено з дати створення — перетягніть, щоб задати"
+ },
+ "bulk": {
+ "selected": "Вибрано: {count}",
+ "status": "Статус",
+ "priority": "Пріоритет",
+ "assignee": "Виконавець",
+ "delegate": "Делегат",
+ "initiative": "Ініціатива",
+ "cycle": "Цикл",
+ "labels": "Мітки",
+ "noAssignee": "Без виконавця",
+ "noDelegate": "Без делегата",
+ "noInitiative": "Без ініціативи",
+ "noCycle": "Без циклу",
+ "archive": "Архівувати",
+ "clearSelection": "Зняти вибір"
+ },
+ "removal": {
+ "archive": {
+ "title": "{count, plural, one {Архівувати задачу} other {Архівувати задачі}}",
+ "confirm": "{count, plural, one {Архівувати # задачу} few {Архівувати # задачі} many {Архівувати # задач} other {Архівувати # задачі}}",
+ "description": "{count, plural, one {Архівувати # вибрану задачу? Вона зникне з дошки, її можна буде відновити пізніше.} other {Архівувати # вибраних задач? Вони зникнуть з дошки, їх можна буде відновити пізніше.}}"
+ },
+ "delete": {
+ "title": "{count, plural, one {Видалити задачу} other {Видалити задачі}}",
+ "confirm": "{count, plural, one {Видалити # задачу} few {Видалити # задачі} many {Видалити # задач} other {Видалити # задачі}}",
+ "description": "{count, plural, one {Видалити # вибрану задачу?} few {Видалити # вибрані задачі?} many {Видалити # вибраних задач?} other {Видалити # вибраної задачі?}} Разом з нею буде видалено коментарі, активність і вкладення. Цю дію не можна скасувати."
+ }
+ },
+ "share": {
+ "issueTitle": "Задача",
+ "issueUnavailable": "Ця задача недоступна.",
+ "boardUnavailable": "Ця спільна дошка недоступна. Можливо, посилання відкликали."
+ },
+ "groups": {
+ "noAssignee": "Без виконавця",
+ "noDelegate": "Без делегата",
+ "noPriority": "Без пріоритету",
+ "noType": "Без типу",
+ "noInitiative": "Без ініціативи",
+ "noCycle": "Без циклу"
+ }
+}
diff --git a/apps/web/next.config.ts b/apps/web/next.config.ts
index ca4a7102..f34eefc6 100644
--- a/apps/web/next.config.ts
+++ b/apps/web/next.config.ts
@@ -1,5 +1,6 @@
import path from 'node:path';
import type { NextConfig } from 'next';
+import createNextIntlPlugin from 'next-intl/plugin';
const apiUrl = new URL(process.env.NEXT_PUBLIC_API_URL as string);
@@ -30,4 +31,4 @@ const nextConfig: NextConfig = {
},
};
-export default nextConfig;
+export default createNextIntlPlugin('./src/i18n/request.ts')(nextConfig);
diff --git a/apps/web/package.json b/apps/web/package.json
index 479a4f4d..f005f86c 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -57,6 +57,7 @@
"lucide-react": "^0.474.0",
"marked": "^18.0.5",
"next": "^15.1.6",
+ "next-intl": "^4.13.6",
"next-themes": "^0.4.6",
"radix-ui": "^1.6.2",
"react": "^19.0.0",
diff --git a/apps/web/src/app/layout.tsx b/apps/web/src/app/layout.tsx
index 4d92c5a0..af4e210a 100644
--- a/apps/web/src/app/layout.tsx
+++ b/apps/web/src/app/layout.tsx
@@ -1,21 +1,24 @@
import type { Metadata } from 'next';
import { ThemeProvider } from 'next-themes';
+import { NextIntlClientProvider } from 'next-intl';
+import { getLocale, getTranslations } from 'next-intl/server';
import { Providers } from '@/components/providers';
import './globals.css';
-export const metadata: Metadata = {
- title: "It's a Plan: issue tracking for people and agents",
- description:
- 'A self-hosted, open-source issue tracker with AI agents built in. Assign work to people or agents, and drive it through the API, webhooks and MCP.',
-};
+export async function generateMetadata(): Promise<Metadata> {
+ const t = await getTranslations('meta');
+ return { title: t('title'), description: t('description') };
+}
-export default function RootLayout({
+export default async function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
+ const locale = await getLocale();
+
return (
- <html lang="en" suppressHydrationWarning>
+ <html lang={locale} suppressHydrationWarning>
<body className="antialiased">
<ThemeProvider
attribute="class"
@@ -27,7 +30,9 @@ export default function RootLayout({
// apps fight over the value through cross-tab storage events.
storageKey="itsaplan-theme"
>
- <Providers>{children}</Providers>
+ <NextIntlClientProvider>
+ <Providers>{children}</Providers>
+ </NextIntlClientProvider>
</ThemeProvider>
</body>
</html>
diff --git a/apps/web/src/app/page.tsx b/apps/web/src/app/page.tsx
index bed5284b..71f635a1 100644
--- a/apps/web/src/app/page.tsx
+++ b/apps/web/src/app/page.tsx
@@ -2,6 +2,7 @@
import { useEffect, useState } from 'react';
import { useRouter } from 'next/navigation';
+import { useTranslations } from 'next-intl';
import { Plus, SquareKanban } from 'lucide-react';
import { useProjectsQuery } from '@/services/projects.service';
import { useAccountPreferencesQuery } from '@/services/preferences.service';
@@ -22,6 +23,8 @@ import {
// the project list and the preferences before deciding so it does not flash the
// wrong destination. With no projects at all, offers to create the first one.
export default function Home() {
+ const t = useTranslations('shell');
+ const tCommon = useTranslations('common');
const router = useRouter();
const { data: projects } = useProjectsQuery();
const { data: prefs, isPending: prefsPending } = useAccountPreferencesQuery();
@@ -46,15 +49,13 @@ export default function Home() {
<EmptyMedia variant="icon">
<SquareKanban />
</EmptyMedia>
- <EmptyTitle>No projects yet</EmptyTitle>
- <EmptyDescription>
- Create your first project to start planning issues on a board.
- </EmptyDescription>
+ <EmptyTitle>{t('noProjectsTitle')}</EmptyTitle>
+ <EmptyDescription>{t('noProjectsHint')}</EmptyDescription>
</EmptyHeader>
<EmptyContent>
<Button onClick={() => setCreating(true)}>
<Plus />
- Create project
+ {t('createProject')}
</Button>
</EmptyContent>
</Empty>
@@ -74,7 +75,7 @@ export default function Home() {
return (
<div className="flex h-svh items-center justify-center bg-background text-sm text-muted-foreground">
- Loading…
+ {tCommon('loading')}
</div>
);
}
diff --git a/apps/web/src/components/common/ArchivedBadge.tsx b/apps/web/src/components/common/ArchivedBadge.tsx
index 04c7bf9a..ad7ccf40 100644
--- a/apps/web/src/components/common/ArchivedBadge.tsx
+++ b/apps/web/src/components/common/ArchivedBadge.tsx
@@ -1,9 +1,12 @@
+import { useTranslations } from 'next-intl';
+
// The "Archived" marker shown next to an archived issue's title wherever one can
// still be listed (search results, an issue's links).
export default function ArchivedBadge() {
+ const t = useTranslations('common');
return (
<span className="shrink-0 rounded border border-border px-1.5 py-0.5 text-[10px] text-muted-foreground uppercase">
- Archived
+ {t('archived')}
</span>
);
}
diff --git a/apps/web/src/components/common/ShowMoreButton.tsx b/apps/web/src/components/common/ShowMoreButton.tsx
index 8e2e5717..1204c97c 100644
--- a/apps/web/src/components/common/ShowMoreButton.tsx
+++ b/apps/web/src/components/common/ShowMoreButton.tsx
@@ -1,4 +1,5 @@
import { Button } from '@/components/ui/button';
+import { useTranslations } from 'next-intl';
// The footer of a paged list: loads the next page. The caller renders it only while
// another page exists.
@@ -9,10 +10,11 @@ export default function ShowMoreButton({
loading: boolean;
onClick: () => void;
}) {
+ const t = useTranslations('common');
return (
<div className="mt-4">
<Button variant="ghost" size="sm" disabled={loading} onClick={onClick}>
- {loading ? 'Loading…' : 'Show more'}
+ {loading ? t('loading') : t('showMore')}
</Button>
</div>
);
diff --git a/apps/web/src/components/common/agent-chat/AgentChatPanel.tsx b/apps/web/src/components/common/agent-chat/AgentChatPanel.tsx
index 28493df9..0e57f86d 100644
--- a/apps/web/src/components/common/agent-chat/AgentChatPanel.tsx
+++ b/apps/web/src/components/common/agent-chat/AgentChatPanel.tsx
@@ -19,6 +19,7 @@ import {
InputGroupButton,
InputGroupTextarea,
} from '@/components/ui/input-group';
+import { useTranslations } from 'next-intl';
// The running transcript and the composer for one agent conversation. The
// conversation state lives above this panel (in the agent chat host), so it is
@@ -46,6 +47,7 @@ export function AgentChatPanel({
isLoadingEarlier?: boolean;
onLoadEarlier?: () => void;
}) {
+ const t = useTranslations('common.agentChat');
const [input, setInput] = useState('');
const isStreaming = status === 'streaming';
@@ -75,10 +77,8 @@ export function AgentChatPanel({
<EmptyMedia variant="icon">
<Bot />
</EmptyMedia>
- <EmptyTitle>Chat with {agent.name}</EmptyTitle>
- <EmptyDescription>
- Send a message to test how this agent replies and which tools it uses.
- </EmptyDescription>
+ <EmptyTitle>{t('title', { agent: agent.name })}</EmptyTitle>
+ <EmptyDescription>{t('emptyHint')}</EmptyDescription>
</EmptyHeader>
</Empty>
) : (
@@ -113,7 +113,7 @@ export function AgentChatPanel({
submit();
}
}}
- placeholder={`Message ${agent.name}…`}
+ placeholder={t('messagePlaceholder', { agent: agent.name })}
disabled={isStreaming}
rows={1}
/>
@@ -124,12 +124,12 @@ export function AgentChatPanel({
variant="ghost"
size="icon-sm"
className="rounded-lg text-muted-foreground hover:text-foreground"
- title="Reset conversation"
+ title={t('reset')}
disabled={isStreaming || messages.length === 0}
onClick={onReset}
>
<RotateCw />
- <span className="sr-only">Reset conversation</span>
+ <span className="sr-only">{t('reset')}</span>
</InputGroupButton>
)}
<InputGroupButton
@@ -140,7 +140,7 @@ export function AgentChatPanel({
disabled={!input.trim() || isStreaming}
>
<ArrowUp />
- <span className="sr-only">Send</span>
+ <span className="sr-only">{t('send')}</span>
</InputGroupButton>
</InputGroupAddon>
</InputGroup>
diff --git a/apps/web/src/components/common/agent-chat/AgentChatTranscript.tsx b/apps/web/src/components/common/agent-chat/AgentChatTranscript.tsx
index d3f10ec7..5e1e5450 100644
--- a/apps/web/src/components/common/agent-chat/AgentChatTranscript.tsx
+++ b/apps/web/src/components/common/agent-chat/AgentChatTranscript.tsx
@@ -14,6 +14,7 @@ import {
MessageScrollerItem,
MessageScrollerViewport,
} from '@/components/ui/message-scroller';
+import { useTranslations } from 'next-intl';
const loadThreshold = 48;
@@ -32,6 +33,7 @@ export function AgentChatTranscript({
isLoadingEarlier?: boolean;
onLoadEarlier?: () => void;
}) {
+ const t = useTranslations('common.agentChat');
const loadLocked = useRef(false);
const hasLeftStart = useRef(false);
@@ -66,11 +68,11 @@ export function AgentChatTranscript({
role="status"
className="absolute top-3 left-1/2 z-10 w-auto -translate-x-1/2 rounded-full border bg-background/90 px-3 py-1 shadow-sm backdrop-blur-sm"
>
- <MarkerContent className="shimmer">Loading earlier messages…</MarkerContent>
+ <MarkerContent className="shimmer">{t('loadingEarlier')}</MarkerContent>
</Marker>
)}
<MessageScrollerViewport
- aria-label="Conversation messages"
+ aria-label={t('messages')}
onScroll={handleScroll}
onWheel={handleWheel}
>
@@ -93,7 +95,7 @@ export function AgentChatTranscript({
<MessageScrollerItem messageId="stream-status">
<Marker role="status">
<MarkerContent className="shimmer">
- {activeTool ? `Using ${activeTool}…` : 'Thinking…'}
+ {activeTool ? t('usingTool', { tool: activeTool }) : t('thinking')}
</MarkerContent>
</Marker>
</MessageScrollerItem>
diff --git a/apps/web/src/components/common/fields/AssigneeSelect.tsx b/apps/web/src/components/common/fields/AssigneeSelect.tsx
index 267bc48d..63708027 100644
--- a/apps/web/src/components/common/fields/AssigneeSelect.tsx
+++ b/apps/web/src/components/common/fields/AssigneeSelect.tsx
@@ -4,6 +4,7 @@ import { useSession } from '@/lib/auth-client';
import Avatar from '@/components/common/Avatar';
import { Pill } from './Pill';
import PopoverPick, { type PickItem } from './PopoverPick';
+import { useTranslations } from 'next-intl';
// The assignee of an issue is a project member. `assignees` is the project's full
// candidate list (members and agents); this control filters it to members. Agents
@@ -13,7 +14,7 @@ export default function AssigneeSelect({
assignees,
value,
onChange,
- placeholder = 'No assignee',
+ placeholder,
readOnly,
}: {
assignees: Assignee[];
@@ -22,6 +23,8 @@ export default function AssigneeSelect({
placeholder?: string;
readOnly?: boolean;
}) {
+ const t = useTranslations('issue.fieldSelects');
+ const none = t('noAssignee');
const { data: session } = useSession();
const currentUserId = session?.user.id ?? null;
const members = assignees.filter((a) => a.kind === 'member');
@@ -48,24 +51,24 @@ export default function AssigneeSelect({
) : (
<CircleDashed />
)}
- {assignee?.name ?? placeholder}
+ {assignee?.name ?? placeholder ?? none}
</Pill>
}
- inputPlaceholder="Assign to…"
- emptyText="No members."
+ inputPlaceholder={t('assignTo')}
+ emptyText={t('noMembers')}
items={[
{
key: 'none',
- search: 'No assignee',
+ search: none,
icon: <CircleDashed />,
- label: 'No assignee',
+ label: none,
selected: value == null,
onSelect: () => onChange(null),
},
]}
groups={[
- ...(me ? [{ heading: 'Team me', items: [toItem(me)] }] : []),
- { heading: 'Members', items: others.map(toItem) },
+ ...(me ? [{ heading: t('you'), items: [toItem(me)] }] : []),
+ { heading: t('members'), items: others.map(toItem) },
]}
/>
);
diff --git a/apps/web/src/components/common/fields/DatePill.tsx b/apps/web/src/components/common/fields/DatePill.tsx
index e39ed080..3cbadc13 100644
--- a/apps/web/src/components/common/fields/DatePill.tsx
+++ b/apps/web/src/components/common/fields/DatePill.tsx
@@ -6,6 +6,7 @@ import { Calendar } from '@/components/ui/calendar';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
import { Pill } from './Pill';
import ReadOnlyPill from './ReadOnlyPill';
+import { useTranslations } from 'next-intl';
// A date value as a "MMM d, yyyy" pill opening a calendar. Value is a
// "YYYY-MM-DD" string or null; onChange(null) clears it. `trigger` replaces the
@@ -31,6 +32,7 @@ export default function DatePill({
// { from, to }, …). They render greyed out and cannot be selected.
disabled?: ComponentProps<typeof Calendar>['disabled'];
}) {
+ const t = useTranslations('common');
const [open, setOpen] = useState(false);
const pill = trigger ?? (
<Pill active={!!value}>
@@ -56,7 +58,7 @@ export default function DatePill({
{value && clearable && (
<div className="border-t p-2">
<Button variant="ghost" size="sm" className="w-full" onClick={() => onChange(null)}>
- Clear
+ {t('clear')}
</Button>
</div>
)}
diff --git a/apps/web/src/components/common/fields/LabelPicker.tsx b/apps/web/src/components/common/fields/LabelPicker.tsx
index 669e1ee0..90e1fdd5 100644
--- a/apps/web/src/components/common/fields/LabelPicker.tsx
+++ b/apps/web/src/components/common/fields/LabelPicker.tsx
@@ -7,6 +7,7 @@ import {
DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu';
import LabelPickerSection from './LabelPickerSection';
+import { useTranslations } from 'next-intl';
// The label selector shared by the issue fields and the filter bar. Type-ahead (a
// letter jumps to the matching row) comes from the underlying menu.
@@ -23,6 +24,7 @@ export default function LabelPicker({
onToggle: (id: number) => void;
trigger: ReactNode;
}) {
+ const t = useTranslations('common');
const selectedSet = useMemo(() => new Set(selected), [selected]);
const sections = useMemo(() => groupLabels(labels, groups), [labels, groups]);
@@ -31,7 +33,7 @@ export default function LabelPicker({
<DropdownMenuTrigger asChild>{trigger}</DropdownMenuTrigger>
<DropdownMenuContent align="start" className="w-56">
{sections.length === 0 && (
- <p className="px-2 py-1.5 text-sm text-muted-foreground">No labels.</p>
+ <p className="px-2 py-1.5 text-sm text-muted-foreground">{t('noLabels')}</p>
)}
{sections.map((section) => (
<LabelPickerSection
diff --git a/apps/web/src/components/common/fields/LabelsSelect.tsx b/apps/web/src/components/common/fields/LabelsSelect.tsx
index 8b2f9291..efd1e60a 100644
--- a/apps/web/src/components/common/fields/LabelsSelect.tsx
+++ b/apps/web/src/components/common/fields/LabelsSelect.tsx
@@ -3,6 +3,7 @@ import type { Label, LabelGroup } from '@/lib/api';
import { Pill } from './Pill';
import ReadOnlyPill from './ReadOnlyPill';
import LabelPicker from './LabelPicker';
+import { useTranslations } from 'next-intl';
export default function LabelsSelect({
labels,
@@ -17,6 +18,7 @@ export default function LabelsSelect({
onToggle: (id: number) => void;
readOnly?: boolean;
}) {
+ const t = useTranslations('issue.fieldSelects');
const selected = labels.filter((l) => value.includes(l.id));
const trigger = (
<Pill active={selected.length > 0}>
@@ -33,7 +35,7 @@ export default function LabelsSelect({
) : (
<Tag />
)}
- {selected.length > 0 ? `${selected.length} label${selected.length > 1 ? 's' : ''}` : 'Labels'}
+ {selected.length > 0 ? t('labelCount', { count: selected.length }) : t('labels')}
</Pill>
);
if (readOnly) return <ReadOnlyPill>{trigger}</ReadOnlyPill>;
diff --git a/apps/web/src/components/common/fields/PrioritySelect.tsx b/apps/web/src/components/common/fields/PrioritySelect.tsx
index db3d4c09..0499ee36 100644
--- a/apps/web/src/components/common/fields/PrioritySelect.tsx
+++ b/apps/web/src/components/common/fields/PrioritySelect.tsx
@@ -1,3 +1,5 @@
+import { useTranslations } from 'next-intl';
+import { usePriorityLabel } from '@/hooks/usePriorityLabel';
import { Pill } from './Pill';
import { PRIORITY_FIELDS } from './priorityFields';
import PopoverPick from './PopoverPick';
@@ -12,6 +14,8 @@ export default function PrioritySelect({
onChange: (v: string) => void;
readOnly?: boolean;
}) {
+ const t = useTranslations('common.priority');
+ const priorityLabel = usePriorityLabel();
const prio = PRIORITY_FIELDS.find((p) => p.value === value) ?? PRIORITY_FIELDS[0];
return (
<PopoverPick
@@ -19,15 +23,15 @@ export default function PrioritySelect({
trigger={
<Pill active={!!value}>
{prio.icon}
- {value ? prio.label : 'Priority'}
+ {value ? priorityLabel(value) : t('label')}
</Pill>
}
- inputPlaceholder="Set priority to…"
+ inputPlaceholder={t('setTo')}
items={PRIORITY_FIELDS.map((p) => ({
key: p.value || 'none',
- search: p.label,
+ search: priorityLabel(p.value),
icon: p.icon,
- label: p.label,
+ label: priorityLabel(p.value),
selected: p.value === value,
onSelect: () => onChange(p.value),
}))}
diff --git a/apps/web/src/components/common/fields/StatusSelect.tsx b/apps/web/src/components/common/fields/StatusSelect.tsx
index e0d360b3..40caedc7 100644
--- a/apps/web/src/components/common/fields/StatusSelect.tsx
+++ b/apps/web/src/components/common/fields/StatusSelect.tsx
@@ -3,6 +3,7 @@ import type { Column } from '@/lib/api';
import { colorDot } from './colorDot';
import { Pill } from './Pill';
import PopoverPick from './PopoverPick';
+import { useTranslations } from 'next-intl';
export default function StatusSelect({
columns,
@@ -15,6 +16,7 @@ export default function StatusSelect({
onChange: (id: number) => void;
readOnly?: boolean;
}) {
+ const t = useTranslations('issue.fieldSelects');
const column = columns.find((c) => c.id === value);
return (
<PopoverPick
@@ -22,11 +24,11 @@ export default function StatusSelect({
trigger={
<Pill active>
{column ? colorDot(column.color) : <CircleDashed />}
- {column?.name ?? 'State'}
+ {column?.name ?? t('state')}
</Pill>
}
- inputPlaceholder="Change state…"
- emptyText="No state."
+ inputPlaceholder={t('changeState')}
+ emptyText={t('noState')}
items={columns.map((c) => ({
key: String(c.id),
search: c.name,
diff --git a/apps/web/src/components/common/fields/TypeSelect.tsx b/apps/web/src/components/common/fields/TypeSelect.tsx
index 16595f99..7891668c 100644
--- a/apps/web/src/components/common/fields/TypeSelect.tsx
+++ b/apps/web/src/components/common/fields/TypeSelect.tsx
@@ -3,6 +3,7 @@ import type { IssueType } from '@/lib/api';
import { colorDot } from './colorDot';
import { Pill } from './Pill';
import PopoverPick from './PopoverPick';
+import { useTranslations } from 'next-intl';
export default function TypeSelect({
issueTypes,
@@ -15,6 +16,7 @@ export default function TypeSelect({
onChange: (id: number | null) => void;
readOnly?: boolean;
}) {
+ const t = useTranslations('issue.fieldSelects');
const type = issueTypes.find((t) => t.id === value);
return (
<PopoverPick
@@ -22,16 +24,16 @@ export default function TypeSelect({
trigger={
<Pill active={!!type}>
{type ? colorDot(type.color) : <CircleDashed />}
- {type?.name ?? 'Type'}
+ {type?.name ?? t('type')}
</Pill>
}
- inputPlaceholder="Change type…"
+ inputPlaceholder={t('changeType')}
items={[
{
key: 'none',
- search: 'No type',
+ search: t('noType'),
icon: <CircleDashed />,
- label: 'No type',
+ label: t('noType'),
selected: value == null,
onSelect: () => onChange(null),
},
diff --git a/apps/web/src/components/common/fields/priorityFields.tsx b/apps/web/src/components/common/fields/priorityFields.tsx
index 9e628be0..f7cded59 100644
--- a/apps/web/src/components/common/fields/priorityFields.tsx
+++ b/apps/web/src/components/common/fields/priorityFields.tsx
@@ -1,6 +1,6 @@
import { type ReactNode } from 'react';
import { Minus, SignalHigh, SignalLow, SignalMedium, TriangleAlert } from 'lucide-react';
-import { PRIORITIES } from '@/utils/fieldOptions';
+import { PRIORITY_ORDER } from '@/utils/fieldOptions';
// Accent icon per priority value (plus the "unset" choice keyed by '').
const PRIORITY_ICON: Record<string, ReactNode> = {
@@ -13,8 +13,8 @@ const PRIORITY_ICON: Record<string, ReactNode> = {
// Priority selector rows: the "No priority" choice first, then the canonical
// priorities, each with its accent icon. Value is the priority string, '' for
-// none.
-export const PRIORITY_FIELDS: { value: string; label: string; icon: ReactNode }[] = [
- { value: '', label: 'No priority', icon: PRIORITY_ICON[''] },
- ...PRIORITIES.map((p) => ({ value: p.value, label: p.label, icon: PRIORITY_ICON[p.value] })),
+// none; its label comes from usePriorityLabel.
+export const PRIORITY_FIELDS: { value: string; icon: ReactNode }[] = [
+ { value: '', icon: PRIORITY_ICON[''] },
+ ...PRIORITY_ORDER.map((value) => ({ value: value as string, icon: PRIORITY_ICON[value] })),
];
diff --git a/apps/web/src/components/common/hotkeys/HotkeysEditor.tsx b/apps/web/src/components/common/hotkeys/HotkeysEditor.tsx
index 3cecd02b..d2f48163 100644
--- a/apps/web/src/components/common/hotkeys/HotkeysEditor.tsx
+++ b/apps/web/src/components/common/hotkeys/HotkeysEditor.tsx
@@ -1,5 +1,12 @@
+import { useTranslations } from 'next-intl';
import type { HotkeyOverrides } from '@/lib/api';
-import { HOTKEYS, type HotkeyCombos, type HotkeyDef, type HotkeyId } from '@/utils/hotkeys';
+import {
+ HOTKEYS,
+ HOTKEY_GROUPS,
+ type HotkeyCombos,
+ type HotkeyDef,
+ type HotkeyId,
+} from '@/utils/hotkeys';
import HotkeysEditorRow from './HotkeysEditorRow';
// The shortcut list, grouped as the hotkey map declares. `base` is what applies
@@ -16,6 +23,7 @@ export default function HotkeysEditor({
overrides: HotkeyOverrides;
onChange: (overrides: HotkeyOverrides) => void;
}) {
+ const t = useTranslations('common.hotkeys');
const effective = (id: HotkeyId) => overrides[id] ?? base[id];
// The command already bound to a combination, so a duplicate is visible before it
@@ -23,11 +31,9 @@ export default function HotkeysEditor({
const conflictFor = (def: HotkeyDef): string | null => {
const combo = effective(def.id);
const other = HOTKEYS.find((h) => h.id !== def.id && effective(h.id) === combo);
- return other ? other.label : null;
+ return other ? t(`commands.${other.id}`) : null;
};
- const groups = [...new Set(HOTKEYS.map((h) => h.group))];
-
function record(id: HotkeyId, combo: string) {
onChange({ ...overrides, [id]: combo });
}
@@ -40,9 +46,9 @@ export default function HotkeysEditor({
return (
<div className="space-y-6">
- {groups.map((group) => (
+ {HOTKEY_GROUPS.map((group) => (
<div key={group}>
- <p className="mb-1 text-xs font-medium text-muted-foreground">{group}</p>
+ <p className="mb-1 text-xs font-medium text-muted-foreground">{t(`groups.${group}`)}</p>
<div className="divide-y divide-border/60">
{HOTKEYS.filter((h) => h.group === group).map((def) => (
<HotkeysEditorRow
diff --git a/apps/web/src/components/common/hotkeys/HotkeysEditorRow.tsx b/apps/web/src/components/common/hotkeys/HotkeysEditorRow.tsx
index 109051a6..5834c93e 100644
--- a/apps/web/src/components/common/hotkeys/HotkeysEditorRow.tsx
+++ b/apps/web/src/components/common/hotkeys/HotkeysEditorRow.tsx
@@ -3,6 +3,7 @@ import { RotateCcw } from 'lucide-react';
import { comboFromEvent, formatCombo, type HotkeyDef } from '@/utils/hotkeys';
import { useIsMac } from '@/context/useHotkeys';
import { Button } from '@/components/ui/button';
+import { useTranslations } from 'next-intl';
// One shortcut in the editor: what it does, the combination in effect, and the
// controls to rebind or reset it. Pressing "Change" listens for the next key press
@@ -20,11 +21,13 @@ export default function HotkeysEditorRow({
combo: string;
// True when this row's binding comes from the layer being edited, not below it.
overridden: boolean;
- // The label of the command already using this combination, if any.
+ // What the command already using this combination does, if any.
conflictWith: string | null;
onRecord: (combo: string) => void;
onReset: () => void;
}) {
+ const tCommon = useTranslations('common');
+ const t = useTranslations('common.hotkeys');
const isMac = useIsMac();
const [recording, setRecording] = useState(false);
@@ -50,9 +53,11 @@ export default function HotkeysEditorRow({
return (
<div className="flex items-center gap-4 py-2">
<div className="min-w-0 flex-1">
- <p className="truncate text-sm">{def.label}</p>
+ <p className="truncate text-sm">{t(`commands.${def.id}`)}</p>
{conflictWith && (
- <p className="mt-0.5 text-xs text-destructive">Already used by {conflictWith}</p>
+ <p className="mt-0.5 text-xs text-destructive">
+ {t('conflict', { command: conflictWith })}
+ </p>
)}
</div>
<kbd
@@ -60,20 +65,20 @@ export default function HotkeysEditorRow({
recording ? 'bg-accent text-accent-foreground' : 'bg-muted text-foreground'
}`}
>
- {recording ? 'Press keys' : formatCombo(combo, isMac)}
+ {recording ? t('pressKeys') : formatCombo(combo, isMac)}
</kbd>
{def.fixed ? (
- <span className="w-28 shrink-0 text-right text-xs text-muted-foreground">Fixed</span>
+ <span className="w-28 shrink-0 text-right text-xs text-muted-foreground">{t('fixed')}</span>
) : (
<div className="flex w-28 shrink-0 justify-end gap-1">
<Button variant="ghost" size="sm" onClick={() => setRecording((r) => !r)}>
- {recording ? 'Cancel' : 'Change'}
+ {recording ? tCommon('cancel') : tCommon('change')}
</Button>
<Button
variant="ghost"
size="icon"
className="size-8"
- aria-label="Reset this shortcut"
+ aria-label={t('resetShortcut')}
disabled={!overridden}
onClick={onReset}
>
diff --git a/apps/web/src/components/common/inputs/EnabledSwitch.tsx b/apps/web/src/components/common/inputs/EnabledSwitch.tsx
index c1d74fb0..d7b98544 100644
--- a/apps/web/src/components/common/inputs/EnabledSwitch.tsx
+++ b/apps/web/src/components/common/inputs/EnabledSwitch.tsx
@@ -1,4 +1,5 @@
import { Switch } from '@/components/ui/switch';
+import { useTranslations } from 'next-intl';
export default function EnabledSwitch({
checked,
@@ -9,9 +10,10 @@ export default function EnabledSwitch({
onChange: (value: boolean) => void;
disabled: boolean;
}) {
+ const t = useTranslations('common');
return (
<label className="flex items-center gap-2 text-sm text-muted-foreground">
- Enabled
+ {t('enabled')}
<Switch checked={checked} onCheckedChange={onChange} disabled={disabled} />
</label>
);
diff --git a/apps/web/src/components/common/inputs/ProviderToggle.tsx b/apps/web/src/components/common/inputs/ProviderToggle.tsx
index 3758b499..15a50889 100644
--- a/apps/web/src/components/common/inputs/ProviderToggle.tsx
+++ b/apps/web/src/components/common/inputs/ProviderToggle.tsx
@@ -1,15 +1,10 @@
+import { useTranslations } from 'next-intl';
import { cn } from '@/lib/utils';
// 'system' is the instance provider a project can send through; it carries no
// credentials of its own, so it is only offered where that choice exists.
export type EmailProvider = 'system' | 'smtp' | 'resend';
-const LABELS: Record<EmailProvider, string> = {
- system: 'System',
- smtp: 'SMTP',
- resend: 'Resend',
-};
-
// A segmented control choosing which email provider is configured. Only one email
// provider is active at a time, so this picks both the visible form and the channel
// that sends. Styled from the muted/background tokens, not a bordered box.
@@ -24,6 +19,11 @@ export default function ProviderToggle({
options?: EmailProvider[];
disabled?: boolean;
}) {
+ const t = useTranslations('common');
+ // Only the instance provider is named in words; the other two are product names.
+ const label = (option: EmailProvider) =>
+ option === 'system' ? t('system') : option === 'smtp' ? 'SMTP' : 'Resend';
+
return (
<div className="flex w-fit items-center gap-1 rounded-lg bg-muted p-[3px]" role="tablist">
{options.map((option) => {
@@ -44,7 +44,7 @@ export default function ProviderToggle({
: 'text-muted-foreground hover:text-foreground',
)}
>
- {LABELS[option]}
+ {label(option)}
</button>
);
})}
diff --git a/apps/web/src/components/common/inputs/SecretInput.tsx b/apps/web/src/components/common/inputs/SecretInput.tsx
index dc44a7df..2523bcd6 100644
--- a/apps/web/src/components/common/inputs/SecretInput.tsx
+++ b/apps/web/src/components/common/inputs/SecretInput.tsx
@@ -1,6 +1,7 @@
import { useState } from 'react';
import { Eye, EyeOff } from 'lucide-react';
import { Input } from '@/components/ui/input';
+import { useTranslations } from 'next-intl';
// A masked input for a secret (SMTP password, API key, bot token). The stored value
// is never sent to the client, so the field starts empty: when a value is already
@@ -21,6 +22,7 @@ export default function SecretInput({
editable: boolean;
placeholder?: string;
}) {
+ const t = useTranslations('common');
const [reveal, setReveal] = useState(false);
return (
<div className="relative">
@@ -38,7 +40,7 @@ export default function SecretInput({
type="button"
onClick={() => setReveal((r) => !r)}
className="absolute inset-y-0 right-0 flex items-center px-3 text-muted-foreground hover:text-foreground"
- aria-label={reveal ? 'Hide' : 'Show'}
+ aria-label={reveal ? t('hide') : t('show')}
tabIndex={-1}
>
{reveal ? <EyeOff className="size-4" /> : <Eye className="size-4" />}
diff --git a/apps/web/src/components/common/overlay/ConfirmDialog.tsx b/apps/web/src/components/common/overlay/ConfirmDialog.tsx
index 432a34ce..8c911096 100644
--- a/apps/web/src/components/common/overlay/ConfirmDialog.tsx
+++ b/apps/web/src/components/common/overlay/ConfirmDialog.tsx
@@ -1,6 +1,7 @@
import { type ReactNode, useState } from 'react';
import Modal from './Modal';
import { Button } from '@/components/ui/button';
+import { useTranslations } from 'next-intl';
// A modal with a destructive confirm button that owns the busy state and the
// try/catch around the action. Callers put the dialog-specific body in `children`
@@ -22,6 +23,7 @@ export default function ConfirmDialog({
onConfirm: () => Promise<void>;
onClose: () => void;
}) {
+ const t = useTranslations('common');
const [busy, setBusy] = useState(false);
async function confirm() {
@@ -41,7 +43,7 @@ export default function ConfirmDialog({
{children}
<div className="flex justify-end gap-2">
<Button variant="outline" onClick={onClose} disabled={busy}>
- Cancel
+ {t('cancel')}
</Button>
<Button variant="destructive" onClick={confirm} disabled={busy || confirmDisabled}>
{confirmLabel}
diff --git a/apps/web/src/components/common/overlay/IssuePickerDialog.tsx b/apps/web/src/components/common/overlay/IssuePickerDialog.tsx
index 2e241e87..d80cf032 100644
--- a/apps/web/src/components/common/overlay/IssuePickerDialog.tsx
+++ b/apps/web/src/components/common/overlay/IssuePickerDialog.tsx
@@ -12,6 +12,7 @@ import {
CommandList,
} from '@/components/ui/command';
import ArchivedBadge from '@/components/common/ArchivedBadge';
+import { useTranslations } from 'next-intl';
// Picks one of the project's issues, searched server-side (archived included).
// `exclude` drops the issues this particular pick cannot accept, so only the
@@ -31,6 +32,7 @@ export default function IssuePickerDialog({
onPick: (hit: IssueSearchHit) => void;
onClose: () => void;
}) {
+ const t = useTranslations('issue.linkDialog');
const [query, setQuery] = useState('');
// One request per burst of keystrokes, as in the command palette.
@@ -50,9 +52,7 @@ export default function IssuePickerDialog({
>
<CommandInput placeholder={prompt} value={query} onValueChange={setQuery} />
<CommandList>
- <CommandEmpty>
- {query.trim() ? 'No issues match.' : 'Type to search this project’s issues.'}
- </CommandEmpty>
+ <CommandEmpty>{query.trim() ? t('noMatches') : t('typeToSearch')}</CommandEmpty>
<CommandGroup>
{hits.map((hit) => (
<CommandItem key={hit.id} value={String(hit.id)} onSelect={() => onPick(hit)}>
diff --git a/apps/web/src/components/common/overlay/Modal.tsx b/apps/web/src/components/common/overlay/Modal.tsx
index 03d7308e..124c77ee 100644
--- a/apps/web/src/components/common/overlay/Modal.tsx
+++ b/apps/web/src/components/common/overlay/Modal.tsx
@@ -9,6 +9,7 @@ import {
DialogTitle,
} from '@/components/ui/dialog';
import { cn } from '@/lib/utils';
+import { useTranslations } from 'next-intl';
// Thin wrapper over shadcn Dialog that keeps the mount/unmount call style used
// across the app: callers render `{show && <Modal .../>}`, so the dialog is
@@ -50,8 +51,9 @@ export default function Modal({
fullscreen?: boolean;
onToggleFullscreen?: () => void;
}) {
+ const t = useTranslations('common');
const FullscreenIcon = fullscreen ? Minimize2 : Maximize2;
- const fullscreenLabel = fullscreen ? 'Exit fullscreen' : 'Fullscreen';
+ const fullscreenLabel = fullscreen ? t('exitFullscreen') : t('fullscreen');
return (
<Dialog open onOpenChange={(open) => !open && onClose()}>
@@ -126,8 +128,8 @@ export default function Modal({
variant="ghost"
size="icon"
className={CONTROL_CLASS}
- aria-label="Close"
- title="Close"
+ aria-label={t('close')}
+ title={t('close')}
onClick={onClose}
>
<X />
diff --git a/apps/web/src/components/common/page/BrandPanel.tsx b/apps/web/src/components/common/page/BrandPanel.tsx
index 8921b576..eeca1c8c 100644
--- a/apps/web/src/components/common/page/BrandPanel.tsx
+++ b/apps/web/src/components/common/page/BrandPanel.tsx
@@ -1,19 +1,19 @@
import { SquareKanban } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { APP_NAME } from '@/utils/app';
// Branded panel shown beside the form on wide screens, in place of an external
// image — self-contained, no asset. Shared by the auth screens and the invite
// accept screen; the subtitle differs per context.
-export default function BrandPanel({
- subtitle = 'Plan issues on a board. Sign in to open your projects.',
-}: {
- subtitle?: string;
-}) {
+export default function BrandPanel({ subtitle }: { subtitle?: string }) {
+ const t = useTranslations('common');
return (
<div className="relative hidden flex-col items-center justify-center gap-3 bg-primary text-primary-foreground md:flex">
<SquareKanban className="size-12" />
<span className="text-lg font-semibold">{APP_NAME}</span>
- <p className="max-w-[16rem] text-center text-sm text-primary-foreground/70">{subtitle}</p>
+ <p className="max-w-[16rem] text-center text-sm text-primary-foreground/70">
+ {subtitle ?? t('brandSubtitle')}
+ </p>
</div>
);
}
diff --git a/apps/web/src/components/common/page/FullPageView.tsx b/apps/web/src/components/common/page/FullPageView.tsx
index 44c4827b..0ea86a3e 100644
--- a/apps/web/src/components/common/page/FullPageView.tsx
+++ b/apps/web/src/components/common/page/FullPageView.tsx
@@ -4,6 +4,7 @@ import { ArrowLeft } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { cn } from '@/lib/utils';
import PageHeader from './PageHeader';
+import { useTranslations } from 'next-intl';
// The chrome for a standalone full-height page rendered outside the app shell:
// its own top bar with a back link and a label, and a centered column with a
@@ -26,10 +27,11 @@ export default function FullPageView({
nav?: ReactNode;
children: ReactNode;
}) {
+ const t = useTranslations('common');
return (
<div className="min-h-svh bg-background">
<header className="flex h-12 items-center gap-2 border-b px-4">
- <Button asChild variant="ghost" size="icon" className="size-8" title="Back">
+ <Button asChild variant="ghost" size="icon" className="size-8" title={t('back')}>
<Link href="/">
<ArrowLeft />
</Link>
diff --git a/apps/web/src/components/common/permissions/PermissionsPopover.tsx b/apps/web/src/components/common/permissions/PermissionsPopover.tsx
index 5f57b12b..844647a2 100644
--- a/apps/web/src/components/common/permissions/PermissionsPopover.tsx
+++ b/apps/web/src/components/common/permissions/PermissionsPopover.tsx
@@ -2,8 +2,10 @@
import { Fragment } from 'react';
import { Check, ListChecks } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { PermissionResource, Permissions } from '@/lib/api';
-import { ACTION_ORDER, actionLabel, groupResources, resourceLabel } from '@/utils/permissions';
+import { ACTION_ORDER, groupResources } from '@/utils/permissions';
+import { usePermissionLabels } from '@/hooks/usePermissionLabels';
import { Button } from '@/components/ui/button';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
@@ -11,19 +13,21 @@ import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip
// `label` overrides the trigger's tooltip and aria-label.
export function PermissionsPopover({
permissions,
- label = 'View permissions',
+ label,
}: {
permissions: Permissions;
label?: string;
}) {
+ const t = useTranslations('permissions');
+ const { actionLabel, resourceLabel, groupLabel } = usePermissionLabels();
+ const triggerLabel = label ?? t('viewPermissions');
const resources = Object.keys(permissions) as PermissionResource[];
const total = resources.reduce(
(sum, r) => sum + ACTION_ORDER.filter((a) => permissions[r]?.[a]).length,
0,
);
- if (total === 0)
- return <span className="text-xs text-muted-foreground">No permissions granted</span>;
+ if (total === 0) return <span className="text-xs text-muted-foreground">{t('none')}</span>;
const groups = groupResources(resources);
@@ -37,13 +41,13 @@ export function PermissionsPopover({
variant="ghost"
size="icon"
className="size-7 text-muted-foreground hover:text-foreground"
- aria-label={label}
+ aria-label={triggerLabel}
>
<ListChecks className="size-4" />
</Button>
</PopoverTrigger>
</TooltipTrigger>
- <TooltipContent>{label}</TooltipContent>
+ <TooltipContent>{triggerLabel}</TooltipContent>
</Tooltip>
<PopoverContent align="start" className="max-h-96 w-[22rem] overflow-auto p-0">
<table className="w-full border-collapse text-xs">
@@ -59,13 +63,13 @@ export function PermissionsPopover({
</thead>
<tbody>
{groups.map((g) => (
- <Fragment key={g.title}>
+ <Fragment key={g.key}>
<tr>
<td
colSpan={ACTION_ORDER.length + 1}
className="px-3 pt-3 pb-1 text-[10px] font-medium tracking-wide text-muted-foreground uppercase"
>
- {g.title}
+ {groupLabel(g.key)}
</td>
</tr>
{g.resources.map((r) => (
@@ -88,9 +92,7 @@ export function PermissionsPopover({
</table>
</PopoverContent>
</Popover>
- <span className="text-xs text-muted-foreground">
- {total} permission{total === 1 ? '' : 's'} granted
- </span>
+ <span className="text-xs text-muted-foreground">{t('grantedCount', { count: total })}</span>
</div>
);
}
diff --git a/apps/web/src/components/common/permissions/RequireFeature.tsx b/apps/web/src/components/common/permissions/RequireFeature.tsx
index 786bee93..b1fe3abc 100644
--- a/apps/web/src/components/common/permissions/RequireFeature.tsx
+++ b/apps/web/src/components/common/permissions/RequireFeature.tsx
@@ -5,11 +5,12 @@ import Link from 'next/link';
import { useParams } from 'next/navigation';
import type { ProjectFeatures } from '@/lib/api';
import { settingsPath } from '@/utils/paths';
-import { FEATURE_LABEL } from '@/utils/projectFeatures';
import { usePermissions } from '@/hooks/usePermissions';
import { useProjectFeatures } from '@/hooks/useProjectFeatures';
+import { useFeatureLabel } from '@/hooks/useFeatureLabel';
import { Button } from '@/components/ui/button';
import { EmptyState } from '@/components/common/page/EmptyState';
+import { useTranslations } from 'next-intl';
// Gates a section that an owner can turn off for the project (Settings ->
// General). With the feature on it renders the section; with it off it explains
@@ -22,6 +23,8 @@ export default function RequireFeature({
feature: keyof ProjectFeatures;
children: ReactNode;
}) {
+ const t = useTranslations('common');
+ const featureLabel = useFeatureLabel();
const features = useProjectFeatures();
const { isOwner } = usePermissions();
const params = useParams<{ projectKey: string }>();
@@ -30,12 +33,12 @@ export default function RequireFeature({
return (
<EmptyState
- title={`${FEATURE_LABEL[feature]} are turned off`}
- description="An owner can turn this section back on in General settings."
+ title={t('featureOffTitle', { feature: featureLabel(feature) })}
+ description={t('featureOffHint')}
>
{isOwner && params.projectKey && (
<Button size="sm" asChild>
- <Link href={settingsPath(params.projectKey, 'general')}>Open General settings</Link>
+ <Link href={settingsPath(params.projectKey, 'general')}>{t('openGeneralSettings')}</Link>
</Button>
)}
</EmptyState>
diff --git a/apps/web/src/components/common/permissions/RequirePermission.tsx b/apps/web/src/components/common/permissions/RequirePermission.tsx
index 2b5cd1de..4cb87864 100644
--- a/apps/web/src/components/common/permissions/RequirePermission.tsx
+++ b/apps/web/src/components/common/permissions/RequirePermission.tsx
@@ -1,6 +1,7 @@
'use client';
import type { ReactNode } from 'react';
+import { useTranslations } from 'next-intl';
import { usePermissions } from '@/hooks/usePermissions';
import type { PermissionAction, PermissionResource } from '@/lib/api';
@@ -11,7 +12,7 @@ import type { PermissionAction, PermissionResource } from '@/lib/api';
export default function RequirePermission({
resource,
action,
- message = 'You do not have access to this section.',
+ message,
children,
}: {
resource: PermissionResource;
@@ -19,9 +20,10 @@ export default function RequirePermission({
message?: string;
children: ReactNode;
}) {
+ const t = useTranslations('common');
const { can } = usePermissions();
if (!can(resource, action)) {
- return <p className="text-sm text-muted-foreground">{message}</p>;
+ return <p className="text-sm text-muted-foreground">{message ?? t('noSectionAccess')}</p>;
}
return <>{children}</>;
}
diff --git a/apps/web/src/components/common/share/ShareDialog.tsx b/apps/web/src/components/common/share/ShareDialog.tsx
index d65a4f46..e486cd63 100644
--- a/apps/web/src/components/common/share/ShareDialog.tsx
+++ b/apps/web/src/components/common/share/ShareDialog.tsx
@@ -15,6 +15,7 @@ import {
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Switch } from '@/components/ui/switch';
+import { useTranslations } from 'next-intl';
// A generic public-share dialog for an issue or a saved view. It shows the current
// state (shared with a copyable link, or not shared) and toggles it through the
@@ -42,6 +43,7 @@ export default function ShareDialog({
disable: () => Promise<void>;
pathForToken: (token: string) => string;
}) {
+ const t = useTranslations('common.share');
const [current, setCurrent] = useState<string | null>(token);
const [busy, setBusy] = useState(false);
const [copied, setCopied] = useState(false);
@@ -67,20 +69,16 @@ export default function ShareDialog({
}
}
- const onEnable = () =>
- run(async () => setCurrent(await enable(false)), 'Could not create the link. Try again.');
+ const onEnable = () => run(async () => setCurrent(await enable(false)), t('createFailed'));
const onSetExtended = (next: boolean) =>
- run(
- async () => setCurrent(await enable(next)),
- 'Could not change what the link shows. Try again.',
- );
+ run(async () => setCurrent(await enable(next)), t('changeFailed'));
const onDisable = () =>
run(async () => {
await disable();
setCurrent(null);
- }, 'Could not stop sharing. Try again.');
+ }, t('stopFailed'));
async function copy() {
try {
@@ -88,7 +86,7 @@ export default function ShareDialog({
setCopied(true);
setTimeout(() => setCopied(false), 1500);
} catch {
- toast.error('Could not copy the link. Select it and copy by hand.');
+ toast.error(t('copyFailed'));
}
}
@@ -97,9 +95,7 @@ export default function ShareDialog({
<DialogContent className="sm:max-w-md">
<DialogHeader>
<DialogTitle>{title}</DialogTitle>
- <DialogDescription>
- Anyone with the link can read it. No account needed.
- </DialogDescription>
+ <DialogDescription>{t('hint')}</DialogDescription>
</DialogHeader>
{current ? (
@@ -108,22 +104,20 @@ export default function ShareDialog({
<Input
readOnly
value={url}
- aria-label="Share link"
+ aria-label={t('shareLink')}
className="h-9 flex-1 bg-muted/40 font-mono text-xs"
onFocus={(e) => e.target.select()}
/>
<Button type="button" variant="secondary" size="sm" className="h-9" onClick={copy}>
{copied ? <Check className="size-4" /> : <Copy className="size-4" />}
- {copied ? 'Copied' : 'Copy'}
+ {copied ? t('copied') : t('copy')}
</Button>
</div>
<label className="flex items-center justify-between gap-4 rounded-md border px-3 py-2.5">
<span className="min-w-0">
- <span className="block text-sm">Full issue details</span>
- <span className="block text-xs text-muted-foreground">
- Assignees, labels, custom fields and activity.
- </span>
+ <span className="block text-sm">{t('fullDetails')}</span>
+ <span className="block text-xs text-muted-foreground">{t('fullDetailsHint')}</span>
</span>
<Switch
checked={extended}
@@ -142,7 +136,7 @@ export default function ShareDialog({
className="text-muted-foreground hover:text-destructive"
>
{busy && <Loader2 className="size-4 animate-spin" />}
- Stop sharing
+ {t('stopSharing')}
</Button>
</DialogFooter>
</div>
@@ -150,7 +144,7 @@ export default function ShareDialog({
<DialogFooter>
<Button type="button" disabled={busy} onClick={() => void onEnable()}>
{busy ? <Loader2 className="size-4 animate-spin" /> : <Globe className="size-4" />}
- Create link
+ {t('createLink')}
</Button>
</DialogFooter>
)}
diff --git a/apps/web/src/components/common/skeleton/ListSkeleton.tsx b/apps/web/src/components/common/skeleton/ListSkeleton.tsx
index f7ea8c24..a0ca014a 100644
--- a/apps/web/src/components/common/skeleton/ListSkeleton.tsx
+++ b/apps/web/src/components/common/skeleton/ListSkeleton.tsx
@@ -1,5 +1,6 @@
import { cn } from '@/lib/utils';
import { Skeleton } from '@/components/ui/skeleton';
+import { useTranslations } from 'next-intl';
// Stands in for a list, a table or a feed while its query loads: one bar per row.
// `className` styles the stack (its padding inside the surrounding container),
@@ -15,9 +16,10 @@ export default function ListSkeleton({
className?: string;
rowClassName?: string;
}) {
+ const t = useTranslations('common');
return (
<div className={cn('flex flex-col gap-2', className)} role="status" aria-busy>
- <span className="sr-only">Loading…</span>
+ <span className="sr-only">{t('loading')}</span>
{Array.from({ length: rows }, (_, i) => (
<Skeleton key={i} className={cn('h-10 w-full', rowClassName)} />
))}
diff --git a/apps/web/src/components/common/timeline/TimelineLabelResizer.tsx b/apps/web/src/components/common/timeline/TimelineLabelResizer.tsx
index 2a53d0e0..07f811b4 100644
--- a/apps/web/src/components/common/timeline/TimelineLabelResizer.tsx
+++ b/apps/web/src/components/common/timeline/TimelineLabelResizer.tsx
@@ -1,4 +1,5 @@
import { useEffect, useRef } from 'react';
+import { useTranslations } from 'next-intl';
// The grip on the right edge of a timeline's label column: dragging it sets how
// much room the labels get. It spans the whole column, header to last row, and
@@ -11,6 +12,7 @@ export function TimelineLabelResizer({
labelW: number;
onResize: (width: number) => void;
}) {
+ const t = useTranslations('common');
// The drag listens on the window, since the pointer leaves the 6px grip as soon
// as it moves. Switching layout or project unmounts the timeline mid-drag, and
// the pointerup that would drop the listeners never reaches this component.
@@ -36,7 +38,7 @@ export function TimelineLabelResizer({
<div className="sticky left-0 h-full" style={{ width: labelW }}>
<div
onPointerDown={beginResize}
- aria-label="Resize the title column"
+ aria-label={t('resizeTitleColumn')}
className="pointer-events-auto absolute inset-y-0 right-0 w-1.5 cursor-col-resize hover:bg-primary/40"
/>
</div>
diff --git a/apps/web/src/components/layout/AllViewTab.tsx b/apps/web/src/components/layout/AllViewTab.tsx
index 1e95de88..5d51fad2 100644
--- a/apps/web/src/components/layout/AllViewTab.tsx
+++ b/apps/web/src/components/layout/AllViewTab.tsx
@@ -1,5 +1,6 @@
import { useDroppable } from '@dnd-kit/core';
import { Layers } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { cn } from '@/lib/utils';
import ViewTabChrome from '@/components/layout/ViewTabChrome';
@@ -17,6 +18,7 @@ export default function AllViewTab({
dragging: boolean;
onClick: () => void;
}) {
+ const t = useTranslations('views');
const { setNodeRef, isOver } = useDroppable({ id: ALL_DROP_ID });
return (
<ViewTabChrome
@@ -30,7 +32,7 @@ export default function AllViewTab({
className="flex items-center gap-1.5 py-1 pr-2 pl-2"
>
<Layers className="size-3.5" />
- All
+ {t('all')}
</button>
</ViewTabChrome>
);
diff --git a/apps/web/src/components/layout/AppHeader.tsx b/apps/web/src/components/layout/AppHeader.tsx
index 891fdf7d..7ffb2423 100644
--- a/apps/web/src/components/layout/AppHeader.tsx
+++ b/apps/web/src/components/layout/AppHeader.tsx
@@ -1,11 +1,13 @@
import type { ReactNode } from 'react';
import { MessagesSquare, Plus, Search } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { usePermissions } from '@/hooks/usePermissions';
import { useHotkeyLabel } from '@/context/useHotkeys';
import { Button } from '@/components/ui/button';
import { Separator } from '@/components/ui/separator';
import { SidebarTrigger } from '@/components/ui/sidebar';
import { ThemeToggle } from '@/components/theme-toggle';
+import { LocaleToggle } from '@/components/locale-toggle';
import UserMenu from '@/components/layout/UserMenu';
// The slim header inside the sidebar inset, shared by the project view and the
@@ -25,6 +27,7 @@ export default function AppHeader({
chatActive: boolean;
onToggleChat: () => void;
}) {
+ const t = useTranslations('nav');
const { can } = usePermissions();
const paletteKey = useHotkeyLabel('palette.toggle');
const newIssueKey = useHotkeyLabel('issue.new');
@@ -39,11 +42,11 @@ export default function AppHeader({
<button
type="button"
onClick={onOpenCommand}
- title={`Search or run a command (${paletteKey})`}
+ title={t('searchHint', { key: paletteKey ?? '' })}
className="ml-auto flex size-8 shrink-0 items-center justify-center rounded-md border text-sm text-muted-foreground transition-colors hover:bg-accent sm:w-auto sm:max-w-xs sm:min-w-0 sm:flex-1 sm:shrink sm:justify-start sm:gap-2 sm:px-3"
>
<Search className="size-4 shrink-0" />
- <span className="hidden truncate sm:inline">Search or run a command…</span>
+ <span className="hidden truncate sm:inline">{t('search')}</span>
<kbd className="ml-auto hidden rounded bg-muted px-1.5 py-0.5 font-mono text-[11px] sm:inline">
{paletteKey}
</kbd>
@@ -54,7 +57,7 @@ export default function AppHeader({
variant="outline"
size="icon"
className="size-8 shrink-0"
- title={`New issue (${newIssueKey})`}
+ title={t('newIssueHint', { key: newIssueKey ?? '' })}
onClick={onNewIssue}
>
<Plus />
@@ -66,7 +69,7 @@ export default function AppHeader({
variant={chatActive ? 'default' : 'outline'}
size="icon"
className="size-8 shrink-0"
- title="AI chat"
+ title={t('aiChat')}
aria-pressed={chatActive}
onClick={onToggleChat}
>
@@ -74,6 +77,7 @@ export default function AppHeader({
</Button>
)}
+ <LocaleToggle />
<ThemeToggle />
<UserMenu />
</header>
diff --git a/apps/web/src/components/layout/AppSidebar.tsx b/apps/web/src/components/layout/AppSidebar.tsx
index b1582784..cdbce3b3 100644
--- a/apps/web/src/components/layout/AppSidebar.tsx
+++ b/apps/web/src/components/layout/AppSidebar.tsx
@@ -3,6 +3,7 @@
import { useEffect, useState } from 'react';
import { usePathname } from 'next/navigation';
import { Braces, Server, Shield } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { Project } from '@/lib/api';
import { useSession } from '@/lib/auth-client';
import { apiDocsPath, godPath, mcpServerPath } from '@/utils/paths';
@@ -39,6 +40,7 @@ export default function AppSidebar({
onSelectProject: (key: string) => void;
onNewProject: () => void;
}) {
+ const t = useTranslations('nav');
const pathname = usePathname();
const disabled = !currentProjectKey;
const projectId = projects.find((p) => p.key === currentProjectKey)?.id ?? null;
@@ -86,14 +88,14 @@ export default function AppSidebar({
<SidebarNavItem
href={currentProjectKey ? apiDocsPath(currentProjectKey) : '#'}
icon={Braces}
- label="API docs"
+ label={t('apiDocs')}
active={onApiDocs}
disabled={disabled}
/>
<SidebarNavItem
href={currentProjectKey ? mcpServerPath(currentProjectKey) : '#'}
icon={Server}
- label="MCP Server"
+ label={t('mcpServer')}
active={onMcp}
disabled={disabled}
/>
@@ -103,7 +105,7 @@ export default function AppSidebar({
<SidebarNavItem
href={godPath(GOD_SECTIONS[0]!.slug)}
icon={Shield}
- label="God mode"
+ label={t('godMode')}
active={false}
disabled={false}
/>
diff --git a/apps/web/src/components/layout/CommandPalette.tsx b/apps/web/src/components/layout/CommandPalette.tsx
index 2d2fad26..6abee9bb 100644
--- a/apps/web/src/components/layout/CommandPalette.tsx
+++ b/apps/web/src/components/layout/CommandPalette.tsx
@@ -1,4 +1,5 @@
import { Fragment, useEffect, useState } from 'react';
+import { useTranslations } from 'next-intl';
import { useDebouncedValue } from '@/hooks/useDebouncedValue';
import { useIssueSearchQuery } from '@/services/issues.service';
import type { Command, CommandPage, CommandSection } from '@/utils/commands';
@@ -36,6 +37,7 @@ export default function CommandPalette({
hasProject: boolean;
onOpenIssue: (sequenceNumber: number) => void;
}) {
+ const t = useTranslations('palette');
const [query, setQuery] = useState('');
const [page, setPage] = useState<CommandPage | null>(null);
@@ -78,7 +80,7 @@ export default function CommandPalette({
return (
<CommandDialog open={open} onOpenChange={onOpenChange} filter={substringFilter}>
<CommandInput
- placeholder={page ? page.placeholder : 'Type a command or search…'}
+ placeholder={page ? page.placeholder : t('placeholder')}
value={query}
onValueChange={setQuery}
// Backspace on an empty input leaves the submenu, the way a nested menu
@@ -91,7 +93,7 @@ export default function CommandPalette({
}}
/>
<CommandList>
- <CommandEmpty>No results found.</CommandEmpty>
+ <CommandEmpty>{t('noResults')}</CommandEmpty>
{page ? (
<CommandGroup heading={page.heading}>
{page.items.map((command) => (
diff --git a/apps/web/src/components/layout/CommandPaletteIssues.tsx b/apps/web/src/components/layout/CommandPaletteIssues.tsx
index 3a74d3d1..b0badfca 100644
--- a/apps/web/src/components/layout/CommandPaletteIssues.tsx
+++ b/apps/web/src/components/layout/CommandPaletteIssues.tsx
@@ -1,4 +1,5 @@
import { Hash } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { IssueSearchHit } from '@/lib/api';
import { ISSUE_PREFIX } from '@/utils/commandFilter';
import { CommandGroup, CommandItem, CommandSeparator } from '@/components/ui/command';
@@ -15,14 +16,15 @@ export default function CommandPaletteIssues({
fetching: boolean;
onOpenIssue: (sequenceNumber: number) => void;
}) {
+ const t = useTranslations('palette');
return (
<>
<CommandSeparator />
- <CommandGroup heading="Issues">
+ <CommandGroup heading={t('issues')}>
{hits.length === 0 && fetching && (
<CommandItem value={`${ISSUE_PREFIX}0`} disabled>
<Hash />
- <span className="text-muted-foreground">Searching…</span>
+ <span className="text-muted-foreground">{t('searching')}</span>
</CommandItem>
)}
{hits.map((issue, i) => (
diff --git a/apps/web/src/components/layout/CopyProjectForm.tsx b/apps/web/src/components/layout/CopyProjectForm.tsx
index d177e086..60da8239 100644
--- a/apps/web/src/components/layout/CopyProjectForm.tsx
+++ b/apps/web/src/components/layout/CopyProjectForm.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import { KEY_MAX_LENGTH } from '@/utils/projectKey';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
@@ -26,15 +27,17 @@ export default function CopyProjectForm({
onDescriptionChange: (value: string) => void;
onIncludeChange: (value: CopyInclude) => void;
}) {
+ const t = useTranslations('newProject');
+
return (
<div className="space-y-4">
<div className="grid gap-3 sm:grid-cols-[1fr_auto]">
<div className="space-y-1.5">
- <Label>Name</Label>
+ <Label>{t('name')}</Label>
<Input autoFocus value={name} onChange={(e) => onNameChange(e.target.value)} />
</div>
<div className="space-y-1.5 sm:w-40">
- <Label>Key</Label>
+ <Label>{t('copyKey')}</Label>
<Input
value={projectKey}
onChange={(e) => onKeyChange(e.target.value)}
@@ -43,7 +46,7 @@ export default function CopyProjectForm({
</div>
</div>
<div className="space-y-1.5">
- <Label>Description</Label>
+ <Label>{t('description')}</Label>
<Textarea
rows={2}
className="resize-none"
diff --git a/apps/web/src/components/layout/CopyProjectOptions.tsx b/apps/web/src/components/layout/CopyProjectOptions.tsx
index 7cf1ef33..0e9530e4 100644
--- a/apps/web/src/components/layout/CopyProjectOptions.tsx
+++ b/apps/web/src/components/layout/CopyProjectOptions.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import { type CopyProjectIncludeKey } from '@/lib/api';
import { Checkbox } from '@/components/ui/checkbox';
@@ -26,41 +27,26 @@ const REQUIRES: Record<CopyProjectIncludeKey, CopyProjectIncludeKey[]> = {
schedules: ['agents'],
};
-const LABELS: Record<CopyProjectIncludeKey, string> = {
- states: 'States',
- issueTypes: 'Issue types',
- labels: 'Labels',
- customFields: 'Custom fields',
- views: 'Views',
- dashboards: 'Dashboards',
- actions: 'Actions',
- configuration: 'Configuration',
- roles: 'Roles',
- notificationProviders: 'Notification providers',
- webhooks: 'Webhooks',
- integrations: 'Integrations',
- tools: 'Tools',
- skills: 'Skills',
- agents: 'Agents',
- schedules: 'Schedules',
+// The name of a group, and of each entity, are messages under `newProject`.
+type Group = {
+ title: 'workflow' | 'automation' | 'aiTeam' | 'project' | 'views';
+ keys: CopyProjectIncludeKey[];
};
-type Group = { title: string; keys: CopyProjectIncludeKey[] };
-
// Groups assigned to the four rendered columns by hand, keeping each column close
// to the same number of rows.
const COLUMNS: Group[][] = [
[
{
- title: 'Workflow',
+ title: 'workflow',
keys: ['states', 'issueTypes', 'labels', 'customFields', 'configuration'],
},
],
- [{ title: 'Automation', keys: ['actions', 'schedules', 'webhooks'] }],
- [{ title: 'AI Team', keys: ['agents', 'integrations', 'skills', 'tools'] }],
+ [{ title: 'automation', keys: ['actions', 'schedules', 'webhooks'] }],
+ [{ title: 'aiTeam', keys: ['agents', 'integrations', 'skills', 'tools'] }],
[
- { title: 'Project', keys: ['roles', 'notificationProviders'] },
- { title: 'Views', keys: ['views', 'dashboards'] },
+ { title: 'project', keys: ['roles', 'notificationProviders'] },
+ { title: 'views', keys: ['views', 'dashboards'] },
],
];
@@ -106,6 +92,7 @@ export default function CopyProjectOptions({
value: CopyInclude;
onChange: (next: CopyInclude) => void;
}) {
+ const t = useTranslations('newProject');
const total = ALL_KEYS.length;
const selectedCount = ALL_KEYS.filter((k) => value[k]).length;
const allOn = selectedCount === total;
@@ -114,7 +101,7 @@ export default function CopyProjectOptions({
<div className="space-y-2">
<div className="flex items-baseline justify-between">
<span className="text-sm font-medium">
- Copy configuration{' '}
+ {t('copyConfiguration')}{' '}
<span className="text-xs font-normal text-muted-foreground tabular-nums">
{selectedCount}/{total}
</span>
@@ -124,7 +111,7 @@ export default function CopyProjectOptions({
className="text-xs text-muted-foreground hover:text-foreground"
onClick={() => onChange(selectAll(!allOn))}
>
- {allOn ? 'Clear all' : 'Select all'}
+ {t(allOn ? 'clearAll' : 'selectAll')}
</button>
</div>
<div className="grid grid-cols-2 gap-x-4 sm:grid-cols-4">
@@ -132,7 +119,7 @@ export default function CopyProjectOptions({
<div key={i} className="space-y-3">
{column.map((group) => (
<div key={group.title} className="space-y-1">
- <p className="text-xs text-muted-foreground">{group.title}</p>
+ <p className="text-xs text-muted-foreground">{t(`copyGroups.${group.title}`)}</p>
{group.keys.map((key) => (
<label
key={key}
@@ -142,7 +129,7 @@ export default function CopyProjectOptions({
checked={value[key]}
onCheckedChange={(c) => onChange(applyToggle(value, key, c === true))}
/>
- {LABELS[key]}
+ {t(`copyItems.${key}`)}
</label>
))}
</div>
diff --git a/apps/web/src/components/layout/CustomFieldMenu.tsx b/apps/web/src/components/layout/CustomFieldMenu.tsx
index e97e2e8a..76ceec31 100644
--- a/apps/web/src/components/layout/CustomFieldMenu.tsx
+++ b/apps/web/src/components/layout/CustomFieldMenu.tsx
@@ -1,5 +1,6 @@
import { useState } from 'react';
import { ChevronDown, ChevronRight, MoreHorizontal } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { CustomField, IssueType } from '@/lib/api';
import type { PropertyKey } from '@/utils/viewSettings';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
@@ -19,6 +20,7 @@ export default function CustomFieldMenu({
selected: Set<string>;
onToggle: (key: PropertyKey) => void;
}) {
+ const t = useTranslations('display.rows');
const [open, setOpen] = useState(false);
const [expandedType, setExpandedType] = useState<number | null>(null);
@@ -34,7 +36,7 @@ export default function CustomFieldMenu({
<PopoverTrigger asChild>
<button
type="button"
- title="Add custom field"
+ title={t('addCustomField')}
className="flex items-center rounded-full border px-2 py-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground"
>
<MoreHorizontal className="size-3.5" />
diff --git a/apps/web/src/components/layout/CycleBreadcrumb.tsx b/apps/web/src/components/layout/CycleBreadcrumb.tsx
index 1f37e60e..70d6ba94 100644
--- a/apps/web/src/components/layout/CycleBreadcrumb.tsx
+++ b/apps/web/src/components/layout/CycleBreadcrumb.tsx
@@ -2,6 +2,7 @@
import Link from 'next/link';
import { ChevronRight } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { cyclesPath } from '@/utils/paths';
import { useCycleQuery } from '@/services/cycles.service';
@@ -14,6 +15,7 @@ export default function CycleBreadcrumb({
projectKey: string | null;
cycleId: number;
}) {
+ const t = useTranslations('nav');
const name = useCycleQuery(cycleId).data?.name;
return (
@@ -22,7 +24,7 @@ export default function CycleBreadcrumb({
href={projectKey ? cyclesPath(projectKey) : '/'}
className="truncate text-muted-foreground hover:text-foreground"
>
- Cycles
+ {t('cycles')}
</Link>
<ChevronRight className="size-3.5 shrink-0 text-muted-foreground" />
<span className="truncate font-medium">{name ?? '…'}</span>
diff --git a/apps/web/src/components/layout/DisplayCalendarRows.tsx b/apps/web/src/components/layout/DisplayCalendarRows.tsx
index 6617f65b..3850c4e8 100644
--- a/apps/web/src/components/layout/DisplayCalendarRows.tsx
+++ b/apps/web/src/components/layout/DisplayCalendarRows.tsx
@@ -1,16 +1,11 @@
+import { useTranslations } from 'next-intl';
import type { DateField, ViewSettings, WeekStart } from '@/utils/viewSettings';
+import { byKey } from '@/utils/messageKey';
import DisplaySettingsRow from '@/components/layout/DisplaySettingsRow';
import DisplaySettingsSelect from '@/components/layout/DisplaySettingsSelect';
-const DATE_FIELD_OPTIONS: { value: DateField; label: string }[] = [
- { value: 'dueDate', label: 'Due date' },
- { value: 'startDate', label: 'Start date' },
-];
-
-const WEEK_START_OPTIONS: { value: string; label: string }[] = [
- { value: '0', label: 'Sunday' },
- { value: '1', label: 'Monday' },
-];
+const DATE_FIELDS: DateField[] = ['dueDate', 'startDate'];
+const WEEK_STARTS = ['0', '1'] as const;
// The Display settings rows that only apply to the Calendar layout.
export default function DisplayCalendarRows({
@@ -20,20 +15,23 @@ export default function DisplayCalendarRows({
settings: ViewSettings;
onChange: (patch: Partial<ViewSettings>) => void;
}) {
+ const t = useTranslations('display.rows');
+ const dateField = byKey(useTranslations('display.dateFields'));
+ const weekStart = byKey(useTranslations('display.weekStart'));
return (
<>
- <DisplaySettingsRow label="Place by">
+ <DisplaySettingsRow label={t('placeBy')}>
<DisplaySettingsSelect
value={settings.calendarDateField}
onChange={(v) => onChange({ calendarDateField: v as DateField })}
- options={DATE_FIELD_OPTIONS}
+ options={DATE_FIELDS.map((value) => ({ value, label: dateField(value) }))}
/>
</DisplaySettingsRow>
- <DisplaySettingsRow label="Start week on">
+ <DisplaySettingsRow label={t('startWeekOn')}>
<DisplaySettingsSelect
value={String(settings.weekStart)}
onChange={(v) => onChange({ weekStart: Number(v) as WeekStart })}
- options={WEEK_START_OPTIONS}
+ options={WEEK_STARTS.map((value) => ({ value, label: weekStart(value) }))}
/>
</DisplaySettingsRow>
</>
diff --git a/apps/web/src/components/layout/DisplayGroupingRows.tsx b/apps/web/src/components/layout/DisplayGroupingRows.tsx
index 58959863..106974f2 100644
--- a/apps/web/src/components/layout/DisplayGroupingRows.tsx
+++ b/apps/web/src/components/layout/DisplayGroupingRows.tsx
@@ -1,6 +1,8 @@
import { ArrowDownNarrowWide, ArrowUpNarrowWide } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { SORT_FIELDS, type SortField, type WorkItemsView } from '@/utils/viewTypes';
import { isFieldEnabled, type GroupField, type ViewSettings } from '@/utils/viewSettings';
+import { byKey } from '@/utils/messageKey';
import { useProjectFeatures } from '@/hooks/useProjectFeatures';
import { Button } from '@/components/ui/button';
import { Checkbox } from '@/components/ui/checkbox';
@@ -11,16 +13,17 @@ import DisplaySettingsSelect from '@/components/layout/DisplaySettingsSelect';
// Timeline and Calendar ignore it.
const ORDERING_VIEWS: WorkItemsView[] = ['kanban', 'table'];
-// Grouping options. Project always groups by something, so it drops 'none'.
-const GROUP_OPTIONS: { value: GroupField; label: string }[] = [
- { value: 'none', label: 'No grouping' },
- { value: 'status', label: 'State' },
- { value: 'assignee', label: 'Assignee' },
- { value: 'delegate', label: 'Delegate' },
- { value: 'priority', label: 'Priority' },
- { value: 'type', label: 'Type' },
- { value: 'initiative', label: 'Initiative' },
- { value: 'cycle', label: 'Cycle' },
+// Grouping fields, in menu order. Project always groups by something, so it drops
+// 'none'.
+const GROUP_FIELDS: GroupField[] = [
+ 'none',
+ 'status',
+ 'assignee',
+ 'delegate',
+ 'priority',
+ 'type',
+ 'initiative',
+ 'cycle',
];
// The grouping, sub-grouping, ordering, empty-group, links and subtasks rows.
@@ -37,25 +40,33 @@ export default function DisplayGroupingRows({
settings: ViewSettings;
onChange: (patch: Partial<ViewSettings>) => void;
}) {
+ const t = useTranslations('display.rows');
+ const groupLabel = byKey(useTranslations('display.groupFields'));
+ const sortLabel = byKey(useTranslations('display.sortFields'));
+
// Changing the primary group clears a sub-group that would now duplicate it.
const setGroup = (group: GroupField) =>
onChange(group === settings.subgroup ? { group, subgroup: 'none' } : { group });
// Initiative and Cycle are only offered while the project shows their section.
const features = useProjectFeatures();
- const options = GROUP_OPTIONS.filter((o) => isFieldEnabled(o.value, features));
+ const fields = GROUP_FIELDS.filter((f) => isFieldEnabled(f, features));
+ const toOptions = (values: GroupField[]) =>
+ values.map((value) => ({ value, label: groupLabel(value) }));
- const groupOptions =
- view === 'kanban' || view === 'timeline' ? options.filter((o) => o.value !== 'none') : options;
+ const groupOptions = toOptions(
+ view === 'kanban' || view === 'timeline' ? fields.filter((f) => f !== 'none') : fields,
+ );
// The sub-group never offers the field already used by the primary group.
- const subgroupOptions = options.filter((o) => o.value !== settings.group);
+ const subgroupOptions = toOptions(fields.filter((f) => f !== settings.group));
+ const sortOptions = SORT_FIELDS.map((value) => ({ value, label: sortLabel(value) }));
const showsGrouping = view === 'kanban' || view === 'table' || view === 'timeline';
const showsSubgrouping = (view === 'kanban' || view === 'table') && settings.group !== 'none';
return (
<>
{showsGrouping && (
- <DisplaySettingsRow label={view === 'kanban' ? 'Columns' : 'Grouping'}>
+ <DisplaySettingsRow label={view === 'kanban' ? t('columns') : t('grouping')}>
<DisplaySettingsSelect
value={settings.group}
onChange={(v) => setGroup(v as GroupField)}
@@ -65,7 +76,7 @@ export default function DisplayGroupingRows({
)}
{showsSubgrouping && (
- <DisplaySettingsRow label={view === 'kanban' ? 'Swimlanes' : 'Sub-grouping'}>
+ <DisplaySettingsRow label={view === 'kanban' ? t('swimlanes') : t('subGrouping')}>
<DisplaySettingsSelect
value={settings.subgroup}
onChange={(v) => onChange({ subgroup: v as GroupField })}
@@ -75,13 +86,13 @@ export default function DisplayGroupingRows({
)}
{ORDERING_VIEWS.includes(view) && (
- <DisplaySettingsRow label="Ordering">
+ <DisplaySettingsRow label={t('ordering')}>
<Button
variant="outline"
size="icon"
className="size-8 shrink-0"
disabled={settings.sort.field === 'manual'}
- title={settings.sort.dir === 'asc' ? 'Ascending' : 'Descending'}
+ title={settings.sort.dir === 'asc' ? t('ascending') : t('descending')}
onClick={() =>
onChange({
sort: { ...settings.sort, dir: settings.sort.dir === 'asc' ? 'desc' : 'asc' },
@@ -93,13 +104,15 @@ export default function DisplayGroupingRows({
<DisplaySettingsSelect
value={settings.sort.field}
onChange={(v) => onChange({ sort: { ...settings.sort, field: v as SortField } })}
- options={SORT_FIELDS}
+ options={sortOptions}
/>
</DisplaySettingsRow>
)}
{showsGrouping && settings.group !== 'none' && (
- <DisplaySettingsRow label={view === 'kanban' ? 'Show empty columns' : 'Show empty groups'}>
+ <DisplaySettingsRow
+ label={view === 'kanban' ? t('showEmptyColumns') : t('showEmptyGroups')}
+ >
<Checkbox
checked={settings.showEmptyGroups}
onCheckedChange={(c) => onChange({ showEmptyGroups: c === true })}
@@ -109,7 +122,7 @@ export default function DisplayGroupingRows({
{showsGrouping && (
<>
- <DisplaySettingsRow label="Show links">
+ <DisplaySettingsRow label={t('showLinks')}>
<Checkbox
checked={settings.showLinks}
onCheckedChange={(c) => onChange({ showLinks: c === true })}
@@ -119,11 +132,7 @@ export default function DisplayGroupingRows({
{features.subtasks && (
<>
<DisplaySettingsRow
- label={
- view === 'kanban'
- ? 'Show subtasks as separate cards'
- : 'Show subtasks as separate rows'
- }
+ label={view === 'kanban' ? t('separateSubtaskCards') : t('separateSubtaskRows')}
>
<Checkbox
checked={settings.separateSubtasks}
@@ -132,7 +141,7 @@ export default function DisplayGroupingRows({
</DisplaySettingsRow>
{view === 'timeline' && (
- <DisplaySettingsRow label="Show nested subtasks">
+ <DisplaySettingsRow label={t('showNestedSubtasks')}>
<Checkbox
checked={settings.showSubtasks}
onCheckedChange={(c) => onChange({ showSubtasks: c === true })}
diff --git a/apps/web/src/components/layout/DisplayLayoutTabs.tsx b/apps/web/src/components/layout/DisplayLayoutTabs.tsx
index 6ac9b47b..36120713 100644
--- a/apps/web/src/components/layout/DisplayLayoutTabs.tsx
+++ b/apps/web/src/components/layout/DisplayLayoutTabs.tsx
@@ -1,3 +1,5 @@
+import { useTranslations } from 'next-intl';
+import { byKey } from '@/utils/messageKey';
import { useHotkeyFormatter } from '@/context/useHotkeys';
import { cn } from '@/lib/utils';
import { VIEWS, type WorkItemsView } from '@/utils/viewTypes';
@@ -13,22 +15,26 @@ export default function DisplayLayoutTabs({
view: WorkItemsView;
onViewChange: (view: WorkItemsView) => void;
}) {
+ const t = byKey(useTranslations('display.layouts'));
const hotkey = useHotkeyFormatter();
return (
<Tabs value={view} onValueChange={(v) => onViewChange(v as WorkItemsView)}>
<TabsList className="w-full">
- {VIEWS.map(({ value, label, icon: Icon, hotkey: id }) => (
- <TabsTrigger
- key={value}
- value={value}
- title={hotkey(id) ? `${label} (${hotkey(id)})` : label}
- className={cn('min-w-0 gap-1.5 px-1.5', value === view ? 'flex-1' : 'flex-none')}
- >
- <Icon className="size-3.5" />
- {value === view && <span className="truncate text-xs">{label}</span>}
- </TabsTrigger>
- ))}
+ {VIEWS.map(({ value, icon: Icon, hotkey: id }) => {
+ const label = t(value);
+ return (
+ <TabsTrigger
+ key={value}
+ value={value}
+ title={hotkey(id) ? `${label} (${hotkey(id)})` : label}
+ className={cn('min-w-0 gap-1.5 px-1.5', value === view ? 'flex-1' : 'flex-none')}
+ >
+ <Icon className="size-3.5" />
+ {value === view && <span className="truncate text-xs">{label}</span>}
+ </TabsTrigger>
+ );
+ })}
</TabsList>
</Tabs>
);
diff --git a/apps/web/src/components/layout/DisplayPopover.tsx b/apps/web/src/components/layout/DisplayPopover.tsx
index b0e580a6..19487ca1 100644
--- a/apps/web/src/components/layout/DisplayPopover.tsx
+++ b/apps/web/src/components/layout/DisplayPopover.tsx
@@ -1,5 +1,6 @@
import { useState } from 'react';
import { SlidersHorizontal } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { CustomField, IssueType } from '@/lib/api';
import type { ViewSettings } from '@/utils/viewSettings';
import type { WorkItemsView } from '@/utils/viewTypes';
@@ -24,13 +25,14 @@ export default function DisplayPopover({
customFields: CustomField[];
issueTypes: IssueType[];
}) {
+ const t = useTranslations('display');
const [open, setOpen] = useState(false);
return (
<Popover open={open} onOpenChange={setOpen}>
<PopoverTrigger asChild>
<button
type="button"
- title="Display"
+ title={t('title')}
className={cn(
'rounded-md p-1.5 hover:bg-accent hover:text-foreground',
open ? 'bg-accent text-foreground' : 'text-muted-foreground',
diff --git a/apps/web/src/components/layout/DisplayPropertiesSection.tsx b/apps/web/src/components/layout/DisplayPropertiesSection.tsx
index ff18a129..fcc1496e 100644
--- a/apps/web/src/components/layout/DisplayPropertiesSection.tsx
+++ b/apps/web/src/components/layout/DisplayPropertiesSection.tsx
@@ -1,3 +1,5 @@
+import { useTranslations } from 'next-intl';
+import { byKey } from '@/utils/messageKey';
import type { CustomField, IssueType } from '@/lib/api';
import {
offeredDisplayProperties,
@@ -27,6 +29,8 @@ export default function DisplayPropertiesSection({
customFields: CustomField[];
issueTypes: IssueType[];
}) {
+ const t = useTranslations('display');
+ const property = byKey(useTranslations('display.properties'));
const features = useProjectFeatures();
const properties = offeredDisplayProperties(features);
@@ -41,7 +45,7 @@ export default function DisplayPropertiesSection({
const subtasksChip = features.subtasks ? (
<PropertyChip
- label="Nested subtasks"
+ label={t('rows.nestedSubtasks')}
on={settings.showSubtasks}
onClick={() => onChange({ showSubtasks: !settings.showSubtasks })}
/>
@@ -49,7 +53,9 @@ export default function DisplayPropertiesSection({
return (
<div className="space-y-3 border-t pt-2">
- <p className="px-1 text-xs font-medium text-muted-foreground">Display properties</p>
+ <p className="px-1 text-xs font-medium text-muted-foreground">
+ {t('rows.displayProperties')}
+ </p>
<div className="flex flex-wrap items-center gap-1 px-1">
{view === 'table' ? (
<TableProperties
@@ -63,10 +69,10 @@ export default function DisplayPropertiesSection({
<>
{properties.map((p) => (
<PropertyChip
- key={p.value}
- label={p.label}
- on={settings.properties.includes(p.value)}
- onClick={() => toggleProperty(p.value)}
+ key={p}
+ label={property(p)}
+ on={settings.properties.includes(p)}
+ onClick={() => toggleProperty(p)}
/>
))}
{subtasksChip}
diff --git a/apps/web/src/components/layout/DisplayTimelineRows.tsx b/apps/web/src/components/layout/DisplayTimelineRows.tsx
index d593ccfe..0ef058ad 100644
--- a/apps/web/src/components/layout/DisplayTimelineRows.tsx
+++ b/apps/web/src/components/layout/DisplayTimelineRows.tsx
@@ -1,13 +1,11 @@
+import { useTranslations } from 'next-intl';
import type { TimelineScale, ViewSettings } from '@/utils/viewSettings';
+import { byKey } from '@/utils/messageKey';
import { Checkbox } from '@/components/ui/checkbox';
import DisplaySettingsRow from '@/components/layout/DisplaySettingsRow';
import DisplaySettingsSelect from '@/components/layout/DisplaySettingsSelect';
-const SCALE_OPTIONS: { value: TimelineScale; label: string }[] = [
- { value: 'week', label: 'Week' },
- { value: 'month', label: 'Month' },
- { value: 'quarter', label: 'Quarter' },
-];
+const SCALES: TimelineScale[] = ['week', 'month', 'quarter'];
// The Display settings rows that only apply to the Timeline layout.
export default function DisplayTimelineRows({
@@ -17,19 +15,21 @@ export default function DisplayTimelineRows({
settings: ViewSettings;
onChange: (patch: Partial<ViewSettings>) => void;
}) {
+ const t = useTranslations('display.rows');
+ const scale = byKey(useTranslations('display.timelineScales'));
return (
<>
- <DisplaySettingsRow label="Start with groups collapsed">
+ <DisplaySettingsRow label={t('startCollapsed')}>
<Checkbox
checked={settings.timelineCollapseAll}
onCheckedChange={(checked) => onChange({ timelineCollapseAll: checked === true })}
/>
</DisplaySettingsRow>
- <DisplaySettingsRow label="Scale">
+ <DisplaySettingsRow label={t('scale')}>
<DisplaySettingsSelect
value={settings.timelineScale}
onChange={(v) => onChange({ timelineScale: v as TimelineScale })}
- options={SCALE_OPTIONS}
+ options={SCALES.map((value) => ({ value, label: scale(value) }))}
/>
</DisplaySettingsRow>
</>
diff --git a/apps/web/src/components/layout/FilterBar.tsx b/apps/web/src/components/layout/FilterBar.tsx
index 4cf5a53e..fab7869f 100644
--- a/apps/web/src/components/layout/FilterBar.tsx
+++ b/apps/web/src/components/layout/FilterBar.tsx
@@ -1,8 +1,10 @@
-import { useMemo, useState } from 'react';
+import { useState } from 'react';
import { Plus } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { ProjectDetail, CustomField } from '@/lib/api';
import type { FilterCondition, FilterSet } from '@/utils/filters';
-import { buildFieldSpecs, newCondition, type FieldSpec } from '@/utils/filterFields';
+import type { FieldSpec } from '@/utils/filterFields';
+import { newCondition, useFilterFields } from '@/hooks/useFilterFields';
import { Button } from '@/components/ui/button';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
import FilterConditionPill from '@/components/layout/FilterConditionPill';
@@ -20,9 +22,11 @@ export default function FilterBar({
project: ProjectDetail;
customFields: CustomField[];
}) {
+ const t = useTranslations('filters');
+ const { fieldSpecs } = useFilterFields();
const [addOpen, setAddOpen] = useState(false);
- const specs = useMemo(() => buildFieldSpecs(project, customFields), [project, customFields]);
- const specByField = useMemo(() => new Map(specs.map((s) => [s.field, s])), [specs]);
+ const specs = fieldSpecs(project, customFields);
+ const specByField = new Map(specs.map((s) => [s.field, s]));
const update = (id: string, patch: Partial<FilterCondition>) =>
onChange({ conditions: filters.conditions.map((c) => (c.id === id ? { ...c, ...patch } : c)) });
@@ -55,7 +59,7 @@ export default function FilterBar({
<Popover open={addOpen} onOpenChange={setAddOpen}>
<PopoverTrigger asChild>
- <Button variant="ghost" size="icon" className="size-6" title="Add filter">
+ <Button variant="ghost" size="icon" className="size-6" title={t('add')}>
<Plus className="size-3.5" />
</Button>
</PopoverTrigger>
diff --git a/apps/web/src/components/layout/FilterConditionPill.tsx b/apps/web/src/components/layout/FilterConditionPill.tsx
index 15a31ff7..a2c92205 100644
--- a/apps/web/src/components/layout/FilterConditionPill.tsx
+++ b/apps/web/src/components/layout/FilterConditionPill.tsx
@@ -1,7 +1,9 @@
import { X } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { ProjectDetail } from '@/lib/api';
import type { FilterCondition, FilterOperator, FilterValue } from '@/utils/filters';
-import { OPERATOR_LABELS, OPERATORS_BY_KIND, type FieldSpec } from '@/utils/filterFields';
+import { OPERATORS_BY_KIND, type FieldSpec } from '@/utils/filterFields';
+import { useFilterFields } from '@/hooks/useFilterFields';
import {
Select,
SelectContent,
@@ -28,6 +30,8 @@ export default function FilterConditionPill({
onValuesChange: (values: FilterValue[]) => void;
onRemove: () => void;
}) {
+ const t = useTranslations('filters');
+ const { operatorLabel } = useFilterFields();
return (
<div className="flex items-center gap-1 rounded-md border bg-muted/60 py-0.5 pr-0.5 pl-2 text-xs">
<span className="font-medium text-foreground">{spec.label}</span>
@@ -41,7 +45,7 @@ export default function FilterConditionPill({
<SelectContent>
{OPERATORS_BY_KIND[spec.kind].map((op) => (
<SelectItem key={op} value={op}>
- {OPERATOR_LABELS[op]}
+ {operatorLabel(op)}
</SelectItem>
))}
</SelectContent>
@@ -50,7 +54,7 @@ export default function FilterConditionPill({
<button
type="button"
onClick={onRemove}
- title="Remove filter"
+ title={t('remove')}
className="rounded p-0.5 hover:bg-accent"
>
<X className="size-3.5" />
diff --git a/apps/web/src/components/layout/FilterValueEditor.tsx b/apps/web/src/components/layout/FilterValueEditor.tsx
index c9e98052..3621032d 100644
--- a/apps/web/src/components/layout/FilterValueEditor.tsx
+++ b/apps/web/src/components/layout/FilterValueEditor.tsx
@@ -1,7 +1,9 @@
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import type { ProjectDetail } from '@/lib/api';
import type { FilterCondition, FilterValue } from '@/utils/filters';
-import { BOOLEAN_OPTIONS, valuesLabel, type FieldSpec } from '@/utils/filterFields';
+import type { FieldSpec } from '@/utils/filterFields';
+import { useFilterFields } from '@/hooks/useFilterFields';
import { cn } from '@/lib/utils';
import { Input } from '@/components/ui/input';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
@@ -21,6 +23,8 @@ export default function FilterValueEditor({
onChange: (values: FilterValue[]) => void;
project: ProjectDetail;
}) {
+ const t = useTranslations('filters');
+ const { booleanOptions, valuesLabel } = useFilterFields();
const [open, setOpen] = useState(false);
if (cond.op === 'is_set' || cond.op === 'is_not_set') return null;
@@ -58,7 +62,7 @@ export default function FilterValueEditor({
return (
<Input
value={current}
- placeholder="value"
+ placeholder={t('valuePlaceholder')}
onChange={(e) => onChange(e.target.value ? [e.target.value] : [])}
className="h-6 w-36 px-1.5 py-0 text-xs"
/>
@@ -71,7 +75,7 @@ export default function FilterValueEditor({
<Input
type="number"
value={current}
- placeholder="value"
+ placeholder={t('valuePlaceholder')}
onChange={(e) => onChange(e.target.value === '' ? [] : [Number(e.target.value)])}
className="h-6 w-24 px-1.5 py-0 text-xs"
/>
@@ -79,7 +83,7 @@ export default function FilterValueEditor({
}
// set / boolean — a popover with a checkbox list; multiple values OR together.
- const options = spec.kind === 'boolean' ? BOOLEAN_OPTIONS : (spec.options ?? []);
+ const options = spec.kind === 'boolean' ? booleanOptions : (spec.options ?? []);
const toggle = (value: FilterValue) => {
const has = cond.values.some((v) => v === value);
onChange(has ? cond.values.filter((v) => v !== value) : [...cond.values, value]);
@@ -114,7 +118,7 @@ export default function FilterValueEditor({
);
})}
{options.length === 0 && (
- <p className="px-2 py-1 text-sm text-muted-foreground">No options</p>
+ <p className="px-2 py-1 text-sm text-muted-foreground">{t('noOptions')}</p>
)}
</PopoverContent>
</Popover>
diff --git a/apps/web/src/components/layout/GodShell.tsx b/apps/web/src/components/layout/GodShell.tsx
index 2e383e02..33d675a7 100644
--- a/apps/web/src/components/layout/GodShell.tsx
+++ b/apps/web/src/components/layout/GodShell.tsx
@@ -1,10 +1,12 @@
'use client';
import { useEffect, useState, type ReactNode } from 'react';
+import { useTranslations } from 'next-intl';
import { useSession } from '@/lib/auth-client';
import { SidebarInset, SidebarProvider, SidebarTrigger } from '@/components/ui/sidebar';
import { Separator } from '@/components/ui/separator';
import { ThemeToggle } from '@/components/theme-toggle';
+import { LocaleToggle } from '@/components/locale-toggle';
import GodPageSkeleton from '@/components/common/skeleton/GodPageSkeleton';
import UserMenu from '@/components/layout/UserMenu';
import GodSidebar from '@/components/layout/GodSidebar';
@@ -23,6 +25,7 @@ export default function GodShell({
defaultSidebarOpen: boolean;
children: ReactNode;
}) {
+ const t = useTranslations('nav');
const { data: session, isPending } = useSession();
// The session can already be in the store on hydration while the server rendered
// without it, so the role is only read after mount.
@@ -38,8 +41,9 @@ export default function GodShell({
<header className="flex h-12 shrink-0 items-center gap-2 border-b px-2 sm:px-4">
<SidebarTrigger />
<Separator orientation="vertical" className="mr-1 h-4" />
- <div className="min-w-0 truncate text-sm font-medium">God mode</div>
+ <div className="min-w-0 truncate text-sm font-medium">{t('godMode')}</div>
<div className="ml-auto flex items-center gap-2">
+ <LocaleToggle />
<ThemeToggle />
<UserMenu />
</div>
@@ -49,7 +53,7 @@ export default function GodShell({
{isGod && children}
{!isGod && sessionSettled && (
<div className="flex h-full items-center justify-center px-4 text-center text-sm text-muted-foreground">
- God mode is open to the instance owner only.
+ {t('godModeOwnerOnly')}
</div>
)}
{!isGod && !sessionSettled && <GodPageSkeleton />}
diff --git a/apps/web/src/components/layout/GodSidebar.tsx b/apps/web/src/components/layout/GodSidebar.tsx
index bc45c13b..1630d3cd 100644
--- a/apps/web/src/components/layout/GodSidebar.tsx
+++ b/apps/web/src/components/layout/GodSidebar.tsx
@@ -2,8 +2,10 @@
import { usePathname } from 'next/navigation';
import { ArrowLeft, Plug, Shield } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { godPath } from '@/utils/paths';
import { GOD_GROUPS, godIntegrationsIn, godSectionsIn } from '@/utils/godSections';
+import { useGodSectionText } from '@/hooks/useSectionLabels';
import {
Sidebar,
SidebarContent,
@@ -27,6 +29,8 @@ import SidebarBrandFooter from '@/components/brand/SidebarBrandFooter';
// but the header shows a static "God mode" badge instead of the project switcher:
// nothing here is scoped to a project.
export default function GodSidebar() {
+ const t = useTranslations('nav');
+ const god = useGodSectionText();
const pathname = usePathname();
return (
@@ -40,8 +44,10 @@ export default function GodSidebar() {
<Shield className="size-4" />
</div>
<div className="grid flex-1 text-left leading-tight">
- <span className="truncate text-sm font-semibold">God mode</span>
- <span className="truncate text-xs text-muted-foreground">Instance settings</span>
+ <span className="truncate text-sm font-semibold">{t('godMode')}</span>
+ <span className="truncate text-xs text-muted-foreground">
+ {t('instanceSettings')}
+ </span>
</div>
</div>
</SidebarMenuButton>
@@ -56,7 +62,7 @@ export default function GodSidebar() {
<SidebarNavItem
href="/"
icon={ArrowLeft}
- label="Back to app"
+ label={t('backToApp')}
active={false}
disabled={false}
/>
@@ -69,12 +75,12 @@ export default function GodSidebar() {
key: section.slug,
href: godPath(section.slug),
icon: section.icon,
- label: section.label,
+ label: god.section(section.slug).label,
active: pathname.startsWith(`/god/${section.slug}`),
}));
return (
<SidebarGroup key={group}>
- <SidebarGroupLabel>{group}</SidebarGroupLabel>
+ <SidebarGroupLabel>{god.group(group)}</SidebarGroupLabel>
<SidebarGroupContent>
<SidebarMenu>
{godSectionsIn(group).map((section) => (
@@ -82,13 +88,13 @@ export default function GodSidebar() {
key={section.slug}
href={godPath(section.slug)}
icon={section.icon}
- label={section.label}
+ label={god.section(section.slug).label}
active={pathname.startsWith(`/god/${section.slug}`)}
disabled={false}
/>
))}
{integrations.length > 0 && (
- <SidebarNavSubmenu icon={Plug} label="Integrations" items={integrations} />
+ <SidebarNavSubmenu icon={Plug} label={t('integrations')} items={integrations} />
)}
</SidebarMenu>
</SidebarGroupContent>
diff --git a/apps/web/src/components/layout/InitiativeBreadcrumb.tsx b/apps/web/src/components/layout/InitiativeBreadcrumb.tsx
index 031b87cd..2712af27 100644
--- a/apps/web/src/components/layout/InitiativeBreadcrumb.tsx
+++ b/apps/web/src/components/layout/InitiativeBreadcrumb.tsx
@@ -1,5 +1,6 @@
import Link from 'next/link';
import { ChevronRight } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { initiativesPath } from '@/utils/paths';
import InitiativeBreadcrumbName from '@/components/layout/InitiativeBreadcrumbName';
@@ -11,13 +12,14 @@ export default function InitiativeBreadcrumb({
projectKey: string | null;
initiativeId: number;
}) {
+ const t = useTranslations('nav');
return (
<span className="flex min-w-0 items-center gap-1.5">
<Link
href={projectKey ? initiativesPath(projectKey) : '/'}
className="truncate text-muted-foreground hover:text-foreground"
>
- Initiatives
+ {t('initiatives')}
</Link>
<ChevronRight className="size-3.5 shrink-0 text-muted-foreground" />
{projectKey && (
diff --git a/apps/web/src/components/layout/InitiativeBreadcrumbName.tsx b/apps/web/src/components/layout/InitiativeBreadcrumbName.tsx
index bf8c29a0..981509b0 100644
--- a/apps/web/src/components/layout/InitiativeBreadcrumbName.tsx
+++ b/apps/web/src/components/layout/InitiativeBreadcrumbName.tsx
@@ -1,6 +1,7 @@
'use client';
import { useEffect, useState } from 'react';
+import { useTranslations } from 'next-intl';
import { usePermissions } from '@/hooks/usePermissions';
import { useInitiativeQuery, useUpdateInitiative } from '@/services/initiatives.service';
import { Input } from '@/components/ui/input';
@@ -15,6 +16,7 @@ export default function InitiativeBreadcrumbName({
initiativeId: number;
projectKey: string;
}) {
+ const t = useTranslations('nav');
const { can } = usePermissions();
const { data } = useInitiativeQuery(initiativeId);
const update = useUpdateInitiative(projectKey);
@@ -59,7 +61,7 @@ export default function InitiativeBreadcrumbName({
<span
className={`truncate font-medium ${canEdit ? 'cursor-text' : ''}`}
onDoubleClick={canEdit ? () => setEditing(true) : undefined}
- title={canEdit ? 'Double-click to rename' : undefined}
+ title={canEdit ? t('doubleClickToRename') : undefined}
>
{title}
</span>
diff --git a/apps/web/src/components/layout/MobileViewSwitcher.tsx b/apps/web/src/components/layout/MobileViewSwitcher.tsx
index 5e75dc6e..fbaff097 100644
--- a/apps/web/src/components/layout/MobileViewSwitcher.tsx
+++ b/apps/web/src/components/layout/MobileViewSwitcher.tsx
@@ -1,5 +1,6 @@
import { useState } from 'react';
import { Check, ChevronDown, Layers, Plus } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { View } from '@/lib/api';
import { cn } from '@/lib/utils';
import { ViewIcon } from '@/utils/viewIcons';
@@ -30,6 +31,7 @@ export default function MobileViewSwitcher({
onSelect: (id: number | null) => void;
onNewView: () => void;
}) {
+ const t = useTranslations('views');
const [open, setOpen] = useState(false);
const active = activeViewId != null ? (views.find((v) => v.id === activeViewId) ?? null) : null;
return (
@@ -37,7 +39,7 @@ export default function MobileViewSwitcher({
<PopoverTrigger asChild>
<button
type="button"
- title="Switch view"
+ title={t('switchView')}
className="flex h-8 min-w-0 items-center gap-1.5 rounded-md border px-3 text-sm whitespace-nowrap transition-colors hover:bg-accent"
>
{active ? (
@@ -45,19 +47,19 @@ export default function MobileViewSwitcher({
) : (
<Layers className="size-4 shrink-0" />
)}
- <span className="truncate font-medium">{active ? active.name : 'All'}</span>
+ <span className="truncate font-medium">{active ? active.name : t('all')}</span>
<ChevronDown className="size-4 shrink-0 text-muted-foreground" />
</button>
</PopoverTrigger>
<PopoverContent align="start" className="w-56 p-0">
<Command>
- <CommandInput placeholder="Search views…" />
+ <CommandInput placeholder={t('searchViews')} />
<CommandList>
- <CommandEmpty>No views found.</CommandEmpty>
+ <CommandEmpty>{t('noViews')}</CommandEmpty>
<CommandGroup>
<CommandItem
value="__all__"
- keywords={['All']}
+ keywords={[t('all')]}
onSelect={() => {
onSelect(null);
setOpen(false);
@@ -65,7 +67,7 @@ export default function MobileViewSwitcher({
className={cn(activeViewId === null && 'bg-accent/50')}
>
<Layers className="size-4" />
- <span className="min-w-0 flex-1 truncate">All</span>
+ <span className="min-w-0 flex-1 truncate">{t('all')}</span>
{activeViewId === null && <Check className="size-4 shrink-0" />}
</CommandItem>
{views.map((v) => (
@@ -88,14 +90,14 @@ export default function MobileViewSwitcher({
{canCreate && (
<CommandGroup>
<CommandItem
- value="New view"
+ value={t('newView')}
onSelect={() => {
onNewView();
setOpen(false);
}}
>
<Plus className="size-4" />
- New view
+ {t('newView')}
</CommandItem>
</CommandGroup>
)}
diff --git a/apps/web/src/components/layout/NewProjectForm.tsx b/apps/web/src/components/layout/NewProjectForm.tsx
index 47d65678..69cfc6c6 100644
--- a/apps/web/src/components/layout/NewProjectForm.tsx
+++ b/apps/web/src/components/layout/NewProjectForm.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import { KEY_MAX_LENGTH } from '@/utils/projectKey';
import type { PresetKey } from '@/utils/projectPresets';
import { Input } from '@/components/ui/input';
@@ -26,17 +27,19 @@ export default function NewProjectForm({
onDescriptionChange: (value: string) => void;
onPresetChange: (value: PresetKey) => void;
}) {
+ const t = useTranslations('newProject');
+
return (
<div className="grid gap-6 sm:grid-cols-[1.15fr_1fr]">
{/* The description field takes the leftover height so both columns end on
the same line. */}
<div className="flex flex-col gap-3">
<div className="space-y-1.5">
- <Label>Name</Label>
+ <Label>{t('name')}</Label>
<Input autoFocus value={name} onChange={(e) => onNameChange(e.target.value)} />
</div>
<div className="space-y-1.5">
- <Label>Key (short, e.g. MKT)</Label>
+ <Label>{t('key')}</Label>
<Input
value={projectKey}
onChange={(e) => onKeyChange(e.target.value)}
@@ -44,7 +47,7 @@ export default function NewProjectForm({
/>
</div>
<div className="flex flex-1 flex-col space-y-1.5">
- <Label>Description</Label>
+ <Label>{t('description')}</Label>
<Textarea
rows={2}
className="min-h-20 flex-1 resize-none"
diff --git a/apps/web/src/components/layout/NewProjectModal.tsx b/apps/web/src/components/layout/NewProjectModal.tsx
index 53f4cba3..ac660d66 100644
--- a/apps/web/src/components/layout/NewProjectModal.tsx
+++ b/apps/web/src/components/layout/NewProjectModal.tsx
@@ -1,4 +1,5 @@
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import { type Project } from '@/lib/api';
import { useCreateProject } from '@/services/projects.service';
import { normalizeKey, suggestKey } from '@/utils/projectKey';
@@ -21,7 +22,8 @@ export default function NewProjectModal({
onCreated: (projectKey: string) => void;
copyFrom?: Project;
}) {
- const initialName = copyFrom ? `${copyFrom.name} copy` : '';
+ const t = useTranslations('newProject');
+ const initialName = copyFrom ? t('copyName', { name: copyFrom.name }) : '';
const [key, setKey] = useState(() => suggestKey(initialName));
const [name, setName] = useState(initialName);
const [description, setDescription] = useState(copyFrom?.description ?? '');
@@ -62,7 +64,7 @@ export default function NewProjectModal({
return (
<Modal
- title={copyFrom ? `Copy project "${copyFrom.name}"` : 'New project'}
+ title={copyFrom ? t('copyTitle', { name: copyFrom.name }) : t('title')}
onClose={onClose}
wide="xl"
>
@@ -99,7 +101,7 @@ export default function NewProjectModal({
disabled={createProject.isPending || !key.trim() || !name.trim()}
onClick={submit}
>
- {copyFrom ? 'Copy project' : 'Create project'}
+ {t(copyFrom ? 'copyAction' : 'create')}
</Button>
</div>
</Modal>
diff --git a/apps/web/src/components/layout/NewProjectPreset.tsx b/apps/web/src/components/layout/NewProjectPreset.tsx
index 62945bc9..78353afd 100644
--- a/apps/web/src/components/layout/NewProjectPreset.tsx
+++ b/apps/web/src/components/layout/NewProjectPreset.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import { PRESETS, type PresetKey } from '@/utils/projectPresets';
// Picks the set of issue types a new project starts with and previews the result.
@@ -10,15 +11,16 @@ export default function NewProjectPreset({
value: PresetKey;
onChange: (next: PresetKey) => void;
}) {
+ const t = useTranslations('newProject');
const selected = PRESETS.find((p) => p.key === value) ?? PRESETS[0];
return (
<div className="space-y-2">
- <span className="block text-sm font-medium">Issue types</span>
+ <span className="block text-sm font-medium">{t('issueTypes')}</span>
<div
role="radiogroup"
- aria-label="Issue types"
+ aria-label={t('issueTypes')}
className="grid grid-cols-2 gap-x-2 gap-y-0.5"
>
{PRESETS.map((preset) => (
@@ -34,7 +36,7 @@ export default function NewProjectPreset({
: 'text-muted-foreground hover:bg-accent hover:text-accent-foreground'
}`}
>
- {preset.label}
+ {t(`presets.${preset.key}`)}
</button>
))}
</div>
@@ -43,8 +45,7 @@ export default function NewProjectPreset({
the block keeps its height when the selection changes. */}
<div className="space-y-2 rounded-lg bg-muted/60 p-3">
<p className="text-xs text-muted-foreground">
- {selected.types.length} issue {selected.types.length === 1 ? 'type' : 'types'} will be
- created
+ {t('typesCreated', { count: selected.types.length })}
</p>
<div className="flex min-h-11 flex-wrap content-start gap-x-3 gap-y-1 text-sm">
{selected.types.map((type) => (
@@ -58,7 +59,7 @@ export default function NewProjectPreset({
))}
</div>
<p className="text-xs text-muted-foreground">
- New issues get {selected.types[0].name} by default. Types are editable in settings.
+ {t('defaultType', { type: selected.types[0].name })}
</p>
</div>
</div>
diff --git a/apps/web/src/components/layout/ProjectSwitcher.tsx b/apps/web/src/components/layout/ProjectSwitcher.tsx
index 251e2270..266c25f4 100644
--- a/apps/web/src/components/layout/ProjectSwitcher.tsx
+++ b/apps/web/src/components/layout/ProjectSwitcher.tsx
@@ -1,4 +1,5 @@
import Link from 'next/link';
+import { useTranslations } from 'next-intl';
import { ChevronsUpDown, Plus, Settings2, SquareKanban } from 'lucide-react';
import type { Project } from '@/lib/api';
import { manageProjectsPath } from '@/utils/paths';
@@ -31,6 +32,7 @@ export default function ProjectSwitcher({
onSelectProject: (key: string) => void;
onNewProject: () => void;
}) {
+ const t = useTranslations('nav');
const { isMobile } = useSidebar();
const current = projects.find((b) => b.key === currentProjectKey);
@@ -48,7 +50,7 @@ export default function ProjectSwitcher({
<SquareKanban className="size-4" />
</div>
<div className="grid flex-1 text-left text-sm leading-tight">
- <span className="truncate font-medium">{current?.name ?? 'No projects yet'}</span>
+ <span className="truncate font-medium">{current?.name ?? t('noProjects')}</span>
<span className="truncate text-xs text-muted-foreground">
{current?.key ?? '—'}
</span>
@@ -63,7 +65,7 @@ export default function ProjectSwitcher({
sideOffset={4}
>
<DropdownMenuLabel className="text-xs text-muted-foreground">
- Projects
+ {t('projects')}
</DropdownMenuLabel>
{projects.map((b, i) => (
<DropdownMenuItem
@@ -86,14 +88,14 @@ export default function ProjectSwitcher({
<div className="flex size-6 items-center justify-center rounded-md border bg-background">
<Plus className="size-4" />
</div>
- <span className="font-medium text-muted-foreground">New project</span>
+ <span className="font-medium text-muted-foreground">{t('newProject')}</span>
</DropdownMenuItem>
<DropdownMenuItem asChild className="gap-2 p-2">
<Link href={manageProjectsPath()}>
<div className="flex size-6 items-center justify-center rounded-md border bg-background">
<Settings2 className="size-4" />
</div>
- <span className="font-medium text-muted-foreground">Manage projects</span>
+ <span className="font-medium text-muted-foreground">{t('manageProjects')}</span>
</Link>
</DropdownMenuItem>
</DropdownMenuContent>
diff --git a/apps/web/src/components/layout/ReleaseNotes.tsx b/apps/web/src/components/layout/ReleaseNotes.tsx
index 3bd2d959..19ecd2da 100644
--- a/apps/web/src/components/layout/ReleaseNotes.tsx
+++ b/apps/web/src/components/layout/ReleaseNotes.tsx
@@ -1,4 +1,5 @@
import { useMemo } from 'react';
+import { useTranslations } from 'next-intl';
import type { Release } from '@/lib/api';
import { renderMarkdown, sanitizeHtml } from '@/lib/markdown';
import { formatDate } from '@/utils/dates';
@@ -7,6 +8,7 @@ import { Badge } from '@/components/ui/badge';
// One release in the updates dialog. Feed notes arrive as rendered HTML, changelog
// notes as markdown; both end up sanitized.
export default function ReleaseNotes({ release, badge }: { release: Release; badge?: string }) {
+ const t = useTranslations('updates');
const html = useMemo(() => {
const options = { newTabLinks: true };
return release.notesFormat === 'html'
@@ -37,7 +39,7 @@ export default function ReleaseNotes({ release, badge }: { release: Release; bad
{html ? (
<div className="md-content" dangerouslySetInnerHTML={{ __html: html }} />
) : (
- <p className="text-sm text-muted-foreground">This release has no notes.</p>
+ <p className="text-sm text-muted-foreground">{t('noNotes')}</p>
)}
</section>
);
diff --git a/apps/web/src/components/layout/SavedViewTab.tsx b/apps/web/src/components/layout/SavedViewTab.tsx
index 2a3e36dc..016d90c9 100644
--- a/apps/web/src/components/layout/SavedViewTab.tsx
+++ b/apps/web/src/components/layout/SavedViewTab.tsx
@@ -3,6 +3,7 @@ import { useQueryClient } from '@tanstack/react-query';
import { useSortable } from '@dnd-kit/sortable';
import { CSS } from '@dnd-kit/utilities';
import { Globe, MoreHorizontal, Pencil, Trash2 } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { api, type View } from '@/lib/api';
import { qk } from '@/services/queryKeys';
import { cn } from '@/lib/utils';
@@ -33,6 +34,8 @@ export default function SavedViewTab({
onEdit: () => void;
onDelete: () => void;
}) {
+ const t = useTranslations('views');
+ const tCommon = useTranslations('common');
const [menuOpen, setMenuOpen] = useState(false);
const [sharing, setSharing] = useState(false);
const qc = useQueryClient();
@@ -74,7 +77,7 @@ export default function SavedViewTab({
<PopoverTrigger asChild>
<button
type="button"
- title="View options"
+ title={t('options')}
className="mr-1.5 rounded p-0.5 hover:bg-accent-foreground/10"
>
<MoreHorizontal className="size-3.5" />
@@ -90,7 +93,7 @@ export default function SavedViewTab({
}}
className="flex w-full items-center gap-2 rounded px-2 py-1 text-left text-sm hover:bg-accent"
>
- <Globe className="size-3.5" /> {view.shareToken ? 'Shared' : 'Share'}
+ <Globe className="size-3.5" /> {view.shareToken ? t('shared') : t('share')}
</button>
)}
{canEdit && (
@@ -102,7 +105,7 @@ export default function SavedViewTab({
}}
className="flex w-full items-center gap-2 rounded px-2 py-1 text-left text-sm hover:bg-accent"
>
- <Pencil className="size-3.5" /> Edit view
+ <Pencil className="size-3.5" /> {t('editView')}
</button>
)}
{canDelete && (
@@ -114,7 +117,7 @@ export default function SavedViewTab({
}}
className="flex w-full items-center gap-2 rounded px-2 py-1 text-left text-sm text-destructive hover:bg-destructive/10"
>
- <Trash2 className="size-3.5" /> Delete
+ <Trash2 className="size-3.5" /> {tCommon('delete')}
</button>
)}
</PopoverContent>
@@ -125,7 +128,7 @@ export default function SavedViewTab({
<ShareDialog
open={sharing}
onOpenChange={setSharing}
- title="Share board"
+ title={t('shareBoard')}
token={view.shareToken}
extended={view.shareExtended}
enable={share}
diff --git a/apps/web/src/components/layout/Shell.tsx b/apps/web/src/components/layout/Shell.tsx
index b0f84778..c508cf22 100644
--- a/apps/web/src/components/layout/Shell.tsx
+++ b/apps/web/src/components/layout/Shell.tsx
@@ -20,6 +20,7 @@ import CommandLayer from '@/components/layout/CommandLayer';
import ShellBody from '@/components/layout/ShellBody';
import ShellHeaderTitle from '@/components/layout/ShellHeaderTitle';
import ShellOverlays from '@/components/layout/ShellOverlays';
+import { useTranslations } from 'next-intl';
// The layout for /project/:projectKey and its children (the work items view and the
// settings pages). It owns the project data, the view editor and the
@@ -32,6 +33,7 @@ export default function Shell({
children: ReactNode;
defaultSidebarOpen?: boolean;
}) {
+ const t = useTranslations('nav');
const router = useRouter();
const route = useShellRoute();
const { projectKey, routeIssueSeq } = route;
@@ -126,7 +128,7 @@ export default function Shell({
title={
<ShellHeaderTitle
route={route}
- projectName={project?.project.name ?? 'Project'}
+ projectName={project?.project.name ?? t('project')}
issueIdentifier={issueQuery.data?.identifier ?? null}
issueParent={issueQuery.data?.parent ?? null}
/>
diff --git a/apps/web/src/components/layout/ShellBody.tsx b/apps/web/src/components/layout/ShellBody.tsx
index 7b81da7f..bdd8ec82 100644
--- a/apps/web/src/components/layout/ShellBody.tsx
+++ b/apps/web/src/components/layout/ShellBody.tsx
@@ -1,4 +1,5 @@
import type { ReactNode } from 'react';
+import { useTranslations } from 'next-intl';
import PageSkeleton from '@/components/common/skeleton/PageSkeleton';
// The Shell's content area. It renders the routed page once the project is
@@ -19,10 +20,11 @@ export default function ShellBody({
projectCount: number;
children: ReactNode;
}) {
+ const t = useTranslations('shell');
if (forbidden) {
return (
<div className="flex h-full items-center justify-center px-4 text-center text-sm text-muted-foreground">
- You do not have access to this project.
+ {t('noProjectAccess')}
</div>
);
}
@@ -34,13 +36,13 @@ export default function ShellBody({
if (hasError)
return (
<div className="flex h-full items-center justify-center px-4 text-center text-sm text-muted-foreground">
- This project is not available.
+ {t('projectUnavailable')}
</div>
);
if (projectsLoaded && projectCount === 0)
return (
<div className="flex h-full items-center justify-center text-sm text-muted-foreground">
- No projects yet, create one to get started.
+ {t('noProjects')}
</div>
);
return <PageSkeleton />;
diff --git a/apps/web/src/components/layout/ShellHeaderTitle.tsx b/apps/web/src/components/layout/ShellHeaderTitle.tsx
index 19587291..9dd92f5a 100644
--- a/apps/web/src/components/layout/ShellHeaderTitle.tsx
+++ b/apps/web/src/components/layout/ShellHeaderTitle.tsx
@@ -1,24 +1,12 @@
+import { useTranslations } from 'next-intl';
import { SETTINGS_SECTIONS } from '@/utils/settingsSections';
import type { IssueRef } from '@/lib/api';
import type { ShellRoute } from '@/hooks/useShellRoute';
+import { useSettingsSectionText } from '@/hooks/useSectionLabels';
import CycleBreadcrumb from '@/components/layout/CycleBreadcrumb';
import InitiativeBreadcrumb from '@/components/layout/InitiativeBreadcrumb';
import IssueBreadcrumb from '@/components/layout/IssueBreadcrumb';
-// The label on the pages that are not an issue, initiative or cycle detail.
-function pageLabel(route: ShellRoute, projectName: string): string {
- const { sub, section, aiTeamCrumb } = route;
- if (section) return SETTINGS_SECTIONS.find((s) => s.slug === section)?.label ?? 'Settings';
- if (sub === 'members') return 'Members';
- if (sub === 'dashboard') return 'Dashboards';
- if (sub === 'initiatives') return 'Initiatives';
- if (sub === 'cycles') return 'Cycles';
- if (aiTeamCrumb) return aiTeamCrumb;
- if (sub === 'ai-agents') return 'AI agents';
- if (sub === 'api') return 'API';
- return projectName;
-}
-
// The header title: a breadcrumb on an issue, initiative or cycle page, otherwise
// the page's own label.
export default function ShellHeaderTitle({
@@ -32,6 +20,26 @@ export default function ShellHeaderTitle({
issueIdentifier: string | null;
issueParent: IssueRef | null;
}) {
+ const t = useTranslations('nav');
+ const sectionText = useSettingsSectionText();
+
+ // The label on the pages that are not an issue, initiative or cycle detail. An
+ // /ai-team route names its section, except the chat, which has no section entry.
+ function pageLabel(): string {
+ const { sub, section, aiTeamSection } = route;
+ const known = (slug: string) => SETTINGS_SECTIONS.some((s) => s.slug === slug);
+ if (section) return known(section) ? sectionText(section).label : t('projectSettings');
+ if (sub === 'members') return t('members');
+ if (sub === 'dashboard') return t('dashboards');
+ if (sub === 'initiatives') return t('initiatives');
+ if (sub === 'cycles') return t('cycles');
+ if (aiTeamSection === 'chat') return t('chatWithAiTeam');
+ if (aiTeamSection) return known(aiTeamSection) ? sectionText(aiTeamSection).label : t('aiTeam');
+ if (sub === 'ai-agents') return t('aiAgents');
+ if (sub === 'api') return t('api');
+ return projectName;
+ }
+
if (route.routeIssueSeq != null) {
return (
<IssueBreadcrumb
@@ -50,5 +58,5 @@ export default function ShellHeaderTitle({
if (route.routeCycleId != null) {
return <CycleBreadcrumb projectKey={route.projectKey} cycleId={route.routeCycleId} />;
}
- return <>{pageLabel(route, projectName)}</>;
+ return <>{pageLabel()}</>;
}
diff --git a/apps/web/src/components/layout/SidebarAiTeamNav.tsx b/apps/web/src/components/layout/SidebarAiTeamNav.tsx
index 38ffb732..b5783dc3 100644
--- a/apps/web/src/components/layout/SidebarAiTeamNav.tsx
+++ b/apps/web/src/components/layout/SidebarAiTeamNav.tsx
@@ -1,8 +1,10 @@
import { usePathname } from 'next/navigation';
import { MessagesSquare, SlidersHorizontal } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { aiChatPath, aiSectionPath, aiTeamPath } from '@/utils/paths';
import { AI_SECTIONS, AI_TEAM_SECTIONS } from '@/utils/settingsSections';
import { usePermissions } from '@/hooks/usePermissions';
+import { useSettingsSectionText } from '@/hooks/useSectionLabels';
import {
SidebarGroup,
SidebarGroupContent,
@@ -16,6 +18,8 @@ import SidebarNavSubmenu from '@/components/layout/SidebarNavSubmenu';
// and the "Configure" item holding the AI configuration sections. Renders nothing
// when none of them are readable.
export default function SidebarAiTeamNav({ projectKey }: { projectKey: string | null }) {
+ const t = useTranslations('nav');
+ const sectionText = useSettingsSectionText();
const pathname = usePathname();
const { can } = usePermissions();
const disabled = !projectKey;
@@ -25,7 +29,7 @@ export default function SidebarAiTeamNav({ projectKey }: { projectKey: string |
key: s.slug,
href: projectKey ? aiSectionPath(projectKey, s.slug) : '#',
icon: s.icon,
- label: s.label,
+ label: sectionText(s.slug).label,
active: pathname.endsWith(`/${s.slug}`),
}));
const canChat = can('ai_agents', 'read');
@@ -33,14 +37,14 @@ export default function SidebarAiTeamNav({ projectKey }: { projectKey: string |
return (
<SidebarGroup>
- <SidebarGroupLabel>AI Team</SidebarGroupLabel>
+ <SidebarGroupLabel>{t('aiTeam')}</SidebarGroupLabel>
<SidebarGroupContent>
<SidebarMenu>
{canChat && (
<SidebarNavItem
href={projectKey ? aiChatPath(projectKey) : '#'}
icon={MessagesSquare}
- label="Chat"
+ label={t('chat')}
active={pathname.endsWith('/ai-team/chat')}
disabled={disabled}
/>
@@ -50,13 +54,17 @@ export default function SidebarAiTeamNav({ projectKey }: { projectKey: string |
key={s.slug}
href={projectKey ? aiTeamPath(projectKey, s.slug) : '#'}
icon={s.icon}
- label={s.label}
+ label={sectionText(s.slug).label}
active={pathname.endsWith(`/ai-team/${s.slug}`)}
disabled={disabled}
/>
))}
{configureItems.length > 0 && (
- <SidebarNavSubmenu icon={SlidersHorizontal} label="Configure" items={configureItems} />
+ <SidebarNavSubmenu
+ icon={SlidersHorizontal}
+ label={t('configure')}
+ items={configureItems}
+ />
)}
</SidebarMenu>
</SidebarGroupContent>
diff --git a/apps/web/src/components/layout/SidebarConfigNav.tsx b/apps/web/src/components/layout/SidebarConfigNav.tsx
index d2559720..388a7e39 100644
--- a/apps/web/src/components/layout/SidebarConfigNav.tsx
+++ b/apps/web/src/components/layout/SidebarConfigNav.tsx
@@ -1,4 +1,5 @@
import { usePathname } from 'next/navigation';
+import { useTranslations } from 'next-intl';
import { Bell, Settings, Users } from 'lucide-react';
import { membersPath, notificationsPath } from '@/utils/paths';
import { useSettingsNavGroups } from '@/hooks/useSettingsNavGroups';
@@ -14,6 +15,7 @@ import SidebarNavItem from '@/components/layout/SidebarNavItem';
// settings" entry. That entry links to the first settings section the viewer may
// read and switches the sidebar into settings mode (see AppSidebar).
export default function SidebarConfigNav({ projectKey }: { projectKey: string | null }) {
+ const t = useTranslations('nav');
const pathname = usePathname();
const disabled = !projectKey;
const { firstHref } = useSettingsNavGroups(projectKey);
@@ -22,20 +24,20 @@ export default function SidebarConfigNav({ projectKey }: { projectKey: string |
return (
<SidebarGroup>
- <SidebarGroupLabel>Configuration</SidebarGroupLabel>
+ <SidebarGroupLabel>{t('configuration')}</SidebarGroupLabel>
<SidebarGroupContent>
<SidebarMenu>
<SidebarNavItem
href={projectKey ? membersPath(projectKey) : '#'}
icon={Users}
- label="Members"
+ label={t('members')}
active={pathname.includes('/members') && !onRoles}
disabled={disabled}
/>
<SidebarNavItem
href={projectKey ? notificationsPath(projectKey) : '#'}
icon={Bell}
- label="Notifications"
+ label={t('notifications')}
active={!!projectKey && pathname === notificationsPath(projectKey)}
disabled={disabled}
/>
@@ -43,7 +45,7 @@ export default function SidebarConfigNav({ projectKey }: { projectKey: string |
<SidebarNavItem
href={firstHref}
icon={Settings}
- label="Project settings"
+ label={t('projectSettings')}
active={false}
disabled={disabled}
/>
diff --git a/apps/web/src/components/layout/SidebarSettingsNav.tsx b/apps/web/src/components/layout/SidebarSettingsNav.tsx
index 516b3998..6e9e59ed 100644
--- a/apps/web/src/components/layout/SidebarSettingsNav.tsx
+++ b/apps/web/src/components/layout/SidebarSettingsNav.tsx
@@ -1,4 +1,5 @@
import { ArrowLeft } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { projectPath } from '@/utils/paths';
import { useSettingsNavGroups } from '@/hooks/useSettingsNavGroups';
import {
@@ -13,6 +14,7 @@ import SidebarNavItem from '@/components/layout/SidebarNavItem';
// Configuration groups (AI Team, Workflow) as flat lists under their labels —
// every item reachable directly, no collapsing.
export default function SidebarSettingsNav({ projectKey }: { projectKey: string | null }) {
+ const t = useTranslations('nav');
const disabled = !projectKey;
const { groups } = useSettingsNavGroups(projectKey);
@@ -24,7 +26,7 @@ export default function SidebarSettingsNav({ projectKey }: { projectKey: string
<SidebarNavItem
href={projectKey ? projectPath(projectKey) : '#'}
icon={ArrowLeft}
- label="Back to project"
+ label={t('backToProject')}
active={false}
disabled={disabled}
/>
diff --git a/apps/web/src/components/layout/SidebarWorkNav.tsx b/apps/web/src/components/layout/SidebarWorkNav.tsx
index 42819c87..35941268 100644
--- a/apps/web/src/components/layout/SidebarWorkNav.tsx
+++ b/apps/web/src/components/layout/SidebarWorkNav.tsx
@@ -1,4 +1,5 @@
import { usePathname } from 'next/navigation';
+import { useTranslations } from 'next-intl';
import { Inbox, LayoutDashboard, RefreshCw, SquareKanban, StickyNote, Target } from 'lucide-react';
import {
cyclesPath,
@@ -23,6 +24,7 @@ export default function SidebarWorkNav({
projectKey: string | null;
projectId: number | null;
}) {
+ const t = useTranslations('nav');
const pathname = usePathname();
const { can } = usePermissions();
const features = useProjectFeatures();
@@ -44,7 +46,7 @@ export default function SidebarWorkNav({
<SidebarNavItem
href={projectKey ? inboxPath(projectKey) : '#'}
icon={Inbox}
- label="Inbox"
+ label={t('inbox')}
active={pathname.endsWith('/inbox')}
disabled={disabled}
badge={inboxUnread}
@@ -53,7 +55,7 @@ export default function SidebarWorkNav({
<SidebarNavItem
href={projectKey ? dashboardsPath(projectKey) : '#'}
icon={LayoutDashboard}
- label="Dashboards"
+ label={t('dashboards')}
active={pathname.includes('/dashboard')}
disabled={disabled}
/>
@@ -61,7 +63,7 @@ export default function SidebarWorkNav({
<SidebarNavItem
href={projectKey ? projectPath(projectKey) : '#'}
icon={SquareKanban}
- label="Work items"
+ label={t('workItems')}
active={onWorkItems}
disabled={disabled}
/>
@@ -69,7 +71,7 @@ export default function SidebarWorkNav({
<SidebarNavItem
href={projectKey ? initiativesPath(projectKey) : '#'}
icon={Target}
- label="Initiatives"
+ label={t('initiatives')}
active={pathname.includes('/initiatives')}
disabled={disabled}
/>
@@ -78,7 +80,7 @@ export default function SidebarWorkNav({
<SidebarNavItem
href={projectKey ? cyclesPath(projectKey) : '#'}
icon={RefreshCw}
- label="Cycles"
+ label={t('cycles')}
active={pathname.includes('/cycles')}
disabled={disabled}
/>
@@ -87,7 +89,7 @@ export default function SidebarWorkNav({
<SidebarNavItem
href={projectKey ? notesPath(projectKey) : '#'}
icon={StickyNote}
- label="Notes"
+ label={t('notes')}
active={pathname.includes('/notes')}
disabled={disabled}
/>
diff --git a/apps/web/src/components/layout/TableProperties.tsx b/apps/web/src/components/layout/TableProperties.tsx
index d0cc905c..84129a4f 100644
--- a/apps/web/src/components/layout/TableProperties.tsx
+++ b/apps/web/src/components/layout/TableProperties.tsx
@@ -1,6 +1,8 @@
import type { ReactNode } from 'react';
import { closestCenter, DndContext, type DragEndEvent } from '@dnd-kit/core';
import { arrayMove, rectSortingStrategy, SortableContext } from '@dnd-kit/sortable';
+import { useTranslations } from 'next-intl';
+import { byKey } from '@/utils/messageKey';
import type { CustomField, IssueType } from '@/lib/api';
import { useStripSortSensors } from '@/lib/dnd';
import {
@@ -35,21 +37,20 @@ export default function TableProperties({
// custom-field picker, which stays last.
trailing?: ReactNode;
}) {
+ const t = byKey(useTranslations('display.properties'));
const sensors = useStripSortSensors();
const fieldById = new Map(customFields.map((f) => [f.id, f]));
- const builtinLabels = new Map(DISPLAY_PROPERTIES.map((p) => [p.value as PropertyKey, p.label]));
- const labelFor = (key: PropertyKey): string | null =>
- isCustomFieldKey(key)
- ? (fieldById.get(customFieldId(key))?.name ?? null)
- : (builtinLabels.get(key) ?? null);
+ const builtins = new Set<PropertyKey>(DISPLAY_PROPERTIES);
+ const labelFor = (key: PropertyKey): string | null => {
+ if (isCustomFieldKey(key)) return fieldById.get(customFieldId(key))?.name ?? null;
+ return builtins.has(key) ? t(key) : null;
+ };
// Enabled keys in display order, dropping any stale (deleted custom field) key.
const enabled = properties.filter((k) => labelFor(k) != null);
const enabledSet = new Set(properties);
const features = useProjectFeatures();
- const disabledBuiltins = offeredDisplayProperties(features).filter(
- (p) => !enabledSet.has(p.value),
- );
+ const disabledBuiltins = offeredDisplayProperties(features).filter((p) => !enabledSet.has(p));
const toggle = (key: PropertyKey) =>
onChange(enabledSet.has(key) ? properties.filter((p) => p !== key) : [...properties, key]);
@@ -78,7 +79,7 @@ export default function TableProperties({
</SortableContext>
</DndContext>
{disabledBuiltins.map((p) => (
- <PropertyChip key={p.value} label={p.label} on={false} onClick={() => toggle(p.value)} />
+ <PropertyChip key={p} label={t(p)} on={false} onClick={() => toggle(p)} />
))}
{trailing}
<CustomFieldMenu
diff --git a/apps/web/src/components/layout/UpdatesDialog.tsx b/apps/web/src/components/layout/UpdatesDialog.tsx
index eb33d490..b8cf2cb9 100644
--- a/apps/web/src/components/layout/UpdatesDialog.tsx
+++ b/apps/web/src/components/layout/UpdatesDialog.tsx
@@ -2,6 +2,7 @@
import { useState } from 'react';
import { ChevronRight, ExternalLink, RefreshCw } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { UpdateStatus } from '@/lib/api';
import Modal from '@/components/common/overlay/Modal';
import ReleaseNotes from '@/components/layout/ReleaseNotes';
@@ -12,18 +13,6 @@ import { formatDateTime } from '@/utils/dates';
import { isNewerVersion } from '@/utils/version';
import { cn } from '@/lib/utils';
-// Without a successful check, calling the running version the latest would claim
-// more than is known.
-function summary(status: UpdateStatus): string {
- if (status.updateAvailable) {
- return `You're running ${status.currentVersion}. Latest is ${status.latestVersion}.`;
- }
- if (!status.latestVersion) {
- return `You're running ${status.currentVersion}. Latest release unknown.`;
- }
- return `You're running ${status.currentVersion}, the latest release.`;
-}
-
// The release notes behind the sidebar version. With a newer release published,
// the ones above the running version are expanded and the history sits behind a
// toggle; otherwise it is the history alone, with the running version marked.
@@ -34,9 +23,18 @@ export default function UpdatesDialog({
status: UpdateStatus;
onClose: () => void;
}) {
+ const t = useTranslations('updates');
const check = useCheckForUpdates();
const [showEarlier, setShowEarlier] = useState(false);
+ // Without a successful check, calling the running version the latest would claim
+ // more than is known.
+ const summary = status.updateAvailable
+ ? t('runningOutdated', { current: status.currentVersion, latest: status.latestVersion ?? '' })
+ : status.latestVersion
+ ? t('runningLatest', { current: status.currentVersion })
+ : t('runningUnknown', { current: status.currentVersion });
+
const newer = status.releases.filter((r) => isNewerVersion(r.version, status.currentVersion));
const earlier = status.releases.filter((r) => !isNewerVersion(r.version, status.currentVersion));
// Derived from a release link, so the repository is not hardcoded here. Only feed
@@ -48,24 +46,24 @@ export default function UpdatesDialog({
<ReleaseNotes
key={release.tag}
release={release}
- badge={release.version === status.currentVersion ? 'Running' : undefined}
+ badge={release.version === status.currentVersion ? t('badgeRunning') : undefined}
/>
));
return (
<Modal
- title={status.updateAvailable ? 'Update available' : 'Release history'}
- description={summary(status)}
+ title={t(status.updateAvailable ? 'updateAvailable' : 'releaseHistory')}
+ description={summary}
onClose={onClose}
wide
>
<div className="space-y-4">
{status.releases.length === 0 && (
- <p className="text-sm text-muted-foreground">No release notes shipped with this build.</p>
+ <p className="text-sm text-muted-foreground">{t('noReleases')}</p>
)}
{newer.map((release) => (
- <ReleaseNotes key={release.tag} release={release} badge="New" />
+ <ReleaseNotes key={release.tag} release={release} badge={t('badgeNew')} />
))}
{newer.length > 0 && earlier.length > 0 ? (
@@ -74,7 +72,7 @@ export default function UpdatesDialog({
<ChevronRight
className={cn('size-4 transition-transform', showEarlier && 'rotate-90')}
/>
- Earlier releases
+ {t('earlier')}
</CollapsibleTrigger>
<CollapsibleContent className="mt-4 space-y-4">{earlierList}</CollapsibleContent>
</Collapsible>
@@ -92,11 +90,11 @@ export default function UpdatesDialog({
disabled={check.isPending}
>
<RefreshCw className={cn('size-4', check.isPending && 'animate-spin')} />
- {check.isPending ? 'Checking' : 'Check for updates'}
+ {t(check.isPending ? 'checking' : 'check')}
</Button>
{status.checkedAt && (
<span className="text-xs text-muted-foreground">
- Last checked {formatDateTime(status.checkedAt)}
+ {t('lastChecked', { date: formatDateTime(status.checkedAt) })}
</span>
)}
</div>
@@ -107,7 +105,7 @@ export default function UpdatesDialog({
rel="noreferrer"
className="flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground"
>
- All releases
+ {t('allReleases')}
<ExternalLink className="size-3.5" />
</a>
)}
diff --git a/apps/web/src/components/layout/UserMenu.tsx b/apps/web/src/components/layout/UserMenu.tsx
index d32846bd..0d8f1a47 100644
--- a/apps/web/src/components/layout/UserMenu.tsx
+++ b/apps/web/src/components/layout/UserMenu.tsx
@@ -4,8 +4,10 @@ import { useEffect, useState } from 'react';
import Link from 'next/link';
import { useRouter } from 'next/navigation';
import { LogOut } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { signOut, useSession } from '@/lib/auth-client';
import { ACCOUNT_SECTIONS, accountPath } from '@/utils/accountSections';
+import { useAccountSectionLabel } from '@/hooks/useSectionLabels';
import Avatar from '@/components/common/Avatar';
import { Skeleton } from '@/components/ui/skeleton';
import {
@@ -23,6 +25,9 @@ import {
// Signing out clears the session and the middleware sends the browser back to
// the login page.
export default function UserMenu() {
+ const t = useTranslations('nav');
+ const tCommon = useTranslations('common');
+ const sectionLabel = useAccountSectionLabel();
const router = useRouter();
const { data: session, isPending } = useSession();
@@ -55,21 +60,21 @@ export default function UserMenu() {
<DropdownMenuContent align="end" className="w-56">
<DropdownMenuLabel className="flex flex-col gap-1">
<span className="truncate text-sm font-medium">{user.email}</span>
- <span className="text-xs text-muted-foreground capitalize">Role: {role}</span>
+ <span className="text-xs text-muted-foreground capitalize">{t('role', { role })}</span>
</DropdownMenuLabel>
<DropdownMenuSeparator />
- {ACCOUNT_SECTIONS.map(({ slug, label, icon: Icon }) => (
+ {ACCOUNT_SECTIONS.map(({ slug, icon: Icon }) => (
<DropdownMenuItem key={slug} asChild>
<Link href={accountPath(slug)}>
<Icon />
- {label}
+ {sectionLabel(slug)}
</Link>
</DropdownMenuItem>
))}
<DropdownMenuSeparator />
<DropdownMenuItem onSelect={onSignOut}>
<LogOut />
- Sign out
+ {tCommon('signOut')}
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
diff --git a/apps/web/src/components/layout/ViewIconPicker.tsx b/apps/web/src/components/layout/ViewIconPicker.tsx
index 8cf22919..caeb89ba 100644
--- a/apps/web/src/components/layout/ViewIconPicker.tsx
+++ b/apps/web/src/components/layout/ViewIconPicker.tsx
@@ -1,4 +1,5 @@
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import { cn } from '@/lib/utils';
import { ViewIcon, VIEW_ICON_NAMES, VIEW_ICONS } from '@/utils/viewIcons';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
@@ -12,13 +13,14 @@ export default function ViewIconPicker({
icon: string | null;
onChange: (icon: string | null) => void;
}) {
+ const t = useTranslations('display.rows');
const [open, setOpen] = useState(false);
return (
<Popover open={open} onOpenChange={setOpen}>
<PopoverTrigger asChild>
<button
type="button"
- title="View icon"
+ title={t('viewIcon')}
className="flex size-7 items-center justify-center rounded-md bg-secondary text-foreground hover:bg-secondary/80"
>
<ViewIcon name={icon} className="size-4" />
diff --git a/apps/web/src/components/layout/ViewTabs.tsx b/apps/web/src/components/layout/ViewTabs.tsx
index 0b92e011..cfa19f08 100644
--- a/apps/web/src/components/layout/ViewTabs.tsx
+++ b/apps/web/src/components/layout/ViewTabs.tsx
@@ -8,6 +8,7 @@ import {
} from '@dnd-kit/core';
import { horizontalListSortingStrategy, SortableContext } from '@dnd-kit/sortable';
import { Filter, Plus } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { View } from '@/lib/api';
import { useStripSortSensors } from '@/lib/dnd';
import { usePermissions } from '@/hooks/usePermissions';
@@ -46,6 +47,7 @@ export default function ViewTabs({
onToggleFilter: () => void;
displayControl: ReactNode;
}) {
+ const t = useTranslations('views');
const { can } = usePermissions();
const canCreateView = can('views', 'create');
const canEditView = can('views', 'edit');
@@ -127,11 +129,11 @@ export default function ViewTabs({
<button
type="button"
onClick={onNewView}
- title="Create a view from the current filters and display"
+ title={t('newViewHint')}
className="flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-sm text-muted-foreground hover:bg-accent hover:text-foreground"
>
<Plus className="size-3.5" />
- New view
+ {t('newView')}
</button>
)}
</div>
@@ -140,7 +142,7 @@ export default function ViewTabs({
<button
type="button"
onClick={onToggleFilter}
- title="Filter"
+ title={t('filter')}
className="rounded-md p-1.5 text-muted-foreground hover:bg-accent hover:text-foreground"
>
<Filter className="size-4" />
diff --git a/apps/web/src/components/locale-toggle.tsx b/apps/web/src/components/locale-toggle.tsx
new file mode 100644
index 00000000..d40f6701
--- /dev/null
+++ b/apps/web/src/components/locale-toggle.tsx
@@ -0,0 +1,47 @@
+'use client';
+
+import { Check, Languages } from 'lucide-react';
+import { useLocale, useTranslations } from 'next-intl';
+import { Button } from '@/components/ui/button';
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuTrigger,
+} from '@/components/ui/dropdown-menu';
+import { LOCALES, LOCALE_FLAGS, LOCALE_LABELS, type Locale } from '@/i18n/locales';
+import { useUpdateAccountPreferences } from '@/services/preferences.service';
+
+// Picks the interface language. The choice is saved to the account, the same as
+// picking it in preferences, so it survives a new session and reaches other devices;
+// PreferencesSync writes the cookie the server renders from and re-renders the page.
+export function LocaleToggle() {
+ const t = useTranslations('common');
+ const locale = useLocale();
+ const update = useUpdateAccountPreferences();
+
+ return (
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <Button
+ variant="outline"
+ size="icon"
+ className="size-8 shrink-0"
+ title={t('language')}
+ aria-label={t('language')}
+ >
+ <Languages />
+ </Button>
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="end">
+ {LOCALES.map((value) => (
+ <DropdownMenuItem key={value} onSelect={() => update.mutate({ locale: value })}>
+ <span aria-hidden>{LOCALE_FLAGS[value]}</span>
+ {LOCALE_LABELS[value]}
+ {value === (locale as Locale) && <Check className="ml-auto size-4" />}
+ </DropdownMenuItem>
+ ))}
+ </DropdownMenuContent>
+ </DropdownMenu>
+ );
+}
diff --git a/apps/web/src/components/preferences-sync.tsx b/apps/web/src/components/preferences-sync.tsx
index b6e8df25..49a02c35 100644
--- a/apps/web/src/components/preferences-sync.tsx
+++ b/apps/web/src/components/preferences-sync.tsx
@@ -1,16 +1,19 @@
'use client';
import { useEffect, useRef } from 'react';
+import { useRouter } from 'next/navigation';
import { useTheme } from 'next-themes';
+import { useLocale } from 'next-intl';
import {
useAccountPreferencesQuery,
useUpdateAccountPreferences,
} from '@/services/preferences.service';
+import { setLocaleCookie } from '@/i18n/cookie';
import { canonicalTimezone, setDisplayTimezone } from '@/utils/dates';
// Applies the account preferences that are read app-wide rather than at one call
-// site: the theme (handed to next-themes) and the display timezone (handed to the
-// date formatters). Renders nothing.
+// site: the theme (handed to next-themes), the display timezone (handed to the date
+// formatters) and the interface language. Renders nothing.
//
// The timezone starts as 'UTC' for an account that never set one, which is rarely
// what the person means, so the first load detects the browser zone and saves it.
@@ -19,9 +22,12 @@ export default function PreferencesSync() {
const { data: prefs } = useAccountPreferencesQuery();
const { setTheme } = useTheme();
const update = useUpdateAccountPreferences();
+ const renderedLocale = useLocale();
+ const router = useRouter();
const timezone = prefs?.timezone;
const theme = prefs?.theme;
+ const locale = prefs?.locale;
useEffect(() => {
if (timezone) setDisplayTimezone(timezone);
@@ -41,6 +47,15 @@ export default function PreferencesSync() {
}
}, [theme, setTheme]);
+ // The server rendered in the cookie's language. When the account says otherwise —
+ // first load on a new device, or another device changing it — write the cookie and
+ // re-render from the server; the next pass sees them agree and stops.
+ useEffect(() => {
+ if (!locale || locale === renderedLocale) return;
+ setLocaleCookie(locale);
+ router.refresh();
+ }, [locale, renderedLocale, router]);
+
useEffect(() => {
if (timezone !== 'UTC') return;
const detected = canonicalTimezone(Intl.DateTimeFormat().resolvedOptions().timeZone);
diff --git a/apps/web/src/components/providers.tsx b/apps/web/src/components/providers.tsx
index 1a4900a8..e782203f 100644
--- a/apps/web/src/components/providers.tsx
+++ b/apps/web/src/components/providers.tsx
@@ -1,7 +1,8 @@
'use client';
import { MutationCache, QueryClient, QueryClientProvider } from '@tanstack/react-query';
-import { useState, type ReactNode } from 'react';
+import { useRef, useState, type ReactNode } from 'react';
+import { useTranslations } from 'next-intl';
import { toast } from 'sonner';
import { ApiError } from '@/lib/api';
import { HotkeysProvider } from '@/context/useHotkeys';
@@ -12,13 +13,19 @@ import SessionScope from '@/components/session-scope';
// The message shown for a failed mutation: the API's `{ error }` text (carried by
// ApiError) when present, otherwise a generic fallback.
-function errorMessage(error: unknown): string {
+function errorMessage(error: unknown, fallback: string): string {
if (error instanceof ApiError) return error.message;
if (error instanceof Error && error.message) return error.message;
- return 'Something went wrong';
+ return fallback;
}
export function Providers({ children }: { children: ReactNode }) {
+ const t = useTranslations('common');
+ // The cache is built once, so the toast reads the fallback through a ref the
+ // render refreshes; switching locale then reaches errors too.
+ const fallback = useRef(t('genericError'));
+ fallback.current = t('genericError');
+
const [queryClient] = useState(
() =>
new QueryClient({
@@ -29,7 +36,7 @@ export function Providers({ children }: { children: ReactNode }) {
mutationCache: new MutationCache({
onError: (error, _vars, _ctx, mutation) => {
if (mutation.meta?.suppressErrorToast) return;
- toast.error(errorMessage(error));
+ toast.error(errorMessage(error, fallback.current));
},
}),
defaultOptions: {
diff --git a/apps/web/src/components/theme-toggle.tsx b/apps/web/src/components/theme-toggle.tsx
index f96c00ce..1848b968 100644
--- a/apps/web/src/components/theme-toggle.tsx
+++ b/apps/web/src/components/theme-toggle.tsx
@@ -2,6 +2,7 @@
import { useEffect, useState } from 'react';
import { useTheme } from 'next-themes';
+import { useTranslations } from 'next-intl';
import { Moon, Sun } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { useUpdateAccountPreferences } from '@/services/preferences.service';
@@ -12,6 +13,7 @@ import { useUpdateAccountPreferences } from '@/services/preferences.service';
// icon is rendered only after mount so the server and client markup match (the
// resolved theme is unknown during SSR).
export function ThemeToggle() {
+ const t = useTranslations('common');
const { resolvedTheme, setTheme } = useTheme();
const [mounted, setMounted] = useState(false);
const update = useUpdateAccountPreferences();
@@ -24,8 +26,8 @@ export function ThemeToggle() {
variant="outline"
size="icon"
className="size-8 shrink-0"
- title="Toggle theme"
- aria-label="Toggle theme"
+ title={t('toggleTheme')}
+ aria-label={t('toggleTheme')}
onClick={() => {
const next = isDark ? 'light' : 'dark';
setTheme(next);
diff --git a/apps/web/src/components/ui/calendar.tsx b/apps/web/src/components/ui/calendar.tsx
index 06ce5e9b..ebe7c175 100644
--- a/apps/web/src/components/ui/calendar.tsx
+++ b/apps/web/src/components/ui/calendar.tsx
@@ -5,6 +5,7 @@ import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react
import { DayPicker, getDefaultClassNames, type DayButton } from 'react-day-picker';
import { cn } from '@/lib/utils';
+import { useDateFnsLocale } from '@/hooks/useDateFnsLocale';
import { Button, buttonVariants } from '@/components/ui/button';
function Calendar({
@@ -15,14 +16,19 @@ function Calendar({
buttonVariant = 'ghost',
formatters,
components,
+ locale,
...props
}: React.ComponentProps<typeof DayPicker> & {
buttonVariant?: React.ComponentProps<typeof Button>['variant'];
}) {
const defaultClassNames = getDefaultClassNames();
+ // Month and weekday names come from date-fns, which does not read the app's
+ // locale on its own.
+ const dateLocale = useDateFnsLocale();
return (
<DayPicker
+ locale={locale ?? dateLocale}
showOutsideDays={showOutsideDays}
className={cn(
'group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent',
@@ -32,7 +38,7 @@ function Calendar({
)}
captionLayout={captionLayout}
formatters={{
- formatMonthDropdown: (date) => date.toLocaleString('default', { month: 'short' }),
+ formatMonthDropdown: (date) => date.toLocaleString(dateLocale.code, { month: 'short' }),
...formatters,
}}
classNames={{
diff --git a/apps/web/src/components/ui/command.tsx b/apps/web/src/components/ui/command.tsx
index c0672d76..33b615f8 100644
--- a/apps/web/src/components/ui/command.tsx
+++ b/apps/web/src/components/ui/command.tsx
@@ -1,6 +1,7 @@
'use client';
import * as React from 'react';
+import { useTranslations } from 'next-intl';
import { Command as CommandPrimitive } from 'cmdk';
import { SearchIcon } from 'lucide-react';
@@ -27,8 +28,8 @@ function Command({ className, ...props }: React.ComponentProps<typeof CommandPri
}
function CommandDialog({
- title = 'Command Palette',
- description = 'Search for a command to run...',
+ title,
+ description,
children,
className,
showCloseButton = true,
@@ -43,11 +44,13 @@ function CommandDialog({
filter?: React.ComponentProps<typeof CommandPrimitive>['filter'];
shouldFilter?: boolean;
}) {
+ const t = useTranslations('common');
+
return (
<Dialog {...props}>
<DialogHeader className="sr-only">
- <DialogTitle>{title}</DialogTitle>
- <DialogDescription>{description}</DialogDescription>
+ <DialogTitle>{title ?? t('commandPalette')}</DialogTitle>
+ <DialogDescription>{description ?? t('commandPaletteHint')}</DialogDescription>
</DialogHeader>
<DialogContent
className={cn('overflow-hidden p-0', className)}
diff --git a/apps/web/src/components/ui/message-scroller.tsx b/apps/web/src/components/ui/message-scroller.tsx
index 70c7bc10..1b9332ef 100644
--- a/apps/web/src/components/ui/message-scroller.tsx
+++ b/apps/web/src/components/ui/message-scroller.tsx
@@ -1,6 +1,7 @@
'use client';
import * as React from 'react';
+import { useTranslations } from 'next-intl';
import {
MessageScroller as MessageScrollerPrimitive,
useMessageScroller,
@@ -91,6 +92,8 @@ function MessageScrollerButton({
...props
}: React.ComponentProps<typeof MessageScrollerPrimitive.Button> &
Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>) {
+ const t = useTranslations('common');
+
return (
<MessageScrollerPrimitive.Button
data-slot="message-scroller-button"
@@ -109,7 +112,7 @@ function MessageScrollerButton({
<>
<ArrowDownIcon />
<span className="sr-only">
- {direction === 'end' ? 'Scroll to end' : 'Scroll to start'}
+ {t(direction === 'end' ? 'scrollToEnd' : 'scrollToStart')}
</span>
</>
)}
diff --git a/apps/web/src/components/ui/sidebar.tsx b/apps/web/src/components/ui/sidebar.tsx
index d34e3894..6e270a1b 100644
--- a/apps/web/src/components/ui/sidebar.tsx
+++ b/apps/web/src/components/ui/sidebar.tsx
@@ -4,6 +4,7 @@ import * as React from 'react';
import { Slot } from '@radix-ui/react-slot';
import { cva, type VariantProps } from 'class-variance-authority';
import { PanelLeftIcon } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { useIsMobile } from '@/hooks/use-mobile';
import { cn } from '@/lib/utils';
@@ -228,6 +229,7 @@ function Sidebar({
}
function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>) {
+ const t = useTranslations('common');
const { toggleSidebar } = useSidebar();
return (
@@ -244,22 +246,23 @@ function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<t
{...props}
>
<PanelLeftIcon />
- <span className="sr-only">Toggle Sidebar</span>
+ <span className="sr-only">{t('toggleSidebar')}</span>
</Button>
);
}
function SidebarRail({ className, ...props }: React.ComponentProps<'button'>) {
+ const t = useTranslations('common');
const { toggleSidebar } = useSidebar();
return (
<button
data-sidebar="rail"
data-slot="sidebar-rail"
- aria-label="Toggle Sidebar"
+ aria-label={t('toggleSidebar')}
tabIndex={-1}
onClick={toggleSidebar}
- title="Toggle Sidebar"
+ title={t('toggleSidebar')}
className={cn(
'absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex',
'in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize',
diff --git a/apps/web/src/features/account/AccountAccountsPage.tsx b/apps/web/src/features/account/AccountAccountsPage.tsx
index 027c0389..a5ac4a4f 100644
--- a/apps/web/src/features/account/AccountAccountsPage.tsx
+++ b/apps/web/src/features/account/AccountAccountsPage.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import FullPageView from '@/components/common/page/FullPageView';
import AccountGoogleConnection from './components/accounts/AccountGoogleConnection';
import AccountTelegramConnection from './components/accounts/AccountTelegramConnection';
@@ -8,14 +9,11 @@ import { useGoogleAvailable } from './services/accounts.service';
// A provider is only listed when the instance has it configured, so the page never
// offers a connection that cannot complete. Telegram makes that check itself.
export default function AccountAccountsPage() {
+ const t = useTranslations('account.accounts');
const googleAvailable = useGoogleAvailable();
return (
- <FullPageView
- label="Accounts"
- title="Accounts"
- description="Connect external accounts to sign in with them or receive notifications there."
- >
+ <FullPageView label={t('label')} title={t('title')} description={t('description')}>
<div className="divide-y">
{googleAvailable && <AccountGoogleConnection />}
<AccountTelegramConnection />
diff --git a/apps/web/src/features/account/AccountPreferencesPage.tsx b/apps/web/src/features/account/AccountPreferencesPage.tsx
index 7cd0865a..dec2cca3 100644
--- a/apps/web/src/features/account/AccountPreferencesPage.tsx
+++ b/apps/web/src/features/account/AccountPreferencesPage.tsx
@@ -1,6 +1,7 @@
'use client';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import type {
AccountPreferencesPatch,
IssueActivityView,
@@ -9,6 +10,7 @@ import type {
StartPage,
ThemePreference,
} from '@/lib/api';
+import { LOCALES, LOCALE_LABELS } from '@/i18n/locales';
import {
useAccountPreferencesQuery,
useUpdateAccountPreferences,
@@ -24,38 +26,16 @@ import AccountHotkeys from './components/preferences/AccountHotkeys';
import AccountPreferencesNav from './components/preferences/AccountPreferencesNav';
import AccountPreferencesSaveState from './components/preferences/AccountPreferencesSaveState';
-const THEME_OPTIONS: { value: ThemePreference; label: string }[] = [
- { value: 'system', label: 'Match system' },
- { value: 'light', label: 'Light' },
- { value: 'dark', label: 'Dark' },
-];
-
-const ISSUE_OPEN_OPTIONS: { value: IssueOpenMode; label: string }[] = [
- { value: 'panel', label: 'Side panel' },
- { value: 'page', label: 'Full page' },
-];
-
-const ISSUE_STATS_VIEW_OPTIONS: { value: IssueStatsView; label: string }[] = [
- { value: 'compact', label: 'Compact bar' },
- { value: 'timeline', label: 'Timeline' },
-];
-
-const ISSUE_ACTIVITY_VIEW_OPTIONS: { value: IssueActivityView; label: string }[] = [
- { value: 'flat', label: 'Flat' },
- { value: 'grouped', label: 'Grouped by status' },
-];
-
-const START_PAGE_OPTIONS: { value: StartPage; label: string }[] = [
- { value: 'work-items', label: 'Work items' },
- { value: 'inbox', label: 'Inbox' },
- { value: 'dashboard', label: 'Dashboards' },
- { value: 'initiatives', label: 'Initiatives' },
- { value: 'ai-chat', label: 'AI chat' },
-];
+const THEMES: ThemePreference[] = ['system', 'light', 'dark'];
+const ISSUE_OPEN_MODES: IssueOpenMode[] = ['panel', 'page'];
+const ISSUE_STATS_VIEWS: IssueStatsView[] = ['compact', 'timeline'];
+const ISSUE_ACTIVITY_VIEWS: IssueActivityView[] = ['flat', 'grouped'];
+const START_PAGES: StartPage[] = ['work-items', 'inbox', 'dashboard', 'initiatives', 'ai-chat'];
// Personal interface preferences (/account/preferences). Each choice saves as soon
// as it is made and applies on every device the user signs in from.
export default function AccountPreferencesPage() {
+ const t = useTranslations('account.preferences');
const { data, isPending } = useAccountPreferencesQuery();
const update = useUpdateAccountPreferences();
const prefs = data ?? PREFERENCE_DEFAULTS;
@@ -64,36 +44,44 @@ export default function AccountPreferencesPage() {
const disabled = isPending;
const save = (patch: AccountPreferencesPatch) =>
- update.mutate(patch, { onSuccess: () => toast.success('Preferences saved') });
+ update.mutate(patch, { onSuccess: () => toast.success(t('saved')) });
+
+ // The language list names each language in itself, so it is not translated.
+ const localeOptions = LOCALES.map((value) => ({ value, label: LOCALE_LABELS[value] }));
return (
<FullPageView
- label="Preferences"
- title="Preferences"
- description="How the app looks and behaves for you. Every change saves right away and applies wherever you sign in."
+ label={t('label')}
+ title={t('title')}
+ description={t('description')}
actions={<AccountPreferencesSaveState saving={update.isPending} />}
nav={<AccountPreferencesNav />}
>
- <AccountPreferencesSection id="appearance" title="Appearance">
- <AccountPreferenceRow
- label="Theme"
- description="Match system follows your operating system setting."
- >
+ <AccountPreferencesSection id="appearance" title={t('sections.appearance')}>
+ <AccountPreferenceRow label={t('theme')} description={t('themeDescription')}>
<AccountPreferenceSelect
value={prefs.theme}
- options={THEME_OPTIONS}
+ options={THEMES.map((value) => ({ value, label: t(`themeOptions.${value}`) }))}
onChange={(theme) => save({ theme })}
disabled={disabled}
/>
</AccountPreferenceRow>
+ <AccountPreferenceRow label={t('language')} description={t('languageDescription')}>
+ <AccountPreferenceSelect
+ value={prefs.locale}
+ options={localeOptions}
+ onChange={(locale) => save({ locale })}
+ disabled={disabled}
+ />
+ </AccountPreferenceRow>
</AccountPreferencesSection>
<AccountPreferencesSection
id="date-and-time"
- title="Date and time"
- description="Timestamps are stored in UTC and shown in the zone you pick here."
+ title={t('sections.dateAndTime')}
+ description={t('sections.dateAndTimeDescription')}
>
- <AccountPreferenceRow label="Timezone" description="Pick the zone you work in.">
+ <AccountPreferenceRow label={t('timezone')} description={t('timezoneDescription')}>
<AccountPreferencesTimezone
value={prefs.timezone}
onChange={(timezone) => save({ timezone })}
@@ -104,27 +92,30 @@ export default function AccountPreferencesPage() {
<AccountPreferencesSection
id="navigation"
- title="Navigation"
- description="Where the app takes you, and how issues open."
+ title={t('sections.navigation')}
+ description={t('sections.navigationDescription')}
>
<AccountPreferenceRow
- label="Open issues in"
- description="What happens when you click an issue on a board, table, calendar, or timeline."
+ label={t('issueOpenMode')}
+ description={t('issueOpenModeDescription')}
>
<AccountPreferenceSelect
value={prefs.issueOpenMode}
- options={ISSUE_OPEN_OPTIONS}
+ options={ISSUE_OPEN_MODES.map((value) => ({
+ value,
+ label: t(`issueOpenModeOptions.${value}`),
+ }))}
onChange={(issueOpenMode) => save({ issueOpenMode })}
disabled={disabled}
/>
</AccountPreferenceRow>
- <AccountPreferenceRow
- label="Start page"
- description="The section that opens when you enter the app, in your last active project."
- >
+ <AccountPreferenceRow label={t('startPage')} description={t('startPageDescription')}>
<AccountPreferenceSelect
value={prefs.startPage}
- options={START_PAGE_OPTIONS}
+ options={START_PAGES.map((value) => ({
+ value,
+ label: t(`startPageOptions.${value}`),
+ }))}
onChange={(startPage) => save({ startPage })}
disabled={disabled}
/>
@@ -133,37 +124,34 @@ export default function AccountPreferencesPage() {
<AccountPreferencesSection
id="issue-settings"
- title="Issue settings"
- description="How the stats and the activity log of an issue start out. Switching them while an issue is open does not change these."
+ title={t('sections.issueSettings')}
+ description={t('sections.issueSettingsDescription')}
>
- <AccountPreferenceRow
- label="Show stats"
- description="Whether the stats section starts expanded when you open an issue."
- >
+ <AccountPreferenceRow label={t('showStats')} description={t('showStatsDescription')}>
<Switch
checked={prefs.issueStatsOpen}
onCheckedChange={(issueStatsOpen) => save({ issueStatsOpen })}
disabled={disabled}
/>
</AccountPreferenceRow>
- <AccountPreferenceRow
- label="Show stats as"
- description="Compact is one bar with a share per status; Timeline gives each status its own lane on a time axis."
- >
+ <AccountPreferenceRow label={t('statsView')} description={t('statsViewDescription')}>
<AccountPreferenceSelect
value={prefs.issueStatsView}
- options={ISSUE_STATS_VIEW_OPTIONS}
+ options={ISSUE_STATS_VIEWS.map((value) => ({
+ value,
+ label: t(`statsViewOptions.${value}`),
+ }))}
onChange={(issueStatsView) => save({ issueStatsView })}
disabled={disabled}
/>
</AccountPreferenceRow>
- <AccountPreferenceRow
- label="Show activity as"
- description="Flat is every entry newest first; Grouped splits the log by the status the issue was in."
- >
+ <AccountPreferenceRow label={t('activityView')} description={t('activityViewDescription')}>
<AccountPreferenceSelect
value={prefs.issueActivityView}
- options={ISSUE_ACTIVITY_VIEW_OPTIONS}
+ options={ISSUE_ACTIVITY_VIEWS.map((value) => ({
+ value,
+ label: t(`activityViewOptions.${value}`),
+ }))}
onChange={(issueActivityView) => save({ issueActivityView })}
disabled={disabled}
/>
@@ -172,13 +160,10 @@ export default function AccountPreferencesPage() {
<AccountPreferencesSection
id="notifications"
- title="Notifications"
- description="Watching an issue brings you its comments and status changes."
+ title={t('sections.notifications')}
+ description={t('sections.notificationsDescription')}
>
- <AccountPreferenceRow
- label="Watch issues automatically"
- description="The ones you create, get assigned, comment on, or are mentioned in."
- >
+ <AccountPreferenceRow label={t('autoWatch')} description={t('autoWatchDescription')}>
<Switch
checked={prefs.autoWatch}
onCheckedChange={(autoWatch) => save({ autoWatch })}
@@ -187,10 +172,10 @@ export default function AccountPreferencesPage() {
</AccountPreferenceRow>
</AccountPreferencesSection>
- <AccountPreferencesSection id="ai-chat" title="AI chat">
+ <AccountPreferencesSection id="ai-chat" title={t('sections.aiChat')}>
<AccountPreferenceRow
- label="Show chat by default"
- description="The chat button stays on screen in a project. The chat window opens only when you click it."
+ label={t('showChatByDefault')}
+ description={t('showChatByDefaultDescription')}
>
<Switch
checked={prefs.showChatByDefault}
@@ -202,8 +187,8 @@ export default function AccountPreferencesPage() {
<AccountPreferencesSection
id="shortcuts"
- title="Keyboard shortcuts"
- description="Press Change, then the keys you want. Reset takes a shortcut back to the one set for this instance."
+ title={t('sections.shortcuts')}
+ description={t('sections.shortcutsDescription')}
>
{/* Only once the saved overrides are known: a rebinding recorded before they
arrive would be built on an empty map and drop the ones already stored. */}
diff --git a/apps/web/src/features/account/AccountProfilePage.tsx b/apps/web/src/features/account/AccountProfilePage.tsx
index 8f1d32b7..719f1584 100644
--- a/apps/web/src/features/account/AccountProfilePage.tsx
+++ b/apps/web/src/features/account/AccountProfilePage.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import { useSession } from '@/lib/auth-client';
import FullPageView from '@/components/common/page/FullPageView';
import AccountProfileAvatar from './components/profile/AccountProfileAvatar';
@@ -7,21 +8,19 @@ import AccountProfileNameForm from './components/profile/AccountProfileNameForm'
import AccountSection from './components/AccountSection';
export default function AccountProfilePage() {
+ const t = useTranslations('account.profile');
const { data: session } = useSession();
return (
<FullPageView
- label="Profile"
- title="Profile"
- description={`Your name and avatar are shown across the app. Signed in as ${session?.user.email ?? '…'}.`}
+ label={t('label')}
+ title={t('title')}
+ description={t('description', { email: session?.user.email ?? '…' })}
>
- <AccountSection
- title="Avatar"
- description="Shown next to your name in comments, assignees, and members."
- >
+ <AccountSection title={t('avatarTitle')} description={t('avatarDescription')}>
<AccountProfileAvatar />
</AccountSection>
- <AccountSection title="Name">
+ <AccountSection title={t('nameTitle')}>
<AccountProfileNameForm />
</AccountSection>
</FullPageView>
diff --git a/apps/web/src/features/account/AccountSecurityPage.tsx b/apps/web/src/features/account/AccountSecurityPage.tsx
index 65d4d728..d95dac1b 100644
--- a/apps/web/src/features/account/AccountSecurityPage.tsx
+++ b/apps/web/src/features/account/AccountSecurityPage.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import { useState } from 'react';
import { useQueryClient } from '@tanstack/react-query';
import { useSession } from '@/lib/auth-client';
@@ -16,6 +17,7 @@ import AccountSecurityDeletePasskeyDialog from './components/security/AccountSec
// Owns the passkey list query and the delete target; the child components refresh
// the list through the callbacks after a change.
export default function AccountSecurityPage() {
+ const t = useTranslations('account.security');
const { data: session } = useSession();
const queryClient = useQueryClient();
const [deleting, setDeleting] = useState<PasskeyRow | null>(null);
@@ -25,20 +27,17 @@ export default function AccountSecurityPage() {
return (
<FullPageView
- label="Security"
- title="Security"
- description={`How you sign in to ${session?.user.email ?? '…'}.`}
+ label={t('label')}
+ title={t('title')}
+ description={t('description', { email: session?.user.email ?? '…' })}
>
- <AccountSection
- title="Password"
- description="Changing your password signs out your other sessions."
- >
+ <AccountSection title={t('passwordTitle')} description={t('passwordDescription')}>
<AccountSecurityPasswordForm />
</AccountSection>
<AccountSection
- title="Passkeys"
- description="Sign in without a password using Touch ID, Windows Hello, or a security key."
+ title={t('passkeysTitle')}
+ description={t('passkeysDescription')}
actions={<AccountSecurityAddPasskey onAdded={invalidate} />}
>
<AccountSecurityPasskeyList
diff --git a/apps/web/src/features/account/components/accounts/AccountConnectionRow.tsx b/apps/web/src/features/account/components/accounts/AccountConnectionRow.tsx
index 933cea44..2ece17a0 100644
--- a/apps/web/src/features/account/components/accounts/AccountConnectionRow.tsx
+++ b/apps/web/src/features/account/components/accounts/AccountConnectionRow.tsx
@@ -2,6 +2,7 @@
import type { ReactNode } from 'react';
import { Button } from '@/components/ui/button';
+import { useTranslations } from 'next-intl';
// One external account: the service on the left with what it is connected to, and
// the connect or disconnect action on the right.
@@ -27,11 +28,12 @@ export default function AccountConnectionRow({
onConnect: () => void;
onDisconnect: () => void;
}) {
+ const t = useTranslations('account.accounts');
function action() {
if (!connectedTo) {
return (
<Button size="sm" disabled={busy} onClick={onConnect}>
- Connect
+ {t('connect')}
</Button>
);
}
@@ -40,7 +42,7 @@ export default function AccountConnectionRow({
}
return (
<Button variant="outline" size="sm" disabled={busy} onClick={onDisconnect}>
- Disconnect
+ {t('disconnect')}
</Button>
);
}
diff --git a/apps/web/src/features/account/components/accounts/AccountGoogleConnection.tsx b/apps/web/src/features/account/components/accounts/AccountGoogleConnection.tsx
index 98893a8d..e7df7f6a 100644
--- a/apps/web/src/features/account/components/accounts/AccountGoogleConnection.tsx
+++ b/apps/web/src/features/account/components/accounts/AccountGoogleConnection.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import { useState } from 'react';
import { toast } from 'sonner';
import GoogleIcon from '@/components/common/GoogleIcon';
@@ -15,6 +16,7 @@ import {
// is refused while Google is the only way left to sign in, since it would lock the
// account out.
export default function AccountGoogleConnection() {
+ const t = useTranslations('account.accounts');
const { data: accounts } = useLinkedAccountsQuery();
const disconnect = useDisconnectProvider();
const [connecting, setConnecting] = useState(false);
@@ -28,9 +30,9 @@ export default function AccountGoogleConnection() {
async function onConnect() {
setConnecting(true);
try {
- await connectGoogle();
+ await connectGoogle(t('connectFailed'));
} catch (err) {
- toast.error(err instanceof Error ? err.message : 'Could not connect Google.');
+ toast.error(err instanceof Error ? err.message : t('googleConnectFailed'));
} finally {
// Normally the browser has left for Google by now; releasing the button
// anyway keeps a call that returned without navigating from locking it.
@@ -42,16 +44,16 @@ export default function AccountGoogleConnection() {
<AccountConnectionRow
icon={<GoogleIcon className="size-4" />}
name="Google"
- description="Sign in with your Google account."
- connectedTo={google ? 'Connected' : null}
+ description={t('googleDescription')}
+ connectedTo={google ? t('connected') : null}
busy={connecting || disconnect.isPending}
- disconnectHint={onlyWayIn ? 'Set a password first' : undefined}
+ disconnectHint={onlyWayIn ? t('setPasswordFirst') : undefined}
onConnect={() => void onConnect()}
onDisconnect={() => {
if (!google) return;
disconnect.mutate(
{ providerId: 'google', accountId: google.accountId },
- { onSuccess: () => toast.success('Google disconnected') },
+ { onSuccess: () => toast.success(t('googleDisconnected')) },
);
}}
/>
diff --git a/apps/web/src/features/account/components/accounts/AccountTelegramConnection.tsx b/apps/web/src/features/account/components/accounts/AccountTelegramConnection.tsx
index af8bb629..a350fcb6 100644
--- a/apps/web/src/features/account/components/accounts/AccountTelegramConnection.tsx
+++ b/apps/web/src/features/account/components/accounts/AccountTelegramConnection.tsx
@@ -1,11 +1,12 @@
'use client';
+import { useTranslations } from 'next-intl';
import { useEffect, useState } from 'react';
import { toast } from 'sonner';
import { Send } from 'lucide-react';
import AccountConnectionRow from './AccountConnectionRow';
import {
- telegramAccountLabel,
+ useTelegramAccountLabel,
useDisconnectTelegram,
useStartTelegramLink,
useTelegramAccountQuery,
@@ -22,6 +23,8 @@ const POLL_INTERVAL_MS = 2000;
const POLL_TIMEOUT_MS = 3 * 60_000;
export default function AccountTelegramConnection() {
+ const t = useTranslations('account.accounts');
+ const accountLabel = useTelegramAccountLabel();
const [waiting, setWaiting] = useState(false);
const { data } = useTelegramAccountQuery(waiting ? POLL_INTERVAL_MS : undefined);
const start = useStartTelegramLink();
@@ -33,12 +36,12 @@ export default function AccountTelegramConnection() {
if (!waiting) return;
if (link) {
setWaiting(false);
- toast.success('Telegram connected');
+ toast.success(t('telegramConnected'));
return;
}
const stop = setTimeout(() => setWaiting(false), POLL_TIMEOUT_MS);
return () => clearTimeout(stop);
- }, [waiting, link]);
+ }, [waiting, link, t]);
async function onConnect() {
// The tab is opened inside the click handler: opening it after the request
@@ -64,16 +67,12 @@ export default function AccountTelegramConnection() {
<AccountConnectionRow
icon={<Send className="size-4" />}
name="Telegram"
- description={
- waiting
- ? 'Waiting for you to press Start in the bot chat…'
- : 'Receive notifications in Telegram.'
- }
- connectedTo={link ? telegramAccountLabel(link) : null}
+ description={waiting ? t('telegramWaiting') : t('telegramDescription')}
+ connectedTo={link ? accountLabel(link) : null}
busy={start.isPending || disconnect.isPending}
onConnect={() => void onConnect()}
onDisconnect={() =>
- disconnect.mutate(undefined, { onSuccess: () => toast.success('Telegram disconnected') })
+ disconnect.mutate(undefined, { onSuccess: () => toast.success(t('telegramDisconnected')) })
}
/>
);
diff --git a/apps/web/src/features/account/components/preferences/AccountPreferencesNav.tsx b/apps/web/src/features/account/components/preferences/AccountPreferencesNav.tsx
index d15df081..aae2d9ed 100644
--- a/apps/web/src/features/account/components/preferences/AccountPreferencesNav.tsx
+++ b/apps/web/src/features/account/components/preferences/AccountPreferencesNav.tsx
@@ -1,25 +1,32 @@
'use client';
import { Bell, Bot, Clock, Compass, Keyboard, ListChecks, Palette } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { SectionNav, type SectionNavItem } from '@/components/common/page/SectionNav';
import { useSectionScrollSpy } from '@/hooks/useSectionScrollSpy';
// The blocks of the preferences page, in the order they are rendered. The ids match
// the ones the page gives its sections.
-const SECTIONS: SectionNavItem[] = [
- { id: 'appearance', label: 'Appearance', icon: Palette },
- { id: 'date-and-time', label: 'Date and time', icon: Clock },
- { id: 'navigation', label: 'Navigation', icon: Compass },
- { id: 'issue-settings', label: 'Issue settings', icon: ListChecks },
- { id: 'notifications', label: 'Notifications', icon: Bell },
- { id: 'ai-chat', label: 'AI chat', icon: Bot },
- { id: 'shortcuts', label: 'Keyboard shortcuts', icon: Keyboard },
-];
+const SECTIONS = [
+ { id: 'appearance', labelKey: 'appearance', icon: Palette },
+ { id: 'date-and-time', labelKey: 'dateAndTime', icon: Clock },
+ { id: 'navigation', labelKey: 'navigation', icon: Compass },
+ { id: 'issue-settings', labelKey: 'issueSettings', icon: ListChecks },
+ { id: 'notifications', labelKey: 'notifications', icon: Bell },
+ { id: 'ai-chat', labelKey: 'aiChat', icon: Bot },
+ { id: 'shortcuts', labelKey: 'shortcuts', icon: Keyboard },
+] as const;
// The section rail for the preferences page: it follows the page scroll and jumps
// to a block on click.
export default function AccountPreferencesNav() {
+ const t = useTranslations('account.preferences');
const { activeId, setActiveId } = useSectionScrollSpy(SECTIONS.map((s) => s.id));
+ const sections: SectionNavItem[] = SECTIONS.map(({ id, labelKey, icon }) => ({
+ id,
+ label: t(`sections.${labelKey}`),
+ icon,
+ }));
function jump(id: string) {
setActiveId(id);
@@ -28,9 +35,9 @@ export default function AccountPreferencesNav() {
return (
<SectionNav
- sections={SECTIONS}
+ sections={sections}
activeId={activeId}
- label="Preferences"
+ label={t('label')}
onJump={jump}
// The page scrolls under a static top bar, so the rail keeps a margin of its
// own once it pins.
diff --git a/apps/web/src/features/account/components/preferences/AccountPreferencesTimezone.tsx b/apps/web/src/features/account/components/preferences/AccountPreferencesTimezone.tsx
index 0ce741d3..0f0c2bd9 100644
--- a/apps/web/src/features/account/components/preferences/AccountPreferencesTimezone.tsx
+++ b/apps/web/src/features/account/components/preferences/AccountPreferencesTimezone.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import { useMemo } from 'react';
import { canonicalTimezone } from '@/utils/dates';
import {
@@ -16,16 +17,17 @@ import {
// The regions IANA zone names start with, in the order they are listed. A zone whose
// prefix is not one of these (UTC, GMT, legacy aliases) falls into "Other".
+// The region names themselves are messages under `account.preferences.timezoneGroups`.
const REGIONS = [
- { prefix: 'America', label: 'Americas' },
- { prefix: 'Europe', label: 'Europe' },
- { prefix: 'Africa', label: 'Africa' },
- { prefix: 'Asia', label: 'Asia' },
- { prefix: 'Australia', label: 'Australia' },
- { prefix: 'Pacific', label: 'Pacific' },
- { prefix: 'Atlantic', label: 'Atlantic' },
- { prefix: 'Indian', label: 'Indian Ocean' },
- { prefix: 'Antarctica', label: 'Antarctica' },
+ 'America',
+ 'Europe',
+ 'Africa',
+ 'Asia',
+ 'Australia',
+ 'Pacific',
+ 'Atlantic',
+ 'Indian',
+ 'Antarctica',
] as const;
// Every zone the browser's own Intl data knows, so the list matches what the runtime
@@ -62,14 +64,18 @@ function zoneLabel(zone: string): string {
return offset ? `(${offset}) ${city}` : city;
}
-function groupZones(zones: string[]): { value: string; items: string[] }[] {
- const groups = REGIONS.map((r) => ({
- value: r.label,
- items: zones.filter((z) => z.startsWith(`${r.prefix}/`)),
+type ZoneRegion = (typeof REGIONS)[number] | 'Other';
+
+function groupZones(zones: string[]): { value: ZoneRegion; items: string[] }[] {
+ const groups = REGIONS.map((prefix) => ({
+ value: prefix as ZoneRegion,
+ items: zones.filter((z) => z.startsWith(`${prefix}/`)),
}));
const grouped = new Set(groups.flatMap((g) => g.items));
const other = zones.filter((z) => !grouped.has(z));
- return [...groups, { value: 'Other', items: other }].filter((g) => g.items.length > 0);
+ return [...groups, { value: 'Other' as ZoneRegion, items: other }].filter(
+ (g) => g.items.length > 0,
+ );
}
// Timezone picker: every zone the runtime knows, grouped by region and searchable by
@@ -83,6 +89,7 @@ export default function AccountPreferencesTimezone({
onChange: (timezone: string) => void;
disabled: boolean;
}) {
+ const t = useTranslations('account.preferences');
const groups = useMemo(() => groupZones(zoneList()), []);
// A label costs an Intl.DateTimeFormat and the list asks for one on every render
// and every keystroke in the search field, so each is built on first use and kept.
@@ -108,16 +115,16 @@ export default function AccountPreferencesTimezone({
{/* The input shows the selected zone, so select it on focus: typing then
replaces it instead of appending to it. */}
<ComboboxInput
- placeholder="Select a timezone"
+ placeholder={t('timezonePlaceholder')}
className="w-full sm:w-44"
onFocus={(e) => e.currentTarget.select()}
/>
<ComboboxContent>
- <ComboboxEmpty>No timezones found.</ComboboxEmpty>
+ <ComboboxEmpty>{t('timezoneEmpty')}</ComboboxEmpty>
<ComboboxList>
- {(group: { value: string; items: string[] }) => (
+ {(group: { value: ZoneRegion; items: string[] }) => (
<ComboboxGroup key={group.value} items={group.items}>
- <ComboboxLabel>{group.value}</ComboboxLabel>
+ <ComboboxLabel>{t(`timezoneGroups.${group.value}`)}</ComboboxLabel>
<ComboboxCollection>
{(zone: string) => (
<ComboboxItem key={zone} value={zone}>
diff --git a/apps/web/src/features/account/components/profile/AccountProfileAvatar.tsx b/apps/web/src/features/account/components/profile/AccountProfileAvatar.tsx
index 9be772d9..e6394351 100644
--- a/apps/web/src/features/account/components/profile/AccountProfileAvatar.tsx
+++ b/apps/web/src/features/account/components/profile/AccountProfileAvatar.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import { useRef, useState, type ChangeEvent } from 'react';
import { useMutation } from '@tanstack/react-query';
import { toast } from 'sonner';
@@ -18,6 +19,8 @@ const ACCEPT = 'image/png,image/jpeg,image/gif,image/webp,image/avif';
// thing left here is to read the session again — that is what every avatar in the
// app renders from.
export default function AccountProfileAvatar() {
+ const t = useTranslations('account.profile');
+ const tCommon = useTranslations('common');
const { data: session, refetch: refetchSession } = useSession();
const inputRef = useRef<HTMLInputElement>(null);
const [error, setError] = useState<string | null>(null);
@@ -29,25 +32,25 @@ export default function AccountProfileAvatar() {
mutationFn: (file: File) => uploadAvatar(file),
onSuccess: async () => {
await refetchSession();
- toast.success('Avatar updated');
+ toast.success(t('avatarUpdated'));
},
- onError: (err) => setError(err instanceof Error ? err.message : 'Could not upload avatar.'),
+ onError: (err) => setError(err instanceof Error ? err.message : t('avatarUploadFailed')),
});
const removeMutation = useMutation({
mutationFn: () => removeAvatar(),
onSuccess: async () => {
await refetchSession();
- toast.success('Avatar removed');
+ toast.success(t('avatarRemoved'));
},
- onError: (err) => setError(err instanceof Error ? err.message : 'Could not remove avatar.'),
+ onError: (err) => setError(err instanceof Error ? err.message : t('avatarRemoveFailed')),
});
const busy = uploadMutation.isPending || removeMutation.isPending;
function uploadLabel() {
- if (uploadMutation.isPending) return 'Uploading…';
- return image ? 'Change' : 'Upload';
+ if (uploadMutation.isPending) return t('uploading');
+ return image ? t('change') : t('upload');
}
function onPick(e: ChangeEvent<HTMLInputElement>) {
@@ -56,7 +59,7 @@ export default function AccountProfileAvatar() {
if (!file) return;
setError(null);
if (maxAvatarMb && file.size > maxAvatarMb * 1024 * 1024) {
- setError(`Image exceeds the ${maxAvatarMb} MB limit`);
+ setError(t('avatarTooLarge', { mb: maxAvatarMb }));
return;
}
uploadMutation.mutate(file);
@@ -90,12 +93,13 @@ export default function AccountProfileAvatar() {
}}
>
<Trash2 className="size-3.5" />
- Remove
+ {tCommon('delete')}
</Button>
)}
</div>
<p className="text-xs text-muted-foreground">
- PNG, JPEG, GIF, WebP, or AVIF.{maxAvatarMb ? ` Up to ${maxAvatarMb} MB.` : ''}
+ {t('avatarFormats')}
+ {maxAvatarMb ? ` ${t('avatarMaxSize', { mb: maxAvatarMb })}` : ''}
</p>
{error && <p className="text-sm text-destructive">{error}</p>}
</div>
diff --git a/apps/web/src/features/account/components/profile/AccountProfileNameForm.tsx b/apps/web/src/features/account/components/profile/AccountProfileNameForm.tsx
index 67653f84..1959f7f1 100644
--- a/apps/web/src/features/account/components/profile/AccountProfileNameForm.tsx
+++ b/apps/web/src/features/account/components/profile/AccountProfileNameForm.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import { useEffect, useState } from 'react';
import { useMutation } from '@tanstack/react-query';
import { toast } from 'sonner';
@@ -11,6 +12,8 @@ import { Label } from '@/components/ui/label';
// Saves through better-auth updateUser, which refreshes the session so every
// avatar and name in the app picks the change up.
export default function AccountProfileNameForm() {
+ const t = useTranslations('account.profile');
+ const tCommon = useTranslations('common');
const { data: session } = useSession();
const currentName = session?.user.name ?? '';
const [name, setName] = useState(currentName);
@@ -22,10 +25,10 @@ export default function AccountProfileNameForm() {
const saveMutation = useMutation({
mutationFn: async () => {
const res = await updateUser({ name: trimmed });
- if (res.error) throw new Error(res.error.message ?? 'Could not update name.');
+ if (res.error) throw new Error(res.error.message ?? t('nameUpdateFailed'));
},
- onSuccess: () => toast.success('Name updated'),
- onError: (err) => setError(err instanceof Error ? err.message : 'Could not update name.'),
+ onSuccess: () => toast.success(t('nameUpdated')),
+ onError: (err) => setError(err instanceof Error ? err.message : t('nameUpdateFailed')),
});
// The session loads after mount; fill the field once the name arrives.
@@ -44,7 +47,7 @@ export default function AccountProfileNameForm() {
}}
>
<div className="flex flex-col gap-2">
- <Label htmlFor="profile-name">Display name</Label>
+ <Label htmlFor="profile-name">{t('displayName')}</Label>
<Input
id="profile-name"
value={name}
@@ -56,7 +59,7 @@ export default function AccountProfileNameForm() {
{error && <p className="text-sm text-destructive">{error}</p>}
<div>
<Button type="submit" size="sm" disabled={!dirty || saveMutation.isPending}>
- {saveMutation.isPending ? 'Saving…' : 'Save'}
+ {saveMutation.isPending ? tCommon('saving') : tCommon('save')}
</Button>
</div>
</form>
diff --git a/apps/web/src/features/account/components/security/AccountSecurityAddPasskey.tsx b/apps/web/src/features/account/components/security/AccountSecurityAddPasskey.tsx
index 679dcb7c..ed1c18fe 100644
--- a/apps/web/src/features/account/components/security/AccountSecurityAddPasskey.tsx
+++ b/apps/web/src/features/account/components/security/AccountSecurityAddPasskey.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import { useState } from 'react';
import { useMutation } from '@tanstack/react-query';
import { Plus } from 'lucide-react';
@@ -8,18 +9,19 @@ import { APP_NAME } from '@/utils/app';
import { Button } from '@/components/ui/button';
export default function AccountSecurityAddPasskey({ onAdded }: { onAdded: () => void }) {
+ const t = useTranslations('account.security');
const { data: session } = useSession();
const [error, setError] = useState<string | null>(null);
const addMutation = useMutation({
mutationFn: async () => {
- if (!session) throw new Error('Not signed in');
+ if (!session) throw new Error(t('notSignedIn'));
// The name becomes the WebAuthn userName shown in the OS/browser picker.
const result = await passkey.addPasskey({ name: `${APP_NAME} · ${session.user.email}` });
- if (result?.error) throw new Error(result.error.message ?? 'Could not add passkey.');
+ if (result?.error) throw new Error(result.error.message ?? t('addPasskeyFailed'));
},
onSuccess: onAdded,
- onError: (err) => setError(err instanceof Error ? err.message : 'Could not add passkey.'),
+ onError: (err) => setError(err instanceof Error ? err.message : t('addPasskeyFailed')),
});
return (
@@ -35,7 +37,7 @@ export default function AccountSecurityAddPasskey({ onAdded }: { onAdded: () =>
disabled={addMutation.isPending}
>
<Plus className="size-3.5" />
- {addMutation.isPending ? 'Waiting for passkey…' : 'Add passkey'}
+ {addMutation.isPending ? t('waitingForPasskey') : t('addPasskey')}
</Button>
{error && <p className="text-xs text-destructive">{error}</p>}
</div>
diff --git a/apps/web/src/features/account/components/security/AccountSecurityDeletePasskeyDialog.tsx b/apps/web/src/features/account/components/security/AccountSecurityDeletePasskeyDialog.tsx
index b0239ce4..e071369e 100644
--- a/apps/web/src/features/account/components/security/AccountSecurityDeletePasskeyDialog.tsx
+++ b/apps/web/src/features/account/components/security/AccountSecurityDeletePasskeyDialog.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import { toast } from 'sonner';
import { passkey } from '@/lib/auth-client';
import ConfirmDialog from '@/components/common/overlay/ConfirmDialog';
@@ -17,10 +18,11 @@ export default function AccountSecurityDeletePasskeyDialog({
onClose: () => void;
onDeleted: () => void | Promise<void>;
}) {
+ const t = useTranslations('account.security');
return (
<ConfirmDialog
- title="Remove passkey?"
- confirmLabel="Remove passkey"
+ title={t('removePasskeyTitle')}
+ confirmLabel={t('removePasskey')}
onClose={onClose}
onConfirm={async () => {
// Passkey delete is a better-auth call, not a React Query mutation, so the
@@ -28,7 +30,7 @@ export default function AccountSecurityDeletePasskeyDialog({
// to keep the dialog open.
const result = await passkey.deletePasskey({ id: target.id });
if (result?.error) {
- const message = result.error.message ?? 'Could not remove passkey.';
+ const message = result.error.message ?? t('removePasskeyFailed');
toast.error(message);
throw new Error(message);
}
@@ -36,12 +38,12 @@ export default function AccountSecurityDeletePasskeyDialog({
}}
>
<p className="text-sm">
- <span className="font-medium text-foreground">{passkeyLabel(target)}</span>
+ <span className="font-medium text-foreground">
+ {passkeyLabel(target, t('passkeyFallback'))}
+ </span>
{accountEmail && <span className="text-muted-foreground"> · {accountEmail}</span>}
</p>
- <p className="mt-1 text-sm text-muted-foreground">
- You will no longer be able to sign in with this passkey. This cannot be undone.
- </p>
+ <p className="mt-1 text-sm text-muted-foreground">{t('deleteWarning')}</p>
</ConfirmDialog>
);
}
diff --git a/apps/web/src/features/account/components/security/AccountSecurityPasskeyItem.tsx b/apps/web/src/features/account/components/security/AccountSecurityPasskeyItem.tsx
index 66c7e5b6..510aff45 100644
--- a/apps/web/src/features/account/components/security/AccountSecurityPasskeyItem.tsx
+++ b/apps/web/src/features/account/components/security/AccountSecurityPasskeyItem.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import { KeyRound, Trash2 } from 'lucide-react';
import { formatDate } from '@/utils/dates';
import { Badge } from '@/components/ui/badge';
@@ -22,6 +23,7 @@ export default function AccountSecurityPasskeyItem({
passkey: PasskeyRow;
onDelete: () => void;
}) {
+ const t = useTranslations('account.security');
return (
<Item
size="sm"
@@ -32,10 +34,10 @@ export default function AccountSecurityPasskeyItem({
</ItemMedia>
<ItemContent>
<ItemTitle className="flex items-center gap-2">
- {passkeyLabel(passkey)}
+ {passkeyLabel(passkey, t('passkeyFallback'))}
{passkey.deviceType === 'singleDevice' && (
<Badge variant="secondary" className="px-1.5 py-0 text-[10px] font-normal">
- This device
+ {t('thisDevice')}
</Badge>
)}
</ItemTitle>
@@ -48,7 +50,7 @@ export default function AccountSecurityPasskeyItem({
variant="ghost"
size="icon"
className="size-7 text-muted-foreground hover:text-destructive"
- title="Remove passkey"
+ title={t('removePasskey')}
onClick={onDelete}
>
<Trash2 className="size-4" />
diff --git a/apps/web/src/features/account/components/security/AccountSecurityPasskeyList.tsx b/apps/web/src/features/account/components/security/AccountSecurityPasskeyList.tsx
index 6a0e76e6..3beb431e 100644
--- a/apps/web/src/features/account/components/security/AccountSecurityPasskeyList.tsx
+++ b/apps/web/src/features/account/components/security/AccountSecurityPasskeyList.tsx
@@ -4,6 +4,7 @@ import { ItemGroup } from '@/components/ui/item';
import { Skeleton } from '@/components/ui/skeleton';
import AccountSecurityPasskeyItem from './AccountSecurityPasskeyItem';
import type { PasskeyRow } from '../../services/passkeys.service';
+import { useTranslations } from 'next-intl';
export default function AccountSecurityPasskeyList({
passkeys,
@@ -14,6 +15,7 @@ export default function AccountSecurityPasskeyList({
isPending: boolean;
onDelete: (passkey: PasskeyRow) => void;
}) {
+ const t = useTranslations('account.security');
if (isPending) {
return (
<div className="space-y-2 py-3">
@@ -24,11 +26,7 @@ export default function AccountSecurityPasskeyList({
}
if (passkeys.length === 0) {
- return (
- <p className="py-6 text-sm text-muted-foreground">
- No passkeys yet. Add one to sign in without a password.
- </p>
- );
+ return <p className="py-6 text-sm text-muted-foreground">{t('empty')}</p>;
}
return (
diff --git a/apps/web/src/features/account/components/security/AccountSecurityPasswordForm.tsx b/apps/web/src/features/account/components/security/AccountSecurityPasswordForm.tsx
index f8ac2d06..e0d1b7f6 100644
--- a/apps/web/src/features/account/components/security/AccountSecurityPasswordForm.tsx
+++ b/apps/web/src/features/account/components/security/AccountSecurityPasswordForm.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import { useState } from 'react';
import { useMutation } from '@tanstack/react-query';
import { toast } from 'sonner';
@@ -14,6 +15,7 @@ const MIN_LENGTH = 8;
// Changes the account password. Requires the current password, and revokes other
// sessions so a leaked old password stops working elsewhere.
export default function AccountSecurityPasswordForm() {
+ const t = useTranslations('account.security');
const [current, setCurrent] = useState('');
const [next, setNext] = useState('');
const [confirm, setConfirm] = useState('');
@@ -32,13 +34,13 @@ export default function AccountSecurityPasswordForm() {
newPassword: next,
revokeOtherSessions: true,
});
- if (res.error) throw new Error(res.error.message ?? 'Could not change password.');
+ if (res.error) throw new Error(res.error.message ?? t('passwordChangeFailed'));
},
onSuccess: () => {
- toast.success('Password changed');
+ toast.success(t('passwordChanged'));
reset();
},
- onError: (err) => setError(err instanceof Error ? err.message : 'Could not change password.'),
+ onError: (err) => setError(err instanceof Error ? err.message : t('passwordChangeFailed')),
});
const valid = current.length > 0 && next.length >= MIN_LENGTH && confirm.length > 0;
@@ -50,7 +52,7 @@ export default function AccountSecurityPasswordForm() {
e.preventDefault();
setError(null);
if (next !== confirm) {
- setError('New passwords do not match');
+ setError(t('passwordsDoNotMatch'));
return;
}
if (!valid) return;
@@ -58,7 +60,7 @@ export default function AccountSecurityPasswordForm() {
}}
>
<div className="flex flex-col gap-2">
- <Label htmlFor="current-password">Current password</Label>
+ <Label htmlFor="current-password">{t('currentPassword')}</Label>
<Input
id="current-password"
type="password"
@@ -68,7 +70,7 @@ export default function AccountSecurityPasswordForm() {
/>
</div>
<div className="flex flex-col gap-2">
- <Label htmlFor="new-password">New password</Label>
+ <Label htmlFor="new-password">{t('newPassword')}</Label>
<Input
id="new-password"
type="password"
@@ -79,7 +81,7 @@ export default function AccountSecurityPasswordForm() {
<p className="text-xs text-muted-foreground">At least {MIN_LENGTH} characters.</p>
</div>
<div className="flex flex-col gap-2">
- <Label htmlFor="confirm-password">Confirm new password</Label>
+ <Label htmlFor="confirm-password">{t('confirmNewPassword')}</Label>
<Input
id="confirm-password"
type="password"
@@ -91,7 +93,7 @@ export default function AccountSecurityPasswordForm() {
{error && <p className="text-sm text-destructive">{error}</p>}
<div>
<Button type="submit" size="sm" disabled={!valid || saveMutation.isPending}>
- {saveMutation.isPending ? 'Changing…' : 'Change password'}
+ {saveMutation.isPending ? t('changing') : t('changePassword')}
</Button>
</div>
</form>
diff --git a/apps/web/src/features/account/services/accounts.service.ts b/apps/web/src/features/account/services/accounts.service.ts
index aeda9181..011d545e 100644
--- a/apps/web/src/features/account/services/accounts.service.ts
+++ b/apps/web/src/features/account/services/accounts.service.ts
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
import { qk } from '@/services/queryKeys';
import { useAuthConfigQuery } from '@/services/authConfig.service';
@@ -18,11 +19,12 @@ export interface LinkedAccount {
}
export function useLinkedAccountsQuery() {
+ const t = useTranslations('account.accounts');
return useQuery({
queryKey: qk.linkedAccounts,
queryFn: async (): Promise<LinkedAccount[]> => {
const { data, error } = await listAccounts();
- if (error) throw new Error(error.message ?? 'Could not load connected accounts.');
+ if (error) throw new Error(error.message ?? t('loadFailed'));
return (data ?? []) as LinkedAccount[];
},
});
@@ -30,20 +32,21 @@ export function useLinkedAccountsQuery() {
// Sends the browser to Google and back. The callback returns to this page, so the
// user lands where they started with the new connection visible.
-export async function connectGoogle(): Promise<void> {
+export async function connectGoogle(connectFailed: string): Promise<void> {
const { error } = await linkSocial({
provider: 'google',
callbackURL: `${window.location.origin}/account/accounts`,
});
- if (error) throw new Error(error.message ?? 'Could not connect Google.');
+ if (error) throw new Error(error.message ?? connectFailed);
}
export function useDisconnectProvider() {
+ const t = useTranslations('account.accounts');
const qc = useQueryClient();
return useMutation({
mutationFn: async (input: { providerId: string; accountId: string }) => {
const { error } = await unlinkAccount(input);
- if (error) throw new Error(error.message ?? 'Could not disconnect this account.');
+ if (error) throw new Error(error.message ?? t('disconnectFailed'));
},
onSuccess: () => qc.invalidateQueries({ queryKey: qk.linkedAccounts }),
});
diff --git a/apps/web/src/features/account/services/passkeys.service.ts b/apps/web/src/features/account/services/passkeys.service.ts
index 357213d3..918ef5ab 100644
--- a/apps/web/src/features/account/services/passkeys.service.ts
+++ b/apps/web/src/features/account/services/passkeys.service.ts
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import { useQuery } from '@tanstack/react-query';
import { authClient } from '@/lib/auth-client';
import { qk } from '@/services/queryKeys';
@@ -15,12 +16,13 @@ export type PasskeyRow = {
// Goes through the auth client, not plain fetch, so better-auth's baseURL and the
// session cookie are reused.
-async function fetchPasskeys(): Promise<PasskeyRow[]> {
+async function fetchPasskeys(loadFailed: string): Promise<PasskeyRow[]> {
const { data, error } = await authClient.$fetch<PasskeyRow[]>('/passkey/list-user-passkeys');
- if (error) throw new Error(error.message ?? 'Could not load passkeys.');
+ if (error) throw new Error(error.message ?? loadFailed);
return data ?? [];
}
export function usePasskeysQuery() {
- return useQuery({ queryKey: qk.passkeys, queryFn: fetchPasskeys });
+ const t = useTranslations('account.security');
+ return useQuery({ queryKey: qk.passkeys, queryFn: () => fetchPasskeys(t('passkeysLoadFailed')) });
}
diff --git a/apps/web/src/features/account/utils/authenticators.ts b/apps/web/src/features/account/utils/authenticators.ts
index 08b0bf8c..752ec110 100644
--- a/apps/web/src/features/account/utils/authenticators.ts
+++ b/apps/web/src/features/account/utils/authenticators.ts
@@ -15,7 +15,11 @@ const AUTHENTICATOR_NAMES: Record<string, string> = {
// The label shown for a passkey: the provider when the AAGUID is known, else the
// name the passkey was registered with.
-export function passkeyLabel(passkey: { aaguid?: string | null; name?: string | null }): string {
+export function passkeyLabel(
+ passkey: { aaguid?: string | null; name?: string | null },
+ // What a passkey with no known authenticator and no name reads as.
+ fallback: string,
+): string {
const provider = passkey.aaguid ? AUTHENTICATOR_NAMES[passkey.aaguid.toLowerCase()] : undefined;
- return provider ?? passkey.name ?? 'Passkey';
+ return provider ?? passkey.name ?? fallback;
}
diff --git a/apps/web/src/features/ai-chat/AiChatPage.tsx b/apps/web/src/features/ai-chat/AiChatPage.tsx
index 4900a11b..af83a268 100644
--- a/apps/web/src/features/ai-chat/AiChatPage.tsx
+++ b/apps/web/src/features/ai-chat/AiChatPage.tsx
@@ -1,6 +1,7 @@
'use client';
import Link from 'next/link';
+import { useTranslations } from 'next-intl';
import { useShell } from '@/context/shellContext';
import { usePermissions } from '@/hooks/usePermissions';
import { aiAgentsPath } from '@/utils/paths';
@@ -15,6 +16,7 @@ import { useAiChatSelection } from './hooks/useAiChatSelection';
// The AI Chat page (/project/:projectKey/ai-team/chat): a full-page chat with the
// project's internal agents.
export default function AiChatPage() {
+ const t = useTranslations('aiChat');
const { project } = useShell();
const { can } = usePermissions();
const {
@@ -36,7 +38,7 @@ export default function AiChatPage() {
if (!can('ai_agents', 'read')) {
return (
<div className="flex h-full items-center justify-center px-4 text-center text-sm text-muted-foreground">
- You do not have access to AI agents in this project.
+ {t('noAccess')}
</div>
);
}
@@ -46,13 +48,10 @@ export default function AiChatPage() {
if (agents.length === 0) {
return (
<div className="flex h-full">
- <EmptyState
- title="No agents to chat with"
- description="Only internal agents can chat here, in test mode."
- >
+ <EmptyState title={t('emptyTitle')} description={t('emptyDescription')}>
{can('ai_agents', 'edit') && (
<Button asChild size="sm">
- <Link href={aiAgentsPath(project.project.key)}>Create an agent</Link>
+ <Link href={aiAgentsPath(project.project.key)}>{t('createAgent')}</Link>
</Button>
)}
</EmptyState>
diff --git a/apps/web/src/features/ai-chat/components/floating/FloatingChat.tsx b/apps/web/src/features/ai-chat/components/floating/FloatingChat.tsx
index 99549b6b..d7c77f5d 100644
--- a/apps/web/src/features/ai-chat/components/floating/FloatingChat.tsx
+++ b/apps/web/src/features/ai-chat/components/floating/FloatingChat.tsx
@@ -2,6 +2,7 @@
import { useState } from 'react';
import { MessagesSquare, X } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { useShell } from '@/context/shellContext';
import { usePermissions } from '@/hooks/usePermissions';
import { cn } from '@/lib/utils';
@@ -24,6 +25,7 @@ export function FloatingChat({
open: boolean;
onOpenChange: (open: boolean) => void;
}) {
+ const t = useTranslations('aiChat');
const { project } = useShell();
const { can } = usePermissions();
const {
@@ -91,7 +93,7 @@ export function FloatingChat({
/>
) : (
<div className="flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground">
- No internal agents to chat with yet.
+ {t('noInternalAgents')}
</div>
)}
@@ -115,12 +117,12 @@ export function FloatingChat({
<Button
size="icon"
className="size-12 shrink-0 rounded-full shadow-lg"
- title={open ? 'Hide chat' : 'Open chat'}
+ title={open ? t('hideChat') : t('openChat')}
aria-expanded={open}
onClick={() => onOpenChange(!open)}
>
{open ? <X className="size-5" /> : <MessagesSquare className="size-5" />}
- <span className="sr-only">{open ? 'Hide chat' : 'Open chat'}</span>
+ <span className="sr-only">{open ? t('hideChat') : t('openChat')}</span>
</Button>
</div>
);
diff --git a/apps/web/src/features/ai-chat/components/floating/FloatingChatHeader.tsx b/apps/web/src/features/ai-chat/components/floating/FloatingChatHeader.tsx
index 8fb30484..2fda8f5b 100644
--- a/apps/web/src/features/ai-chat/components/floating/FloatingChatHeader.tsx
+++ b/apps/web/src/features/ai-chat/components/floating/FloatingChatHeader.tsx
@@ -1,6 +1,7 @@
'use client';
import { Bot, Check, ChevronDown, History, MessageSquarePlus } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { AiAgent } from '@/lib/api';
import { Button } from '@/components/ui/button';
import {
@@ -33,6 +34,8 @@ export function FloatingChatHeader({
onNewChat: () => void;
onMinimize: () => void;
}) {
+ const t = useTranslations('aiChat');
+
return (
<div className="flex items-center gap-1 border-b px-2.5 py-2">
<DropdownMenu>
@@ -46,17 +49,17 @@ export function FloatingChatHeader({
</div>
<div className="min-w-0 flex-1">
<div className="truncate text-sm leading-tight font-medium">
- {selected?.name ?? 'No agents'}
+ {selected?.name ?? t('noAgents')}
</div>
<div className="truncate text-xs leading-tight text-muted-foreground">
- {selected ? `@${selected.username}` : 'Add an internal agent'}
+ {selected ? `@${selected.username}` : t('addInternalAgent')}
</div>
</div>
{selected && <ChevronDown className="size-4 shrink-0 text-muted-foreground" />}
</button>
</DropdownMenuTrigger>
<DropdownMenuContent align="start" className="w-64">
- <DropdownMenuLabel>Agents</DropdownMenuLabel>
+ <DropdownMenuLabel>{t('agents')}</DropdownMenuLabel>
<DropdownMenuSeparator />
{agents.map((agent) => (
<DropdownMenuItem
@@ -68,7 +71,7 @@ export function FloatingChatHeader({
<div className="min-w-0 flex-1">
<div className="truncate text-sm">{agent.name}</div>
<div className="truncate text-xs text-muted-foreground">
- {agentModelLabel(agent, providerLabel)}
+ {agentModelLabel(agent, providerLabel, t('noModel'))}
</div>
</div>
{agent.id === selected?.id && <Check className="size-4 shrink-0" />}
@@ -81,33 +84,33 @@ export function FloatingChatHeader({
variant="ghost"
size="icon"
className="size-7 shrink-0 text-muted-foreground hover:text-foreground"
- title="History"
+ title={t('history')}
disabled={!selected}
onClick={onShowHistory}
>
<History />
- <span className="sr-only">History</span>
+ <span className="sr-only">{t('history')}</span>
</Button>
<Button
variant="ghost"
size="icon"
className="size-7 shrink-0 text-muted-foreground hover:text-foreground"
- title="New chat"
+ title={t('newChat')}
disabled={!selected}
onClick={onNewChat}
>
<MessageSquarePlus />
- <span className="sr-only">New chat</span>
+ <span className="sr-only">{t('newChat')}</span>
</Button>
<Button
variant="ghost"
size="icon"
className="size-7 shrink-0 text-muted-foreground hover:text-foreground"
- title="Minimize"
+ title={t('minimize')}
onClick={onMinimize}
>
<ChevronDown />
- <span className="sr-only">Minimize chat</span>
+ <span className="sr-only">{t('minimizeChat')}</span>
</Button>
</div>
);
diff --git a/apps/web/src/features/ai-chat/components/floating/FloatingChatHistory.tsx b/apps/web/src/features/ai-chat/components/floating/FloatingChatHistory.tsx
index 7fe31a71..ef5e0479 100644
--- a/apps/web/src/features/ai-chat/components/floating/FloatingChatHistory.tsx
+++ b/apps/web/src/features/ai-chat/components/floating/FloatingChatHistory.tsx
@@ -1,6 +1,7 @@
'use client';
import { ChevronLeft } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { Button } from '@/components/ui/button';
import { AiChatThreadList } from '../shared/AiChatThreadList';
@@ -20,6 +21,9 @@ export function FloatingChatHistory({
onDeleted: (threadId: string) => void;
onBack: () => void;
}) {
+ const t = useTranslations('aiChat');
+ const tCommon = useTranslations('common');
+
return (
<div className="flex h-full min-h-0 flex-col">
<div className="flex items-center gap-2 border-b px-2.5 py-2">
@@ -27,13 +31,13 @@ export function FloatingChatHistory({
variant="ghost"
size="icon"
className="size-7 shrink-0"
- title="Back"
+ title={tCommon('back')}
onClick={onBack}
>
<ChevronLeft />
- <span className="sr-only">Back to chat</span>
+ <span className="sr-only">{t('backToChat')}</span>
</Button>
- <div className="text-sm font-medium">History</div>
+ <div className="text-sm font-medium">{t('history')}</div>
</div>
<AiChatThreadList
diff --git a/apps/web/src/features/ai-chat/components/page/AiChatAgentRail.tsx b/apps/web/src/features/ai-chat/components/page/AiChatAgentRail.tsx
index a1b55281..e60493cb 100644
--- a/apps/web/src/features/ai-chat/components/page/AiChatAgentRail.tsx
+++ b/apps/web/src/features/ai-chat/components/page/AiChatAgentRail.tsx
@@ -1,6 +1,7 @@
'use client';
import { Bot, Sparkles } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { AiAgent } from '@/lib/api';
import { cn } from '@/lib/utils';
import { agentModelLabel } from '../../utils/agentModelLabel';
@@ -17,12 +18,14 @@ export function AiChatAgentRail({
onSelect: (id: number) => void;
providerLabel: (key: string) => string;
}) {
+ const t = useTranslations('aiChat');
+
return (
<div className="flex w-72 shrink-0 flex-col border-r bg-muted/30">
<div className="border-b px-4 py-3">
- <div className="text-sm font-semibold">Agents</div>
+ <div className="text-sm font-semibold">{t('agents')}</div>
<div className="text-xs text-muted-foreground">
- {agents.length} {agents.length === 1 ? 'agent' : 'agents'} available
+ {t('agentsAvailable', { count: agents.length })}
</div>
</div>
<div className="min-h-0 flex-1 space-y-0.5 overflow-y-auto p-2">
@@ -54,7 +57,9 @@ export function AiChatAgentRail({
<div className="truncate text-xs text-muted-foreground">@{agent.username}</div>
<div className="mt-1 flex items-center gap-1 text-xs text-muted-foreground/80">
<Sparkles className="size-3 shrink-0" />
- <span className="truncate">{agentModelLabel(agent, providerLabel)}</span>
+ <span className="truncate">
+ {agentModelLabel(agent, providerLabel, t('noModel'))}
+ </span>
</div>
</div>
</button>
diff --git a/apps/web/src/features/ai-chat/components/page/AiChatConversation.tsx b/apps/web/src/features/ai-chat/components/page/AiChatConversation.tsx
index a54176dd..a95e857a 100644
--- a/apps/web/src/features/ai-chat/components/page/AiChatConversation.tsx
+++ b/apps/web/src/features/ai-chat/components/page/AiChatConversation.tsx
@@ -1,6 +1,7 @@
'use client';
import { Bot } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { AiAgent } from '@/lib/api';
import { Badge } from '@/components/ui/badge';
import { AiChatThread } from '../shared/AiChatThread';
@@ -21,6 +22,8 @@ export function AiChatConversation({
threadId: string | null;
onThreadCreated: (threadId: string) => void;
}) {
+ const t = useTranslations('aiChat');
+
return (
<div className="flex h-full min-h-0 flex-col">
<div className="flex items-center gap-3 border-b px-5 py-3">
@@ -32,12 +35,12 @@ export function AiChatConversation({
<span className="truncate text-sm font-medium">{agent.name}</span>
{!agent.memoryEnabled && (
<Badge variant="secondary" className="shrink-0">
- Memory off
+ {t('memoryOff')}
</Badge>
)}
</div>
<div className="truncate text-xs text-muted-foreground">
- @{agent.username} · {agentModelLabel(agent, providerLabel)}
+ @{agent.username} · {agentModelLabel(agent, providerLabel, t('noModel'))}
</div>
</div>
</div>
diff --git a/apps/web/src/features/ai-chat/components/page/AiChatThreadRail.tsx b/apps/web/src/features/ai-chat/components/page/AiChatThreadRail.tsx
index b974d741..a25972fd 100644
--- a/apps/web/src/features/ai-chat/components/page/AiChatThreadRail.tsx
+++ b/apps/web/src/features/ai-chat/components/page/AiChatThreadRail.tsx
@@ -1,6 +1,7 @@
'use client';
import { MessageSquarePlus } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { Button } from '@/components/ui/button';
import { AiChatThreadList } from '../shared/AiChatThreadList';
@@ -21,10 +22,12 @@ export function AiChatThreadRail({
onDeleted: (threadId: string) => void;
onNewChat: () => void;
}) {
+ const t = useTranslations('aiChat');
+
return (
<div className="flex w-64 shrink-0 flex-col border-r bg-muted/20">
<div className="flex items-center justify-between gap-2 border-b px-3 py-3">
- <div className="text-sm font-semibold">Chats</div>
+ <div className="text-sm font-semibold">{t('chats')}</div>
<Button
size="sm"
variant="outline"
@@ -32,7 +35,7 @@ export function AiChatThreadRail({
onClick={onNewChat}
>
<MessageSquarePlus className="size-3.5" />
- New chat
+ {t('newChat')}
</Button>
</div>
diff --git a/apps/web/src/features/ai-chat/components/shared/AiChatThreadItem.tsx b/apps/web/src/features/ai-chat/components/shared/AiChatThreadItem.tsx
index c5c03bb3..9edb4564 100644
--- a/apps/web/src/features/ai-chat/components/shared/AiChatThreadItem.tsx
+++ b/apps/web/src/features/ai-chat/components/shared/AiChatThreadItem.tsx
@@ -1,6 +1,7 @@
'use client';
import { MessageCircle, Trash2 } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { formatShortDate } from '@/utils/dates';
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
@@ -19,6 +20,8 @@ export function AiChatThreadItem({
onSelect: () => void;
onDelete: () => void;
}) {
+ const t = useTranslations('aiChat');
+
return (
<div className="group relative">
<button
@@ -37,7 +40,7 @@ export function AiChatThreadItem({
)}
/>
<div className="min-w-0 flex-1">
- <div className="truncate text-sm">{thread.title ?? 'New conversation'}</div>
+ <div className="truncate text-sm">{thread.title ?? t('untitledThread')}</div>
<div className="text-xs text-muted-foreground">{formatShortDate(thread.updatedAt)}</div>
</div>
</button>
@@ -45,12 +48,12 @@ export function AiChatThreadItem({
<Button
variant="ghost"
size="icon"
- title="Delete conversation"
+ title={t('deleteThread')}
onClick={onDelete}
className="absolute top-1/2 right-1 size-7 -translate-y-1/2 text-muted-foreground opacity-0 group-hover:opacity-100 focus-visible:opacity-100"
>
<Trash2 className="size-3.5" />
- <span className="sr-only">Delete conversation</span>
+ <span className="sr-only">{t('deleteThread')}</span>
</Button>
</div>
);
diff --git a/apps/web/src/features/ai-chat/components/shared/AiChatThreadList.tsx b/apps/web/src/features/ai-chat/components/shared/AiChatThreadList.tsx
index 01f4e3ee..ea7ac4c8 100644
--- a/apps/web/src/features/ai-chat/components/shared/AiChatThreadList.tsx
+++ b/apps/web/src/features/ai-chat/components/shared/AiChatThreadList.tsx
@@ -1,6 +1,7 @@
'use client';
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import { useAgentThreadsQuery, useDeleteAgentThread } from '@/services/aiAgents.service';
import { Skeleton } from '@/components/ui/skeleton';
import ConfirmDialog from '@/components/common/overlay/ConfirmDialog';
@@ -26,6 +27,8 @@ export function AiChatThreadList({
onSelect: (threadId: string) => void;
onDeleted: (threadId: string) => void;
}) {
+ const t = useTranslations('aiChat');
+ const tCommon = useTranslations('common');
const threadsQuery = useAgentThreadsQuery(projectKey, agentId);
const threads = threadsQuery.data ?? [];
const deleteThread = useDeleteAgentThread(projectKey, agentId);
@@ -57,7 +60,7 @@ export function AiChatThreadList({
if (threads.length === 0) {
return (
<div className="min-h-0 flex-1 px-4 py-6 text-center text-xs text-muted-foreground">
- No conversations yet. Send a message to start one.
+ {t('noThreads')}
</div>
);
}
@@ -78,13 +81,13 @@ export function AiChatThreadList({
{pending && (
<ConfirmDialog
- title="Delete conversation"
- confirmLabel="Delete"
+ title={t('deleteThread')}
+ confirmLabel={tCommon('delete')}
onConfirm={confirmDelete}
onClose={() => setPending(null)}
>
<div className="text-sm text-muted-foreground">
- “{pending.title ?? 'New conversation'}” and its messages are deleted permanently.
+ {t('deleteThreadConfirm', { title: pending.title ?? t('untitledThread') })}
</div>
</ConfirmDialog>
)}
diff --git a/apps/web/src/features/ai-chat/utils/agentModelLabel.ts b/apps/web/src/features/ai-chat/utils/agentModelLabel.ts
index f424fabd..d1f86c18 100644
--- a/apps/web/src/features/ai-chat/utils/agentModelLabel.ts
+++ b/apps/web/src/features/ai-chat/utils/agentModelLabel.ts
@@ -2,8 +2,13 @@ import type { AiAgent } from '@/lib/api';
// The agent's model as shown in the chat UI: the model key plus its provider's
// catalog label. `providerLabel` maps a provider key to that label.
-export function agentModelLabel(agent: AiAgent, providerLabel: (key: string) => string) {
- if (!agent.model) return 'No model set';
+export function agentModelLabel(
+ agent: AiAgent,
+ providerLabel: (key: string) => string,
+ // What an agent with no model chosen reads as.
+ noModel: string,
+) {
+ if (!agent.model) return noModel;
return agent.modelProvider
? `${agent.model} · ${providerLabel(agent.modelProvider)}`
: agent.model;
diff --git a/apps/web/src/features/api-keys/ApiKeysPage.tsx b/apps/web/src/features/api-keys/ApiKeysPage.tsx
index 58fc1972..dfdae358 100644
--- a/apps/web/src/features/api-keys/ApiKeysPage.tsx
+++ b/apps/web/src/features/api-keys/ApiKeysPage.tsx
@@ -2,6 +2,7 @@
import { useState } from 'react';
import { useQueryClient } from '@tanstack/react-query';
+import { useTranslations } from 'next-intl';
import { useSession } from '@/lib/auth-client';
import { qk } from '@/services/queryKeys';
import FullPageView from '@/components/common/page/FullPageView';
@@ -14,6 +15,7 @@ import ApiKeysDeleteDialog from './components/ApiKeysDeleteDialog';
// delete target; the child components refresh the list through the callbacks
// after a change.
export default function ApiKeysPage() {
+ const t = useTranslations('apiKeys');
const { data: session } = useSession();
const queryClient = useQueryClient();
const [deleting, setDeleting] = useState<ApiKeyRow | null>(null);
@@ -23,9 +25,9 @@ export default function ApiKeysPage() {
return (
<FullPageView
- label="API keys"
- title="API keys"
- description={`Personal API keys authenticate requests to the API as your account (${session?.user.email}). A key's value is shown only once, when you create it.`}
+ label={t('label')}
+ title={t('title')}
+ description={t('description', { email: session?.user.email ?? '' })}
>
<ApiKeysCreateSection onCreated={invalidate} />
<ApiKeysList apiKeys={apiKeys ?? []} isPending={isPending} onDelete={setDeleting} />
diff --git a/apps/web/src/features/api-keys/components/ApiKeysCreateDialog.tsx b/apps/web/src/features/api-keys/components/ApiKeysCreateDialog.tsx
index e764c746..ae7237fd 100644
--- a/apps/web/src/features/api-keys/components/ApiKeysCreateDialog.tsx
+++ b/apps/web/src/features/api-keys/components/ApiKeysCreateDialog.tsx
@@ -3,6 +3,7 @@
import { useState } from 'react';
import { useMutation } from '@tanstack/react-query';
import { Check, Copy } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { apiKey } from '@/lib/auth-client';
import Modal from '@/components/common/overlay/Modal';
import { Button } from '@/components/ui/button';
@@ -17,6 +18,8 @@ export default function ApiKeysCreateDialog({
onCreated: () => void;
onClose: () => void;
}) {
+ const t = useTranslations('apiKeys');
+ const tCommon = useTranslations('common');
const [name, setName] = useState('');
const [createdKey, setCreatedKey] = useState<string | null>(null);
const [copied, setCopied] = useState(false);
@@ -26,7 +29,7 @@ export default function ApiKeysCreateDialog({
meta: { suppressErrorToast: true },
mutationFn: async () => {
const { data, error } = await apiKey.create({ name: name.trim() });
- if (error) throw new Error(error.message ?? 'Could not create API key.');
+ if (error) throw new Error(error.message ?? t('createDialog.error'));
return data;
},
onSuccess: (data) => {
@@ -48,11 +51,9 @@ export default function ApiKeysCreateDialog({
if (createdKey !== null) {
return (
- <Modal title="API key created" onClose={onClose}>
+ <Modal title={t('createdDialog.title')} onClose={onClose}>
<div className="space-y-4">
- <p className="text-sm text-muted-foreground">
- Copy your key now. For security, it is shown only once and cannot be retrieved later.
- </p>
+ <p className="text-sm text-muted-foreground">{t('createdDialog.description')}</p>
<div className="flex items-center gap-2">
<Input
readOnly
@@ -64,14 +65,14 @@ export default function ApiKeysCreateDialog({
variant="outline"
size="icon"
className="shrink-0"
- title="Copy key"
+ title={t('createdDialog.copy')}
onClick={copy}
>
{copied ? <Check className="size-4" /> : <Copy className="size-4" />}
</Button>
</div>
<div className="flex justify-end">
- <Button onClick={onClose}>Done</Button>
+ <Button onClick={onClose}>{tCommon('done')}</Button>
</div>
</div>
</Modal>
@@ -81,7 +82,7 @@ export default function ApiKeysCreateDialog({
const trimmed = name.trim();
return (
- <Modal title="Create API key" onClose={onClose}>
+ <Modal title={t('createDialog.title')} onClose={onClose}>
<form
className="space-y-4"
onSubmit={(e) => {
@@ -91,16 +92,16 @@ export default function ApiKeysCreateDialog({
>
<div className="space-y-1.5">
<label htmlFor="api-key-name" className="text-sm font-medium">
- Name
+ {t('createDialog.nameLabel')}
</label>
<Input
id="api-key-name"
autoFocus
- placeholder="e.g. CI pipeline"
+ placeholder={t('createDialog.namePlaceholder')}
value={name}
onChange={(e) => setName(e.target.value)}
/>
- <p className="text-xs text-muted-foreground">A label to recognize this key later.</p>
+ <p className="text-xs text-muted-foreground">{t('createDialog.nameHint')}</p>
</div>
{createMutation.error && (
@@ -114,10 +115,10 @@ export default function ApiKeysCreateDialog({
onClick={onClose}
disabled={createMutation.isPending}
>
- Cancel
+ {tCommon('cancel')}
</Button>
<Button type="submit" disabled={!trimmed || createMutation.isPending}>
- {createMutation.isPending ? 'Creating…' : 'Create key'}
+ {createMutation.isPending ? t('createDialog.submitPending') : t('createDialog.submit')}
</Button>
</div>
</form>
diff --git a/apps/web/src/features/api-keys/components/ApiKeysCreateSection.tsx b/apps/web/src/features/api-keys/components/ApiKeysCreateSection.tsx
index 6f567448..d851f50a 100644
--- a/apps/web/src/features/api-keys/components/ApiKeysCreateSection.tsx
+++ b/apps/web/src/features/api-keys/components/ApiKeysCreateSection.tsx
@@ -2,16 +2,18 @@
import { useState } from 'react';
import { Plus } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { Button } from '@/components/ui/button';
import ApiKeysCreateDialog from './ApiKeysCreateDialog';
export default function ApiKeysCreateSection({ onCreated }: { onCreated: () => void }) {
+ const t = useTranslations('apiKeys');
const [open, setOpen] = useState(false);
return (
<>
<div className="mb-1 flex items-center justify-between border-b pb-1">
- <span className="text-xs font-medium text-muted-foreground">Your API keys</span>
+ <span className="text-xs font-medium text-muted-foreground">{t('sectionTitle')}</span>
<Button
variant="ghost"
size="sm"
@@ -19,7 +21,7 @@ export default function ApiKeysCreateSection({ onCreated }: { onCreated: () => v
onClick={() => setOpen(true)}
>
<Plus className="size-3.5" />
- Create API key
+ {t('create')}
</Button>
</div>
diff --git a/apps/web/src/features/api-keys/components/ApiKeysDeleteDialog.tsx b/apps/web/src/features/api-keys/components/ApiKeysDeleteDialog.tsx
index 94cf73c2..48a55414 100644
--- a/apps/web/src/features/api-keys/components/ApiKeysDeleteDialog.tsx
+++ b/apps/web/src/features/api-keys/components/ApiKeysDeleteDialog.tsx
@@ -1,6 +1,7 @@
'use client';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import { apiKey } from '@/lib/auth-client';
import ConfirmDialog from '@/components/common/overlay/ConfirmDialog';
import type { ApiKeyRow } from '../services/apiKeys.service';
@@ -14,10 +15,12 @@ export default function ApiKeysDeleteDialog({
onClose: () => void;
onDeleted: () => void | Promise<void>;
}) {
+ const t = useTranslations('apiKeys');
+
return (
<ConfirmDialog
- title="Delete API key?"
- confirmLabel="Delete key"
+ title={t('deleteDialog.title')}
+ confirmLabel={t('deleteDialog.confirm')}
onClose={onClose}
onConfirm={async () => {
// API key delete is a better-auth call, not a React Query mutation, so the
@@ -25,7 +28,7 @@ export default function ApiKeysDeleteDialog({
// to keep the dialog open.
const { error } = await apiKey.delete({ keyId: target.id });
if (error) {
- const message = error.message ?? 'Could not delete API key.';
+ const message = error.message ?? t('deleteDialog.error');
toast.error(message);
throw new Error(message);
}
@@ -33,12 +36,10 @@ export default function ApiKeysDeleteDialog({
}}
>
<p className="text-sm">
- <span className="font-medium text-foreground">{target.name ?? 'API key'}</span>
+ <span className="font-medium text-foreground">{target.name ?? t('fallbackName')}</span>
{target.start && <span className="text-muted-foreground"> · {target.start}…</span>}
</p>
- <p className="mt-1 text-sm text-muted-foreground">
- Any request using this key will stop working immediately. This cannot be undone.
- </p>
+ <p className="mt-1 text-sm text-muted-foreground">{t('deleteDialog.description')}</p>
</ConfirmDialog>
);
}
diff --git a/apps/web/src/features/api-keys/components/ApiKeysItem.tsx b/apps/web/src/features/api-keys/components/ApiKeysItem.tsx
index e7d7e69d..a3a006d0 100644
--- a/apps/web/src/features/api-keys/components/ApiKeysItem.tsx
+++ b/apps/web/src/features/api-keys/components/ApiKeysItem.tsx
@@ -1,6 +1,7 @@
'use client';
import { KeyRound, Trash2 } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { formatShortDate } from '@/utils/dates';
import { Button } from '@/components/ui/button';
import {
@@ -20,6 +21,8 @@ export default function ApiKeysItem({
apiKey: ApiKeyRow;
onDelete: () => void;
}) {
+ const t = useTranslations('apiKeys');
+
return (
<Item
size="sm"
@@ -29,9 +32,10 @@ export default function ApiKeysItem({
<KeyRound className="size-4" />
</ItemMedia>
<ItemContent>
- <ItemTitle>{apiKey.name ?? 'API key'}</ItemTitle>
+ <ItemTitle>{apiKey.name ?? t('fallbackName')}</ItemTitle>
<ItemDescription>
- {apiKey.start ? `${apiKey.start}… · ` : ''}Created {formatShortDate(apiKey.createdAt)}
+ {apiKey.start ? `${apiKey.start}… · ` : ''}
+ {t('createdAt', { date: formatShortDate(apiKey.createdAt) })}
</ItemDescription>
</ItemContent>
<ItemActions>
@@ -39,7 +43,7 @@ export default function ApiKeysItem({
variant="ghost"
size="icon"
className="size-7 text-muted-foreground hover:text-destructive"
- title="Delete API key"
+ title={t('deleteAction')}
onClick={onDelete}
>
<Trash2 className="size-4" />
diff --git a/apps/web/src/features/api-keys/components/ApiKeysList.tsx b/apps/web/src/features/api-keys/components/ApiKeysList.tsx
index afb045bc..215d6630 100644
--- a/apps/web/src/features/api-keys/components/ApiKeysList.tsx
+++ b/apps/web/src/features/api-keys/components/ApiKeysList.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import { ItemGroup } from '@/components/ui/item';
import { Skeleton } from '@/components/ui/skeleton';
import ApiKeysItem from './ApiKeysItem';
@@ -14,6 +15,8 @@ export default function ApiKeysList({
isPending: boolean;
onDelete: (apiKey: ApiKeyRow) => void;
}) {
+ const t = useTranslations('apiKeys');
+
if (isPending) {
return (
<div className="space-y-2 py-3">
@@ -24,11 +27,7 @@ export default function ApiKeysList({
}
if (apiKeys.length === 0) {
- return (
- <p className="py-6 text-sm text-muted-foreground">
- No API keys yet. Create one to authenticate requests to the API.
- </p>
- );
+ return <p className="py-6 text-sm text-muted-foreground">{t('empty')}</p>;
}
return (
diff --git a/apps/web/src/features/api-keys/services/apiKeys.service.ts b/apps/web/src/features/api-keys/services/apiKeys.service.ts
index 43d99129..97ac5262 100644
--- a/apps/web/src/features/api-keys/services/apiKeys.service.ts
+++ b/apps/web/src/features/api-keys/services/apiKeys.service.ts
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import { useQuery } from '@tanstack/react-query';
import { authClient } from '@/lib/auth-client';
import { qk } from '@/services/queryKeys';
@@ -15,9 +16,9 @@ export type ApiKeyRow = {
// Goes through the auth client, not plain fetch, so better-auth's baseURL and the
// session cookie are reused. The endpoint returns a paginated
// `{ apiKeys, total, ... }` shape.
-async function fetchApiKeys(): Promise<ApiKeyRow[]> {
+async function fetchApiKeys(loadFailed: string): Promise<ApiKeyRow[]> {
const { data, error } = await authClient.apiKey.list();
- if (error) throw new Error(error.message ?? 'Could not load API keys.');
+ if (error) throw new Error(error.message ?? loadFailed);
return (data?.apiKeys ?? []).map((key) => ({
id: key.id,
name: key.name,
@@ -27,5 +28,6 @@ async function fetchApiKeys(): Promise<ApiKeyRow[]> {
}
export function useApiKeysQuery() {
- return useQuery({ queryKey: qk.apiKeys, queryFn: fetchApiKeys });
+ const t = useTranslations('apiKeys');
+ return useQuery({ queryKey: qk.apiKeys, queryFn: () => fetchApiKeys(t('loadFailed')) });
}
diff --git a/apps/web/src/features/auth/components/AuthLegalNotice.tsx b/apps/web/src/features/auth/components/AuthLegalNotice.tsx
index 7227777a..f8557e28 100644
--- a/apps/web/src/features/auth/components/AuthLegalNotice.tsx
+++ b/apps/web/src/features/auth/components/AuthLegalNotice.tsx
@@ -1,3 +1,6 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
import { PRIVACY_POLICY_URL, TERMS_URL } from '@/utils/app';
const linkClass = 'underline underline-offset-4 hover:text-foreground';
@@ -7,24 +10,31 @@ const linkClass = 'underline underline-offset-4 hover:text-foreground';
// starts, so this stays visible next to the "Continue with Google" button. An
// instance that does not configure the URLs (apps/web/.env) renders nothing.
export default function AuthLegalNotice() {
- const terms = TERMS_URL ? (
- <a href={TERMS_URL} target="_blank" rel="noopener noreferrer" className={linkClass}>
- Terms of Service
- </a>
- ) : null;
- const privacy = PRIVACY_POLICY_URL ? (
- <a href={PRIVACY_POLICY_URL} target="_blank" rel="noopener noreferrer" className={linkClass}>
- Privacy Policy
- </a>
- ) : null;
+ const t = useTranslations('auth.legal');
+
+ if (!TERMS_URL && !PRIVACY_POLICY_URL) return null;
- if (!terms && !privacy) return null;
+ const key = TERMS_URL && PRIVACY_POLICY_URL ? 'both' : TERMS_URL ? 'termsOnly' : 'privacyOnly';
return (
<p className="text-center text-xs text-muted-foreground">
- By continuing you agree to our {terms}
- {terms && privacy ? ' and ' : null}
- {privacy}.
+ {t.rich(key, {
+ terms: (chunks) => (
+ <a href={TERMS_URL} target="_blank" rel="noopener noreferrer" className={linkClass}>
+ {chunks}
+ </a>
+ ),
+ privacy: (chunks) => (
+ <a
+ href={PRIVACY_POLICY_URL}
+ target="_blank"
+ rel="noopener noreferrer"
+ className={linkClass}
+ >
+ {chunks}
+ </a>
+ ),
+ })}
</p>
);
}
diff --git a/apps/web/src/features/auth/components/forgot-password/AuthForgotPasswordForm.tsx b/apps/web/src/features/auth/components/forgot-password/AuthForgotPasswordForm.tsx
index 6ab1a78d..e36925d6 100644
--- a/apps/web/src/features/auth/components/forgot-password/AuthForgotPasswordForm.tsx
+++ b/apps/web/src/features/auth/components/forgot-password/AuthForgotPasswordForm.tsx
@@ -2,6 +2,7 @@
import { useState, type FormEvent } from 'react';
import Link from 'next/link';
+import { useTranslations } from 'next-intl';
import { Button } from '@/components/ui/button';
import { Field, FieldDescription, FieldError, FieldGroup, FieldLabel } from '@/components/ui/field';
import { Input } from '@/components/ui/input';
@@ -13,6 +14,7 @@ import { useAuthAction } from '../../hooks/useAuthAction';
// Asks for the address and mails a reset link. The answer is the same whether or not
// an account exists, so this screen never tells the visitor which it was.
export default function AuthForgotPasswordForm() {
+ const t = useTranslations('auth');
const [email, setEmail] = useState('');
const [sent, setSent] = useState(false);
const { error, pending, run } = useAuthAction();
@@ -31,11 +33,11 @@ export default function AuthForgotPasswordForm() {
if (sent) {
return (
<AuthMessagePanel
- title="Check your email"
- description={`If an account exists for ${email}, a reset link is on its way.`}
+ title={t('forgotPassword.sentTitle')}
+ description={t('forgotPassword.sentDescription', { email })}
footer={
<Link href="/login" className="underline underline-offset-4">
- Back to sign in
+ {t('forgotPassword.backToSignIn')}
</Link>
}
/>
@@ -46,16 +48,16 @@ export default function AuthForgotPasswordForm() {
<form onSubmit={onSubmit} className="p-6 md:p-8">
<FieldGroup>
<AuthFormHeader
- title="Reset your password"
- description="We will email you a link to set a new one"
+ title={t('forgotPassword.title')}
+ description={t('forgotPassword.subtitle')}
/>
<Field>
- <FieldLabel htmlFor="email">Email</FieldLabel>
+ <FieldLabel htmlFor="email">{t('fields.email')}</FieldLabel>
<Input
id="email"
type="email"
- placeholder="[email protected]"
+ placeholder={t('fields.emailPlaceholder')}
autoComplete="email"
required
value={email}
@@ -68,14 +70,14 @@ export default function AuthForgotPasswordForm() {
<Field>
<Button type="submit" disabled={pending}>
- {pending ? 'Sending…' : 'Send reset link'}
+ {pending ? t('forgotPassword.submitPending') : t('forgotPassword.submit')}
</Button>
</Field>
<FieldDescription className="text-center">
- Remembered it?{' '}
+ {t('forgotPassword.remembered')}{' '}
<Link href="/login" className="underline underline-offset-4">
- Sign in
+ {t('forgotPassword.signIn')}
</Link>
</FieldDescription>
</FieldGroup>
diff --git a/apps/web/src/features/auth/components/login/AuthLoginAlternatives.tsx b/apps/web/src/features/auth/components/login/AuthLoginAlternatives.tsx
index 87971810..e6e59476 100644
--- a/apps/web/src/features/auth/components/login/AuthLoginAlternatives.tsx
+++ b/apps/web/src/features/auth/components/login/AuthLoginAlternatives.tsx
@@ -1,6 +1,7 @@
'use client';
import { KeyRound, Lock, Mail } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { Button } from '@/components/ui/button';
import { Field } from '@/components/ui/field';
import GoogleIcon from '@/components/common/GoogleIcon';
@@ -21,6 +22,7 @@ export default function AuthLoginAlternatives({
onGoogle: () => void;
onPasskey: () => void;
}) {
+ const t = useTranslations('auth.login');
const authConfig = useAuthConfig();
// One Field for all of them so they sit together as a group — a Field each would
@@ -31,18 +33,18 @@ export default function AuthLoginAlternatives({
{authConfig?.magicLink && (
<Button type="button" variant="outline" disabled={pending} onClick={onToggleMethod}>
{signingInWithLink ? <Lock /> : <Mail />}
- {signingInWithLink ? 'Sign in with a password' : 'Email me a sign-in link'}
+ {signingInWithLink ? t('withPassword') : t('withLink')}
</Button>
)}
{authConfig?.google && (
<Button type="button" variant="outline" onClick={onGoogle} disabled={pending}>
<GoogleIcon className="size-4" />
- Continue with Google
+ {t('withGoogle')}
</Button>
)}
<Button type="button" variant="outline" onClick={onPasskey} disabled={pending}>
<KeyRound />
- Sign in with passkey
+ {t('withPasskey')}
</Button>
</Field>
);
diff --git a/apps/web/src/features/auth/components/login/AuthLoginForm.tsx b/apps/web/src/features/auth/components/login/AuthLoginForm.tsx
index 9d08d6b4..a318bb10 100644
--- a/apps/web/src/features/auth/components/login/AuthLoginForm.tsx
+++ b/apps/web/src/features/auth/components/login/AuthLoginForm.tsx
@@ -3,6 +3,7 @@
import { useState, type FormEvent } from 'react';
import Link from 'next/link';
import { useSearchParams } from 'next/navigation';
+import { useTranslations } from 'next-intl';
import { Button } from '@/components/ui/button';
import {
Field,
@@ -27,7 +28,7 @@ import {
} from '../../services/auth.service';
import { useAuthAction } from '../../hooks/useAuthAction';
import { useAuthConfig } from '@/services/authConfig.service';
-import { redirectErrorMessage } from '../../utils/redirectErrors';
+import { useRedirectError } from '../../hooks/useRedirectError';
// How the visitor is signing in. The screen holds one method at a time: with a
// password, or with a link mailed to the address. Passkeys stay available in both,
@@ -35,6 +36,7 @@ import { redirectErrorMessage } from '../../utils/redirectErrors';
type Method = 'password' | 'link';
export default function AuthLoginForm() {
+ const t = useTranslations('auth');
const [method, setMethod] = useState<Method>('password');
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
@@ -53,6 +55,7 @@ export default function AuthLoginForm() {
// A Google sign-in or a confirmation link that could not complete comes back here
// as a redirect rather than as a rejected promise, so its reason arrives in the
// query string.
+ const redirectErrorMessage = useRedirectError();
const redirectError = redirectErrorMessage(params.get('error'), params.get('error_description'));
// The confirmation link carries ?verified=1 and adds ?error=… when it failed, so
// the success line only stands while there is no error next to it.
@@ -91,8 +94,8 @@ export default function AuthLoginForm() {
if (linkSentTo) {
return (
<AuthMessagePanel
- title="Check your email"
- description={`We sent a sign-in link to ${linkSentTo}. Open it to sign in.`}
+ title={t('login.linkSentTitle')}
+ description={t('login.linkSentDescription', { email: linkSentTo })}
footer={
<button
type="button"
@@ -102,7 +105,7 @@ export default function AuthLoginForm() {
switchTo('password');
}}
>
- Back to sign in
+ {t('login.backToSignIn')}
</button>
}
/>
@@ -112,28 +115,28 @@ export default function AuthLoginForm() {
const signingInWithLink = method === 'link';
function subtitle() {
- if (justVerified) return 'Your email is confirmed. Sign in to continue.';
- if (justReset) return 'Your password is changed. Sign in with it.';
- if (signingInWithLink) return 'We will email you a link that signs you in';
- return 'Sign in with your email and password';
+ if (justVerified) return t('login.subtitleVerified');
+ if (justReset) return t('login.subtitleReset');
+ if (signingInWithLink) return t('login.subtitleLink');
+ return t('login.subtitlePassword');
}
function submitLabel() {
- if (signingInWithLink) return pending ? 'Sending…' : 'Send sign-in link';
- return pending ? 'Signing in…' : 'Sign in';
+ if (signingInWithLink) return pending ? t('login.sendLinkPending') : t('login.sendLink');
+ return pending ? t('login.submitPending') : t('login.submit');
}
return (
<form onSubmit={onSubmit} className="p-6 md:p-8">
<FieldGroup>
- <AuthFormHeader title="Welcome back" description={subtitle()} />
+ <AuthFormHeader title={t('login.title')} description={subtitle()} />
<Field>
- <FieldLabel htmlFor="email">Email</FieldLabel>
+ <FieldLabel htmlFor="email">{t('fields.email')}</FieldLabel>
<Input
id="email"
type="email"
- placeholder="[email protected]"
+ placeholder={t('fields.emailPlaceholder')}
autoComplete="email"
required
value={email}
@@ -145,13 +148,13 @@ export default function AuthLoginForm() {
{!signingInWithLink && (
<Field>
<div className="flex items-center justify-between">
- <FieldLabel htmlFor="password">Password</FieldLabel>
+ <FieldLabel htmlFor="password">{t('fields.password')}</FieldLabel>
{authConfig?.emailEnabled && (
<Link
href="/forgot-password"
className="text-sm text-muted-foreground underline-offset-4 hover:underline"
>
- Forgot password?
+ {t('login.forgotPassword')}
</Link>
)}
</div>
@@ -193,23 +196,23 @@ export default function AuthLoginForm() {
</Button>
</Field>
- <FieldSeparator>Or</FieldSeparator>
+ <FieldSeparator>{t('login.or')}</FieldSeparator>
<AuthLoginAlternatives
signingInWithLink={signingInWithLink}
pending={pending}
onToggleMethod={() => switchTo(signingInWithLink ? 'password' : 'link')}
onGoogle={() => run(signInWithGoogle, { redirect: false })}
- onPasskey={() => run(signInWithPasskey)}
+ onPasskey={() => run(signInWithPasskey, { fallback: t('errors.passkey') })}
/>
{/* Only when anyone can register. An invite-only instance hands out links
directly, and a closed one has nowhere to send the visitor. */}
{authConfig?.registration === 'open' && (
<FieldDescription className="text-center">
- Don&apos;t have an account?{' '}
+ {t('login.noAccount')}{' '}
<Link href="/register" className="underline underline-offset-4">
- Sign up
+ {t('login.signUp')}
</Link>
</FieldDescription>
)}
diff --git a/apps/web/src/features/auth/components/login/AuthUnconfirmedNotice.tsx b/apps/web/src/features/auth/components/login/AuthUnconfirmedNotice.tsx
index 3aa68100..67845c62 100644
--- a/apps/web/src/features/auth/components/login/AuthUnconfirmedNotice.tsx
+++ b/apps/web/src/features/auth/components/login/AuthUnconfirmedNotice.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import { FieldDescription } from '@/components/ui/field';
// Shown when a sign-in was refused because the address is still unconfirmed: point at
@@ -15,24 +16,24 @@ export default function AuthUnconfirmedNotice({
canResend: boolean;
onResend: () => void;
}) {
+ const t = useTranslations('auth.login');
+
return (
<FieldDescription className="text-center">
- {resent ? (
- 'Confirmation email sent. Check your inbox, and your spam folder.'
- ) : (
- <>
- Check your spam folder, or{' '}
- <button
- type="button"
- className="underline underline-offset-4"
- disabled={pending || !canResend}
- onClick={onResend}
- >
- send a new confirmation email
- </button>
- .
- </>
- )}
+ {resent
+ ? t('unconfirmedResent')
+ : t.rich('unconfirmedPrompt', {
+ resend: (chunks) => (
+ <button
+ type="button"
+ className="underline underline-offset-4"
+ disabled={pending || !canResend}
+ onClick={onResend}
+ >
+ {chunks}
+ </button>
+ ),
+ })}
</FieldDescription>
);
}
diff --git a/apps/web/src/features/auth/components/register/AuthRegisterForm.tsx b/apps/web/src/features/auth/components/register/AuthRegisterForm.tsx
index eb8bcb00..1dce48cd 100644
--- a/apps/web/src/features/auth/components/register/AuthRegisterForm.tsx
+++ b/apps/web/src/features/auth/components/register/AuthRegisterForm.tsx
@@ -2,6 +2,7 @@
import { useState, type FormEvent } from 'react';
import Link from 'next/link';
+import { useTranslations } from 'next-intl';
import { Button } from '@/components/ui/button';
import {
Field,
@@ -20,6 +21,7 @@ import { useAuthAction } from '../../hooks/useAuthAction';
import { useAuthConfig } from '@/services/authConfig.service';
export default function AuthRegisterForm() {
+ const t = useTranslations('auth');
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
const [confirm, setConfirm] = useState('');
@@ -32,7 +34,7 @@ export default function AuthRegisterForm() {
function onSubmit(event: FormEvent) {
event.preventDefault();
if (password !== confirm) {
- setError('Passwords do not match.');
+ setError(t('errors.passwordsDoNotMatch'));
return;
}
// With confirmation required, sign-up still opens a session (autoSignIn), so it
@@ -55,11 +57,11 @@ export default function AuthRegisterForm() {
if (awaitingConfirmation) {
return (
<AuthMessagePanel
- title="Confirm your email"
- description={`We sent a link to ${email}. Open it to finish creating your account.`}
+ title={t('register.confirmTitle')}
+ description={t('register.confirmDescription', { email })}
footer={
<Link href="/login" className="underline underline-offset-4">
- Back to sign in
+ {t('register.backToSignIn')}
</Link>
}
/>
@@ -71,13 +73,13 @@ export default function AuthRegisterForm() {
if (authConfig?.registration === 'closed') {
return (
<AuthMessagePanel
- title="Registration is closed"
- description="This instance is not accepting new accounts."
+ title={t('register.closedTitle')}
+ description={t('register.closedDescription')}
footer={
<>
- Already have an account?{' '}
+ {t('register.haveAccount')}{' '}
<Link href="/login" className="underline underline-offset-4">
- Sign in
+ {t('register.signIn')}
</Link>
</>
}
@@ -89,20 +91,16 @@ export default function AuthRegisterForm() {
<form onSubmit={onSubmit} className="p-6 md:p-8">
<FieldGroup>
<AuthFormHeader
- title="Create your account"
- description={
- inviteOnly
- ? 'This instance is invite only. Use the address you were invited with.'
- : 'Sign up with your email and password'
- }
+ title={t('register.title')}
+ description={inviteOnly ? t('register.subtitleInviteOnly') : t('register.subtitle')}
/>
<Field>
- <FieldLabel htmlFor="email">Email</FieldLabel>
+ <FieldLabel htmlFor="email">{t('fields.email')}</FieldLabel>
<Input
id="email"
type="email"
- placeholder="[email protected]"
+ placeholder={t('fields.emailPlaceholder')}
autoComplete="email"
required
value={email}
@@ -112,7 +110,7 @@ export default function AuthRegisterForm() {
</Field>
<Field>
- <FieldLabel htmlFor="password">Password</FieldLabel>
+ <FieldLabel htmlFor="password">{t('fields.password')}</FieldLabel>
<Input
id="password"
type="password"
@@ -123,11 +121,11 @@ export default function AuthRegisterForm() {
onChange={(e) => setPassword(e.target.value)}
disabled={pending}
/>
- <FieldDescription>Must be at least 8 characters long.</FieldDescription>
+ <FieldDescription>{t('fields.passwordHint')}</FieldDescription>
</Field>
<Field>
- <FieldLabel htmlFor="confirm-password">Confirm password</FieldLabel>
+ <FieldLabel htmlFor="confirm-password">{t('fields.confirmPassword')}</FieldLabel>
<Input
id="confirm-password"
type="password"
@@ -144,7 +142,7 @@ export default function AuthRegisterForm() {
<Field>
<Button type="submit" disabled={pending}>
- {pending ? 'Creating account…' : 'Create account'}
+ {pending ? t('register.submitPending') : t('register.submit')}
</Button>
</Field>
@@ -152,7 +150,7 @@ export default function AuthRegisterForm() {
to the same registration mode as the form above. */}
{authConfig?.google && (
<>
- <FieldSeparator>Or</FieldSeparator>
+ <FieldSeparator>{t('register.or')}</FieldSeparator>
<Field>
<Button
type="button"
@@ -161,16 +159,16 @@ export default function AuthRegisterForm() {
disabled={pending}
>
<GoogleIcon className="size-4" />
- Continue with Google
+ {t('register.withGoogle')}
</Button>
</Field>
</>
)}
<FieldDescription className="text-center">
- Already have an account?{' '}
+ {t('register.haveAccount')}{' '}
<Link href="/login" className="underline underline-offset-4">
- Sign in
+ {t('register.signIn')}
</Link>
</FieldDescription>
</FieldGroup>
diff --git a/apps/web/src/features/auth/components/reset-password/AuthResetPasswordForm.tsx b/apps/web/src/features/auth/components/reset-password/AuthResetPasswordForm.tsx
index 220b660c..89291d17 100644
--- a/apps/web/src/features/auth/components/reset-password/AuthResetPasswordForm.tsx
+++ b/apps/web/src/features/auth/components/reset-password/AuthResetPasswordForm.tsx
@@ -3,6 +3,7 @@
import { useState, type FormEvent } from 'react';
import Link from 'next/link';
import { useRouter, useSearchParams } from 'next/navigation';
+import { useTranslations } from 'next-intl';
import { Button } from '@/components/ui/button';
import { Field, FieldDescription, FieldError, FieldGroup, FieldLabel } from '@/components/ui/field';
import { Input } from '@/components/ui/input';
@@ -14,6 +15,7 @@ import { useAuthAction } from '../../hooks/useAuthAction';
// The screen the reset link opens. better-auth redirects here with ?token= when the
// token is valid, and with ?error= when it expired or was already used.
export default function AuthResetPasswordForm() {
+ const t = useTranslations('auth');
const params = useSearchParams();
const router = useRouter();
const token = params.get('token') ?? '';
@@ -27,7 +29,7 @@ export default function AuthResetPasswordForm() {
function onSubmit(event: FormEvent) {
event.preventDefault();
if (password !== confirm) {
- setError('Passwords do not match.');
+ setError(t('errors.passwordsDoNotMatch'));
return;
}
run(
@@ -43,11 +45,11 @@ export default function AuthResetPasswordForm() {
if (!token || linkError) {
return (
<AuthMessagePanel
- title="This link no longer works"
- description="Reset links expire and can be used once. Request a new one."
+ title={t('resetPassword.deadLinkTitle')}
+ description={t('resetPassword.deadLinkDescription')}
footer={
<Link href="/forgot-password" className="underline underline-offset-4">
- Send a new link
+ {t('resetPassword.sendNewLink')}
</Link>
}
/>
@@ -58,12 +60,12 @@ export default function AuthResetPasswordForm() {
<form onSubmit={onSubmit} className="p-6 md:p-8">
<FieldGroup>
<AuthFormHeader
- title="Set a new password"
- description="Choose a password you have not used here before"
+ title={t('resetPassword.title')}
+ description={t('resetPassword.subtitle')}
/>
<Field>
- <FieldLabel htmlFor="password">New password</FieldLabel>
+ <FieldLabel htmlFor="password">{t('fields.newPassword')}</FieldLabel>
<Input
id="password"
type="password"
@@ -74,11 +76,11 @@ export default function AuthResetPasswordForm() {
onChange={(e) => setPassword(e.target.value)}
disabled={pending}
/>
- <FieldDescription>Must be at least 8 characters long.</FieldDescription>
+ <FieldDescription>{t('fields.passwordHint')}</FieldDescription>
</Field>
<Field>
- <FieldLabel htmlFor="confirm-password">Confirm password</FieldLabel>
+ <FieldLabel htmlFor="confirm-password">{t('fields.confirmPassword')}</FieldLabel>
<Input
id="confirm-password"
type="password"
@@ -95,7 +97,7 @@ export default function AuthResetPasswordForm() {
<Field>
<Button type="submit" disabled={pending}>
- {pending ? 'Saving…' : 'Set new password'}
+ {pending ? t('resetPassword.submitPending') : t('resetPassword.submit')}
</Button>
</Field>
</FieldGroup>
diff --git a/apps/web/src/features/auth/hooks/useAuthAction.ts b/apps/web/src/features/auth/hooks/useAuthAction.ts
index 6f406156..e06e29f4 100644
--- a/apps/web/src/features/auth/hooks/useAuthAction.ts
+++ b/apps/web/src/features/auth/hooks/useAuthAction.ts
@@ -2,6 +2,7 @@
import { useState } from 'react';
import { useRouter } from 'next/navigation';
+import { useTranslations } from 'next-intl';
// Runs an auth action while tracking pending + error, and redirects into the
// planner on success. `setError` is exposed so a form can report client-side
@@ -10,12 +11,19 @@ import { useRouter } from 'next/navigation';
// Actions that only send an email (reset link, sign-in link, confirmation) end on
// the same screen with a "check your inbox" message instead, so they pass
// `redirect: false` and keep `pending` cleared.
+//
+// A failure carries the message the auth server sent; `fallback` covers the ones
+// that arrive without one and where the generic wording is too vague.
export function useAuthAction() {
const router = useRouter();
+ const t = useTranslations('auth.errors');
const [error, setError] = useState<string | null>(null);
const [pending, setPending] = useState(false);
- async function run(action: () => Promise<void>, options?: { redirect?: boolean }) {
+ async function run(
+ action: () => Promise<void>,
+ options?: { redirect?: boolean; fallback?: string },
+ ) {
setError(null);
setPending(true);
try {
@@ -27,7 +35,8 @@ export function useAuthAction() {
router.push('/');
router.refresh();
} catch (err) {
- setError(err instanceof Error ? err.message : 'Something went wrong. Please try again.');
+ const message = err instanceof Error ? err.message : '';
+ setError(message || options?.fallback || t('generic'));
setPending(false);
}
}
diff --git a/apps/web/src/features/auth/hooks/useRedirectError.ts b/apps/web/src/features/auth/hooks/useRedirectError.ts
new file mode 100644
index 00000000..00f3851b
--- /dev/null
+++ b/apps/web/src/features/auth/hooks/useRedirectError.ts
@@ -0,0 +1,38 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
+
+// Some auth failures reach the sign-in screen as a redirect rather than a rejected
+// promise, and carry their reason in ?error=<code> (plus ?error_description=<text>
+// when the instance itself refused — the registration gate passes its own message
+// that way). Two flows land here: the Google round trip, and the confirmation link
+// from the address verification email. Codes raised by better-auth carry no
+// description, so the ones a visitor can act on are spelled out here.
+//
+// Linking a social account to an account whose email was never confirmed is refused
+// on purpose: anyone could have registered that address with a password before its
+// owner arrived.
+const MESSAGE_KEYS = {
+ unable_to_link_account: 'linkRefused',
+ account_not_linked: 'linkRefused',
+ signup_disabled: 'signupDisabled',
+ email_not_found: 'emailNotFound',
+ // The confirmation link failed. better-auth redirects with these uppercase codes.
+ TOKEN_EXPIRED: 'tokenExpired',
+ INVALID_TOKEN: 'invalidToken',
+ USER_NOT_FOUND: 'userNotFound',
+} as const;
+
+export function useRedirectError() {
+ const t = useTranslations('auth.errors');
+
+ return function redirectErrorMessage(
+ error: string | null,
+ description: string | null,
+ ): string | null {
+ if (!error) return null;
+ const key = MESSAGE_KEYS[error as keyof typeof MESSAGE_KEYS];
+ if (key) return t(key);
+ return description ?? t('google');
+ };
+}
diff --git a/apps/web/src/features/auth/services/auth.service.ts b/apps/web/src/features/auth/services/auth.service.ts
index bc9b4fc1..54194644 100644
--- a/apps/web/src/features/auth/services/auth.service.ts
+++ b/apps/web/src/features/auth/services/auth.service.ts
@@ -14,9 +14,8 @@ const appUrl = (path: string) =>
typeof window === 'undefined' ? path : `${window.location.origin}${path}`;
// Each call throws with the API message on failure; on success the session cookie
-// is set and the middleware lets the user into the planner.
-
-const GENERIC_ERROR = 'Something went wrong. Please try again.';
+// is set and the middleware lets the user into the planner. A failure without a
+// message throws an empty one, and the caller (useAuthAction) words it.
// Sign-in was refused because the address is not confirmed yet. The only 403 the
// sign-in endpoint raises is the verification gate in @repo/auth, so the status is
@@ -26,7 +25,7 @@ export class EmailNotConfirmedError extends Error {}
export async function signInWithEmail(input: { email: string; password: string }): Promise<void> {
const result = await signIn.email(input);
if (!result.error) return;
- const message = result.error.message ?? GENERIC_ERROR;
+ const message = result.error.message ?? '';
if (result.error.status === 403) throw new EmailNotConfirmedError(message);
throw new Error(message);
}
@@ -43,7 +42,7 @@ export async function signUpWithEmail(input: { email: string; password: string }
name: input.email.split('@')[0] || input.email,
callbackURL: appUrl('/login?verified=1'),
});
- if (result.error) throw new Error(result.error.message ?? GENERIC_ERROR);
+ if (result.error) throw new Error(result.error.message ?? '');
}
// Sends the password reset link. The address is not confirmed to exist: better-auth
@@ -57,7 +56,7 @@ export async function sendPasswordResetEmail(email: string): Promise<void> {
email,
redirectTo: appUrl(`/reset-password?email=${encodeURIComponent(email)}`),
});
- if (result.error) throw new Error(result.error.message ?? GENERIC_ERROR);
+ if (result.error) throw new Error(result.error.message ?? '');
}
// Consumes the token from the reset link, sets the new password, and signs the user
@@ -69,7 +68,7 @@ export async function setNewPassword(input: {
newPassword: string;
}): Promise<{ signedIn: boolean }> {
const result = await resetPassword({ token: input.token, newPassword: input.newPassword });
- if (result.error) throw new Error(result.error.message ?? GENERIC_ERROR);
+ if (result.error) throw new Error(result.error.message ?? '');
if (!input.email) return { signedIn: false };
const attempt = await signIn.email({ email: input.email, password: input.newPassword });
return { signedIn: !attempt.error };
@@ -79,7 +78,7 @@ export async function setNewPassword(input: {
// links turned off.
export async function sendMagicLink(email: string): Promise<void> {
const result = await signIn.magicLink({ email, callbackURL: appUrl('/') });
- if (result.error) throw new Error(result.error.message ?? GENERIC_ERROR);
+ if (result.error) throw new Error(result.error.message ?? '');
}
// Sends the address confirmation link again, for someone held back at sign-in.
@@ -88,7 +87,7 @@ export async function resendVerificationEmail(email: string): Promise<void> {
email,
callbackURL: appUrl('/login?verified=1'),
});
- if (result.error) throw new Error(result.error.message ?? GENERIC_ERROR);
+ if (result.error) throw new Error(result.error.message ?? '');
}
// Drops the session created by autoSignIn right after sign-up, used when the
@@ -111,13 +110,10 @@ export async function signInWithGoogle(): Promise<void> {
callbackURL: appUrl('/'),
errorCallbackURL: appUrl('/login'),
});
- if (result.error) throw new Error(result.error.message ?? GENERIC_ERROR);
+ if (result.error) throw new Error(result.error.message ?? '');
}
export async function signInWithPasskey(): Promise<void> {
const result = await signIn.passkey();
- if (result?.error)
- throw new Error(
- result.error.message ?? 'Could not sign in with your passkey. Please try again.',
- );
+ if (result?.error) throw new Error(result.error.message ?? '');
}
diff --git a/apps/web/src/features/auth/utils/redirectErrors.ts b/apps/web/src/features/auth/utils/redirectErrors.ts
deleted file mode 100644
index cc106a31..00000000
--- a/apps/web/src/features/auth/utils/redirectErrors.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-// Some auth failures reach the sign-in screen as a redirect rather than a rejected
-// promise, and carry their reason in ?error=<code> (plus ?error_description=<text>
-// when the instance itself refused — the registration gate passes its own message
-// that way). Two flows land here: the Google round trip, and the confirmation link
-// from the address verification email. Codes raised by better-auth carry no
-// description, so the ones a visitor can act on are spelled out here.
-// The address already has an account whose email was never confirmed. Linking a
-// social account to an unconfirmed one is refused on purpose: anyone could have
-// registered that address with a password before its owner arrived.
-const LINK_REFUSED =
- 'This email already has an account. Sign in with its password and confirm the address first, then Google can be used.';
-
-const MESSAGES: Record<string, string> = {
- unable_to_link_account: LINK_REFUSED,
- account_not_linked: LINK_REFUSED,
- signup_disabled: 'This instance is not accepting new accounts.',
- email_not_found: 'Google did not return an email address for this account.',
- // The confirmation link failed. better-auth redirects with these uppercase codes.
- TOKEN_EXPIRED: 'This confirmation link has expired. Sign in below to get a new one.',
- INVALID_TOKEN: 'This confirmation link is not valid. Sign in below to get a new one.',
- USER_NOT_FOUND: 'This confirmation link belongs to an account that no longer exists.',
-};
-
-export function redirectErrorMessage(
- error: string | null,
- description: string | null,
-): string | null {
- if (!error) return null;
- return MESSAGES[error] ?? description ?? 'Could not sign in with Google. Please try again.';
-}
diff --git a/apps/web/src/features/cycles/CycleDetailPage.tsx b/apps/web/src/features/cycles/CycleDetailPage.tsx
index 42a023db..7ac30fc2 100644
--- a/apps/web/src/features/cycles/CycleDetailPage.tsx
+++ b/apps/web/src/features/cycles/CycleDetailPage.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import { useShell } from '@/context/shellContext';
import { Skeleton } from '@/components/ui/skeleton';
import { useCycleQuery } from '@/services/cycles.service';
@@ -8,6 +9,7 @@ import CycleIssuesBoard from './components/detail/CycleIssuesBoard';
// One cycle: its header over the board of the issues planned into it.
export default function CycleDetailPage({ cycleId }: { cycleId: number }) {
+ const t = useTranslations('cycles');
const { project } = useShell();
const projectKey = project?.project.key ?? null;
const query = useCycleQuery(cycleId);
@@ -18,7 +20,7 @@ export default function CycleDetailPage({ cycleId }: { cycleId: number }) {
return query.isLoading ? (
<Skeleton className="m-6 h-8 w-64" />
) : (
- <p className="px-6 py-8 text-sm text-muted-foreground">Cycle not found.</p>
+ <p className="px-6 py-8 text-sm text-muted-foreground">{t('notFound')}</p>
);
return (
diff --git a/apps/web/src/features/cycles/CyclesPage.tsx b/apps/web/src/features/cycles/CyclesPage.tsx
index 593cbe91..e5255ecf 100644
--- a/apps/web/src/features/cycles/CyclesPage.tsx
+++ b/apps/web/src/features/cycles/CyclesPage.tsx
@@ -3,6 +3,7 @@
import { useState } from 'react';
import { useRouter } from 'next/navigation';
import { Plus } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { useShell } from '@/context/shellContext';
import { usePermissions } from '@/hooks/usePermissions';
import { Button } from '@/components/ui/button';
@@ -20,6 +21,7 @@ import CycleFormDialog from './components/CycleFormDialog';
// handful of cycles however old the project is; the finished ones only accumulate,
// so they are a paged archive of their own.
export default function CyclesPage({ view }: { view: CyclesView }) {
+ const t = useTranslations('cycles');
const { project } = useShell();
const { can } = usePermissions();
const router = useRouter();
@@ -41,11 +43,11 @@ export default function CyclesPage({ view }: { view: CyclesView }) {
return (
<div className="flex flex-1 flex-col overflow-hidden">
<div className="flex items-center justify-between gap-2 px-4 py-3">
- <h1 className="text-lg font-semibold">Cycles</h1>
+ <h1 className="text-lg font-semibold">{t('title')}</h1>
{can('cycles', 'create') && (
<Button size="sm" className="h-8 gap-1.5" onClick={() => setCreating(true)}>
<Plus className="size-3.5" />
- New cycle
+ {t('newCycle')}
</Button>
)}
</div>
diff --git a/apps/web/src/features/cycles/components/CycleActions.tsx b/apps/web/src/features/cycles/components/CycleActions.tsx
index 849e4660..42adc83d 100644
--- a/apps/web/src/features/cycles/components/CycleActions.tsx
+++ b/apps/web/src/features/cycles/components/CycleActions.tsx
@@ -3,6 +3,7 @@
import { useState } from 'react';
import { useRouter } from 'next/navigation';
import { ArrowRightLeft, MoreHorizontal, Pencil, Trash2 } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { Cycle } from '@/lib/api';
import { cyclesPath } from '@/utils/paths';
import { usePermissions } from '@/hooks/usePermissions';
@@ -20,6 +21,8 @@ import TransferIssuesDialog from './TransferIssuesDialog';
// The cycle's overflow menu. Deleting returns to the cycles list; the issues of a
// deleted cycle stay, without one.
export default function CycleActions({ cycle, projectKey }: { cycle: Cycle; projectKey: string }) {
+ const t = useTranslations('cycles');
+ const tCommon = useTranslations('common');
const { can } = usePermissions();
const del = useDeleteCycle(projectKey);
const router = useRouter();
@@ -41,7 +44,7 @@ export default function CycleActions({ cycle, projectKey }: { cycle: Cycle; proj
<DropdownMenuTrigger asChild>
<button
type="button"
- aria-label="Cycle options"
+ aria-label={t('options')}
className="rounded p-0.5 text-muted-foreground/60 hover:text-foreground"
>
<MoreHorizontal className="size-4" />
@@ -51,20 +54,20 @@ export default function CycleActions({ cycle, projectKey }: { cycle: Cycle; proj
{canEdit && (
<DropdownMenuItem onClick={() => setEditing(true)}>
<Pencil className="size-4" />
- Edit
+ {tCommon('edit')}
</DropdownMenuItem>
)}
{canEdit && (
<DropdownMenuItem onClick={() => setTransferring(true)}>
<ArrowRightLeft className="size-4" />
- Transfer unfinished issues
+ {t('transferIssues')}
</DropdownMenuItem>
)}
{canEdit && canDelete && <DropdownMenuSeparator />}
{canDelete && (
<DropdownMenuItem variant="destructive" onClick={() => void remove()}>
<Trash2 className="size-4" />
- Delete
+ {tCommon('delete')}
</DropdownMenuItem>
)}
</DropdownMenuContent>
diff --git a/apps/web/src/features/cycles/components/CycleForm.tsx b/apps/web/src/features/cycles/components/CycleForm.tsx
index 2b5cba54..9ccb0502 100644
--- a/apps/web/src/features/cycles/components/CycleForm.tsx
+++ b/apps/web/src/features/cycles/components/CycleForm.tsx
@@ -1,5 +1,8 @@
+'use client';
+
import { useState } from 'react';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import { ApiError, type Cycle } from '@/lib/api';
import { addDays, daysBetween, parseDate, toDateStr } from '@/utils/dates';
import Modal from '@/components/common/overlay/Modal';
@@ -31,6 +34,8 @@ export default function CycleForm({
defaults: CycleDefaults;
onClose: () => void;
}) {
+ const t = useTranslations('cycles');
+ const tCommon = useTranslations('common');
const [name, setName] = useState(cycle?.name ?? defaults.name);
const [goal, setGoal] = useState(cycle?.goal ?? '');
const [startDate, setStartDate] = useState(cycle?.startDate ?? defaults.startDate);
@@ -80,15 +85,19 @@ export default function CycleForm({
else await create.mutateAsync(input);
onClose();
} catch (err) {
- toast.error(err instanceof ApiError ? err.message : 'Could not save the cycle');
+ toast.error(err instanceof ApiError ? err.message : t('form.saveFailed'));
}
};
return (
- <Modal title={cycle ? 'Edit cycle' : 'New cycle'} projectKey={projectKey} onClose={onClose}>
+ <Modal
+ title={cycle ? t('form.editTitle') : t('form.newTitle')}
+ projectKey={projectKey}
+ onClose={onClose}
+ >
<div className="flex flex-col gap-4">
<div className="flex flex-col gap-1.5">
- <Label htmlFor="cycle-name">Name</Label>
+ <Label htmlFor="cycle-name">{t('form.name')}</Label>
<Input
id="cycle-name"
value={name}
@@ -98,23 +107,23 @@ export default function CycleForm({
/>
</div>
<div className="flex flex-col gap-1.5">
- <Label htmlFor="cycle-goal">Goal</Label>
+ <Label htmlFor="cycle-goal">{t('form.goal')}</Label>
<Textarea
id="cycle-goal"
value={goal}
- placeholder="What should this cycle deliver?"
+ placeholder={t('form.goalPlaceholder')}
onChange={(e) => setGoal(e.target.value)}
/>
</div>
{!endLocked && (
<div className="flex flex-col gap-1.5">
- <Label>Length</Label>
+ <Label>{t('form.length')}</Label>
<CycleLengthPicker days={length} onChange={changeLength} />
</div>
)}
<div className="flex items-center gap-3">
<div className="flex flex-col gap-1.5">
- <Label>Starts</Label>
+ <Label>{t('form.starts')}</Label>
{startLocked ? (
<FixedDate value={startDate} />
) : (
@@ -127,7 +136,7 @@ export default function CycleForm({
)}
</div>
<div className="flex flex-col gap-1.5">
- <Label>Ends</Label>
+ <Label>{t('form.ends')}</Label>
{endLocked ? (
<FixedDate value={endDate} />
) : (
@@ -145,10 +154,10 @@ export default function CycleForm({
</div>
<div className="flex justify-end gap-2">
<Button variant="ghost" onClick={onClose}>
- Cancel
+ {tCommon('cancel')}
</Button>
<Button disabled={!name.trim() || saving} onClick={() => void submit()}>
- {saving ? 'Saving…' : cycle ? 'Save' : 'Create cycle'}
+ {saving ? tCommon('saving') : cycle ? tCommon('save') : t('form.create')}
</Button>
</div>
</div>
diff --git a/apps/web/src/features/cycles/components/CycleFormDialog.tsx b/apps/web/src/features/cycles/components/CycleFormDialog.tsx
index e800e384..f811c43b 100644
--- a/apps/web/src/features/cycles/components/CycleFormDialog.tsx
+++ b/apps/web/src/features/cycles/components/CycleFormDialog.tsx
@@ -1,3 +1,6 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
import type { Cycle } from '@/lib/api';
import Modal from '@/components/common/overlay/Modal';
import { useCyclesQuery } from '@/services/cycles.service';
@@ -17,12 +20,18 @@ export default function CycleFormDialog({
cycle?: Cycle;
onClose: () => void;
}) {
+ const t = useTranslations('cycles');
+ const tCommon = useTranslations('common');
const { data: cycles } = useCyclesQuery(projectKey);
if (!cycles) {
return (
- <Modal title={cycle ? 'Edit cycle' : 'New cycle'} projectKey={projectKey} onClose={onClose}>
- <p className="text-sm text-muted-foreground">Loading…</p>
+ <Modal
+ title={cycle ? t('form.editTitle') : t('form.newTitle')}
+ projectKey={projectKey}
+ onClose={onClose}
+ >
+ <p className="text-sm text-muted-foreground">{tCommon('loading')}</p>
</Modal>
);
}
@@ -32,7 +41,7 @@ export default function CycleFormDialog({
projectKey={projectKey}
cycle={cycle}
cycles={cycles}
- defaults={cycleDefaults(cycles)}
+ defaults={cycleDefaults(cycles, (n) => t('defaultName', { n }))}
onClose={onClose}
/>
);
diff --git a/apps/web/src/features/cycles/components/CycleLengthPicker.tsx b/apps/web/src/features/cycles/components/CycleLengthPicker.tsx
index 8d5e2d91..b480d270 100644
--- a/apps/web/src/features/cycles/components/CycleLengthPicker.tsx
+++ b/apps/web/src/features/cycles/components/CycleLengthPicker.tsx
@@ -1,3 +1,6 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
import { Button } from '@/components/ui/button';
import { CYCLE_LENGTHS } from '../utils/cycleDefaults';
@@ -11,6 +14,8 @@ export default function CycleLengthPicker({
days: number;
onChange: (days: number) => void;
}) {
+ const t = useTranslations('cycles');
+
return (
<div className="flex items-center gap-1.5">
{CYCLE_LENGTHS.map((length) => (
@@ -22,7 +27,7 @@ export default function CycleLengthPicker({
className="h-7 px-2.5 text-xs font-normal"
onClick={() => onChange(length)}
>
- {length / 7} {length === 7 ? 'week' : 'weeks'}
+ {t('weeks', { count: length / 7 })}
</Button>
))}
</div>
diff --git a/apps/web/src/features/cycles/components/TransferIssuesDialog.tsx b/apps/web/src/features/cycles/components/TransferIssuesDialog.tsx
index 1286be59..ec2bd9ba 100644
--- a/apps/web/src/features/cycles/components/TransferIssuesDialog.tsx
+++ b/apps/web/src/features/cycles/components/TransferIssuesDialog.tsx
@@ -1,5 +1,8 @@
+'use client';
+
import { useState } from 'react';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import { ApiError, type Cycle } from '@/lib/api';
import { formatShortDate } from '@/utils/dates';
import Modal from '@/components/common/overlay/Modal';
@@ -28,6 +31,8 @@ export default function TransferIssuesDialog({
projectKey: string;
onClose: () => void;
}) {
+ const t = useTranslations('cycles.transfer');
+ const tCommon = useTranslations('common');
const [target, setTarget] = useState<string>(NO_CYCLE);
const transfer = useTransferCycleIssues(projectKey);
const targets = (usePlannedCyclesQuery(projectKey).data ?? []).filter((c) => c.id !== cycle.id);
@@ -38,30 +43,30 @@ export default function TransferIssuesDialog({
id: cycle.id,
targetCycleId: target === NO_CYCLE ? null : Number(target),
});
- toast.success(moved === 1 ? '1 issue moved' : `${moved} issues moved`);
+ toast.success(t('moved', { count: moved }));
onClose();
} catch (err) {
- toast.error(err instanceof ApiError ? err.message : 'Could not move the issues');
+ toast.error(err instanceof ApiError ? err.message : t('failed'));
}
};
return (
<Modal
- title="Transfer unfinished issues"
+ title={t('title')}
crumb={cycle.name}
- description="Issues that are not completed or canceled move to the cycle you pick. The rest stay here."
+ description={t('description')}
projectKey={projectKey}
onClose={onClose}
>
<div className="flex flex-col gap-4">
<div className="flex flex-col gap-1.5">
- <Label htmlFor="transfer-target">Move to</Label>
+ <Label htmlFor="transfer-target">{t('moveTo')}</Label>
<Select value={target} onValueChange={setTarget}>
<SelectTrigger id="transfer-target">
<SelectValue />
</SelectTrigger>
<SelectContent>
- <SelectItem value={NO_CYCLE}>No cycle</SelectItem>
+ <SelectItem value={NO_CYCLE}>{t('noCycle')}</SelectItem>
{targets.map((c) => (
<SelectItem key={c.id} value={String(c.id)}>
{c.name} ({formatShortDate(c.startDate)} – {formatShortDate(c.endDate)})
@@ -72,10 +77,10 @@ export default function TransferIssuesDialog({
</div>
<div className="flex justify-end gap-2">
<Button variant="ghost" onClick={onClose}>
- Cancel
+ {tCommon('cancel')}
</Button>
<Button disabled={transfer.isPending} onClick={() => void submit()}>
- {transfer.isPending ? 'Moving…' : 'Move issues'}
+ {transfer.isPending ? t('moving') : t('submit')}
</Button>
</div>
</div>
diff --git a/apps/web/src/features/cycles/components/detail/CycleHeader.tsx b/apps/web/src/features/cycles/components/detail/CycleHeader.tsx
index 26b3465a..bff31bb0 100644
--- a/apps/web/src/features/cycles/components/detail/CycleHeader.tsx
+++ b/apps/web/src/features/cycles/components/detail/CycleHeader.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import type { Cycle } from '@/lib/api';
import { formatShortDate } from '@/utils/dates';
import { CYCLE_STATUS_META } from '@/utils/cycleMeta';
@@ -10,6 +11,7 @@ import CycleActions from '../CycleActions';
// The cycle detail header: name, the status its dates put it in, the range, and how
// much of it is done. Editing happens in the overflow menu dialog.
export default function CycleHeader({ cycle, projectKey }: { cycle: Cycle; projectKey: string }) {
+ const t = useTranslations('cycles');
const status = CYCLE_STATUS_META[cycle.status];
return (
@@ -18,7 +20,7 @@ export default function CycleHeader({ cycle, projectKey }: { cycle: Cycle; proje
<span className="text-sm font-semibold">{cycle.name}</span>
<span className="flex items-center gap-1.5 text-xs text-muted-foreground">
{colorDot(status.color)}
- {status.label}
+ {t(`status.${cycle.status}`)}
</span>
<span className="text-xs text-muted-foreground">
{formatShortDate(cycle.startDate)} – {formatShortDate(cycle.endDate)}
diff --git a/apps/web/src/features/cycles/components/list/CycleInfoPopover.tsx b/apps/web/src/features/cycles/components/list/CycleInfoPopover.tsx
index 162eed3f..d7f4f17d 100644
--- a/apps/web/src/features/cycles/components/list/CycleInfoPopover.tsx
+++ b/apps/web/src/features/cycles/components/list/CycleInfoPopover.tsx
@@ -1,4 +1,7 @@
+'use client';
+
import Link from 'next/link';
+import { useTranslations } from 'next-intl';
import { ArrowRight, Info } from 'lucide-react';
import type { Cycle } from '@/lib/api';
import { formatShortDate } from '@/utils/dates';
@@ -19,6 +22,7 @@ export default function CycleInfoPopover({
cycle: Cycle;
projectKey: string;
}) {
+ const t = useTranslations('cycles');
const status = CYCLE_STATUS_META[cycle.status];
return (
@@ -27,7 +31,7 @@ export default function CycleInfoPopover({
<button
type="button"
className="group/name flex w-full min-w-0 items-center gap-2 text-left"
- title="Cycle details"
+ title={t('details')}
>
{colorDot(status.color)}
<span className="min-w-0 flex-1 truncate text-sm">{cycle.name}</span>
@@ -41,7 +45,7 @@ export default function CycleInfoPopover({
<span className="truncate font-medium">{cycle.name}</span>
<span className="flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground">
{colorDot(status.color)}
- {status.label}
+ {t(`status.${cycle.status}`)}
</span>
</div>
<p className="text-xs text-muted-foreground">
@@ -51,14 +55,14 @@ export default function CycleInfoPopover({
</div>
<div className="border-t border-border px-3.5 py-3">
- <p className="text-xs font-medium text-muted-foreground">Goal</p>
+ <p className="text-xs font-medium text-muted-foreground">{t('goal')}</p>
<p className="mt-1 text-xs leading-snug whitespace-pre-wrap">
- {cycle.goal || <span className="text-muted-foreground">No goal set.</span>}
+ {cycle.goal || <span className="text-muted-foreground">{t('noGoal')}</span>}
</p>
</div>
<div className="border-t border-border px-3.5 py-3">
- <p className="text-xs font-medium text-muted-foreground">Progress</p>
+ <p className="text-xs font-medium text-muted-foreground">{t('progress')}</p>
<div className="mt-2">
<ProgressBar progress={cycle.progress} wide />
</div>
@@ -68,7 +72,7 @@ export default function CycleInfoPopover({
href={cyclePath(projectKey, cycle.id)}
className="flex items-center justify-between border-t border-border px-3.5 py-2.5 text-xs font-medium text-muted-foreground hover:text-foreground"
>
- Open cycle
+ {t('openCycle')}
<ArrowRight className="size-3.5" />
</Link>
</PopoverContent>
diff --git a/apps/web/src/features/cycles/components/list/CycleTableArchive.tsx b/apps/web/src/features/cycles/components/list/CycleTableArchive.tsx
index d7093a07..917d5f29 100644
--- a/apps/web/src/features/cycles/components/list/CycleTableArchive.tsx
+++ b/apps/web/src/features/cycles/components/list/CycleTableArchive.tsx
@@ -1,4 +1,7 @@
+'use client';
+
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import ShowMoreButton from '@/components/common/ShowMoreButton';
import { CYCLE_STATUS_META } from '@/utils/cycleMeta';
import type { CompletedCycles } from '../../hooks/useCompletedCycles';
@@ -19,13 +22,14 @@ export default function CycleTableArchive({
projectKey: string;
gridTemplate: string;
}) {
+ const t = useTranslations('cycles');
const [collapsed, setCollapsed] = useState(true);
- const { label, color } = CYCLE_STATUS_META.completed;
+ const { color } = CYCLE_STATUS_META.completed;
return (
<>
<CycleTableSection
- label={label}
+ label={t('status.completed')}
color={color}
count={completed.total}
collapsed={collapsed}
diff --git a/apps/web/src/features/cycles/components/list/CycleTimelineGroupRow.tsx b/apps/web/src/features/cycles/components/list/CycleTimelineGroupRow.tsx
index cff494ee..5b872894 100644
--- a/apps/web/src/features/cycles/components/list/CycleTimelineGroupRow.tsx
+++ b/apps/web/src/features/cycles/components/list/CycleTimelineGroupRow.tsx
@@ -1,3 +1,6 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
import { colorDot } from '@/components/common/fields/colorDot';
import type { CycleGroup } from '../../utils/cycleGroups';
import { CYCLE_GROUP_H } from '../../utils/cycleTimeline';
@@ -13,6 +16,8 @@ export default function CycleTimelineGroupRow({
labelW: number;
trackWidth: number;
}) {
+ const t = useTranslations('cycles');
+
return (
<div className="flex border-b bg-muted/40" style={{ height: CYCLE_GROUP_H }}>
<div
@@ -20,7 +25,7 @@ export default function CycleTimelineGroupRow({
style={{ width: labelW }}
>
{colorDot(group.color)}
- <span className="truncate">{group.label}</span>
+ <span className="truncate">{t(`status.${group.status}`)}</span>
<span className="text-muted-foreground">{group.cycles.length}</span>
</div>
<div style={{ width: trackWidth }} />
diff --git a/apps/web/src/features/cycles/components/list/CycleTimelineRow.tsx b/apps/web/src/features/cycles/components/list/CycleTimelineRow.tsx
index ab08af31..feb3ce7e 100644
--- a/apps/web/src/features/cycles/components/list/CycleTimelineRow.tsx
+++ b/apps/web/src/features/cycles/components/list/CycleTimelineRow.tsx
@@ -8,6 +8,7 @@ import type { CycleDragMode } from '../../hooks/useCycleDrag';
import { cycleLength, movableEnds } from '../../utils/cycleDates';
import { CYCLE_ROW_H } from '../../utils/cycleTimeline';
import CycleInfoPopover from './CycleInfoPopover';
+import { useTranslations } from 'next-intl';
// One cycle row: the sticky label on the left and its bar on the day track. The bar
// moves the cycle or resizes one end, within what the cycle's status still allows.
@@ -40,6 +41,7 @@ export default function CycleTimelineRow({
onBeginDrag: (e: React.PointerEvent, cycle: Cycle, mode: CycleDragMode) => void;
onOpen: (id: number) => void;
}) {
+ const t = useTranslations('cycles');
const color = CYCLE_STATUS_META[cycle.status].color;
const ends = movableEnds(cycle.status);
const canMove = canEdit && ends.move;
@@ -93,12 +95,12 @@ export default function CycleTimelineRow({
className="pointer-events-none absolute top-1/2 flex -translate-y-1/2 items-center gap-2.5 text-[11px] whitespace-nowrap text-muted-foreground tabular-nums"
style={{ left: rect.left + rect.width + 8 }}
>
- <span className="flex items-center gap-1" title="Length">
+ <span className="flex items-center gap-1" title={t('columns.length')}>
<CalendarRange className="size-3" />
{cycleLength(cycle)}d
</span>
{cycle.progress.total > 0 && (
- <span className="flex items-center gap-1" title="Issues done">
+ <span className="flex items-center gap-1" title={t('issuesDone')}>
<CircleDashed className="size-3" />
{cycle.progress.completed}/{cycle.progress.total - cycle.progress.canceled}
</span>
diff --git a/apps/web/src/features/cycles/components/list/CyclesList.tsx b/apps/web/src/features/cycles/components/list/CyclesList.tsx
index 7add39e3..4795de8d 100644
--- a/apps/web/src/features/cycles/components/list/CyclesList.tsx
+++ b/apps/web/src/features/cycles/components/list/CyclesList.tsx
@@ -1,3 +1,6 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
import type { Cycle } from '@/lib/api';
import type { CyclesView } from '@/utils/paths';
import { Button } from '@/components/ui/button';
@@ -28,20 +31,19 @@ export default function CyclesList({
canCreate: boolean;
onCreate: () => void;
}) {
+ const t = useTranslations('cycles');
+
if (isLoading) return <ListSkeleton className="px-4 py-6" rowClassName="h-12" />;
const newCycleButton = canCreate && (
<Button size="sm" onClick={onCreate}>
- New cycle
+ {t('newCycle')}
</Button>
);
if (cycles.length === 0 && completed.total === 0) {
return (
- <EmptyState
- title="No cycles yet"
- description="A cycle is a time-boxed period the team plans its issues into."
- >
+ <EmptyState title={t('emptyTitle')} description={t('emptyDescription')}>
{newCycleButton}
</EmptyState>
);
@@ -53,10 +55,7 @@ export default function CyclesList({
if (cycles.length === 0) {
return (
- <EmptyState
- title="Nothing planned"
- description="The timeline shows active and upcoming cycles. Finished ones are in the table."
- >
+ <EmptyState title={t('nothingPlannedTitle')} description={t('nothingPlannedDescription')}>
{newCycleButton}
</EmptyState>
);
diff --git a/apps/web/src/features/cycles/components/list/CyclesTable.tsx b/apps/web/src/features/cycles/components/list/CyclesTable.tsx
index cdfbc659..941f571a 100644
--- a/apps/web/src/features/cycles/components/list/CyclesTable.tsx
+++ b/apps/web/src/features/cycles/components/list/CyclesTable.tsx
@@ -1,4 +1,7 @@
+'use client';
+
import { Fragment } from 'react';
+import { useTranslations } from 'next-intl';
import type { Cycle } from '@/lib/api';
import { usePersistedSet } from '@/hooks/usePersistedSet';
import { groupCycles } from '../../utils/cycleGroups';
@@ -23,6 +26,7 @@ export default function CyclesTable({
completed: CompletedCycles;
projectKey: string;
}) {
+ const t = useTranslations('cycles');
const collapsed = usePersistedSet(`cycles-collapsed:${projectKey}`);
return (
@@ -32,11 +36,11 @@ export default function CyclesTable({
className="sticky top-0 z-10 grid items-center gap-3 border-b bg-background px-4 py-2 text-xs font-medium text-muted-foreground"
style={{ gridTemplateColumns: GRID }}
>
- <span>Name</span>
- <span>Dates</span>
- <span>Length</span>
- <span>Issues</span>
- <span>Progress</span>
+ <span>{t('columns.name')}</span>
+ <span>{t('columns.dates')}</span>
+ <span>{t('columns.length')}</span>
+ <span>{t('columns.issues')}</span>
+ <span>{t('columns.progress')}</span>
<span />
</div>
@@ -45,7 +49,7 @@ export default function CyclesTable({
return (
<Fragment key={group.status}>
<CycleTableSection
- label={group.label}
+ label={t(`status.${group.status}`)}
color={group.color}
count={group.cycles.length}
collapsed={isCollapsed}
diff --git a/apps/web/src/features/cycles/components/list/CyclesViewTabs.tsx b/apps/web/src/features/cycles/components/list/CyclesViewTabs.tsx
index f6b66cb8..8d83f12f 100644
--- a/apps/web/src/features/cycles/components/list/CyclesViewTabs.tsx
+++ b/apps/web/src/features/cycles/components/list/CyclesViewTabs.tsx
@@ -1,10 +1,13 @@
+'use client';
+
import { GanttChart, Table2, type LucideIcon } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { CyclesView } from '@/utils/paths';
import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs';
-const TABS: { value: CyclesView; label: string; icon: LucideIcon }[] = [
- { value: 'table', label: 'Table', icon: Table2 },
- { value: 'timeline', label: 'Timeline', icon: GanttChart },
+const TABS: { value: CyclesView; icon: LucideIcon }[] = [
+ { value: 'table', icon: Table2 },
+ { value: 'timeline', icon: GanttChart },
];
// The cycles list layout switcher: the grouped table or the day track. The open
@@ -17,10 +20,12 @@ export default function CyclesViewTabs({
view: CyclesView;
onSelect: (view: CyclesView) => void;
}) {
+ const t = useTranslations('cycles.views');
+
return (
<Tabs value={view}>
<TabsList variant="line" className="overflow-x-auto">
- {TABS.map(({ value, label, icon: Icon }) => (
+ {TABS.map(({ value, icon: Icon }) => (
<TabsTrigger
key={value}
value={value}
@@ -28,7 +33,7 @@ export default function CyclesViewTabs({
onClick={() => onSelect(value)}
>
<Icon className="size-3.5" />
- {label}
+ {t(value)}
</TabsTrigger>
))}
</TabsList>
diff --git a/apps/web/src/features/cycles/hooks/useCycleDrag.ts b/apps/web/src/features/cycles/hooks/useCycleDrag.ts
index 17eb41a5..3b1bc18d 100644
--- a/apps/web/src/features/cycles/hooks/useCycleDrag.ts
+++ b/apps/web/src/features/cycles/hooks/useCycleDrag.ts
@@ -1,5 +1,6 @@
import { useState } from 'react';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import { ApiError, type Cycle, type CyclePatch } from '@/lib/api';
import { addDays, daysBetween, toDateStr } from '@/utils/dates';
import { useUpdateCycle } from '@/services/cycles.service';
@@ -29,6 +30,7 @@ export function useCycleDrag({
dayW: number;
onOpen: (id: number) => void;
}) {
+ const t = useTranslations('cycles');
const update = useUpdateCycle(projectKey);
const [preview, setPreview] = useState<{ cycleId: number; start: Date; end: Date } | null>(null);
@@ -95,8 +97,7 @@ export function useCycleDrag({
update.mutate(
{ id: cycle.id, patch },
{
- onError: (err) =>
- toast.error(err instanceof ApiError ? err.message : 'Could not move the cycle'),
+ onError: (err) => toast.error(err instanceof ApiError ? err.message : t('dragFailed')),
},
);
};
diff --git a/apps/web/src/features/cycles/utils/cycleDefaults.ts b/apps/web/src/features/cycles/utils/cycleDefaults.ts
index 9fdea52a..38256746 100644
--- a/apps/web/src/features/cycles/utils/cycleDefaults.ts
+++ b/apps/web/src/features/cycles/utils/cycleDefaults.ts
@@ -18,12 +18,12 @@ export interface CycleDefaults {
// Cycles are numbered rather than named, so the next one follows the last one:
// "Sprint 12" gives "Sprint 13", and any prefix works the same way ("Q3 W4" →
// "Q3 W5"). A last cycle whose name ends in no number, or no cycles at all, falls
-// back to counting them.
-function nextName(cycles: Cycle[]): string {
+// back to `fallbackName`, which numbers them from the count.
+function nextName(cycles: Cycle[], fallbackName: (n: number) => string): string {
const last = cycles[cycles.length - 1];
const numbered = last?.name.match(/^(.*?)(\d+)\s*$/);
if (numbered) return `${numbered[1]}${Number(numbered[2]) + 1}`;
- return `Sprint ${cycles.length + 1}`;
+ return fallbackName(cycles.length + 1);
}
// The next Monday after `from`, never `from` itself — cycles are planned ahead, so
@@ -38,7 +38,7 @@ function nextMonday(from: Date): Date {
// never overlapping, which the API rejects. With nothing ahead (the last cycle is
// over, or there is none) the new cycle starts on the coming Monday rather than
// mid-week.
-export function cycleDefaults(cycles: Cycle[]): CycleDefaults {
+export function cycleDefaults(cycles: Cycle[], fallbackName: (n: number) => string): CycleDefaults {
const today = new Date();
const previousEnd = parseDate(cycles[cycles.length - 1]?.endDate ?? null);
const start =
@@ -46,7 +46,7 @@ export function cycleDefaults(cycles: Cycle[]): CycleDefaults {
? addDays(previousEnd, 1)
: nextMonday(today);
return {
- name: nextName(cycles),
+ name: nextName(cycles, fallbackName),
startDate: toDateStr(start),
endDate: toDateStr(addDays(start, DEFAULT_LENGTH - 1)),
};
diff --git a/apps/web/src/features/cycles/utils/cycleGroups.ts b/apps/web/src/features/cycles/utils/cycleGroups.ts
index f2265ed0..d268d776 100644
--- a/apps/web/src/features/cycles/utils/cycleGroups.ts
+++ b/apps/web/src/features/cycles/utils/cycleGroups.ts
@@ -3,7 +3,6 @@ import { CYCLE_STATUS_META, CYCLE_STATUS_ORDER } from '@/utils/cycleMeta';
export interface CycleGroup {
status: CycleStatus;
- label: string;
color: string;
cycles: Cycle[];
}
diff --git a/apps/web/src/features/dashboards/DashboardsPage.tsx b/apps/web/src/features/dashboards/DashboardsPage.tsx
index 78ae919a..d5ccb09d 100644
--- a/apps/web/src/features/dashboards/DashboardsPage.tsx
+++ b/apps/web/src/features/dashboards/DashboardsPage.tsx
@@ -2,6 +2,7 @@
import { useState } from 'react';
import { useParams, useRouter } from 'next/navigation';
+import { useTranslations } from 'next-intl';
import { useShell } from '@/context/shellContext';
import { usePermissions } from '@/hooks/usePermissions';
import { dashboardPath, dashboardsPath } from '@/utils/paths';
@@ -18,6 +19,8 @@ import AddWidgetDialog from './components/AddWidgetDialog';
// saved dashboard shows, or a built-in default when the project has none. Layout
// edits are local until saved (see useDashboardEditor).
export default function DashboardsPage() {
+ const t = useTranslations('dashboards');
+ const tCommon = useTranslations('common');
const { project } = useShell();
const { can } = usePermissions();
const params = useParams<{ projectKey: string; dashboardId?: string }>();
@@ -48,7 +51,7 @@ export default function DashboardsPage() {
if (!can('dashboards', 'read')) {
return (
<div className="flex h-full items-center justify-center px-4 text-center text-sm text-muted-foreground">
- You do not have access to dashboards.
+ {t('noAccess')}
</div>
);
}
@@ -57,8 +60,8 @@ export default function DashboardsPage() {
const canEditLayout = can('dashboards', 'edit');
function saveLabel() {
- if (editor.saving) return 'Saving…';
- return editor.isVirtual ? 'Save dashboard' : 'Save changes';
+ if (editor.saving) return tCommon('saving');
+ return editor.isVirtual ? t('saveDashboard') : t('saveChanges');
}
function layoutActions() {
@@ -66,7 +69,7 @@ export default function DashboardsPage() {
if (!editing) {
return (
<Button variant="ghost" size="sm" onClick={() => setEditing(true)}>
- Edit layout
+ {t('editLayout')}
</Button>
);
}
@@ -81,7 +84,7 @@ export default function DashboardsPage() {
disabled={editor.saving}
onClick={() => editor.discard()}
>
- Discard
+ {t('discard')}
</Button>
<Button size="sm" disabled={editor.saving} onClick={() => void editor.save()}>
{saveLabel()}
@@ -89,7 +92,7 @@ export default function DashboardsPage() {
</>
) : (
<Button variant="secondary" size="sm" onClick={() => setEditing(false)}>
- Done
+ {tCommon('done')}
</Button>
)}
</>
diff --git a/apps/web/src/features/dashboards/components/AddWidgetDialog.tsx b/apps/web/src/features/dashboards/components/AddWidgetDialog.tsx
index b08ab5b3..0e6b32ab 100644
--- a/apps/web/src/features/dashboards/components/AddWidgetDialog.tsx
+++ b/apps/web/src/features/dashboards/components/AddWidgetDialog.tsx
@@ -1,5 +1,6 @@
import { useMemo, useState } from 'react';
import { Plus, Search, X } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { WidgetType } from '@/utils/dashboardWidgets';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
@@ -11,12 +12,13 @@ import {
DialogTitle,
DialogTrigger,
} from '@/components/ui/dialog';
-import { WIDGET_GROUPS, WIDGET_META } from '../utils/widgetCatalog';
+import { WIDGET_GROUPS, WIDGET_ICON } from '../utils/widgetCatalog';
// Picks a widget type from the catalog and adds it to the current dashboard. Widgets
// are grouped by subject and filtered by a case-insensitive search over the label and
// description, matching the tool picker and GitHub skill import dialogs.
export default function AddWidgetDialog({ onAdd }: { onAdd: (type: WidgetType) => void }) {
+ const t = useTranslations('dashboards');
const [open, setOpen] = useState(false);
const [query, setQuery] = useState('');
@@ -25,17 +27,16 @@ export default function AddWidgetDialog({ onAdd }: { onAdd: (type: WidgetType) =
const groups = useMemo(() => {
const q = query.trim().toLowerCase();
return WIDGET_GROUPS.map((g) => ({
- label: g.label,
+ key: g.key,
types: q
- ? g.types.filter((t) => {
- const meta = WIDGET_META[t];
- return (
- meta.label.toLowerCase().includes(q) || meta.description.toLowerCase().includes(q)
- );
- })
+ ? g.types.filter(
+ (type) =>
+ t(`widgets.${type}.label`).toLowerCase().includes(q) ||
+ t(`widgets.${type}.description`).toLowerCase().includes(q),
+ )
: g.types,
})).filter((g) => g.types.length > 0);
- }, [query]);
+ }, [query, t]);
function add(type: WidgetType) {
onAdd(type);
@@ -53,13 +54,13 @@ export default function AddWidgetDialog({ onAdd }: { onAdd: (type: WidgetType) =
>
<DialogTrigger asChild>
<Button variant="outline" size="sm">
- <Plus className="size-4" /> Add widget
+ <Plus className="size-4" /> {t('addWidget')}
</Button>
</DialogTrigger>
<DialogContent>
<DialogHeader>
- <DialogTitle>Add a widget</DialogTitle>
- <DialogDescription>Pick a widget to add to this dashboard.</DialogDescription>
+ <DialogTitle>{t('addWidgetTitle')}</DialogTitle>
+ <DialogDescription>{t('addWidgetDescription')}</DialogDescription>
</DialogHeader>
<div className="relative">
@@ -68,7 +69,7 @@ export default function AddWidgetDialog({ onAdd }: { onAdd: (type: WidgetType) =
autoFocus
value={query}
onChange={(e) => setQuery(e.target.value)}
- placeholder="Search widgets"
+ placeholder={t('searchWidgets')}
className="pr-9 pl-9"
/>
{query && (
@@ -76,7 +77,7 @@ export default function AddWidgetDialog({ onAdd }: { onAdd: (type: WidgetType) =
type="button"
onClick={() => setQuery('')}
className="absolute top-1/2 right-3 -translate-y-1/2 rounded-sm text-muted-foreground transition-colors hover:text-foreground"
- aria-label="Clear search"
+ aria-label={t('clearSearch')}
>
<X className="size-4" />
</button>
@@ -86,18 +87,17 @@ export default function AddWidgetDialog({ onAdd }: { onAdd: (type: WidgetType) =
<div className="max-h-[55vh] space-y-5 overflow-y-auto pr-1">
{groups.length === 0 && (
<p className="py-6 text-center text-sm text-muted-foreground">
- No widget matches &ldquo;{query.trim()}&rdquo;.
+ {t('noWidgetMatches', { query: query.trim() })}
</p>
)}
{groups.map((group) => (
- <div key={group.label} className="space-y-1.5">
+ <div key={group.key} className="space-y-1.5">
<h3 className="px-1 text-xs font-semibold tracking-wide text-muted-foreground uppercase">
- {group.label}
+ {t(`widgetGroups.${group.key}`)}
</h3>
<div className="grid gap-2 sm:grid-cols-2">
{group.types.map((type) => {
- const meta = WIDGET_META[type];
- const Icon = meta.icon;
+ const Icon = WIDGET_ICON[type];
return (
<button
key={type}
@@ -107,9 +107,11 @@ export default function AddWidgetDialog({ onAdd }: { onAdd: (type: WidgetType) =
>
<Icon className="mt-0.5 size-5 shrink-0 text-muted-foreground" />
<span className="min-w-0">
- <span className="block text-sm font-medium">{meta.label}</span>
+ <span className="block text-sm font-medium">
+ {t(`widgets.${type}.label`)}
+ </span>
<span className="block text-xs text-muted-foreground">
- {meta.description}
+ {t(`widgets.${type}.description`)}
</span>
</span>
</button>
diff --git a/apps/web/src/features/dashboards/components/DashboardNameDialog.tsx b/apps/web/src/features/dashboards/components/DashboardNameDialog.tsx
index 987f4a08..289c75f6 100644
--- a/apps/web/src/features/dashboards/components/DashboardNameDialog.tsx
+++ b/apps/web/src/features/dashboards/components/DashboardNameDialog.tsx
@@ -1,4 +1,5 @@
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import { Button } from '@/components/ui/button';
import {
Dialog,
@@ -23,6 +24,8 @@ export default function DashboardNameDialog({
onClose: () => void;
onSubmit: (name: string) => void;
}) {
+ const t = useTranslations('dashboards');
+ const tCommon = useTranslations('common');
const [name, setName] = useState(initial);
return (
<Dialog open={open} onOpenChange={(o) => !o && onClose()}>
@@ -41,14 +44,14 @@ export default function DashboardNameDialog({
autoFocus
value={name}
onChange={(e) => setName(e.target.value)}
- placeholder="Dashboard name"
+ placeholder={t('namePlaceholder')}
/>
<DialogFooter className="mt-4">
<Button type="button" variant="ghost" onClick={onClose}>
- Cancel
+ {tCommon('cancel')}
</Button>
<Button type="submit" disabled={!name.trim()}>
- Save
+ {tCommon('save')}
</Button>
</DialogFooter>
</form>
diff --git a/apps/web/src/features/dashboards/components/DashboardTab.tsx b/apps/web/src/features/dashboards/components/DashboardTab.tsx
index 8c9bedde..2b3e25dd 100644
--- a/apps/web/src/features/dashboards/components/DashboardTab.tsx
+++ b/apps/web/src/features/dashboards/components/DashboardTab.tsx
@@ -2,6 +2,7 @@ import { useState } from 'react';
import { useSortable } from '@dnd-kit/sortable';
import { CSS } from '@dnd-kit/utilities';
import { LayoutDashboard, MoreHorizontal, Pencil, Trash2 } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { Dashboard } from '@/lib/api';
import { cn } from '@/lib/utils';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
@@ -23,6 +24,8 @@ export default function DashboardTab({
onRename: () => void;
onDelete: () => void;
}) {
+ const t = useTranslations('dashboards');
+ const tCommon = useTranslations('common');
const [menuOpen, setMenuOpen] = useState(false);
// Reordering tabs is a dashboards edit; disable dragging without it.
const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({
@@ -56,7 +59,7 @@ export default function DashboardTab({
<PopoverTrigger asChild>
<button
type="button"
- title="Dashboard options"
+ title={t('options')}
className="mr-1.5 rounded p-0.5 hover:bg-accent-foreground/10"
>
<MoreHorizontal className="size-3.5" />
@@ -72,7 +75,7 @@ export default function DashboardTab({
}}
className="flex w-full items-center gap-2 rounded px-2 py-1 text-left text-sm hover:bg-accent"
>
- <Pencil className="size-3.5" /> Rename
+ <Pencil className="size-3.5" /> {t('rename')}
</button>
)}
{canDelete && (
@@ -84,7 +87,7 @@ export default function DashboardTab({
}}
className="flex w-full items-center gap-2 rounded px-2 py-1 text-left text-sm text-destructive hover:bg-destructive/10"
>
- <Trash2 className="size-3.5" /> Delete
+ <Trash2 className="size-3.5" /> {tCommon('delete')}
</button>
)}
</PopoverContent>
diff --git a/apps/web/src/features/dashboards/components/DashboardTabs.tsx b/apps/web/src/features/dashboards/components/DashboardTabs.tsx
index 7bd4454b..b98cec0b 100644
--- a/apps/web/src/features/dashboards/components/DashboardTabs.tsx
+++ b/apps/web/src/features/dashboards/components/DashboardTabs.tsx
@@ -8,6 +8,7 @@ import {
} from '@dnd-kit/core';
import { SortableContext, horizontalListSortingStrategy } from '@dnd-kit/sortable';
import { LayoutDashboard, Plus } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { Dashboard } from '@/lib/api';
import { useStripSortSensors } from '@/lib/dnd';
import { usePermissions } from '@/hooks/usePermissions';
@@ -39,6 +40,7 @@ export default function DashboardTabs({
onDelete: (d: Dashboard) => void;
onReorder: (draggedId: number, targetId: number) => void;
}) {
+ const t = useTranslations('dashboards');
const { can } = usePermissions();
const canCreate = can('dashboards', 'create');
const canEdit = can('dashboards', 'edit');
@@ -62,7 +64,7 @@ export default function DashboardTabs({
{dashboards.length === 0 ? (
<span className="flex shrink-0 items-center gap-1.5 rounded-md bg-secondary px-2 py-1 text-sm font-medium text-foreground">
<LayoutDashboard className="size-3.5" />
- Overview
+ {t('defaultName')}
</span>
) : (
<DndContext
@@ -107,7 +109,7 @@ export default function DashboardTabs({
className="flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-sm text-muted-foreground hover:bg-accent hover:text-foreground"
>
<Plus className="size-3.5" />
- New dashboard
+ {t('newDashboard')}
</button>
)}
</div>
@@ -117,7 +119,7 @@ export default function DashboardTabs({
<DashboardNameDialog
key={renaming?.id ?? (dialog === 'new' ? 'new' : 'closed')}
open={dialog != null}
- title={renaming ? 'Rename dashboard' : 'New dashboard'}
+ title={renaming ? t('renameDashboard') : t('newDashboard')}
initial={renaming?.name ?? ''}
onClose={() => setDialog(null)}
onSubmit={(name) => {
diff --git a/apps/web/src/features/dashboards/components/WidgetFrame.tsx b/apps/web/src/features/dashboards/components/WidgetFrame.tsx
index 46434da7..23518a34 100644
--- a/apps/web/src/features/dashboards/components/WidgetFrame.tsx
+++ b/apps/web/src/features/dashboards/components/WidgetFrame.tsx
@@ -1,5 +1,6 @@
import type { ReactNode } from 'react';
import { GripVertical, MoreHorizontal, SlidersHorizontal } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { WidgetInstance } from '@/utils/dashboardWidgets';
import {
DropdownMenu,
@@ -8,7 +9,6 @@ import {
DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
-import { WIDGET_META } from '../utils/widgetCatalog';
// A borderless widget section: a quiet header (title + edit affordances) over a
// hairline divider, then the body directly on the page. No card box — surfaces are
@@ -33,9 +33,12 @@ export default function WidgetFrame({
onRemove: () => void;
children: ReactNode;
}) {
+ const t = useTranslations('dashboards');
// A saved layout is stored as an opaque jsonb blob, so its widget type is not
- // guaranteed to be in the catalog; fall back to the raw type instead of throwing.
- const defaultTitle = WIDGET_META[widget.type]?.label ?? widget.type;
+ // guaranteed to be in the catalog; fall back to the raw type instead of rendering
+ // a key path.
+ const labelKey = `widgets.${widget.type}.label` as const;
+ const defaultTitle = t.has(labelKey) ? t(labelKey) : widget.type;
const title = widget.title || defaultTitle;
return (
<section className="flex h-full flex-col">
@@ -43,7 +46,7 @@ export default function WidgetFrame({
{editing && (
<button
type="button"
- title="Drag to move"
+ title={t('dragToMove')}
className="widget-drag-handle -ml-1 cursor-grab touch-none text-muted-foreground/60 hover:text-foreground"
>
<GripVertical className="size-4" />
@@ -54,7 +57,7 @@ export default function WidgetFrame({
value={widget.title ?? ''}
onChange={(e) => onRename(e.target.value)}
placeholder={defaultTitle}
- aria-label="Widget name"
+ aria-label={t('widgetName')}
className="min-w-0 flex-1 rounded-md bg-transparent px-1 py-0.5 text-sm font-semibold tracking-tight text-foreground outline-none placeholder:text-muted-foreground/60 focus:bg-accent/50"
/>
) : (
@@ -67,7 +70,7 @@ export default function WidgetFrame({
<PopoverTrigger asChild>
<button
type="button"
- title="Widget settings"
+ title={t('widgetSettings')}
className="rounded p-0.5 text-muted-foreground/60 hover:text-foreground"
>
<SlidersHorizontal className="size-4" />
@@ -83,7 +86,7 @@ export default function WidgetFrame({
<DropdownMenuTrigger asChild>
<button
type="button"
- title="Widget options"
+ title={t('widgetOptions')}
className="rounded p-0.5 text-muted-foreground/60 hover:text-foreground"
>
<MoreHorizontal className="size-4" />
@@ -91,7 +94,7 @@ export default function WidgetFrame({
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuItem variant="destructive" onClick={onRemove}>
- Remove widget
+ {t('removeWidget')}
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
diff --git a/apps/web/src/features/dashboards/components/WidgetGrid.tsx b/apps/web/src/features/dashboards/components/WidgetGrid.tsx
index a8bd789a..9b1d7858 100644
--- a/apps/web/src/features/dashboards/components/WidgetGrid.tsx
+++ b/apps/web/src/features/dashboards/components/WidgetGrid.tsx
@@ -1,5 +1,6 @@
import { useMemo } from 'react';
import GridLayout, { useContainerWidth, verticalCompactor, type Layout } from 'react-grid-layout';
+import { useTranslations } from 'next-intl';
import type { ProjectDetail } from '@/lib/api';
import { cn } from '@/lib/utils';
import {
@@ -30,6 +31,7 @@ export default function WidgetGrid({
editor: DashboardEditor;
editing: boolean;
}) {
+ const t = useTranslations('dashboards');
const { layout } = editor;
// useContainerWidth starts at a sane default width and refines it after mount,
// so the grid can render immediately — child charts always measure a nonzero
@@ -53,7 +55,7 @@ export default function WidgetGrid({
if (layout.length === 0) {
return (
<p className="rounded-lg border border-dashed py-16 text-center text-sm text-muted-foreground">
- No widgets yet. Add one to build this dashboard.
+ {t('noWidgets')}
</p>
);
}
diff --git a/apps/web/src/features/dashboards/components/widgets/ActivityFeedWidget.tsx b/apps/web/src/features/dashboards/components/widgets/ActivityFeedWidget.tsx
index 77ecb09f..e463986c 100644
--- a/apps/web/src/features/dashboards/components/widgets/ActivityFeedWidget.tsx
+++ b/apps/web/src/features/dashboards/components/widgets/ActivityFeedWidget.tsx
@@ -1,5 +1,6 @@
import { useMemo } from 'react';
import Link from 'next/link';
+import { useTranslations } from 'next-intl';
import { formatDateTime } from '@/utils/dates';
import type { ProjectDetail } from '@/lib/api';
import { issuePath } from '@/utils/paths';
@@ -8,31 +9,29 @@ import type { WidgetConfig } from '@/utils/dashboardWidgets';
import { Skeleton } from '@/components/ui/skeleton';
import { useActivityFeedQuery } from '../../services/analytics.service';
-// Short verb per activity action, plus comment. Each phrase ends where the issue
-// link follows, so a row reads "Ann changed the status of IAP-12". Enough to read
-// the feed at a glance; the full change detail lives on the issue page.
-const VERB: Record<string, string> = {
- created: 'created',
- title: 'renamed',
- description: 'updated the description of',
- status: 'changed the status of',
- assignee: 'changed the assignee of',
- priority: 'changed the priority of',
- type: 'changed the type of',
- start_date: 'changed the start date of',
- due_date: 'changed the due date of',
- label_add: 'added a label to',
- label_remove: 'removed a label from',
- field: 'updated a field on',
-};
+// The actions that get their own verb phrase, as messages under
+// `dashboards.activityFeed.verbs`. Each phrase ends where the issue link follows,
+// so a row reads "Ann changed the status of IAP-12". Enough to read the feed at a
+// glance; the full change detail lives on the issue page. Anything else falls back
+// to `verbs.other`.
+const VERB_ACTIONS = [
+ 'created',
+ 'title',
+ 'description',
+ 'status',
+ 'assignee',
+ 'priority',
+ 'type',
+ 'start_date',
+ 'due_date',
+ 'label_add',
+ 'label_remove',
+ 'field',
+] as const;
-export const ACTION_FILTER: { value: string; label: string }[] = [
- { value: 'all', label: 'All activity' },
- { value: 'status', label: 'Status changes' },
- { value: 'assignee', label: 'Assignments' },
- { value: 'priority', label: 'Priority' },
- { value: 'created', label: 'Created' },
-];
+// The action kinds the feed can be narrowed to. Their labels are messages under
+// `dashboards.activityFeed.actions`.
+export const ACTION_FILTER = ['all', 'status', 'assignee', 'priority', 'created'] as const;
// The resolved issue ids travel in the request's query string, so a broad filter on
// a large project would build a URL past what proxies accept. Scope the feed to the
@@ -54,6 +53,7 @@ export default function ActivityFeedWidget({
project: ProjectDetail;
config: WidgetConfig;
}) {
+ const t = useTranslations('dashboards.activityFeed');
const filters: FilterSet = config.filters ?? EMPTY_FILTER_SET;
const action = config.action ?? null;
const limit = config.limit ?? 20;
@@ -73,16 +73,21 @@ export default function ActivityFeedWidget({
const { data, isLoading } = useActivityFeedQuery(projectKey, { action, issueIds, limit });
const items = data?.items ?? [];
- const actionLabel =
- ACTION_FILTER.find((o) => o.value === (action ?? 'all'))?.label ?? 'All activity';
- const filterCount = filters.conditions.length;
+ const selected = ACTION_FILTER.find((o) => o === (action ?? 'all')) ?? 'all';
const caption = [
- actionLabel,
- isActiveFilterSet(filters) ? `${filterCount} filter${filterCount === 1 ? '' : 's'}` : null,
+ t(`actions.${selected}`),
+ isActiveFilterSet(filters) ? t('filterCount', { count: filters.conditions.length }) : null,
]
.filter(Boolean)
.join(' · ');
+ // A comment carries no action; an action outside the listed ones reads as a
+ // generic update.
+ function verb(kind: string, action: string | null) {
+ if (kind === 'comment') return t('verbs.comment');
+ return t(`verbs.${VERB_ACTIONS.find((v) => v === action) ?? 'other'}`);
+ }
+
function feed() {
if (isLoading) {
return (
@@ -94,11 +99,7 @@ export default function ActivityFeedWidget({
);
}
if (items.length === 0) {
- return (
- <p className="py-6 text-center text-sm text-muted-foreground">
- No activity matches this filter.
- </p>
- );
+ return <p className="py-6 text-center text-sm text-muted-foreground">{t('empty')}</p>;
}
return (
<ul className="space-y-2">
@@ -106,10 +107,8 @@ export default function ActivityFeedWidget({
<li key={a.id} className="flex items-start gap-2 text-sm">
<span className="mt-1.5 size-1.5 shrink-0 rounded-full bg-muted-foreground/40" />
<div className="min-w-0 flex-1">
- <span className="text-foreground/80">{a.actorName ?? 'Someone'}</span>{' '}
- <span className="text-muted-foreground">
- {a.kind === 'comment' ? 'commented on' : (VERB[a.action ?? ''] ?? 'updated')}
- </span>{' '}
+ <span className="text-foreground/80">{a.actorName ?? t('someone')}</span>{' '}
+ <span className="text-muted-foreground">{verb(a.kind, a.action)}</span>{' '}
<Link href={issuePath(projectKey, a.issueSequence)} className="hover:underline">
{projectKey}-{a.issueSequence}
</Link>
diff --git a/apps/web/src/features/dashboards/components/widgets/ActivityFeedWidgetSettings.tsx b/apps/web/src/features/dashboards/components/widgets/ActivityFeedWidgetSettings.tsx
index 85ba88a9..b5e7ce50 100644
--- a/apps/web/src/features/dashboards/components/widgets/ActivityFeedWidgetSettings.tsx
+++ b/apps/web/src/features/dashboards/components/widgets/ActivityFeedWidgetSettings.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import { useShell } from '@/context/shellContext';
import { EMPTY_FILTER_SET, type FilterSet } from '@/utils/filters';
import type { WidgetConfig } from '@/utils/dashboardWidgets';
@@ -20,6 +21,7 @@ export default function ActivityFeedWidgetSettings({
config: WidgetConfig;
onConfigChange: (config: WidgetConfig) => void;
}) {
+ const t = useTranslations('dashboards.activityFeed');
const { project, customFields } = useShell();
const filters: FilterSet = config.filters ?? EMPTY_FILTER_SET;
const action = config.action ?? null;
@@ -35,9 +37,9 @@ export default function ActivityFeedWidgetSettings({
<SelectValue />
</SelectTrigger>
<SelectContent>
- {ACTION_FILTER.map((o) => (
- <SelectItem key={o.value} value={o.value}>
- {o.label}
+ {ACTION_FILTER.map((option) => (
+ <SelectItem key={option} value={option}>
+ {t(`actions.${option}`)}
</SelectItem>
))}
</SelectContent>
diff --git a/apps/web/src/features/dashboards/components/widgets/AgentHealthWidget.tsx b/apps/web/src/features/dashboards/components/widgets/AgentHealthWidget.tsx
index 23ba62d3..bad1c516 100644
--- a/apps/web/src/features/dashboards/components/widgets/AgentHealthWidget.tsx
+++ b/apps/web/src/features/dashboards/components/widgets/AgentHealthWidget.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import type { WidgetConfig } from '@/utils/dashboardWidgets';
import { Skeleton } from '@/components/ui/skeleton';
import { useAgentRunStatsQuery } from '../../services/analytics.service';
@@ -13,6 +14,7 @@ export default function AgentHealthWidget({
projectKey: string;
config: WidgetConfig;
}) {
+ const t = useTranslations('dashboards');
const days = config.days ?? 30;
const { data, isLoading } = useAgentRunStatsQuery(projectKey, days);
@@ -23,19 +25,23 @@ export default function AgentHealthWidget({
return (
<div className="space-y-2">
- <p className="text-xs text-muted-foreground">Last {days} days</p>
+ <p className="text-xs text-muted-foreground">{t('lastDays', { days })}</p>
{data.total === 0 ? (
- <p className="py-3 text-sm text-muted-foreground">No agent runs.</p>
+ <p className="py-3 text-sm text-muted-foreground">{t('agentHealth.empty')}</p>
) : (
<>
<div className="text-4xl font-semibold tracking-tight tabular-nums">
{rate == null ? '—' : `${rate}%`}
</div>
- <p className="text-xs text-muted-foreground">success rate</p>
+ <p className="text-xs text-muted-foreground">{t('agentHealth.successRate')}</p>
<div className="flex flex-wrap gap-x-3 gap-y-0.5 text-xs text-muted-foreground tabular-nums">
- <span>{data.total} runs</span>
- {data.failed > 0 && <span className="text-destructive">{data.failed} failed</span>}
- {data.pending > 0 && <span>{data.pending} queued</span>}
+ <span>{t('agentHealth.runs', { count: data.total })}</span>
+ {data.failed > 0 && (
+ <span className="text-destructive">
+ {t('agentHealth.failed', { count: data.failed })}
+ </span>
+ )}
+ {data.pending > 0 && <span>{t('agentHealth.queued', { count: data.pending })}</span>}
</div>
</>
)}
diff --git a/apps/web/src/features/dashboards/components/widgets/AgentRunsWidget.tsx b/apps/web/src/features/dashboards/components/widgets/AgentRunsWidget.tsx
index c338780b..f62d6486 100644
--- a/apps/web/src/features/dashboards/components/widgets/AgentRunsWidget.tsx
+++ b/apps/web/src/features/dashboards/components/widgets/AgentRunsWidget.tsx
@@ -1,4 +1,5 @@
import Link from 'next/link';
+import { useTranslations } from 'next-intl';
import { formatDateTime } from '@/utils/dates';
import { issuePath } from '@/utils/paths';
import type { AgentRunFeedItem } from '@/lib/api';
@@ -7,12 +8,9 @@ import { Badge } from '@/components/ui/badge';
import { Skeleton } from '@/components/ui/skeleton';
import { useAgentRunsQuery } from '../../services/analytics.service';
-export const STATUS_FILTER: { value: string; label: string }[] = [
- { value: 'all', label: 'All runs' },
- { value: 'failed', label: 'Failed' },
- { value: 'pending', label: 'Queued' },
- { value: 'success', label: 'Succeeded' },
-];
+// The run statuses the feed can be narrowed to. Their labels are messages under
+// `dashboards.agentRuns.filters`.
+export const STATUS_FILTER = ['all', 'failed', 'pending', 'success'] as const;
function statusVariant(status: AgentRunFeedItem['status']) {
switch (status) {
@@ -25,13 +23,6 @@ function statusVariant(status: AgentRunFeedItem['status']) {
}
}
-function triggerLabel(trigger: AgentRunFeedItem['trigger']): string {
- if (trigger === 'mention') return 'ran on mention in';
- if (trigger === 'delegation') return 'ran on delegation of';
- if (trigger === 'manual') return 'ran manually';
- return 'ran on schedule';
-}
-
// Project-wide feed of AI agent runs, newest first, optionally narrowed to one
// status. Issue-triggered rows link to the issue; scheduled rows show their
// trigger. A failed run shows its error.
@@ -42,12 +33,13 @@ export default function AgentRunsWidget({
projectKey: string;
config: WidgetConfig;
}) {
+ const t = useTranslations('dashboards.agentRuns');
const status = config.runStatus ?? null;
const limit = config.limit ?? 20;
const { data, isLoading } = useAgentRunsQuery(projectKey, { status, limit });
const items = data ?? [];
- const caption = STATUS_FILTER.find((o) => o.value === (status ?? 'all'))?.label ?? 'All runs';
+ const caption = t(`filters.${STATUS_FILTER.find((o) => o === (status ?? 'all')) ?? 'all'}`);
function feed() {
if (isLoading) {
@@ -60,18 +52,18 @@ export default function AgentRunsWidget({
);
}
if (items.length === 0) {
- return <p className="py-6 text-center text-sm text-muted-foreground">No agent runs yet.</p>;
+ return <p className="py-6 text-center text-sm text-muted-foreground">{t('empty')}</p>;
}
return (
<ul className="space-y-2">
{items.map((r) => (
<li key={r.id} className="flex items-start gap-2 text-sm">
- <Badge variant={statusVariant(r.status)} className="mt-0.5 shrink-0 capitalize">
- {r.status === 'pending' ? 'queued' : r.status}
+ <Badge variant={statusVariant(r.status)} className="mt-0.5 shrink-0">
+ {t(`status.${r.status}`)}
</Badge>
<div className="min-w-0 flex-1">
<span className="text-foreground/80">{r.agentName}</span>{' '}
- <span className="text-muted-foreground">{triggerLabel(r.trigger)}</span>{' '}
+ <span className="text-muted-foreground">{t(`trigger.${r.trigger}`)}</span>{' '}
{r.issueId != null && r.issueSequence != null && (
<Link href={issuePath(projectKey, r.issueSequence)} className="hover:underline">
{projectKey}-{r.issueSequence}
diff --git a/apps/web/src/features/dashboards/components/widgets/AgentRunsWidgetSettings.tsx b/apps/web/src/features/dashboards/components/widgets/AgentRunsWidgetSettings.tsx
index 4509dbbd..628a8ed9 100644
--- a/apps/web/src/features/dashboards/components/widgets/AgentRunsWidgetSettings.tsx
+++ b/apps/web/src/features/dashboards/components/widgets/AgentRunsWidgetSettings.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import type { WidgetConfig } from '@/utils/dashboardWidgets';
import {
Select,
@@ -17,6 +18,7 @@ export default function AgentRunsWidgetSettings({
config: WidgetConfig;
onConfigChange: (config: WidgetConfig) => void;
}) {
+ const t = useTranslations('dashboards.agentRuns');
const status = config.runStatus ?? null;
const limit = config.limit ?? 20;
return (
@@ -31,9 +33,9 @@ export default function AgentRunsWidgetSettings({
<SelectValue />
</SelectTrigger>
<SelectContent>
- {STATUS_FILTER.map((o) => (
- <SelectItem key={o.value} value={o.value}>
- {o.label}
+ {STATUS_FILTER.map((option) => (
+ <SelectItem key={option} value={option}>
+ {t(`filters.${option}`)}
</SelectItem>
))}
</SelectContent>
diff --git a/apps/web/src/features/dashboards/components/widgets/AgentWorkloadWidget.tsx b/apps/web/src/features/dashboards/components/widgets/AgentWorkloadWidget.tsx
index cc43835f..5a1acd04 100644
--- a/apps/web/src/features/dashboards/components/widgets/AgentWorkloadWidget.tsx
+++ b/apps/web/src/features/dashboards/components/widgets/AgentWorkloadWidget.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import { Skeleton } from '@/components/ui/skeleton';
import { useAgentWorkloadQuery } from '../../services/analytics.service';
@@ -5,7 +6,12 @@ import { useAgentWorkloadQuery } from '../../services/analytics.service';
// lifetime run outcomes (success over total). Rows are ordered by delegated load. No
// per-widget config; it always shows every agent in the project.
export default function AgentWorkloadWidget({ projectKey }: { projectKey: string }) {
+ const t = useTranslations('dashboards.agentWorkload');
const { data, isLoading } = useAgentWorkloadQuery(projectKey);
+ // The API types the agent kind as a plain string; one the messages do not carry
+ // is shown as it came.
+ const kindLabel = (kind: string) =>
+ kind === 'external' || kind === 'internal' ? t(`kind.${kind}`) : kind;
const items = data ?? [];
if (isLoading) {
@@ -19,18 +25,16 @@ export default function AgentWorkloadWidget({ projectKey }: { projectKey: string
}
if (items.length === 0) {
- return (
- <p className="py-6 text-center text-sm text-muted-foreground">No agents in this project.</p>
- );
+ return <p className="py-6 text-center text-sm text-muted-foreground">{t('empty')}</p>;
}
return (
<table className="w-full text-sm">
<thead>
<tr className="border-b text-left text-xs text-muted-foreground">
- <th className="pb-1.5 font-medium">Agent</th>
- <th className="pb-1.5 text-right font-medium">Delegated</th>
- <th className="pb-1.5 text-right font-medium">Runs</th>
+ <th className="pb-1.5 font-medium">{t('agent')}</th>
+ <th className="pb-1.5 text-right font-medium">{t('delegated')}</th>
+ <th className="pb-1.5 text-right font-medium">{t('runs')}</th>
</tr>
</thead>
<tbody className="divide-y divide-border/50">
@@ -38,7 +42,7 @@ export default function AgentWorkloadWidget({ projectKey }: { projectKey: string
<tr key={a.agentId}>
<td className="min-w-0 py-1.5">
<span className="block truncate">{a.agentName}</span>
- <span className="text-xs text-muted-foreground capitalize">{a.kind}</span>
+ <span className="text-xs text-muted-foreground">{kindLabel(a.kind)}</span>
</td>
<td className="py-1.5 text-right tabular-nums">{a.delegatedOpen}</td>
<td className="py-1.5 text-right tabular-nums">
@@ -46,7 +50,9 @@ export default function AgentWorkloadWidget({ projectKey }: { projectKey: string
{a.runsSuccess}/{a.runsTotal}
</span>
{a.runsFailed > 0 && (
- <span className="ml-1 text-xs text-destructive">{a.runsFailed} failed</span>
+ <span className="ml-1 text-xs text-destructive">
+ {t('failed', { count: a.runsFailed })}
+ </span>
)}
</td>
</tr>
diff --git a/apps/web/src/features/dashboards/components/widgets/BreakdownWidget.tsx b/apps/web/src/features/dashboards/components/widgets/BreakdownWidget.tsx
index d4813d7b..7cb2d1fa 100644
--- a/apps/web/src/features/dashboards/components/widgets/BreakdownWidget.tsx
+++ b/apps/web/src/features/dashboards/components/widgets/BreakdownWidget.tsx
@@ -1,16 +1,13 @@
import { Cell, Pie, PieChart } from 'recharts';
+import { useTranslations } from 'next-intl';
import type { BreakdownBy, WidgetConfig } from '@/utils/dashboardWidgets';
import { Skeleton } from '@/components/ui/skeleton';
import { ChartContainer, ChartTooltip, ChartTooltipContent } from '@/components/ui/chart';
import { useBreakdownQuery } from '../../services/analytics.service';
-export const BY_OPTIONS: { value: BreakdownBy; label: string }[] = [
- { value: 'status', label: 'State' },
- { value: 'priority', label: 'Priority' },
- { value: 'type', label: 'Type' },
- { value: 'assignee', label: 'Assignee' },
- { value: 'delegate', label: 'Delegate' },
-];
+// The dimensions the counts can be grouped by, in picker order. Their labels are
+// messages under `dashboards.breakdown.by`.
+export const BY_OPTIONS: BreakdownBy[] = ['status', 'priority', 'type', 'assignee', 'delegate'];
// Fallback slice colors for categories without their own color (priority,
// assignee). Status and type carry their entity color and use it directly.
@@ -35,6 +32,7 @@ export default function BreakdownWidget({
projectKey: string;
config: WidgetConfig;
}) {
+ const t = useTranslations('dashboards.breakdown');
const by = config.by ?? 'status';
const { data, isLoading } = useBreakdownQuery(projectKey, by);
// An empty status bucket is still a board column, so keep it; other dimensions drop zeros.
@@ -49,7 +47,7 @@ export default function BreakdownWidget({
function chart() {
if (isLoading) return <Skeleton className="mx-auto h-[160px] w-[160px] rounded-full" />;
if (total === 0) {
- return <p className="py-10 text-center text-sm text-muted-foreground">No issues yet.</p>;
+ return <p className="py-10 text-center text-sm text-muted-foreground">{t('empty')}</p>;
}
return (
<div className="flex flex-col items-center gap-3 sm:flex-row">
@@ -78,9 +76,7 @@ export default function BreakdownWidget({
return (
<div className="space-y-3">
- <p className="text-xs text-muted-foreground">
- By {BY_OPTIONS.find((o) => o.value === by)?.label.toLowerCase() ?? by}
- </p>
+ <p className="text-xs text-muted-foreground">{t(`caption.${by}`)}</p>
{chart()}
</div>
);
diff --git a/apps/web/src/features/dashboards/components/widgets/BreakdownWidgetSettings.tsx b/apps/web/src/features/dashboards/components/widgets/BreakdownWidgetSettings.tsx
index 51501324..edb151dc 100644
--- a/apps/web/src/features/dashboards/components/widgets/BreakdownWidgetSettings.tsx
+++ b/apps/web/src/features/dashboards/components/widgets/BreakdownWidgetSettings.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import { cn } from '@/lib/utils';
import type { WidgetConfig } from '@/utils/dashboardWidgets';
import { BY_OPTIONS } from './BreakdownWidget';
@@ -10,22 +11,23 @@ export default function BreakdownWidgetSettings({
config: WidgetConfig;
onConfigChange: (config: WidgetConfig) => void;
}) {
+ const t = useTranslations('dashboards.breakdown');
const by = config.by ?? 'status';
return (
<div className="flex flex-wrap gap-1">
- {BY_OPTIONS.map((o) => (
+ {BY_OPTIONS.map((option) => (
<button
- key={o.value}
+ key={option}
type="button"
- onClick={() => onConfigChange({ by: o.value })}
+ onClick={() => onConfigChange({ by: option })}
className={cn(
'rounded-md px-2 py-0.5 text-xs transition-colors',
- by === o.value
+ by === option
? 'bg-secondary font-medium text-foreground'
: 'text-muted-foreground hover:bg-accent hover:text-foreground',
)}
>
- {o.label}
+ {t(`by.${option}`)}
</button>
))}
</div>
diff --git a/apps/web/src/features/dashboards/components/widgets/LimitSelect.tsx b/apps/web/src/features/dashboards/components/widgets/LimitSelect.tsx
index 8b82ffd1..40263ffc 100644
--- a/apps/web/src/features/dashboards/components/widgets/LimitSelect.tsx
+++ b/apps/web/src/features/dashboards/components/widgets/LimitSelect.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import {
Select,
SelectContent,
@@ -16,6 +17,7 @@ export default function LimitSelect({
value: number;
onChange: (limit: number) => void;
}) {
+ const t = useTranslations('dashboards');
return (
<Select value={String(value)} onValueChange={(v) => onChange(Number(v))}>
<SelectTrigger size="sm" className="w-[110px]">
@@ -24,7 +26,7 @@ export default function LimitSelect({
<SelectContent>
{LIMIT_OPTIONS.map((n) => (
<SelectItem key={n} value={String(n)}>
- Show {n}
+ {t('showRows', { count: n })}
</SelectItem>
))}
</SelectContent>
diff --git a/apps/web/src/features/dashboards/components/widgets/PulseWidget.tsx b/apps/web/src/features/dashboards/components/widgets/PulseWidget.tsx
index 5d048bec..a2878905 100644
--- a/apps/web/src/features/dashboards/components/widgets/PulseWidget.tsx
+++ b/apps/web/src/features/dashboards/components/widgets/PulseWidget.tsx
@@ -1,5 +1,6 @@
import { useEffect, useMemo, useRef, useState } from 'react';
import { createPortal } from 'react-dom';
+import { useTranslations } from 'next-intl';
import { cn } from '@/lib/utils';
import type { PulseUnit } from '@/lib/api';
import type { WidgetConfig } from '@/utils/dashboardWidgets';
@@ -14,13 +15,10 @@ const FILL_COLORS = ['#9be9a8', '#40c463', '#30a14e', '#216e39'];
// Per-unit heatmap geometry. `rows` cells stack per column (a day column is 24
// hours, a week column is 7 days, a week is one cell); cell/gap size the grid,
// maxColumns matches the server cap.
-const GRID: Record<
- PulseUnit,
- { cell: number; gap: number; rows: number; maxColumns: number; unitLabel: string }
-> = {
- hour: { cell: 11, gap: 2, rows: 24, maxColumns: 140, unitLabel: 'By hour' },
- day: { cell: 15, gap: 3, rows: 7, maxColumns: 160, unitLabel: 'By day' },
- week: { cell: 15, gap: 3, rows: 4, maxColumns: 130, unitLabel: 'By week' },
+const GRID: Record<PulseUnit, { cell: number; gap: number; rows: number; maxColumns: number }> = {
+ hour: { cell: 11, gap: 2, rows: 24, maxColumns: 140 },
+ day: { cell: 15, gap: 3, rows: 7, maxColumns: 160 },
+ week: { cell: 15, gap: 3, rows: 4, maxColumns: 130 },
};
// Fetch a few columns beyond what is drawn so a small resize can grow the graph
@@ -47,6 +45,7 @@ export default function PulseWidget({
projectKey: string;
config: WidgetConfig;
}) {
+ const t = useTranslations('dashboards.pulse');
const unit = config.granularity ?? 'day';
const geo = GRID[unit];
const step = geo.cell + geo.gap;
@@ -93,7 +92,7 @@ export default function PulseWidget({
return (
<div className="space-y-3">
- <p className="text-xs text-muted-foreground">{geo.unitLabel}</p>
+ <p className="text-xs text-muted-foreground">{t(`caption.${unit}`)}</p>
{/* Full-width measuring wrapper; the grid draws only what fits (no scroll). */}
<div ref={containerRef} className="w-full overflow-hidden">
@@ -135,15 +134,15 @@ export default function PulseWidget({
<div className="flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground">
<span>
- {total} {total === 1 ? 'event' : 'events'} · {active} active
+ {t('events', { count: total })} · {t('active', { count: active })}
</span>
<span className="flex items-center gap-1">
- Less
+ {t('less')}
<span className="size-3 rounded-[2px] bg-muted" />
{FILL_COLORS.map((c) => (
<span key={c} className="size-3 rounded-[2px]" style={{ backgroundColor: c }} />
))}
- More
+ {t('more')}
</span>
</div>
@@ -157,7 +156,7 @@ export default function PulseWidget({
>
<span className="font-medium">{tip.count}</span>{' '}
<span className="text-muted-foreground">
- event{tip.count === 1 ? '' : 's'} · {tip.label}
+ {t('eventNoun', { count: tip.count })} · {tip.label}
</span>
</div>,
document.body,
diff --git a/apps/web/src/features/dashboards/components/widgets/PulseWidgetSettings.tsx b/apps/web/src/features/dashboards/components/widgets/PulseWidgetSettings.tsx
index c9a1d8f3..d951e67d 100644
--- a/apps/web/src/features/dashboards/components/widgets/PulseWidgetSettings.tsx
+++ b/apps/web/src/features/dashboards/components/widgets/PulseWidgetSettings.tsx
@@ -1,12 +1,9 @@
+import { useTranslations } from 'next-intl';
import { cn } from '@/lib/utils';
import type { PulseUnit } from '@/lib/api';
import type { WidgetConfig } from '@/utils/dashboardWidgets';
-const UNIT_OPTIONS: { value: PulseUnit; label: string }[] = [
- { value: 'hour', label: 'Hours' },
- { value: 'day', label: 'Days' },
- { value: 'week', label: 'Weeks' },
-];
+const UNIT_OPTIONS: PulseUnit[] = ['hour', 'day', 'week'];
// The bucket unit (hour/day/week) the heatmap cells count over.
export default function PulseWidgetSettings({
@@ -16,22 +13,23 @@ export default function PulseWidgetSettings({
config: WidgetConfig;
onConfigChange: (config: WidgetConfig) => void;
}) {
+ const t = useTranslations('dashboards.pulse');
const unit = config.granularity ?? 'day';
return (
<div className="flex gap-1">
- {UNIT_OPTIONS.map((o) => (
+ {UNIT_OPTIONS.map((option) => (
<button
- key={o.value}
+ key={option}
type="button"
- onClick={() => onConfigChange({ granularity: o.value })}
+ onClick={() => onConfigChange({ granularity: option })}
className={cn(
'rounded-md px-2 py-0.5 text-xs transition-colors',
- unit === o.value
+ unit === option
? 'bg-secondary font-medium text-foreground'
: 'text-muted-foreground hover:bg-accent hover:text-foreground',
)}
>
- {o.label}
+ {t(`unit.${option}`)}
</button>
))}
</div>
diff --git a/apps/web/src/features/dashboards/components/widgets/RecentIssuesWidget.tsx b/apps/web/src/features/dashboards/components/widgets/RecentIssuesWidget.tsx
index e4df98ef..b0d7483c 100644
--- a/apps/web/src/features/dashboards/components/widgets/RecentIssuesWidget.tsx
+++ b/apps/web/src/features/dashboards/components/widgets/RecentIssuesWidget.tsx
@@ -1,9 +1,10 @@
import { useMemo } from 'react';
import Link from 'next/link';
+import { useTranslations } from 'next-intl';
import { useShell } from '@/context/shellContext';
import { issuePath } from '@/utils/paths';
import { formatShortDate } from '@/utils/dates';
-import { priorityLabel } from '@/utils/fieldOptions';
+import { usePriorityLabel } from '@/hooks/usePriorityLabel';
import { EMPTY_FILTER_SET, applyFilters, isActiveFilterSet, type FilterSet } from '@/utils/filters';
import type { WidgetConfig } from '@/utils/dashboardWidgets';
import { Skeleton } from '@/components/ui/skeleton';
@@ -21,6 +22,8 @@ export default function RecentIssuesWidget({
projectKey: string;
config: WidgetConfig;
}) {
+ const t = useTranslations('dashboards.recentIssues');
+ const priorityLabel = usePriorityLabel();
const { project } = useShell();
const sort = config.sort ?? 'created';
const limit = config.limit ?? 10;
@@ -44,10 +47,9 @@ export default function RecentIssuesWidget({
if (!project) return <Skeleton className="h-40 w-full" />;
- const filterCount = filters.conditions.length;
const caption = [
- sort === 'updated' ? 'Recently updated' : 'Newest first',
- isActiveFilterSet(filters) ? `${filterCount} filter${filterCount === 1 ? '' : 's'}` : null,
+ sort === 'updated' ? t('captionUpdated') : t('captionCreated'),
+ isActiveFilterSet(filters) ? t('filterCount', { count: filters.conditions.length }) : null,
]
.filter(Boolean)
.join(' · ');
@@ -57,9 +59,7 @@ export default function RecentIssuesWidget({
<p className="text-xs text-muted-foreground">{caption}</p>
{issues.length === 0 ? (
- <p className="py-6 text-center text-sm text-muted-foreground">
- No issues match this filter.
- </p>
+ <p className="py-6 text-center text-sm text-muted-foreground">{t('empty')}</p>
) : (
<ul className="space-y-0.5">
{issues.map((issue) => {
diff --git a/apps/web/src/features/dashboards/components/widgets/RecentIssuesWidgetSettings.tsx b/apps/web/src/features/dashboards/components/widgets/RecentIssuesWidgetSettings.tsx
index 54f6ac56..7225a9ef 100644
--- a/apps/web/src/features/dashboards/components/widgets/RecentIssuesWidgetSettings.tsx
+++ b/apps/web/src/features/dashboards/components/widgets/RecentIssuesWidgetSettings.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import { cn } from '@/lib/utils';
import { useShell } from '@/context/shellContext';
import { EMPTY_FILTER_SET, type FilterSet } from '@/utils/filters';
@@ -5,10 +6,7 @@ import type { WidgetConfig } from '@/utils/dashboardWidgets';
import FilterBar from '@/components/layout/FilterBar';
import LimitSelect from './LimitSelect';
-const SORTS: { value: 'created' | 'updated'; label: string }[] = [
- { value: 'created', label: 'Newest' },
- { value: 'updated', label: 'Updated' },
-];
+const SORTS = ['created', 'updated'] as const;
// The sort order, the row count and the board filter set.
export default function RecentIssuesWidgetSettings({
@@ -18,6 +16,7 @@ export default function RecentIssuesWidgetSettings({
config: WidgetConfig;
onConfigChange: (config: WidgetConfig) => void;
}) {
+ const t = useTranslations('dashboards.recentIssues');
const { project, customFields } = useShell();
const sort = config.sort ?? 'created';
const limit = config.limit ?? 10;
@@ -27,19 +26,19 @@ export default function RecentIssuesWidgetSettings({
<div className="space-y-2">
<div className="flex items-center gap-2">
<div className="flex gap-1">
- {SORTS.map((s) => (
+ {SORTS.map((option) => (
<button
- key={s.value}
+ key={option}
type="button"
- onClick={() => onConfigChange({ sort: s.value })}
+ onClick={() => onConfigChange({ sort: option })}
className={cn(
'rounded-md px-2 py-0.5 text-xs transition-colors',
- sort === s.value
+ sort === option
? 'bg-secondary font-medium text-foreground'
: 'text-muted-foreground hover:bg-accent hover:text-foreground',
)}
>
- {s.label}
+ {t(`sort.${option}`)}
</button>
))}
</div>
diff --git a/apps/web/src/features/dashboards/components/widgets/ThroughputWidget.tsx b/apps/web/src/features/dashboards/components/widgets/ThroughputWidget.tsx
index a45a7dd3..ff5f4286 100644
--- a/apps/web/src/features/dashboards/components/widgets/ThroughputWidget.tsx
+++ b/apps/web/src/features/dashboards/components/widgets/ThroughputWidget.tsx
@@ -1,5 +1,6 @@
import { Bar, BarChart, CartesianGrid, XAxis } from 'recharts';
import { format, parseISO } from 'date-fns';
+import { useTranslations } from 'next-intl';
import type { WidgetConfig } from '@/utils/dashboardWidgets';
import { Skeleton } from '@/components/ui/skeleton';
import {
@@ -12,10 +13,7 @@ import {
} from '@/components/ui/chart';
import { useThroughputQuery } from '../../services/analytics.service';
-const CHART_CONFIG: ChartConfig = {
- created: { label: 'Created', color: '#6366f1' },
- closed: { label: 'Closed', color: '#22c55e' },
-};
+const SERIES_COLOR = { created: '#6366f1', closed: '#22c55e' };
// Created vs closed issues per week, as grouped bars. "Closed" is a status change
// into a completed column (from the activity log); see the analytics store. The
@@ -28,22 +26,23 @@ export default function ThroughputWidget({
projectKey: string;
config: WidgetConfig;
}) {
+ const t = useTranslations('dashboards.throughput');
const weeks = config.weeks ?? 12;
const { data, isLoading } = useThroughputQuery(projectKey, weeks);
+ const chartConfig: ChartConfig = {
+ created: { label: t('created'), color: SERIES_COLOR.created },
+ closed: { label: t('closed'), color: SERIES_COLOR.closed },
+ };
const chartData = (data ?? []).map((w) => ({ ...w, label: format(parseISO(w.week), 'MMM d') }));
function chart() {
if (isLoading) return <Skeleton className="h-[180px] w-full" />;
if (chartData.length === 0) {
- return (
- <p className="py-10 text-center text-sm text-muted-foreground">
- No activity in this period.
- </p>
- );
+ return <p className="py-10 text-center text-sm text-muted-foreground">{t('empty')}</p>;
}
return (
- <ChartContainer config={CHART_CONFIG} className="h-[180px] w-full">
+ <ChartContainer config={chartConfig} className="h-[180px] w-full">
<BarChart data={chartData}>
<CartesianGrid vertical={false} />
<XAxis dataKey="label" tickLine={false} axisLine={false} tickMargin={8} fontSize={11} />
@@ -58,7 +57,7 @@ export default function ThroughputWidget({
return (
<div className="space-y-3">
- <p className="text-xs text-muted-foreground">Last {weeks} weeks</p>
+ <p className="text-xs text-muted-foreground">{t('lastWeeks', { weeks })}</p>
{chart()}
</div>
);
diff --git a/apps/web/src/features/dashboards/components/widgets/ThroughputWidgetSettings.tsx b/apps/web/src/features/dashboards/components/widgets/ThroughputWidgetSettings.tsx
index 7cf0d796..b3adaedf 100644
--- a/apps/web/src/features/dashboards/components/widgets/ThroughputWidgetSettings.tsx
+++ b/apps/web/src/features/dashboards/components/widgets/ThroughputWidgetSettings.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import type { WidgetConfig } from '@/utils/dashboardWidgets';
import {
Select,
@@ -17,6 +18,7 @@ export default function ThroughputWidgetSettings({
config: WidgetConfig;
onConfigChange: (config: WidgetConfig) => void;
}) {
+ const t = useTranslations('dashboards.throughput');
const weeks = config.weeks ?? 12;
return (
<Select value={String(weeks)} onValueChange={(v) => onConfigChange({ weeks: Number(v) })}>
@@ -26,7 +28,7 @@ export default function ThroughputWidgetSettings({
<SelectContent>
{WEEK_OPTIONS.map((w) => (
<SelectItem key={w} value={String(w)}>
- Last {w} weeks
+ {t('lastWeeks', { weeks: w })}
</SelectItem>
))}
</SelectContent>
diff --git a/apps/web/src/features/dashboards/components/widgets/WebhookHealthWidget.tsx b/apps/web/src/features/dashboards/components/widgets/WebhookHealthWidget.tsx
index d3c77004..b03d35b8 100644
--- a/apps/web/src/features/dashboards/components/widgets/WebhookHealthWidget.tsx
+++ b/apps/web/src/features/dashboards/components/widgets/WebhookHealthWidget.tsx
@@ -1,4 +1,5 @@
import { AlertTriangle } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { WidgetConfig } from '@/utils/dashboardWidgets';
import { Skeleton } from '@/components/ui/skeleton';
import { useWebhookStatsQuery } from '../../services/analytics.service';
@@ -14,6 +15,7 @@ export default function WebhookHealthWidget({
projectKey: string;
config: WidgetConfig;
}) {
+ const t = useTranslations('dashboards');
const days = config.days ?? 30;
const { data, isLoading } = useWebhookStatsQuery(projectKey, days);
@@ -21,18 +23,22 @@ export default function WebhookHealthWidget({
return (
<div className="space-y-2">
- <p className="text-xs text-muted-foreground">Last {days} days</p>
+ <p className="text-xs text-muted-foreground">{t('lastDays', { days })}</p>
<div className="text-4xl font-semibold tracking-tight tabular-nums">{data.total}</div>
- <p className="text-xs text-muted-foreground">deliveries</p>
+ <p className="text-xs text-muted-foreground">{t('webhookHealth.deliveries')}</p>
<div className="flex flex-wrap gap-x-3 gap-y-0.5 text-xs text-muted-foreground tabular-nums">
- {data.failed > 0 && <span className="text-destructive">{data.failed} failed</span>}
- {data.pending > 0 && <span>{data.pending} pending</span>}
- {data.failed === 0 && data.pending === 0 && <span>all delivered</span>}
+ {data.failed > 0 && (
+ <span className="text-destructive">
+ {t('webhookHealth.failed', { count: data.failed })}
+ </span>
+ )}
+ {data.pending > 0 && <span>{t('webhookHealth.pending', { count: data.pending })}</span>}
+ {data.failed === 0 && data.pending === 0 && <span>{t('webhookHealth.allDelivered')}</span>}
</div>
{data.disabledWebhooks > 0 && (
<p className="flex items-center gap-1 text-xs text-destructive">
<AlertTriangle className="size-3.5 shrink-0" />
- {data.disabledWebhooks} disabled endpoint{data.disabledWebhooks === 1 ? '' : 's'}
+ {t('webhookHealth.disabled', { count: data.disabledWebhooks })}
</p>
)}
</div>
diff --git a/apps/web/src/features/dashboards/components/widgets/WidgetDaysSettings.tsx b/apps/web/src/features/dashboards/components/widgets/WidgetDaysSettings.tsx
index b27c2f24..3bcab178 100644
--- a/apps/web/src/features/dashboards/components/widgets/WidgetDaysSettings.tsx
+++ b/apps/web/src/features/dashboards/components/widgets/WidgetDaysSettings.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import type { WidgetConfig } from '@/utils/dashboardWidgets';
import {
Select,
@@ -17,6 +18,7 @@ export default function WidgetDaysSettings({
config: WidgetConfig;
onConfigChange: (config: WidgetConfig) => void;
}) {
+ const t = useTranslations('dashboards');
const days = config.days ?? 30;
return (
<Select value={String(days)} onValueChange={(v) => onConfigChange({ days: Number(v) })}>
@@ -26,7 +28,7 @@ export default function WidgetDaysSettings({
<SelectContent>
{DAYS_OPTIONS.map((n) => (
<SelectItem key={n} value={String(n)}>
- Last {n} days
+ {t('lastDays', { days: n })}
</SelectItem>
))}
</SelectContent>
diff --git a/apps/web/src/features/dashboards/hooks/useDashboardEditor.ts b/apps/web/src/features/dashboards/hooks/useDashboardEditor.ts
index b4a3bf35..1f67a729 100644
--- a/apps/web/src/features/dashboards/hooks/useDashboardEditor.ts
+++ b/apps/web/src/features/dashboards/hooks/useDashboardEditor.ts
@@ -1,9 +1,11 @@
import { useState } from 'react';
import { arrayMove } from '@dnd-kit/sortable';
+import { useTranslations } from 'next-intl';
import type { Dashboard } from '@/lib/api';
import {
- DEFAULT_DASHBOARD_LAYOUT,
createWidget,
+ defaultDashboardLayout,
+ type DefaultStatKey,
normalizeLayout,
type DashboardLayout,
type WidgetInstance,
@@ -27,6 +29,8 @@ export function useDashboardEditor(
activeDashboardId: number | null,
onSelectDashboard: (id: number | null) => void,
) {
+ const t = useTranslations('dashboards');
+ const defaultLayout = defaultDashboardLayout((key: DefaultStatKey) => t(`defaultWidgets.${key}`));
const createM = useCreateDashboard(projectKey);
const updateM = useUpdateDashboard(projectKey);
const deleteM = useDeleteDashboard(projectKey);
@@ -34,9 +38,7 @@ export function useDashboardEditor(
const active = dashboards.find((d) => d.id === activeDashboardId) ?? null;
const isVirtual = active == null;
- const baseLayout: DashboardLayout = active
- ? normalizeLayout(active.layout)
- : DEFAULT_DASHBOARD_LAYOUT;
+ const baseLayout: DashboardLayout = active ? normalizeLayout(active.layout) : defaultLayout;
// A draft is scoped to one dashboard (keyed by its id, or 'default' for the
// virtual one). Navigating to another dashboard changes the key, so the draft
@@ -84,7 +86,7 @@ export function useDashboardEditor(
// first one (from the default) when the virtual dashboard is on screen.
const save = async () => {
if (isVirtual) {
- const created = await createM.mutateAsync({ input: { name: 'Overview', layout } });
+ const created = await createM.mutateAsync({ input: { name: t('defaultName'), layout } });
setDraft(null);
onSelectDashboard(created.id);
} else {
@@ -97,7 +99,7 @@ export function useDashboardEditor(
const createDashboard = async (name: string) => {
const created = await createM.mutateAsync({
- input: { name, layout: DEFAULT_DASHBOARD_LAYOUT },
+ input: { name, layout: defaultLayout },
});
onSelectDashboard(created.id);
};
diff --git a/apps/web/src/features/dashboards/utils/widgetCatalog.tsx b/apps/web/src/features/dashboards/utils/widgetCatalog.tsx
index ed997640..a4cc12b4 100644
--- a/apps/web/src/features/dashboards/utils/widgetCatalog.tsx
+++ b/apps/web/src/features/dashboards/utils/widgetCatalog.tsx
@@ -12,75 +12,32 @@ import {
} from 'lucide-react';
import type { WidgetType } from '@/utils/dashboardWidgets';
-// Display metadata for each widget type: shown in the add-widget picker and used
-// as the fallback title on a widget with no custom title. Kept in the feature (it
-// carries lucide icon components) separate from the pure layout types in
-// @/utils/dashboardWidgets.
-export const WIDGET_META: Record<
- WidgetType,
- { label: string; description: string; icon: LucideIcon }
-> = {
- stat: {
- label: 'Number',
- description: 'Count of issues matching a filter',
- icon: Hash,
- },
- recent_issues: {
- label: 'Recent issues',
- description: 'Latest issues by created or updated time',
- icon: ListChecks,
- },
- activity_feed: {
- label: 'Activity feed',
- description: 'Project-wide change log, filterable by actor and action',
- icon: Activity,
- },
- pulse: {
- label: 'Pulse',
- description: 'GitHub-style heatmap of daily activity',
- icon: CalendarDays,
- },
- throughput: {
- label: 'Throughput',
- description: 'Created vs closed issues per week',
- icon: BarChart3,
- },
- breakdown: {
- label: 'Breakdown',
- description: 'Issue counts by status, priority, type, or assignee',
- icon: PieChart,
- },
- agent_runs: {
- label: 'Agent runs',
- description: 'Recent AI agent runs with their outcome',
- icon: Bot,
- },
- agent_health: {
- label: 'Agent health',
- description: 'Agent run success rate and failures over a window',
- icon: Activity,
- },
- webhook_health: {
- label: 'Webhook health',
- description: 'Webhook delivery outcomes and disabled endpoints',
- icon: Webhook,
- },
- agent_workload: {
- label: 'Agent workload',
- description: 'Delegated issues and run outcomes per agent',
- icon: Users,
- },
+// The icon of each widget type, shown in the add-widget picker. Kept in the
+// feature (it carries lucide icon components) separate from the pure layout types
+// in @/utils/dashboardWidgets. The label and description of a type are messages
+// under `dashboards.widgets`.
+export const WIDGET_ICON: Record<WidgetType, LucideIcon> = {
+ stat: Hash,
+ recent_issues: ListChecks,
+ activity_feed: Activity,
+ pulse: CalendarDays,
+ throughput: BarChart3,
+ breakdown: PieChart,
+ agent_runs: Bot,
+ agent_health: Activity,
+ webhook_health: Webhook,
+ agent_workload: Users,
};
// Widget types grouped by subject for the add-widget picker. The picker renders one
// section per group, in this order.
-export const WIDGET_GROUPS: { label: string; types: WidgetType[] }[] = [
+export const WIDGET_GROUPS: { key: 'issues' | 'agents'; types: WidgetType[] }[] = [
{
- label: 'Issues',
+ key: 'issues',
types: ['stat', 'breakdown', 'throughput', 'pulse', 'recent_issues', 'activity_feed'],
},
{
- label: 'AI agents & webhooks',
+ key: 'agents',
types: ['agent_runs', 'agent_health', 'webhook_health', 'agent_workload'],
},
];
diff --git a/apps/web/src/features/god/GodAuthProviderPage.tsx b/apps/web/src/features/god/GodAuthProviderPage.tsx
index 2b939718..7d8bc8ca 100644
--- a/apps/web/src/features/god/GodAuthProviderPage.tsx
+++ b/apps/web/src/features/god/GodAuthProviderPage.tsx
@@ -1,6 +1,7 @@
'use client';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import type { InstanceGoogleSettings } from '@/lib/api';
import { Button } from '@/components/ui/button';
import GodGoogleSettings from './components/auth-provider/GodGoogleSettings';
@@ -22,12 +23,14 @@ export default function GodAuthProviderPage() {
// Google is the only provider so far. A second one becomes another section on this
// page with its own form hook.
function AuthProviderForm({ settings }: { settings: InstanceGoogleSettings }) {
+ const t = useTranslations('god.authProvider');
+ const tCommon = useTranslations('common');
const form = useGodGoogleForm(settings);
async function save() {
try {
await form.save();
- toast.success('Auth provider saved');
+ toast.success(t('saved'));
} catch {
// The failure already surfaced through the global mutation error toast.
}
@@ -38,7 +41,7 @@ function AuthProviderForm({ settings }: { settings: InstanceGoogleSettings }) {
slug="auth-provider"
actions={
<Button size="sm" onClick={() => void save()} disabled={!form.dirty || form.saving}>
- {form.saving ? 'Saving…' : 'Save'}
+ {form.saving ? tCommon('saving') : tCommon('save')}
</Button>
}
>
diff --git a/apps/web/src/features/god/GodAuthenticationPage.tsx b/apps/web/src/features/god/GodAuthenticationPage.tsx
index c6e5ba85..297d6c93 100644
--- a/apps/web/src/features/god/GodAuthenticationPage.tsx
+++ b/apps/web/src/features/god/GodAuthenticationPage.tsx
@@ -1,6 +1,7 @@
'use client';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import type { InstanceAuthSettings } from '@/lib/api';
import SettingsCard from '@/components/common/page/SettingsCard';
import SettingsSection from '@/components/common/page/SettingsSection';
@@ -26,6 +27,8 @@ export default function GodAuthenticationPage() {
// The registration policy and the sign-in options. The provider credentials live
// under Integrations (Email provider, Auth provider).
function AuthenticationForm({ authSettings }: { authSettings: InstanceAuthSettings }) {
+ const t = useTranslations('god.authentication');
+ const tCommon = useTranslations('common');
const policy = useGodPolicyForm(authSettings);
// The options that send mail need a configured provider; the API rejects them
@@ -35,7 +38,7 @@ function AuthenticationForm({ authSettings }: { authSettings: InstanceAuthSettin
async function save() {
try {
await policy.save();
- toast.success('Authentication settings saved');
+ toast.success(t('saved'));
} catch {
// The failure already surfaced through the global mutation error toast.
}
@@ -46,15 +49,12 @@ function AuthenticationForm({ authSettings }: { authSettings: InstanceAuthSettin
slug="authentication"
actions={
<Button size="sm" onClick={() => void save()} disabled={!policy.dirty || policy.saving}>
- {policy.saving ? 'Saving…' : 'Save'}
+ {policy.saving ? tCommon('saving') : tCommon('save')}
</Button>
}
>
<div className="space-y-10">
- <SettingsSection
- title="Registration"
- description="Who may create an account on this instance."
- >
+ <SettingsSection title={t('registration')} description={t('registrationHint')}>
<SettingsCard className="divide-y divide-border/60">
<RegistrationModePicker
value={policy.registration}
@@ -64,17 +64,12 @@ function AuthenticationForm({ authSettings }: { authSettings: InstanceAuthSettin
</SettingsCard>
</SettingsSection>
- <SettingsSection
- title="Sign-in options"
- description="Options that need outbound mail. They stay off until a provider is configured."
- >
+ <SettingsSection title={t('signIn')} description={t('signInHint')}>
<SettingsCard className="divide-y divide-border/60">
<SettingsRow
- title="Require email confirmation"
- description="A new account must confirm its address before it can sign in."
- note={
- needsProvider ? 'Set up the Email provider under Integrations first.' : undefined
- }
+ title={t('requireVerification')}
+ description={t('requireVerificationHint')}
+ note={needsProvider ? t('needsProvider') : undefined}
control={
<Switch
checked={policy.requireEmailVerification}
@@ -84,11 +79,9 @@ function AuthenticationForm({ authSettings }: { authSettings: InstanceAuthSettin
}
/>
<SettingsRow
- title="Sign-in links"
- description="Offer signing in with a link sent by email, alongside the password."
- note={
- needsProvider ? 'Set up the Email provider under Integrations first.' : undefined
- }
+ title={t('magicLink')}
+ description={t('magicLinkHint')}
+ note={needsProvider ? t('needsProvider') : undefined}
control={
<Switch
checked={policy.magicLink}
diff --git a/apps/web/src/features/god/GodEmailPage.tsx b/apps/web/src/features/god/GodEmailPage.tsx
index 818d1f22..b30c8bfd 100644
--- a/apps/web/src/features/god/GodEmailPage.tsx
+++ b/apps/web/src/features/god/GodEmailPage.tsx
@@ -1,6 +1,7 @@
'use client';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import type { InstanceEmailSettings } from '@/lib/api';
import { Button } from '@/components/ui/button';
import GodEmailSettings from './components/email/GodEmailSettings';
@@ -20,12 +21,14 @@ export default function GodEmailPage() {
}
function EmailForm({ settings }: { settings: InstanceEmailSettings }) {
+ const t = useTranslations('god.email');
+ const tCommon = useTranslations('common');
const form = useGodEmailForm(settings);
async function save() {
try {
await form.save();
- toast.success('Email provider saved');
+ toast.success(t('saved'));
} catch {
// The failure already surfaced through the global mutation error toast.
}
@@ -36,7 +39,7 @@ function EmailForm({ settings }: { settings: InstanceEmailSettings }) {
slug="email"
actions={
<Button size="sm" onClick={() => void save()} disabled={!form.dirty || form.saving}>
- {form.saving ? 'Saving…' : 'Save'}
+ {form.saving ? tCommon('saving') : tCommon('save')}
</Button>
}
>
diff --git a/apps/web/src/features/god/GodHotkeysPage.tsx b/apps/web/src/features/god/GodHotkeysPage.tsx
index bb7de720..9dae4267 100644
--- a/apps/web/src/features/god/GodHotkeysPage.tsx
+++ b/apps/web/src/features/god/GodHotkeysPage.tsx
@@ -2,6 +2,7 @@
import { useState } from 'react';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import type { HotkeyOverrides } from '@/lib/api';
import { DEFAULT_COMBOS } from '@/utils/hotkeys';
import HotkeysEditor from '@/components/common/hotkeys/HotkeysEditor';
@@ -16,6 +17,8 @@ import {
// The instance keyboard shortcuts. What is stored is the set of commands rebound
// away from their built-in key; a row reset to the default drops out of the map.
export default function GodHotkeysPage() {
+ const t = useTranslations('god.hotkeys');
+ const tCommon = useTranslations('common');
const query = useInstanceHotkeySettingsQuery();
const update = useUpdateInstanceHotkeySettings();
const [draft, setDraft] = useState<HotkeyOverrides | null>(null);
@@ -28,7 +31,7 @@ export default function GodHotkeysPage() {
try {
await update.mutateAsync(overrides);
setDraft(null);
- toast.success('Keyboard shortcuts saved');
+ toast.success(t('saved'));
} catch {
// The failure already surfaced through the global mutation error toast.
}
@@ -39,7 +42,7 @@ export default function GodHotkeysPage() {
slug="hotkeys"
actions={
<Button size="sm" disabled={!dirty || update.isPending} onClick={() => void save()}>
- {update.isPending ? 'Saving…' : 'Save'}
+ {update.isPending ? tCommon('saving') : tCommon('save')}
</Button>
}
>
diff --git a/apps/web/src/features/god/GodProjectsPage.tsx b/apps/web/src/features/god/GodProjectsPage.tsx
index 011138fa..b30d7f1b 100644
--- a/apps/web/src/features/god/GodProjectsPage.tsx
+++ b/apps/web/src/features/god/GodProjectsPage.tsx
@@ -1,6 +1,7 @@
'use client';
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import { useDebouncedValue } from '@/hooks/useDebouncedValue';
import ListSkeleton from '@/components/common/skeleton/ListSkeleton';
import GodSearchInput from './components/GodSearchInput';
@@ -16,6 +17,7 @@ import { withOffsetReset } from './utils/paging';
// the user directory, search and paging run on the server, so the list never holds
// every project.
export default function GodProjectsPage() {
+ const t = useTranslations('god.projects');
const [search, setSearch] = useState('');
const [limit, setLimit] = useState<number>(PAGE_SIZES[1]);
const [offset, setOffset] = useState(0);
@@ -34,14 +36,14 @@ export default function GodProjectsPage() {
<GodSearchInput
value={search}
onChange={withOffsetReset(setOffset, setSearch)}
- placeholder="Search by key or name"
+ placeholder={t('searchPlaceholder')}
className="max-w-md min-w-[240px]"
/>
{projectsQuery.isPending ? (
<ListSkeleton rows={6} rowClassName="h-12" />
) : projects.length === 0 ? (
- <p className="text-sm text-muted-foreground">No projects match this search.</p>
+ <p className="text-sm text-muted-foreground">{t('empty')}</p>
) : (
<>
<GodProjectsTable projects={projects} onSelect={setSelected} />
diff --git a/apps/web/src/features/god/GodStoragePage.tsx b/apps/web/src/features/god/GodStoragePage.tsx
index e2847683..51bedc41 100644
--- a/apps/web/src/features/god/GodStoragePage.tsx
+++ b/apps/web/src/features/god/GodStoragePage.tsx
@@ -2,6 +2,7 @@
import { useState } from 'react';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import type { StorageSettings } from '@/lib/api';
import SettingsCard from '@/components/common/page/SettingsCard';
import SettingsSection from '@/components/common/page/SettingsSection';
@@ -45,6 +46,8 @@ function settingsToForm(settings: StorageSettings): FormState {
}
function StorageForm({ settings }: { settings: FormState }) {
+ const t = useTranslations('god.storage');
+ const tCommon = useTranslations('common');
const update = useUpdateInstanceStorageSettings();
const [form, setForm] = useState(settings);
@@ -74,7 +77,7 @@ function StorageForm({ settings }: { settings: FormState }) {
.map((line) => line.trim())
.filter(Boolean),
});
- toast.success('Storage settings saved');
+ toast.success(t('saved'));
} catch {
// The failure already surfaced through the global mutation error toast.
}
@@ -89,18 +92,15 @@ function StorageForm({ settings }: { settings: FormState }) {
onClick={() => void save()}
disabled={!dirty || !valid || update.isPending}
>
- {update.isPending ? 'Saving…' : 'Save'}
+ {update.isPending ? tCommon('saving') : tCommon('save')}
</Button>
}
>
<div className="space-y-8">
- <SettingsSection
- title="File size"
- description="The largest single file an upload may carry. A bigger file is refused before it is stored."
- >
+ <SettingsSection title={t('fileSize')} description={t('fileSizeHint')}>
<SettingsCard className="grid gap-6 p-4 sm:grid-cols-2">
<div className="space-y-1.5">
- <Label htmlFor="storage-attachment-mb">Attachment size (MB)</Label>
+ <Label htmlFor="storage-attachment-mb">{t('attachmentMb')}</Label>
<Input
id="storage-attachment-mb"
type="number"
@@ -109,14 +109,11 @@ function StorageForm({ settings }: { settings: FormState }) {
value={form.maxAttachmentMb}
onChange={(e) => set({ maxAttachmentMb: e.target.value })}
/>
- <p className="text-xs text-muted-foreground">
- Applies to issue attachments, files pasted into a description, and attachments added
- by agents.
- </p>
+ <p className="text-xs text-muted-foreground">{t('attachmentHint')}</p>
</div>
<div className="space-y-1.5">
- <Label htmlFor="storage-avatar-mb">Avatar size (MB)</Label>
+ <Label htmlFor="storage-avatar-mb">{t('avatarMb')}</Label>
<Input
id="storage-avatar-mb"
type="number"
@@ -125,17 +122,12 @@ function StorageForm({ settings }: { settings: FormState }) {
value={form.maxAvatarMb}
onChange={(e) => set({ maxAvatarMb: e.target.value })}
/>
- <p className="text-xs text-muted-foreground">
- The profile picture people upload for their account.
- </p>
+ <p className="text-xs text-muted-foreground">{t('avatarHint')}</p>
</div>
</SettingsCard>
</SettingsSection>
- <SettingsSection
- title="Accepted attachment types"
- description="One content type per line. Leave empty to accept any file."
- >
+ <SettingsSection title={t('mimeTypes')} description={t('mimeTypesHint')}>
<SettingsCard className="space-y-2 p-4">
<Textarea
id="storage-mime-types"
@@ -146,20 +138,14 @@ function StorageForm({ settings }: { settings: FormState }) {
value={form.attachmentMimeTypes}
onChange={(e) => set({ attachmentMimeTypes: e.target.value })}
/>
- <p className="text-xs text-muted-foreground">
- A line is a full type (application/pdf) or a wildcard (image/*). Files already stored
- are kept whatever the list says.
- </p>
+ <p className="text-xs text-muted-foreground">{t('mimeTypesNote')}</p>
</SettingsCard>
</SettingsSection>
- <SettingsSection
- title="Project quota"
- description="Total attachment storage one project may use. 0 means no limit."
- >
+ <SettingsSection title={t('quota')} description={t('quotaHint')}>
<SettingsCard className="space-y-2 p-4">
<div className="space-y-1.5 sm:max-w-xs">
- <Label htmlFor="storage-project-quota-mb">Storage per project (MB)</Label>
+ <Label htmlFor="storage-project-quota-mb">{t('quotaMb')}</Label>
<Input
id="storage-project-quota-mb"
type="number"
@@ -168,10 +154,7 @@ function StorageForm({ settings }: { settings: FormState }) {
onChange={(e) => set({ projectQuotaMb: e.target.value })}
/>
</div>
- <p className="text-xs text-muted-foreground">
- Once a project reaches the quota, new uploads are refused until someone deletes
- attachments.
- </p>
+ <p className="text-xs text-muted-foreground">{t('quotaNote')}</p>
</SettingsCard>
</SettingsSection>
</div>
diff --git a/apps/web/src/features/god/GodTelegramPage.tsx b/apps/web/src/features/god/GodTelegramPage.tsx
index 4e9b02b3..3292c466 100644
--- a/apps/web/src/features/god/GodTelegramPage.tsx
+++ b/apps/web/src/features/god/GodTelegramPage.tsx
@@ -2,6 +2,7 @@
import { useState } from 'react';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import type { InstanceTelegramSettings } from '@/lib/api';
import SettingsCard from '@/components/common/page/SettingsCard';
import EnabledSwitch from '@/components/common/inputs/EnabledSwitch';
@@ -27,6 +28,8 @@ export default function GodTelegramPage() {
}
function TelegramForm({ settings }: { settings: InstanceTelegramSettings }) {
+ const t = useTranslations('god.telegram');
+ const tCommon = useTranslations('common');
const update = useUpdateInstanceTelegramSettings();
const [enabled, setEnabled] = useState(settings.enabled);
const [botToken, setBotToken] = useState('');
@@ -41,7 +44,7 @@ function TelegramForm({ settings }: { settings: InstanceTelegramSettings }) {
...(botToken.length > 0 ? { botToken } : {}),
});
setBotToken('');
- toast.success('Telegram settings saved');
+ toast.success(t('saved'));
} catch {
// The failure already surfaced through the global mutation error toast. A token
// Telegram rejects comes back as a 400 with what it said.
@@ -53,17 +56,13 @@ function TelegramForm({ settings }: { settings: InstanceTelegramSettings }) {
slug="telegram"
actions={
<Button size="sm" onClick={() => void save()} disabled={!dirty || update.isPending}>
- {update.isPending ? 'Saving…' : 'Save'}
+ {update.isPending ? tCommon('saving') : tCommon('save')}
</Button>
}
>
<SettingsSection
- title="Bot"
- description={
- hasToken
- ? 'People connect their Telegram account by opening a chat with this bot from their profile.'
- : 'Create a bot with @BotFather in Telegram and paste its token here.'
- }
+ title={t('bot')}
+ description={t(hasToken ? 'botConfigured' : 'botMissing')}
action={
<EnabledSwitch
checked={enabled}
@@ -74,7 +73,7 @@ function TelegramForm({ settings }: { settings: InstanceTelegramSettings }) {
>
<SettingsCard className="space-y-6 p-4">
<div className="space-y-1.5 sm:max-w-md">
- <Label htmlFor="telegram-bot-token">Bot token</Label>
+ <Label htmlFor="telegram-bot-token">{t('botToken')}</Label>
<SecretInput
id="telegram-bot-token"
value={botToken}
@@ -83,19 +82,14 @@ function TelegramForm({ settings }: { settings: InstanceTelegramSettings }) {
editable
placeholder="123456789:AA…"
/>
- <p className="text-xs text-muted-foreground">
- The token is verified with Telegram when you save, so a wrong one is refused here
- rather than failing silently later.
- </p>
+ <p className="text-xs text-muted-foreground">{t('botTokenHint')}</p>
</div>
{settings.botUsername && (
<div className="space-y-1 border-t border-border/60 pt-4">
- <div className="text-sm font-medium">Bot</div>
+ <div className="text-sm font-medium">{t('bot')}</div>
<p className="font-mono text-xs">@{settings.botUsername}</p>
- <p className="text-xs text-muted-foreground">
- Resolved from the token. This is the bot people will see when connecting.
- </p>
+ <p className="text-xs text-muted-foreground">{t('resolvedHint')}</p>
</div>
)}
</SettingsCard>
diff --git a/apps/web/src/features/god/GodUsersPage.tsx b/apps/web/src/features/god/GodUsersPage.tsx
index cd29dc7c..2c1a6c67 100644
--- a/apps/web/src/features/god/GodUsersPage.tsx
+++ b/apps/web/src/features/god/GodUsersPage.tsx
@@ -1,6 +1,7 @@
'use client';
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import type { InstanceUserKind } from '@/lib/api';
import { useDebouncedValue } from '@/hooks/useDebouncedValue';
import ListSkeleton from '@/components/common/skeleton/ListSkeleton';
@@ -20,6 +21,7 @@ import { withOffsetReset } from './utils/paging';
// Search, the kind filter and paging all run on the server: the query carries them
// and gets back one page plus the total, so the list never holds every account.
export default function GodUsersPage() {
+ const t = useTranslations('god.users');
const [search, setSearch] = useState('');
const [kind, setKind] = useState<InstanceUserKind>('human');
const [limit, setLimit] = useState<number>(PAGE_SIZES[1]);
@@ -46,7 +48,7 @@ export default function GodUsersPage() {
{usersQuery.isPending ? (
<ListSkeleton rows={6} rowClassName="h-12" />
) : users.length === 0 ? (
- <p className="text-sm text-muted-foreground">No accounts match these filters.</p>
+ <p className="text-sm text-muted-foreground">{t('empty')}</p>
) : (
<>
<GodUsersTable users={users} onSelect={setSelected} />
diff --git a/apps/web/src/features/god/components/GodAccessCard.tsx b/apps/web/src/features/god/components/GodAccessCard.tsx
index 6bea4ee9..61064911 100644
--- a/apps/web/src/features/god/components/GodAccessCard.tsx
+++ b/apps/web/src/features/god/components/GodAccessCard.tsx
@@ -2,19 +2,12 @@
import { useState, type ReactNode } from 'react';
import { ChevronRight } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { PermissionCatalog, Permissions } from '@/lib/api';
import ListSkeleton from '@/components/common/skeleton/ListSkeleton';
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible';
import GodPermissionMatrix from './GodPermissionMatrix';
-// Where the permissions on show come from, in words. An owner bypasses the matrix
-// entirely, so its rows are all on and this says why.
-function sourceLabel(isOwner: boolean, roleName: string | null): string {
- if (isOwner) return 'An owner has full access: the role matrix is not consulted.';
- if (roleName) return `Resolved from the "${roleName}" role.`;
- return 'No role assigned: the default member permissions apply.';
-}
-
// One membership, from either side of it: a project the user can reach, or a member
// of the project. `header` is what the row states about that side; the matrix behind
// the toggle spells the access out per resource.
@@ -31,8 +24,13 @@ export default function GodAccessCard({
permissions: Permissions;
catalog: PermissionCatalog | undefined;
}) {
+ const t = useTranslations('god.access');
const [open, setOpen] = useState(false);
+ // Where the permissions on show come from, in words. An owner bypasses the matrix
+ // entirely, so its rows are all on and this says why.
+ const source = isOwner ? t('owner') : roleName ? t('role', { role: roleName }) : t('default');
+
return (
<Collapsible
open={open}
@@ -47,7 +45,7 @@ export default function GodAccessCard({
</CollapsibleTrigger>
<CollapsibleContent className="border-t border-border/50 bg-background/40 px-3 py-3">
- <p className="mb-2 text-xs text-muted-foreground">{sourceLabel(isOwner, roleName)}</p>
+ <p className="mb-2 text-xs text-muted-foreground">{source}</p>
{catalog ? (
<GodPermissionMatrix catalog={catalog} permissions={permissions} />
) : (
diff --git a/apps/web/src/features/god/components/GodPager.tsx b/apps/web/src/features/god/components/GodPager.tsx
index bd4ae8ca..884823b8 100644
--- a/apps/web/src/features/god/components/GodPager.tsx
+++ b/apps/web/src/features/god/components/GodPager.tsx
@@ -1,6 +1,7 @@
'use client';
import { ChevronLeft, ChevronRight } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { Button } from '@/components/ui/button';
import {
Select,
@@ -28,15 +29,16 @@ export default function GodPager({
onOffsetChange: (offset: number) => void;
onLimitChange: (limit: number) => void;
}) {
+ const t = useTranslations('god.pager');
const first = total === 0 ? 0 : offset + 1;
const last = Math.min(offset + limit, total);
return (
<div className="flex flex-wrap items-center justify-between gap-3 pt-1">
<div className="flex items-center gap-2 text-xs text-muted-foreground">
- <span>Per page</span>
+ <span>{t('perPage')}</span>
<Select value={String(limit)} onValueChange={(v) => onLimitChange(Number(v))}>
- <SelectTrigger size="sm" className="w-[72px]" aria-label="Rows per page">
+ <SelectTrigger size="sm" className="w-[72px]" aria-label={t('rowsPerPage')}>
<SelectValue />
</SelectTrigger>
<SelectContent>
@@ -50,15 +52,13 @@ export default function GodPager({
</div>
<div className="flex items-center gap-3">
- <span className="text-xs text-muted-foreground">
- {first}-{last} of {total}
- </span>
+ <span className="text-xs text-muted-foreground">{t('range', { first, last, total })}</span>
<div className="flex items-center gap-1">
<Button
variant="ghost"
size="icon"
className="size-8"
- aria-label="Previous page"
+ aria-label={t('previous')}
disabled={offset === 0}
onClick={() => onOffsetChange(Math.max(0, offset - limit))}
>
@@ -68,7 +68,7 @@ export default function GodPager({
variant="ghost"
size="icon"
className="size-8"
- aria-label="Next page"
+ aria-label={t('next')}
disabled={last >= total}
onClick={() => onOffsetChange(offset + limit)}
>
diff --git a/apps/web/src/features/god/components/GodPermissionMatrix.tsx b/apps/web/src/features/god/components/GodPermissionMatrix.tsx
index 5f6e40d0..7296b0d5 100644
--- a/apps/web/src/features/god/components/GodPermissionMatrix.tsx
+++ b/apps/web/src/features/god/components/GodPermissionMatrix.tsx
@@ -3,7 +3,9 @@
import { Fragment, useMemo } from 'react';
import { Check, Minus } from 'lucide-react';
import type { PermissionCatalog, Permissions } from '@/lib/api';
-import { actionLabel, groupResources, orderActions, resourceLabel } from '@/utils/permissions';
+import { useTranslations } from 'next-intl';
+import { groupResources, orderActions } from '@/utils/permissions';
+import { usePermissionLabels } from '@/hooks/usePermissionLabels';
// A read-only permission matrix: resources down, actions across, a check where the
// membership grants it. The role editor owns the editable version; this one only
@@ -15,6 +17,8 @@ export default function GodPermissionMatrix({
catalog: PermissionCatalog;
permissions: Permissions;
}) {
+ const t = useTranslations('permissions');
+ const { actionLabel, resourceLabel, groupLabel } = usePermissionLabels();
const groups = useMemo(() => groupResources(catalog.resources), [catalog.resources]);
const actions = useMemo(() => orderActions(catalog.actions), [catalog.actions]);
@@ -23,7 +27,7 @@ export default function GodPermissionMatrix({
<thead>
<tr className="border-b">
<th className="py-1.5 pr-2 text-left text-[11px] font-medium text-muted-foreground">
- Resource
+ {t('resourceColumn')}
</th>
{actions.map((action) => (
<th
@@ -37,10 +41,10 @@ export default function GodPermissionMatrix({
</thead>
<tbody>
{groups.map((group) => (
- <Fragment key={group.title}>
+ <Fragment key={group.key}>
<tr className="border-b bg-muted/40">
<td className="py-1 pr-2 text-xs font-medium" colSpan={actions.length + 1}>
- {group.title}
+ {groupLabel(group.key)}
</td>
</tr>
{group.resources.map((resource) => (
@@ -49,11 +53,11 @@ export default function GodPermissionMatrix({
{actions.map((action) => (
<td key={action} className="px-1 py-1.5 text-center">
{permissions[resource]?.[action] ? (
- <Check className="mx-auto size-3.5 text-primary" aria-label="allowed" />
+ <Check className="mx-auto size-3.5 text-primary" aria-label={t('allowed')} />
) : (
<Minus
className="mx-auto size-3.5 text-muted-foreground/40"
- aria-label="not allowed"
+ aria-label={t('notAllowed')}
/>
)}
</td>
diff --git a/apps/web/src/features/god/components/GodSectionPage.tsx b/apps/web/src/features/god/components/GodSectionPage.tsx
index 808dc8dc..9d14ff86 100644
--- a/apps/web/src/features/god/components/GodSectionPage.tsx
+++ b/apps/web/src/features/god/components/GodSectionPage.tsx
@@ -1,5 +1,6 @@
import type { ReactNode } from 'react';
-import { GOD_COLUMN_CLASS, godSection } from '@/utils/godSections';
+import { GOD_COLUMN_CLASS } from '@/utils/godSections';
+import { useGodSectionText } from '@/hooks/useSectionLabels';
import SectionPageView from '@/components/common/page/SectionPageView';
// The chrome shared by every god section page: title and description taken from the
@@ -16,7 +17,7 @@ export default function GodSectionPage({
widthClassName?: string;
children: ReactNode;
}) {
- const section = godSection(slug);
+ const section = useGodSectionText().section(slug);
return (
<SectionPageView
title={section.label}
diff --git a/apps/web/src/features/god/components/auth-provider/GodGoogleSettings.tsx b/apps/web/src/features/god/components/auth-provider/GodGoogleSettings.tsx
index 09e173f5..2090d18c 100644
--- a/apps/web/src/features/god/components/auth-provider/GodGoogleSettings.tsx
+++ b/apps/web/src/features/god/components/auth-provider/GodGoogleSettings.tsx
@@ -1,5 +1,6 @@
import { useState } from 'react';
import { Check, Copy } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { Button } from '@/components/ui/button';
@@ -13,6 +14,7 @@ import type { GodGoogleForm } from '../../hooks/useGodGoogleForm';
// redirect URI is derived from the API origin and shown read-only, since it has to be
// registered on the OAuth client for the round trip to work at all.
export default function GodGoogleSettings({ form }: { form: GodGoogleForm }) {
+ const t = useTranslations('god.authProvider');
const [copied, setCopied] = useState(false);
async function copyRedirectUri() {
@@ -27,12 +29,8 @@ export default function GodGoogleSettings({ form }: { form: GodGoogleForm }) {
return (
<SettingsSection
- title="Google"
- description={
- form.hasCredentials
- ? 'An address without an account gets one; an address that already has a confirmed account signs into it.'
- : 'Add the client ID and secret first.'
- }
+ title={t('google')}
+ description={t(form.hasCredentials ? 'googleConfigured' : 'googleMissing')}
action={
<EnabledSwitch
checked={form.enabled}
@@ -44,7 +42,7 @@ export default function GodGoogleSettings({ form }: { form: GodGoogleForm }) {
<SettingsCard className="space-y-6 p-4">
<div className="grid gap-4 sm:grid-cols-2">
<div className="space-y-1.5">
- <Label htmlFor="google-client-id">Client ID</Label>
+ <Label htmlFor="google-client-id">{t('clientId')}</Label>
<Input
id="google-client-id"
value={form.clientId}
@@ -54,7 +52,7 @@ export default function GodGoogleSettings({ form }: { form: GodGoogleForm }) {
/>
</div>
<div className="space-y-1.5">
- <Label htmlFor="google-client-secret">Client secret</Label>
+ <Label htmlFor="google-client-secret">{t('clientSecret')}</Label>
<SecretInput
id="google-client-secret"
value={form.clientSecret}
@@ -70,19 +68,16 @@ export default function GodGoogleSettings({ form }: { form: GodGoogleForm }) {
in. It is not part of the form and never saved. */}
<div className="flex items-start justify-between gap-4 border-t border-border/60 pt-4">
<div className="min-w-0 space-y-1">
- <div className="text-sm font-medium">Redirect URI</div>
+ <div className="text-sm font-medium">{t('redirectUri')}</div>
<p className="truncate font-mono text-xs">{form.settings.redirectUri}</p>
- <p className="text-xs text-muted-foreground">
- Register this on the OAuth client in the Google Cloud console. Google refuses the
- sign-in if it does not match exactly.
- </p>
+ <p className="text-xs text-muted-foreground">{t('redirectUriHint')}</p>
</div>
<Button
type="button"
variant="outline"
size="icon"
className="shrink-0"
- title="Copy redirect URI"
+ title={t('copyRedirectUri')}
onClick={() => void copyRedirectUri()}
>
{copied ? <Check className="size-4" /> : <Copy className="size-4" />}
diff --git a/apps/web/src/features/god/components/authentication/RegistrationModePicker.tsx b/apps/web/src/features/god/components/authentication/RegistrationModePicker.tsx
index 29ebdb70..afdd852e 100644
--- a/apps/web/src/features/god/components/authentication/RegistrationModePicker.tsx
+++ b/apps/web/src/features/god/components/authentication/RegistrationModePicker.tsx
@@ -1,24 +1,9 @@
import { Check } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { RegistrationMode } from '@/lib/api';
import { cn } from '@/lib/utils';
-const OPTIONS: { value: RegistrationMode; label: string; description: string }[] = [
- {
- value: 'open',
- label: 'Open',
- description: 'Anyone who reaches the sign-up page can create an account.',
- },
- {
- value: 'invite',
- label: 'Invite only',
- description: 'An account can only be created through an invite link.',
- },
- {
- value: 'closed',
- label: 'Closed',
- description: 'No new accounts. Existing ones keep signing in.',
- },
-];
+const MODES: RegistrationMode[] = ['open', 'invite', 'closed'];
// Picks how the instance handles registration. One choice of three, each with a
// sentence explaining what it means for someone opening the sign-up page. Renders bare
@@ -32,18 +17,20 @@ export default function RegistrationModePicker({
onChange: (value: RegistrationMode) => void;
disabled?: boolean;
}) {
+ const t = useTranslations('god.authentication.modes');
+
return (
<div role="radiogroup">
- {OPTIONS.map((option) => {
- const active = value === option.value;
+ {MODES.map((mode) => {
+ const active = value === mode;
return (
<button
- key={option.value}
+ key={mode}
type="button"
role="radio"
aria-checked={active}
disabled={disabled}
- onClick={() => onChange(option.value)}
+ onClick={() => onChange(mode)}
className={cn(
'flex w-full items-start gap-3 p-4 text-left transition-colors',
'-outline-offset-1 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50',
@@ -61,8 +48,10 @@ export default function RegistrationModePicker({
{active && <Check className="size-3" />}
</span>
<span className="space-y-0.5">
- <span className="block text-sm font-medium">{option.label}</span>
- <span className="block text-xs text-muted-foreground">{option.description}</span>
+ <span className="block text-sm font-medium">{t(`${mode}.label`)}</span>
+ <span className="block text-xs text-muted-foreground">
+ {t(`${mode}.description`)}
+ </span>
</span>
</button>
);
diff --git a/apps/web/src/features/god/components/email/GodEmailSettings.tsx b/apps/web/src/features/god/components/email/GodEmailSettings.tsx
index 8defe741..553307c1 100644
--- a/apps/web/src/features/god/components/email/GodEmailSettings.tsx
+++ b/apps/web/src/features/god/components/email/GodEmailSettings.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import type { NotificationEncryption } from '@/lib/api';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
@@ -15,22 +16,20 @@ import ProviderToggle from '@/components/common/inputs/ProviderToggle';
import SecretInput from '@/components/common/inputs/SecretInput';
import type { GodEmailForm } from '../../hooks/useGodEmailForm';
-const ENCRYPTION_OPTIONS: { value: NotificationEncryption; label: string }[] = [
- { value: 'none', label: 'None' },
- { value: 'ssl', label: 'SSL' },
- { value: 'tls', label: 'TLS' },
-];
+const ENCRYPTION_OPTIONS: NotificationEncryption[] = ['none', 'ssl', 'tls'];
// The instance mail provider, one of SMTP or Resend. Everything the instance sends
// (password resets, address confirmation, sign-in links) goes through it, which is
// why the sign-in options on the Authentication page stay off until it is set.
export default function GodEmailSettings({ form }: { form: GodEmailForm }) {
+ const t = useTranslations('god.email');
+
return (
<div className="space-y-8">
<ProviderSection form={form} />
<SettingsSection
- title="Project notifications"
- description="Let projects deliver their notifications through this provider instead of configuring one of their own. Each project still chooses whether to use it."
+ title={t('projectNotifications')}
+ description={t('projectNotificationsHint')}
action={
<EnabledSwitch
checked={form.allowProjects}
@@ -44,11 +43,12 @@ export default function GodEmailSettings({ form }: { form: GodEmailForm }) {
}
function ProviderSection({ form }: { form: GodEmailForm }) {
+ const t = useTranslations('god.email');
const { settings } = form;
return (
<SettingsSection
- title="Email provider"
- description="Choose one provider. Credentials are stored encrypted."
+ title={t('provider')}
+ description={t('providerHint')}
action={
<EnabledSwitch checked={form.enabled} onChange={form.setEnabled} disabled={form.saving} />
}
@@ -57,22 +57,20 @@ function ProviderSection({ form }: { form: GodEmailForm }) {
<ProviderToggle value={form.provider} onChange={form.setProvider} disabled={form.saving} />
<div className="space-y-1.5 sm:max-w-md">
- <Label htmlFor="email-from">From address</Label>
+ <Label htmlFor="email-from">{t('from')}</Label>
<Input
id="email-from"
value={form.from}
onChange={(e) => form.setFrom(e.target.value)}
placeholder={"It's a Plan <[email protected]>"}
/>
- <p className="text-xs text-muted-foreground">
- Required for Resend. With SMTP it defaults to the username.
- </p>
+ <p className="text-xs text-muted-foreground">{t('fromHint')}</p>
</div>
{form.provider === 'smtp' ? (
<div className="grid gap-4 sm:grid-cols-3">
<div className="space-y-1.5">
- <Label htmlFor="smtp-host">Host</Label>
+ <Label htmlFor="smtp-host">{t('host')}</Label>
<Input
id="smtp-host"
value={form.host}
@@ -81,7 +79,7 @@ function ProviderSection({ form }: { form: GodEmailForm }) {
/>
</div>
<div className="space-y-1.5">
- <Label htmlFor="smtp-port">Port</Label>
+ <Label htmlFor="smtp-port">{t('port')}</Label>
<Input
id="smtp-port"
type="number"
@@ -92,7 +90,7 @@ function ProviderSection({ form }: { form: GodEmailForm }) {
/>
</div>
<div className="space-y-1.5">
- <Label htmlFor="smtp-encryption">Encryption</Label>
+ <Label htmlFor="smtp-encryption">{t('encryption')}</Label>
<Select
value={form.encryption}
onValueChange={(v) => form.setEncryption(v as NotificationEncryption)}
@@ -102,15 +100,15 @@ function ProviderSection({ form }: { form: GodEmailForm }) {
</SelectTrigger>
<SelectContent>
{ENCRYPTION_OPTIONS.map((o) => (
- <SelectItem key={o.value} value={o.value}>
- {o.label}
+ <SelectItem key={o} value={o}>
+ {t(`encryptionOptions.${o}`)}
</SelectItem>
))}
</SelectContent>
</Select>
</div>
<div className="space-y-1.5">
- <Label htmlFor="smtp-username">Username</Label>
+ <Label htmlFor="smtp-username">{t('username')}</Label>
<Input
id="smtp-username"
value={form.username}
@@ -120,31 +118,31 @@ function ProviderSection({ form }: { form: GodEmailForm }) {
/>
</div>
<div className="space-y-1.5">
- <Label htmlFor="smtp-password">Password</Label>
+ <Label htmlFor="smtp-password">{t('password')}</Label>
<SecretInput
id="smtp-password"
value={form.password}
onChange={form.setPassword}
hasStored={settings.smtp.hasPassword}
editable
- placeholder="SMTP password"
+ placeholder={t('passwordPlaceholder')}
/>
</div>
<div className="space-y-1.5">
- <Label htmlFor="smtp-timeout">Timeout (s)</Label>
+ <Label htmlFor="smtp-timeout">{t('timeout')}</Label>
<Input
id="smtp-timeout"
type="number"
min={1}
value={form.timeout}
onChange={(e) => form.setTimeout(e.target.value)}
- placeholder="Optional"
+ placeholder={t('optional')}
/>
</div>
</div>
) : (
<div className="space-y-1.5 sm:max-w-md">
- <Label htmlFor="resend-api-key">API key</Label>
+ <Label htmlFor="resend-api-key">{t('apiKey')}</Label>
<SecretInput
id="resend-api-key"
value={form.apiKey}
diff --git a/apps/web/src/features/god/components/projects/GodProjectDetailPanel.tsx b/apps/web/src/features/god/components/projects/GodProjectDetailPanel.tsx
index 575de41c..54a1fba6 100644
--- a/apps/web/src/features/god/components/projects/GodProjectDetailPanel.tsx
+++ b/apps/web/src/features/god/components/projects/GodProjectDetailPanel.tsx
@@ -1,6 +1,7 @@
'use client';
import { Users, X } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { InstanceProjectDetail } from '@/lib/api';
import { formatDate, formatDateTime } from '@/utils/dates';
import { useExitOnEscape } from '@/hooks/useExitOnEscape';
@@ -15,8 +16,9 @@ import GodProjectMemberCard from './GodProjectMemberCard';
// One number from the project, with a quiet label under it. The counts read as a
// grid so the size of a project is one glance rather than a list of sentences.
function Stat({ label, value }: { label: string; value: number }) {
+ const t = useTranslations('god.projectPanel');
return (
- <div className="rounded-lg bg-muted/40 px-3 py-2.5" title={`${label}: ${value}`}>
+ <div className="rounded-lg bg-muted/40 px-3 py-2.5" title={t('statTitle', { label, value })}>
<div className="text-lg font-semibold tabular-nums">{compactCount(value)}</div>
<div className="text-xs text-muted-foreground">{label}</div>
</div>
@@ -25,20 +27,18 @@ function Stat({ label, value }: { label: string; value: number }) {
// The counts of a project, in the order they matter: the work first, then what is
// configured around it.
-function stats(project: InstanceProjectDetail): { label: string; value: number }[] {
- return [
- { label: 'Issues', value: project.issueCount },
- { label: 'Archived issues', value: project.archivedIssueCount },
- { label: 'Initiatives', value: project.initiativeCount },
- { label: 'Members', value: project.memberCount },
- { label: 'Dashboards', value: project.dashboardCount },
- { label: 'Views', value: project.viewCount },
- { label: 'AI agents', value: project.agentCount },
- { label: 'Skills', value: project.skillCount },
- { label: 'Tools', value: project.toolCount },
- { label: 'Integrations', value: project.integrationCount },
- ];
-}
+const STATS = [
+ { key: 'issues', count: (p: InstanceProjectDetail) => p.issueCount },
+ { key: 'archivedIssues', count: (p: InstanceProjectDetail) => p.archivedIssueCount },
+ { key: 'initiatives', count: (p: InstanceProjectDetail) => p.initiativeCount },
+ { key: 'members', count: (p: InstanceProjectDetail) => p.memberCount },
+ { key: 'dashboards', count: (p: InstanceProjectDetail) => p.dashboardCount },
+ { key: 'views', count: (p: InstanceProjectDetail) => p.viewCount },
+ { key: 'agents', count: (p: InstanceProjectDetail) => p.agentCount },
+ { key: 'skills', count: (p: InstanceProjectDetail) => p.skillCount },
+ { key: 'tools', count: (p: InstanceProjectDetail) => p.toolCount },
+ { key: 'integrations', count: (p: InstanceProjectDetail) => p.integrationCount },
+] as const;
// One project in a right-hand side panel (the same surface the user directory uses):
// what the project holds, and every member with the permissions their membership
@@ -50,6 +50,8 @@ export default function GodProjectDetailPanel({
projectId: number;
onClose: () => void;
}) {
+ const t = useTranslations('god.projectPanel');
+ const tCommon = useTranslations('common');
const projectQuery = useInstanceProjectQuery(projectId);
const catalogQuery = usePermissionCatalogQuery();
const project = projectQuery.data;
@@ -69,7 +71,7 @@ export default function GodProjectDetailPanel({
{project?.key ?? '…'}
</span>
<h2 className="truncate text-base font-semibold">
- {project ? project.name : 'Loading…'}
+ {project ? project.name : tCommon('loading')}
</h2>
</div>
{project?.description && (
@@ -81,15 +83,21 @@ export default function GodProjectDetailPanel({
variant={project.mcpEnabled ? 'secondary' : 'outline'}
className="px-1.5 py-0 text-[10px] font-medium"
>
- MCP {project.mcpEnabled ? 'enabled' : 'off'}
+ {t(project.mcpEnabled ? 'mcpEnabled' : 'mcpOff')}
</Badge>
<span className="text-xs text-muted-foreground">
- created {formatDate(project.createdAt)}
+ {t('created', { date: formatDate(project.createdAt) })}
</span>
</div>
)}
</div>
- <Button variant="ghost" size="icon" className="size-7" onClick={onClose} title="Close">
+ <Button
+ variant="ghost"
+ size="icon"
+ className="size-7"
+ onClick={onClose}
+ title={tCommon('close')}
+ >
<X />
</Button>
</div>
@@ -101,19 +109,22 @@ export default function GodProjectDetailPanel({
<>
<section className="space-y-3">
<div className="text-xs text-muted-foreground">
- Last activity:{' '}
- {project.lastActivityAt ? formatDateTime(project.lastActivityAt) : 'none yet'}
+ {t('lastActivity', {
+ value: project.lastActivityAt
+ ? formatDateTime(project.lastActivityAt)
+ : t('noActivity'),
+ })}
</div>
<div className="grid grid-cols-3 gap-2 sm:grid-cols-5">
- {stats(project).map((s) => (
- <Stat key={s.label} label={s.label} value={s.value} />
+ {STATS.map((s) => (
+ <Stat key={s.key} label={t(`stats.${s.key}`)} value={s.count(project)} />
))}
</div>
</section>
<section className="space-y-3">
<div className="flex items-baseline gap-2">
- <h3 className="text-sm font-medium">Members</h3>
+ <h3 className="text-sm font-medium">{t('members')}</h3>
{project.members.length > 0 && (
<span className="text-xs text-muted-foreground">{project.members.length}</span>
)}
@@ -121,9 +132,9 @@ export default function GodProjectDetailPanel({
{project.members.length === 0 ? (
<div className="flex flex-col items-center gap-2 rounded-lg bg-muted/30 px-6 py-10 text-center">
<Users className="size-5 text-muted-foreground" />
- <p className="text-sm font-medium">No members</p>
+ <p className="text-sm font-medium">{t('noMembersTitle')}</p>
<p className="max-w-[36ch] text-xs text-muted-foreground">
- Nobody can reach this project until someone is invited to it.
+ {t('noMembersHint')}
</p>
</div>
) : (
diff --git a/apps/web/src/features/god/components/projects/GodProjectMemberCard.tsx b/apps/web/src/features/god/components/projects/GodProjectMemberCard.tsx
index 999fabec..c92c5867 100644
--- a/apps/web/src/features/god/components/projects/GodProjectMemberCard.tsx
+++ b/apps/web/src/features/god/components/projects/GodProjectMemberCard.tsx
@@ -1,6 +1,7 @@
'use client';
import { Bot } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { InstanceProjectMember, PermissionCatalog } from '@/lib/api';
import { formatShortDate } from '@/utils/dates';
import Avatar from '@/components/common/Avatar';
@@ -15,6 +16,9 @@ export default function GodProjectMemberCard({
member: InstanceProjectMember;
catalog: PermissionCatalog | undefined;
}) {
+ const t = useTranslations('god.access');
+ const tCommon = useTranslations('common');
+ const tUsers = useTranslations('god.users');
const isOwner = member.role === 'owner';
return (
@@ -34,17 +38,17 @@ export default function GodProjectMemberCard({
{member.isAgent && (
<Badge variant="secondary" className="gap-1 px-1.5 py-0 text-[10px] font-medium">
<Bot className="size-3" />
- Agent
+ {tUsers('agent')}
</Badge>
)}
<Badge
variant={isOwner ? 'default' : 'secondary'}
className="px-1.5 py-0 text-[10px] font-medium"
>
- {isOwner ? 'Owner' : (member.roleName ?? 'Member')}
+ {isOwner ? tCommon('owner') : (member.roleName ?? tCommon('member'))}
</Badge>
<span className="text-xs text-muted-foreground">
- joined {formatShortDate(member.joinedAt)}
+ {t('joined', { date: formatShortDate(member.joinedAt) })}
</span>
</>
}
diff --git a/apps/web/src/features/god/components/projects/GodProjectsTable.tsx b/apps/web/src/features/god/components/projects/GodProjectsTable.tsx
index 9f663f45..92c1161e 100644
--- a/apps/web/src/features/god/components/projects/GodProjectsTable.tsx
+++ b/apps/web/src/features/god/components/projects/GodProjectsTable.tsx
@@ -1,6 +1,7 @@
'use client';
import { Pencil } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { InstanceProject } from '@/lib/api';
import { formatShortDate } from '@/utils/dates';
import { Badge } from '@/components/ui/badge';
@@ -25,6 +26,9 @@ export default function GodProjectsTable({
projects: InstanceProject[];
onSelect: (projectId: number) => void;
}) {
+ const t = useTranslations('god.projects');
+ const tCommon = useTranslations('common');
+
return (
<Table className="min-w-[900px] table-fixed">
<colgroup>
@@ -38,14 +42,26 @@ export default function GodProjectsTable({
</colgroup>
<TableHeader>
<TableRow className="hover:bg-transparent">
- <TableHead className="text-xs font-medium text-muted-foreground">Project</TableHead>
- <TableHead className="text-xs font-medium text-muted-foreground">Members</TableHead>
- <TableHead className="text-xs font-medium text-muted-foreground">Issues</TableHead>
- <TableHead className="text-xs font-medium text-muted-foreground">Agents</TableHead>
- <TableHead className="text-xs font-medium text-muted-foreground">Last activity</TableHead>
- <TableHead className="text-xs font-medium text-muted-foreground">MCP</TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.project')}
+ </TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.members')}
+ </TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.issues')}
+ </TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.agents')}
+ </TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.lastActivity')}
+ </TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.mcp')}
+ </TableHead>
<TableHead className="text-right text-xs font-medium text-muted-foreground">
- Actions
+ {tCommon('actions')}
</TableHead>
</TableRow>
</TableHeader>
@@ -55,7 +71,7 @@ export default function GodProjectsTable({
key={p.id}
className="cursor-pointer"
onClick={() => onSelect(p.id)}
- title="Show project details"
+ title={t('showDetails')}
>
<TableCell className="px-3 py-3 align-top whitespace-normal">
<div className="flex min-w-0 flex-col gap-0.5">
@@ -66,7 +82,7 @@ export default function GodProjectsTable({
<span className="truncate text-sm font-medium">{p.name}</span>
</div>
<span className="text-xs text-muted-foreground">
- created {formatShortDate(p.createdAt)}
+ {t('created', { date: formatShortDate(p.createdAt) })}
</span>
</div>
</TableCell>
@@ -86,9 +102,9 @@ export default function GodProjectsTable({
{p.archivedIssueCount > 0 && (
<span
className="text-xs text-muted-foreground"
- title={`${p.archivedIssueCount} archived`}
+ title={t('archived', { count: p.archivedIssueCount })}
>
- {compactCount(p.archivedIssueCount)} archived
+ {t('archived', { count: compactCount(p.archivedIssueCount) })}
</span>
)}
</div>
@@ -102,17 +118,17 @@ export default function GodProjectsTable({
</TableCell>
<TableCell className="px-3 py-3 align-top text-xs text-muted-foreground">
- {p.lastActivityAt ? formatShortDate(p.lastActivityAt) : 'never'}
+ {p.lastActivityAt ? formatShortDate(p.lastActivityAt) : t('neverActive')}
</TableCell>
<TableCell className="px-3 py-3 align-top">
{p.mcpEnabled ? (
<Badge variant="secondary" className="px-1.5 py-0 text-[10px] font-medium">
- Enabled
+ {t('mcpEnabled')}
</Badge>
) : (
<Badge variant="outline" className="px-1.5 py-0 text-[10px] font-medium">
- Off
+ {t('mcpOff')}
</Badge>
)}
</TableCell>
@@ -122,8 +138,8 @@ export default function GodProjectsTable({
variant="ghost"
size="icon"
className="size-8 text-muted-foreground"
- aria-label="Open project"
- title="Open project"
+ aria-label={t('open')}
+ title={t('open')}
onClick={(e) => {
e.stopPropagation();
onSelect(p.id);
diff --git a/apps/web/src/features/god/components/users/GodUserDetailPanel.tsx b/apps/web/src/features/god/components/users/GodUserDetailPanel.tsx
index bfd48144..90d7de0b 100644
--- a/apps/web/src/features/god/components/users/GodUserDetailPanel.tsx
+++ b/apps/web/src/features/god/components/users/GodUserDetailPanel.tsx
@@ -3,6 +3,7 @@
import { useState, type ReactNode } from 'react';
import { Bot, FolderOpen, MailWarning, Shield, Trash2, TriangleAlert, X } from 'lucide-react';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import { formatDate, formatDateTime } from '@/utils/dates';
import { useExitOnEscape } from '@/hooks/useExitOnEscape';
import Avatar from '@/components/common/Avatar';
@@ -13,7 +14,7 @@ import { Button } from '@/components/ui/button';
import { Checkbox } from '@/components/ui/checkbox';
import { usePermissionCatalogQuery } from '@/services/roles.service';
import { useDeleteInstanceUser, useInstanceUserQuery } from '../../services/god.service';
-import { providerList } from '../../utils/providers';
+import { useProviderList } from '../../hooks/useProviderList';
import GodUserProjectCard from './GodUserProjectCard';
import GodUserVerifyButton from './GodUserVerifyButton';
@@ -38,6 +39,9 @@ export default function GodUserDetailPanel({
userId: string;
onClose: () => void;
}) {
+ const t = useTranslations('god.userPanel');
+ const tCommon = useTranslations('common');
+ const providerList = useProviderList();
const userQuery = useInstanceUserQuery(userId);
const catalogQuery = usePermissionCatalogQuery();
const deleteUser = useDeleteInstanceUser();
@@ -48,7 +52,6 @@ export default function GodUserDetailPanel({
// Projects this user owns alone. Deleting the account leaves them without anyone
// who can manage them, so the API refuses unless they are deleted along with it.
const soleOwned = (user?.projects ?? []).filter((p) => p.role === 'owner' && p.ownerCount === 1);
- const one = soleOwned.length === 1;
// Escape closes the confirm dialog first; the panel stays until it is gone.
useExitOnEscape(() => {
@@ -62,7 +65,7 @@ export default function GodUserDetailPanel({
async function confirmDelete() {
await deleteUser.mutateAsync({ userId, withProjects });
setConfirming(false);
- toast.success(withProjects ? 'Account and its projects deleted' : 'Account deleted');
+ toast.success(t(withProjects ? 'deletedWithProjects' : 'deleted'));
onClose();
}
@@ -81,7 +84,7 @@ export default function GodUserDetailPanel({
/>
<div className="min-w-0 space-y-1.5">
<h2 className="truncate text-base font-semibold">
- {user ? user.name || user.email : 'Loading…'}
+ {user ? user.name || user.email : tCommon('loading')}
</h2>
<p className="truncate text-xs text-muted-foreground">{user?.email}</p>
{user && (
@@ -89,11 +92,11 @@ export default function GodUserDetailPanel({
{user.role === 'god' ? (
<Badge className="gap-1 px-1.5 py-0 text-[10px] font-medium">
<Shield className="size-3" />
- Instance owner
+ {t('instanceOwner')}
</Badge>
) : (
<Badge variant="secondary" className="px-1.5 py-0 text-[10px] font-medium">
- User
+ {t('user')}
</Badge>
)}
{user.isAgent && (
@@ -102,19 +105,25 @@ export default function GodUserDetailPanel({
className="gap-1 px-1.5 py-0 text-[10px] font-medium"
>
<Bot className="size-3" />
- AI agent
+ {t('aiAgent')}
</Badge>
)}
{user.emailVerified && (
<Badge variant="outline" className="px-1.5 py-0 text-[10px] font-medium">
- Email verified
+ {t('emailVerified')}
</Badge>
)}
</div>
)}
</div>
</div>
- <Button variant="ghost" size="icon" className="size-7" onClick={onClose} title="Close">
+ <Button
+ variant="ghost"
+ size="icon"
+ className="size-7"
+ onClick={onClose}
+ title={tCommon('close')}
+ >
<X />
</Button>
</div>
@@ -128,43 +137,41 @@ export default function GodUserDetailPanel({
<div className="flex items-start gap-3 rounded-lg bg-muted/60 p-4">
<MailWarning className="mt-0.5 size-4 shrink-0 text-muted-foreground" />
<div className="min-w-0 flex-1 space-y-0.5">
- <p className="text-sm font-medium">Email address not confirmed</p>
- <p className="text-xs text-muted-foreground">
- Confirm it here when the link never reached them.
- </p>
+ <p className="text-sm font-medium">{t('unconfirmedTitle')}</p>
+ <p className="text-xs text-muted-foreground">{t('unconfirmedHint')}</p>
</div>
<GodUserVerifyButton userId={user.id} />
</div>
)}
<section className="grid grid-cols-2 gap-x-6 gap-y-5">
- <Fact label="Sign-in methods">
+ <Fact label={t('signInMethods')}>
{user.providers.length ? (
providerList(user.providers)
) : (
- <span className="text-muted-foreground">None linked</span>
+ <span className="text-muted-foreground">{t('noProviders')}</span>
)}
</Fact>
- <Fact label="Projects">
+ <Fact label={t('projects')}>
{user.projectCount === 0 ? (
- <span className="text-muted-foreground">None</span>
+ <span className="text-muted-foreground">{t('noProjects')}</span>
) : (
user.projectCount
)}
</Fact>
- <Fact label="Registered">{formatDate(user.createdAt)}</Fact>
- <Fact label="Last seen">
+ <Fact label={t('registered')}>{formatDate(user.createdAt)}</Fact>
+ <Fact label={t('lastSeen')}>
{user.lastSeenAt ? (
formatDateTime(user.lastSeenAt)
) : (
- <span className="text-muted-foreground">Never signed in</span>
+ <span className="text-muted-foreground">{t('neverSignedIn')}</span>
)}
</Fact>
</section>
<section className="space-y-3">
<div className="flex items-baseline gap-2">
- <h3 className="text-sm font-medium">Project access</h3>
+ <h3 className="text-sm font-medium">{t('projectAccess')}</h3>
{user.projects.length > 0 && (
<span className="text-xs text-muted-foreground">{user.projects.length}</span>
)}
@@ -172,9 +179,9 @@ export default function GodUserDetailPanel({
{user.projects.length === 0 ? (
<div className="flex flex-col items-center gap-2 rounded-lg bg-muted/30 px-6 py-10 text-center">
<FolderOpen className="size-5 text-muted-foreground" />
- <p className="text-sm font-medium">No project access</p>
+ <p className="text-sm font-medium">{t('noAccessTitle')}</p>
<p className="max-w-[36ch] text-xs text-muted-foreground">
- This account reaches nothing until someone invites it to a project.
+ {t('noAccessHint')}
</p>
</div>
) : (
@@ -195,9 +202,7 @@ export default function GodUserDetailPanel({
{removable && (
<div className="flex shrink-0 items-center justify-between gap-4 bg-muted/30 px-6 py-3">
- <p className="text-xs text-muted-foreground">
- Issues and comments stay, with the author unassigned.
- </p>
+ <p className="text-xs text-muted-foreground">{t('deleteHint')}</p>
<Button
variant="ghost"
size="sm"
@@ -208,7 +213,7 @@ export default function GodUserDetailPanel({
}}
>
<Trash2 />
- Delete
+ {tCommon('delete')}
</Button>
</div>
)}
@@ -216,9 +221,11 @@ export default function GodUserDetailPanel({
{confirming && user && (
<ConfirmDialog
- title="Delete account"
+ title={t('deleteTitle')}
confirmLabel={
- withProjects ? `Delete account and ${one ? 'project' : 'projects'}` : 'Delete account'
+ withProjects
+ ? t('deleteConfirmWithProjects', { count: soleOwned.length })
+ : t('deleteConfirm')
}
confirmDisabled={soleOwned.length > 0 && !withProjects}
onConfirm={confirmDelete}
@@ -226,9 +233,10 @@ export default function GodUserDetailPanel({
>
<div className="space-y-4">
<p className="text-sm text-muted-foreground">
- <span className="font-medium text-foreground">{user.name || user.email}</span> loses
- access to this instance. Issues and comments they wrote stay, with the author
- unassigned. This cannot be undone.
+ {t.rich('deleteMessage', {
+ name: user.name || user.email,
+ strong: (chunks) => <span className="font-medium text-foreground">{chunks}</span>,
+ })}
</p>
{soleOwned.length > 0 && (
@@ -237,7 +245,7 @@ export default function GodUserDetailPanel({
<TriangleAlert className="mt-0.5 size-4 shrink-0 text-destructive" />
<div className="min-w-0 space-y-2">
<p className="text-sm font-medium">
- Only owner of {one ? 'a project' : `${soleOwned.length} projects`}
+ {t('soleOwnerTitle', { count: soleOwned.length })}
</p>
<div className="flex flex-wrap gap-1">
{soleOwned.map((p) => (
@@ -250,7 +258,7 @@ export default function GodUserDetailPanel({
))}
</div>
<p className="text-xs text-muted-foreground">
- Once the account is gone, nobody can manage {one ? 'it' : 'them'}.
+ {t('soleOwnerHint', { count: soleOwned.length })}
</p>
</div>
</div>
@@ -263,12 +271,10 @@ export default function GodUserDetailPanel({
/>
<span className="space-y-0.5">
<span className="block text-sm">
- Delete {one ? 'the project' : 'the projects'} with the account
+ {t('deleteWithProjects', { count: soleOwned.length })}
</span>
<span className="block text-xs text-muted-foreground">
- {withProjects
- ? 'Everything inside goes too.'
- : 'Or cancel and add a second owner first.'}
+ {t(withProjects ? 'deleteWithProjectsOn' : 'deleteWithProjectsOff')}
</span>
</span>
</label>
diff --git a/apps/web/src/features/god/components/users/GodUserProjectCard.tsx b/apps/web/src/features/god/components/users/GodUserProjectCard.tsx
index 02c545bd..5dc75de8 100644
--- a/apps/web/src/features/god/components/users/GodUserProjectCard.tsx
+++ b/apps/web/src/features/god/components/users/GodUserProjectCard.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import type { InstanceUserProject, PermissionCatalog } from '@/lib/api';
import { formatShortDate } from '@/utils/dates';
import { Badge } from '@/components/ui/badge';
@@ -13,6 +14,8 @@ export default function GodUserProjectCard({
project: InstanceUserProject;
catalog: PermissionCatalog | undefined;
}) {
+ const t = useTranslations('god.access');
+ const tCommon = useTranslations('common');
const isOwner = project.role === 'owner';
return (
@@ -31,10 +34,10 @@ export default function GodUserProjectCard({
variant={isOwner ? 'default' : 'secondary'}
className="px-1.5 py-0 text-[10px] font-medium"
>
- {isOwner ? 'Owner' : (project.roleName ?? 'Member')}
+ {isOwner ? tCommon('owner') : (project.roleName ?? tCommon('member'))}
</Badge>
<span className="text-xs text-muted-foreground">
- joined {formatShortDate(project.joinedAt)}
+ {t('joined', { date: formatShortDate(project.joinedAt) })}
</span>
</>
}
diff --git a/apps/web/src/features/god/components/users/GodUserVerifyButton.tsx b/apps/web/src/features/god/components/users/GodUserVerifyButton.tsx
index 0e43b012..fdd2b3c9 100644
--- a/apps/web/src/features/god/components/users/GodUserVerifyButton.tsx
+++ b/apps/web/src/features/god/components/users/GodUserVerifyButton.tsx
@@ -2,18 +2,20 @@
import { MailCheck } from 'lucide-react';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import { Button } from '@/components/ui/button';
import { useVerifyInstanceUserEmail } from '../../services/god.service';
// Confirms an account's email address on the owner's behalf, for a user who cannot
// open the confirmation link (no mail provider, a lost message, a manual signup).
export default function GodUserVerifyButton({ userId }: { userId: string }) {
+ const t = useTranslations('god.userPanel');
const verify = useVerifyInstanceUserEmail();
async function run() {
try {
await verify.mutateAsync(userId);
- toast.success('Email address confirmed');
+ toast.success(t('verifyDone'));
} catch {
// The failure already surfaced through the global mutation error toast.
}
@@ -30,7 +32,7 @@ export default function GodUserVerifyButton({ userId }: { userId: string }) {
}}
>
<MailCheck />
- {verify.isPending ? 'Confirming…' : 'Mark verified'}
+ {verify.isPending ? t('verifying') : t('verify')}
</Button>
);
}
diff --git a/apps/web/src/features/god/components/users/GodUsersTable.tsx b/apps/web/src/features/god/components/users/GodUsersTable.tsx
index d5a3cc98..4f0434ae 100644
--- a/apps/web/src/features/god/components/users/GodUsersTable.tsx
+++ b/apps/web/src/features/god/components/users/GodUsersTable.tsx
@@ -1,6 +1,7 @@
'use client';
import { Bot, Pencil, Shield } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { InstanceUser } from '@/lib/api';
import { formatShortDate } from '@/utils/dates';
import Avatar from '@/components/common/Avatar';
@@ -14,7 +15,7 @@ import {
TableHeader,
TableRow,
} from '@/components/ui/table';
-import { providerList } from '../../utils/providers';
+import { useProviderList } from '../../hooks/useProviderList';
// The account list. A row (or the pencil in its Actions cell) opens the account in
// the side panel, where the email can be confirmed and the account deleted.
@@ -25,6 +26,10 @@ export default function GodUsersTable({
users: InstanceUser[];
onSelect: (userId: string) => void;
}) {
+ const t = useTranslations('god.users');
+ const tCommon = useTranslations('common');
+ const providerList = useProviderList();
+
return (
<Table className="min-w-[900px] table-fixed">
<colgroup>
@@ -38,14 +43,26 @@ export default function GodUsersTable({
</colgroup>
<TableHeader>
<TableRow className="hover:bg-transparent">
- <TableHead className="text-xs font-medium text-muted-foreground">Account</TableHead>
- <TableHead className="text-xs font-medium text-muted-foreground">Role</TableHead>
- <TableHead className="text-xs font-medium text-muted-foreground">Sign-in</TableHead>
- <TableHead className="text-xs font-medium text-muted-foreground">Projects</TableHead>
- <TableHead className="text-xs font-medium text-muted-foreground">Last seen</TableHead>
- <TableHead className="text-xs font-medium text-muted-foreground">Email</TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.account')}
+ </TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.role')}
+ </TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.signIn')}
+ </TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.projects')}
+ </TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.lastSeen')}
+ </TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.email')}
+ </TableHead>
<TableHead className="text-right text-xs font-medium text-muted-foreground">
- Actions
+ {tCommon('actions')}
</TableHead>
</TableRow>
</TableHeader>
@@ -55,7 +72,7 @@ export default function GodUsersTable({
key={u.id}
className="cursor-pointer"
onClick={() => onSelect(u.id)}
- title="Show project access"
+ title={t('showAccess')}
>
<TableCell className="px-3 py-3 align-top whitespace-normal">
<div className="flex min-w-0 items-start gap-2.5">
@@ -68,7 +85,7 @@ export default function GodUsersTable({
<span className="truncate text-sm font-medium">{u.name || u.email}</span>
<span className="truncate text-xs text-muted-foreground">{u.email}</span>
<span className="text-xs text-muted-foreground">
- joined {formatShortDate(u.createdAt)}
+ {t('registered', { date: formatShortDate(u.createdAt) })}
</span>
</div>
</div>
@@ -79,40 +96,40 @@ export default function GodUsersTable({
{u.role === 'god' ? (
<Badge className="gap-1 px-1.5 py-0 text-[10px] font-medium">
<Shield className="size-3" />
- God
+ {t('roleGod')}
</Badge>
) : (
<Badge variant="secondary" className="px-1.5 py-0 text-[10px] font-medium">
- User
+ {t('roleUser')}
</Badge>
)}
{u.isAgent && (
<Badge variant="secondary" className="gap-1 px-1.5 py-0 text-[10px] font-medium">
<Bot className="size-3" />
- Agent
+ {t('agent')}
</Badge>
)}
</div>
</TableCell>
<TableCell className="px-3 py-3 align-top text-xs text-muted-foreground">
- {u.providers.length ? providerList(u.providers) : 'none'}
+ {u.providers.length ? providerList(u.providers) : t('noProviders')}
</TableCell>
<TableCell className="px-3 py-3 align-top text-sm">{u.projectCount}</TableCell>
<TableCell className="px-3 py-3 align-top text-xs text-muted-foreground">
- {u.lastSeenAt ? formatShortDate(u.lastSeenAt) : 'never'}
+ {u.lastSeenAt ? formatShortDate(u.lastSeenAt) : t('neverSeen')}
</TableCell>
<TableCell className="px-3 py-3 align-top">
{u.emailVerified ? (
<Badge variant="secondary" className="px-1.5 py-0 text-[10px] font-medium">
- Verified
+ {t('verified')}
</Badge>
) : (
<Badge variant="outline" className="px-1.5 py-0 text-[10px] font-medium">
- Not verified
+ {t('notVerified')}
</Badge>
)}
</TableCell>
@@ -122,8 +139,8 @@ export default function GodUsersTable({
variant="ghost"
size="icon"
className="size-8 text-muted-foreground"
- aria-label="Open account"
- title="Open account"
+ aria-label={t('open')}
+ title={t('open')}
onClick={(e) => {
e.stopPropagation();
onSelect(u.id);
diff --git a/apps/web/src/features/god/components/users/GodUsersToolbar.tsx b/apps/web/src/features/god/components/users/GodUsersToolbar.tsx
index 25b0573f..02724420 100644
--- a/apps/web/src/features/god/components/users/GodUsersToolbar.tsx
+++ b/apps/web/src/features/god/components/users/GodUsersToolbar.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import type { InstanceUserKind } from '@/lib/api';
import {
Select,
@@ -23,23 +24,25 @@ export default function GodUsersToolbar({
kind: InstanceUserKind;
onKindChange: (value: InstanceUserKind) => void;
}) {
+ const t = useTranslations('god.users');
+
return (
<div className="flex flex-wrap items-center gap-3">
<GodSearchInput
value={search}
onChange={onSearchChange}
- placeholder="Search by name or email"
+ placeholder={t('searchPlaceholder')}
className="min-w-[240px] flex-1"
/>
<Select value={kind} onValueChange={(v) => onKindChange(v as InstanceUserKind)}>
- <SelectTrigger className="h-9 w-[160px]" aria-label="Account kind">
+ <SelectTrigger className="h-9 w-[160px]" aria-label={t('kind')}>
<SelectValue />
</SelectTrigger>
<SelectContent>
- <SelectItem value="human">Humans</SelectItem>
- <SelectItem value="agent">AI bots</SelectItem>
- <SelectItem value="all">All accounts</SelectItem>
+ <SelectItem value="human">{t('kinds.human')}</SelectItem>
+ <SelectItem value="agent">{t('kinds.agent')}</SelectItem>
+ <SelectItem value="all">{t('kinds.all')}</SelectItem>
</SelectContent>
</Select>
</div>
diff --git a/apps/web/src/features/god/hooks/useProviderList.ts b/apps/web/src/features/god/hooks/useProviderList.ts
new file mode 100644
index 00000000..6e3e0d40
--- /dev/null
+++ b/apps/web/src/features/god/hooks/useProviderList.ts
@@ -0,0 +1,18 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
+
+// Sign-in method labels. better-auth stores the password provider as "credential";
+// anything else is a social or passkey provider and keeps its own id, which the
+// messages may not carry — such a provider is listed under its id.
+export function useProviderList() {
+ const t = useTranslations('god.providers');
+
+ return (ids: string[]) =>
+ ids
+ .map((id) => {
+ const key = id as Parameters<typeof t.has>[0];
+ return t.has(key) ? t(key) : id;
+ })
+ .join(', ');
+}
diff --git a/apps/web/src/features/god/utils/providers.ts b/apps/web/src/features/god/utils/providers.ts
deleted file mode 100644
index 74ed8548..00000000
--- a/apps/web/src/features/god/utils/providers.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-// Sign-in method labels. better-auth stores the password provider as "credential";
-// anything else is a social or passkey provider and keeps its own id.
-const PROVIDER_LABELS: Record<string, string> = {
- credential: 'Password',
- google: 'Google',
- passkey: 'Passkey',
-};
-
-const providerLabel = (id: string) => PROVIDER_LABELS[id] ?? id;
-
-export const providerList = (ids: string[]) => ids.map(providerLabel).join(', ');
diff --git a/apps/web/src/features/inbox/components/InboxDetail.tsx b/apps/web/src/features/inbox/components/InboxDetail.tsx
index 5678af17..53660500 100644
--- a/apps/web/src/features/inbox/components/InboxDetail.tsx
+++ b/apps/web/src/features/inbox/components/InboxDetail.tsx
@@ -1,4 +1,7 @@
+'use client';
+
import { ChevronLeft } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { ProjectDetail } from '@/lib/api';
import { Button } from '@/components/ui/button';
import IssueDetailContent from '@/features/issue/components/detail/IssueDetailContent';
@@ -19,13 +22,15 @@ export default function InboxDetail({
onBack: () => void;
onDeleted: () => void;
}) {
+ const t = useTranslations('inbox');
+
return (
<div className="flex min-h-0 flex-1 flex-col">
{isMobile && (
<div className="flex h-11 shrink-0 items-center border-b px-2">
<Button variant="ghost" size="sm" className="gap-1.5" onClick={onBack}>
<ChevronLeft className="size-4" />
- Inbox
+ {t('backToList')}
</Button>
</div>
)}
diff --git a/apps/web/src/features/inbox/components/InboxItemActions.tsx b/apps/web/src/features/inbox/components/InboxItemActions.tsx
index f3b72da3..0972e048 100644
--- a/apps/web/src/features/inbox/components/InboxItemActions.tsx
+++ b/apps/web/src/features/inbox/components/InboxItemActions.tsx
@@ -1,5 +1,8 @@
+'use client';
+
import { type ElementType } from 'react';
import { CalendarClock, Clock, MailOpen, Trash2 } from 'lucide-react';
+import { useTranslations } from 'next-intl';
// The menu primitives to render with. DropdownMenu and ContextMenu expose the same
// component API, so the same item list backs both the "…" button and the row's
@@ -31,32 +34,34 @@ export default function InboxItemActions({
onPickDate: () => void;
onDelete: () => void;
}) {
+ const t = useTranslations('inbox.actions');
+ const tCommon = useTranslations('common');
const { Item, Separator, Sub, SubTrigger, SubContent } = menu;
return (
<>
<Item onSelect={() => onToggleRead(unread)}>
<MailOpen />
- {unread ? 'Mark as read' : 'Mark as unread'}
+ {unread ? t('markRead') : t('markUnread')}
</Item>
<Separator />
{snoozed ? (
<Item onSelect={() => onSnooze(null)}>
<Clock />
- Unsnooze
+ {t('unsnooze')}
</Item>
) : (
<Sub>
<SubTrigger>
<Clock />
- Snooze
+ {t('snooze')}
</SubTrigger>
<SubContent>
- <Item onSelect={() => onSnooze(daysFromNow(1))}>Tomorrow</Item>
- <Item onSelect={() => onSnooze(daysFromNow(7))}>In a week</Item>
+ <Item onSelect={() => onSnooze(daysFromNow(1))}>{t('tomorrow')}</Item>
+ <Item onSelect={() => onSnooze(daysFromNow(7))}>{t('inAWeek')}</Item>
<Separator />
<Item onSelect={onPickDate}>
<CalendarClock />
- Pick a date…
+ {t('pickDate')}
</Item>
</SubContent>
</Sub>
@@ -64,7 +69,7 @@ export default function InboxItemActions({
<Separator />
<Item variant="destructive" onSelect={onDelete}>
<Trash2 />
- Delete
+ {tCommon('delete')}
</Item>
</>
);
diff --git a/apps/web/src/features/inbox/components/InboxList.tsx b/apps/web/src/features/inbox/components/InboxList.tsx
index f6febdf6..eb55002d 100644
--- a/apps/web/src/features/inbox/components/InboxList.tsx
+++ b/apps/web/src/features/inbox/components/InboxList.tsx
@@ -1,6 +1,7 @@
'use client';
import { useEffect, useRef } from 'react';
+import { useTranslations } from 'next-intl';
import { type Notification } from '@/lib/api';
import ListSkeleton from '@/components/common/skeleton/ListSkeleton';
import InboxListItem from './InboxListItem';
@@ -31,6 +32,7 @@ export default function InboxList({
isFetchingNextPage: boolean;
onLoadMore: () => void;
}) {
+ const t = useTranslations('inbox');
const sentinelRef = useRef<HTMLDivElement | null>(null);
useEffect(() => {
@@ -51,7 +53,7 @@ export default function InboxList({
if (items.length === 0) {
return (
<div className="flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground">
- No notifications
+ {t('empty')}
</div>
);
}
diff --git a/apps/web/src/features/inbox/components/InboxListItem.tsx b/apps/web/src/features/inbox/components/InboxListItem.tsx
index efaea868..4b729a96 100644
--- a/apps/web/src/features/inbox/components/InboxListItem.tsx
+++ b/apps/web/src/features/inbox/components/InboxListItem.tsx
@@ -1,3 +1,5 @@
+'use client';
+
import { useState } from 'react';
import {
AtSign,
@@ -8,6 +10,7 @@ import {
UserRound,
type LucideIcon,
} from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { type Notification, type NotificationType } from '@/lib/api';
import { formatDurationShort } from '@/utils/dates';
import { cn } from '@/lib/utils';
@@ -43,23 +46,6 @@ const TYPE_ICON: Record<NotificationType, LucideIcon> = {
state_changed: CircleDot,
};
-// The verb phrase for a notification, addressed to the reader ("you").
-function notificationText(n: Notification): string {
- const who = n.actorName ?? 'Someone';
- switch (n.type) {
- case 'assigned':
- return `${who} assigned the issue to you`;
- case 'mentioned':
- return `${who} mentioned you`;
- case 'commented':
- return `${who} commented`;
- case 'state_changed':
- return n.fromState && n.toState
- ? `${who} changed the status from ${n.fromState} to ${n.toState}`
- : `${who} changed the status`;
- }
-}
-
const dropdownMenu = {
Item: DropdownMenuItem,
Separator: DropdownMenuSeparator,
@@ -95,9 +81,18 @@ export default function InboxListItem({
onSnooze: (until: string | null) => void;
onDelete: () => void;
}) {
+ const tCommon = useTranslations('common');
+ const te = useTranslations('inbox.event');
const [pickOpen, setPickOpen] = useState(false);
const Icon = TYPE_ICON[n.type];
- const eventText = notificationText(n);
+ const who = n.actorName ?? te('someone');
+ // The verb phrase for a notification, addressed to the reader ("you").
+ const eventText =
+ n.type === 'state_changed'
+ ? n.fromState && n.toState
+ ? te('stateChanged', { who, from: n.fromState, to: n.toState })
+ : te('stateChangedPlain', { who })
+ : te(n.type, { who });
const unread = n.readAt == null;
const snoozed = n.snoozedUntil != null && new Date(n.snoozedUntil).getTime() > Date.now();
@@ -162,7 +157,7 @@ export default function InboxListItem({
size="icon"
className="hidden size-6 group-hover:flex data-[state=open]:flex"
onClick={(e) => e.stopPropagation()}
- title="More"
+ title={tCommon('more')}
>
<MoreHorizontal />
</Button>
diff --git a/apps/web/src/features/inbox/components/InboxToolbar.tsx b/apps/web/src/features/inbox/components/InboxToolbar.tsx
index f601b32e..b61063ea 100644
--- a/apps/web/src/features/inbox/components/InboxToolbar.tsx
+++ b/apps/web/src/features/inbox/components/InboxToolbar.tsx
@@ -1,4 +1,7 @@
+'use client';
+
import { CheckCheck, ListFilter, MoreHorizontal, SlidersHorizontal, Trash2 } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { type NotificationFilters, type NotificationType } from '@/lib/api';
import { Button } from '@/components/ui/button';
import {
@@ -11,12 +14,7 @@ import {
DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu';
-const TYPE_LABELS: { value: NotificationType; label: string }[] = [
- { value: 'assigned', label: 'Assigned' },
- { value: 'mentioned', label: 'Mentioned' },
- { value: 'commented', label: 'Commented' },
- { value: 'state_changed', label: 'Status changed' },
-];
+const TYPES: NotificationType[] = ['assigned', 'mentioned', 'commented', 'state_changed'];
// The inbox list header: title with unread count, a type filter, display toggles
// (show read / snoozed), and the bulk-action menu.
@@ -35,6 +33,8 @@ export default function InboxToolbar({
onDeleteRead: () => void;
onDeleteReadCompleted: () => void;
}) {
+ const t = useTranslations('inbox');
+ const tCommon = useTranslations('common');
const selectedTypes = filters.types ?? [];
const toggleType = (type: NotificationType) => {
@@ -47,26 +47,26 @@ export default function InboxToolbar({
return (
<div className="flex items-center justify-between border-b px-4 py-3">
<div className="flex items-center gap-2">
- <span className="text-sm font-semibold">Inbox</span>
+ <span className="text-sm font-semibold">{t('title')}</span>
{unread > 0 && <span className="text-xs text-muted-foreground">{unread}</span>}
</div>
<div className="flex items-center gap-1">
<DropdownMenu>
<DropdownMenuTrigger asChild>
- <Button variant="ghost" size="icon" className="size-7" title="Filter">
+ <Button variant="ghost" size="icon" className="size-7" title={t('filter')}>
<ListFilter />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
- <DropdownMenuLabel>Notification type</DropdownMenuLabel>
- {TYPE_LABELS.map((t) => (
+ <DropdownMenuLabel>{t('notificationType')}</DropdownMenuLabel>
+ {TYPES.map((type) => (
<DropdownMenuCheckboxItem
- key={t.value}
- checked={selectedTypes.includes(t.value)}
- onCheckedChange={() => toggleType(t.value)}
+ key={type}
+ checked={selectedTypes.includes(type)}
+ onCheckedChange={() => toggleType(type)}
onSelect={(e) => e.preventDefault()}
>
- {t.label}
+ {t(`types.${type}`)}
</DropdownMenuCheckboxItem>
))}
</DropdownMenuContent>
@@ -74,7 +74,7 @@ export default function InboxToolbar({
<DropdownMenu>
<DropdownMenuTrigger asChild>
- <Button variant="ghost" size="icon" className="size-7" title="Display">
+ <Button variant="ghost" size="icon" className="size-7" title={t('display')}>
<SlidersHorizontal />
</Button>
</DropdownMenuTrigger>
@@ -84,37 +84,37 @@ export default function InboxToolbar({
onCheckedChange={(v) => onFiltersChange({ ...filters, includeRead: v })}
onSelect={(e) => e.preventDefault()}
>
- Show read
+ {t('showRead')}
</DropdownMenuCheckboxItem>
<DropdownMenuCheckboxItem
checked={filters.includeSnoozed === true}
onCheckedChange={(v) => onFiltersChange({ ...filters, includeSnoozed: v })}
onSelect={(e) => e.preventDefault()}
>
- Show snoozed
+ {t('showSnoozed')}
</DropdownMenuCheckboxItem>
</DropdownMenuContent>
</DropdownMenu>
<DropdownMenu>
<DropdownMenuTrigger asChild>
- <Button variant="ghost" size="icon" className="size-7" title="More">
+ <Button variant="ghost" size="icon" className="size-7" title={tCommon('more')}>
<MoreHorizontal />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuItem onSelect={onMarkAllRead}>
<CheckCheck />
- Mark all as read
+ {t('markAllRead')}
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem onSelect={onDeleteRead}>
<Trash2 />
- Delete all read
+ {t('deleteAllRead')}
</DropdownMenuItem>
<DropdownMenuItem onSelect={onDeleteReadCompleted}>
<Trash2 />
- Delete all read for completed issues
+ {t('deleteAllReadCompleted')}
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
diff --git a/apps/web/src/features/inbox/components/InboxView.tsx b/apps/web/src/features/inbox/components/InboxView.tsx
index 8949d72d..3d41b62e 100644
--- a/apps/web/src/features/inbox/components/InboxView.tsx
+++ b/apps/web/src/features/inbox/components/InboxView.tsx
@@ -1,6 +1,7 @@
'use client';
import { useMemo, useState } from 'react';
+import { useTranslations } from 'next-intl';
import { type Notification, type ProjectDetail } from '@/lib/api';
import { cn } from '@/lib/utils';
import { useLiveRefresh } from '@/hooks/useLiveRefresh';
@@ -21,6 +22,7 @@ import {
} from '../services/notifications.service';
export default function InboxView({ project }: { project: ProjectDetail }) {
+ const t = useTranslations('inbox');
const projectKey = project.project.key;
const projectId = project.project.id;
@@ -95,7 +97,7 @@ export default function InboxView({ project }: { project: ProjectDetail }) {
/>
) : (
<div className="hidden flex-1 items-center justify-center text-sm text-muted-foreground md:flex">
- Select a notification
+ {t('selectNotification')}
</div>
)}
</div>
diff --git a/apps/web/src/features/initiatives/InitiativeDetailPage.tsx b/apps/web/src/features/initiatives/InitiativeDetailPage.tsx
index 3bc5c3e7..624dc77d 100644
--- a/apps/web/src/features/initiatives/InitiativeDetailPage.tsx
+++ b/apps/web/src/features/initiatives/InitiativeDetailPage.tsx
@@ -1,6 +1,7 @@
'use client';
import { useParams, useRouter } from 'next/navigation';
+import { useTranslations } from 'next-intl';
import { useShell } from '@/context/shellContext';
import { useLiveRefresh } from '@/hooks/useLiveRefresh';
import { revScope } from '@/utils/revScopes';
@@ -17,6 +18,7 @@ import InitiativeOverview from './components/detail/InitiativeOverview';
// tab (the work items board over its linked issues). Each tab is its own route, so
// the open tab survives a reload; the route that mounts this page passes it.
export default function InitiativeDetailPage({ tab = 'overview' }: { tab?: InitiativeTab }) {
+ const t = useTranslations('initiatives');
const { project } = useShell();
const router = useRouter();
const params = useParams();
@@ -47,7 +49,7 @@ export default function InitiativeDetailPage({ tab = 'overview' }: { tab?: Initi
{query.isLoading ? (
<PageSkeleton className="mx-0 max-w-none px-6 py-8" />
) : !initiative ? (
- <p className="px-6 py-8 text-sm text-muted-foreground">Initiative not found.</p>
+ <p className="px-6 py-8 text-sm text-muted-foreground">{t('notFound')}</p>
) : (
<>
<InitiativeHeader initiative={initiative} project={project} />
@@ -60,8 +62,8 @@ export default function InitiativeDetailPage({ tab = 'overview' }: { tab?: Initi
>
<div className="px-6 pt-3">
<TabsList variant="line">
- <TabsTrigger value="overview">Overview</TabsTrigger>
- <TabsTrigger value="issues">Issues</TabsTrigger>
+ <TabsTrigger value="overview">{t('detailTabs.overview')}</TabsTrigger>
+ <TabsTrigger value="issues">{t('detailTabs.issues')}</TabsTrigger>
</TabsList>
</div>
<TabsContent value="overview" className="mt-0 flex-1 overflow-y-auto">
diff --git a/apps/web/src/features/initiatives/InitiativesPage.tsx b/apps/web/src/features/initiatives/InitiativesPage.tsx
index 272e54d9..d356463e 100644
--- a/apps/web/src/features/initiatives/InitiativesPage.tsx
+++ b/apps/web/src/features/initiatives/InitiativesPage.tsx
@@ -5,6 +5,7 @@ import { useRouter, useSearchParams } from 'next/navigation';
import { closestCenter, DndContext, type DragEndEvent } from '@dnd-kit/core';
import { horizontalListSortingStrategy, SortableContext } from '@dnd-kit/sortable';
import { Plus } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { useShell } from '@/context/shellContext';
import { usePermissions } from '@/hooks/usePermissions';
import { useInitiativeCountsQuery, useInitiativesQuery } from '@/services/initiatives.service';
@@ -29,6 +30,7 @@ const PAGE_SIZE = 25;
// they stay correct regardless of the current page. The tab strip is sortable by
// drag, and its order is a preference of the browser (see useInitiativeTabOrder).
export default function InitiativesPage({ tab }: { tab: InitiativesTab }) {
+ const t = useTranslations('initiatives');
const { project } = useShell();
const { can } = usePermissions();
const router = useRouter();
@@ -38,8 +40,8 @@ export default function InitiativesPage({ tab }: { tab: InitiativesTab }) {
const sensors = useStripSortSensors();
const projectKey = project?.project.key ?? null;
- const activeTab = INITIATIVE_TABS.find((t) => t.value === tab)!;
- const orderedTabs = order.map((value) => INITIATIVE_TABS.find((t) => t.value === value)!);
+ const activeTab = INITIATIVE_TABS.find((item) => item.value === tab)!;
+ const orderedTabs = order.map((value) => INITIATIVE_TABS.find((item) => item.value === value)!);
const pageParam = Number(searchParams.get('page'));
const page = Number.isInteger(pageParam) && pageParam > 0 ? pageParam : 1;
@@ -101,11 +103,11 @@ export default function InitiativesPage({ tab }: { tab: InitiativesTab }) {
return (
<div className="flex flex-1 flex-col overflow-y-auto">
<div className="flex items-center justify-between px-4 py-3">
- <h1 className="text-lg font-semibold">Initiatives</h1>
+ <h1 className="text-lg font-semibold">{t('title')}</h1>
{can('initiatives', 'create') && (
<Button size="sm" className="h-8 gap-1.5" onClick={() => setCreating(true)}>
<Plus className="size-3.5" />
- New initiative
+ {t('newInitiative')}
</Button>
)}
</div>
@@ -122,13 +124,13 @@ export default function InitiativesPage({ tab }: { tab: InitiativesTab }) {
onDragEnd={handleDragEnd}
>
<SortableContext items={order} strategy={horizontalListSortingStrategy}>
- {orderedTabs.map((t) => (
+ {orderedTabs.map((item) => (
<InitiativeTabTrigger
- key={t.value}
- value={t.value}
- label={t.label}
- count={tabCount(counts, t.value)}
- onSelect={() => changeTab(t.value)}
+ key={item.value}
+ value={item.value}
+ label={t(`tabs.${item.value}`)}
+ count={tabCount(counts, item.value)}
+ onSelect={() => changeTab(item.value)}
/>
))}
</SortableContext>
@@ -143,7 +145,7 @@ export default function InitiativesPage({ tab }: { tab: InitiativesTab }) {
isLoading={query.isLoading}
canCreate={can('initiatives', 'create')}
onCreate={() => setCreating(true)}
- statusLabel={activeTab.statuses ? activeTab.label : undefined}
+ statusTab={activeTab.value === 'all' ? undefined : activeTab.value}
sort={sort}
dir={dir}
onSort={changeSort}
diff --git a/apps/web/src/features/initiatives/components/detail/EditInitiativeDialog.tsx b/apps/web/src/features/initiatives/components/detail/EditInitiativeDialog.tsx
index 43caee16..d3c25854 100644
--- a/apps/web/src/features/initiatives/components/detail/EditInitiativeDialog.tsx
+++ b/apps/web/src/features/initiatives/components/detail/EditInitiativeDialog.tsx
@@ -1,6 +1,7 @@
'use client';
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import type { Initiative } from '@/lib/api';
import { useUpdateInitiative } from '@/services/initiatives.service';
import Modal from '@/components/common/overlay/Modal';
@@ -19,6 +20,8 @@ export default function EditInitiativeDialog({
projectKey: string;
onClose: () => void;
}) {
+ const t = useTranslations('initiatives');
+ const tCommon = useTranslations('common');
const [title, setTitle] = useState(initiative.title);
const [description, setDescription] = useState(initiative.description);
const update = useUpdateInitiative(projectKey);
@@ -34,10 +37,10 @@ export default function EditInitiativeDialog({
};
return (
- <Modal title="Edit initiative" projectKey={projectKey} onClose={onClose}>
+ <Modal title={t('form.editTitle')} projectKey={projectKey} onClose={onClose}>
<div className="flex flex-col gap-4">
<div className="flex flex-col gap-1.5">
- <Label htmlFor="edit-initiative-title">Title</Label>
+ <Label htmlFor="edit-initiative-title">{t('form.title')}</Label>
<Input
id="edit-initiative-title"
value={title}
@@ -47,21 +50,21 @@ export default function EditInitiativeDialog({
/>
</div>
<div className="flex flex-col gap-1.5">
- <Label htmlFor="edit-initiative-description">Description</Label>
+ <Label htmlFor="edit-initiative-description">{t('form.description')}</Label>
<Textarea
id="edit-initiative-description"
value={description}
- placeholder="What is this initiative about?"
+ placeholder={t('form.descriptionPlaceholder')}
className="min-h-32"
onChange={(e) => setDescription(e.target.value)}
/>
</div>
<div className="flex justify-end gap-2">
<Button variant="ghost" onClick={onClose}>
- Cancel
+ {tCommon('cancel')}
</Button>
<Button disabled={!title.trim() || update.isPending} onClick={() => void submit()}>
- {update.isPending ? 'Saving…' : 'Save changes'}
+ {update.isPending ? tCommon('saving') : t('form.save')}
</Button>
</div>
</div>
diff --git a/apps/web/src/features/initiatives/components/detail/InitiativeActions.tsx b/apps/web/src/features/initiatives/components/detail/InitiativeActions.tsx
index a0e896af..c55f6eb3 100644
--- a/apps/web/src/features/initiatives/components/detail/InitiativeActions.tsx
+++ b/apps/web/src/features/initiatives/components/detail/InitiativeActions.tsx
@@ -3,6 +3,7 @@
import { useState } from 'react';
import { useRouter } from 'next/navigation';
import { MoreHorizontal, Pencil, Trash2 } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { Initiative } from '@/lib/api';
import { initiativesPath } from '@/utils/paths';
import { usePermissions } from '@/hooks/usePermissions';
@@ -24,6 +25,8 @@ export default function InitiativeActions({
initiative: Initiative;
projectKey: string;
}) {
+ const t = useTranslations('initiatives');
+ const tCommon = useTranslations('common');
const { can } = usePermissions();
const del = useDeleteInitiative(projectKey);
const router = useRouter();
@@ -44,7 +47,7 @@ export default function InitiativeActions({
<DropdownMenuTrigger asChild>
<button
type="button"
- aria-label="Initiative options"
+ aria-label={t('options')}
className="rounded p-0.5 text-muted-foreground/60 hover:text-foreground"
>
<MoreHorizontal className="size-4" />
@@ -54,14 +57,14 @@ export default function InitiativeActions({
{canEdit && (
<DropdownMenuItem onClick={() => setEditing(true)}>
<Pencil className="size-4" />
- Edit
+ {tCommon('edit')}
</DropdownMenuItem>
)}
{canEdit && canDelete && <DropdownMenuSeparator />}
{canDelete && (
<DropdownMenuItem variant="destructive" onClick={() => void remove()}>
<Trash2 className="size-4" />
- Delete
+ {tCommon('delete')}
</DropdownMenuItem>
)}
</DropdownMenuContent>
diff --git a/apps/web/src/features/initiatives/components/detail/InitiativeActiveWork.tsx b/apps/web/src/features/initiatives/components/detail/InitiativeActiveWork.tsx
index d364d039..f8df9b77 100644
--- a/apps/web/src/features/initiatives/components/detail/InitiativeActiveWork.tsx
+++ b/apps/web/src/features/initiatives/components/detail/InitiativeActiveWork.tsx
@@ -1,6 +1,7 @@
'use client';
import { useMemo } from 'react';
+import { useTranslations } from 'next-intl';
import type { ProjectDetail } from '@/lib/api';
import { useShell } from '@/context/shellContext';
import { StateIcon } from '@/features/issue/components/shared/IssueIcons';
@@ -15,6 +16,7 @@ export default function InitiativeActiveWork({
project: ProjectDetail;
initiativeId: number;
}) {
+ const t = useTranslations('initiatives');
const { onOpenIssue } = useShell();
const rows = useMemo(() => {
@@ -32,7 +34,7 @@ export default function InitiativeActiveWork({
return (
<div className="mt-8">
<h3 className="mb-3 text-xs font-medium tracking-wide text-muted-foreground uppercase">
- In progress <span className="tabular-nums">· {rows.length}</span>
+ {t('inProgress')} <span className="tabular-nums">· {rows.length}</span>
</h3>
<ul className="divide-border overflow-hidden rounded-lg border">
{rows.map(({ issue, column }) => {
diff --git a/apps/web/src/features/initiatives/components/detail/InitiativeActivityFeed.tsx b/apps/web/src/features/initiatives/components/detail/InitiativeActivityFeed.tsx
index 722cbb75..d1f26c6b 100644
--- a/apps/web/src/features/initiatives/components/detail/InitiativeActivityFeed.tsx
+++ b/apps/web/src/features/initiatives/components/detail/InitiativeActivityFeed.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import { useInitiativeFeedQuery } from '@/services/initiatives.service';
import ShowMoreButton from '@/components/common/ShowMoreButton';
import ListSkeleton from '@/components/common/skeleton/ListSkeleton';
@@ -14,6 +15,7 @@ export default function InitiativeActivityFeed({
initiativeId: number;
projectKey: string;
}) {
+ const t = useTranslations('initiatives');
const feed = useInitiativeFeedQuery(initiativeId);
// Pages can overlap when new activity shifts the offset, so drop repeated ids.
@@ -22,7 +24,7 @@ export default function InitiativeActivityFeed({
if (feed.isLoading) return <ListSkeleton rows={3} rowClassName="h-12" />;
- if (items.length === 0) return <p className="text-sm text-muted-foreground">No activity yet.</p>;
+ if (items.length === 0) return <p className="text-sm text-muted-foreground">{t('noActivity')}</p>;
return (
<>
diff --git a/apps/web/src/features/initiatives/components/detail/InitiativeFeedRow.tsx b/apps/web/src/features/initiatives/components/detail/InitiativeFeedRow.tsx
index 6200b7b5..85f8b26a 100644
--- a/apps/web/src/features/initiatives/components/detail/InitiativeFeedRow.tsx
+++ b/apps/web/src/features/initiatives/components/detail/InitiativeFeedRow.tsx
@@ -1,7 +1,8 @@
'use client';
import Link from 'next/link';
-import { formatDistanceToNow, parseISO } from 'date-fns';
+import { parseISO } from 'date-fns';
+import { useFormatter, useTranslations } from 'next-intl';
import {
CircleDot,
CirclePlus,
@@ -16,7 +17,7 @@ import {
import type { InitiativeFeedItem } from '@/lib/api';
import { formatDate } from '@/utils/dates';
import { issuePath } from '@/utils/paths';
-import { priorityLabel } from '@/utils/fieldOptions';
+import { usePriorityLabel } from '@/hooks/usePriorityLabel';
import { STATUS_META } from '@/utils/initiativeMeta';
const ICON: Record<string, typeof CircleDot> = {
@@ -38,49 +39,6 @@ const ICON: Record<string, typeof CircleDot> = {
};
const fmtDate = (v: string | null) => (v ? formatDate(v) : '');
-const statusLabel = (v: string | null) =>
- v && v in STATUS_META ? STATUS_META[v as keyof typeof STATUS_META].label : v;
-
-// The verb phrase for one event. Initiative-source rows use initiative wording;
-// issue-source rows describe the issue change (the issue is named separately).
-function describe(a: InitiativeFeedItem): string {
- const onInitiative = a.source === 'initiative';
- switch (a.action) {
- case 'created':
- return onInitiative ? 'created the initiative' : 'created the issue';
- case 'title':
- return `renamed to “${a.toText}”`;
- case 'description':
- return a.toText ? 'updated the description' : 'cleared the description';
- case 'status':
- if (onInitiative) return `set status to ${statusLabel(a.toText)}`;
- return a.fromText ? `moved from ${a.fromText} to ${a.toText}` : `set status to ${a.toText}`;
- case 'priority':
- return a.toText ? `set priority to ${priorityLabel(a.toText)}` : 'removed priority';
- case 'owner':
- return a.toText ? `set owner to ${a.toText}` : `removed owner ${a.fromText}`;
- case 'assignee':
- return a.toText ? `assigned to ${a.toText}` : `removed assignee ${a.fromText}`;
- case 'delegate':
- return a.toText ? `delegated to ${a.toText}` : `removed delegate ${a.fromText}`;
- case 'target_date':
- return a.toText ? `set target date to ${fmtDate(a.toText)}` : 'removed target date';
- case 'start_date':
- return a.toText ? `set start date to ${fmtDate(a.toText)}` : 'removed start date';
- case 'due_date':
- return a.toText ? `set due date to ${fmtDate(a.toText)}` : 'removed due date';
- case 'label_add':
- return `added label ${a.toText}`;
- case 'label_remove':
- return `removed label ${a.fromText}`;
- case 'type':
- return a.toText ? `set type to ${a.toText}` : 'removed type';
- case 'initiative':
- return a.toText ? `linked to ${a.toText}` : 'unlinked from the initiative';
- default:
- return a.action ?? '';
- }
-}
export default function InitiativeFeedRow({
item,
@@ -89,8 +47,69 @@ export default function InitiativeFeedRow({
item: InitiativeFeedItem;
projectKey: string;
}) {
+ const t = useTranslations('initiatives.feed');
+ const tStatus = useTranslations('initiatives.status');
+ const priorityLabel = usePriorityLabel();
+ const format = useFormatter();
+
+ // A status the initiative lifecycle knows is named in the reader's language; an
+ // issue status is a project column and keeps the name the project gave it.
+ const statusLabel = (v: string | null) =>
+ v && v in STATUS_META ? tStatus(v as keyof typeof STATUS_META) : v;
+
+ // The verb phrase for one event. Initiative-source rows use initiative wording;
+ // issue-source rows describe the issue change (the issue is named separately).
+ const describe = (a: InitiativeFeedItem): string => {
+ const onInitiative = a.source === 'initiative';
+ switch (a.action) {
+ case 'created':
+ return onInitiative ? t('createdInitiative') : t('createdIssue');
+ case 'title':
+ return t('renamed', { title: a.toText ?? '' });
+ case 'description':
+ return a.toText ? t('descriptionUpdated') : t('descriptionCleared');
+ case 'status':
+ if (onInitiative) return t('statusSet', { status: statusLabel(a.toText) ?? '' });
+ return a.fromText
+ ? t('statusMoved', { from: a.fromText, to: a.toText ?? '' })
+ : t('statusSet', { status: a.toText ?? '' });
+ case 'priority':
+ return a.toText
+ ? t('prioritySet', { priority: priorityLabel(a.toText) })
+ : t('priorityRemoved');
+ case 'owner':
+ return a.toText
+ ? t('ownerSet', { name: a.toText })
+ : t('ownerRemoved', { name: a.fromText ?? '' });
+ case 'assignee':
+ return a.toText
+ ? t('assigneeSet', { name: a.toText })
+ : t('assigneeRemoved', { name: a.fromText ?? '' });
+ case 'delegate':
+ return a.toText
+ ? t('delegateSet', { name: a.toText })
+ : t('delegateRemoved', { name: a.fromText ?? '' });
+ case 'target_date':
+ return a.toText ? t('targetDateSet', { date: fmtDate(a.toText) }) : t('targetDateRemoved');
+ case 'start_date':
+ return a.toText ? t('startDateSet', { date: fmtDate(a.toText) }) : t('startDateRemoved');
+ case 'due_date':
+ return a.toText ? t('dueDateSet', { date: fmtDate(a.toText) }) : t('dueDateRemoved');
+ case 'label_add':
+ return t('labelAdded', { label: a.toText ?? '' });
+ case 'label_remove':
+ return t('labelRemoved', { label: a.fromText ?? '' });
+ case 'type':
+ return a.toText ? t('typeSet', { type: a.toText }) : t('typeRemoved');
+ case 'initiative':
+ return a.toText ? t('linked', { name: a.toText }) : t('unlinked');
+ default:
+ return a.action ?? '';
+ }
+ };
+
const Icon = (item.action && ICON[item.action]) || CircleDot;
- const actor = item.actorName ?? 'System';
+ const actor = item.actorName ?? t('system');
return (
<li className="flex items-center gap-2.5 text-xs">
<span className="flex size-5 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground">
@@ -109,9 +128,7 @@ export default function InitiativeFeedRow({
</Link>
</>
)}
- <span className="ml-1.5">
- · {formatDistanceToNow(parseISO(item.createdAt), { addSuffix: true })}
- </span>
+ <span className="ml-1.5">· {format.relativeTime(parseISO(item.createdAt))}</span>
</span>
</li>
);
diff --git a/apps/web/src/features/initiatives/components/detail/InitiativeHeader.tsx b/apps/web/src/features/initiatives/components/detail/InitiativeHeader.tsx
index aa649778..08162712 100644
--- a/apps/web/src/features/initiatives/components/detail/InitiativeHeader.tsx
+++ b/apps/web/src/features/initiatives/components/detail/InitiativeHeader.tsx
@@ -1,6 +1,7 @@
'use client';
import { Info } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { Initiative, InitiativePatch, ProjectDetail } from '@/lib/api';
import { useUpdateInitiative } from '@/services/initiatives.service';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
@@ -23,6 +24,7 @@ export default function InitiativeHeader({
initiative: Initiative;
project: ProjectDetail;
}) {
+ const t = useTranslations('initiatives');
const update = useUpdateInitiative(project.project.key);
const hasDescription = initiative.description.trim().length > 0;
@@ -45,7 +47,7 @@ export default function InitiativeHeader({
<PopoverTrigger asChild>
<button
type="button"
- aria-label="Show description"
+ aria-label={t('showDescription')}
className="rounded p-0.5 text-muted-foreground/60 hover:text-foreground"
>
<Info className="size-3.5" />
@@ -71,7 +73,7 @@ export default function InitiativeHeader({
assignees={project.assignees}
value={initiative.ownerUserId}
onChange={(ownerUserId) => patch({ ownerUserId })}
- placeholder="No owner"
+ placeholder={t('noOwner')}
/>
<PrioritySelect
value={initiative.priority ?? ''}
@@ -79,7 +81,7 @@ export default function InitiativeHeader({
/>
<DatePill
value={initiative.targetDate}
- placeholder="Target date"
+ placeholder={t('targetDate')}
onChange={(v) => patch({ targetDate: v })}
/>
<LabelsSelect
diff --git a/apps/web/src/features/initiatives/components/detail/InitiativeOverview.tsx b/apps/web/src/features/initiatives/components/detail/InitiativeOverview.tsx
index d766b440..7f122c2b 100644
--- a/apps/web/src/features/initiatives/components/detail/InitiativeOverview.tsx
+++ b/apps/web/src/features/initiatives/components/detail/InitiativeOverview.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import type { Initiative, ProjectDetail } from '@/lib/api';
import InitiativeActivityFeed from './InitiativeActivityFeed';
import InitiativeActiveWork from './InitiativeActiveWork';
@@ -15,6 +16,7 @@ export default function InitiativeOverview({
initiative: Initiative;
project: ProjectDetail;
}) {
+ const t = useTranslations('initiatives');
const projectKey = project.project.key;
const hasDescription = initiative.description.trim().length > 0;
@@ -27,7 +29,7 @@ export default function InitiativeOverview({
{initiative.description}
</p>
) : (
- <p className="mt-4 text-sm text-muted-foreground/60 italic">No description.</p>
+ <p className="mt-4 text-sm text-muted-foreground/60 italic">{t('noDescription')}</p>
)}
<div className="mt-8 grid gap-8 sm:grid-cols-2 sm:gap-10">
@@ -40,7 +42,7 @@ export default function InitiativeOverview({
<aside className="min-w-0 lg:w-1/3">
<h3 className="mb-4 text-xs font-medium tracking-wide text-muted-foreground uppercase">
- Activity
+ {t('activity')}
</h3>
<InitiativeActivityFeed initiativeId={initiative.id} projectKey={projectKey} />
</aside>
diff --git a/apps/web/src/features/initiatives/components/detail/InitiativeStateBreakdown.tsx b/apps/web/src/features/initiatives/components/detail/InitiativeStateBreakdown.tsx
index 9f1ef1c3..37f72e97 100644
--- a/apps/web/src/features/initiatives/components/detail/InitiativeStateBreakdown.tsx
+++ b/apps/web/src/features/initiatives/components/detail/InitiativeStateBreakdown.tsx
@@ -1,19 +1,21 @@
'use client';
import { useMemo } from 'react';
+import { useTranslations } from 'next-intl';
import type { ProjectDetail, StateType } from '@/lib/api';
// The initiative's linked issues counted per state group. Complements the header
// progress pill with the full distribution (backlog through canceled).
// Colors are fixed per group rather than taken from the columns, because a group
-// spans several columns with their own colors.
-const GROUPS: { type: StateType; label: string; color: string }[] = [
- { type: 'backlog', label: 'Backlog', color: '#a1a1aa' },
- { type: 'unstarted', label: 'Todo', color: '#64748b' },
- { type: 'started', label: 'In Progress', color: '#eab308' },
- { type: 'completed', label: 'Done', color: '#22c55e' },
- { type: 'canceled', label: 'Canceled', color: '#ef4444' },
+// spans several columns with their own colors. The label of a group is a message
+// under `initiatives.stateGroups`.
+const GROUPS: { type: StateType; color: string }[] = [
+ { type: 'backlog', color: '#a1a1aa' },
+ { type: 'unstarted', color: '#64748b' },
+ { type: 'started', color: '#eab308' },
+ { type: 'completed', color: '#22c55e' },
+ { type: 'canceled', color: '#ef4444' },
];
export default function InitiativeStateBreakdown({
@@ -23,6 +25,7 @@ export default function InitiativeStateBreakdown({
project: ProjectDetail;
initiativeId: number;
}) {
+ const t = useTranslations('initiatives');
const counts = useMemo(() => {
const stateByColumn = new Map(project.columns.map((c) => [c.id, c.stateType]));
const acc: Record<StateType, number> = {
@@ -45,10 +48,10 @@ export default function InitiativeStateBreakdown({
return (
<div>
<h4 className="mb-2.5 text-xs font-medium tracking-wide text-muted-foreground uppercase">
- Progress
+ {t('progress')}
</h4>
{total === 0 ? (
- <p className="text-sm text-muted-foreground">No issues linked yet.</p>
+ <p className="text-sm text-muted-foreground">{t('noIssuesLinked')}</p>
) : (
<ul className="flex flex-col gap-1.5">
{GROUPS.map((g) => (
@@ -57,7 +60,7 @@ export default function InitiativeStateBreakdown({
className="inline-block size-2 rounded-full"
style={{ backgroundColor: g.color }}
/>
- <span className="text-muted-foreground">{g.label}</span>
+ <span className="text-muted-foreground">{t(`stateGroups.${g.type}`)}</span>
<span className="ml-auto text-foreground tabular-nums">{counts[g.type]}</span>
</li>
))}
diff --git a/apps/web/src/features/initiatives/components/detail/InitiativeTimeline.tsx b/apps/web/src/features/initiatives/components/detail/InitiativeTimeline.tsx
index 8d1a600a..7223c1d2 100644
--- a/apps/web/src/features/initiatives/components/detail/InitiativeTimeline.tsx
+++ b/apps/web/src/features/initiatives/components/detail/InitiativeTimeline.tsx
@@ -1,6 +1,7 @@
'use client';
import { parseISO, differenceInCalendarDays } from 'date-fns';
+import { useTranslations } from 'next-intl';
import type { Initiative } from '@/lib/api';
import { formatDate } from '@/utils/dates';
import HealthBadge from '../shared/HealthBadge';
@@ -13,13 +14,8 @@ import InitiativeTimelineMeter from './InitiativeTimelineMeter';
const clamp01 = (v: number) => Math.min(Math.max(v, 0), 1);
-function remainingLabel(daysLeft: number): string {
- if (daysLeft < 0) return `${-daysLeft}d overdue`;
- if (daysLeft === 0) return 'Due today';
- return `${daysLeft}d left`;
-}
-
export default function InitiativeTimeline({ initiative }: { initiative: Initiative }) {
+ const t = useTranslations('initiatives.timeline');
const { startDate, targetDate, createdAt, progress } = initiative;
const start = startDate ?? createdAt;
const denom = progress.total - progress.canceled;
@@ -36,12 +32,18 @@ export default function InitiativeTimeline({ initiative }: { initiative: Initiat
daysLeft = differenceInCalendarDays(parseISO(targetDate), now);
}
+ const remaining = (days: number) => {
+ if (days < 0) return t('overdue', { days: -days });
+ if (days === 0) return t('dueToday');
+ return t('left', { days });
+ };
+
return (
<div>
<div className="mb-2.5 flex items-center justify-between gap-2">
<div className="flex items-center gap-1">
<h4 className="text-xs font-medium tracking-wide text-muted-foreground uppercase">
- Timeline
+ {t('title')}
</h4>
<HealthInfoPopover />
</div>
@@ -51,31 +53,31 @@ export default function InitiativeTimeline({ initiative }: { initiative: Initiat
<dl className="mb-3 flex flex-col gap-1.5 text-sm">
{startDate && (
<div className="flex justify-between">
- <dt className="text-muted-foreground">Started</dt>
+ <dt className="text-muted-foreground">{t('started')}</dt>
<dd>{formatDate(startDate)}</dd>
</div>
)}
{targetDate && (
<div className="flex justify-between">
- <dt className="text-muted-foreground">Target</dt>
+ <dt className="text-muted-foreground">{t('target')}</dt>
<dd>{formatDate(targetDate)}</dd>
</div>
)}
{daysLeft != null && (
<div className="flex justify-between">
- <dt className="text-muted-foreground">Remaining</dt>
- <dd className={daysLeft < 0 ? 'text-destructive' : ''}>{remainingLabel(daysLeft)}</dd>
+ <dt className="text-muted-foreground">{t('remaining')}</dt>
+ <dd className={daysLeft < 0 ? 'text-destructive' : ''}>{remaining(daysLeft)}</dd>
</div>
)}
</dl>
{targetDate ? (
<div className="flex flex-col gap-2.5">
- <InitiativeTimelineMeter label="Time elapsed" pct={elapsed ?? 0} />
- <InitiativeTimelineMeter label="Work done" pct={work} />
+ <InitiativeTimelineMeter label={t('timeElapsed')} pct={elapsed ?? 0} />
+ <InitiativeTimelineMeter label={t('workDone')} pct={work} />
</div>
) : (
- <p className="text-sm text-muted-foreground">Set a target date to track pace.</p>
+ <p className="text-sm text-muted-foreground">{t('noTargetDate')}</p>
)}
</div>
);
diff --git a/apps/web/src/features/initiatives/components/list/CreateInitiativeDialog.tsx b/apps/web/src/features/initiatives/components/list/CreateInitiativeDialog.tsx
index db3e0455..673d4bb4 100644
--- a/apps/web/src/features/initiatives/components/list/CreateInitiativeDialog.tsx
+++ b/apps/web/src/features/initiatives/components/list/CreateInitiativeDialog.tsx
@@ -1,5 +1,6 @@
import { useState } from 'react';
import { useRouter } from 'next/navigation';
+import { useTranslations } from 'next-intl';
import { initiativePath } from '@/utils/paths';
import { useCreateInitiative } from '@/services/initiatives.service';
import Modal from '@/components/common/overlay/Modal';
@@ -18,6 +19,8 @@ export default function CreateInitiativeDialog({
projectKey: string;
onClose: () => void;
}) {
+ const t = useTranslations('initiatives');
+ const tCommon = useTranslations('common');
const [title, setTitle] = useState('');
const [description, setDescription] = useState('');
const create = useCreateInitiative(projectKey);
@@ -32,34 +35,34 @@ export default function CreateInitiativeDialog({
};
return (
- <Modal title="New initiative" projectKey={projectKey} onClose={onClose}>
+ <Modal title={t('newInitiative')} projectKey={projectKey} onClose={onClose}>
<div className="flex flex-col gap-4">
<div className="flex flex-col gap-1.5">
- <Label htmlFor="initiative-title">Title</Label>
+ <Label htmlFor="initiative-title">{t('form.title')}</Label>
<Input
id="initiative-title"
value={title}
autoFocus
- placeholder="Q3 Launch"
+ placeholder={t('form.titlePlaceholder')}
onChange={(e) => setTitle(e.target.value)}
onKeyDown={(e) => e.key === 'Enter' && title.trim() && void submit()}
/>
</div>
<div className="flex flex-col gap-1.5">
- <Label htmlFor="initiative-description">Description</Label>
+ <Label htmlFor="initiative-description">{t('form.description')}</Label>
<Textarea
id="initiative-description"
value={description}
- placeholder="What is this initiative about?"
+ placeholder={t('form.descriptionPlaceholder')}
onChange={(e) => setDescription(e.target.value)}
/>
</div>
<div className="flex justify-end gap-2">
<Button variant="ghost" onClick={onClose}>
- Cancel
+ {tCommon('cancel')}
</Button>
<Button disabled={!title.trim() || create.isPending} onClick={() => void submit()}>
- {create.isPending ? 'Creating…' : 'Create initiative'}
+ {create.isPending ? t('form.creating') : t('form.create')}
</Button>
</div>
</div>
diff --git a/apps/web/src/features/initiatives/components/list/InitiativeRow.tsx b/apps/web/src/features/initiatives/components/list/InitiativeRow.tsx
index cc68b88f..a5b9f490 100644
--- a/apps/web/src/features/initiatives/components/list/InitiativeRow.tsx
+++ b/apps/web/src/features/initiatives/components/list/InitiativeRow.tsx
@@ -1,11 +1,13 @@
import Link from 'next/link';
import { useRouter } from 'next/navigation';
import { Minus } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { Initiative, Assignee } from '@/lib/api';
import { initiativePath } from '@/utils/paths';
import { formatShortDate } from '@/utils/dates';
import { AssigneeAvatar } from '@/features/issue/components/shared/IssueBadges';
import { PriorityIcon } from '@/features/issue/components/shared/IssueIcons';
+import { usePriorityLabel } from '@/hooks/usePriorityLabel';
import { colorDot } from '@/components/common/fields/colorDot';
import { TableCell, TableRow } from '@/components/ui/table';
import { STATUS_META } from '@/utils/initiativeMeta';
@@ -23,6 +25,8 @@ export default function InitiativeRow({
projectKey: string;
owner: Assignee | null;
}) {
+ const t = useTranslations('initiatives');
+ const priorityLabel = usePriorityLabel();
const router = useRouter();
const href = initiativePath(projectKey, initiative.id);
@@ -52,7 +56,7 @@ export default function InitiativeRow({
{initiative.priority ? (
<span className="flex items-center gap-1.5 text-sm">
<PriorityIcon priority={initiative.priority} className="size-3.5" />
- <span className="text-muted-foreground capitalize">{initiative.priority}</span>
+ <span className="text-muted-foreground">{priorityLabel(initiative.priority)}</span>
</span>
) : (
<Minus className="size-3.5 text-muted-foreground" />
@@ -66,7 +70,7 @@ export default function InitiativeRow({
<span className="truncate text-muted-foreground">{owner.name}</span>
</span>
) : (
- <span className="text-sm text-muted-foreground">Unassigned</span>
+ <span className="text-sm text-muted-foreground">{t('noOwner')}</span>
)}
</TableCell>
diff --git a/apps/web/src/features/initiatives/components/list/InitiativesList.tsx b/apps/web/src/features/initiatives/components/list/InitiativesList.tsx
index 53b778be..506242d6 100644
--- a/apps/web/src/features/initiatives/components/list/InitiativesList.tsx
+++ b/apps/web/src/features/initiatives/components/list/InitiativesList.tsx
@@ -1,5 +1,7 @@
import { ChevronDown, ChevronUp, Plus } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { Initiative, InitiativeSort, ProjectDetail } from '@/lib/api';
+import type { InitiativesTab } from '@/utils/paths';
import { Button } from '@/components/ui/button';
import { Table, TableBody, TableHead, TableHeader, TableRow } from '@/components/ui/table';
import { EmptyState } from '@/components/common/page/EmptyState';
@@ -8,13 +10,15 @@ import InitiativeRow from './InitiativeRow';
// Columns in table order. A `sort` key marks the column as sortable; progress and
// health are derived per row and cannot be sorted server-side.
-const COLUMNS: { label: string; sort?: InitiativeSort }[] = [
- { label: 'Name', sort: 'title' },
- { label: 'Priority', sort: 'priority' },
- { label: 'Owner', sort: 'owner' },
- { label: 'Target', sort: 'targetDate' },
- { label: 'Progress' },
- { label: 'Health' },
+type ColumnKey = 'name' | 'priority' | 'owner' | 'target' | 'progress' | 'health';
+
+const COLUMNS: { key: ColumnKey; sort?: InitiativeSort }[] = [
+ { key: 'name', sort: 'title' },
+ { key: 'priority', sort: 'priority' },
+ { key: 'owner', sort: 'owner' },
+ { key: 'target', sort: 'targetDate' },
+ { key: 'progress' },
+ { key: 'health' },
];
export default function InitiativesList({
@@ -23,7 +27,7 @@ export default function InitiativesList({
isLoading,
canCreate,
onCreate,
- statusLabel,
+ statusTab,
sort,
dir,
onSort,
@@ -33,34 +37,29 @@ export default function InitiativesList({
isLoading: boolean;
canCreate: boolean;
onCreate: () => void;
- // The label of the open status tab, absent on the tab that lists every status.
- // An empty status tab is a filtered view, not a first run, so it says so.
- statusLabel: string | undefined;
+ // The open status tab, absent on the tab that lists every status. An empty
+ // status tab is a filtered view, not a first run, so it says so.
+ statusTab: Exclude<InitiativesTab, 'all'> | undefined;
sort: InitiativeSort | undefined;
dir: 'asc' | 'desc' | undefined;
onSort: (key: InitiativeSort) => void;
}) {
+ const t = useTranslations('initiatives');
const ownerById = new Map(project.assignees.map((a) => [a.userId, a]));
if (isLoading) return <ListSkeleton className="px-4 py-6" rowClassName="h-12" />;
if (initiatives.length === 0) {
- if (statusLabel)
+ if (statusTab)
return (
- <EmptyState
- title={`No ${statusLabel.toLowerCase()} initiatives`}
- description="Initiatives move between tabs as their status changes."
- />
+ <EmptyState title={t(`emptyTab.${statusTab}`)} description={t('emptyTabDescription')} />
);
return (
- <EmptyState
- title="No initiatives yet"
- description="An initiative groups related issues under one goal."
- >
+ <EmptyState title={t('emptyTitle')} description={t('emptyDescription')}>
{canCreate && (
<Button size="sm" onClick={onCreate}>
<Plus className="size-3.5" />
- New initiative
+ {t('newInitiative')}
</Button>
)}
</EmptyState>
@@ -81,14 +80,14 @@ export default function InitiativesList({
<TableHeader>
<TableRow className="hover:bg-transparent">
{COLUMNS.map((col) => (
- <TableHead key={col.label} className="px-3 text-xs font-medium text-muted-foreground">
+ <TableHead key={col.key} className="px-3 text-xs font-medium text-muted-foreground">
{col.sort ? (
<button
type="button"
onClick={() => onSort(col.sort!)}
className="inline-flex items-center gap-1 hover:text-foreground"
>
- {col.label}
+ {t(`columns.${col.key}`)}
{sort === col.sort &&
(dir === 'desc' ? (
<ChevronDown className="size-3.5" />
@@ -97,7 +96,7 @@ export default function InitiativesList({
))}
</button>
) : (
- col.label
+ t(`columns.${col.key}`)
)}
</TableHead>
))}
diff --git a/apps/web/src/features/initiatives/components/list/InitiativesPagination.tsx b/apps/web/src/features/initiatives/components/list/InitiativesPagination.tsx
index 4c88f967..59b2a27e 100644
--- a/apps/web/src/features/initiatives/components/list/InitiativesPagination.tsx
+++ b/apps/web/src/features/initiatives/components/list/InitiativesPagination.tsx
@@ -1,4 +1,5 @@
import { ChevronLeft, ChevronRight } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { Button } from '@/components/ui/button';
// The page numbers to show: always the first and last page, the current page and
@@ -28,6 +29,7 @@ export default function InitiativesPagination({
total: number;
onPage: (page: number) => void;
}) {
+ const t = useTranslations('initiatives.pagination');
const pageCount = Math.max(1, Math.ceil(total / pageSize));
if (pageCount <= 1) return null;
@@ -37,7 +39,7 @@ export default function InitiativesPagination({
return (
<div className="flex items-center justify-between px-4 pt-2 pb-6">
<span className="text-xs text-muted-foreground tabular-nums">
- {from}–{to} of {total}
+ {t('range', { from, to, total })}
</span>
<div className="flex items-center gap-1">
<Button
@@ -45,7 +47,7 @@ export default function InitiativesPagination({
size="icon-sm"
disabled={page <= 1}
onClick={() => onPage(page - 1)}
- aria-label="Previous page"
+ aria-label={t('previous')}
>
<ChevronLeft className="size-4" />
</Button>
@@ -71,7 +73,7 @@ export default function InitiativesPagination({
size="icon-sm"
disabled={page >= pageCount}
onClick={() => onPage(page + 1)}
- aria-label="Next page"
+ aria-label={t('next')}
>
<ChevronRight className="size-4" />
</Button>
diff --git a/apps/web/src/features/initiatives/components/shared/HealthBadge.tsx b/apps/web/src/features/initiatives/components/shared/HealthBadge.tsx
index 6f66bba5..9bf584a5 100644
--- a/apps/web/src/features/initiatives/components/shared/HealthBadge.tsx
+++ b/apps/web/src/features/initiatives/components/shared/HealthBadge.tsx
@@ -1,14 +1,18 @@
+import { useTranslations } from 'next-intl';
import type { InitiativeHealth } from '@/lib/api';
-import { healthMeta } from '@/utils/initiativeMeta';
+import { healthColor } from '@/utils/initiativeMeta';
// A small health signal: a colored dot plus its label. null renders a muted
// "No update". Used in the list column and the detail header.
export default function HealthBadge({ health }: { health: InitiativeHealth | null }) {
- const { label, color } = healthMeta(health);
+ const t = useTranslations('initiatives.health');
return (
<span className="inline-flex items-center gap-1.5 text-sm text-muted-foreground">
- <span className="inline-block size-2.5 rounded-full" style={{ backgroundColor: color }} />
- {label}
+ <span
+ className="inline-block size-2.5 rounded-full"
+ style={{ backgroundColor: healthColor(health) }}
+ />
+ {t(health ?? 'unknown')}
</span>
);
}
diff --git a/apps/web/src/features/initiatives/components/shared/HealthInfoPopover.tsx b/apps/web/src/features/initiatives/components/shared/HealthInfoPopover.tsx
index 66ad2e92..f8b3a63c 100644
--- a/apps/web/src/features/initiatives/components/shared/HealthInfoPopover.tsx
+++ b/apps/web/src/features/initiatives/components/shared/HealthInfoPopover.tsx
@@ -1,28 +1,32 @@
import { Fragment } from 'react';
import { ChevronRight, HelpCircle } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { InitiativeHealth } from '@/lib/api';
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
-import { healthMeta } from '@/utils/initiativeMeta';
+import { healthColor } from '@/utils/initiativeMeta';
-// The health values explained in the info popover, in severity order.
-const HEALTH_LEGEND: { health: InitiativeHealth | null; desc: string }[] = [
- { health: 'on_track', desc: 'Work is keeping pace with the schedule.' },
- { health: 'at_risk', desc: 'Work is slipping behind the schedule.' },
- { health: 'off_track', desc: 'Work is well behind, or the target date has passed.' },
- { health: null, desc: 'Not enough data yet: no issues or no target date.' },
+// The health values explained in the info popover, in severity order. null is the
+// value with nothing to judge yet, and is keyed as `unknown` in the messages.
+const HEALTH_LEGEND: (InitiativeHealth | 'unknown')[] = [
+ 'on_track',
+ 'at_risk',
+ 'off_track',
+ 'unknown',
];
// A "?" trigger explaining what the health signal means, how it is graded, and
// the formula behind it. Shown next to the health badge in the detail header and
// the timeline card.
export default function HealthInfoPopover() {
+ const t = useTranslations('initiatives.healthInfo');
+ const tHealth = useTranslations('initiatives.health');
return (
<Popover>
<PopoverTrigger asChild>
<button
type="button"
- aria-label="How is health calculated?"
+ aria-label={t('trigger')}
className="text-muted-foreground/60 hover:text-foreground"
>
<HelpCircle className="size-3.5" />
@@ -30,54 +34,51 @@ export default function HealthInfoPopover() {
</PopoverTrigger>
<PopoverContent align="start" className="w-72 p-0 text-sm">
<div className="px-3.5 py-3">
- <p className="font-medium">Health</p>
- <p className="mt-0.5 text-xs leading-snug text-muted-foreground">
- Compares work done against time elapsed. Updates automatically.
- </p>
+ <p className="font-medium">{t('title')}</p>
+ <p className="mt-0.5 text-xs leading-snug text-muted-foreground">{t('description')}</p>
</div>
<div className="grid grid-cols-[auto_1fr] gap-x-2.5 gap-y-3 border-t border-border px-3.5 py-3">
- {HEALTH_LEGEND.map(({ health, desc }) => {
- const { label, color } = healthMeta(health);
- return (
- <Fragment key={label}>
- <span
- className="mt-1.5 size-2.5 shrink-0 rounded-full"
- style={{ backgroundColor: color }}
- />
- <div>
- <p className="font-medium">{label}</p>
- <p className="mt-0.5 text-xs leading-snug text-muted-foreground">{desc}</p>
- </div>
- </Fragment>
- );
- })}
+ {HEALTH_LEGEND.map((key) => (
+ <Fragment key={key}>
+ <span
+ className="mt-1.5 size-2.5 shrink-0 rounded-full"
+ style={{ backgroundColor: healthColor(key === 'unknown' ? null : key) }}
+ />
+ <div>
+ <p className="font-medium">{tHealth(key)}</p>
+ <p className="mt-0.5 text-xs leading-snug text-muted-foreground">
+ {t(`legend.${key}`)}
+ </p>
+ </div>
+ </Fragment>
+ ))}
</div>
<Collapsible className="border-t border-border">
<CollapsibleTrigger className="group/calc flex w-full items-center justify-between px-3.5 py-2.5 text-xs font-medium text-muted-foreground">
<span className="transition-colors group-hover/calc:text-foreground">
- How it&apos;s calculated
+ {t('howCalculated')}
</span>
<ChevronRight className="size-3.5 shrink-0 transition group-data-[state=open]/calc:rotate-90" />
</CollapsibleTrigger>
<CollapsibleContent>
<div className="space-y-2 px-3.5 pb-3 text-xs">
<div>
- <p className="text-muted-foreground">Work done</p>
+ <p className="text-muted-foreground">{t('workDone')}</p>
<p className="font-mono">completed / (total - canceled)</p>
</div>
<div>
- <p className="text-muted-foreground">Time elapsed</p>
+ <p className="text-muted-foreground">{t('timeElapsed')}</p>
<p className="font-mono">(now - start) / (target - start)</p>
</div>
<div>
- <p className="text-muted-foreground">How far work trails time</p>
+ <p className="text-muted-foreground">{t('trail')}</p>
<div className="mt-0.5 grid grid-cols-[1fr_auto] gap-x-3 font-mono">
- <span>On track</span>
- <span>up to 10% behind</span>
- <span>At risk</span>
- <span>10-25% behind</span>
- <span>Off track</span>
- <span>over 25% behind</span>
+ <span>{tHealth('on_track')}</span>
+ <span>{t('trailOnTrack')}</span>
+ <span>{tHealth('at_risk')}</span>
+ <span>{t('trailAtRisk')}</span>
+ <span>{tHealth('off_track')}</span>
+ <span>{t('trailOffTrack')}</span>
</div>
</div>
</div>
diff --git a/apps/web/src/features/initiatives/components/shared/InitiativeStatusSelect.tsx b/apps/web/src/features/initiatives/components/shared/InitiativeStatusSelect.tsx
index fdbc2337..5d73df19 100644
--- a/apps/web/src/features/initiatives/components/shared/InitiativeStatusSelect.tsx
+++ b/apps/web/src/features/initiatives/components/shared/InitiativeStatusSelect.tsx
@@ -1,5 +1,6 @@
import { useState } from 'react';
import { Check } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { InitiativeStatus } from '@/lib/api';
import { Command, CommandGroup, CommandItem, CommandList } from '@/components/ui/command';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
@@ -16,14 +17,14 @@ export default function InitiativeStatusSelect({
value: InitiativeStatus;
onChange: (status: InitiativeStatus) => void;
}) {
+ const t = useTranslations('initiatives.status');
const [open, setOpen] = useState(false);
- const meta = STATUS_META[value];
return (
<Popover open={open} onOpenChange={setOpen}>
<PopoverTrigger asChild>
<Pill active>
- {colorDot(meta.color)}
- {meta.label}
+ {colorDot(STATUS_META[value].color)}
+ {t(value)}
</Pill>
</PopoverTrigger>
<PopoverContent className="w-48 p-0" align="start">
@@ -33,14 +34,14 @@ export default function InitiativeStatusSelect({
{STATUS_ORDER.map((s) => (
<CommandItem
key={s}
- value={STATUS_META[s].label}
+ value={t(s)}
onSelect={() => {
onChange(s);
setOpen(false);
}}
>
{colorDot(STATUS_META[s].color)}
- <span className="flex-1">{STATUS_META[s].label}</span>
+ <span className="flex-1">{t(s)}</span>
{s === value && <Check className="ml-auto" />}
</CommandItem>
))}
diff --git a/apps/web/src/features/initiatives/utils/tabs.ts b/apps/web/src/features/initiatives/utils/tabs.ts
index b55f26ec..c5fdf662 100644
--- a/apps/web/src/features/initiatives/utils/tabs.ts
+++ b/apps/web/src/features/initiatives/utils/tabs.ts
@@ -4,17 +4,17 @@ import type { InitiativesTab } from '@/utils/paths';
// One tab per lifecycle status, except the terminal statuses share a "Completed"
// tab. `statuses: undefined` means the tab takes every status. The array order is
// the default tab order; a user can reorder the strip by drag (see
-// useInitiativeTabOrder).
+// useInitiativeTabOrder). The label of a tab is a message under
+// `initiatives.tabs`.
export const INITIATIVE_TABS: {
value: InitiativesTab;
- label: string;
statuses: InitiativeStatus[] | undefined;
}[] = [
- { value: 'active', label: 'Active', statuses: ['active'] },
- { value: 'planned', label: 'Planned', statuses: ['planned'] },
- { value: 'proposed', label: 'Proposed', statuses: ['proposed'] },
- { value: 'completed', label: 'Completed', statuses: ['completed', 'canceled'] },
- { value: 'all', label: 'All initiatives', statuses: undefined },
+ { value: 'active', statuses: ['active'] },
+ { value: 'planned', statuses: ['planned'] },
+ { value: 'proposed', statuses: ['proposed'] },
+ { value: 'completed', statuses: ['completed', 'canceled'] },
+ { value: 'all', statuses: undefined },
];
// The "Completed" tab groups the two terminal statuses, so its count sums them.
diff --git a/apps/web/src/features/invite/InviteAcceptPage.tsx b/apps/web/src/features/invite/InviteAcceptPage.tsx
index ea622417..379717c9 100644
--- a/apps/web/src/features/invite/InviteAcceptPage.tsx
+++ b/apps/web/src/features/invite/InviteAcceptPage.tsx
@@ -1,6 +1,7 @@
'use client';
import Link from 'next/link';
+import { useTranslations } from 'next-intl';
import BrandPanel from '@/components/common/page/BrandPanel';
import ListSkeleton from '@/components/common/skeleton/ListSkeleton';
import { Button } from '@/components/ui/button';
@@ -14,29 +15,30 @@ import InviteStep from './components/InviteStep';
// a logged-out invitee registers or signs in here and joins in one step; a
// logged-in one accepts or rejects directly. Styled like the auth screens.
export default function InviteAcceptPage({ token }: { token: string }) {
+ const t = useTranslations('invite');
const inviteQuery = useInviteQuery(token);
const invite = inviteQuery.data;
// The heading reflects the invite state so the copy never contradicts the body
// (e.g. an invalid link must not read "Accept your invitation").
- let title = 'Join the project';
- let subtitle = 'Accept your invitation to start collaborating';
+ let title = t('title');
+ let subtitle = t('subtitle');
let body = <ListSkeleton rows={3} rowClassName="h-12" />;
if (!inviteQuery.isPending && !invite) {
- title = 'Invite not found';
- subtitle = 'This link is invalid or no longer active';
+ title = t('notFoundTitle');
+ subtitle = t('notFoundSubtitle');
body = (
- <InviteNotice message="This invite link is invalid or has been revoked.">
+ <InviteNotice message={t('notFoundMessage')}>
<Button asChild variant="outline">
- <Link href="/login">Go to sign in</Link>
+ <Link href="/login">{t('goToSignIn')}</Link>
</Button>
</InviteNotice>
);
} else if (invite) {
if (invite.status !== 'pending') {
- title = 'Invitation closed';
- subtitle = `This invite was already ${invite.status}`;
+ title = t('closedTitle');
+ subtitle = t('closedSubtitle', { status: invite.status });
}
body = (
<div className="flex flex-col gap-6">
@@ -58,7 +60,7 @@ export default function InviteAcceptPage({ token }: { token: string }) {
</div>
{body}
</div>
- <BrandPanel subtitle="You have been invited to collaborate on a project." />
+ <BrandPanel subtitle={t('brandSubtitle')} />
</CardContent>
</Card>
</div>
diff --git a/apps/web/src/features/invite/components/InviteActions.tsx b/apps/web/src/features/invite/components/InviteActions.tsx
index 5a6ccd24..c6f582bd 100644
--- a/apps/web/src/features/invite/components/InviteActions.tsx
+++ b/apps/web/src/features/invite/components/InviteActions.tsx
@@ -3,6 +3,7 @@
import { useState } from 'react';
import { useRouter } from 'next/navigation';
import { useQueryClient } from '@tanstack/react-query';
+import { useTranslations } from 'next-intl';
import { api } from '@/lib/api';
import { projectPath } from '@/utils/paths';
import { Button } from '@/components/ui/button';
@@ -12,6 +13,7 @@ import { FieldError } from '@/components/ui/field';
// the invited email. Accept opens the project; reject re-queries the invite so
// the page shows the declined state.
export default function InviteActions({ token }: { token: string }) {
+ const t = useTranslations('invite');
const router = useRouter();
const qc = useQueryClient();
const [error, setError] = useState<string | null>(null);
@@ -25,7 +27,7 @@ export default function InviteActions({ token }: { token: string }) {
router.push(projectPath(result.projectKey));
router.refresh();
} catch (err) {
- setError(err instanceof Error ? err.message : 'Could not accept the invite.');
+ setError(err instanceof Error ? err.message : t('acceptError'));
setBusy(null);
}
}
@@ -37,7 +39,7 @@ export default function InviteActions({ token }: { token: string }) {
await api.rejectInvite(token);
await qc.invalidateQueries({ queryKey: ['invite', token] });
} catch (err) {
- setError(err instanceof Error ? err.message : 'Could not decline the invite.');
+ setError(err instanceof Error ? err.message : t('declineError'));
setBusy(null);
}
}
@@ -46,10 +48,10 @@ export default function InviteActions({ token }: { token: string }) {
<div className="flex flex-col gap-3">
{error && <FieldError>{error}</FieldError>}
<Button onClick={accept} disabled={busy !== null}>
- {busy === 'accept' ? 'Joining…' : 'Accept invitation'}
+ {busy === 'accept' ? t('accepting') : t('accept')}
</Button>
<Button variant="outline" onClick={reject} disabled={busy !== null}>
- {busy === 'reject' ? 'Declining…' : 'Decline'}
+ {busy === 'reject' ? t('declining') : t('decline')}
</Button>
</div>
);
diff --git a/apps/web/src/features/invite/components/InviteAuthForm.tsx b/apps/web/src/features/invite/components/InviteAuthForm.tsx
index f8ac1b42..626ad6cd 100644
--- a/apps/web/src/features/invite/components/InviteAuthForm.tsx
+++ b/apps/web/src/features/invite/components/InviteAuthForm.tsx
@@ -2,6 +2,7 @@
import { useState, type FormEvent } from 'react';
import { useRouter } from 'next/navigation';
+import { useTranslations } from 'next-intl';
import { projectPath } from '@/utils/paths';
import { Button } from '@/components/ui/button';
import { Field, FieldDescription, FieldError, FieldGroup, FieldLabel } from '@/components/ui/field';
@@ -27,6 +28,7 @@ export default function InviteAuthForm({
email: string;
hasAccount: boolean;
}) {
+ const t = useTranslations('invite');
const router = useRouter();
const [mode, setMode] = useState<Mode>(hasAccount ? 'signin' : 'register');
const [password, setPassword] = useState('');
@@ -50,17 +52,22 @@ export default function InviteAuthForm({
setError(null);
setNotice(null);
if (isRegister && password !== confirm) {
- setError('Passwords do not match.');
+ setError(t('passwordsDoNotMatch'));
return;
}
setPending(true);
try {
if (isRegister) {
- const result = await registerAndAccept({ email, password, token });
+ const result = await registerAndAccept({
+ email,
+ password,
+ token,
+ registerFailed: t('registerFailed'),
+ });
router.push(projectPath(result.projectKey));
router.refresh();
} else {
- await signInForInvite({ email, password });
+ await signInForInvite({ email, password, signInFailed: t('signInFailed') });
router.refresh();
}
} catch (err) {
@@ -68,9 +75,9 @@ export default function InviteAuthForm({
// here — switch to sign-in and keep the password the invitee already typed.
if (isRegister && isExistingAccountError(err)) {
switchMode('signin');
- setNotice('This email already has an account. Sign in with your password.');
+ setNotice(t('existingAccountNotice'));
} else {
- setError(err instanceof Error ? err.message : 'Something went wrong. Please try again.');
+ setError(err instanceof Error ? err.message : t('genericError'));
}
setPending(false);
}
@@ -78,22 +85,22 @@ export default function InviteAuthForm({
let submitLabel;
if (isRegister) {
- submitLabel = pending ? 'Creating account…' : 'Create account & join';
+ submitLabel = pending ? t('registering') : t('register');
} else {
- submitLabel = pending ? 'Signing in…' : 'Sign in';
+ submitLabel = pending ? t('signingIn') : t('signIn');
}
return (
<form onSubmit={onSubmit}>
<FieldGroup>
<Field>
- <FieldLabel htmlFor="invite-email">Email</FieldLabel>
+ <FieldLabel htmlFor="invite-email">{t('emailLabel')}</FieldLabel>
<Input id="invite-email" type="email" value={email} readOnly disabled />
- <FieldDescription>The invite is tied to this email.</FieldDescription>
+ <FieldDescription>{t('emailHint')}</FieldDescription>
</Field>
<Field>
- <FieldLabel htmlFor="invite-password">Password</FieldLabel>
+ <FieldLabel htmlFor="invite-password">{t('passwordLabel')}</FieldLabel>
<Input
id="invite-password"
type="password"
@@ -104,12 +111,12 @@ export default function InviteAuthForm({
onChange={(e) => setPassword(e.target.value)}
disabled={pending}
/>
- {isRegister && <FieldDescription>Must be at least 8 characters long.</FieldDescription>}
+ {isRegister && <FieldDescription>{t('passwordHint')}</FieldDescription>}
</Field>
{isRegister && (
<Field>
- <FieldLabel htmlFor="invite-confirm">Confirm password</FieldLabel>
+ <FieldLabel htmlFor="invite-confirm">{t('confirmPasswordLabel')}</FieldLabel>
<Input
id="invite-confirm"
type="password"
@@ -133,14 +140,14 @@ export default function InviteAuthForm({
</Field>
<FieldDescription className="text-center">
- {isRegister ? 'Already have an account?' : 'Need a new account?'}{' '}
+ {isRegister ? t('haveAccount') : t('needAccount')}{' '}
<button
type="button"
className="underline underline-offset-4"
onClick={() => switchMode(isRegister ? 'signin' : 'register')}
disabled={pending}
>
- {isRegister ? 'Sign in' : 'Create one'}
+ {isRegister ? t('switchToSignIn') : t('switchToRegister')}
</button>
</FieldDescription>
</FieldGroup>
diff --git a/apps/web/src/features/invite/components/InviteInfo.tsx b/apps/web/src/features/invite/components/InviteInfo.tsx
index 0a370da7..14728710 100644
--- a/apps/web/src/features/invite/components/InviteInfo.tsx
+++ b/apps/web/src/features/invite/components/InviteInfo.tsx
@@ -1,13 +1,17 @@
+import { useTranslations } from 'next-intl';
import { type InviteView } from '@/lib/api';
import { Badge } from '@/components/ui/badge';
// The invite summary shown at the top of the accept screen: which project, for
// which email, as which role.
export default function InviteInfo({ invite }: { invite: InviteView }) {
- const roleLabel = invite.role === 'owner' ? 'Owner' : (invite.roleName ?? 'Member');
+ const t = useTranslations('invite');
+ const tCommon = useTranslations('common');
+ const roleLabel =
+ invite.role === 'owner' ? tCommon('owner') : (invite.roleName ?? tCommon('member'));
return (
<div className="rounded-md border bg-muted/50 p-4 text-sm">
- <p className="text-muted-foreground">You have been invited to join</p>
+ <p className="text-muted-foreground">{t('invitedTo')}</p>
<p className="mt-0.5 flex items-center gap-2 text-base font-semibold">
{invite.projectName}
<Badge variant="outline" className="px-1.5 py-0 text-[10px] font-normal">
@@ -15,7 +19,10 @@ export default function InviteInfo({ invite }: { invite: InviteView }) {
</Badge>
</p>
<p className="mt-2 text-muted-foreground">
- Invitation for <span className="font-medium text-foreground">{invite.email}</span>
+ {t.rich('invitationFor', {
+ email: invite.email,
+ strong: (chunks) => <span className="font-medium text-foreground">{chunks}</span>,
+ })}
</p>
</div>
);
diff --git a/apps/web/src/features/invite/components/InviteStep.tsx b/apps/web/src/features/invite/components/InviteStep.tsx
index eee0fb08..c582304a 100644
--- a/apps/web/src/features/invite/components/InviteStep.tsx
+++ b/apps/web/src/features/invite/components/InviteStep.tsx
@@ -2,6 +2,7 @@
import Link from 'next/link';
import { useRouter } from 'next/navigation';
+import { useTranslations } from 'next-intl';
import { type InviteView } from '@/lib/api';
import { signOut, useSession } from '@/lib/auth-client';
import { Button } from '@/components/ui/button';
@@ -13,6 +14,8 @@ import InviteNotice from './InviteNotice';
// current session: sign in / register, accept or reject, or sign out of the
// account the invite was not sent to.
export default function InviteStep({ token, invite }: { token: string; invite: InviteView }) {
+ const t = useTranslations('invite');
+ const tCommon = useTranslations('common');
const router = useRouter();
const { data: session, isPending: sessionPending } = useSession();
@@ -23,16 +26,16 @@ export default function InviteStep({ token, invite }: { token: string; invite: I
if (invite.status !== 'pending') {
return (
- <InviteNotice message={`This invite has already been ${invite.status}.`}>
+ <InviteNotice message={t('alreadyHandled', { status: invite.status })}>
<Button asChild variant="outline">
- <Link href="/">Go to the app</Link>
+ <Link href="/">{t('goToApp')}</Link>
</Button>
</InviteNotice>
);
}
if (sessionPending) {
- return <p className="text-sm text-muted-foreground">Loading…</p>;
+ return <p className="text-sm text-muted-foreground">{tCommon('loading')}</p>;
}
if (!session) {
@@ -46,17 +49,15 @@ export default function InviteStep({ token, invite }: { token: string; invite: I
return (
<InviteNotice
- message={
- <>
- This invite was sent to{' '}
- <span className="font-medium text-foreground">{invite.email}</span>, but you are signed in
- as <span className="font-medium text-foreground">{sessionEmail}</span>. Sign out to accept
- it with the invited email.
- </>
- }
+ message={t.rich('wrongAccount', {
+ email: invite.email,
+ sessionEmail,
+ invited: (chunks) => <span className="font-medium text-foreground">{chunks}</span>,
+ current: (chunks) => <span className="font-medium text-foreground">{chunks}</span>,
+ })}
>
<Button variant="outline" onClick={switchAccount}>
- Sign out
+ {tCommon('signOut')}
</Button>
</InviteNotice>
);
diff --git a/apps/web/src/features/invite/services/invite.service.ts b/apps/web/src/features/invite/services/invite.service.ts
index 10995976..de2d4636 100644
--- a/apps/web/src/features/invite/services/invite.service.ts
+++ b/apps/web/src/features/invite/services/invite.service.ts
@@ -39,26 +39,33 @@ export function isExistingAccountError(err: unknown): boolean {
// Create an account for the invited email, then accept. autoSignIn (set in
// @repo/auth) signs the new user in during sign-up, so the accept call that
// follows carries their session.
-export async function registerAndAccept(input: { email: string; password: string; token: string }) {
+export async function registerAndAccept(input: {
+ email: string;
+ password: string;
+ token: string;
+ // What to say when better-auth reports no message of its own.
+ registerFailed: string;
+}) {
const result = await signUp.email({
email: input.email,
password: input.password,
name: input.email.split('@')[0] || input.email,
});
if (result.error) {
- throw new InviteAuthError(
- result.error.message ?? 'Could not create your account.',
- result.error.code,
- );
+ throw new InviteAuthError(result.error.message ?? input.registerFailed, result.error.code);
}
return api.acceptInvite(input.token);
}
// Sign in to an existing account. Does not accept: after the session updates the
// page shows the accept/reject step for the invitee to decide.
-export async function signInForInvite(input: { email: string; password: string }): Promise<void> {
+export async function signInForInvite(input: {
+ email: string;
+ password: string;
+ signInFailed: string;
+}): Promise<void> {
const result = await signIn.email({ email: input.email, password: input.password });
if (result.error) {
- throw new InviteAuthError(result.error.message ?? 'Could not sign you in.', result.error.code);
+ throw new InviteAuthError(result.error.message ?? input.signInFailed, result.error.code);
}
}
diff --git a/apps/web/src/features/issue/IssueViewPage.tsx b/apps/web/src/features/issue/IssueViewPage.tsx
index 6a8ae529..bf7fd73f 100644
--- a/apps/web/src/features/issue/IssueViewPage.tsx
+++ b/apps/web/src/features/issue/IssueViewPage.tsx
@@ -7,12 +7,14 @@ import { useExitOnEscape } from '@/hooks/useExitOnEscape';
import { useIssueBySeqQuery } from '@/services/issues.service';
import IssueDetailContent from './components/detail/IssueDetailContent';
import IssueDetailSkeleton from './components/detail/IssueDetailSkeleton';
+import { useTranslations } from 'next-intl';
// The full-page issue view (/project/:projectKey/issue/:sequenceNumber), rendered
// inside the Shell layout. The URL carries the project-scoped number, resolved to
// the issue here; the project comes from the Shell. Escape returns to the work
// items view.
export default function IssueViewPage() {
+ const t = useTranslations('issue');
const router = useRouter();
const params = useParams();
const { project } = useShell();
@@ -41,7 +43,7 @@ export default function IssueViewPage() {
) : issueQuery.isLoading ? (
<IssueDetailSkeleton />
) : (
- <div className="py-6 text-sm text-muted-foreground">Issue not found.</div>
+ <div className="py-6 text-sm text-muted-foreground">{t('notFound')}</div>
)}
</div>
</div>
diff --git a/apps/web/src/features/issue/PublicIssuePage.tsx b/apps/web/src/features/issue/PublicIssuePage.tsx
index 0bcaff73..3ca996ec 100644
--- a/apps/web/src/features/issue/PublicIssuePage.tsx
+++ b/apps/web/src/features/issue/PublicIssuePage.tsx
@@ -6,11 +6,13 @@ import PublicShareFrame from '@/components/common/page/PublicShareFrame';
import PublicShareHeader from '@/components/common/page/PublicShareHeader';
import IssueDetailSkeleton from './components/detail/IssueDetailSkeleton';
import ReadOnlyIssueDetail from './components/detail/ReadOnlyIssueDetail';
+import { useTranslations } from 'next-intl';
// The public read-only page for a shared issue (/share/issue/:token). Fetches the
// self-contained bundle by token and renders it with no session. A missing or
// revoked token shows a not-found message.
export default function PublicIssuePage({ token }: { token: string }) {
+ const t = useTranslations('issue');
const query = useQuery({
queryKey: ['share', 'issue', token],
queryFn: () => api.getSharedIssue(token),
@@ -30,9 +32,7 @@ export default function PublicIssuePage({ token }: { token: string }) {
if (query.isError || !query.data) {
return (
<PublicShareFrame>
- <p className="px-6 py-10 text-sm text-muted-foreground">
- This shared issue is not available. The link may have been revoked.
- </p>
+ <p className="px-6 py-10 text-sm text-muted-foreground">{t('shareUnavailable')}</p>
</PublicShareFrame>
);
}
diff --git a/apps/web/src/features/issue/components/IssueImageAnnotator.tsx b/apps/web/src/features/issue/components/IssueImageAnnotator.tsx
index a379004f..3d18585a 100644
--- a/apps/web/src/features/issue/components/IssueImageAnnotator.tsx
+++ b/apps/web/src/features/issue/components/IssueImageAnnotator.tsx
@@ -6,6 +6,7 @@ import IssueImageAnnotatorCanvas from './IssueImageAnnotatorCanvas';
import IssueImageAnnotatorToolbar from './IssueImageAnnotatorToolbar';
import Modal from '@/components/common/overlay/Modal';
import { cn } from '@/lib/utils';
+import { useTranslations } from 'next-intl';
// Marks an image up in a fullscreen dialog and hands the result back as a PNG;
// what happens to that file is the caller's call.
@@ -25,9 +26,10 @@ export default function IssueImageAnnotator({
onSave: (file: File) => void;
onClose: () => void;
}) {
+ const t = useTranslations('issue.annotator');
const canvasRef = useRef<HTMLCanvasElement>(null);
const [image, setImage] = useState<HTMLImageElement | null>(null);
- const [error, setError] = useState<string | null>(null);
+ const [failed, setFailed] = useState(false);
const [annotations, setAnnotations] = useState<Annotation[]>([]);
const [tool, setTool] = useState<AnnotationTool>('rect');
const [color, setColor] = useState(ANNOTATION_COLORS[0]);
@@ -46,7 +48,7 @@ export default function IssueImageAnnotator({
await loaded.decode();
if (!cancelled) setImage(loaded);
} catch {
- if (!cancelled) setError('Could not load the image');
+ if (!cancelled) setFailed(true);
}
})();
return () => {
@@ -76,7 +78,7 @@ export default function IssueImageAnnotator({
return (
<Modal
- title="Annotate image"
+ title={t('title')}
onClose={onClose}
wide="xl"
fullscreen={fullscreen}
@@ -90,8 +92,8 @@ export default function IssueImageAnnotator({
fullscreen && 'flex-1',
)}
>
- {error && <p className="text-sm text-destructive">{error}</p>}
- {!error && !image && <p className="text-sm text-muted-foreground">Loading the image…</p>}
+ {failed && <p className="text-sm text-destructive">{t('loadFailed')}</p>}
+ {!failed && !image && <p className="text-sm text-muted-foreground">{t('loading')}</p>}
{image && (
<IssueImageAnnotatorCanvas
canvasRef={canvasRef}
diff --git a/apps/web/src/features/issue/components/IssueImageAnnotatorToolbar.tsx b/apps/web/src/features/issue/components/IssueImageAnnotatorToolbar.tsx
index a196f12b..76a951dc 100644
--- a/apps/web/src/features/issue/components/IssueImageAnnotatorToolbar.tsx
+++ b/apps/web/src/features/issue/components/IssueImageAnnotatorToolbar.tsx
@@ -5,11 +5,12 @@ import { ANNOTATION_COLORS, type AnnotationTool } from '../utils/annotations';
import EditorToolbarButton from './editor/EditorToolbarButton';
import { Button } from '@/components/ui/button';
import { cn } from '@/lib/utils';
+import { useTranslations } from 'next-intl';
-const TOOLS: { id: AnnotationTool; label: string; icon: LucideIcon }[] = [
- { id: 'marker', label: 'Marker', icon: Highlighter },
- { id: 'rect', label: 'Rectangle', icon: Square },
- { id: 'ellipse', label: 'Ellipse', icon: Circle },
+const TOOLS: { id: AnnotationTool; icon: LucideIcon }[] = [
+ { id: 'marker', icon: Highlighter },
+ { id: 'rect', icon: Square },
+ { id: 'ellipse', icon: Circle },
];
export default function IssueImageAnnotatorToolbar({
@@ -29,13 +30,15 @@ export default function IssueImageAnnotatorToolbar({
onUndo: () => void;
onSave: () => void;
}) {
+ const tCommon = useTranslations('common');
+ const t = useTranslations('issue.annotator');
return (
<div className="mt-4 flex items-center gap-1 border-t pt-3">
{TOOLS.map((item) => (
<EditorToolbarButton
key={item.id}
active={tool === item.id}
- title={item.label}
+ title={t(`tools.${item.id}`)}
onClick={() => onToolChange(item.id)}
>
<item.icon />
@@ -48,7 +51,7 @@ export default function IssueImageAnnotatorToolbar({
<button
key={value}
type="button"
- aria-label={`Color ${value}`}
+ aria-label={t('color', { color: value })}
aria-pressed={color === value}
onClick={() => onColorChange(value)}
className={cn(
@@ -62,12 +65,12 @@ export default function IssueImageAnnotatorToolbar({
<span className="mx-2 h-6 w-px bg-border" />
- <EditorToolbarButton disabled={!canUndo} title="Undo" onClick={onUndo}>
+ <EditorToolbarButton disabled={!canUndo} title={t('undo')} onClick={onUndo}>
<Undo2 />
</EditorToolbarButton>
<Button className="ml-auto" onClick={onSave}>
- Save
+ {tCommon('save')}
</Button>
</div>
);
diff --git a/apps/web/src/features/issue/components/actions/ArchiveIssueDialog.tsx b/apps/web/src/features/issue/components/actions/ArchiveIssueDialog.tsx
index 28d4fc78..684bd05e 100644
--- a/apps/web/src/features/issue/components/actions/ArchiveIssueDialog.tsx
+++ b/apps/web/src/features/issue/components/actions/ArchiveIssueDialog.tsx
@@ -4,6 +4,7 @@ import { dispositionReady, subtaskCount } from '@/utils/subtasks';
import { useArchiveIssue } from '@/services/issues.service';
import ConfirmDialog from '@/components/common/overlay/ConfirmDialog';
import SubtaskDisposalChoice from './SubtaskDisposalChoice';
+import { useTranslations } from 'next-intl';
// Confirm and run an archive. Only mounted for an issue that has subtasks — one
// without them is archived straight from its menu, with nothing to ask.
@@ -18,14 +19,15 @@ export default function ArchiveIssueDialog({
onClose: () => void;
onArchived?: () => void;
}) {
+ const t = useTranslations('issue.actions');
const archiveIssue = useArchiveIssue(project.project.key);
const subtasks = subtaskCount(project.issues, [issue.id]);
const [disposition, setDisposition] = useState<SubtaskDisposition | null>(null);
return (
<ConfirmDialog
- title="Archive issue"
- confirmLabel="Archive issue"
+ title={t('archiveTitle')}
+ confirmLabel={t('archiveTitle')}
confirmDisabled={!dispositionReady(disposition)}
onConfirm={async () => {
await archiveIssue.mutateAsync({ id: issue.id, subtasks: disposition ?? undefined });
@@ -35,7 +37,7 @@ export default function ArchiveIssueDialog({
onClose={onClose}
>
<p className="text-sm text-muted-foreground">
- Archive {issue.identifier}? It leaves the board and can be restored later.
+ {t('archiveDescription', { issue: issue.identifier })}
</p>
<SubtaskDisposalChoice
projectKey={project.project.key}
diff --git a/apps/web/src/features/issue/components/actions/IssueActions.tsx b/apps/web/src/features/issue/components/actions/IssueActions.tsx
index 1917d296..8105b0ac 100644
--- a/apps/web/src/features/issue/components/actions/IssueActions.tsx
+++ b/apps/web/src/features/issue/components/actions/IssueActions.tsx
@@ -2,10 +2,13 @@ import { useState } from 'react';
import type { ActionDef, ProjectDetail, Issue, SubtaskDisposition } from '@/lib/api';
import { matchesFilterSet } from '@/utils/filters';
import { describeEffect } from '@/utils/actions';
+import { useEffectText } from '@/hooks/useEffectText';
import { dispositionReady } from '@/utils/subtasks';
import { useDeleteIssue, useIssueQuery, useUpdateIssue } from '@/services/issues.service';
import ConfirmDialog from '@/components/common/overlay/ConfirmDialog';
import SubtaskDisposalChoice from './SubtaskDisposalChoice';
+import type { ReactNode } from 'react';
+import { useTranslations } from 'next-intl';
// The project's manual actions whose condition matches this issue, in saved
// order. Shared by the issue detail Actions block and the context menu.
@@ -20,11 +23,16 @@ export function matchedActions(
// The confirm-dialog body for running an action: the changes it will apply, one
// per line.
function EffectSummary({ action, project }: { action: ActionDef; project: ProjectDetail }) {
- const lines = describeEffect(action.effect, project);
+ const t = useTranslations('issue.actions');
+ const effectText = useEffectText();
+ const lines = describeEffect(action.effect, project, effectText);
return (
<div className="text-sm text-muted-foreground">
<p>
- Apply <span className="font-medium text-foreground">{action.name}</span> to this issue?
+ {t.rich('applyDescription', {
+ action: action.name,
+ v: (chunks: ReactNode) => <span className="font-medium text-foreground">{chunks}</span>,
+ })}
</p>
{lines.length > 0 && (
<ul className="mt-2 space-y-0.5">
@@ -53,6 +61,7 @@ export function DeleteIssueDialog({
onClose: () => void;
onDeleted?: () => void;
}) {
+ const t = useTranslations('issue.actions');
const deleteIssue = useDeleteIssue(project.project.key);
// The board carries only active issues, so an archived issue's subtasks are not
// countable from it. The detail read carries them, archived ones included; it is
@@ -64,8 +73,8 @@ export function DeleteIssueDialog({
return (
<ConfirmDialog
- title="Delete issue"
- confirmLabel="Delete issue"
+ title={t('deleteTitle')}
+ confirmLabel={t('deleteTitle')}
confirmDisabled={!detail.data || (subtasks > 0 && !dispositionReady(disposition))}
onConfirm={async () => {
await deleteIssue.mutateAsync({ id: issue.id, subtasks: disposition ?? undefined });
@@ -75,8 +84,7 @@ export function DeleteIssueDialog({
onClose={onClose}
>
<p className="text-sm text-muted-foreground">
- Delete {issue.identifier}? This removes the issue, its comments, activity and attachments.
- This cannot be undone.
+ {t('deleteDescription', { issue: issue.identifier })} {t('cannotBeUndone')}
</p>
{subtasks > 0 && (
<SubtaskDisposalChoice
@@ -105,11 +113,12 @@ export function ApplyActionDialog({
action: ActionDef;
onClose: () => void;
}) {
+ const t = useTranslations('issue.actions');
const updateIssue = useUpdateIssue(project.project.key);
return (
<ConfirmDialog
title={action.name}
- confirmLabel="Apply"
+ confirmLabel={t('apply')}
onConfirm={async () => {
await updateIssue.mutateAsync({ id: issue.id, patch: action.effect });
onClose();
diff --git a/apps/web/src/features/issue/components/actions/IssueActionsBar.tsx b/apps/web/src/features/issue/components/actions/IssueActionsBar.tsx
index 6f001be5..314e7aec 100644
--- a/apps/web/src/features/issue/components/actions/IssueActionsBar.tsx
+++ b/apps/web/src/features/issue/components/actions/IssueActionsBar.tsx
@@ -21,6 +21,7 @@ import { shareIssuePath } from '@/utils/paths';
import { Button } from '@/components/ui/button';
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
import ShareDialog from '@/components/common/share/ShareDialog';
+import { useTranslations } from 'next-intl';
// The issue detail Actions: the manual actions whose condition matches this
// issue, plus Copy Prompt and a delete button. Owns the delete/apply
@@ -39,6 +40,7 @@ export default function IssueActionsBar({
variant?: 'row' | 'header';
onDeleted?: () => void;
}) {
+ const t = useTranslations('issue.actionsBar');
const { can } = usePermissions();
const { data: session } = useSession();
const qc = useQueryClient();
@@ -81,7 +83,7 @@ export default function IssueActionsBar({
// The issue's short identifier link (/IAP-62) redirects to the canonical page URL.
async function copyLink() {
await navigator.clipboard.writeText(`${window.location.origin}/${issue.identifier}`);
- toast.success('Short link copied');
+ toast.success(t('shortLinkCopied'));
}
// In the panel header the action buttons sit next to the size-7 expand/close
@@ -101,7 +103,7 @@ export default function IssueActionsBar({
<Share2 className="size-4" />
</Button>
</TooltipTrigger>
- <TooltipContent>Copy short link</TooltipContent>
+ <TooltipContent>{t('copyShortLink')}</TooltipContent>
</Tooltip>
<Tooltip>
<TooltipTrigger asChild>
@@ -118,7 +120,7 @@ export default function IssueActionsBar({
)}
</Button>
</TooltipTrigger>
- <TooltipContent>{copied ? 'Copied!' : 'Copy Prompt'}</TooltipContent>
+ <TooltipContent>{copied ? t('copied') : t('copyPrompt')}</TooltipContent>
</Tooltip>
{canEdit && (
<Tooltip>
@@ -134,7 +136,9 @@ export default function IssueActionsBar({
<Globe className="size-4" />
</Button>
</TooltipTrigger>
- <TooltipContent>{issue.shareToken ? 'Shared publicly' : 'Share publicly'}</TooltipContent>
+ <TooltipContent>
+ {issue.shareToken ? t('sharedPublicly') : t('sharePublicly')}
+ </TooltipContent>
</Tooltip>
)}
{issueActions.map((a) => {
@@ -171,7 +175,7 @@ export default function IssueActionsBar({
)}
</Button>
</TooltipTrigger>
- <TooltipContent>{issue.archivedAt ? 'Restore issue' : 'Archive issue'}</TooltipContent>
+ <TooltipContent>{issue.archivedAt ? t('restore') : t('archive')}</TooltipContent>
</Tooltip>
)}
{canDelete && (
@@ -186,7 +190,7 @@ export default function IssueActionsBar({
<Trash2 className="size-4" />
</Button>
</TooltipTrigger>
- <TooltipContent>Delete issue</TooltipContent>
+ <TooltipContent>{t('delete')}</TooltipContent>
</Tooltip>
)}
</div>
@@ -219,7 +223,7 @@ export default function IssueActionsBar({
<ShareDialog
open={sharing}
onOpenChange={setSharing}
- title="Share issue"
+ title={t('shareIssue')}
token={issue.shareToken}
extended={issue.shareExtended}
enable={share}
diff --git a/apps/web/src/features/issue/components/actions/IssueContextMenu.tsx b/apps/web/src/features/issue/components/actions/IssueContextMenu.tsx
index 9ad6ceb9..cafbe6c6 100644
--- a/apps/web/src/features/issue/components/actions/IssueContextMenu.tsx
+++ b/apps/web/src/features/issue/components/actions/IssueContextMenu.tsx
@@ -1,5 +1,6 @@
import { useContext, useState, type ReactNode } from 'react';
import { toast } from 'sonner';
+import { useFormatter, useTranslations } from 'next-intl';
import {
Archive,
ArchiveRestore,
@@ -25,6 +26,7 @@ import { useInitiativeOptionsQuery } from '@/services/initiatives.service';
import { STATUS_META } from '@/utils/initiativeMeta';
import { CYCLE_STATUS_META } from '@/utils/cycleMeta';
import { usePermissions } from '@/hooks/usePermissions';
+import { usePriorityLabel } from '@/hooks/usePriorityLabel';
import { ShellCtx } from '@/context/shellContext';
import { useArchiveAction } from '../../hooks/useArchiveAction';
import { ApplyActionDialog, DeleteIssueDialog, matchedActions } from './IssueActions';
@@ -34,7 +36,8 @@ import { toDateStr } from '@/utils/dates';
import { colorDot } from '@/components/common/fields/colorDot';
import { PRIORITY_FIELDS } from '@/components/common/fields/priorityFields';
import { StateIcon } from '../shared/IssueIcons';
-import { dueDatePresets, formatPreset } from '../../utils/dueDatePresets';
+import { dueDatePresets } from '../../utils/dueDatePresets';
+import { useDueDatePresetLabel } from '../../hooks/useDueDatePresetLabel';
import {
ContextMenu,
ContextMenuContent,
@@ -69,6 +72,9 @@ export default function IssueContextMenu({
onDeleted?: () => void;
children: ReactNode;
}) {
+ const t = useTranslations('issue.menu');
+ const format = useFormatter();
+ const tCommon = useTranslations('common');
const { can } = usePermissions();
// Read the Shell directly (not useShell) so this can render outside it: on the
// public read-only board there is no Shell, and the card is shown without a menu.
@@ -80,6 +86,8 @@ export default function IssueContextMenu({
const { archive, dialog: archiveDialog } = useArchiveAction(project, onDeleted);
const restoreIssue = useRestoreIssue(project.project.key);
const actionsQuery = useActionsQuery(project.project.key);
+ const priorityLabel = usePriorityLabel();
+ const presetLabel = useDueDatePresetLabel();
const [open, setOpen] = useState(false);
const [confirmingDelete, setConfirmingDelete] = useState(false);
const [confirmingAction, setConfirmingAction] = useState<ActionDef | null>(null);
@@ -108,7 +116,7 @@ export default function IssueContextMenu({
async function copyPrompt() {
await navigator.clipboard.writeText(buildIssuePrompt(issue, project, session?.user));
- toast.success('Prompt copied to clipboard');
+ toast.success(t('promptCopied'));
}
const currentColumn = project.columns.find((c) => c.id === issue.columnId);
@@ -127,11 +135,11 @@ export default function IssueContextMenu({
open mode. Reading an issue needs no permission. */}
<ContextMenuItem onSelect={() => onOpenIssue(issue.id, 'panel')}>
<PanelRight />
- Preview
+ {t('preview')}
</ContextMenuItem>
<ContextMenuItem onSelect={() => onOpenIssue(issue.id, 'page')}>
<SquareArrowOutUpRight />
- Go to issue
+ {t('goToIssue')}
</ContextMenuItem>
<ContextMenuSeparator />
@@ -149,7 +157,7 @@ export default function IssueContextMenu({
) : (
<CircleDashed />
)}
- Status
+ {t('status')}
</ContextMenuSubTrigger>
<ContextMenuSubContent className="w-56">
{project.columns.map((c) => (
@@ -165,7 +173,7 @@ export default function IssueContextMenu({
<ContextMenuSub>
<ContextMenuSubTrigger>
{currentPriority.icon}
- Priority
+ {t('priority')}
</ContextMenuSubTrigger>
<ContextMenuSubContent className="w-52">
{PRIORITY_FIELDS.map((p) => (
@@ -174,7 +182,7 @@ export default function IssueContextMenu({
onSelect={() => patch({ priority: p.value || null })}
>
{p.icon}
- <span className="flex-1">{p.label}</span>
+ <span className="flex-1">{priorityLabel(p.value)}</span>
<SelectedCheck selected={p.value === (issue.priority ?? '')} />
</ContextMenuItem>
))}
@@ -185,12 +193,12 @@ export default function IssueContextMenu({
<ContextMenuSub>
<ContextMenuSubTrigger>
<User />
- Assignee
+ {t('assignee')}
</ContextMenuSubTrigger>
<ContextMenuSubContent className="w-56">
<ContextMenuItem onSelect={() => patch({ assigneeUserId: null })}>
<CircleDashed />
- <span className="flex-1">No assignee</span>
+ <span className="flex-1">{t('noAssignee')}</span>
<SelectedCheck selected={issue.assigneeUserId == null} />
</ContextMenuItem>
{members.map((a) => (
@@ -211,12 +219,12 @@ export default function IssueContextMenu({
<ContextMenuSub>
<ContextMenuSubTrigger>
<Bot />
- Delegate
+ {t('delegate')}
</ContextMenuSubTrigger>
<ContextMenuSubContent className="w-56">
<ContextMenuItem onSelect={() => patch({ delegateUserId: null })}>
<CircleDashed />
- <span className="flex-1">No delegate</span>
+ <span className="flex-1">{t('noDelegate')}</span>
<SelectedCheck selected={issue.delegateUserId == null} />
</ContextMenuItem>
{agents.map((a) => (
@@ -237,12 +245,12 @@ export default function IssueContextMenu({
<ContextMenuSub>
<ContextMenuSubTrigger>
{issue.initiative ? <Target /> : <CircleDashed />}
- Initiative
+ {t('initiative')}
</ContextMenuSubTrigger>
<ContextMenuSubContent className="w-56">
<ContextMenuItem onSelect={() => patch({ initiativeId: null })}>
<CircleDashed />
- <span className="flex-1">No initiative</span>
+ <span className="flex-1">{t('noInitiative')}</span>
<SelectedCheck selected={issue.initiative == null} />
</ContextMenuItem>
{initiatives.map((it) => (
@@ -260,12 +268,12 @@ export default function IssueContextMenu({
<ContextMenuSub>
<ContextMenuSubTrigger>
{issue.cycle ? <RefreshCw /> : <CircleDashed />}
- Cycle
+ {t('cycle')}
</ContextMenuSubTrigger>
<ContextMenuSubContent className="w-56">
<ContextMenuItem onSelect={() => patch({ cycleId: null })}>
<CircleDashed />
- <span className="flex-1">No cycle</span>
+ <span className="flex-1">{t('noCycle')}</span>
<SelectedCheck selected={issue.cycle == null} />
</ContextMenuItem>
{project.plannedCycles.map((cycle) => (
@@ -282,7 +290,7 @@ export default function IssueContextMenu({
<ContextMenuSub>
<ContextMenuSubTrigger>
<CalendarClock />
- Due date
+ {t('dueDate')}
</ContextMenuSubTrigger>
<ContextMenuSubContent className="w-72">
{dueDatePresets().map((p) => (
@@ -291,9 +299,13 @@ export default function IssueContextMenu({
onSelect={() => patch({ dueDate: toDateStr(p.date) })}
>
<CalendarClock />
- <span className="whitespace-nowrap">{p.label}</span>
+ <span className="whitespace-nowrap">{presetLabel(p.key)}</span>
<ContextMenuShortcut className="whitespace-nowrap">
- {formatPreset(p.date)}
+ {format.dateTime(p.date, {
+ weekday: 'short',
+ month: 'short',
+ day: 'numeric',
+ })}
</ContextMenuShortcut>
</ContextMenuItem>
))}
@@ -302,7 +314,7 @@ export default function IssueContextMenu({
<ContextMenuSeparator />
<ContextMenuItem onSelect={() => patch({ dueDate: null })}>
<X />
- Clear due date
+ {t('clearDueDate')}
</ContextMenuItem>
</>
)}
@@ -313,7 +325,7 @@ export default function IssueContextMenu({
<ContextMenuSub>
<ContextMenuSubTrigger>
<Tag />
- Labels
+ {t('labels')}
</ContextMenuSubTrigger>
<ContextMenuSubContent className="w-56">
{project.labels.map((l) => (
@@ -357,7 +369,7 @@ export default function IssueContextMenu({
to everyone — it only reads the issue, so no permission gate. */}
<ContextMenuItem onSelect={copyPrompt}>
<ClipboardCopy />
- Copy Prompt
+ {t('copyPrompt')}
</ContextMenuItem>
{canEdit && <ContextMenuSeparator />}
@@ -367,12 +379,12 @@ export default function IssueContextMenu({
(issue.archivedAt ? (
<ContextMenuItem onSelect={() => restoreIssue.mutate(issue.id)}>
<ArchiveRestore />
- Restore
+ {t('restore')}
</ContextMenuItem>
) : (
<ContextMenuItem onSelect={() => archive(issue)}>
<Archive />
- Archive
+ {t('archive')}
</ContextMenuItem>
))}
@@ -381,7 +393,7 @@ export default function IssueContextMenu({
{canDelete && (
<ContextMenuItem variant="destructive" onSelect={() => setConfirmingDelete(true)}>
<Trash2 />
- Delete
+ {tCommon('delete')}
</ContextMenuItem>
)}
</ContextMenuContent>
diff --git a/apps/web/src/features/issue/components/actions/SubtaskDisposalChoice.tsx b/apps/web/src/features/issue/components/actions/SubtaskDisposalChoice.tsx
index 5eea8445..f5512954 100644
--- a/apps/web/src/features/issue/components/actions/SubtaskDisposalChoice.tsx
+++ b/apps/web/src/features/issue/components/actions/SubtaskDisposalChoice.tsx
@@ -3,6 +3,7 @@ import { type SubtaskDisposition, type SubtaskMode } from '@/lib/api';
import { cn } from '@/lib/utils';
import IssuePickerDialog from '@/components/common/overlay/IssuePickerDialog';
import { Button } from '@/components/ui/button';
+import { useTranslations } from 'next-intl';
// What happens to the subtasks of the issues being removed. Shown inside the
// delete and archive confirmations whenever the selection has any: nothing is
@@ -25,6 +26,7 @@ export default function SubtaskDisposalChoice({
value: SubtaskDisposition | null;
onChange: (disposition: SubtaskDisposition) => void;
}) {
+ const t = useTranslations('issue.subtaskDisposal');
const [picking, setPicking] = useState(false);
const [newParent, setNewParent] = useState<string | null>(null);
@@ -32,16 +34,16 @@ export default function SubtaskDisposalChoice({
const options: { mode: SubtaskMode; label: string }[] = [
{
mode: 'cascade',
- label: action === 'delete' ? `Delete ${them} too` : `Archive ${them} too`,
+ label: action === 'delete' ? t('deleteToo', { count }) : t('archiveToo', { count }),
},
- { mode: 'detach', label: `Keep ${them} without a parent` },
- { mode: 'reassign', label: `Move ${them} to another issue` },
+ { mode: 'detach', label: t('detach', { count }) },
+ { mode: 'reassign', label: t('reassign', { count }) },
];
return (
<div className="space-y-2 rounded-md border p-3">
<p className="text-sm text-foreground">
- {removedIssueIds.length === 1 ? 'This issue has' : 'These issues have'} {count} subtask
+ {t('intro', { issues: removedIssueIds.length, count })}
{count === 1 ? '' : 's'}. Choose what happens to {them}.
</p>
<div className="flex flex-col gap-1">
@@ -67,7 +69,7 @@ export default function SubtaskDisposalChoice({
<p className="flex items-center gap-2 text-sm text-muted-foreground">
New parent: <span className="font-mono text-foreground">{newParent}</span>
<Button variant="ghost" size="sm" className="h-6" onClick={() => setPicking(true)}>
- Change
+ {t('change')}
</Button>
</p>
)}
@@ -75,8 +77,8 @@ export default function SubtaskDisposalChoice({
{picking && (
<IssuePickerDialog
projectKey={projectKey}
- title="Move the subtasks to another issue"
- prompt="Search the new parent issue…"
+ title={t('reassignTitle')}
+ prompt={t('searchParent')}
// A subtask cannot be the parent of another, and neither can an issue
// that is being removed here.
exclude={(hit) => hit.parentId !== null || removedIssueIds.includes(hit.id)}
diff --git a/apps/web/src/features/issue/components/create/NewIssueAttachButton.tsx b/apps/web/src/features/issue/components/create/NewIssueAttachButton.tsx
index 6a122212..2f2963b4 100644
--- a/apps/web/src/features/issue/components/create/NewIssueAttachButton.tsx
+++ b/apps/web/src/features/issue/components/create/NewIssueAttachButton.tsx
@@ -4,6 +4,7 @@ import { useStorageSettingsQuery } from '@/services/storage.service';
import { attachmentAccept, attachmentLimitHint } from '@/utils/uploadLimits';
import { Button } from '@/components/ui/button';
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
+import { useTranslations } from 'next-intl';
// Attaches files to an issue being created; the picked files are listed by
// NewIssueAttachmentStrip and uploaded once the issue exists.
@@ -12,6 +13,7 @@ export default function NewIssueAttachButton({
}: {
onPick: (files: FileList | null) => void;
}) {
+ const t = useTranslations('issue.attachments');
const limits = useStorageSettingsQuery().data;
const fileInput = useRef<HTMLInputElement>(null);
@@ -23,7 +25,7 @@ export default function NewIssueAttachButton({
variant="ghost"
size="icon"
className="text-muted-foreground hover:text-foreground"
- aria-label="Attach files"
+ aria-label={t('attachFiles')}
onClick={() => fileInput.current?.click()}
>
<Paperclip />
diff --git a/apps/web/src/features/issue/components/create/NewIssueAttachmentChip.tsx b/apps/web/src/features/issue/components/create/NewIssueAttachmentChip.tsx
index b9783fc5..9aa421c3 100644
--- a/apps/web/src/features/issue/components/create/NewIssueAttachmentChip.tsx
+++ b/apps/web/src/features/issue/components/create/NewIssueAttachmentChip.tsx
@@ -8,6 +8,7 @@ import IssueAttachmentThumb from '../IssueAttachmentThumb';
import IssueImageAnnotator from '../IssueImageAnnotator';
import { Button } from '@/components/ui/button';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
+import { useTranslations } from 'next-intl';
// One pending file in the footer strip: the thumbnail opens a larger preview to
// insert the file from, the corner button drops it. That button overhangs the
@@ -24,6 +25,7 @@ export default function NewIssueAttachmentChip({
onAnnotate: (id: number, file: File) => void;
onRemove: (id: number) => void;
}) {
+ const t = useTranslations('issue.attachments');
const [open, setOpen] = useState(false);
const [annotating, setAnnotating] = useState(false);
@@ -33,7 +35,7 @@ export default function NewIssueAttachmentChip({
<PopoverTrigger asChild>
<button
type="button"
- aria-label={`Preview ${item.filename}`}
+ aria-label={t('preview', { name: item.filename })}
className="relative flex size-full items-center justify-center overflow-hidden rounded-md border bg-muted hover:border-ring"
>
<IssueAttachmentThumb attachment={item} />
@@ -56,7 +58,7 @@ export default function NewIssueAttachmentChip({
setOpen(false);
}}
>
- Insert
+ {t('insertShort')}
</Button>
)}
{isImage(item) && (
@@ -69,7 +71,7 @@ export default function NewIssueAttachmentChip({
setAnnotating(true);
}}
>
- Annotate
+ {t('annotate')}
</Button>
)}
</PopoverContent>
@@ -91,8 +93,8 @@ export default function NewIssueAttachmentChip({
<button
type="button"
onClick={() => onRemove(item.id)}
- aria-label={`Remove ${item.filename}`}
- title="Remove"
+ aria-label={t('remove', { name: item.filename })}
+ title={t('removeShort')}
className="absolute -top-2 -right-2 flex size-4 items-center justify-center rounded-full border bg-popover text-muted-foreground opacity-0 shadow-sm transition-opacity group-hover:opacity-100 hover:text-destructive focus-visible:opacity-100"
>
<X className="size-3" />
diff --git a/apps/web/src/features/issue/components/create/NewIssueBody.tsx b/apps/web/src/features/issue/components/create/NewIssueBody.tsx
index e40e1706..f6a4c56c 100644
--- a/apps/web/src/features/issue/components/create/NewIssueBody.tsx
+++ b/apps/web/src/features/issue/components/create/NewIssueBody.tsx
@@ -7,6 +7,7 @@ import { hasFieldValue } from '../../utils/fieldValues';
import IssueMarkdownEditor from '../editor/IssueMarkdownEditor';
import NewIssueBodyFields from './NewIssueBodyFields';
import NewIssueBodySwitcher from './NewIssueBodySwitcher';
+import { useTranslations } from 'next-intl';
// The written part of a new issue: the description, plus the custom fields the
// project shows in the body. A switcher keeps one markdown field on screen at a
@@ -40,6 +41,9 @@ export default function NewIssueBody({
onFieldEditorReady: (id: number, editor: Editor | null) => void;
uploadFile: (file: File) => Promise<Embeddable>;
}) {
+ const t = useTranslations('issue.create');
+ const tEditor = useTranslations('issue.editor');
+ const tFields = useTranslations('issue.fields');
const markdownDefs = bodyDefs.filter((d) => d.fieldType === 'markdown');
const pillDefs = bodyDefs.filter((d) => d.fieldType !== 'markdown');
@@ -50,6 +54,7 @@ export default function NewIssueBody({
const descriptionEditor = (
<IssueMarkdownEditor
className={cn(bodyDefs.length === 0 && 'mt-3', editorClass)}
+ placeholder={tEditor('descriptionPlaceholder')}
defaultValue={description}
onChange={onDescriptionChange}
onReady={onDescriptionReady}
@@ -60,7 +65,7 @@ export default function NewIssueBody({
if (bodyDefs.length === 0) return descriptionEditor;
const sections = [
- { value: DESCRIPTION_SECTION, label: 'Description', filled: description.trim() !== '' },
+ { value: DESCRIPTION_SECTION, label: t('description'), filled: description.trim() !== '' },
...markdownDefs.map((def) => ({
value: fieldSection(def.id),
label: def.name,
@@ -70,7 +75,7 @@ export default function NewIssueBody({
? [
{
value: OTHER_SECTION,
- label: 'Other',
+ label: t('other'),
filled: pillDefs.some((def) => hasFieldValue(fieldValues[def.id])),
},
]
@@ -99,7 +104,7 @@ export default function NewIssueBody({
<IssueMarkdownEditor
className={editorClass}
defaultValue={(fieldValues[def.id]?.value as string) ?? ''}
- placeholder="Empty"
+ placeholder={tFields('empty')}
onChange={(md) => onFieldValue(def.id, { value: md })}
onReady={(editor) => onFieldEditorReady(def.id, editor)}
uploadFile={uploadFile}
diff --git a/apps/web/src/features/issue/components/create/NewIssueDropOverlay.tsx b/apps/web/src/features/issue/components/create/NewIssueDropOverlay.tsx
index fd782b0e..f4f6170b 100644
--- a/apps/web/src/features/issue/components/create/NewIssueDropOverlay.tsx
+++ b/apps/web/src/features/issue/components/create/NewIssueDropOverlay.tsx
@@ -1,21 +1,20 @@
import { Paperclip } from 'lucide-react';
+import { useTranslations } from 'next-intl';
// Covers the whole modal while files are dragged over it, stating where they
// land. pointer-events-none so the drag events keep reaching the modal below.
export default function NewIssueDropOverlay({ count }: { count: number }) {
+ const t = useTranslations('issue.attachments');
let label: string;
- if (count === 1) label = 'Drop the file';
- else if (count > 1) label = `Drop ${count} files`;
+ if (count > 0) label = t('dropCount', { count });
// A drag does not always expose its items, leaving the count at 0.
- else label = 'Drop files';
+ else label = t('drop');
return (
<div className="pointer-events-none absolute inset-0 z-50 flex flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed border-primary bg-background/80 text-primary backdrop-blur-sm">
<Paperclip className="size-6" />
<span className="text-sm font-medium">{label}</span>
- <span className="text-xs text-muted-foreground">
- Added to the description and attached to the issue
- </span>
+ <span className="text-xs text-muted-foreground">{t('dropHint')}</span>
</div>
);
}
diff --git a/apps/web/src/features/issue/components/create/NewIssueModal.tsx b/apps/web/src/features/issue/components/create/NewIssueModal.tsx
index eb857f5b..f59f1df2 100644
--- a/apps/web/src/features/issue/components/create/NewIssueModal.tsx
+++ b/apps/web/src/features/issue/components/create/NewIssueModal.tsx
@@ -50,6 +50,7 @@ import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover
import { Pill } from '@/components/common/fields/Pill';
import InitiativeSelect from '../fields/InitiativeSelect';
import CycleSelect from '../fields/CycleSelect';
+import { useTranslations } from 'next-intl';
export default function NewIssueModal({
project,
@@ -66,6 +67,8 @@ export default function NewIssueModal({
onClose: () => void;
onCreated: (created: Issue) => void;
}) {
+ const t = useTranslations('issue.create');
+ const tFields = useTranslations('issue.fields');
const [title, setTitle] = useState(defaults.title ?? '');
const [description, setDescription] = useState(defaults.description ?? '');
const [columnId, setColumnId] = useState(defaults.columnId);
@@ -258,7 +261,7 @@ export default function NewIssueModal({
return (
<Modal
- title="New issue"
+ title={t('title')}
crumb={crumb}
projectKey={project.project.key}
onClose={onClose}
@@ -278,7 +281,7 @@ export default function NewIssueModal({
{draggedFiles !== null && <NewIssueDropOverlay count={draggedFiles} />}
<input
className="w-full bg-transparent text-lg font-semibold outline-none placeholder:text-muted-foreground"
- placeholder="Issue title"
+ placeholder={t('titlePlaceholder')}
value={title}
onChange={(e) => setTitle(e.target.value)}
autoFocus
@@ -315,7 +318,7 @@ export default function NewIssueModal({
assignees={project.assignees}
value={assigneeUserId}
onChange={setAssigneeUserId}
- placeholder="Assignee"
+ placeholder={tFields('assignee')}
/>
)}
@@ -324,7 +327,7 @@ export default function NewIssueModal({
assignees={project.assignees}
value={delegateUserId}
onChange={setDelegateUserId}
- placeholder="Delegate"
+ placeholder={tFields('delegate')}
/>
)}
@@ -357,13 +360,13 @@ export default function NewIssueModal({
<DatePill
value={startDate || null}
- placeholder="Start date"
+ placeholder={tFields('startDate')}
onChange={(v) => setStartDate(v ?? '')}
/>
<DatePill
value={dueDate || null}
- placeholder="Due date"
+ placeholder={tFields('dueDate')}
onChange={(v) => setDueDate(v ?? '')}
/>
@@ -388,9 +391,9 @@ export default function NewIssueModal({
</PopoverTrigger>
<PopoverContent className="w-56 p-0" align="start">
<Command>
- <CommandInput placeholder="Add field…" />
+ <CommandInput placeholder={t('addFieldPlaceholder')} />
<CommandList>
- <CommandEmpty>No fields.</CommandEmpty>
+ <CommandEmpty>{t('noFields')}</CommandEmpty>
<CommandGroup>
{availableDefs.map((def) => (
<CommandItem
@@ -425,7 +428,7 @@ export default function NewIssueModal({
onRemove={removeAttachment}
/>
<Button className="ml-auto" disabled={saving || !title.trim()} onClick={submit}>
- Create issue
+ {t('submit')}
</Button>
</div>
</div>
diff --git a/apps/web/src/features/issue/components/detail/ActivityLine.tsx b/apps/web/src/features/issue/components/detail/ActivityLine.tsx
index ea087a91..9f10c0c5 100644
--- a/apps/web/src/features/issue/components/detail/ActivityLine.tsx
+++ b/apps/web/src/features/issue/components/detail/ActivityLine.tsx
@@ -1,8 +1,10 @@
-import { formatDistanceToNow, parseISO } from 'date-fns';
+import { parseISO } from 'date-fns';
+import { useFormatter, useTranslations } from 'next-intl';
import { CircleDot } from 'lucide-react';
import { type FeedItem } from '@/lib/api';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
-import { ACTION_ICON, describeActivity } from '../../utils/activityText';
+import { ACTION_ICON } from '../../utils/activityIcons';
+import { useActivityText } from '../../hooks/useActivityText';
import IssueMarkdownEditor from '../editor/IssueMarkdownEditor';
// One change-log entry in an activity list: icon, actor, the sentence describing
@@ -11,9 +13,12 @@ import IssueMarkdownEditor from '../editor/IssueMarkdownEditor';
// live feed, the shared read-only feed, and the timeline's per-status popover.
export default function ActivityLine({ item }: { item: FeedItem }) {
+ const t = useTranslations('issue');
+ const format = useFormatter();
+ const describeActivity = useActivityText();
const Icon = (item.action && ACTION_ICON[item.action]) || CircleDot;
const { line, popover } = describeActivity(item);
- const actor = item.actorName ?? 'System';
+ const actor = item.actorName ?? t('system');
return (
<li className="flex items-center gap-2.5 text-xs">
<span className="flex size-5 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground">
@@ -28,7 +33,7 @@ export default function ActivityLine({ item }: { item: FeedItem }) {
type="button"
className="ml-1.5 text-foreground/70 underline underline-offset-2 hover:text-foreground"
>
- view
+ {t('viewValue')}
</button>
</PopoverTrigger>
<PopoverContent align="start" className="max-h-80 w-96 overflow-y-auto">
@@ -36,9 +41,7 @@ export default function ActivityLine({ item }: { item: FeedItem }) {
</PopoverContent>
</Popover>
)}
- <span className="ml-1.5 text-xs">
- · {formatDistanceToNow(parseISO(item.createdAt), { addSuffix: true })}
- </span>
+ <span className="ml-1.5 text-xs">· {format.relativeTime(parseISO(item.createdAt))}</span>
</span>
</li>
);
diff --git a/apps/web/src/features/issue/components/detail/CommentComposer.tsx b/apps/web/src/features/issue/components/detail/CommentComposer.tsx
index 21d6203a..9df21399 100644
--- a/apps/web/src/features/issue/components/detail/CommentComposer.tsx
+++ b/apps/web/src/features/issue/components/detail/CommentComposer.tsx
@@ -5,6 +5,7 @@ import Avatar from '@/components/common/Avatar';
import { Button } from '@/components/ui/button';
import { Textarea } from '@/components/ui/textarea';
import { useCreateComment } from '../../services/comments.service';
+import { useTranslations } from 'next-intl';
// The new-comment box: a plain markdown textarea with an @-mention menu. Typing "@"
// opens a menu of the project's members and agents; picking one inserts a mention
@@ -30,6 +31,7 @@ export default function CommentComposer({
authorName: string;
authorImage?: string | null;
}) {
+ const t = useTranslations('issue.comments');
const createComment = useCreateComment();
const [body, setBody] = useState('');
const [menu, setMenu] = useState<MentionQuery | null>(null);
@@ -126,7 +128,7 @@ export default function CommentComposer({
name={authorName}
image={authorImage}
className="mt-0.5 size-7 text-[11px]"
- title={`Comment as ${authorName}`}
+ title={t('commentAs', { name: authorName })}
/>
<div className="relative min-w-0 flex-1">
<div className="overflow-hidden rounded-lg border bg-muted/20 shadow-xs transition-[border-color,box-shadow] focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/30">
@@ -137,7 +139,7 @@ export default function CommentComposer({
onChange(e.target.value, e.target.selectionStart ?? e.target.value.length)
}
onBlur={() => setMenu(null)}
- placeholder="Write a comment… use @ to mention"
+ placeholder={t('placeholder')}
className="min-h-[64px] resize-none rounded-none border-0 bg-transparent px-3 py-2.5 shadow-none focus-visible:ring-0"
onKeyDown={onKeyDown}
/>
@@ -146,10 +148,10 @@ export default function CommentComposer({
<kbd className="rounded bg-muted px-1.5 py-0.5 font-sans text-[10px] font-medium">
{cmdKey} ↵
</kbd>
- <span className="ml-1.5">to send</span>
+ <span className="ml-1.5">{t('toSend')}</span>
</span>
<Button size="sm" disabled={!body.trim() || posting} onClick={() => void post()}>
- {posting ? 'Posting…' : 'Comment'}
+ {posting ? t('posting') : t('comment')}
</Button>
</div>
</div>
diff --git a/apps/web/src/features/issue/components/detail/CommentItem.tsx b/apps/web/src/features/issue/components/detail/CommentItem.tsx
index 0cbf36f0..6eb4b392 100644
--- a/apps/web/src/features/issue/components/detail/CommentItem.tsx
+++ b/apps/web/src/features/issue/components/detail/CommentItem.tsx
@@ -3,6 +3,7 @@ import { type FeedItem } from '@/lib/api';
import Avatar from '@/components/common/Avatar';
import { mentionsToChips } from '../../utils/mentions';
import IssueMarkdownEditor from '../editor/IssueMarkdownEditor';
+import { useTranslations } from 'next-intl';
// One comment in an activity list: avatar, author, age, and the rendered markdown
// body. A feed entry stores the author's name, not their picture, so the uploaded
@@ -10,7 +11,8 @@ import IssueMarkdownEditor from '../editor/IssueMarkdownEditor';
// live feed, the shared read-only feed, and the timeline's per-status popover.
export default function CommentItem({ item, image }: { item: FeedItem; image: string | null }) {
- const author = item.actorName ?? 'Unknown';
+ const t = useTranslations('issue.comments');
+ const author = item.actorName ?? t('unknownAuthor');
return (
<li className="flex gap-3">
<Avatar name={author} image={image} className="mt-0.5 size-7 text-[11px]" />
diff --git a/apps/web/src/features/issue/components/detail/IssueActivityFeed.tsx b/apps/web/src/features/issue/components/detail/IssueActivityFeed.tsx
index 7b4fc628..39b1349f 100644
--- a/apps/web/src/features/issue/components/detail/IssueActivityFeed.tsx
+++ b/apps/web/src/features/issue/components/detail/IssueActivityFeed.tsx
@@ -6,6 +6,7 @@ import { useAccountPreferencesQuery } from '@/services/preferences.service';
import CommentComposer from './CommentComposer';
import IssueFeedList from './IssueFeedList';
import IssueGroupedFeed from './IssueGroupedFeed';
+import { useTranslations } from 'next-intl';
// The issue's activity log: a comment composer over the entries, in one of two shapes
// picked by the tabs between them. Both run newest first and page 25 at a time; the
@@ -22,6 +23,8 @@ export default function IssueActivityFeed({
columns: Column[];
imageByUserId: Map<string, string | null>;
}) {
+ const tIssue = useTranslations('issue');
+ const t = useTranslations('issue.comments');
const { data: session } = useSession();
const { data: preferences } = useAccountPreferencesQuery();
// Null until the person picks a shape on this issue, and then it wins over the
@@ -32,13 +35,13 @@ export default function IssueActivityFeed({
const view = viewHere ?? preferences?.issueActivityView;
const user = session?.user ?? null;
- const authorName = user?.name || user?.email || 'You';
+ const authorName = user?.name || user?.email || t('you');
const authorImage = (user as { image?: string | null } | null)?.image ?? null;
return (
<div className="mt-6 border-t pt-5">
<h3 className="mb-4 text-xs font-medium tracking-wide text-muted-foreground uppercase">
- Activity
+ {tIssue('activityHeading')}
</h3>
<CommentComposer
@@ -56,10 +59,10 @@ export default function IssueActivityFeed({
>
<TabsList className="ml-auto h-7 p-[2px]">
<TabsTrigger value="flat" className="px-2 text-xs">
- Flat
+ {tIssue('feedFlat')}
</TabsTrigger>
<TabsTrigger value="grouped" className="px-2 text-xs">
- Grouped
+ {tIssue('feedGrouped')}
</TabsTrigger>
</TabsList>
<TabsContent value="flat">
diff --git a/apps/web/src/features/issue/components/detail/IssueActivityGroup.tsx b/apps/web/src/features/issue/components/detail/IssueActivityGroup.tsx
index 65b02575..14c66f52 100644
--- a/apps/web/src/features/issue/components/detail/IssueActivityGroup.tsx
+++ b/apps/web/src/features/issue/components/detail/IssueActivityGroup.tsx
@@ -2,6 +2,7 @@ import { type FeedGroup } from '@/lib/api';
import { formatDateTime } from '@/utils/dates';
import { durationLabel } from '../../utils/timeline';
import ActivityItemList from './ActivityItemList';
+import { useTranslations } from 'next-intl';
// One stretch of the grouped activity log: a header carrying the status, how long the
// issue stayed in it and when, over the entries written while it was there.
@@ -15,6 +16,7 @@ export default function IssueActivityGroup({
color: string;
imageByUserId: Map<string, string | null>;
}) {
+ const t = useTranslations('issue.stats');
const range = group.to
? `${formatDateTime(group.from)} → ${formatDateTime(group.to)}`
: `since ${formatDateTime(group.from)}`;
@@ -27,7 +29,7 @@ export default function IssueActivityGroup({
/>
<div className="flex flex-wrap items-baseline justify-between gap-x-3 gap-y-1 border-b pb-2">
<div className="flex items-baseline gap-2">
- <span className="text-sm font-medium">{group.status ?? 'Unknown status'}</span>
+ <span className="text-sm font-medium">{group.status ?? t('unknownStatus')}</span>
{group.repeat && <span className="text-xs text-muted-foreground">· again</span>}
<span className="rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground tabular-nums">
{durationLabel(group.durationMs)}
diff --git a/apps/web/src/features/issue/components/detail/IssueAttachmentCard.tsx b/apps/web/src/features/issue/components/detail/IssueAttachmentCard.tsx
index 4d9f1665..2bf6aebc 100644
--- a/apps/web/src/features/issue/components/detail/IssueAttachmentCard.tsx
+++ b/apps/web/src/features/issue/components/detail/IssueAttachmentCard.tsx
@@ -5,6 +5,7 @@ import { attachmentHtml, isImage, isVideo } from '../../utils/attachmentEmbed';
import { formatSize } from '../../utils/fileSize';
import IssueAttachmentThumb from '../IssueAttachmentThumb';
import { Button } from '@/components/ui/button';
+import { useTranslations } from 'next-intl';
function onDragStart(e: DragEvent<HTMLElement>, a: Attachment) {
e.dataTransfer.setData('text/html', attachmentHtml(a));
@@ -33,13 +34,15 @@ export default function IssueAttachmentCard({
onDelete: () => void;
readOnly?: boolean;
}) {
+ const t = useTranslations('issue.attachments');
+ const tCommon = useTranslations('common');
const viewable = isImage(attachment) || isVideo(attachment);
const dragProps = readOnly
? {}
: {
draggable: true,
onDragStart: (e: DragEvent<HTMLElement>) => onDragStart(e, attachment),
- title: 'Drag into the description',
+ title: t('dragIntoDescription'),
};
return (
@@ -59,8 +62,8 @@ export default function IssueAttachmentCard({
<button
type="button"
onClick={onOpen}
- title="Open preview"
- aria-label={`Open ${attachment.filename}`}
+ title={t('openPreview')}
+ aria-label={t('open', { name: attachment.filename })}
className="absolute inset-0 cursor-zoom-in"
/>
)}
@@ -76,8 +79,8 @@ export default function IssueAttachmentCard({
variant="ghost"
size="icon"
className="size-7"
- title="Insert into the description"
- aria-label={`Insert ${attachment.filename} into the description`}
+ title={t('insertIntoDescription')}
+ aria-label={t('insert', { name: attachment.filename })}
onClick={onInsert}
>
<Plus />
@@ -87,8 +90,8 @@ export default function IssueAttachmentCard({
variant="ghost"
size="icon"
className="size-7"
- title="Annotate"
- aria-label={`Annotate ${attachment.filename}`}
+ title={t('annotate')}
+ aria-label={t('annotateFile', { name: attachment.filename })}
onClick={onAnnotate}
>
<PenLine />
@@ -96,11 +99,11 @@ export default function IssueAttachmentCard({
)}
</>
)}
- <Button variant="ghost" size="icon" className="size-7" asChild title="Download">
+ <Button variant="ghost" size="icon" className="size-7" asChild title={t('download')}>
<a
href={`${attachment.url}?download=1`}
download={attachment.filename}
- aria-label={`Download ${attachment.filename}`}
+ aria-label={t('downloadFile', { name: attachment.filename })}
draggable={false}
>
<Download />
@@ -111,8 +114,8 @@ export default function IssueAttachmentCard({
variant="ghost"
size="icon"
className="size-7 text-muted-foreground hover:text-destructive"
- title="Delete"
- aria-label={`Delete ${attachment.filename}`}
+ title={tCommon('delete')}
+ aria-label={t('deleteFile', { name: attachment.filename })}
onClick={onDelete}
>
<Trash2 />
diff --git a/apps/web/src/features/issue/components/detail/IssueAttachmentsPanel.tsx b/apps/web/src/features/issue/components/detail/IssueAttachmentsPanel.tsx
index af2505fb..8fa23869 100644
--- a/apps/web/src/features/issue/components/detail/IssueAttachmentsPanel.tsx
+++ b/apps/web/src/features/issue/components/detail/IssueAttachmentsPanel.tsx
@@ -17,6 +17,7 @@ import IssueSectionHeading from './IssueSectionHeading';
import { useStorageSettingsQuery } from '@/services/storage.service';
import { attachmentAccept, attachmentError, attachmentLimitHint } from '@/utils/uploadLimits';
import { Button } from '@/components/ui/button';
+import { useTranslations } from 'next-intl';
// Attachments for one issue, as a grid of preview cards: upload, look at,
// annotate, download, delete, and insert into the description. onInsert hands the
@@ -33,6 +34,7 @@ export default function IssueAttachmentsPanel({
// When true the files can only be viewed and downloaded.
readOnly?: boolean;
}) {
+ const t = useTranslations('issue.attachments');
const attachmentsQuery = useAttachmentsQuery(issueId);
const items = attachmentsQuery.data ?? [];
const uploadAttachment = useUploadAttachment();
@@ -70,7 +72,7 @@ export default function IssueAttachmentsPanel({
await uploadAttachment.mutateAsync({ issueId, file });
}
} catch (err) {
- setError(err instanceof Error ? err.message : 'Upload failed');
+ setError(err instanceof Error ? err.message : t('uploadFailed'));
} finally {
if (fileInput.current) fileInput.current.value = '';
}
@@ -88,7 +90,7 @@ export default function IssueAttachmentsPanel({
{/* Fixed height: the Add button only renders while the section is open, and
without it the row would shrink to the height of the heading text. */}
<div className={`flex h-7 items-center justify-between gap-3 ${open ? 'mb-3' : ''}`}>
- <IssueSectionHeading label="Attachments" open={open} onToggle={toggle} />
+ <IssueSectionHeading label={t('title')} open={open} onToggle={toggle} />
{open && !readOnly && (
<Button
variant="ghost"
@@ -99,7 +101,7 @@ export default function IssueAttachmentsPanel({
onClick={() => fileInput.current?.click()}
>
<Plus className="size-4" />
- {uploading ? 'Uploading…' : 'Add'}
+ {uploading ? t('uploading') : t('add')}
</Button>
)}
<input
@@ -117,7 +119,7 @@ export default function IssueAttachmentsPanel({
{open &&
(items.length === 0 ? (
<p className="rounded-md border border-dashed p-4 text-center text-sm text-muted-foreground">
- {readOnly ? 'No attachments yet.' : 'Drop files here, or use Add to upload.'}
+ {readOnly ? t('empty') : t('emptyHint')}
</p>
) : (
<div className="grid grid-cols-[repeat(auto-fill,minmax(8.5rem,1fr))] gap-2">
@@ -166,7 +168,7 @@ export default function IssueAttachmentsPanel({
{draggedFiles !== null && (
<div className="pointer-events-none absolute inset-0 top-5 z-30 flex flex-col items-center justify-center gap-2 rounded-md border-2 border-dashed border-primary bg-background/80 text-primary backdrop-blur-sm">
<Download className="size-6" />
- <span className="text-sm font-medium">Drop files to upload</span>
+ <span className="text-sm font-medium">{t('dropToUpload')}</span>
</div>
)}
</div>
diff --git a/apps/web/src/features/issue/components/detail/IssueChecklistCard.tsx b/apps/web/src/features/issue/components/detail/IssueChecklistCard.tsx
index 4965447c..1d1b7099 100644
--- a/apps/web/src/features/issue/components/detail/IssueChecklistCard.tsx
+++ b/apps/web/src/features/issue/components/detail/IssueChecklistCard.tsx
@@ -19,6 +19,7 @@ import {
import IssueChecklistAddInput from './IssueChecklistAddInput';
import IssueChecklistHeader from './IssueChecklistHeader';
import IssueChecklistItemRow from './IssueChecklistItemRow';
+import { useTranslations } from 'next-intl';
// One checklist: its title row and its items. The items are sortable within this
// checklist only — the SortableContext holds just its own item ids, so a row
@@ -32,6 +33,7 @@ export default function IssueChecklistCard({
checklist: Checklist;
canEdit: boolean;
}) {
+ const t = useTranslations('issue.checklists');
const [adding, setAdding] = useState(false);
const sensors = useDndSensors();
const renameChecklist = useRenameChecklist();
@@ -103,7 +105,7 @@ export default function IssueChecklistCard({
(adding ? (
<div className="mt-1 px-2">
<IssueChecklistAddInput
- placeholder="Add an item…"
+ placeholder={t('addItem')}
maxLength={CHECKLIST_ITEM_MAX}
onSubmit={(content) =>
createItem.mutate({ issueId, checklistId: checklist.id, content })
@@ -118,7 +120,7 @@ export default function IssueChecklistCard({
className="mt-1 h-7 w-full justify-start gap-1.5 text-muted-foreground"
onClick={() => setAdding(true)}
>
- <Plus className="size-4" /> Add an item
+ <Plus className="size-4" /> {t('addItemButton')}
</Button>
))}
</div>
diff --git a/apps/web/src/features/issue/components/detail/IssueChecklistGrip.tsx b/apps/web/src/features/issue/components/detail/IssueChecklistGrip.tsx
index 0c32e319..1dd2ecf4 100644
--- a/apps/web/src/features/issue/components/detail/IssueChecklistGrip.tsx
+++ b/apps/web/src/features/issue/components/detail/IssueChecklistGrip.tsx
@@ -1,5 +1,6 @@
import { type useSortable } from '@dnd-kit/sortable';
import { GripVertical } from 'lucide-react';
+import { useTranslations } from 'next-intl';
// Taken from useSortable's own return type: dnd-kit does not export the listener
// map type from its package root, and reaching into its dist/ internals for it
@@ -21,6 +22,7 @@ export default function IssueChecklistGrip({
listeners: Sortable['listeners'];
className: string;
}) {
+ const t = useTranslations('issue.checklists');
if (!canEdit) return <span className="-ml-1 size-4" />;
return (
@@ -29,7 +31,7 @@ export default function IssueChecklistGrip({
{...attributes}
{...listeners}
className={`-ml-1 cursor-grab touch-none text-muted-foreground/50 ${className}`}
- title="Drag to reorder"
+ title={t('dragToReorder')}
>
<GripVertical className="size-4" />
</button>
diff --git a/apps/web/src/features/issue/components/detail/IssueChecklistHeader.tsx b/apps/web/src/features/issue/components/detail/IssueChecklistHeader.tsx
index b0e84395..fa7a98df 100644
--- a/apps/web/src/features/issue/components/detail/IssueChecklistHeader.tsx
+++ b/apps/web/src/features/issue/components/detail/IssueChecklistHeader.tsx
@@ -5,6 +5,7 @@ import { Button } from '@/components/ui/button';
import { CHECKLIST_TITLE_MAX } from '../../utils/checklists';
import IssueChecklistEditableText from './IssueChecklistEditableText';
import IssueChecklistGrip from './IssueChecklistGrip';
+import { useTranslations } from 'next-intl';
type Sortable = ReturnType<typeof useSortable>;
@@ -25,6 +26,7 @@ export default function IssueChecklistHeader({
onRename: (title: string) => void;
onDelete: () => void;
}) {
+ const t = useTranslations('issue.checklists');
const done = checklist.items.filter((item) => item.done).length;
return (
@@ -55,7 +57,7 @@ export default function IssueChecklistHeader({
variant="ghost"
size="icon"
className="size-6 shrink-0 opacity-0 group-hover/list:opacity-100 hover:text-destructive"
- aria-label={`Delete checklist ${checklist.title}`}
+ aria-label={t('deleteChecklist', { title: checklist.title })}
onClick={onDelete}
>
<Trash2 className="size-3.5" />
diff --git a/apps/web/src/features/issue/components/detail/IssueChecklistItemRow.tsx b/apps/web/src/features/issue/components/detail/IssueChecklistItemRow.tsx
index 2d39540c..46bdd5c3 100644
--- a/apps/web/src/features/issue/components/detail/IssueChecklistItemRow.tsx
+++ b/apps/web/src/features/issue/components/detail/IssueChecklistItemRow.tsx
@@ -8,6 +8,7 @@ import { cn } from '@/lib/utils';
import { CHECKLIST_ITEM_MAX } from '../../utils/checklists';
import IssueChecklistEditableText from './IssueChecklistEditableText';
import IssueChecklistGrip from './IssueChecklistGrip';
+import { useTranslations } from 'next-intl';
// One checkbox line. The row is the sortable node and the grip is its handle, so
// the checkbox and the text stay clickable while dragging is possible.
@@ -24,6 +25,7 @@ export default function IssueChecklistItemRow({
onRename: (content: string) => void;
onRemove: () => void;
}) {
+ const t = useTranslations('issue.checklists');
const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({
id: item.id,
disabled: !canEdit,
@@ -65,7 +67,7 @@ export default function IssueChecklistItemRow({
variant="ghost"
size="icon"
className="size-6 shrink-0 opacity-0 group-hover:opacity-100 hover:text-destructive"
- aria-label={`Remove ${item.content}`}
+ aria-label={t('removeItem', { item: item.content })}
onClick={onRemove}
>
<X className="size-3.5" />
diff --git a/apps/web/src/features/issue/components/detail/IssueChecklistsPanel.tsx b/apps/web/src/features/issue/components/detail/IssueChecklistsPanel.tsx
index f0ba477d..0ed0222b 100644
--- a/apps/web/src/features/issue/components/detail/IssueChecklistsPanel.tsx
+++ b/apps/web/src/features/issue/components/detail/IssueChecklistsPanel.tsx
@@ -12,11 +12,14 @@ import { useCreateChecklist, useReorderChecklists } from '../../services/checkli
import IssueChecklistAddInput from './IssueChecklistAddInput';
import IssueChecklistCard from './IssueChecklistCard';
import IssueSectionHeading from './IssueSectionHeading';
+import { useTranslations } from 'next-intl';
// The issue's checklists: lists of small steps that do not warrant subtasks of
// their own. The tally counts every item of every checklist, so the heading says
// how much of the card is done without expanding it.
export default function IssueChecklistsPanel({ issue }: { issue: IssueWithWatchers }) {
+ const tCommon = useTranslations('common');
+ const t = useTranslations('issue.checklists');
const { can } = usePermissions();
const canEdit = can('work_items', 'edit');
const [adding, setAdding] = useState(false);
@@ -38,10 +41,10 @@ export default function IssueChecklistsPanel({ issue }: { issue: IssueWithWatche
return (
<div className={`mt-6 border-t pt-5 ${open ? '' : '-mb-2'}`}>
<div className={`flex h-7 items-center justify-between gap-3 ${open ? 'mb-3' : ''}`}>
- <IssueSectionHeading label="Checklists" open={open} onToggle={toggle} tally={tally} />
+ <IssueSectionHeading label={t('title')} open={open} onToggle={toggle} tally={tally} />
{open && canEdit && !adding && (
<Button variant="ghost" size="sm" className="h-7 gap-1.5" onClick={() => setAdding(true)}>
- <Plus className="size-4" /> Add
+ <Plus className="size-4" /> {tCommon('add')}
</Button>
)}
</div>
@@ -50,9 +53,7 @@ export default function IssueChecklistsPanel({ issue }: { issue: IssueWithWatche
<>
{checklists.length === 0 && !adding ? (
<p className="rounded-md border border-dashed p-4 text-center text-sm text-muted-foreground">
- {canEdit
- ? 'Use Add to track small steps without creating subtasks.'
- : 'No checklists yet.'}
+ {canEdit ? t('emptyHint') : t('empty')}
</p>
) : (
<DndContext
@@ -81,7 +82,7 @@ export default function IssueChecklistsPanel({ issue }: { issue: IssueWithWatche
{adding && (
<div className="mt-2">
<IssueChecklistAddInput
- placeholder="Checklist title…"
+ placeholder={t('titlePlaceholder')}
maxLength={CHECKLIST_TITLE_MAX}
onSubmit={(title) => createChecklist.mutate({ issueId: issue.id, title })}
onClose={() => setAdding(false)}
diff --git a/apps/web/src/features/issue/components/detail/IssueDetail.tsx b/apps/web/src/features/issue/components/detail/IssueDetail.tsx
index 5e277448..c40d7ea3 100644
--- a/apps/web/src/features/issue/components/detail/IssueDetail.tsx
+++ b/apps/web/src/features/issue/components/detail/IssueDetail.tsx
@@ -5,6 +5,7 @@ import IssueDetailContent from './IssueDetailContent';
import IssueActionsBar from '../actions/IssueActionsBar';
import { useExitOnEscape } from '@/hooks/useExitOnEscape';
import { Button } from '@/components/ui/button';
+import { useTranslations } from 'next-intl';
// The issue detail as a right-hand side panel over the project. Expand opens the
// same issue as a full page; the shared body lives in IssueDetailContent.
@@ -21,6 +22,8 @@ export default function IssueDetail({
// (/project/KEY/issue/42); null while the issue is still loading.
onExpand: (sequenceNumber: number | null) => void;
}) {
+ const t = useTranslations('issue');
+ const tCommon = useTranslations('common');
const [issue, setIssue] = useState<IssueDetailRow | null>(null);
useExitOnEscape(onClose);
@@ -55,11 +58,17 @@ export default function IssueDetail({
size="icon"
className="size-7 text-muted-foreground hover:text-foreground"
onClick={() => onExpand(issue?.sequenceNumber ?? null)}
- title="Open as page"
+ title={t('openAsPage')}
>
<Maximize2 />
</Button>
- <Button variant="ghost" size="icon" className="size-7" onClick={onClose} title="Close">
+ <Button
+ variant="ghost"
+ size="icon"
+ className="size-7"
+ onClick={onClose}
+ title={tCommon('close')}
+ >
<X />
</Button>
</div>
diff --git a/apps/web/src/features/issue/components/detail/IssueDetailContent.tsx b/apps/web/src/features/issue/components/detail/IssueDetailContent.tsx
index 192c6a22..9e46c0fb 100644
--- a/apps/web/src/features/issue/components/detail/IssueDetailContent.tsx
+++ b/apps/web/src/features/issue/components/detail/IssueDetailContent.tsx
@@ -16,6 +16,7 @@ import IssueMarkdownEditor from '../editor/IssueMarkdownEditor';
import IssueCustomFieldBody from '../fields/IssueCustomFieldBody';
import IssueProperties from './IssueProperties';
import IssueActionsBar from '../actions/IssueActionsBar';
+import { useTranslations } from 'next-intl';
// The body of a issue — title, description, markdown custom fields, the
// Properties grid, attachments, and the activity feed. Shared by the side panel
@@ -43,6 +44,8 @@ export default function IssueDetailContent({
// inside a narrower container like the inbox pane.
layout?: 'panel' | 'page' | 'split';
}) {
+ const t = useTranslations('issue');
+ const tEditor = useTranslations('issue.editor');
const {
issue,
fieldDefs,
@@ -71,7 +74,7 @@ export default function IssueDetailContent({
<div className="flex items-start gap-2">
{issue.archivedAt && (
<span className="mt-1 shrink-0 rounded border border-border px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground uppercase">
- Archived
+ {t('archived')}
</span>
)}
{canEdit ? (
@@ -81,7 +84,7 @@ export default function IssueDetailContent({
<textarea
className="field-sizing-content min-w-0 flex-1 resize-none bg-transparent text-lg leading-snug font-semibold outline-none placeholder:text-muted-foreground"
rows={1}
- placeholder="Issue title"
+ placeholder={t('titlePlaceholder')}
defaultValue={issue.title}
key={`title-${issue.updatedAt}`}
onKeyDown={(e) => {
@@ -106,6 +109,7 @@ export default function IssueDetailContent({
{(canEdit || issue.description.trim() !== '') && (
<IssueMarkdownEditor
className="mt-2"
+ placeholder={tEditor('descriptionPlaceholder')}
defaultValue={issue.description}
key={`desc-${issue.updatedAt}-${replacements}`}
editable={canEdit}
diff --git a/apps/web/src/features/issue/components/detail/IssueLinkDialog.tsx b/apps/web/src/features/issue/components/detail/IssueLinkDialog.tsx
index 6335841c..e906b63c 100644
--- a/apps/web/src/features/issue/components/detail/IssueLinkDialog.tsx
+++ b/apps/web/src/features/issue/components/detail/IssueLinkDialog.tsx
@@ -12,8 +12,10 @@ import {
CommandList,
} from '@/components/ui/command';
import ArchivedBadge from '@/components/common/ArchivedBadge';
-import { LINK_RELATION_LABELS, LINK_RELATION_PHRASES } from '@/utils/issueLinks';
+import { byKey } from '@/utils/messageKey';
+import { useLinkRelationLabel } from '@/hooks/useLinkRelationLabel';
import { useLinkIssues } from '../../services/links.service';
+import { useTranslations } from 'next-intl';
// Searches for the issue on the other end of a new relation, server-side across
// the project (archived included). The relation itself is already chosen — the
@@ -33,6 +35,9 @@ export default function IssueLinkDialog({
linkedIssueIds: Set<number>;
onClose: () => void;
}) {
+ const t = useTranslations('issue.linkDialog');
+ const phrase = byKey(useTranslations('issueLinks.phrases'));
+ const relationLabel = useLinkRelationLabel();
const [query, setQuery] = useState('');
const [error, setError] = useState<string | null>(null);
const linkIssues = useLinkIssues();
@@ -47,7 +52,7 @@ export default function IssueLinkDialog({
const debounced = useDebouncedValue(query, 250);
const search = useIssueSearchQuery(project.project.key, debounced, { enabled: true });
const hits = (search.data ?? []).filter((h) => h.id !== issueId && !linkedIssueIds.has(h.id));
- const prompt = `Search issues this one is ${LINK_RELATION_PHRASES[relation]}…`;
+ const prompt = t('searchPrompt', { relation: phrase(relation) });
async function pick(targetIssueId: number) {
setError(null);
@@ -60,7 +65,7 @@ export default function IssueLinkDialog({
});
onClose();
} catch (err) {
- setError(err instanceof Error ? err.message : 'Could not link the issues');
+ setError(err instanceof Error ? err.message : t('failed'));
}
}
@@ -71,7 +76,7 @@ export default function IssueLinkDialog({
open
onOpenChange={onClose}
shouldFilter={false}
- title={`Link an issue: ${LINK_RELATION_LABELS[relation]}`}
+ title={t('title', { relation: relationLabel(relation) })}
description={prompt}
>
<CommandInput placeholder={prompt} value={query} onValueChange={setQuery} />
@@ -79,9 +84,7 @@ export default function IssueLinkDialog({
{error && <p className="px-3 py-2 text-xs text-destructive">{error}</p>}
<CommandList>
- <CommandEmpty>
- {query.trim() ? 'No issues match.' : 'Type to search this project’s issues.'}
- </CommandEmpty>
+ <CommandEmpty>{query.trim() ? t('noMatches') : t('typeToSearch')}</CommandEmpty>
<CommandGroup>
{hits.map((hit) => (
<CommandItem key={hit.id} value={String(hit.id)} onSelect={() => void pick(hit.id)}>
diff --git a/apps/web/src/features/issue/components/detail/IssueLinksAddMenu.tsx b/apps/web/src/features/issue/components/detail/IssueLinksAddMenu.tsx
index d1aaf55f..49ef4e14 100644
--- a/apps/web/src/features/issue/components/detail/IssueLinksAddMenu.tsx
+++ b/apps/web/src/features/issue/components/detail/IssueLinksAddMenu.tsx
@@ -11,12 +11,9 @@ import {
DropdownMenuSubTrigger,
DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu';
-import {
- CREATE_LINK_RELATIONS,
- LINK_RELATIONS,
- LINK_RELATION_ICONS,
- LINK_RELATION_LABELS,
-} from '@/utils/issueLinks';
+import { CREATE_LINK_RELATIONS, LINK_RELATIONS, LINK_RELATION_ICONS } from '@/utils/issueLinks';
+import { useLinkRelationLabel } from '@/hooks/useLinkRelationLabel';
+import { useTranslations } from 'next-intl';
// The relations themselves link an issue found through the search dialog; the
// submenu below them names the relation for an issue created on the spot.
@@ -29,12 +26,15 @@ export default function IssueLinksAddMenu({
onLinkExisting: (relation: IssueLinkInputKind) => void;
onCreateNew: (relation: IssueLinkInputKind) => void;
}) {
+ const tCommon = useTranslations('common');
+ const t = useTranslations('issue.links');
+ const relationLabel = useLinkRelationLabel();
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant="ghost" size="sm" className="h-7 gap-1.5">
<Plus className="size-4" />
- Add
+ {tCommon('add')}
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" className="w-44">
@@ -43,7 +43,7 @@ export default function IssueLinksAddMenu({
return (
<DropdownMenuItem key={relation} onSelect={() => onLinkExisting(relation)}>
<Icon />
- {LINK_RELATION_LABELS[relation]}
+ {relationLabel(relation)}
</DropdownMenuItem>
);
})}
@@ -53,7 +53,7 @@ export default function IssueLinksAddMenu({
<DropdownMenuSub>
<DropdownMenuSubTrigger>
<CirclePlus />
- New issue
+ {t('newIssue')}
</DropdownMenuSubTrigger>
<DropdownMenuSubContent>
{CREATE_LINK_RELATIONS.map((relation) => {
@@ -61,7 +61,7 @@ export default function IssueLinksAddMenu({
return (
<DropdownMenuItem key={relation} onSelect={() => onCreateNew(relation)}>
<Icon />
- {LINK_RELATION_LABELS[relation]}
+ {relationLabel(relation)}
</DropdownMenuItem>
);
})}
diff --git a/apps/web/src/features/issue/components/detail/IssueLinksPanel.tsx b/apps/web/src/features/issue/components/detail/IssueLinksPanel.tsx
index 970e4da6..9d8dc93e 100644
--- a/apps/web/src/features/issue/components/detail/IssueLinksPanel.tsx
+++ b/apps/web/src/features/issue/components/detail/IssueLinksPanel.tsx
@@ -1,13 +1,8 @@
import { useState } from 'react';
import { type IssueLinkInputKind, type IssueRelations, type ProjectDetail } from '@/lib/api';
import { usePermissions } from '@/hooks/usePermissions';
-import {
- LINK_RELATIONS,
- LINK_RELATION_LABELS,
- inverseRelation,
- linkRelation,
- storedKind,
-} from '@/utils/issueLinks';
+import { LINK_RELATIONS, inverseRelation, linkRelation, storedKind } from '@/utils/issueLinks';
+import { useLinkRelationLabel } from '@/hooks/useLinkRelationLabel';
import { usePersistedOpen } from '../../hooks/usePersistedOpen';
import { useLinkIssues, useUnlinkIssues } from '../../services/links.service';
import NewIssueModal from '../create/NewIssueModal';
@@ -15,6 +10,7 @@ import IssueLinkDialog from './IssueLinkDialog';
import IssueLinksAddMenu from './IssueLinksAddMenu';
import IssueRefRow from './IssueRefRow';
import IssueSectionHeading from './IssueSectionHeading';
+import { useTranslations } from 'next-intl';
// The issue's relations to other issues, grouped by how each reads from this
// issue (Blocked by, Blocks, Duplicates, Duplicated by, Related). The links come
@@ -37,6 +33,8 @@ export default function IssueLinksPanel({
// its own to link to.
onOpenIssue?: (id: number) => void;
}) {
+ const t = useTranslations('issue.links');
+ const relationLabel = useLinkRelationLabel();
const { can } = usePermissions();
const canEdit = !readOnly && can('work_items', 'edit');
const canCreate = !readOnly && can('work_items', 'create');
@@ -62,7 +60,7 @@ export default function IssueLinksPanel({
{/* Fixed height: the Add button only renders while the section is open, and
without it the row would shrink to the height of the heading text. */}
<div className={`flex h-7 items-center justify-between gap-3 ${open ? 'mb-3' : ''}`}>
- <IssueSectionHeading label="Links" open={open} onToggle={toggle} />
+ <IssueSectionHeading label={t('title')} open={open} onToggle={toggle} />
{open && canEdit && (
<IssueLinksAddMenu
canCreate={canCreate}
@@ -75,21 +73,21 @@ export default function IssueLinksPanel({
{open &&
(links.length === 0 ? (
<p className="rounded-md border border-dashed p-4 text-center text-sm text-muted-foreground">
- Use Add to link an issue that blocks, duplicates or relates to this one.
+ {t('emptyHint')}
</p>
) : (
<div className="flex flex-col gap-3">
{groups.map((group) => (
<div key={group.relation}>
<h4 className="mb-1 px-2 text-xs font-medium text-muted-foreground">
- {LINK_RELATION_LABELS[group.relation]}
+ {relationLabel(group.relation)}
</h4>
{group.links.map((link) => (
<IssueRefRow
key={link.id}
project={project}
issue={link.issue}
- removeLabel={`Remove the link to ${link.issue.identifier}`}
+ removeLabel={t('remove', { issue: link.issue.identifier })}
readOnly={readOnly}
onOpen={onOpenIssue && (() => onOpenIssue(link.issue.id))}
onRemove={
@@ -137,7 +135,7 @@ export default function IssueLinksPanel({
}}
// The crumb names the relation from the new issue's end, the way the
// subtask one does; the menu picked it from this issue's end.
- crumb={`${LINK_RELATION_LABELS[inverseRelation(creating)]} ${issue.identifier}`}
+ crumb={`${relationLabel(inverseRelation(creating))} ${issue.identifier}`}
onClose={() => setCreating(null)}
onCreated={(created) => {
linkIssues.mutate({
diff --git a/apps/web/src/features/issue/components/detail/IssueProperties.tsx b/apps/web/src/features/issue/components/detail/IssueProperties.tsx
index b5b94739..17dc3488 100644
--- a/apps/web/src/features/issue/components/detail/IssueProperties.tsx
+++ b/apps/web/src/features/issue/components/detail/IssueProperties.tsx
@@ -25,6 +25,7 @@ import IssueWatchers from './IssueWatchers';
import IssueSectionHeading from './IssueSectionHeading';
import { type Embeddable } from '../../utils/attachmentEmbed';
import { cn } from '@/lib/utils';
+import { useTranslations } from 'next-intl';
// One property row in the two-column list: name on the left, control on the right.
function PropertyRow({ label, children }: { label: string; children: ReactNode }) {
@@ -78,11 +79,12 @@ export default function IssueProperties({
open: boolean;
onToggle: () => void;
}) {
+ const t = useTranslations('issue.fields');
const hasMembers = project.assignees.some((a) => a.kind === 'member');
const hasAgents = project.assignees.some((a) => a.kind === 'agent');
const rows = (
<>
- <PropertyRow label="State">
+ <PropertyRow label={t('state')}>
<StatusSelect
columns={project.columns}
value={issue.columnId}
@@ -91,7 +93,7 @@ export default function IssueProperties({
/>
</PropertyRow>
- <PropertyRow label="Priority">
+ <PropertyRow label={t('priority')}>
<PrioritySelect
value={issue.priority ?? ''}
onChange={(v) => onPatch({ priority: v || null })}
@@ -100,7 +102,7 @@ export default function IssueProperties({
</PropertyRow>
{hasMembers && (
- <PropertyRow label="Assignee">
+ <PropertyRow label={t('assignee')}>
<AssigneeSelect
assignees={project.assignees}
value={issue.assigneeUserId}
@@ -111,7 +113,7 @@ export default function IssueProperties({
)}
{hasAgents && (
- <PropertyRow label="Delegate">
+ <PropertyRow label={t('delegate')}>
<DelegateSelect
assignees={project.assignees}
value={issue.delegateUserId}
@@ -122,13 +124,13 @@ export default function IssueProperties({
)}
{watchers && (
- <PropertyRow label="Watching">
+ <PropertyRow label={t('watching')}>
<IssueWatchers issueId={issue.id} watchers={watchers} />
</PropertyRow>
)}
{project.issueTypes.length > 0 && (
- <PropertyRow label="Type">
+ <PropertyRow label={t('type')}>
<TypeSelect
issueTypes={project.issueTypes}
value={issue.typeId}
@@ -139,7 +141,7 @@ export default function IssueProperties({
)}
{project.labels.length > 0 && (
- <PropertyRow label="Labels">
+ <PropertyRow label={t('labels')}>
<LabelsSelect
labels={project.labels}
groups={project.labelGroups}
@@ -151,14 +153,14 @@ export default function IssueProperties({
)}
{project.project.initiativesEnabled && (!readOnly || issue.initiative) && (
- <PropertyRow label="Initiative">
+ <PropertyRow label={t('initiative')}>
{readOnly ? (
// Read-only shows the linked initiative from the issue itself, avoiding
// the authenticated initiatives query the editable select runs.
<ReadOnlyPill>
<Pill active={!!issue.initiative}>
<Target />
- {issue.initiative?.title ?? 'Initiative'}
+ {issue.initiative?.title ?? t('initiative')}
</Pill>
</ReadOnlyPill>
) : (
@@ -172,14 +174,14 @@ export default function IssueProperties({
)}
{project.project.cyclesEnabled && (!readOnly || issue.cycle) && (
- <PropertyRow label="Cycle">
+ <PropertyRow label={t('cycle')}>
{readOnly ? (
// Read-only shows the cycle from the issue itself, avoiding the
// authenticated cycles query the editable select runs.
<ReadOnlyPill>
<Pill active={!!issue.cycle}>
<RefreshCw />
- {issue.cycle?.name ?? 'Cycle'}
+ {issue.cycle?.name ?? t('cycle')}
</Pill>
</ReadOnlyPill>
) : (
@@ -192,19 +194,19 @@ export default function IssueProperties({
</PropertyRow>
)}
- <PropertyRow label="Start date">
+ <PropertyRow label={t('startDate')}>
<DatePill
value={issue.startDate}
- placeholder="Start date"
+ placeholder={t('startDate')}
onChange={(v) => onPatch({ startDate: v })}
readOnly={readOnly}
/>
</PropertyRow>
- <PropertyRow label="Due date">
+ <PropertyRow label={t('dueDate')}>
<DatePill
value={issue.dueDate}
- placeholder="Due date"
+ placeholder={t('dueDate')}
onChange={(v) => onPatch({ dueDate: v })}
readOnly={readOnly}
/>
@@ -252,13 +254,13 @@ export default function IssueProperties({
// against the one below it.
<div className={cn('mt-6 border-t pt-5', !open && '-mb-2', className)}>
<IssueSectionHeading
- label="Properties"
+ label={t('properties')}
open={open}
onToggle={onToggle}
className={cn('h-7', open && 'mb-3')}
/>
{open && (
- <div className="grid grid-cols-[72px_1fr] items-start gap-x-2 gap-y-2.5">{rows}</div>
+ <div className="grid grid-cols-[104px_1fr] items-start gap-x-2 gap-y-2.5">{rows}</div>
)}
</div>
);
diff --git a/apps/web/src/features/issue/components/detail/IssueStatusTimeline.tsx b/apps/web/src/features/issue/components/detail/IssueStatusTimeline.tsx
index 34aa2c87..1ca8eb77 100644
--- a/apps/web/src/features/issue/components/detail/IssueStatusTimeline.tsx
+++ b/apps/web/src/features/issue/components/detail/IssueStatusTimeline.tsx
@@ -7,6 +7,7 @@ import { buildLifecycleMetrics, buildTimelineLayout } from '../../utils/timeline
import IssueTimelineCompact from './IssueTimelineCompact';
import IssueTimelineLanes from './IssueTimelineLanes';
import IssueSectionHeading from './IssueSectionHeading';
+import { useTranslations } from 'next-intl';
// How the issue moved through the statuses, above the activity log. The compact bar
// shows one share per status with the lifecycle metrics; the header button swaps in
@@ -31,6 +32,7 @@ export default function IssueStatusTimeline({
columns: Column[];
imageByUserId: Map<string, string | null>;
}) {
+ const t = useTranslations('issue.stats');
// Null until the person changes the shape on this issue, and then it wins over the
// preference for as long as the issue stays open.
const [openHere, setOpenHere] = useState<boolean | null>(null);
@@ -38,7 +40,7 @@ export default function IssueStatusTimeline({
const timelineQuery = useTimelineQuery(issueId);
const { data: prefs } = useAccountPreferencesQuery();
const segments = timelineQuery.data ?? [];
- const layout = buildTimelineLayout(segments, columns);
+ const layout = buildTimelineLayout(segments, columns, t('unknownStatus'));
if (layout.lanes.length === 0 || !prefs) return null;
@@ -52,7 +54,7 @@ export default function IssueStatusTimeline({
{/* Fixed height: the view button only renders while the section is open, and
without it the row would shrink to the height of the heading text. */}
<div className={`flex h-7 items-center justify-between gap-3 ${open ? 'mb-4' : ''}`}>
- <IssueSectionHeading label="Stats" open={open} onToggle={() => setOpenHere(!open)} />
+ <IssueSectionHeading label={t('title')} open={open} onToggle={() => setOpenHere(!open)} />
{open && (
<Button
variant="ghost"
@@ -60,7 +62,7 @@ export default function IssueStatusTimeline({
className="h-7 px-2 text-xs text-muted-foreground"
onClick={() => setTimelineHere(!showTimeline)}
>
- {showTimeline ? 'Compact' : 'Timeline'}
+ {showTimeline ? t('compact') : t('timeline')}
</Button>
)}
</div>
diff --git a/apps/web/src/features/issue/components/detail/IssueSubtasksPanel.tsx b/apps/web/src/features/issue/components/detail/IssueSubtasksPanel.tsx
index 623fe611..52c5762c 100644
--- a/apps/web/src/features/issue/components/detail/IssueSubtasksPanel.tsx
+++ b/apps/web/src/features/issue/components/detail/IssueSubtasksPanel.tsx
@@ -16,6 +16,7 @@ import { usePersistedOpen } from '../../hooks/usePersistedOpen';
import { useSetIssueParent } from '../../services/subtasks.service';
import IssueSectionHeading from './IssueSectionHeading';
import IssueRefRow from './IssueRefRow';
+import { useTranslations } from 'next-intl';
// The issue's place in the subtask hierarchy: the parent it hangs under, or the
// subtasks it has with how many of them are done. The two never show together —
@@ -36,6 +37,8 @@ export default function IssueSubtasksPanel({
// own to link to.
onOpenIssue?: (id: number) => void;
}) {
+ const tCommon = useTranslations('common');
+ const t = useTranslations('issue.subtasks');
const { can } = usePermissions();
const canEdit = !readOnly && can('work_items', 'edit');
const canCreate = !readOnly && can('work_items', 'create');
@@ -64,7 +67,7 @@ export default function IssueSubtasksPanel({
<IssueRefRow
project={project}
issue={parent}
- removeLabel={`Detach from ${parent.identifier}`}
+ removeLabel={t('detachFromParent', { parent: parent.identifier })}
readOnly={readOnly}
onOpen={onOpenIssue && (() => onOpenIssue(parent.id))}
onRemove={canEdit ? () => detach(issue.id, parent.id) : undefined}
@@ -73,7 +76,7 @@ export default function IssueSubtasksPanel({
if (issue.subtasks.length === 0)
return (
<p className="rounded-md border border-dashed p-4 text-center text-sm text-muted-foreground">
- {canEdit ? 'Use Add to break this issue down into subtasks.' : 'No subtasks yet.'}
+ {canEdit ? t('emptyHint') : t('empty')}
</p>
);
return issue.subtasks.map((subtask) => (
@@ -81,7 +84,7 @@ export default function IssueSubtasksPanel({
key={subtask.id}
project={project}
issue={subtask}
- removeLabel={`Detach ${subtask.identifier}`}
+ removeLabel={t('detach', { subtask: subtask.identifier })}
readOnly={readOnly}
onOpen={onOpenIssue && (() => onOpenIssue(subtask.id))}
onRemove={canEdit ? () => detach(subtask.id, issue.id) : undefined}
@@ -97,7 +100,7 @@ export default function IssueSubtasksPanel({
without it the row would shrink to the height of the heading text. */}
<div className={`flex h-7 items-center justify-between gap-3 ${open ? 'mb-3' : ''}`}>
<IssueSectionHeading
- label={parent ? 'Parent' : 'Subtasks'}
+ label={parent ? t('parent') : t('title')}
open={open}
onToggle={toggle}
tally={done}
@@ -107,15 +110,17 @@ export default function IssueSubtasksPanel({
<DropdownMenuTrigger asChild>
<Button variant="ghost" size="sm" className="h-7 gap-1.5">
<Plus className="size-4" />
- Add
+ {tCommon('add')}
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" className="w-44">
{canCreate && (
- <DropdownMenuItem onSelect={() => setCreating(true)}>New subtask</DropdownMenuItem>
+ <DropdownMenuItem onSelect={() => setCreating(true)}>
+ {t('newSubtask')}
+ </DropdownMenuItem>
)}
<DropdownMenuItem onSelect={() => setAttaching(true)}>
- Existing issue
+ {t('existingIssue')}
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
@@ -127,8 +132,8 @@ export default function IssueSubtasksPanel({
{attaching && (
<IssuePickerDialog
projectKey={project.project.key}
- title="Add an existing issue as a subtask"
- prompt="Search issues to add as a subtask…"
+ title={t('addExisting')}
+ prompt={t('searchPrompt')}
// The hierarchy is one level deep, so an issue that already hangs under
// a parent has to be detached there first.
exclude={(hit) => hit.id === issue.id || hit.parentId !== null}
@@ -156,7 +161,7 @@ export default function IssueSubtasksPanel({
delegateUserId: null,
priority: issue.priority,
}}
- crumb={`Subtask of ${issue.identifier}`}
+ crumb={t('subtaskOf', { issue: issue.identifier })}
onClose={() => setCreating(false)}
onCreated={() => setCreating(false)}
/>
diff --git a/apps/web/src/features/issue/components/detail/IssueTimelineCompact.tsx b/apps/web/src/features/issue/components/detail/IssueTimelineCompact.tsx
index 8e68414f..06a9c721 100644
--- a/apps/web/src/features/issue/components/detail/IssueTimelineCompact.tsx
+++ b/apps/web/src/features/issue/components/detail/IssueTimelineCompact.tsx
@@ -1,6 +1,7 @@
import { durationLabel, type LifecycleMetrics, type TimelineLane } from '../../utils/timeline';
import IssueTimelineMetric from './IssueTimelineMetric';
import IssueTimelineShare from './IssueTimelineShare';
+import { useTranslations } from 'next-intl';
// The whole life of the issue as one bar: a share per status, sized by the total time
// spent in it (repeat visits merged), with the same figures and the lifecycle metrics
@@ -18,6 +19,7 @@ export default function IssueTimelineCompact({
metrics: LifecycleMetrics;
imageByUserId: Map<string, string | null>;
}) {
+ const t = useTranslations('issue.stats');
const unfinished = lanes.filter((lane) => lane.stateType !== 'completed');
// An issue that only ever sat in completed statuses leaves nothing else to scale,
// so there they all take a share.
@@ -64,14 +66,14 @@ export default function IssueTimelineCompact({
<div className="ml-auto flex items-center gap-4">
{lead && (
<IssueTimelineMetric
- label="Lead time"
+ label={t('leadTime')}
value={lead}
description="From creation to the first time the issue reached a completed status — the wait as seen from outside, queue included."
/>
)}
{cycle && (
<IssueTimelineMetric
- label="Cycle time"
+ label={t('cycleTime')}
value={cycle}
description="From the first started status to that same completion — the work itself, without the time spent waiting in the queue."
/>
diff --git a/apps/web/src/features/issue/components/detail/IssueWatchers.tsx b/apps/web/src/features/issue/components/detail/IssueWatchers.tsx
index 2142168f..fc3c5ef6 100644
--- a/apps/web/src/features/issue/components/detail/IssueWatchers.tsx
+++ b/apps/web/src/features/issue/components/detail/IssueWatchers.tsx
@@ -5,6 +5,7 @@ import Avatar from '@/components/common/Avatar';
import { Pill } from '@/components/common/fields/Pill';
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
import { useSetIssueWatching } from '../../services/watchers.service';
+import { useTranslations } from 'next-intl';
// Who follows the issue, and the button the signed-in member subscribes and
// unsubscribes themselves with. Members subscribe only themselves, so the stack is
@@ -17,6 +18,7 @@ export default function IssueWatchers({
issueId: number;
watchers: IssueWatcher[];
}) {
+ const t = useTranslations('issue.watchers');
const { data: session } = useSession();
const currentUserId = session?.user.id ?? null;
const watching = watchers.some((w) => w.userId === currentUserId);
@@ -33,7 +35,7 @@ export default function IssueWatchers({
onClick={() => setWatching.mutate({ issueId, watching: !watching })}
>
{watching ? <EyeOff /> : <Eye />}
- {watching ? 'Unwatch' : 'Watch'}
+ {watching ? t('unwatch') : t('watch')}
</Pill>
{/* Negative spacing so the avatars overlap; the ring in the card color keeps
them separated. */}
diff --git a/apps/web/src/features/issue/components/detail/ReadOnlyActivityFeed.tsx b/apps/web/src/features/issue/components/detail/ReadOnlyActivityFeed.tsx
index 53b396c4..76e26b82 100644
--- a/apps/web/src/features/issue/components/detail/ReadOnlyActivityFeed.tsx
+++ b/apps/web/src/features/issue/components/detail/ReadOnlyActivityFeed.tsx
@@ -1,5 +1,6 @@
import { type FeedItem } from '@/lib/api';
import ActivityItemList from './ActivityItemList';
+import { useTranslations } from 'next-intl';
// The read-only timeline of a shared issue: comments and change events rendered
// from a fixed feed list (no composer, no pagination, no session).
@@ -12,13 +13,14 @@ export default function ReadOnlyActivityFeed({
// Uploaded avatar per actor id (a feed entry stores the name, not the picture).
imageByUserId: Map<string, string | null>;
}) {
+ const t = useTranslations('issue');
return (
<div className="mt-6 border-t pt-5">
<h3 className="mb-4 text-xs font-medium tracking-wide text-muted-foreground uppercase">
- Activity
+ {t('activityHeading')}
</h3>
{feed.length === 0 ? (
- <p className="text-sm text-muted-foreground">No activity yet.</p>
+ <p className="text-sm text-muted-foreground">{t('noActivity')}</p>
) : (
<ActivityItemList items={feed} imageByUserId={imageByUserId} />
)}
diff --git a/apps/web/src/features/issue/components/detail/ReadOnlyIssueDetail.tsx b/apps/web/src/features/issue/components/detail/ReadOnlyIssueDetail.tsx
index 3d6ca07f..9545a5d3 100644
--- a/apps/web/src/features/issue/components/detail/ReadOnlyIssueDetail.tsx
+++ b/apps/web/src/features/issue/components/detail/ReadOnlyIssueDetail.tsx
@@ -8,6 +8,7 @@ import IssueProperties from './IssueProperties';
import IssueSubtasksPanel from './IssueSubtasksPanel';
import IssueLinksPanel from './IssueLinksPanel';
import ReadOnlyActivityFeed from './ReadOnlyActivityFeed';
+import { useTranslations } from 'next-intl';
const noop = () => {};
@@ -30,6 +31,7 @@ export default function ReadOnlyIssueDetail({
// so its rows only name the issue.
onOpenIssue?: (id: number) => void;
}) {
+ const t = useTranslations('issue');
const { project: scaffold, issue, feed } = bundle;
const properties = usePersistedOpen('issue-properties-open');
const project = toPublicProjectDetail(scaffold);
@@ -45,7 +47,7 @@ export default function ReadOnlyIssueDetail({
<div className="flex items-center gap-2">
{issue.archivedAt && (
<span className="shrink-0 rounded border border-border px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground uppercase">
- Archived
+ {t('archived')}
</span>
)}
<span className="text-xs text-muted-foreground tabular-nums">{issue.identifier}</span>
diff --git a/apps/web/src/features/issue/components/editor/EditorImagePicker.tsx b/apps/web/src/features/issue/components/editor/EditorImagePicker.tsx
index ca7127a7..092b7db6 100644
--- a/apps/web/src/features/issue/components/editor/EditorImagePicker.tsx
+++ b/apps/web/src/features/issue/components/editor/EditorImagePicker.tsx
@@ -1,6 +1,7 @@
import Image from 'next/image';
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog';
import { type Embeddable } from '../../utils/attachmentEmbed';
+import { useTranslations } from 'next-intl';
// Nothing here may take focus: blurring the editor saves the description, and the
// refetched updatedAt remounts the editor by its key — mid-pick, throwing away the
@@ -16,6 +17,7 @@ export default function EditorImagePicker({
onClose: () => void;
onPick: (image: Embeddable) => void;
}) {
+ const t = useTranslations('issue.editor');
return (
<Dialog open={open} onOpenChange={(o) => !o && onClose()}>
<DialogContent
@@ -24,13 +26,10 @@ export default function EditorImagePicker({
onOpenAutoFocus={(e) => e.preventDefault()}
>
<DialogHeader>
- <DialogTitle>Insert image</DialogTitle>
+ <DialogTitle>{t('insertImage')}</DialogTitle>
</DialogHeader>
{images.length === 0 ? (
- <p className="text-sm text-muted-foreground">
- No images attached yet. Upload one from the Attachments panel, or drop it straight onto
- the editor.
- </p>
+ <p className="text-sm text-muted-foreground">{t('noImages')}</p>
) : (
<div className="grid max-h-[60vh] grid-cols-3 gap-2 overflow-y-auto">
{images.map((a) => (
@@ -38,7 +37,7 @@ export default function EditorImagePicker({
key={a.url}
type="button"
title={a.filename}
- aria-label={`Insert ${a.filename}`}
+ aria-label={t('insertNamed', { name: a.filename })}
onMouseDown={(e) => e.preventDefault()}
onClick={() => onPick(a)}
className="relative aspect-square overflow-hidden rounded-md border hover:border-primary"
diff --git a/apps/web/src/features/issue/components/editor/EditorSelectionMenu.tsx b/apps/web/src/features/issue/components/editor/EditorSelectionMenu.tsx
index e176c090..1b5fb10c 100644
--- a/apps/web/src/features/issue/components/editor/EditorSelectionMenu.tsx
+++ b/apps/web/src/features/issue/components/editor/EditorSelectionMenu.tsx
@@ -12,17 +12,22 @@ import {
Strikethrough,
type LucideIcon,
} from 'lucide-react';
+import { useTranslations } from 'next-intl';
import EditorToolbarButton from './EditorToolbarButton';
-function setLink(editor: Editor) {
- const url = window.prompt('Link URL', editor.getAttributes('link').href ?? '');
+function setLink(editor: Editor, prompt: string) {
+ const url = window.prompt(prompt, editor.getAttributes('link').href ?? '');
if (url === null) return;
if (url === '') editor.chain().focus().unsetLink().run();
else editor.chain().focus().setLink({ href: url }).run();
}
// `name` is the mark or node the button toggles, which is also what lights it up.
-const ITEMS: { name: string; icon: LucideIcon; run: (editor: Editor) => void }[] = [
+const ITEMS: {
+ name: string;
+ icon: LucideIcon;
+ run: (editor: Editor, linkPrompt: string) => void;
+}[] = [
{ name: 'bold', icon: Bold, run: (editor) => editor.chain().focus().toggleBold().run() },
{ name: 'italic', icon: Italic, run: (editor) => editor.chain().focus().toggleItalic().run() },
{
@@ -55,6 +60,7 @@ const ITEMS: { name: string; icon: LucideIcon; run: (editor: Editor) => void }[]
];
export default function EditorSelectionMenu({ editor }: { editor: Editor }) {
+ const t = useTranslations('issue.editor');
return (
<BubbleMenu
editor={editor}
@@ -65,7 +71,7 @@ export default function EditorSelectionMenu({ editor }: { editor: Editor }) {
<EditorToolbarButton
key={item.name}
active={editor.isActive(item.name)}
- onClick={() => item.run(editor)}
+ onClick={() => item.run(editor, t('linkUrl'))}
>
<item.icon />
</EditorToolbarButton>
diff --git a/apps/web/src/features/issue/components/editor/IssueMarkdownEditor.tsx b/apps/web/src/features/issue/components/editor/IssueMarkdownEditor.tsx
index 0df6f300..0a73d722 100644
--- a/apps/web/src/features/issue/components/editor/IssueMarkdownEditor.tsx
+++ b/apps/web/src/features/issue/components/editor/IssueMarkdownEditor.tsx
@@ -12,6 +12,7 @@ import { Video } from '../../utils/tiptap-video';
import { attachmentHtml, type Embeddable } from '../../utils/attachmentEmbed';
import EditorImagePicker from './EditorImagePicker';
import EditorSelectionMenu from './EditorSelectionMenu';
+import { useTranslations } from 'next-intl';
// Shared by every editor instance. A block with no language is detected by
// highlightAuto, so there is no language picker.
@@ -26,7 +27,7 @@ export default function IssueMarkdownEditor({
onChange,
onBlur,
onReady,
- placeholder = 'Add description…',
+ placeholder,
className,
editable = true,
uploadFile,
@@ -50,6 +51,7 @@ export default function IssueMarkdownEditor({
// issue to read them from yet (the create modal), which drops the picker.
imageAttachments?: Embeddable[];
}) {
+ const t = useTranslations('issue.editor');
const editorRef = useRef<Editor | null>(null);
const [imagePickerOpen, setImagePickerOpen] = useState(false);
@@ -81,6 +83,7 @@ export default function IssueMarkdownEditor({
Video,
SlashCommand.configure({
onPickImage: imageAttachments ? () => setImagePickerOpen(true) : undefined,
+ labels: { codeBlock: t('codeBlock'), image: t('image') },
}),
// html:true so the custom <video> tag survives the markdown round-trip.
// tiptap only instantiates nodes declared in its schema (there is no
diff --git a/apps/web/src/features/issue/components/fields/CycleSelect.tsx b/apps/web/src/features/issue/components/fields/CycleSelect.tsx
index f84b0d1b..9d56dfd9 100644
--- a/apps/web/src/features/issue/components/fields/CycleSelect.tsx
+++ b/apps/web/src/features/issue/components/fields/CycleSelect.tsx
@@ -14,6 +14,7 @@ import {
} from '@/components/ui/command';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
import { Pill } from '@/components/common/fields/Pill';
+import { useTranslations } from 'next-intl';
// A Pill trigger opening the cycles an issue can be planned into: the ones that have
// not finished. A completed cycle is not offered — it records what it delivered — but
@@ -27,6 +28,7 @@ export default function CycleSelect({
value: CycleRef | null;
onChange: (cycle: CycleRef | null) => void;
}) {
+ const t = useTranslations('issue.cycleSelect');
const [open, setOpen] = useState(false);
const { data } = useCycleOptionsQuery(projectKey);
const planned = data ?? [];
@@ -45,18 +47,18 @@ export default function CycleSelect({
<PopoverTrigger asChild>
<Pill active={value != null}>
{value != null ? <RefreshCw /> : <CircleDashed />}
- {value?.name ?? 'Cycle'}
+ {value?.name ?? t('label')}
</Pill>
</PopoverTrigger>
<PopoverContent className="w-56 p-0" align="start">
<Command>
- <CommandInput placeholder="Plan into cycle…" />
+ <CommandInput placeholder={t('search')} />
<CommandList>
- <CommandEmpty>No cycles.</CommandEmpty>
+ <CommandEmpty>{t('empty')}</CommandEmpty>
<CommandGroup>
- <CommandItem value="No cycle" onSelect={() => select(null)}>
+ <CommandItem value={t('none')} onSelect={() => select(null)}>
<CircleDashed />
- <span className="flex-1">No cycle</span>
+ <span className="flex-1">{t('none')}</span>
{value == null && <Check className="ml-auto" />}
</CommandItem>
{cycles.map((cycle) => (
diff --git a/apps/web/src/features/issue/components/fields/DelegateSelect.tsx b/apps/web/src/features/issue/components/fields/DelegateSelect.tsx
index 49303ecc..695efc47 100644
--- a/apps/web/src/features/issue/components/fields/DelegateSelect.tsx
+++ b/apps/web/src/features/issue/components/fields/DelegateSelect.tsx
@@ -1,4 +1,5 @@
import { CircleDashed } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { Assignee } from '@/lib/api';
import Avatar from '@/components/common/Avatar';
import { Pill } from '@/components/common/fields/Pill';
@@ -10,7 +11,7 @@ export default function DelegateSelect({
assignees,
value,
onChange,
- placeholder = 'No delegate',
+ placeholder,
readOnly,
}: {
assignees: Assignee[];
@@ -19,6 +20,8 @@ export default function DelegateSelect({
placeholder?: string;
readOnly?: boolean;
}) {
+ const t = useTranslations('issue.fieldSelects');
+ const none = t('noDelegate');
const agents = assignees.filter((a) => a.kind === 'agent');
const delegate = agents.find((a) => a.userId === value);
return (
@@ -31,17 +34,17 @@ export default function DelegateSelect({
) : (
<CircleDashed />
)}
- {delegate?.name ?? placeholder}
+ {delegate?.name ?? placeholder ?? none}
</Pill>
}
- inputPlaceholder="Delegate to…"
- emptyText="No agents."
+ inputPlaceholder={t('delegateTo')}
+ emptyText={t('noAgents')}
items={[
{
key: 'none',
- search: 'No delegate',
+ search: none,
icon: <CircleDashed />,
- label: 'No delegate',
+ label: none,
selected: value == null,
onSelect: () => onChange(null),
},
diff --git a/apps/web/src/features/issue/components/fields/InitiativeSelect.tsx b/apps/web/src/features/issue/components/fields/InitiativeSelect.tsx
index bb1201a2..2184179d 100644
--- a/apps/web/src/features/issue/components/fields/InitiativeSelect.tsx
+++ b/apps/web/src/features/issue/components/fields/InitiativeSelect.tsx
@@ -1,5 +1,6 @@
import { useState } from 'react';
import { Check, CircleDashed, Target } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { useInitiativeOptionsQuery } from '@/services/initiatives.service';
import { colorDot } from '@/components/common/fields/colorDot';
import { STATUS_META } from '@/utils/initiativeMeta';
@@ -26,6 +27,7 @@ export default function InitiativeSelect({
value: number | null;
onChange: (id: number | null) => void;
}) {
+ const t = useTranslations('initiatives.select');
const [open, setOpen] = useState(false);
const [query, setQuery] = useState('');
@@ -54,19 +56,19 @@ export default function InitiativeSelect({
<PopoverTrigger asChild>
<Pill active={value != null}>
{value != null ? <Target /> : <CircleDashed />}
- {current?.title ?? 'Initiative'}
+ {current?.title ?? t('label')}
</Pill>
</PopoverTrigger>
<PopoverContent className="w-56 p-0" align="start">
<Command shouldFilter={false}>
- <CommandInput placeholder="Link to initiative…" value={query} onValueChange={setQuery} />
+ <CommandInput placeholder={t('search')} value={query} onValueChange={setQuery} />
<CommandList>
- <CommandEmpty>No initiatives.</CommandEmpty>
+ <CommandEmpty>{t('empty')}</CommandEmpty>
<CommandGroup>
{!query && (
- <CommandItem value="No initiative" onSelect={() => select(null)}>
+ <CommandItem value={t('none')} onSelect={() => select(null)}>
<CircleDashed />
- <span className="flex-1">No initiative</span>
+ <span className="flex-1">{t('none')}</span>
{value == null && <Check className="ml-auto" />}
</CommandItem>
)}
diff --git a/apps/web/src/features/issue/components/fields/InlineTextField.tsx b/apps/web/src/features/issue/components/fields/InlineTextField.tsx
index ace52f8d..0ca5d80e 100644
--- a/apps/web/src/features/issue/components/fields/InlineTextField.tsx
+++ b/apps/web/src/features/issue/components/fields/InlineTextField.tsx
@@ -3,6 +3,7 @@ import { Check } from 'lucide-react';
import { Pill } from '@/components/common/fields/Pill';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
+import { useTranslations } from 'next-intl';
// Text/number/date custom field: shows the value as a ghost pill and switches to
// an input on click, so an unset field reads as a compact "Empty" rather than a
@@ -18,6 +19,8 @@ export default function InlineTextField({
saveKey: string;
onSave: (v: string | number | null) => void;
}) {
+ const t = useTranslations('issue.fields');
+ const tCommon = useTranslations('common');
const [editing, setEditing] = useState(false);
const [draft, setDraft] = useState('');
const [invalid, setInvalid] = useState(false);
@@ -54,7 +57,7 @@ export default function InlineTextField({
if (!editing) {
return (
<Pill active={display != null} onClick={start}>
- <span className="max-w-[240px] truncate">{display ?? 'Empty'}</span>
+ <span className="max-w-[240px] truncate">{display ?? t('empty')}</span>
</Pill>
);
}
@@ -85,7 +88,7 @@ export default function InlineTextField({
variant="ghost"
size="icon"
className="size-8 shrink-0 text-muted-foreground hover:text-foreground"
- title="Save"
+ title={tCommon('save')}
onMouseDown={(e) => e.preventDefault()}
onClick={commit}
>
diff --git a/apps/web/src/features/issue/components/fields/InlineUrlField.tsx b/apps/web/src/features/issue/components/fields/InlineUrlField.tsx
index e2947a33..3fe6d380 100644
--- a/apps/web/src/features/issue/components/fields/InlineUrlField.tsx
+++ b/apps/web/src/features/issue/components/fields/InlineUrlField.tsx
@@ -3,6 +3,7 @@ import { Check, ExternalLink } from 'lucide-react';
import { Pill } from '@/components/common/fields/Pill';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
+import { useTranslations } from 'next-intl';
// A bare domain typed without a scheme is treated as https; the API accepts only
// absolute http(s) URLs.
@@ -33,6 +34,8 @@ export default function InlineUrlField({
saveKey: string;
onSave: (v: string | null) => void;
}) {
+ const t = useTranslations('issue.fields');
+ const tCommon = useTranslations('common');
const [editing, setEditing] = useState(false);
const [draft, setDraft] = useState('');
const [invalid, setInvalid] = useState(false);
@@ -63,7 +66,7 @@ export default function InlineUrlField({
if (display == null) {
return (
<Pill onClick={start}>
- <span>Empty</span>
+ <span>{t('empty')}</span>
</Pill>
);
}
@@ -76,7 +79,7 @@ export default function InlineUrlField({
href={display}
target="_blank"
rel="noopener noreferrer"
- title="Open in new tab"
+ title={t('openInNewTab')}
className="flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-foreground"
>
<ExternalLink className="size-3.5" />
@@ -109,7 +112,7 @@ export default function InlineUrlField({
variant="ghost"
size="icon"
className="size-8 shrink-0 text-muted-foreground hover:text-foreground"
- title="Save"
+ title={tCommon('save')}
onMouseDown={(e) => e.preventDefault()}
onClick={commit}
>
diff --git a/apps/web/src/features/issue/components/fields/IssueCustomFieldBody.tsx b/apps/web/src/features/issue/components/fields/IssueCustomFieldBody.tsx
index 3665beb2..8f4c4362 100644
--- a/apps/web/src/features/issue/components/fields/IssueCustomFieldBody.tsx
+++ b/apps/web/src/features/issue/components/fields/IssueCustomFieldBody.tsx
@@ -2,6 +2,7 @@ import { type CustomField, type IssueFieldValue, type IssueFieldValueInput } fro
import IssueMarkdownEditor from '../editor/IssueMarkdownEditor';
import { type Embeddable } from '../../utils/attachmentEmbed';
import IssueCustomFieldControl from './IssueCustomFieldControl';
+import { useTranslations } from 'next-intl';
// One custom field rendered in the issue body (under the description) rather than
// as a Properties row: a heading with the field name, then the value editor. A
@@ -24,6 +25,7 @@ export default function IssueCustomFieldBody({
onSetField: (fieldId: number, value: IssueFieldValueInput) => void;
readOnly?: boolean;
}) {
+ const t = useTranslations('issue.fields');
return (
<div className="mt-6">
<h3 className="mb-1 text-xs font-medium tracking-wide text-muted-foreground uppercase">
@@ -33,7 +35,7 @@ export default function IssueCustomFieldBody({
<IssueMarkdownEditor
defaultValue={(current?.value as string) ?? ''}
key={saveKey}
- placeholder="Empty"
+ placeholder={t('empty')}
editable={!readOnly}
uploadFile={uploadFile}
imageAttachments={imageAttachments}
diff --git a/apps/web/src/features/issue/components/fields/IssueCustomFieldControl.tsx b/apps/web/src/features/issue/components/fields/IssueCustomFieldControl.tsx
index 9cda0cb1..86a34c89 100644
--- a/apps/web/src/features/issue/components/fields/IssueCustomFieldControl.tsx
+++ b/apps/web/src/features/issue/components/fields/IssueCustomFieldControl.tsx
@@ -10,6 +10,7 @@ import {
} from '@/components/ui/select';
import InlineUrlField from './InlineUrlField';
import InlineTextField from './InlineTextField';
+import { useTranslations } from 'next-intl';
// Radix Select forbids an empty-string item value, so "(none)" options use this
// sentinel and map back to '' / null on change.
@@ -32,6 +33,7 @@ export default function IssueCustomFieldControl({
onChange: (value: IssueFieldValueInput) => void;
readOnly?: boolean;
}) {
+ const t = useTranslations('issue.customFields');
// Read-only: show the current value statically, no editor.
if (readOnly) {
if (def.fieldType === 'select' || def.fieldType === 'multi_select') {
@@ -54,7 +56,7 @@ export default function IssueCustomFieldControl({
);
}
if (def.fieldType === 'boolean') {
- return <span className="text-sm">{current?.value ? 'Yes' : 'No'}</span>;
+ return <span className="text-sm">{current?.value ? t('yes') : t('no')}</span>;
}
const v = current?.value;
return (
diff --git a/apps/web/src/features/issue/components/fields/IssueCustomFieldPill.tsx b/apps/web/src/features/issue/components/fields/IssueCustomFieldPill.tsx
index b5077e8c..942afc06 100644
--- a/apps/web/src/features/issue/components/fields/IssueCustomFieldPill.tsx
+++ b/apps/web/src/features/issue/components/fields/IssueCustomFieldPill.tsx
@@ -13,6 +13,7 @@ import { Input } from '@/components/ui/input';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
import { colorDot } from '@/components/common/fields/colorDot';
import { Pill } from '@/components/common/fields/Pill';
+import { useTranslations } from 'next-intl';
// A pill + popover editor for a single non-markdown custom field, used in the
// new-issue modal where the value is collected before the issue exists.
@@ -27,6 +28,7 @@ export default function IssueCustomFieldPill({
onChange: (v: IssueFieldValueInput) => void;
defaultOpen?: boolean;
}) {
+ const t = useTranslations('issue.customFields');
const [open, setOpen] = useState(defaultOpen);
if (def.fieldType === 'boolean') {
@@ -58,7 +60,7 @@ export default function IssueCustomFieldPill({
<PopoverContent className="w-56 p-0" align="start">
<Command>
<CommandList>
- <CommandEmpty>No options.</CommandEmpty>
+ <CommandEmpty>{t('noOptions')}</CommandEmpty>
<CommandGroup>
{def.fieldType === 'select' && (
<CommandItem
diff --git a/apps/web/src/features/issue/components/shared/IssueBadges.tsx b/apps/web/src/features/issue/components/shared/IssueBadges.tsx
index e4e4e064..1a913df1 100644
--- a/apps/web/src/features/issue/components/shared/IssueBadges.tsx
+++ b/apps/web/src/features/issue/components/shared/IssueBadges.tsx
@@ -1,5 +1,7 @@
import type { ReactNode } from 'react';
+import { useTranslations } from 'next-intl';
import { formatShortDate } from '@/utils/dates';
+import { usePriorityLabel } from '@/hooks/usePriorityLabel';
import { cn } from '@/lib/utils';
import Avatar from '@/components/common/Avatar';
import { PriorityIcon } from './IssueIcons';
@@ -20,6 +22,8 @@ export function PriorityBadge({
priority: string;
className?: string;
}) {
+ const t = useTranslations('common.priority');
+ const priorityLabel = usePriorityLabel();
return (
<Tooltip>
<TooltipTrigger asChild>
@@ -27,7 +31,7 @@ export function PriorityBadge({
<PriorityIcon priority={priority} className={className} />
</span>
</TooltipTrigger>
- <TooltipContent className="capitalize">{priority} priority</TooltipContent>
+ <TooltipContent>{t('tooltip', { priority: priorityLabel(priority) })}</TooltipContent>
</Tooltip>
);
}
diff --git a/apps/web/src/features/issue/hooks/useActivityText.tsx b/apps/web/src/features/issue/hooks/useActivityText.tsx
new file mode 100644
index 00000000..48e2693b
--- /dev/null
+++ b/apps/web/src/features/issue/hooks/useActivityText.tsx
@@ -0,0 +1,167 @@
+'use client';
+
+import { type ReactNode } from 'react';
+import { useTranslations } from 'next-intl';
+import { type FeedItem } from '@/lib/api';
+import { formatDate } from '@/utils/dates';
+import { isLinkRelation } from '@/utils/issueLinks';
+import { byKey } from '@/utils/messageKey';
+import { usePriorityLabel } from '@/hooks/usePriorityLabel';
+
+const fmtDate = (v: string | null) => (v ? formatDate(v) : '');
+
+// Long values (description, markdown/long custom fields) are shown behind a
+// popover rather than inline, so the feed row stays compact.
+const isLong = (text: string | null): text is string =>
+ !!text && (text.length > 80 || text.includes('\n'));
+
+// The verb phrase for one activity event (everything after the actor's name),
+// with a popover node when the change carries a long value worth expanding. The
+// changed values are wrapped in <v>, which reads slightly brighter than the
+// connective words — the whole row stays secondary to a comment.
+export function useActivityText() {
+ const t = useTranslations('issue.activity');
+ const phrase = byKey(useTranslations('issueLinks.phrases'));
+ const priorityLabel = usePriorityLabel();
+
+ const v = (chunks: ReactNode) => <span className="text-foreground/70">{chunks}</span>;
+ const linkPhrase = (subject: string | null) =>
+ isLinkRelation(subject) ? phrase(subject) : t('linkedTo');
+
+ return function describeActivity(a: FeedItem): { line: ReactNode; popover?: string } {
+ const line = (key: string, values: Record<string, string> = {}): ReactNode =>
+ byKey(t)(key, values) as unknown as ReactNode;
+ const rich = (key: string, values: Record<string, string> = {}): ReactNode =>
+ (t.rich as unknown as (k: string, vals: Record<string, unknown>) => ReactNode)(key, {
+ ...values,
+ v,
+ });
+
+ switch (a.action) {
+ case 'created':
+ return { line: line('created') };
+ case 'title':
+ return isLong(a.toText)
+ ? { line: line('titleChanged'), popover: a.toText }
+ : { line: rich('renamed', { title: a.toText ?? '' }) };
+ case 'description':
+ return a.toText
+ ? { line: line('descriptionUpdated'), popover: a.toText }
+ : { line: line('descriptionCleared') };
+ case 'status':
+ return a.fromText
+ ? { line: rich('statusMoved', { from: a.fromText, to: a.toText ?? '' }) }
+ : { line: rich('statusSet', { status: a.toText ?? '' }) };
+ case 'assignee':
+ if (!a.toText) return { line: rich('assigneeRemoved', { name: a.fromText ?? '' }) };
+ return {
+ line: rich(a.fromText ? 'assigneeChanged' : 'assigneeSet', { name: a.toText }),
+ };
+ case 'delegate':
+ if (!a.toText) return { line: rich('delegateRemoved', { name: a.fromText ?? '' }) };
+ return {
+ line: rich(a.fromText ? 'delegateChanged' : 'delegateSet', { name: a.toText }),
+ };
+ case 'priority':
+ return a.toText
+ ? { line: rich('prioritySet', { priority: priorityLabel(a.toText) }) }
+ : { line: line('priorityRemoved') };
+ case 'type':
+ return a.toText
+ ? { line: rich('typeSet', { type: a.toText }) }
+ : { line: line('typeRemoved') };
+ case 'cycle':
+ if (!a.toText) return { line: rich('cycleRemoved', { cycle: a.fromText ?? '' }) };
+ return {
+ line: a.fromText
+ ? rich('cycleMoved', { from: a.fromText, to: a.toText })
+ : rich('cycleSet', { cycle: a.toText }),
+ };
+ case 'start_date':
+ return a.toText
+ ? { line: rich('startDateSet', { date: fmtDate(a.toText) }) }
+ : { line: line('startDateRemoved') };
+ case 'due_date':
+ return a.toText
+ ? { line: rich('dueDateSet', { date: fmtDate(a.toText) }) }
+ : { line: line('dueDateRemoved') };
+ case 'label_add':
+ return { line: rich('labelAdded', { label: a.toText ?? '' }) };
+ case 'label_remove':
+ return { line: rich('labelRemoved', { label: a.fromText ?? '' }) };
+ case 'link_add':
+ return {
+ line: rich('linkAdded', { relation: linkPhrase(a.subject), issue: a.toText ?? '' }),
+ };
+ case 'link_remove':
+ return {
+ line: rich('linkRemoved', { relation: linkPhrase(a.subject), issue: a.toText ?? '' }),
+ };
+ case 'parent':
+ if (!a.toText) return { line: rich('parentDetached', { parent: a.fromText ?? '' }) };
+ return {
+ line: a.fromText
+ ? rich('parentMoved', { from: a.fromText, to: a.toText })
+ : rich('parentSet', { parent: a.toText }),
+ };
+ case 'subtask_add':
+ return { line: rich('subtaskAdded', { subtask: a.toText ?? '' }) };
+ case 'subtask_remove':
+ return { line: rich('subtaskRemoved', { subtask: a.fromText ?? '' }) };
+ case 'checklist_add':
+ return { line: rich('checklistAdded', { checklist: a.toText ?? '' }) };
+ case 'checklist_rename':
+ return {
+ line: rich('checklistRenamed', { from: a.fromText ?? '', to: a.toText ?? '' }),
+ };
+ case 'checklist_remove':
+ return { line: rich('checklistRemoved', { checklist: a.fromText ?? '' }) };
+ case 'checklist_item_add':
+ return {
+ line: rich('checklistItemAdded', { item: a.toText ?? '', checklist: a.subject ?? '' }),
+ };
+ case 'checklist_item_remove':
+ return {
+ line: rich('checklistItemRemoved', {
+ item: a.fromText ?? '',
+ checklist: a.subject ?? '',
+ }),
+ };
+ case 'field':
+ if (isLong(a.toText))
+ return { line: rich('fieldUpdated', { field: a.subject ?? '' }), popover: a.toText };
+ return a.toText
+ ? { line: rich('fieldSet', { field: a.subject ?? '', value: a.toText }) }
+ : { line: rich('fieldCleared', { field: a.subject ?? '' }) };
+ case 'archived':
+ return { line: line('archived') };
+ case 'restored':
+ return { line: line('restored') };
+ case 'github_pr': {
+ // fromText is "owner/repo#42", toText the PR's URL on GitHub.
+ const key = a.subject === 'merged' ? 'pullRequestMerged' : 'pullRequestOpened';
+ const pr = (chunks: ReactNode) =>
+ a.toText ? (
+ <a
+ href={a.toText}
+ target="_blank"
+ rel="noreferrer"
+ className="text-foreground/70 underline underline-offset-2 hover:text-foreground"
+ >
+ {chunks}
+ </a>
+ ) : (
+ v(chunks)
+ );
+ return {
+ line: (t.rich as unknown as (k: string, vals: Record<string, unknown>) => ReactNode)(
+ key,
+ { pr: a.fromText ?? '', v: pr },
+ ),
+ };
+ }
+ default:
+ return { line: a.action };
+ }
+ };
+}
diff --git a/apps/web/src/features/issue/hooks/useDueDatePresetLabel.ts b/apps/web/src/features/issue/hooks/useDueDatePresetLabel.ts
new file mode 100644
index 00000000..a357e1e9
--- /dev/null
+++ b/apps/web/src/features/issue/hooks/useDueDatePresetLabel.ts
@@ -0,0 +1,11 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
+import { byKey } from '@/utils/messageKey';
+import type { DueDatePreset } from '../utils/dueDatePresets';
+
+// The name of a due-date quick preset ("Tomorrow", "End of this week").
+export function useDueDatePresetLabel() {
+ const t = useTranslations('issue.dueDatePresets');
+ return (preset: DueDatePreset) => byKey(t)(preset);
+}
diff --git a/apps/web/src/features/issue/hooks/useIssueCommands.tsx b/apps/web/src/features/issue/hooks/useIssueCommands.tsx
index f985c74e..9a0ce123 100644
--- a/apps/web/src/features/issue/hooks/useIssueCommands.tsx
+++ b/apps/web/src/features/issue/hooks/useIssueCommands.tsx
@@ -24,7 +24,9 @@ import { usePermissions } from '@/hooks/usePermissions';
import { useSession } from '@/lib/auth-client';
import { useShell } from '@/context/shellContext';
import { colorDot } from '@/components/common/fields/colorDot';
+import { useFormatter, useTranslations } from 'next-intl';
import { PRIORITY_FIELDS } from '@/components/common/fields/priorityFields';
+import { usePriorityLabel } from '@/hooks/usePriorityLabel';
import type { Command, CommandSection } from '@/utils/commands';
import {
ApplyActionDialog,
@@ -33,7 +35,8 @@ import {
} from '../components/actions/IssueActions';
import { useArchiveAction } from './useArchiveAction';
import { StateIcon } from '../components/shared/IssueIcons';
-import { dueDatePresets, formatPreset } from '../utils/dueDatePresets';
+import { dueDatePresets } from '../utils/dueDatePresets';
+import { useDueDatePresetLabel } from './useDueDatePresetLabel';
import { buildIssuePrompt } from '../utils/issuePrompt';
// The palette commands for the issue the user is looking at — the issue page or
@@ -47,6 +50,11 @@ export function useIssueCommands(
onDeleted?: () => void,
): { section: CommandSection | null; dialogs: ReactNode } {
const { can } = usePermissions();
+ const t = useTranslations('issue.commands');
+ const tPriority = useTranslations('common.priority');
+ const format = useFormatter();
+ const priorityLabel = usePriorityLabel();
+ const presetLabel = useDueDatePresetLabel();
const { onOpenIssue } = useShell();
const { data: session } = useSession();
const projectKey = project?.project.key ?? null;
@@ -94,25 +102,25 @@ export function useIssueCommands(
const copyPrompt = async () => {
await navigator.clipboard.writeText(buildIssuePrompt(issue, project, session?.user));
- toast.success('Prompt copied to clipboard');
+ toast.success(t('promptCopied'));
};
const copyLink = async () => {
await navigator.clipboard.writeText(`${window.location.origin}/${issue.identifier}`);
- toast.success('Short link copied');
+ toast.success(t('shortLinkCopied'));
};
const items: Command[] = [
{
id: 'issue.preview',
- label: 'Preview issue',
+ label: t('preview'),
icon: <PanelRight />,
keywords: 'open panel side',
run: () => onOpenIssue(issue.id, 'panel'),
},
{
id: 'issue.open',
- label: 'Go to issue',
+ label: t('goToIssue'),
icon: <SquareArrowOutUpRight />,
keywords: 'open page full',
run: () => onOpenIssue(issue.id, 'page'),
@@ -122,7 +130,7 @@ export function useIssueCommands(
if (canEdit) {
items.push({
id: 'issue.status',
- label: 'Change status',
+ label: t('status'),
icon: currentColumn ? (
<StateIcon
stateType={currentColumn.stateType}
@@ -134,8 +142,8 @@ export function useIssueCommands(
),
keywords: 'state column move',
submenu: {
- heading: 'Change status',
- placeholder: 'Set status to…',
+ heading: t('status'),
+ placeholder: t('statusPlaceholder'),
items: project.columns.map((c) => ({
id: `issue.status.${c.id}`,
label: c.name,
@@ -148,16 +156,16 @@ export function useIssueCommands(
items.push({
id: 'issue.priority',
- label: 'Set priority',
+ label: t('priority'),
icon: (PRIORITY_FIELDS.find((p) => p.value === (issue.priority ?? '')) ?? PRIORITY_FIELDS[0])
.icon,
keywords: 'urgent high medium low',
submenu: {
- heading: 'Set priority',
- placeholder: 'Set priority to…',
+ heading: t('priority'),
+ placeholder: tPriority('setTo'),
items: PRIORITY_FIELDS.map((p) => ({
id: `issue.priority.${p.value || 'none'}`,
- label: p.label,
+ label: priorityLabel(p.value),
icon: p.icon,
checked: p.value === (issue.priority ?? ''),
run: () => patch({ priority: p.value || null }),
@@ -168,16 +176,16 @@ export function useIssueCommands(
if (members.length > 0) {
items.push({
id: 'issue.assignee',
- label: 'Assign to',
+ label: t('assignee'),
icon: <User />,
keywords: 'owner member',
submenu: {
- heading: 'Assign to',
- placeholder: 'Assign to…',
+ heading: t('assignee'),
+ placeholder: t('assigneePlaceholder'),
items: [
{
id: 'issue.assignee.none',
- label: 'No assignee',
+ label: t('noAssignee'),
icon: <CircleDashed />,
checked: issue.assigneeUserId == null,
run: () => patch({ assigneeUserId: null }),
@@ -197,16 +205,16 @@ export function useIssueCommands(
if (agents.length > 0) {
items.push({
id: 'issue.delegate',
- label: 'Delegate to agent',
+ label: t('delegate'),
icon: <Bot />,
keywords: 'ai bot',
submenu: {
- heading: 'Delegate to agent',
- placeholder: 'Delegate to…',
+ heading: t('delegate'),
+ placeholder: t('delegatePlaceholder'),
items: [
{
id: 'issue.delegate.none',
- label: 'No delegate',
+ label: t('noDelegate'),
icon: <CircleDashed />,
checked: issue.delegateUserId == null,
run: () => patch({ delegateUserId: null }),
@@ -225,25 +233,25 @@ export function useIssueCommands(
items.push({
id: 'issue.due-date',
- label: 'Set due date',
+ label: t('dueDate'),
icon: <CalendarClock />,
keywords: 'deadline schedule',
submenu: {
- heading: 'Set due date',
- placeholder: 'Set due date to…',
+ heading: t('dueDate'),
+ placeholder: t('dueDatePlaceholder'),
items: [
...dueDatePresets().map((p) => ({
id: `issue.due-date.${p.key}`,
- label: p.label,
+ label: presetLabel(p.key),
icon: <CalendarClock />,
- shortcut: formatPreset(p.date),
+ shortcut: format.dateTime(p.date, { weekday: 'short', month: 'short', day: 'numeric' }),
run: () => patch({ dueDate: toDateStr(p.date) }),
})),
...(issue.dueDate
? [
{
id: 'issue.due-date.clear',
- label: 'Clear due date',
+ label: t('clearDueDate'),
icon: <X />,
run: () => patch({ dueDate: null }),
},
@@ -256,12 +264,12 @@ export function useIssueCommands(
if (project.labels.length > 0) {
items.push({
id: 'issue.labels',
- label: 'Toggle labels',
+ label: t('labels'),
icon: <Tag />,
keywords: 'tag',
submenu: {
- heading: 'Toggle labels',
- placeholder: 'Toggle a label…',
+ heading: t('labels'),
+ placeholder: t('labelsPlaceholder'),
items: project.labels.map((l) => ({
id: `issue.labels.${l.id}`,
label: l.name,
@@ -295,14 +303,14 @@ export function useIssueCommands(
items.push(
{
id: 'issue.copy-link',
- label: 'Copy short link',
+ label: t('copyShortLink'),
icon: <Share2 />,
keywords: 'url share',
run: () => void copyLink(),
},
{
id: 'issue.copy-prompt',
- label: 'Copy prompt',
+ label: t('copyPrompt'),
icon: <ClipboardCopy />,
keywords: 'ai markdown clipboard',
run: () => void copyPrompt(),
@@ -314,13 +322,13 @@ export function useIssueCommands(
issue.archivedAt
? {
id: 'issue.restore',
- label: 'Restore issue',
+ label: t('restore'),
icon: <ArchiveRestore />,
run: () => restoreIssue.mutate(issue.id),
}
: {
id: 'issue.archive',
- label: 'Archive issue',
+ label: t('archive'),
icon: <Archive />,
run: () => archive(issue),
},
@@ -330,7 +338,7 @@ export function useIssueCommands(
if (canDelete) {
items.push({
id: 'issue.delete',
- label: 'Delete issue',
+ label: t('delete'),
icon: <Trash2 />,
destructive: true,
run: () => setConfirmingDelete(true),
diff --git a/apps/web/src/features/issue/hooks/useIssueDetail.ts b/apps/web/src/features/issue/hooks/useIssueDetail.ts
index 91cb89c2..81963313 100644
--- a/apps/web/src/features/issue/hooks/useIssueDetail.ts
+++ b/apps/web/src/features/issue/hooks/useIssueDetail.ts
@@ -1,6 +1,7 @@
import { useEffect, useState } from 'react';
import { type Editor } from '@tiptap/react';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import {
type Attachment,
type ProjectDetail,
@@ -25,6 +26,7 @@ export function useIssueDetail(
issueId: number,
onIssueLoaded?: (issue: IssueDetailRow) => void,
) {
+ const t = useTranslations('issue.attachments');
const issueQuery = useIssueQuery(issueId);
const issue = issueQuery.data ?? null;
const fieldDefs = fieldDefsForType(project.customFields, issue?.typeId ?? null);
@@ -104,11 +106,11 @@ export function useIssueDetail(
}
if (embeds.length > 0) {
appendToDescription(embeds.join('\n\n'));
- toast.success(embeds.length === 1 ? '1 file attached' : `${embeds.length} files attached`);
+ toast.success(t('attachedCount', { count: embeds.length }));
}
const failed = files.length - embeds.length;
if (failed > 0) {
- toast.error(failed === 1 ? 'Could not upload the file' : `Could not upload ${failed} files`);
+ toast.error(t('uploadFailedCount', { count: failed }));
}
}
diff --git a/apps/web/src/features/issue/utils/activityIcons.ts b/apps/web/src/features/issue/utils/activityIcons.ts
new file mode 100644
index 00000000..3f1873f6
--- /dev/null
+++ b/apps/web/src/features/issue/utils/activityIcons.ts
@@ -0,0 +1,54 @@
+import {
+ Archive,
+ ArchiveRestore,
+ Calendar,
+ CircleDot,
+ CirclePlus,
+ FileText,
+ GitPullRequest,
+ Link2,
+ ListChecks,
+ ListTree,
+ Pencil,
+ RefreshCw,
+ Shapes,
+ SignalHigh,
+ Bot,
+ Tag,
+ UserRound,
+ type LucideIcon,
+} from 'lucide-react';
+import { type ActivityAction } from '@/lib/api';
+
+// The icon of each activity feed event. Its verb phrase is built by
+// useActivityText, which needs the reader's language.
+
+export const ACTION_ICON: Record<ActivityAction, LucideIcon> = {
+ created: CirclePlus,
+ title: Pencil,
+ description: FileText,
+ status: CircleDot,
+ assignee: UserRound,
+ delegate: Bot,
+ priority: SignalHigh,
+ type: Shapes,
+ cycle: RefreshCw,
+ start_date: Calendar,
+ due_date: Calendar,
+ label_add: Tag,
+ label_remove: Tag,
+ link_add: Link2,
+ link_remove: Link2,
+ parent: ListTree,
+ subtask_add: ListTree,
+ subtask_remove: ListTree,
+ checklist_add: ListChecks,
+ checklist_rename: ListChecks,
+ checklist_remove: ListChecks,
+ checklist_item_add: ListChecks,
+ checklist_item_remove: ListChecks,
+ field: Pencil,
+ archived: Archive,
+ restored: ArchiveRestore,
+ github_pr: GitPullRequest,
+};
diff --git a/apps/web/src/features/issue/utils/activityText.tsx b/apps/web/src/features/issue/utils/activityText.tsx
deleted file mode 100644
index 68310f01..00000000
--- a/apps/web/src/features/issue/utils/activityText.tsx
+++ /dev/null
@@ -1,238 +0,0 @@
-import { type ReactNode } from 'react';
-import { formatDate } from '@/utils/dates';
-
-import {
- Archive,
- ArchiveRestore,
- Calendar,
- CircleDot,
- CirclePlus,
- FileText,
- GitPullRequest,
- Link2,
- ListChecks,
- ListTree,
- Pencil,
- RefreshCw,
- Shapes,
- SignalHigh,
- Bot,
- Tag,
- UserRound,
- type LucideIcon,
-} from 'lucide-react';
-import { type ActivityAction, type FeedItem } from '@/lib/api';
-import { priorityLabel } from '@/utils/fieldOptions';
-import { linkPhrase } from '@/utils/issueLinks';
-
-// Renders one activity feed event as an icon plus a verb phrase. Kept out of the
-// feed component so the switch over action types stays isolated from the layout.
-
-export const ACTION_ICON: Record<ActivityAction, LucideIcon> = {
- created: CirclePlus,
- title: Pencil,
- description: FileText,
- status: CircleDot,
- assignee: UserRound,
- delegate: Bot,
- priority: SignalHigh,
- type: Shapes,
- cycle: RefreshCw,
- start_date: Calendar,
- due_date: Calendar,
- label_add: Tag,
- label_remove: Tag,
- link_add: Link2,
- link_remove: Link2,
- parent: ListTree,
- subtask_add: ListTree,
- subtask_remove: ListTree,
- checklist_add: ListChecks,
- checklist_rename: ListChecks,
- checklist_remove: ListChecks,
- checklist_item_add: ListChecks,
- checklist_item_remove: ListChecks,
- field: Pencil,
- archived: Archive,
- restored: ArchiveRestore,
- github_pr: GitPullRequest,
-};
-
-const fmtDate = (v: string | null) => (v ? formatDate(v) : '');
-
-// Long values (description, markdown/long custom fields) are shown behind a
-// popover rather than inline, so the feed row stays compact.
-const isLong = (text: string | null): text is string =>
- !!text && (text.length > 80 || text.includes('\n'));
-
-// The verb phrase for one event (everything after the actor's name). Returns a
-// popover node too when the change carries a long value worth expanding.
-export function describeActivity(a: FeedItem): { line: ReactNode; popover?: string } {
- // Values are slightly brighter than the connective words but still muted —
- // the whole activity row reads as secondary to comments.
- const strong = (t: string | null) => <span className="text-foreground/70">{t}</span>;
- switch (a.action) {
- case 'created':
- return { line: 'created the issue' };
- case 'title':
- return isLong(a.toText)
- ? { line: 'changed the title', popover: a.toText }
- : { line: <>renamed to {strong(`“${a.toText}”`)}</> };
- case 'description':
- return a.toText
- ? { line: 'updated the description', popover: a.toText }
- : { line: 'cleared the description' };
- case 'status':
- return a.fromText
- ? {
- line: (
- <>
- moved from {strong(a.fromText)} to {strong(a.toText)}
- </>
- ),
- }
- : { line: <>set status to {strong(a.toText)}</> };
- case 'assignee':
- if (!a.toText) return { line: <>removed assignee {strong(a.fromText)}</> };
- return {
- line: a.fromText ? (
- <>re-assigned to {strong(a.toText)}</>
- ) : (
- <>assigned to {strong(a.toText)}</>
- ),
- };
- case 'delegate':
- if (!a.toText) return { line: <>removed delegate {strong(a.fromText)}</> };
- return {
- line: a.fromText ? (
- <>re-delegated to {strong(a.toText)}</>
- ) : (
- <>delegated to {strong(a.toText)}</>
- ),
- };
- case 'priority':
- return a.toText
- ? { line: <>set priority to {strong(priorityLabel(a.toText))}</> }
- : { line: 'removed priority' };
- case 'type':
- return a.toText ? { line: <>set type to {strong(a.toText)}</> } : { line: 'removed type' };
- case 'cycle':
- if (!a.toText) return { line: <>removed from cycle {strong(a.fromText)}</> };
- return {
- line: a.fromText ? (
- <>
- moved from cycle {strong(a.fromText)} to {strong(a.toText)}
- </>
- ) : (
- <>planned into cycle {strong(a.toText)}</>
- ),
- };
- case 'start_date':
- return a.toText
- ? { line: <>set start date to {strong(fmtDate(a.toText))}</> }
- : { line: 'removed start date' };
- case 'due_date':
- return a.toText
- ? { line: <>set due date to {strong(fmtDate(a.toText))}</> }
- : { line: 'removed due date' };
- case 'label_add':
- return { line: <>added label {strong(a.toText)}</> };
- case 'label_remove':
- return { line: <>removed label {strong(a.fromText)}</> };
- case 'link_add':
- return {
- line: (
- <>
- marked this issue as {linkPhrase(a.subject)} {strong(a.toText)}
- </>
- ),
- };
- case 'link_remove':
- return {
- line: (
- <>
- no longer {linkPhrase(a.subject)} {strong(a.toText)}
- </>
- ),
- };
- case 'parent':
- if (!a.toText) return { line: <>detached from {strong(a.fromText)}</> };
- return {
- line: a.fromText ? (
- <>
- moved from {strong(a.fromText)} to {strong(a.toText)}
- </>
- ) : (
- <>made this a subtask of {strong(a.toText)}</>
- ),
- };
- case 'subtask_add':
- return { line: <>added subtask {strong(a.toText)}</> };
- case 'subtask_remove':
- return { line: <>removed subtask {strong(a.fromText)}</> };
- case 'checklist_add':
- return { line: <>added checklist {strong(`“${a.toText}”`)}</> };
- case 'checklist_rename':
- return {
- line: (
- <>
- renamed checklist {strong(`“${a.fromText}”`)} to {strong(`“${a.toText}”`)}
- </>
- ),
- };
- case 'checklist_remove':
- return { line: <>removed checklist {strong(`“${a.fromText}”`)}</> };
- case 'checklist_item_add':
- return {
- line: (
- <>
- added {strong(`“${a.toText}”`)} to {strong(a.subject)}
- </>
- ),
- };
- case 'checklist_item_remove':
- return {
- line: (
- <>
- removed {strong(`“${a.fromText}”`)} from {strong(a.subject)}
- </>
- ),
- };
- case 'field':
- if (isLong(a.toText)) return { line: <>updated {strong(a.subject)}</>, popover: a.toText };
- return a.toText
- ? {
- line: (
- <>
- set {strong(a.subject)} to {strong(a.toText)}
- </>
- ),
- }
- : { line: <>cleared {strong(a.subject)}</> };
- case 'archived':
- return { line: 'archived the issue' };
- case 'restored':
- return { line: 'restored the issue' };
- case 'github_pr': {
- // fromText is "owner/repo#42", toText the PR's URL on GitHub.
- const pr = a.toText ? (
- <a
- href={a.toText}
- target="_blank"
- rel="noreferrer"
- className="text-foreground/70 underline underline-offset-2 hover:text-foreground"
- >
- {a.fromText}
- </a>
- ) : (
- strong(a.fromText)
- );
- return {
- line:
- a.subject === 'merged' ? <>merged pull request {pr}</> : <>opened pull request {pr}</>,
- };
- }
- default:
- return { line: a.action };
- }
-}
diff --git a/apps/web/src/features/issue/utils/dueDatePresets.ts b/apps/web/src/features/issue/utils/dueDatePresets.ts
index 270a1abd..3db42f7d 100644
--- a/apps/web/src/features/issue/utils/dueDatePresets.ts
+++ b/apps/web/src/features/issue/utils/dueDatePresets.ts
@@ -1,18 +1,16 @@
import { addDays } from '@/utils/dates';
-// "Thu, Jul 9" for a due-date preset's resolved date.
-export function formatPreset(date: Date): string {
- return date.toLocaleDateString('en-US', { weekday: 'short', month: 'short', day: 'numeric' });
-}
-
// Due-date quick presets, resolved against today: tomorrow, the coming Friday
-// (end of the work week), and one week out.
-export function dueDatePresets(): { key: string; label: string; date: Date }[] {
+// (end of the work week), and one week out. The name of a preset is a message
+// under `issue.dueDatePresets`; its resolved date is formatted by the caller.
+export type DueDatePreset = 'tomorrow' | 'endOfWeek' | 'inOneWeek';
+
+export function dueDatePresets(): { key: DueDatePreset; date: Date }[] {
const today = new Date();
const toFriday = (5 - today.getDay() + 7) % 7; // 0 when today is Friday
return [
- { key: 'tomorrow', label: 'Tomorrow', date: addDays(today, 1) },
- { key: 'end-of-week', label: 'End of this week', date: addDays(today, toFriday) },
- { key: 'one-week', label: 'In one week', date: addDays(today, 7) },
+ { key: 'tomorrow', date: addDays(today, 1) },
+ { key: 'endOfWeek', date: addDays(today, toFriday) },
+ { key: 'inOneWeek', date: addDays(today, 7) },
];
}
diff --git a/apps/web/src/features/issue/utils/issuePrompt.ts b/apps/web/src/features/issue/utils/issuePrompt.ts
index 410215b6..c3562f4e 100644
--- a/apps/web/src/features/issue/utils/issuePrompt.ts
+++ b/apps/web/src/features/issue/utils/issuePrompt.ts
@@ -1,5 +1,4 @@
import type { Issue, ProjectDetail } from '@/lib/api';
-import { priorityLabel } from '@/utils/fieldOptions';
import { issuePath } from '@/utils/paths';
// A git-branch-safe handle from the current user: the email local part (or name)
@@ -56,7 +55,7 @@ export function buildIssuePrompt(
];
tags.push('<description>', issue.description.trim(), '</description>');
if (status) tags.push(`<status>${status}</status>`);
- if (issue.priority) tags.push(`<priority>${priorityLabel(issue.priority)}</priority>`);
+ if (issue.priority) tags.push(`<priority>${issue.priority}</priority>`);
if (type) tags.push(`<type>${type}</type>`);
if (assignee) tags.push(`<assignee>${assignee}</assignee>`);
if (delegate) tags.push(`<delegate>${delegate}</delegate>`);
diff --git a/apps/web/src/features/issue/utils/timeline.ts b/apps/web/src/features/issue/utils/timeline.ts
index 19ed11c7..0b3ba2eb 100644
--- a/apps/web/src/features/issue/utils/timeline.ts
+++ b/apps/web/src/features/issue/utils/timeline.ts
@@ -103,6 +103,8 @@ export function statusColor(columns: Column[], status: string | null): string {
export function buildTimelineLayout(
segments: TimelineSegment[],
columns: Column[],
+ // Names a segment whose status the project no longer has.
+ unknownStatus: string,
): TimelineLayout {
if (segments.length === 0) return { lanes: [], ticks: [], hasFixedTail: false };
@@ -127,7 +129,7 @@ export function buildTimelineLayout(
if (!lane) {
const found = columnOf(segment.status);
lane = {
- label: segment.status ?? 'Unknown status',
+ label: segment.status ?? unknownStatus,
color: found?.column.color || FALLBACK_COLOR,
stateType: found?.column.stateType,
order: found?.index ?? columns.length,
diff --git a/apps/web/src/features/issue/utils/tiptap-slash-command.ts b/apps/web/src/features/issue/utils/tiptap-slash-command.ts
index bcd146e7..fe3203ce 100644
--- a/apps/web/src/features/issue/utils/tiptap-slash-command.ts
+++ b/apps/web/src/features/issue/utils/tiptap-slash-command.ts
@@ -14,6 +14,8 @@ export type SlashItem = {
export type SlashCommandOptions = {
// Omitted where there is nothing to pick from, which drops the Image item.
onPickImage?: () => void;
+ // The names of the items, in the reader's language.
+ labels: { codeBlock: string; image: string };
};
// Typing "/" opens a list of blocks to insert — how they are reached with nothing
@@ -22,7 +24,7 @@ export const SlashCommand = Extension.create<SlashCommandOptions>({
name: 'slashCommand',
addProseMirrorPlugins() {
- const { onPickImage } = this.options;
+ const { onPickImage, labels } = this.options;
return [
Suggestion<SlashItem, SlashItem>({
@@ -34,7 +36,7 @@ export const SlashCommand = Extension.create<SlashCommandOptions>({
items: ({ query }) => {
const items: SlashItem[] = [
{
- title: 'Code block',
+ title: labels.codeBlock,
icon: SquareCode,
run: ({ editor, range }) =>
editor.chain().focus().deleteRange(range).toggleCodeBlock().run(),
@@ -42,7 +44,7 @@ export const SlashCommand = Extension.create<SlashCommandOptions>({
];
if (onPickImage) {
items.push({
- title: 'Image',
+ title: labels.image,
icon: ImageIcon,
run: ({ editor, range }) => {
editor.chain().focus().deleteRange(range).run();
diff --git a/apps/web/src/features/mcp/McpServerPage.tsx b/apps/web/src/features/mcp/McpServerPage.tsx
index 08de23fa..2ebc792b 100644
--- a/apps/web/src/features/mcp/McpServerPage.tsx
+++ b/apps/web/src/features/mcp/McpServerPage.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import { useShell } from '@/context/shellContext';
import { usePermissions } from '@/hooks/usePermissions';
import SectionPageView from '@/components/common/page/SectionPageView';
@@ -7,13 +8,14 @@ import McpStatusRow from './components/McpStatusRow';
import McpConnectionGuide from './components/McpConnectionGuide';
export default function McpServerPage() {
+ const t = useTranslations('mcp');
const { project } = useShell();
const { isOwner } = usePermissions();
return (
<SectionPageView
- title="MCP Server"
- description="Connect AI agents to this project over the Model Context Protocol. An agent gets the access of the API key it uses."
+ title={t('title')}
+ description={t('description')}
wide
widthClassName="min-w-[600px] max-w-[60%]"
>
diff --git a/apps/web/src/features/mcp/components/McpCodeBlock.tsx b/apps/web/src/features/mcp/components/McpCodeBlock.tsx
index 3019ec06..89508fb6 100644
--- a/apps/web/src/features/mcp/components/McpCodeBlock.tsx
+++ b/apps/web/src/features/mcp/components/McpCodeBlock.tsx
@@ -3,14 +3,16 @@
import { useState } from 'react';
import { Check, Copy } from 'lucide-react';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
export default function McpCodeBlock({ code }: { code: string }) {
+ const t = useTranslations('mcp');
const [copied, setCopied] = useState(false);
const copy = async () => {
await navigator.clipboard.writeText(code);
setCopied(true);
- toast.success('Copied to clipboard');
+ toast.success(t('copied'));
setTimeout(() => setCopied(false), 1500);
};
@@ -21,7 +23,7 @@ export default function McpCodeBlock({ code }: { code: string }) {
</pre>
<button
type="button"
- aria-label="Copy"
+ aria-label={t('copyAria')}
onClick={copy}
className="absolute top-2 right-2 grid size-7 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none"
>
diff --git a/apps/web/src/features/mcp/components/McpConnectionGuide.tsx b/apps/web/src/features/mcp/components/McpConnectionGuide.tsx
index ead53efc..c5a222ad 100644
--- a/apps/web/src/features/mcp/components/McpConnectionGuide.tsx
+++ b/apps/web/src/features/mcp/components/McpConnectionGuide.tsx
@@ -2,39 +2,50 @@
import { useState } from 'react';
import Link from 'next/link';
+import { useTranslations } from 'next-intl';
import { cn } from '@/lib/utils';
import { MCP_CLIENTS, MCP_URL } from '../utils/clients';
import McpCodeBlock from './McpCodeBlock';
+// The literal the reader swaps for their own key. Passed as a value rather than
+// written into the messages: angle brackets in a message are parsed as rich-text tags.
+const API_KEY_PLACEHOLDER = '<API_KEY>';
+
export default function McpConnectionGuide() {
+ const t = useTranslations('mcp');
const [activeLabel, setActiveLabel] = useState(MCP_CLIENTS[0].label);
const client = MCP_CLIENTS.find((c) => c.label === activeLabel) ?? MCP_CLIENTS[0];
+ const clientLabel = (c: (typeof MCP_CLIENTS)[number]) =>
+ c.labelKey ? t(`clients.${c.labelKey}`) : c.label;
return (
<section className="space-y-5">
<div className="border-b pb-1">
- <span className="text-xs font-medium text-muted-foreground">Connect a client</span>
+ <span className="text-xs font-medium text-muted-foreground">{t('connectClient')}</span>
</div>
<p className="text-sm text-muted-foreground">
- Create a personal key on the{' '}
- <Link
- href="/account/api-keys"
- className="font-medium text-foreground underline underline-offset-4"
- >
- API keys
- </Link>{' '}
- page, then replace <code className="font-mono text-xs">&lt;API_KEY&gt;</code> in the
- snippet.
+ {t.rich('keyHint', {
+ apiKey: API_KEY_PLACEHOLDER,
+ link: (chunks) => (
+ <Link
+ href="/account/api-keys"
+ className="font-medium text-foreground underline underline-offset-4"
+ >
+ {chunks}
+ </Link>
+ ),
+ code: (chunks) => <code className="font-mono text-xs">{chunks}</code>,
+ })}
</p>
<div className="space-y-2">
- <span className="text-xs font-medium text-muted-foreground">Endpoint</span>
+ <span className="text-xs font-medium text-muted-foreground">{t('endpoint')}</span>
<McpCodeBlock code={MCP_URL} />
</div>
<div className="space-y-3">
- <div role="tablist" aria-label="Client" className="flex flex-wrap gap-1">
+ <div role="tablist" aria-label={t('clientTabsAria')} className="flex flex-wrap gap-1">
{MCP_CLIENTS.map((c) => {
const selected = c.label === activeLabel;
return (
@@ -50,22 +61,25 @@ export default function McpConnectionGuide() {
: 'text-muted-foreground hover:bg-accent hover:text-foreground',
)}
>
- {c.label}
+ {clientLabel(c)}
</button>
);
})}
</div>
<div className="space-y-2">
- {(client.file || client.note) && (
+ {(client.file || client.noteKey) && (
<p className="text-sm text-muted-foreground">
{client.file && (
<>
- Add to <code className="font-mono text-xs">{client.file}</code>
- {client.note ? '. ' : ''}
+ {t.rich('addToFile', {
+ file: client.file,
+ code: (chunks) => <code className="font-mono text-xs">{chunks}</code>,
+ })}
+ {client.noteKey ? '. ' : ''}
</>
)}
- {client.note}
+ {client.noteKey && t(`notes.${client.noteKey}`, { apiKey: API_KEY_PLACEHOLDER })}
</p>
)}
<McpCodeBlock code={client.code} />
diff --git a/apps/web/src/features/mcp/components/McpStatusRow.tsx b/apps/web/src/features/mcp/components/McpStatusRow.tsx
index 06ffc06e..04de998b 100644
--- a/apps/web/src/features/mcp/components/McpStatusRow.tsx
+++ b/apps/web/src/features/mcp/components/McpStatusRow.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import { cn } from '@/lib/utils';
import { Switch } from '@/components/ui/switch';
import { Skeleton } from '@/components/ui/skeleton';
@@ -15,6 +16,7 @@ export default function McpStatusRow({
isLoading: boolean;
canManage: boolean;
}) {
+ const t = useTranslations('mcp');
const update = useUpdateProjectMcp(projectKey);
const busy = isLoading || update.isPending;
@@ -22,7 +24,7 @@ export default function McpStatusRow({
<div className="flex items-center justify-between gap-6 rounded-lg bg-muted/40 px-4 py-3.5">
<div className="space-y-0.5">
<div className="flex items-center gap-2">
- <span className="text-sm font-medium">MCP access</span>
+ <span className="text-sm font-medium">{t('access')}</span>
{isLoading ? (
<Skeleton className="h-4 w-14" />
) : (
@@ -32,21 +34,17 @@ export default function McpStatusRow({
enabled ? 'text-foreground' : 'text-muted-foreground',
)}
>
- {enabled ? 'Enabled' : 'Disabled'}
+ {enabled ? t('enabled') : t('disabled')}
</span>
)}
</div>
- {!canManage && (
- <p className="text-sm text-muted-foreground">
- Only a project owner can turn MCP access on or off.
- </p>
- )}
+ {!canManage && <p className="text-sm text-muted-foreground">{t('ownerOnly')}</p>}
</div>
<Switch
checked={enabled}
disabled={!canManage || busy}
onCheckedChange={(value) => update.mutate(value)}
- aria-label="Toggle MCP access"
+ aria-label={t('toggleAria')}
/>
</div>
);
diff --git a/apps/web/src/features/mcp/services/mcp.service.ts b/apps/web/src/features/mcp/services/mcp.service.ts
index 2089f940..e7b284eb 100644
--- a/apps/web/src/features/mcp/services/mcp.service.ts
+++ b/apps/web/src/features/mcp/services/mcp.service.ts
@@ -2,17 +2,19 @@ import { useMutation, useQueryClient } from '@tanstack/react-query';
import { toast } from 'sonner';
import { api } from '@/lib/api';
import { qk } from '@/services/queryKeys';
+import { useTranslations } from 'next-intl';
// The current state lives on the project payload (getProject), so there is no read
// query here: this writes and invalidates the project.
export function useUpdateProjectMcp(projectKey: string) {
+ const t = useTranslations('mcp.toast');
const queryClient = useQueryClient();
return useMutation({
mutationFn: (enabled: boolean) =>
api.updateProjectSettings(projectKey, { mcpEnabled: enabled }),
onSuccess: (data) => {
queryClient.invalidateQueries({ queryKey: qk.project(projectKey) });
- toast.success(data.mcpEnabled ? 'MCP access enabled' : 'MCP access disabled');
+ toast.success(data.mcpEnabled ? t('enabled') : t('disabled'));
},
});
}
diff --git a/apps/web/src/features/mcp/utils/clients.ts b/apps/web/src/features/mcp/utils/clients.ts
index 767866f7..c8df8aab 100644
--- a/apps/web/src/features/mcp/utils/clients.ts
+++ b/apps/web/src/features/mcp/utils/clients.ts
@@ -3,9 +3,12 @@
export const MCP_URL = `${process.env.NEXT_PUBLIC_API_URL}/mcp`;
interface McpClient {
+ // Product names stay as they are written by their makers; only the generic entry
+ // carries a key instead (labelKey), and the prose notes are translated by key.
label: string;
+ labelKey?: 'other';
file?: string;
- note?: string;
+ noteKey?: 'claudeCode' | 'vscode' | 'claudeDesktop' | 'other';
code: string;
}
@@ -15,7 +18,7 @@ interface McpClient {
export const MCP_CLIENTS: McpClient[] = [
{
label: 'Claude Code',
- note: 'Run this in your terminal.',
+ noteKey: 'claudeCode',
code: `claude mcp add --transport http plan ${MCP_URL} \\
--header "Authorization: Bearer <API_KEY>"`,
},
@@ -34,7 +37,7 @@ export const MCP_CLIENTS: McpClient[] = [
{
label: 'VS Code',
file: '.vscode/mcp.json',
- note: 'Needs GitHub Copilot.',
+ noteKey: 'vscode',
code: `{
"servers": {
"plan": {
@@ -60,7 +63,7 @@ export const MCP_CLIENTS: McpClient[] = [
{
label: 'Claude Desktop',
file: 'claude_desktop_config.json',
- note: 'Claude Desktop reaches remote servers through the mcp-remote bridge. Needs Node.js.',
+ noteKey: 'claudeDesktop',
code: `{
"mcpServers": {
"plan": {
@@ -75,7 +78,8 @@ export const MCP_CLIENTS: McpClient[] = [
},
{
label: 'Other',
- note: 'Any client that supports MCP over Streamable HTTP works. Point it at the endpoint and send an Authorization: Bearer <API_KEY> header.',
+ labelKey: 'other',
+ noteKey: 'other',
code: MCP_URL,
},
];
diff --git a/apps/web/src/features/members/MembersPage.tsx b/apps/web/src/features/members/MembersPage.tsx
index b2120ccd..4f752751 100644
--- a/apps/web/src/features/members/MembersPage.tsx
+++ b/apps/web/src/features/members/MembersPage.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import { useShell } from '@/context/shellContext';
import SectionPageView from '@/components/common/page/SectionPageView';
import InvitesManager from './components/invites/InvitesManager';
@@ -8,14 +9,11 @@ import MembersList from './components/members/MembersList';
// The Members page (/project/:projectKey/members): who has access to the project.
// Pending invites and the invite form sit above the members list.
export default function MembersPage() {
+ const t = useTranslations('members');
const { project } = useShell();
if (!project) return null;
return (
- <SectionPageView
- title="Members"
- description="People with access to this project. Invite people by email; owners can revoke access."
- wide
- >
+ <SectionPageView title={t('title')} description={t('description')} wide>
<InvitesManager projectKey={project.project.key} />
<MembersList projectKey={project.project.key} />
</SectionPageView>
diff --git a/apps/web/src/features/members/RolesPage.tsx b/apps/web/src/features/members/RolesPage.tsx
index aea9c130..480af510 100644
--- a/apps/web/src/features/members/RolesPage.tsx
+++ b/apps/web/src/features/members/RolesPage.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import { useShell } from '@/context/shellContext';
import SectionPageView from '@/components/common/page/SectionPageView';
import RolesManager from './components/roles/RolesManager';
@@ -8,13 +9,14 @@ import RolesToolbar from './components/roles/RolesToolbar';
// The Roles page (/project/:projectKey/members/roles): the project's custom roles
// and their permissions. Assigning a role to a member is done from the Members list.
export default function RolesPage() {
+ const t = useTranslations('members.roles');
const { project } = useShell();
if (!project) return null;
const projectKey = project.project.key;
return (
<SectionPageView
- title="Roles"
- description="Custom roles and the permissions each grants. Assign a role to a member from the Members list."
+ title={t('title')}
+ description={t('description')}
actions={<RolesToolbar projectKey={projectKey} />}
wide
>
diff --git a/apps/web/src/features/members/components/invites/InviteCreateForm.tsx b/apps/web/src/features/members/components/invites/InviteCreateForm.tsx
index a6dcac60..a70b034f 100644
--- a/apps/web/src/features/members/components/invites/InviteCreateForm.tsx
+++ b/apps/web/src/features/members/components/invites/InviteCreateForm.tsx
@@ -2,6 +2,7 @@
import { useState, type FormEvent } from 'react';
import { Plus } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import {
@@ -23,6 +24,8 @@ const OWNER_VALUE = 'owner';
// email is a 409, toasted by the global handler. On success the form clears so
// the owner can add another.
export default function InviteCreateForm({ projectKey }: { projectKey: string }) {
+ const t = useTranslations('members.invites');
+ const tCommon = useTranslations('common');
const [email, setEmail] = useState('');
const [roleValue, setRoleValue] = useState('');
const rolesQuery = useRolesQuery(projectKey);
@@ -56,7 +59,7 @@ export default function InviteCreateForm({ projectKey }: { projectKey: string })
<div className="flex items-center gap-2">
<Input
type="email"
- placeholder="[email protected]"
+ placeholder={t('emailPlaceholder')}
autoComplete="off"
required
value={email}
@@ -66,7 +69,7 @@ export default function InviteCreateForm({ projectKey }: { projectKey: string })
/>
<Select value={selected} onValueChange={setRoleValue} disabled={createInvite.isPending}>
<SelectTrigger className="h-9 w-40">
- <SelectValue placeholder="Role" />
+ <SelectValue placeholder={t('rolePlaceholder')} />
</SelectTrigger>
<SelectContent>
{roles.map((r) => (
@@ -74,7 +77,7 @@ export default function InviteCreateForm({ projectKey }: { projectKey: string })
{r.name}
</SelectItem>
))}
- <SelectItem value={OWNER_VALUE}>Owner</SelectItem>
+ <SelectItem value={OWNER_VALUE}>{tCommon('owner')}</SelectItem>
</SelectContent>
</Select>
<Button
@@ -83,7 +86,7 @@ export default function InviteCreateForm({ projectKey }: { projectKey: string })
className="h-9 gap-1.5"
>
<Plus className="size-4" />
- {createInvite.isPending ? 'Inviting…' : 'Invite'}
+ {createInvite.isPending ? t('inviting') : t('invite')}
</Button>
</div>
</form>
diff --git a/apps/web/src/features/members/components/invites/InviteRow.tsx b/apps/web/src/features/members/components/invites/InviteRow.tsx
index a39a65f3..a54253df 100644
--- a/apps/web/src/features/members/components/invites/InviteRow.tsx
+++ b/apps/web/src/features/members/components/invites/InviteRow.tsx
@@ -2,6 +2,7 @@
import { useState } from 'react';
import { Check, Copy, X } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { type InviteRow as Invite } from '@/lib/api';
import { inviteLink } from '@/utils/paths';
import { formatShortDate } from '@/utils/dates';
@@ -11,14 +12,6 @@ import { Item, ItemActions, ItemContent, ItemTitle } from '@/components/ui/item'
const STATUS_VARIANT = { pending: 'secondary', accepted: 'default', rejected: 'outline' } as const;
-// When the invite last changed: its creation for a pending one, otherwise the
-// moment it was accepted or rejected.
-function timestamp(invite: Invite) {
- if (invite.status === 'pending') return `created ${formatShortDate(invite.createdAt)}`;
- if (invite.respondedAt) return `${invite.status} ${formatShortDate(invite.respondedAt)}`;
- return formatShortDate(invite.createdAt);
-}
-
// One invite row: the invited email and role, its status, who sent it, and — for
// a pending invite — a copy-link button and a revoke action. Copy reads the link
// from the current web origin so it works in any deployment.
@@ -29,9 +22,19 @@ export default function InviteRow({
invite: Invite;
onRevoke: (invite: Invite) => void;
}) {
+ const t = useTranslations('members.invites');
+ const tCommon = useTranslations('common');
const [copied, setCopied] = useState(false);
const pending = invite.status === 'pending';
+ // When the invite last changed: its creation for a pending one, otherwise the
+ // moment it was accepted or rejected.
+ const timestamp = pending
+ ? t('createdAt', { date: formatShortDate(invite.createdAt) })
+ : invite.respondedAt
+ ? t('respondedAt', { status: invite.status, date: formatShortDate(invite.respondedAt) })
+ : formatShortDate(invite.createdAt);
+
async function copy() {
const origin = typeof window === 'undefined' ? '' : window.location.origin;
try {
@@ -46,7 +49,8 @@ export default function InviteRow({
const invitedBy = invite.invitedByName || invite.invitedByEmail;
// Owner invites bypass roles; a member invite shows its chosen role, falling
// back to the default role's label when none was pinned.
- const roleLabel = invite.role === 'owner' ? 'Owner' : (invite.roleName ?? 'Member');
+ const roleLabel =
+ invite.role === 'owner' ? tCommon('owner') : (invite.roleName ?? tCommon('member'));
return (
<Item
@@ -61,14 +65,14 @@ export default function InviteRow({
</Badge>
<Badge
variant={STATUS_VARIANT[invite.status]}
- className="px-1.5 py-0 text-[10px] font-normal capitalize"
+ className="px-1.5 py-0 text-[10px] font-normal"
>
- {invite.status}
+ {t(`status.${invite.status}`)}
</Badge>
</ItemTitle>
<span className="text-xs text-muted-foreground">
- {invitedBy ? `Invited by ${invitedBy} · ` : ''}
- {timestamp(invite)}
+ {invitedBy ? t('invitedBy', { name: invitedBy }) : ''}
+ {timestamp}
</span>
</ItemContent>
<ItemActions>
@@ -80,14 +84,14 @@ export default function InviteRow({
onClick={copy}
>
{copied ? <Check className="size-3.5" /> : <Copy className="size-3.5" />}
- {copied ? 'Copied' : 'Copy link'}
+ {copied ? t('copied') : t('copyLink')}
</Button>
)}
<Button
variant="ghost"
size="icon"
className="size-7 text-muted-foreground hover:text-destructive"
- title={pending ? 'Revoke invite' : 'Remove invite'}
+ title={pending ? t('revokeAction') : t('removeAction')}
onClick={() => onRevoke(invite)}
>
<X className="size-4" />
diff --git a/apps/web/src/features/members/components/invites/InvitesManager.tsx b/apps/web/src/features/members/components/invites/InvitesManager.tsx
index 223b03a2..a488937c 100644
--- a/apps/web/src/features/members/components/invites/InvitesManager.tsx
+++ b/apps/web/src/features/members/components/invites/InvitesManager.tsx
@@ -1,6 +1,7 @@
'use client';
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import { type InviteRow as Invite } from '@/lib/api';
import ConfirmDialog from '@/components/common/overlay/ConfirmDialog';
import { ItemGroup } from '@/components/ui/item';
@@ -14,6 +15,7 @@ import InviteRow from './InviteRow';
// permission — the form to invite someone by email. Gated by the members_invite
// matrix: without read it renders nothing.
export default function InvitesManager({ projectKey }: { projectKey: string }) {
+ const t = useTranslations('members.invites');
const { can } = usePermissions();
const canRead = can('members_invite', 'read');
const canCreate = can('members_invite', 'create');
@@ -33,7 +35,7 @@ export default function InvitesManager({ projectKey }: { projectKey: string }) {
{pending.length > 0 && (
<div className="mb-8">
<div className="mb-1 border-b pb-1 text-xs font-medium text-muted-foreground">
- {pending.length} pending invite{pending.length === 1 ? '' : 's'}
+ {t('pendingCount', { count: pending.length })}
</div>
<ItemGroup>
{pending.map((invite) => (
@@ -45,17 +47,15 @@ export default function InvitesManager({ projectKey }: { projectKey: string }) {
{target && (
<ConfirmDialog
- title={`Revoke invite for ${target.email}`}
- confirmLabel="Revoke invite"
+ title={t('revokeTitle', { email: target.email })}
+ confirmLabel={t('revokeConfirm')}
onConfirm={async () => {
await deleteInvite.mutateAsync(target.id);
setTarget(null);
}}
onClose={() => setTarget(null)}
>
- <div className="text-sm text-muted-foreground">
- The invite link will stop working. You can invite this email again later.
- </div>
+ <div className="text-sm text-muted-foreground">{t('revokeDescription')}</div>
</ConfirmDialog>
)}
</div>
diff --git a/apps/web/src/features/members/components/members/MemberDescriptionDialog.tsx b/apps/web/src/features/members/components/members/MemberDescriptionDialog.tsx
index 0d6d8261..595b40c0 100644
--- a/apps/web/src/features/members/components/members/MemberDescriptionDialog.tsx
+++ b/apps/web/src/features/members/components/members/MemberDescriptionDialog.tsx
@@ -2,6 +2,7 @@
import { useState } from 'react';
import { Pencil } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { MemberRow } from '@/lib/api';
import Avatar from '@/components/common/Avatar';
import { Dialog, DialogContent, DialogTitle } from '@/components/ui/dialog';
@@ -22,6 +23,8 @@ export default function MemberDescriptionDialog({
member: MemberRow;
self: boolean;
}) {
+ const t = useTranslations('members');
+ const tCommon = useTranslations('common');
const setDescription = useSetMemberDescription(projectKey);
const [open, setOpen] = useState(false);
const [value, setValue] = useState(member.description);
@@ -42,9 +45,7 @@ export default function MemberDescriptionDialog({
// "Role" is taken by the member's permission role in this same list, so the
// question asks what the person does instead.
- const question = self
- ? 'What do you do in this project?'
- : 'What does this person do in this project?';
+ const question = self ? t('descriptionQuestionSelf') : t('descriptionQuestionOther');
const displayName = member.name || member.email;
return (
@@ -56,12 +57,12 @@ export default function MemberDescriptionDialog({
size="icon"
className="size-8 text-muted-foreground hover:text-foreground"
onClick={openDialog}
- aria-label="Edit description"
+ aria-label={t('editDescription')}
>
<Pencil className="size-4" />
</Button>
</TooltipTrigger>
- <TooltipContent>Edit description</TooltipContent>
+ <TooltipContent>{t('editDescription')}</TooltipContent>
</Tooltip>
<Dialog open={open} onOpenChange={(next) => !next && setOpen(false)}>
<DialogContent className="inset-0 top-0 left-0 h-screen w-full max-w-none translate-x-0 translate-y-0 gap-0 rounded-none border-0 bg-background p-0 sm:max-w-none">
@@ -84,7 +85,7 @@ export default function MemberDescriptionDialog({
autoFocus
maxLength={500}
value={value}
- placeholder="e.g. Backend engineer, owns the API and integrations"
+ placeholder={t('descriptionPlaceholder')}
onChange={(e) => setValue(e.target.value)}
onKeyDown={(e) => {
if ((e.metaKey || e.ctrlKey) && e.key === 'Enter') void save();
@@ -97,7 +98,7 @@ export default function MemberDescriptionDialog({
onClick={save}
disabled={setDescription.isPending}
>
- {setDescription.isPending ? 'Saving…' : 'Save'}
+ {setDescription.isPending ? tCommon('saving') : tCommon('save')}
</Button>
</div>
</div>
diff --git a/apps/web/src/features/members/components/members/MemberRoleControl.tsx b/apps/web/src/features/members/components/members/MemberRoleControl.tsx
index 031312ec..c8e40923 100644
--- a/apps/web/src/features/members/components/members/MemberRoleControl.tsx
+++ b/apps/web/src/features/members/components/members/MemberRoleControl.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import type { MemberRow, Role } from '@/lib/api';
import { Badge } from '@/components/ui/badge';
import {
@@ -31,13 +32,15 @@ export default function MemberRoleControl({
canManage: boolean;
isLastOwner: boolean;
}) {
+ const t = useTranslations('members');
+ const tCommon = useTranslations('common');
const setMemberRole = useSetMemberRole(projectKey);
const isOwnerRow = member.role === 'owner';
// A null roleId means the member uses the project's default role.
const defaultRole = roles.find((r) => r.isDefault) ?? null;
const currentId = member.roleId ?? defaultRole?.id ?? null;
- const currentName = member.roleName ?? defaultRole?.name ?? 'Member';
+ const currentName = member.roleName ?? defaultRole?.name ?? tCommon('member');
if (!canManage) {
return (
@@ -45,7 +48,7 @@ export default function MemberRoleControl({
variant={isOwnerRow ? 'secondary' : 'outline'}
className="px-1.5 py-0 text-[10px] font-normal"
>
- {isOwnerRow ? 'Owner' : currentName}
+ {isOwnerRow ? tCommon('owner') : currentName}
</Badge>
);
}
@@ -67,9 +70,9 @@ export default function MemberRoleControl({
<SelectTrigger
size="sm"
className="h-7 w-36 text-xs"
- title={isOwnerRow && isLastOwner ? 'A project must keep at least one owner' : undefined}
+ title={isOwnerRow && isLastOwner ? t('lastOwner') : undefined}
>
- <SelectValue placeholder="Select role" />
+ <SelectValue placeholder={t('selectRole')} />
</SelectTrigger>
<SelectContent>
{roles.map((r) => (
@@ -77,7 +80,7 @@ export default function MemberRoleControl({
{r.name}
</SelectItem>
))}
- <SelectItem value={OWNER_VALUE}>Owner</SelectItem>
+ <SelectItem value={OWNER_VALUE}>{tCommon('owner')}</SelectItem>
</SelectContent>
</Select>
);
diff --git a/apps/web/src/features/members/components/members/MembersList.tsx b/apps/web/src/features/members/components/members/MembersList.tsx
index 30421d00..d39f2fd6 100644
--- a/apps/web/src/features/members/components/members/MembersList.tsx
+++ b/apps/web/src/features/members/components/members/MembersList.tsx
@@ -3,6 +3,7 @@
import { useState } from 'react';
import { useRouter } from 'next/navigation';
import { Bot, LogOut, UserMinus } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { type MemberRow } from '@/lib/api';
import { formatShortDate } from '@/utils/dates';
import Avatar from '@/components/common/Avatar';
@@ -31,6 +32,7 @@ import MemberDescriptionDialog from './MemberDescriptionDialog';
// a member can only leave (remove themselves). The last owner is protected — the
// API rejects it and the action is disabled here too.
export default function MembersList({ projectKey }: { projectKey: string }) {
+ const t = useTranslations('members');
const membersQuery = useMembersQuery(projectKey);
const { can, isOwner } = usePermissions();
const { data: session } = useSession();
@@ -72,10 +74,14 @@ export default function MembersList({ projectKey }: { projectKey: string }) {
</colgroup>
<TableHeader>
<TableRow className="hover:bg-transparent">
- <TableHead className="text-xs font-medium text-muted-foreground">Member</TableHead>
- <TableHead className="text-xs font-medium text-muted-foreground">Role</TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.member')}
+ </TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.role')}
+ </TableHead>
<TableHead className="text-right text-xs font-medium text-muted-foreground">
- Actions
+ {t('columns.actions')}
</TableHead>
</TableRow>
</TableHeader>
@@ -87,7 +93,7 @@ export default function MembersList({ projectKey }: { projectKey: string }) {
const canRemove = !m.isAgent && (self || can('members_manage', 'delete'));
const canEditDescription = !m.isAgent && (isOwner || self);
const lastOwner = m.role === 'owner' && ownerCount === 1;
- const removeLabel = self ? 'Leave project' : 'Revoke access';
+ const removeLabel = self ? t('leaveProject') : t('revokeAccess');
return (
<TableRow key={m.userId} className="group/item">
<TableCell className="px-3 py-3 align-top whitespace-normal">
@@ -101,7 +107,9 @@ export default function MembersList({ projectKey }: { projectKey: string }) {
<span className="flex items-center gap-2 text-sm font-medium">
<span className="truncate">{m.name || m.email}</span>
{self && (
- <span className="text-xs font-normal text-muted-foreground">(you)</span>
+ <span className="text-xs font-normal text-muted-foreground">
+ {t('you')}
+ </span>
)}
</span>
<span className="flex items-center gap-1.5 truncate text-xs text-muted-foreground">
@@ -111,12 +119,12 @@ export default function MembersList({ projectKey }: { projectKey: string }) {
className="gap-1 px-1.5 py-0 text-[10px] font-medium"
>
<Bot className="size-3" />
- AI Agent
+ {t('aiAgent')}
</Badge>
) : (
<span className="truncate">{m.email}</span>
)}
- <span>· joined {formatShortDate(m.createdAt)}</span>
+ <span>{t('joined', { date: formatShortDate(m.createdAt) })}</span>
</span>
<MemberDescription member={m} />
</div>
@@ -154,9 +162,7 @@ export default function MembersList({ projectKey }: { projectKey: string }) {
)}
</Button>
</TooltipTrigger>
- <TooltipContent>
- {lastOwner ? 'A project must keep at least one owner' : removeLabel}
- </TooltipContent>
+ <TooltipContent>{lastOwner ? t('lastOwner') : removeLabel}</TooltipContent>
</Tooltip>
)}
</div>
@@ -170,16 +176,16 @@ export default function MembersList({ projectKey }: { projectKey: string }) {
{target && (
<ConfirmDialog
title={
- targetIsSelf ? 'Leave this project' : `Revoke access for ${target.name || target.email}`
+ targetIsSelf ? t('leaveTitle') : t('revokeTitle', { name: target.name || target.email })
}
- confirmLabel={targetIsSelf ? 'Leave project' : 'Revoke access'}
+ confirmLabel={targetIsSelf ? t('leaveProject') : t('revokeAccess')}
onConfirm={confirmRemove}
onClose={() => setTarget(null)}
>
<div className="text-sm text-muted-foreground">
{targetIsSelf
- ? 'You will lose access to this project and its issues. An owner can invite you back later.'
- : `${target.name || target.email} will lose access to this project. They can be invited back later.`}
+ ? t('leaveDescription')
+ : t('revokeDescription', { name: target.name || target.email })}
</div>
</ConfirmDialog>
)}
diff --git a/apps/web/src/features/members/components/roles/RoleEditorPanel.tsx b/apps/web/src/features/members/components/roles/RoleEditorPanel.tsx
index af6a05fd..1b7c9e1a 100644
--- a/apps/web/src/features/members/components/roles/RoleEditorPanel.tsx
+++ b/apps/web/src/features/members/components/roles/RoleEditorPanel.tsx
@@ -2,6 +2,7 @@
import { Fragment, useMemo, useState } from 'react';
import { X } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type {
PermissionAction,
PermissionCatalog,
@@ -15,7 +16,8 @@ import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { useCreateRole, useUpdateRole } from '@/services/roles.service';
import { MatrixCheckbox } from './MatrixCheckbox';
-import { actionLabel, groupResources, orderActions, resourceLabel } from '@/utils/permissions';
+import { groupResources, orderActions } from '@/utils/permissions';
+import { usePermissionLabels } from '@/hooks/usePermissionLabels';
// A full permission matrix over the catalog, seeded from an existing role (edit)
// or all-false (create). Building from the catalog keeps the grid in sync with the
@@ -53,6 +55,9 @@ export default function RoleEditorPanel({
catalog: PermissionCatalog;
onClose: () => void;
}) {
+ const t = useTranslations('members.roles');
+ const tCommon = useTranslations('common');
+ const { actionLabel, resourceLabel, groupLabel } = usePermissionLabels();
const [name, setName] = useState(role?.name ?? '');
const [matrix, setMatrix] = useState<Permissions>(() => seedMatrix(catalog, role));
const createRole = useCreateRole(projectKey);
@@ -104,28 +109,36 @@ export default function RoleEditorPanel({
<div className="ml-auto flex h-full w-full flex-col border-l bg-card sm:w-[680px] sm:max-w-[92vw]">
<div className="flex shrink-0 items-center justify-between border-b px-6 py-4">
<div className="min-w-0">
- <h2 className="truncate text-sm font-medium">{role ? 'Edit role' : 'New role'}</h2>
+ <h2 className="truncate text-sm font-medium">
+ {role ? t('editorTitleEdit') : t('editorTitleNew')}
+ </h2>
<p className="text-xs text-muted-foreground">
<span className="rounded bg-secondary px-1.5 py-0.5 font-medium text-secondary-foreground">
{projectKey}
</span>{' '}
- role permissions
+ {t('editorSubtitle')}
</p>
</div>
- <Button variant="ghost" size="icon" className="size-7" onClick={onClose} title="Close">
+ <Button
+ variant="ghost"
+ size="icon"
+ className="size-7"
+ onClick={onClose}
+ title={tCommon('close')}
+ >
<X />
</Button>
</div>
<div className="flex-1 space-y-5 overflow-y-auto px-6 py-4">
<div className="space-y-1.5">
- <Label htmlFor="role-name">Name</Label>
+ <Label htmlFor="role-name">{tCommon('name')}</Label>
<Input
id="role-name"
autoFocus
value={name}
onChange={(e) => setName(e.target.value)}
- placeholder="e.g. Contributor"
+ placeholder={t('namePlaceholder')}
className="h-9"
/>
</div>
@@ -133,7 +146,7 @@ export default function RoleEditorPanel({
<table className="w-full border-collapse text-sm">
<thead>
<tr className="border-b">
- <th className="py-2 pr-2 text-left text-xs font-medium">Resource</th>
+ <th className="py-2 pr-2 text-left text-xs font-medium">{t('resourceColumn')}</th>
{actions.map((action) => {
const state = triState(cellsFor(catalog.resources, [action]));
return (
@@ -145,8 +158,8 @@ export default function RoleEditorPanel({
<MatrixCheckbox
checked={state}
onCheckedChange={() => apply(catalog.resources, [action], state !== true)}
- title={`Toggle ${actionLabel(action)} for all resources`}
- aria-label={`Toggle ${actionLabel(action)} for all resources`}
+ title={t('toggleActionAll', { action: actionLabel(action) })}
+ aria-label={t('toggleActionAll', { action: actionLabel(action) })}
/>
</div>
</th>
@@ -158,7 +171,7 @@ export default function RoleEditorPanel({
{groups.map((group) => {
const groupState = triState(cellsFor(group.resources, actions));
return (
- <Fragment key={group.title}>
+ <Fragment key={group.key}>
<tr className="border-b bg-muted/40">
<td className="py-1.5 pr-2">
<div className="flex items-center gap-2">
@@ -167,10 +180,10 @@ export default function RoleEditorPanel({
onCheckedChange={() =>
apply(group.resources, actions, groupState !== true)
}
- title={`Toggle all ${group.title} permissions`}
- aria-label={`Toggle all ${group.title} permissions`}
+ title={t('toggleGroupAll', { group: groupLabel(group.key) })}
+ aria-label={t('toggleGroupAll', { group: groupLabel(group.key) })}
/>
- <span className="text-xs font-medium">{group.title}</span>
+ <span className="text-xs font-medium">{groupLabel(group.key)}</span>
</div>
</td>
{actions.map((action) => {
@@ -182,8 +195,14 @@ export default function RoleEditorPanel({
onCheckedChange={() =>
apply(group.resources, [action], state !== true)
}
- title={`Toggle ${actionLabel(action)} for ${group.title}`}
- aria-label={`Toggle ${actionLabel(action)} for ${group.title}`}
+ title={t('toggleActionGroup', {
+ action: actionLabel(action),
+ group: groupLabel(group.key),
+ })}
+ aria-label={t('toggleActionGroup', {
+ action: actionLabel(action),
+ group: groupLabel(group.key),
+ })}
/>
</td>
);
@@ -199,7 +218,10 @@ export default function RoleEditorPanel({
onCheckedChange={() =>
apply([resource], [action], !matrix[resource][action])
}
- aria-label={`${resourceLabel(resource)}: ${actionLabel(action)}`}
+ aria-label={t('cellAria', {
+ resource: resourceLabel(resource),
+ action: actionLabel(action),
+ })}
/>
</td>
))}
@@ -214,10 +236,10 @@ export default function RoleEditorPanel({
<div className="flex shrink-0 items-center justify-end gap-2 border-t px-6 py-3">
<Button variant="outline" onClick={onClose} disabled={busy}>
- Cancel
+ {tCommon('cancel')}
</Button>
<Button onClick={save} disabled={busy || !name.trim()}>
- {role ? 'Save role' : 'Create role'}
+ {role ? t('saveRole') : t('createRole')}
</Button>
</div>
</div>
diff --git a/apps/web/src/features/members/components/roles/RolesImportDialog.tsx b/apps/web/src/features/members/components/roles/RolesImportDialog.tsx
index 895ecc36..9b1bd366 100644
--- a/apps/web/src/features/members/components/roles/RolesImportDialog.tsx
+++ b/apps/web/src/features/members/components/roles/RolesImportDialog.tsx
@@ -2,6 +2,7 @@
import { useState } from 'react';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import Modal from '@/components/common/overlay/Modal';
import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';
@@ -9,12 +10,6 @@ import { PermissionsPopover } from '@/components/common/permissions/PermissionsP
import { useCreateRole, useUpdateRole } from '@/services/roles.service';
import type { PlannedRole } from '../../utils/rolesTransfer';
-const ACTION_LABEL: Record<PlannedRole['action'], string> = {
- create: 'New',
- update: 'Overwrite',
- skip: 'Skip (default)',
-};
-
// Confirms a roles paste before applying it: lists each incoming role, whether it is
// created or overwrites an existing one, and a preview of its permission matrix. On
// confirm, created and overwritten roles are applied; default-name collisions are
@@ -28,6 +23,8 @@ export default function RolesImportDialog({
planned: PlannedRole[];
onClose: () => void;
}) {
+ const t = useTranslations('members.roles.import');
+ const tCommon = useTranslations('common');
const createRole = useCreateRole(projectKey);
const updateRole = useUpdateRole(projectKey);
const [busy, setBusy] = useState(false);
@@ -52,8 +49,7 @@ export default function RolesImportDialog({
}
}
const skipped = planned.length - applicable.length;
- const skippedNote = skipped > 0 ? `, ${skipped} skipped` : '';
- toast.success(`Applied roles: ${created} created, ${updated} updated${skippedNote}.`);
+ toast.success(t('applied', { created, updated, skipped }));
onClose();
} catch {
// The failed mutation is toasted by the global handler; keep the dialog open.
@@ -62,11 +58,10 @@ export default function RolesImportDialog({
}
return (
- <Modal title="Apply roles from clipboard" onClose={onClose} wide>
+ <Modal title={t('title')} onClose={onClose} wide>
<div className="space-y-4">
<p className="text-xs text-muted-foreground">
- {applicable.length} role{applicable.length === 1 ? '' : 's'} will be applied. Overwriting
- a role replaces its permission matrix; members keep the role.
+ {t('summary', { count: applicable.length })}
</p>
<div className="max-h-[50vh] divide-y divide-border/60 overflow-y-auto rounded-md border border-border/60">
{planned.map((role) => (
@@ -76,19 +71,18 @@ export default function RolesImportDialog({
variant={role.action === 'skip' ? 'outline' : 'secondary'}
className="shrink-0 px-1.5 py-0 text-[10px] font-normal"
>
- {ACTION_LABEL[role.action]}
+ {t(`actions.${role.action}`)}
</Badge>
- <PermissionsPopover permissions={role.permissions} label="Preview permissions" />
+ <PermissionsPopover permissions={role.permissions} label={t('preview')} />
</div>
))}
</div>
<div className="flex justify-end gap-2">
<Button variant="outline" onClick={onClose} disabled={busy}>
- Cancel
+ {tCommon('cancel')}
</Button>
<Button onClick={apply} disabled={busy || applicable.length === 0}>
- Apply {applicable.length > 0 ? applicable.length : ''} role
- {applicable.length === 1 ? '' : 's'}
+ {t('apply', { count: applicable.length })}
</Button>
</div>
</div>
diff --git a/apps/web/src/features/members/components/roles/RolesManager.tsx b/apps/web/src/features/members/components/roles/RolesManager.tsx
index 5f4dade1..bc533cce 100644
--- a/apps/web/src/features/members/components/roles/RolesManager.tsx
+++ b/apps/web/src/features/members/components/roles/RolesManager.tsx
@@ -2,6 +2,7 @@
import { useState } from 'react';
import { Pencil, Trash2 } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { Role } from '@/lib/api';
import ConfirmDialog from '@/components/common/overlay/ConfirmDialog';
import ListSkeleton from '@/components/common/skeleton/ListSkeleton';
@@ -26,6 +27,7 @@ import { PermissionsPopover } from '@/components/common/permissions/PermissionsP
// Owner-only — the API rejects a non-owner's writes, so a member sees a notice. The
// default role cannot be deleted (no delete action on it).
export default function RolesManager({ projectKey }: { projectKey: string }) {
+ const t = useTranslations('members.roles');
const { isOwner } = usePermissions();
const rolesQuery = useRolesQuery(projectKey, isOwner);
const catalogQuery = usePermissionCatalogQuery();
@@ -33,8 +35,7 @@ export default function RolesManager({ projectKey }: { projectKey: string }) {
const [editing, setEditing] = useState<Role | null>(null);
const [deleting, setDeleting] = useState<Role | null>(null);
- if (!isOwner)
- return <p className="text-sm text-muted-foreground">Only project owners can manage roles.</p>;
+ if (!isOwner) return <p className="text-sm text-muted-foreground">{t('ownerOnly')}</p>;
const roles = rolesQuery.data ?? [];
const catalog = catalogQuery.data ?? null;
@@ -44,9 +45,7 @@ export default function RolesManager({ projectKey }: { projectKey: string }) {
{rolesQuery.isPending ? (
<ListSkeleton className="py-4" />
) : roles.length === 0 ? (
- <p className="py-4 text-sm text-muted-foreground">
- No roles yet. Create one to grant scoped access.
- </p>
+ <p className="py-4 text-sm text-muted-foreground">{t('empty')}</p>
) : (
<Table className="min-w-[640px] table-fixed">
<colgroup>
@@ -56,12 +55,14 @@ export default function RolesManager({ projectKey }: { projectKey: string }) {
</colgroup>
<TableHeader>
<TableRow className="hover:bg-transparent">
- <TableHead className="text-xs font-medium text-muted-foreground">Role</TableHead>
<TableHead className="text-xs font-medium text-muted-foreground">
- Permissions
+ {t('columns.role')}
+ </TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.permissions')}
</TableHead>
<TableHead className="text-right text-xs font-medium text-muted-foreground">
- Actions
+ {t('columns.actions')}
</TableHead>
</TableRow>
</TableHeader>
@@ -73,7 +74,7 @@ export default function RolesManager({ projectKey }: { projectKey: string }) {
<span className="truncate text-sm font-medium">{role.name}</span>
{role.isDefault && (
<Badge variant="secondary" className="px-1.5 py-0 text-[10px] font-normal">
- Default
+ {t('default')}
</Badge>
)}
</div>
@@ -90,13 +91,13 @@ export default function RolesManager({ projectKey }: { projectKey: string }) {
size="icon"
className="size-8 text-muted-foreground hover:text-foreground"
disabled={!catalog}
- aria-label="Edit role"
+ aria-label={t('editAction')}
onClick={() => setEditing(role)}
>
<Pencil className="size-4" />
</Button>
</TooltipTrigger>
- <TooltipContent>Edit role</TooltipContent>
+ <TooltipContent>{t('editAction')}</TooltipContent>
</Tooltip>
<Tooltip>
<TooltipTrigger asChild>
@@ -106,7 +107,7 @@ export default function RolesManager({ projectKey }: { projectKey: string }) {
size="icon"
className="size-8 text-muted-foreground hover:text-destructive"
disabled={role.isDefault}
- aria-label="Delete role"
+ aria-label={t('deleteAction')}
onClick={() => setDeleting(role)}
>
<Trash2 className="size-4" />
@@ -114,7 +115,7 @@ export default function RolesManager({ projectKey }: { projectKey: string }) {
</span>
</TooltipTrigger>
<TooltipContent>
- {role.isDefault ? 'The default role cannot be deleted' : 'Delete role'}
+ {role.isDefault ? t('defaultUndeletable') : t('deleteAction')}
</TooltipContent>
</Tooltip>
</div>
@@ -136,17 +137,15 @@ export default function RolesManager({ projectKey }: { projectKey: string }) {
{deleting && (
<ConfirmDialog
- title={`Delete role "${deleting.name}"`}
- confirmLabel="Delete role"
+ title={t('deleteTitle', { name: deleting.name })}
+ confirmLabel={t('deleteAction')}
onConfirm={async () => {
await deleteRole.mutateAsync(deleting.id);
setDeleting(null);
}}
onClose={() => setDeleting(null)}
>
- <div className="text-sm text-muted-foreground">
- Members with this role will be moved to the default role. This cannot be undone.
- </div>
+ <div className="text-sm text-muted-foreground">{t('deleteDescription')}</div>
</ConfirmDialog>
)}
</div>
diff --git a/apps/web/src/features/members/components/roles/RolesToolbar.tsx b/apps/web/src/features/members/components/roles/RolesToolbar.tsx
index 00bc69d0..4a3cb19f 100644
--- a/apps/web/src/features/members/components/roles/RolesToolbar.tsx
+++ b/apps/web/src/features/members/components/roles/RolesToolbar.tsx
@@ -3,6 +3,7 @@
import { useCallback, useEffect, useMemo, useState } from 'react';
import { ClipboardPaste, Copy, MoreHorizontal, Plus } from 'lucide-react';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import { Button } from '@/components/ui/button';
import {
DropdownMenu,
@@ -28,6 +29,7 @@ import {
// nothing here (the table below shows the access notice). Self-contained — it shares
// the roles/catalog queries with the table through React Query.
export default function RolesToolbar({ projectKey }: { projectKey: string }) {
+ const t = useTranslations('members.roles');
const { isOwner } = usePermissions();
const mod = useIsMac() ? '⌘' : 'Ctrl';
const rolesQuery = useRolesQuery(projectKey, isOwner);
@@ -42,16 +44,16 @@ export default function RolesToolbar({ projectKey }: { projectKey: string }) {
// Copies the project's non-default roles to the clipboard as JSON.
const copyRoles = useCallback(async () => {
if (customRoleCount === 0) {
- toast.info('No custom roles to copy.');
+ toast.info(t('nothingToCopy'));
return;
}
try {
await navigator.clipboard.writeText(serializeRoles(roles));
- toast.success(`Copied ${customRoleCount} role${customRoleCount === 1 ? '' : 's'}.`);
+ toast.success(t('copiedRoles', { count: customRoleCount }));
} catch {
- toast.error('Could not copy to the clipboard.');
+ toast.error(t('copyFailed'));
}
- }, [roles, customRoleCount]);
+ }, [roles, customRoleCount, t]);
// Reads roles from the clipboard, then opens the confirmation dialog.
const pasteRoles = useCallback(async () => {
@@ -60,16 +62,21 @@ export default function RolesToolbar({ projectKey }: { projectKey: string }) {
try {
text = await navigator.clipboard.readText();
} catch {
- toast.error('Could not read the clipboard.');
+ toast.error(t('readFailed'));
return;
}
try {
const parsed = parseRolesText(text, catalog);
setImporting(planRolesImport(parsed, roles));
} catch (err) {
- toast.error(err instanceof Error ? err.message : 'Could not read roles from the clipboard.');
+ // parseRolesText rejects with the key of the reason it refused; anything else
+ // reaching here has no key of its own.
+ const key = (err instanceof Error ? `transferErrors.${err.message}` : '') as Parameters<
+ typeof t.has
+ >[0];
+ toast.error(t.has(key) ? t(key) : t('parseFailed'));
}
- }, [catalog, roles]);
+ }, [catalog, roles, t]);
// Cmd/Ctrl+C copies, Cmd/Ctrl+V pastes — but only on this page, not while typing,
// not while a dialog or the role editor is open (it can be opened from the table
@@ -111,7 +118,7 @@ export default function RolesToolbar({ projectKey }: { projectKey: string }) {
variant="ghost"
size="icon"
className="size-8 text-muted-foreground hover:text-foreground"
- aria-label="Role import and export"
+ aria-label={t('importExport')}
>
<MoreHorizontal className="size-4" />
</Button>
@@ -119,12 +126,12 @@ export default function RolesToolbar({ projectKey }: { projectKey: string }) {
<DropdownMenuContent align="end" className="w-52">
<DropdownMenuItem onClick={() => void copyRoles()} disabled={customRoleCount === 0}>
<Copy className="size-4" />
- Copy roles
+ {t('copyRoles')}
<DropdownMenuShortcut>{mod}C</DropdownMenuShortcut>
</DropdownMenuItem>
<DropdownMenuItem onClick={() => void pasteRoles()} disabled={!catalog}>
<ClipboardPaste className="size-4" />
- Paste roles
+ {t('pasteRoles')}
<DropdownMenuShortcut>{mod}V</DropdownMenuShortcut>
</DropdownMenuItem>
</DropdownMenuContent>
@@ -136,7 +143,7 @@ export default function RolesToolbar({ projectKey }: { projectKey: string }) {
onClick={() => setCreating(true)}
>
<Plus className="size-3.5" />
- New role
+ {t('newRole')}
</Button>
{creating && catalog && (
diff --git a/apps/web/src/features/members/utils/rolesTransfer.ts b/apps/web/src/features/members/utils/rolesTransfer.ts
index 71b3e679..064b30d1 100644
--- a/apps/web/src/features/members/utils/rolesTransfer.ts
+++ b/apps/web/src/features/members/utils/rolesTransfer.ts
@@ -71,11 +71,11 @@ export function parseRolesText(text: string, catalog: PermissionCatalog): RoleTr
try {
data = JSON.parse(text);
} catch {
- throw new Error('Clipboard does not contain valid JSON.');
+ throw new Error('invalidJson');
}
const env = data as Partial<RolesEnvelope>;
if (!env || env.type !== PAYLOAD_TYPE || !Array.isArray(env.roles)) {
- throw new Error('Clipboard does not contain a roles export.');
+ throw new Error('notAnExport');
}
const roles: RoleTransfer[] = [];
const seen = new Set<string>();
@@ -87,7 +87,7 @@ export function parseRolesText(text: string, catalog: PermissionCatalog): RoleTr
seen.add(key);
roles.push({ name, permissions: normalizeMatrix(raw.permissions, catalog) });
}
- if (roles.length === 0) throw new Error('The roles export is empty.');
+ if (roles.length === 0) throw new Error('empty');
return roles;
}
diff --git a/apps/web/src/features/notes/NotesPage.tsx b/apps/web/src/features/notes/NotesPage.tsx
index dc35daeb..6e60aaba 100644
--- a/apps/web/src/features/notes/NotesPage.tsx
+++ b/apps/web/src/features/notes/NotesPage.tsx
@@ -2,6 +2,7 @@
import { useEffect, useMemo } from 'react';
import { useParams, useRouter } from 'next/navigation';
+import { useTranslations } from 'next-intl';
import { useQueryClient } from '@tanstack/react-query';
import { ReactFlowProvider } from '@xyflow/react';
import { useShell } from '@/context/shellContext';
@@ -38,6 +39,7 @@ export default function NotesPage() {
const router = useRouter();
const qc = useQueryClient();
const projectKey = params.projectKey;
+ const t = useTranslations('notes');
const { can } = usePermissions();
const { entries: mru, record, remove: removeMru } = useNoteBoardMru(projectKey);
@@ -98,7 +100,7 @@ export default function NotesPage() {
if (!can('note_boards', 'read')) {
return (
<div className="flex h-full items-center justify-center px-4 text-center text-sm text-muted-foreground">
- You do not have access to notes.
+ {t('noAccess')}
</div>
);
}
diff --git a/apps/web/src/features/notes/components/BoardSwitcher.tsx b/apps/web/src/features/notes/components/BoardSwitcher.tsx
index db7c0055..004b7150 100644
--- a/apps/web/src/features/notes/components/BoardSwitcher.tsx
+++ b/apps/web/src/features/notes/components/BoardSwitcher.tsx
@@ -1,3 +1,6 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
import { useState, type UIEvent } from 'react';
import { Check, ChevronsUpDown, Layers, Loader2 } from 'lucide-react';
import type { NoteBoardSummary, NoteBoardVisibility } from '@/lib/api';
@@ -12,7 +15,7 @@ import {
CommandList,
} from '@/components/ui/command';
import { useNoteBoardSearch, flattenBoardPages } from '../services/noteBoards.service';
-import { boardListIcon, VISIBILITY_LABEL } from '../utils/visibility';
+import { boardListIcon } from '../utils/visibility';
// Load the next page when the list is scrolled near the bottom.
const SCROLL_THRESHOLD = 48;
@@ -34,6 +37,7 @@ export default function BoardSwitcher({
onSelect: (id: number) => void;
}) {
const [open, setOpen] = useState(false);
+ const t = useTranslations('notes');
const [query, setQuery] = useState('');
const debounced = useDebouncedValue(query, 250);
const { data, isLoading, hasNextPage, isFetchingNextPage, fetchNextPage } = useNoteBoardSearch(
@@ -78,16 +82,16 @@ export default function BoardSwitcher({
}}
>
<PopoverTrigger
- aria-label="All boards"
+ aria-label={t('allBoards')}
className="flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-sm text-muted-foreground hover:bg-accent hover:text-foreground"
>
<Layers className="size-3.5" />
- <span className="hidden sm:inline">All boards</span>
+ <span className="hidden sm:inline">{t('allBoards')}</span>
<ChevronsUpDown className="size-3.5" />
</PopoverTrigger>
<PopoverContent align="start" className="w-72 p-0">
<Command shouldFilter={false}>
- <CommandInput placeholder="Search boards…" value={query} onValueChange={setQuery} />
+ <CommandInput placeholder={t('searchBoards')} value={query} onValueChange={setQuery} />
<CommandList onScroll={onScroll}>
{isLoading ? (
<div className="flex items-center justify-center py-6 text-muted-foreground">
@@ -95,12 +99,12 @@ export default function BoardSwitcher({
</div>
) : (
<>
- <CommandEmpty>No boards found.</CommandEmpty>
+ <CommandEmpty>{t('noBoardsFound')}</CommandEmpty>
{GROUPS.map((visibility) => {
const group = boards.filter((b) => b.visibility === visibility);
if (group.length === 0) return null;
return (
- <CommandGroup key={visibility} heading={VISIBILITY_LABEL[visibility]}>
+ <CommandGroup key={visibility} heading={t(`visibility.${visibility}`)}>
{group.map(renderRow)}
</CommandGroup>
);
diff --git a/apps/web/src/features/notes/components/NoteBoardAccessList.tsx b/apps/web/src/features/notes/components/NoteBoardAccessList.tsx
index 8d18cd48..e2d17412 100644
--- a/apps/web/src/features/notes/components/NoteBoardAccessList.tsx
+++ b/apps/web/src/features/notes/components/NoteBoardAccessList.tsx
@@ -1,3 +1,6 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
import { useShell } from '@/context/shellContext';
import Avatar from '@/components/common/Avatar';
import { Badge } from '@/components/ui/badge';
@@ -14,6 +17,8 @@ export default function NoteBoardAccessList({
ownerUserId: string | null;
memberIds: string[];
}) {
+ const t = useTranslations('notes');
+ const tCommon = useTranslations('common');
const { project } = useShell();
const people = [ownerUserId, ...memberIds]
.map((userId) => project?.assignees.find((a) => a.userId === userId))
@@ -26,15 +31,15 @@ export default function NoteBoardAccessList({
// still dismisses the popover.
<Popover modal>
<PopoverTrigger
- aria-label="Board access"
+ aria-label={t('boardAccess')}
className="flex size-6 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground"
>
<Icon className="size-3.5" />
</PopoverTrigger>
<PopoverContent align="end" className="w-60 p-0">
<div className="border-b px-3 py-2">
- <p className="text-sm font-medium">Board access</p>
- <p className="text-xs text-muted-foreground">Only these people can open it</p>
+ <p className="text-sm font-medium">{t('boardAccess')}</p>
+ <p className="text-xs text-muted-foreground">{t('accessHint')}</p>
</div>
<ul className="p-1">
{people.map((person) => (
@@ -46,7 +51,7 @@ export default function NoteBoardAccessList({
<span className="truncate">{person.name}</span>
{(person.userId === ownerUserId || person.kind === 'agent') && (
<Badge variant="secondary" className="ml-auto px-1.5 py-0 text-[10px]">
- {person.userId === ownerUserId ? 'Owner' : 'Agent'}
+ {person.userId === ownerUserId ? tCommon('owner') : t('agent')}
</Badge>
)}
</li>
diff --git a/apps/web/src/features/notes/components/NoteBoardAccessPicker.tsx b/apps/web/src/features/notes/components/NoteBoardAccessPicker.tsx
index f1d56245..25f192f3 100644
--- a/apps/web/src/features/notes/components/NoteBoardAccessPicker.tsx
+++ b/apps/web/src/features/notes/components/NoteBoardAccessPicker.tsx
@@ -1,3 +1,6 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
import { useState } from 'react';
import type { NoteBoardAccessCandidate, NoteBoardVisibility } from '@/lib/api';
import { useSession } from '@/lib/auth-client';
@@ -5,7 +8,7 @@ import Avatar from '@/components/common/Avatar';
import { Badge } from '@/components/ui/badge';
import PopoverPick, { type PickItem } from '@/components/common/fields/PopoverPick';
import { useNoteBoardAccessCandidates } from '../services/noteBoards.service';
-import { VISIBILITY_HINT, VISIBILITY_ICON, VISIBILITY_LABEL } from '../utils/visibility';
+import { VISIBILITY_ICON } from '../utils/visibility';
const MODES: NoteBoardVisibility[] = ['public', 'private', 'restricted'];
@@ -29,6 +32,7 @@ export default function NoteBoardAccessPicker({
// "restricted" only reveals the member list, since a board with no one granted
// access is saved as private.
const [mode, setMode] = useState<NoteBoardVisibility>(visibility);
+ const t = useTranslations('notes');
const people = (candidates ?? []).filter((c) => c.userId !== session?.user.id);
@@ -48,9 +52,9 @@ export default function NoteBoardAccessPicker({
const Icon = VISIBILITY_ICON[m];
return {
key: m,
- search: VISIBILITY_LABEL[m],
+ search: t(`visibility.${m}`),
icon: <Icon className="size-4" />,
- label: VISIBILITY_LABEL[m],
+ label: t(`visibility.${m}`),
selected: m === mode,
onSelect: () => pickMode(m),
};
@@ -66,7 +70,7 @@ export default function NoteBoardAccessPicker({
selected,
trailing: candidate.canAccess ? undefined : (
<Badge variant="secondary" className="px-1.5 py-0 text-[10px]">
- No access
+ {t('noAccessShort')}
</Badge>
),
// Granting access to someone whose role cannot read notes changes nothing, so
@@ -80,8 +84,8 @@ export default function NoteBoardAccessPicker({
const groups =
mode === 'restricted'
? [
- { heading: 'Members', items: people.filter((c) => c.kind === 'member').map(toItem) },
- { heading: 'Agents', items: people.filter((c) => c.kind === 'agent').map(toItem) },
+ { heading: t('members'), items: people.filter((c) => c.kind === 'member').map(toItem) },
+ { heading: t('agents'), items: people.filter((c) => c.kind === 'agent').map(toItem) },
]
: [];
@@ -92,15 +96,15 @@ export default function NoteBoardAccessPicker({
trigger={
<button
type="button"
- aria-label="Board access"
- title={VISIBILITY_HINT[visibility]}
+ aria-label={t('boardAccess')}
+ title={t(`visibilityHint.${visibility}`)}
className="flex size-6 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground"
>
<Icon className="size-3.5" />
</button>
}
- inputPlaceholder="Board access…"
- emptyText="Nothing found."
+ inputPlaceholder={t('boardAccessPlaceholder')}
+ emptyText={t('nothingFound')}
items={modeItems}
groups={groups}
closeOnSelect={false}
diff --git a/apps/web/src/features/notes/components/NoteBoardBar.tsx b/apps/web/src/features/notes/components/NoteBoardBar.tsx
index 6879e2f8..2c8e7bfa 100644
--- a/apps/web/src/features/notes/components/NoteBoardBar.tsx
+++ b/apps/web/src/features/notes/components/NoteBoardBar.tsx
@@ -1,3 +1,6 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
import { useState } from 'react';
import { Plus } from 'lucide-react';
import { usePermissions } from '@/hooks/usePermissions';
@@ -27,6 +30,7 @@ export default function NoteBoardBar({
}) {
// 'create' to open the new-board dialog, an MRU entry to rename, or null (closed).
const [dialog, setDialog] = useState<'create' | MruEntry | null>(null);
+ const t = useTranslations('notes');
const renaming = dialog && typeof dialog === 'object' ? dialog : null;
const { can } = usePermissions();
const canCreate = can('note_boards', 'create');
@@ -42,7 +46,7 @@ export default function NoteBoardBar({
{canCreate && (
<button
type="button"
- aria-label="New board"
+ aria-label={t('newBoard')}
onClick={() => setDialog('create')}
className="flex size-7 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground"
>
@@ -68,8 +72,8 @@ export default function NoteBoardBar({
<NoteBoardNameDialog
key={dialogKey()}
open={dialog != null}
- title={renaming ? 'Rename board' : 'New board'}
- description={renaming ? undefined : 'A freeform canvas for sticky notes.'}
+ title={renaming ? t('renameBoard') : t('newBoard')}
+ description={renaming ? undefined : t('newBoardDescription')}
projectKey={projectKey}
initial={renaming?.name ?? ''}
withVisibility={dialog === 'create'}
diff --git a/apps/web/src/features/notes/components/NoteBoardNameDialog.tsx b/apps/web/src/features/notes/components/NoteBoardNameDialog.tsx
index b750b9c3..e5502f6a 100644
--- a/apps/web/src/features/notes/components/NoteBoardNameDialog.tsx
+++ b/apps/web/src/features/notes/components/NoteBoardNameDialog.tsx
@@ -1,9 +1,12 @@
+'use client';
+
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import Modal from '@/components/common/overlay/Modal';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
-import { VISIBILITY_HINT, VISIBILITY_ICON, type NewBoardVisibility } from '../utils/visibility';
+import { VISIBILITY_ICON, type NewBoardVisibility } from '../utils/visibility';
// A name prompt used for creating and renaming a note board. When `withVisibility`
// is set (creating), it also picks whether the board is public or private.
@@ -26,6 +29,8 @@ export default function NoteBoardNameDialog({
onClose: () => void;
onSubmit: (name: string, visibility: NewBoardVisibility) => void;
}) {
+ const t = useTranslations('notes');
+ const tCommon = useTranslations('common');
const [name, setName] = useState(initial);
const [visibility, setVisibility] = useState<NewBoardVisibility>('public');
@@ -44,13 +49,13 @@ export default function NoteBoardNameDialog({
}}
>
<div className="space-y-1.5">
- <Label htmlFor="board-name">Name</Label>
+ <Label htmlFor="board-name">{t('boardName')}</Label>
<div className="flex gap-2">
{withVisibility && (
<button
type="button"
- aria-label={visibility === 'private' ? 'Make public' : 'Make private'}
- title={VISIBILITY_HINT[visibility]}
+ aria-label={visibility === 'private' ? t('makePublic') : t('makePrivate')}
+ title={t(`visibilityHint.${visibility}`)}
onClick={() => setVisibility((v) => (v === 'private' ? 'public' : 'private'))}
className="flex size-9 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground"
>
@@ -63,7 +68,7 @@ export default function NoteBoardNameDialog({
required
value={name}
onChange={(e) => setName(e.target.value)}
- placeholder="Board name"
+ placeholder={t('boardNamePlaceholder')}
className="h-9"
/>
</div>
@@ -71,18 +76,16 @@ export default function NoteBoardNameDialog({
{withVisibility && (
<p className="text-sm text-muted-foreground">
- {visibility === 'private'
- ? 'Only you can see this board. You can share it with picked members later.'
- : 'Everyone in the project can see this board.'}
+ {visibility === 'private' ? t('privateHint') : t('publicHint')}
</p>
)}
<div className="flex justify-end gap-2">
<Button type="button" variant="ghost" onClick={onClose}>
- Cancel
+ {tCommon('cancel')}
</Button>
<Button type="submit" disabled={!isValid}>
- {withVisibility ? 'Create board' : 'Save'}
+ {withVisibility ? t('createBoard') : tCommon('save')}
</Button>
</div>
</form>
diff --git a/apps/web/src/features/notes/components/NoteBoardTab.tsx b/apps/web/src/features/notes/components/NoteBoardTab.tsx
index 3f8bd5e9..5734b107 100644
--- a/apps/web/src/features/notes/components/NoteBoardTab.tsx
+++ b/apps/web/src/features/notes/components/NoteBoardTab.tsx
@@ -1,3 +1,6 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
import { MoreHorizontal, Pencil, Trash2 } from 'lucide-react';
import { cn } from '@/lib/utils';
import { usePermissions } from '@/hooks/usePermissions';
@@ -25,6 +28,8 @@ export default function NoteBoardTab({
onRename: () => void;
onDelete: () => void;
}) {
+ const t = useTranslations('notes');
+ const tCommon = useTranslations('common');
const { can } = usePermissions();
const canEdit = can('note_boards', 'edit');
const canDelete = can('note_boards', 'delete');
@@ -48,7 +53,7 @@ export default function NoteBoardTab({
{showMenu && (
<DropdownMenu>
<DropdownMenuTrigger
- aria-label="Board options"
+ aria-label={t('boardOptions')}
className="text-muted-foreground hover:text-foreground"
>
<MoreHorizontal className="size-3.5" />
@@ -56,12 +61,12 @@ export default function NoteBoardTab({
<DropdownMenuContent align="start">
{canEdit && (
<DropdownMenuItem onClick={onRename}>
- <Pencil className="size-4" /> Rename
+ <Pencil className="size-4" /> {t('renameBoard')}
</DropdownMenuItem>
)}
{canDelete && (
<DropdownMenuItem variant="destructive" onClick={onDelete}>
- <Trash2 className="size-4" /> Delete
+ <Trash2 className="size-4" /> {tCommon('delete')}
</DropdownMenuItem>
)}
</DropdownMenuContent>
diff --git a/apps/web/src/features/notes/components/NoteCanvasControls.tsx b/apps/web/src/features/notes/components/NoteCanvasControls.tsx
index c286b528..f1b7eae2 100644
--- a/apps/web/src/features/notes/components/NoteCanvasControls.tsx
+++ b/apps/web/src/features/notes/components/NoteCanvasControls.tsx
@@ -1,10 +1,13 @@
+'use client';
+
import { Maximize2, Minimize2, Plus } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { NoteBoardVisibility } from '@/lib/api';
import { Button } from '@/components/ui/button';
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
import NoteBoardAccessList from './NoteBoardAccessList';
import NoteBoardAccessPicker from './NoteBoardAccessPicker';
-import { VISIBILITY_HINT, VISIBILITY_ICON } from '../utils/visibility';
+import { VISIBILITY_ICON } from '../utils/visibility';
export default function NoteCanvasControls({
projectKey,
@@ -29,6 +32,7 @@ export default function NoteCanvasControls({
onChangeVisibility: (visibility: NoteBoardVisibility, memberIds?: string[]) => void;
onToggleFullscreen: () => void;
}) {
+ const t = useTranslations('notes');
const VisibilityIcon = VISIBILITY_ICON[visibility];
function renderAccess() {
@@ -49,12 +53,12 @@ export default function NoteCanvasControls({
return (
<Tooltip>
<TooltipTrigger
- aria-label="Board access"
+ aria-label={t('boardAccess')}
className="flex size-6 cursor-default items-center justify-center rounded text-muted-foreground"
>
<VisibilityIcon className="size-3.5" />
</TooltipTrigger>
- <TooltipContent>{VISIBILITY_HINT[visibility]}</TooltipContent>
+ <TooltipContent>{t(`visibilityHint.${visibility}`)}</TooltipContent>
</Tooltip>
);
}
@@ -63,19 +67,19 @@ export default function NoteCanvasControls({
<div className="absolute top-3 right-3 z-10 flex items-center gap-2">
{canEdit && (
<Button variant="secondary" size="sm" onClick={onAddNote}>
- <Plus className="size-4" /> Add note
+ <Plus className="size-4" /> {t('addNote')}
</Button>
)}
{renderAccess()}
<Tooltip>
<TooltipTrigger
- aria-label={fullscreen ? 'Exit fullscreen' : 'Fullscreen'}
+ aria-label={fullscreen ? t('exitFullscreen') : t('fullscreen')}
onClick={onToggleFullscreen}
className="flex size-6 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground"
>
{fullscreen ? <Minimize2 className="size-3.5" /> : <Maximize2 className="size-3.5" />}
</TooltipTrigger>
- <TooltipContent>{fullscreen ? 'Exit fullscreen' : 'Fullscreen'}</TooltipContent>
+ <TooltipContent>{fullscreen ? t('exitFullscreen') : t('fullscreen')}</TooltipContent>
</Tooltip>
</div>
);
diff --git a/apps/web/src/features/notes/components/NoteCanvasTitle.tsx b/apps/web/src/features/notes/components/NoteCanvasTitle.tsx
index ac250434..ade330ba 100644
--- a/apps/web/src/features/notes/components/NoteCanvasTitle.tsx
+++ b/apps/web/src/features/notes/components/NoteCanvasTitle.tsx
@@ -1,3 +1,6 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
import { useEffect, useState } from 'react';
import type { NoteBoard } from '@/lib/api';
import { useShell } from '@/context/shellContext';
@@ -6,13 +9,6 @@ import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip
import { cn } from '@/lib/utils';
import type { SaveStatus } from '../hooks/useCanvasAutosave';
-const SAVE_STATUS_LABEL: Record<SaveStatus, string> = {
- unsaved: 'Unsaved changes',
- saving: 'Saving…',
- saved: 'Saved',
- error: 'Save failed',
-};
-
// The canvas label overlay. A board created before the creator was recorded (the
// column is newer than the feature) shows no avatar.
export default function NoteCanvasTitle({
@@ -23,6 +19,7 @@ export default function NoteCanvasTitle({
saveStatus: SaveStatus;
}) {
const { project } = useShell();
+ const t = useTranslations('notes');
const creator = project?.assignees.find((a) => a.userId === board.createdByUserId);
// The status stays visible while there are unsaved edits, a save is in flight, or
@@ -44,7 +41,7 @@ export default function NoteCanvasTitle({
<TooltipTrigger asChild>
<Avatar name={creator.name} image={creator.image} />
</TooltipTrigger>
- <TooltipContent>Created by {creator.name}</TooltipContent>
+ <TooltipContent>{t('createdBy', { name: creator.name })}</TooltipContent>
</Tooltip>
)}
<span className="text-sm leading-none font-medium text-foreground">{board.name}</span>
@@ -55,7 +52,7 @@ export default function NoteCanvasTitle({
saveStatus === 'error' ? 'text-destructive' : 'text-muted-foreground',
)}
>
- {SAVE_STATUS_LABEL[saveStatus]}
+ {t(`save.${saveStatus}`)}
</span>
)}
</div>
diff --git a/apps/web/src/features/notes/components/NotesEmptyState.tsx b/apps/web/src/features/notes/components/NotesEmptyState.tsx
index 46a40bfa..47a24996 100644
--- a/apps/web/src/features/notes/components/NotesEmptyState.tsx
+++ b/apps/web/src/features/notes/components/NotesEmptyState.tsx
@@ -1,3 +1,6 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
import { useState } from 'react';
import { Plus } from 'lucide-react';
import { usePermissions } from '@/hooks/usePermissions';
@@ -16,19 +19,17 @@ export default function NotesEmptyState({
onCreate: (name: string, visibility: NewBoardVisibility) => void;
}) {
const [open, setOpen] = useState(false);
+ const t = useTranslations('notes');
const { can } = usePermissions();
const canCreate = can('note_boards', 'create');
return (
<>
- <EmptyState
- title="No boards yet"
- description="A board is a freeform canvas for sticky notes."
- >
+ <EmptyState title={t('emptyTitle')} description={t('emptyDescription')}>
{canCreate && (
<Button size="sm" onClick={() => setOpen(true)}>
<Plus className="size-3.5" />
- New board
+ {t('newBoard')}
</Button>
)}
</EmptyState>
@@ -36,8 +37,8 @@ export default function NotesEmptyState({
<NoteBoardNameDialog
key={open ? 'open' : 'closed'}
open={open}
- title="New board"
- description="A freeform canvas for sticky notes."
+ title={t('newBoard')}
+ description={t('newBoardDescription')}
projectKey={projectKey}
initial=""
withVisibility
diff --git a/apps/web/src/features/notes/components/StickerColorPicker.tsx b/apps/web/src/features/notes/components/StickerColorPicker.tsx
index 5cb3f4ec..9482db93 100644
--- a/apps/web/src/features/notes/components/StickerColorPicker.tsx
+++ b/apps/web/src/features/notes/components/StickerColorPicker.tsx
@@ -1,3 +1,6 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
import { Circle } from '@uiw/react-color';
import { Palette } from 'lucide-react';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
@@ -13,19 +16,20 @@ export default function StickerColorPicker({
value: string;
onChange: (hex: string) => void;
}) {
+ const t = useTranslations('notes');
return (
// Modal so an outside click on the React Flow canvas (which captures pointer
// events) dismisses the picker instead of being swallowed by the canvas.
<Popover modal>
<PopoverTrigger
- aria-label="Background color"
- title="Background color"
+ aria-label={t('backgroundColor')}
+ title={t('backgroundColor')}
className="nodrag flex size-7 cursor-pointer items-center justify-center rounded text-black/50 hover:bg-black/10 hover:text-black/80 [&_svg]:size-3.5"
>
<Palette />
</PopoverTrigger>
<PopoverContent align="start" className="w-auto">
- <p className="mb-2 text-sm font-medium">Background colors</p>
+ <p className="mb-2 text-sm font-medium">{t('backgroundColors')}</p>
<Circle
colors={STICKER_PALETTE}
color={stickerColorValue(value)}
diff --git a/apps/web/src/features/notes/components/StickerEditor.tsx b/apps/web/src/features/notes/components/StickerEditor.tsx
index 297a8573..1e6de3e6 100644
--- a/apps/web/src/features/notes/components/StickerEditor.tsx
+++ b/apps/web/src/features/notes/components/StickerEditor.tsx
@@ -5,6 +5,7 @@ import Placeholder from '@tiptap/extension-placeholder';
import TaskList from '@tiptap/extension-task-list';
import TaskItem from '@tiptap/extension-task-item';
import { Markdown } from 'tiptap-markdown';
+import { useTranslations } from 'next-intl';
// The markdown body of a sticky note. Unlike the issue editor there is no bubble
// menu — a persistent toolbar (StickerToolbar) drives the commands — and task
@@ -21,11 +22,12 @@ export default function StickerEditor({
onReady?: (editor: Editor | null) => void;
editable: boolean;
}) {
+ const t = useTranslations('notes');
const editor = useEditor({
editable,
extensions: [
StarterKit,
- Placeholder.configure({ placeholder: 'Write a note…' }),
+ Placeholder.configure({ placeholder: t('notePlaceholder') }),
TaskList,
TaskItem.configure({ nested: true }),
Markdown.configure({ html: false, breaks: true }),
diff --git a/apps/web/src/features/notes/components/StickerNode.tsx b/apps/web/src/features/notes/components/StickerNode.tsx
index 31b6ecc0..ffc11bf6 100644
--- a/apps/web/src/features/notes/components/StickerNode.tsx
+++ b/apps/web/src/features/notes/components/StickerNode.tsx
@@ -1,3 +1,6 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
import { useState } from 'react';
import { type Editor } from '@tiptap/react';
import { GripHorizontal } from 'lucide-react';
@@ -29,6 +32,7 @@ export default function StickerNode({ id, data, selected }: NodeProps<StickerNod
const canCreateIssue = can('work_items', 'create');
const canEdit = can('note_boards', 'edit');
const [editor, setEditor] = useState<Editor | null>(null);
+ const t = useTranslations('notes');
const update = (patch: Partial<NoteSticker>) => {
setNodes((nodes) =>
@@ -61,13 +65,13 @@ export default function StickerNode({ id, data, selected }: NodeProps<StickerNod
value={data.title}
onChange={(e) => update({ title: e.target.value })}
readOnly={!canEdit}
- placeholder="Title"
+ placeholder={t('noteTitlePlaceholder')}
className="nodrag min-w-0 flex-1 cursor-text bg-transparent text-base font-semibold outline-none placeholder:text-black/40"
/>
{canEdit && (
<span
className="sticker-drag cursor-grab text-black/30 hover:text-black/60 active:cursor-grabbing"
- title="Drag note"
+ title={t('dragNote')}
>
<GripHorizontal className="size-4" />
</span>
diff --git a/apps/web/src/features/notes/components/StickerToolbar.tsx b/apps/web/src/features/notes/components/StickerToolbar.tsx
index 1458397f..14e6c773 100644
--- a/apps/web/src/features/notes/components/StickerToolbar.tsx
+++ b/apps/web/src/features/notes/components/StickerToolbar.tsx
@@ -1,3 +1,6 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
import { type Editor } from '@tiptap/react';
import { Bold, Italic, ListChecks, SquarePlus, Trash2 } from 'lucide-react';
import { cn } from '@/lib/utils';
@@ -54,6 +57,7 @@ export default function StickerToolbar({
onDelete: () => void;
canEdit: boolean;
}) {
+ const t = useTranslations('notes');
return (
<div className="flex items-center justify-between">
<div className="flex items-center gap-0.5">
@@ -61,21 +65,21 @@ export default function StickerToolbar({
<>
<StickerColorPicker value={color} onChange={onColorChange} />
<ToolbarButton
- label="Bold"
+ label={t('bold')}
active={editor?.isActive('bold')}
onClick={() => editor?.chain().focus().toggleBold().run()}
>
<Bold />
</ToolbarButton>
<ToolbarButton
- label="Italic"
+ label={t('italic')}
active={editor?.isActive('italic')}
onClick={() => editor?.chain().focus().toggleItalic().run()}
>
<Italic />
</ToolbarButton>
<ToolbarButton
- label="Checklist"
+ label={t('checklist')}
active={editor?.isActive('taskList')}
onClick={() => editor?.chain().focus().toggleTaskList().run()}
>
@@ -86,12 +90,12 @@ export default function StickerToolbar({
</div>
<div className="flex items-center gap-0.5">
{onConvert && (
- <ToolbarButton label="Convert to issue" onClick={onConvert}>
+ <ToolbarButton label={t('convertToIssue')} onClick={onConvert}>
<SquarePlus />
</ToolbarButton>
)}
{canEdit && (
- <ToolbarButton label="Delete note" onClick={onDelete}>
+ <ToolbarButton label={t('deleteNote')} onClick={onDelete}>
<Trash2 />
</ToolbarButton>
)}
diff --git a/apps/web/src/features/notes/utils/visibility.ts b/apps/web/src/features/notes/utils/visibility.ts
index 25836bfc..b99fcbc5 100644
--- a/apps/web/src/features/notes/utils/visibility.ts
+++ b/apps/web/src/features/notes/utils/visibility.ts
@@ -5,26 +5,15 @@ import type { NoteBoardVisibility } from '@/lib/api';
// on the board itself.
export type NewBoardVisibility = Exclude<NoteBoardVisibility, 'restricted'>;
-// How the three board states are labelled wherever a board is shown: the tab and
-// switcher icons, and the access picker on the canvas.
+// The icons of the three board states, shown on the tab, in the switcher and in
+// the access picker on the canvas. Their labels and hints are messages under
+// `notes.visibility` and `notes.visibilityHint`.
export const VISIBILITY_ICON: Record<NoteBoardVisibility, LucideIcon> = {
public: Globe,
private: Lock,
restricted: Users,
};
-export const VISIBILITY_LABEL: Record<NoteBoardVisibility, string> = {
- public: 'Public',
- private: 'Private',
- restricted: 'Restricted',
-};
-
-export const VISIBILITY_HINT: Record<NoteBoardVisibility, string> = {
- public: 'Every project member can see this board',
- private: 'Only its creator can see this board',
- restricted: 'Only its creator and the chosen members can see this board',
-};
-
// The icon for a board in the tab strip and the switcher, where a public board is
// the plain board icon — the globe is kept for the access control on the canvas,
// which reads as a state to change rather than a label.
diff --git a/apps/web/src/features/projects/ManageProjectsPage.tsx b/apps/web/src/features/projects/ManageProjectsPage.tsx
index 932521e4..271272c9 100644
--- a/apps/web/src/features/projects/ManageProjectsPage.tsx
+++ b/apps/web/src/features/projects/ManageProjectsPage.tsx
@@ -2,6 +2,7 @@
import { useState } from 'react';
import { useRouter } from 'next/navigation';
+import { useTranslations } from 'next-intl';
import type { Project } from '@/lib/api';
import { useSession } from '@/lib/auth-client';
import { useProjectsQuery } from '@/services/projects.service';
@@ -15,6 +16,7 @@ import ManageProjectsLeaveDialog from './components/ManageProjectsLeaveDialog';
// The delete/leave mutations drop the project from the cached list, so the row
// disappears without a manual refetch.
export default function ManageProjectsPage() {
+ const t = useTranslations('projects');
const { data: projects, isPending } = useProjectsQuery();
const { data: session } = useSession();
const router = useRouter();
@@ -23,11 +25,7 @@ export default function ManageProjectsPage() {
const [leaving, setLeaving] = useState<Project | null>(null);
return (
- <FullPageView
- label="Manage projects"
- title="Manage projects"
- description="Every project you belong to, with your permissions in each. Copy one to start a new project from its setup. Owners can delete a project; members can leave one. Deleting permanently removes the project and everything in it."
- >
+ <FullPageView label={t('label')} title={t('title')} description={t('description')}>
<ManageProjectsList
projects={projects ?? []}
isPending={isPending}
diff --git a/apps/web/src/features/projects/components/ManageProjectsDeleteDialog.tsx b/apps/web/src/features/projects/components/ManageProjectsDeleteDialog.tsx
index 7391b036..38be5867 100644
--- a/apps/web/src/features/projects/components/ManageProjectsDeleteDialog.tsx
+++ b/apps/web/src/features/projects/components/ManageProjectsDeleteDialog.tsx
@@ -1,6 +1,7 @@
'use client';
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import type { Project } from '@/lib/api';
import { useDeleteProject } from '@/services/projects.service';
import ConfirmDialog from '@/components/common/overlay/ConfirmDialog';
@@ -13,14 +14,15 @@ export default function ManageProjectsDeleteDialog({
project: Project;
onClose: () => void;
}) {
+ const t = useTranslations('projects.deleteDialog');
const [confirmText, setConfirmText] = useState('');
const deleteProject = useDeleteProject();
const matches = confirmText.trim() === project.key;
return (
<ConfirmDialog
- title={`Delete ${project.name}?`}
- confirmLabel="Delete permanently"
+ title={t('title', { name: project.name })}
+ confirmLabel={t('confirm')}
confirmDisabled={!matches}
onClose={onClose}
onConfirm={async () => {
@@ -30,13 +32,18 @@ export default function ManageProjectsDeleteDialog({
>
<div className="space-y-2 text-sm text-muted-foreground">
<p>
- This permanently deletes{' '}
- <span className="font-medium text-foreground">{project.name}</span> and everything in it:
- issues, comments, attachments, and settings. This cannot be undone.
+ {t.rich('description', {
+ name: project.name,
+ strong: (chunks) => <span className="font-medium text-foreground">{chunks}</span>,
+ })}
</p>
<p>
- Type <span className="font-mono font-medium text-foreground">{project.key}</span> to
- confirm.
+ {t.rich('typeToConfirm', {
+ key: project.key,
+ code: (chunks) => (
+ <span className="font-mono font-medium text-foreground">{chunks}</span>
+ ),
+ })}
</p>
</div>
<Input
diff --git a/apps/web/src/features/projects/components/ManageProjectsLeaveDialog.tsx b/apps/web/src/features/projects/components/ManageProjectsLeaveDialog.tsx
index 67bdaa63..d9e3bf98 100644
--- a/apps/web/src/features/projects/components/ManageProjectsLeaveDialog.tsx
+++ b/apps/web/src/features/projects/components/ManageProjectsLeaveDialog.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import type { Project } from '@/lib/api';
import { useLeaveProject } from '@/services/projects.service';
import ConfirmDialog from '@/components/common/overlay/ConfirmDialog';
@@ -13,12 +14,13 @@ export default function ManageProjectsLeaveDialog({
userId: string;
onClose: () => void;
}) {
+ const t = useTranslations('projects.leaveDialog');
const leaveProject = useLeaveProject();
return (
<ConfirmDialog
- title={`Leave ${project.name}?`}
- confirmLabel="Leave project"
+ title={t('title', { name: project.name })}
+ confirmLabel={t('confirm')}
onClose={onClose}
onConfirm={async () => {
await leaveProject.mutateAsync({ projectKey: project.key, userId });
@@ -26,8 +28,10 @@ export default function ManageProjectsLeaveDialog({
}}
>
<p className="text-sm text-muted-foreground">
- You will lose access to <span className="font-medium text-foreground">{project.name}</span>{' '}
- and its work items. To join again you need a new invite from an owner.
+ {t.rich('description', {
+ name: project.name,
+ strong: (chunks) => <span className="font-medium text-foreground">{chunks}</span>,
+ })}
</p>
</ConfirmDialog>
);
diff --git a/apps/web/src/features/projects/components/ManageProjectsList.tsx b/apps/web/src/features/projects/components/ManageProjectsList.tsx
index f404a63a..dc64c73b 100644
--- a/apps/web/src/features/projects/components/ManageProjectsList.tsx
+++ b/apps/web/src/features/projects/components/ManageProjectsList.tsx
@@ -1,6 +1,7 @@
'use client';
import { Copy, LogOut, Trash2 } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { Project } from '@/lib/api';
import { Badge } from '@/components/ui/badge';
import { Skeleton } from '@/components/ui/skeleton';
@@ -28,6 +29,8 @@ export default function ManageProjectsList({
onDelete: (project: Project) => void;
onLeave: (project: Project) => void;
}) {
+ const t = useTranslations('projects');
+
if (isPending) {
return (
<div className="space-y-2 py-3">
@@ -38,9 +41,7 @@ export default function ManageProjectsList({
}
if (projects.length === 0) {
- return (
- <p className="py-6 text-sm text-muted-foreground">You are not a member of any project yet.</p>
- );
+ return <p className="py-6 text-sm text-muted-foreground">{t('empty')}</p>;
}
return (
@@ -53,11 +54,17 @@ export default function ManageProjectsList({
</colgroup>
<TableHeader>
<TableRow className="hover:bg-transparent">
- <TableHead className="text-xs font-medium text-muted-foreground">Project</TableHead>
- <TableHead className="text-xs font-medium text-muted-foreground">Role</TableHead>
- <TableHead className="text-xs font-medium text-muted-foreground">Permissions</TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.project')}
+ </TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.role')}
+ </TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.permissions')}
+ </TableHead>
<TableHead className="text-right text-xs font-medium text-muted-foreground">
- Actions
+ {t('columns.actions')}
</TableHead>
</TableRow>
</TableHeader>
@@ -78,11 +85,16 @@ export default function ManageProjectsList({
</div>
</TableCell>
<TableCell className="px-3 py-3 align-top">
- <span className="text-sm capitalize">{project.role ?? 'member'}</span>
+ <span className="text-sm">
+ {project.role === 'owner' ? t('roles.owner') : t('roles.member')}
+ </span>
</TableCell>
<TableCell className="px-3 py-3 align-top">
{project.permissions ? (
- <PermissionsPopover permissions={project.permissions} label="Your permissions" />
+ <PermissionsPopover
+ permissions={project.permissions}
+ label={t('yourPermissions')}
+ />
) : (
<span className="text-xs text-muted-foreground">—</span>
)}
@@ -91,20 +103,20 @@ export default function ManageProjectsList({
<div className="flex items-center justify-end gap-1">
<ManageProjectsRowAction
icon={Copy}
- label="Copy project"
+ label={t('copyAction')}
onClick={() => onCopy(project)}
/>
{project.role === 'owner' ? (
<ManageProjectsRowAction
icon={Trash2}
- label="Delete project"
+ label={t('deleteAction')}
destructive
onClick={() => onDelete(project)}
/>
) : (
<ManageProjectsRowAction
icon={LogOut}
- label="Leave project"
+ label={t('leaveAction')}
destructive
onClick={() => onLeave(project)}
/>
diff --git a/apps/web/src/features/settings/NotificationPreferencesPage.tsx b/apps/web/src/features/settings/NotificationPreferencesPage.tsx
index 8daca563..7dd35d36 100644
--- a/apps/web/src/features/settings/NotificationPreferencesPage.tsx
+++ b/apps/web/src/features/settings/NotificationPreferencesPage.tsx
@@ -9,6 +9,7 @@ import ListSkeleton from '@/components/common/skeleton/ListSkeleton';
import NotificationPreferences from './components/notifications/NotificationPreferences';
import { useNotificationPreferencesQuery } from './services/settings.service';
import { useNotificationPreferencesForm } from './hooks/useNotificationPreferencesForm';
+import { useTranslations } from 'next-intl';
// The member's own notification preferences (/project/:projectKey/notifications).
// A main-nav Configuration destination, open to any member: choose which issue events
@@ -21,10 +22,11 @@ export default function NotificationPreferencesPage() {
}
function Chrome({ actions, children }: { actions?: ReactNode; children: ReactNode }) {
+ const t = useTranslations('settings.notifications');
return (
<SectionPageView
- title="Notifications"
- description="Choose which issue events you get and where. Email goes to your account address; Telegram to the chat id you set below."
+ title={t('title')}
+ description={t('description')}
wide
widthClassName="min-w-[600px] max-w-[60%]"
actions={actions}
@@ -47,12 +49,13 @@ function PreferencesPage({ projectKey }: { projectKey: string }) {
}
function PreferencesLoaded({ projectKey, initial }: { projectKey: string; initial: Prefs }) {
+ const t = useTranslations('common');
const form = useNotificationPreferencesForm(projectKey, initial);
return (
<Chrome
actions={
<Button size="sm" onClick={() => void form.save()} disabled={!form.dirty || form.saving}>
- Save
+ {t('save')}
</Button>
}
>
diff --git a/apps/web/src/features/settings/SettingsActionsPage.tsx b/apps/web/src/features/settings/SettingsActionsPage.tsx
index d0ef19da..7fcbadac 100644
--- a/apps/web/src/features/settings/SettingsActionsPage.tsx
+++ b/apps/web/src/features/settings/SettingsActionsPage.tsx
@@ -1,8 +1,10 @@
'use client';
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import { useShell } from '@/context/shellContext';
import { settingsSection } from '@/utils/settingsSections';
+import { useSettingsSectionText } from '@/hooks/useSectionLabels';
import SectionPageView from '@/components/common/page/SectionPageView';
import RequirePermission from '@/components/common/permissions/RequirePermission';
import { SettingsResourceProvider } from './context/settingsPermission';
@@ -14,18 +16,20 @@ const section = settingsSection('actions');
// The Actions settings page (/project/:projectKey/settings/actions). The actions
// section also needs the project's custom fields for the condition editor.
export default function SettingsActionsPage() {
+ const t = useTranslations('settings.actions');
+ const sectionText = useSettingsSectionText()(section.slug);
const { project, customFields } = useShell();
const [addNew, setAddNew] = useState(false);
if (!project) return null;
return (
<SectionPageView
- title={section.label}
- description={section.description}
+ title={sectionText.label}
+ description={sectionText.description}
wide
actions={
<SettingsHeaderAddButton
resource={section.resource}
- label="New action"
+ label={t('new')}
onClick={() => setAddNew(true)}
/>
}
diff --git a/apps/web/src/features/settings/SettingsAgentSkillsPage.tsx b/apps/web/src/features/settings/SettingsAgentSkillsPage.tsx
index 6a641cbb..02de8b55 100644
--- a/apps/web/src/features/settings/SettingsAgentSkillsPage.tsx
+++ b/apps/web/src/features/settings/SettingsAgentSkillsPage.tsx
@@ -2,27 +2,31 @@
import { useShell } from '@/context/shellContext';
import { AGENT_SKILLS_SECTION } from '@/utils/settingsSections';
+import { useSettingsSectionText } from '@/hooks/useSectionLabels';
import SectionPageView from '@/components/common/page/SectionPageView';
import RequirePermission from '@/components/common/permissions/RequirePermission';
import { SettingsResourceProvider } from './context/settingsPermission';
import { SettingsCreateAction } from './components/crud/SettingsCreateAction';
import SettingsAgentSkills from './components/agent-skills/SettingsAgentSkills';
import { SkillCreateDialog } from './components/agent-skills/SkillCreateDialog';
+import { useTranslations } from 'next-intl';
const section = AGENT_SKILLS_SECTION;
// The agent skills page (/project/:projectKey/agent-skills): the project skill
// library given to internal agents.
export default function SettingsAgentSkillsPage() {
+ const t = useTranslations('settings.skills');
+ const sectionText = useSettingsSectionText()(section.slug);
const { project } = useShell();
if (!project) return null;
const projectKey = project.project.key;
return (
<SectionPageView
- title={section.label}
- description={section.description}
+ title={sectionText.label}
+ description={sectionText.description}
actions={
- <SettingsCreateAction resource={section.resource} label="New skill">
+ <SettingsCreateAction resource={section.resource} label={t('newSkill')}>
{({ open, close }) =>
open && <SkillCreateDialog projectKey={projectKey} onClose={close} />
}
diff --git a/apps/web/src/features/settings/SettingsAgentToolsPage.tsx b/apps/web/src/features/settings/SettingsAgentToolsPage.tsx
index 4b55e63d..21137696 100644
--- a/apps/web/src/features/settings/SettingsAgentToolsPage.tsx
+++ b/apps/web/src/features/settings/SettingsAgentToolsPage.tsx
@@ -2,6 +2,7 @@
import { useShell } from '@/context/shellContext';
import { AGENT_TOOLS_SECTION } from '@/utils/settingsSections';
+import { useSettingsSectionText } from '@/hooks/useSectionLabels';
import {
useIntegrationCatalogQuery,
useIntegrationOptionsQuery,
@@ -12,12 +13,15 @@ import { SettingsResourceProvider } from './context/settingsPermission';
import { SettingsCreateAction } from './components/crud/SettingsCreateAction';
import SettingsAgentTools from './components/agent-tools/SettingsAgentTools';
import { ToolConfigDialog } from './components/agent-tools/ToolConfigDialog';
+import { useTranslations } from 'next-intl';
const section = AGENT_TOOLS_SECTION;
// The custom tools page (/project/:projectKey/agent-tools): external integrations
// internal agents can call, configured once per project.
export default function SettingsAgentToolsPage() {
+ const t = useTranslations('settings.tools');
+ const sectionText = useSettingsSectionText()(section.slug);
const { project } = useShell();
const key = project?.project.key ?? null;
const catalog = useIntegrationCatalogQuery(key).data ?? [];
@@ -26,10 +30,10 @@ export default function SettingsAgentToolsPage() {
const projectKey = project.project.key;
return (
<SectionPageView
- title={section.label}
- description={section.description}
+ title={sectionText.label}
+ description={sectionText.description}
actions={
- <SettingsCreateAction resource={section.resource} label="Add tool">
+ <SettingsCreateAction resource={section.resource} label={t('add')}>
{({ open, close }) =>
open && (
<ToolConfigDialog
diff --git a/apps/web/src/features/settings/SettingsAiAgentsPage.tsx b/apps/web/src/features/settings/SettingsAiAgentsPage.tsx
index 0ed074c4..593147de 100644
--- a/apps/web/src/features/settings/SettingsAiAgentsPage.tsx
+++ b/apps/web/src/features/settings/SettingsAiAgentsPage.tsx
@@ -2,26 +2,30 @@
import { useShell } from '@/context/shellContext';
import { AI_AGENTS_SECTION } from '@/utils/settingsSections';
+import { useSettingsSectionText } from '@/hooks/useSectionLabels';
import SectionPageView from '@/components/common/page/SectionPageView';
import RequirePermission from '@/components/common/permissions/RequirePermission';
import { SettingsResourceProvider } from './context/settingsPermission';
import { SettingsCreateAction } from './components/crud/SettingsCreateAction';
import SettingsAiAgents from './components/ai-agents/SettingsAiAgents';
import { SettingsAiAgentSheet } from './components/ai-agents/SettingsAiAgentSheet';
+import { useTranslations } from 'next-intl';
const section = AI_AGENTS_SECTION;
// The AI agents page (/project/:projectKey/ai-agents), a top-level nav item.
export default function SettingsAiAgentsPage() {
+ const t = useTranslations('settings.agents');
+ const sectionText = useSettingsSectionText()(section.slug);
const { project } = useShell();
if (!project) return null;
const projectKey = project.project.key;
return (
<SectionPageView
- title={section.label}
- description={section.description}
+ title={sectionText.label}
+ description={sectionText.description}
actions={
- <SettingsCreateAction resource={section.resource} label="New agent">
+ <SettingsCreateAction resource={section.resource} label={t('newAgent')}>
{({ open, close }) => (
<SettingsAiAgentSheet
projectKey={projectKey}
diff --git a/apps/web/src/features/settings/SettingsConfigurationPage.tsx b/apps/web/src/features/settings/SettingsConfigurationPage.tsx
index 6942a768..a8d22337 100644
--- a/apps/web/src/features/settings/SettingsConfigurationPage.tsx
+++ b/apps/web/src/features/settings/SettingsConfigurationPage.tsx
@@ -1,9 +1,11 @@
'use client';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import type { ProjectDetail } from '@/lib/api';
import { useShell } from '@/context/shellContext';
import { settingsSection } from '@/utils/settingsSections';
+import { useSettingsSectionText } from '@/hooks/useSectionLabels';
import { usePermissions } from '@/hooks/usePermissions';
import { useProjectFeatures } from '@/hooks/useProjectFeatures';
import { Button } from '@/components/ui/button';
@@ -27,6 +29,9 @@ export default function SettingsConfigurationPage() {
}
function ConfigurationPage({ project }: { project: ProjectDetail }) {
+ const t = useTranslations('settings.configuration');
+ const tCommon = useTranslations('common');
+ const sectionText = useSettingsSectionText()(section.slug);
const { can } = usePermissions();
const features = useProjectFeatures();
const subtasks = useSubtaskAutomationForm(project.project.key);
@@ -37,19 +42,19 @@ function ConfigurationPage({ project }: { project: ProjectDetail }) {
async function save() {
await subtasks.save();
await archive.save();
- toast.success('Changes saved');
+ toast.success(t('saved'));
}
return (
<SectionPageView
- title={section.label}
- description={section.description}
+ title={sectionText.label}
+ description={sectionText.description}
wide
widthClassName="min-w-[600px] max-w-[60%]"
actions={
can(section.resource, 'edit') ? (
<Button size="sm" onClick={() => void save()} disabled={saving || !loaded}>
- Save
+ {tCommon('save')}
</Button>
) : undefined
}
diff --git a/apps/web/src/features/settings/SettingsCustomFieldsPage.tsx b/apps/web/src/features/settings/SettingsCustomFieldsPage.tsx
index d22d8686..bd41611f 100644
--- a/apps/web/src/features/settings/SettingsCustomFieldsPage.tsx
+++ b/apps/web/src/features/settings/SettingsCustomFieldsPage.tsx
@@ -2,6 +2,7 @@
import { useShell } from '@/context/shellContext';
import { settingsSection } from '@/utils/settingsSections';
+import { useSettingsSectionText } from '@/hooks/useSectionLabels';
import SectionPageView from '@/components/common/page/SectionPageView';
import RequirePermission from '@/components/common/permissions/RequirePermission';
import { SettingsResourceProvider } from './context/settingsPermission';
@@ -12,12 +13,13 @@ const section = settingsSection('custom-fields');
// The Custom fields settings page (/project/:projectKey/settings/custom-fields).
export default function SettingsCustomFieldsPage() {
+ const sectionText = useSettingsSectionText()(section.slug);
const { project } = useShell();
if (!project) return null;
return (
<SectionPageView
- title={section.label}
- description={section.description}
+ title={sectionText.label}
+ description={sectionText.description}
wide
widthClassName="min-w-[600px] max-w-[60%]"
actions={
diff --git a/apps/web/src/features/settings/SettingsGeneralPage.tsx b/apps/web/src/features/settings/SettingsGeneralPage.tsx
index 64ef579d..72f501a2 100644
--- a/apps/web/src/features/settings/SettingsGeneralPage.tsx
+++ b/apps/web/src/features/settings/SettingsGeneralPage.tsx
@@ -1,8 +1,10 @@
'use client';
+import { useTranslations } from 'next-intl';
import type { ProjectDetail } from '@/lib/api';
import { useShell } from '@/context/shellContext';
import { settingsSection } from '@/utils/settingsSections';
+import { useSettingsSectionText } from '@/hooks/useSectionLabels';
import { Button } from '@/components/ui/button';
import SectionPageView from '@/components/common/page/SectionPageView';
import RequirePermission from '@/components/common/permissions/RequirePermission';
@@ -24,18 +26,20 @@ export default function SettingsGeneralPage() {
}
function GeneralPage({ project }: { project: ProjectDetail }) {
+ const t = useTranslations('common');
+ const sectionText = useSettingsSectionText()(section.slug);
const form = useGeneralForm(project);
const features = useFeatureToggles(project);
return (
<SectionPageView
- title={section.label}
- description={section.description}
+ title={sectionText.label}
+ description={sectionText.description}
wide
widthClassName="min-w-[600px] max-w-[60%]"
actions={
form.editable ? (
<Button size="sm" onClick={() => void form.save()} disabled={!form.canSave}>
- Save
+ {t('save')}
</Button>
) : undefined
}
diff --git a/apps/web/src/features/settings/SettingsGithubPage.tsx b/apps/web/src/features/settings/SettingsGithubPage.tsx
index 97880b58..d51a00b9 100644
--- a/apps/web/src/features/settings/SettingsGithubPage.tsx
+++ b/apps/web/src/features/settings/SettingsGithubPage.tsx
@@ -2,6 +2,7 @@
import { useShell } from '@/context/shellContext';
import { settingsSection } from '@/utils/settingsSections';
+import { useSettingsSectionText } from '@/hooks/useSectionLabels';
import SectionPageView from '@/components/common/page/SectionPageView';
import RequirePermission from '@/components/common/permissions/RequirePermission';
import { SettingsResourceProvider } from './context/settingsPermission';
@@ -11,12 +12,13 @@ const section = settingsSection('github');
// The GitHub settings page (/project/:projectKey/settings/github).
export default function SettingsGithubPage() {
+ const sectionText = useSettingsSectionText()(section.slug);
const { project } = useShell();
if (!project) return null;
return (
<SectionPageView
- title={section.label}
- description={section.description}
+ title={sectionText.label}
+ description={sectionText.description}
wide
widthClassName="min-w-[600px] max-w-[60%]"
>
diff --git a/apps/web/src/features/settings/SettingsIntegrationsPage.tsx b/apps/web/src/features/settings/SettingsIntegrationsPage.tsx
index c3bdf13f..ee3e377c 100644
--- a/apps/web/src/features/settings/SettingsIntegrationsPage.tsx
+++ b/apps/web/src/features/settings/SettingsIntegrationsPage.tsx
@@ -2,6 +2,7 @@
import { useShell } from '@/context/shellContext';
import { INTEGRATIONS_SECTION } from '@/utils/settingsSections';
+import { useSettingsSectionText } from '@/hooks/useSectionLabels';
import { useIntegrationCatalogQuery } from '@/services/integrations.service';
import SectionPageView from '@/components/common/page/SectionPageView';
import RequirePermission from '@/components/common/permissions/RequirePermission';
@@ -9,22 +10,25 @@ import { SettingsResourceProvider } from './context/settingsPermission';
import { SettingsCreateAction } from './components/crud/SettingsCreateAction';
import SettingsIntegrations from './components/integrations/SettingsIntegrations';
import { CredentialDialog } from './components/integrations/CredentialDialog';
+import { useTranslations } from 'next-intl';
const section = INTEGRATIONS_SECTION;
// The integrations page (/project/:projectKey/integrations): stored credentials for
// AI providers and tool integrations.
export default function SettingsIntegrationsPage() {
+ const t = useTranslations('settings.integrations');
+ const sectionText = useSettingsSectionText()(section.slug);
const { project } = useShell();
const catalog = useIntegrationCatalogQuery(project?.project.key ?? null).data ?? [];
if (!project) return null;
const projectKey = project.project.key;
return (
<SectionPageView
- title={section.label}
- description={section.description}
+ title={sectionText.label}
+ description={sectionText.description}
actions={
- <SettingsCreateAction resource={section.resource} label="Add credential">
+ <SettingsCreateAction resource={section.resource} label={t('add')}>
{({ open, close }) =>
open && (
<CredentialDialog
diff --git a/apps/web/src/features/settings/SettingsIssueTypesPage.tsx b/apps/web/src/features/settings/SettingsIssueTypesPage.tsx
index 07d3c2e2..711c6970 100644
--- a/apps/web/src/features/settings/SettingsIssueTypesPage.tsx
+++ b/apps/web/src/features/settings/SettingsIssueTypesPage.tsx
@@ -3,6 +3,7 @@
import { useState } from 'react';
import { useShell } from '@/context/shellContext';
import { settingsSection } from '@/utils/settingsSections';
+import { useSettingsSectionText } from '@/hooks/useSectionLabels';
import SectionPageView from '@/components/common/page/SectionPageView';
import RequirePermission from '@/components/common/permissions/RequirePermission';
import { SettingsResourceProvider } from './context/settingsPermission';
@@ -13,14 +14,15 @@ const section = settingsSection('issue-types');
// The Issue types settings page (/project/:projectKey/settings/issue-types).
export default function SettingsIssueTypesPage() {
+ const sectionText = useSettingsSectionText()(section.slug);
const { project } = useShell();
// The add form is inline in the list; the header button opens it via this flag.
const [adding, setAdding] = useState(false);
if (!project) return null;
return (
<SectionPageView
- title={section.label}
- description={section.description}
+ title={sectionText.label}
+ description={sectionText.description}
actions={
<IssueTypesToolbar
projectKey={project.project.key}
diff --git a/apps/web/src/features/settings/SettingsLabelsPage.tsx b/apps/web/src/features/settings/SettingsLabelsPage.tsx
index 44b0aa8b..ae518932 100644
--- a/apps/web/src/features/settings/SettingsLabelsPage.tsx
+++ b/apps/web/src/features/settings/SettingsLabelsPage.tsx
@@ -2,6 +2,7 @@
import { useShell } from '@/context/shellContext';
import { settingsSection } from '@/utils/settingsSections';
+import { useSettingsSectionText } from '@/hooks/useSectionLabels';
import SectionPageView from '@/components/common/page/SectionPageView';
import RequirePermission from '@/components/common/permissions/RequirePermission';
import { SettingsResourceProvider } from './context/settingsPermission';
@@ -12,12 +13,13 @@ const section = settingsSection('labels');
// The Labels settings page (/project/:projectKey/settings/labels).
export default function SettingsLabelsPage() {
+ const sectionText = useSettingsSectionText()(section.slug);
const { project } = useShell();
if (!project) return null;
return (
<SectionPageView
- title={section.label}
- description={section.description}
+ title={sectionText.label}
+ description={sectionText.description}
wide
widthClassName="min-w-[600px] max-w-[60%]"
actions={
diff --git a/apps/web/src/features/settings/SettingsNotificationsPage.tsx b/apps/web/src/features/settings/SettingsNotificationsPage.tsx
index 45d72871..4343ef52 100644
--- a/apps/web/src/features/settings/SettingsNotificationsPage.tsx
+++ b/apps/web/src/features/settings/SettingsNotificationsPage.tsx
@@ -1,9 +1,11 @@
'use client';
import { useState, type ReactNode } from 'react';
+import { useTranslations } from 'next-intl';
import type { NotificationSettings, ProjectDetail } from '@/lib/api';
import { useShell } from '@/context/shellContext';
import { settingsSection } from '@/utils/settingsSections';
+import { useSettingsSectionText } from '@/hooks/useSectionLabels';
import { usePermissions } from '@/hooks/usePermissions';
import { Button } from '@/components/ui/button';
import SectionPageView from '@/components/common/page/SectionPageView';
@@ -31,10 +33,11 @@ export default function SettingsNotificationsPage() {
}
function Chrome({ actions, children }: { actions?: ReactNode; children: ReactNode }) {
+ const sectionText = useSettingsSectionText()(section.slug);
return (
<SectionPageView
- title={section.label}
- description={section.description}
+ title={sectionText.label}
+ description={sectionText.description}
wide
widthClassName="min-w-[600px] max-w-[60%]"
actions={actions}
@@ -67,6 +70,7 @@ function NotificationsLoaded({
projectKey: string;
settings: NotificationSettings;
}) {
+ const t = useTranslations('common');
const { can } = usePermissions();
const editable = can(section.resource, 'edit');
const [tab, setTab] = useState<NotificationTab>('email');
@@ -83,7 +87,7 @@ function NotificationsLoaded({
onClick={() => void active.save()}
disabled={!active.dirty || active.saving}
>
- Save
+ {t('save')}
</Button>
) : undefined
}
diff --git a/apps/web/src/features/settings/SettingsSchedulesPage.tsx b/apps/web/src/features/settings/SettingsSchedulesPage.tsx
index 095b241c..18f0a28d 100644
--- a/apps/web/src/features/settings/SettingsSchedulesPage.tsx
+++ b/apps/web/src/features/settings/SettingsSchedulesPage.tsx
@@ -3,26 +3,30 @@
import { useState } from 'react';
import { useShell } from '@/context/shellContext';
import { settingsSection } from '@/utils/settingsSections';
+import { useSettingsSectionText } from '@/hooks/useSectionLabels';
import SectionPageView from '@/components/common/page/SectionPageView';
import RequirePermission from '@/components/common/permissions/RequirePermission';
import { SettingsResourceProvider } from './context/settingsPermission';
import { useInternalAgents } from './hooks/useInternalAgents';
import { SettingsHeaderAddButton } from './components/crud/SettingsHeaderAddButton';
import SettingsSchedules from './components/schedules/SettingsSchedules';
+import { useTranslations } from 'next-intl';
const section = settingsSection('schedules');
// The Schedules page (/project/:projectKey/ai-team/schedules), listed in the main
// sidebar's AI Team group.
export default function SettingsSchedulesPage() {
+ const t = useTranslations('settings.schedules');
+ const sectionText = useSettingsSectionText()(section.slug);
const { project } = useShell();
const [addNew, setAddNew] = useState(false);
const { agents } = useInternalAgents(project?.project.key ?? null);
if (!project) return null;
return (
<SectionPageView
- title={section.label}
- description={section.description}
+ title={sectionText.label}
+ description={sectionText.description}
wide
actions={
// Without an internal agent there is nothing to schedule, so the add action
@@ -30,7 +34,7 @@ export default function SettingsSchedulesPage() {
agents.length > 0 ? (
<SettingsHeaderAddButton
resource={section.resource}
- label="New schedule"
+ label={t('newTitle')}
onClick={() => setAddNew(true)}
/>
) : null
diff --git a/apps/web/src/features/settings/SettingsStatesPage.tsx b/apps/web/src/features/settings/SettingsStatesPage.tsx
index f97148f4..4dca84b0 100644
--- a/apps/web/src/features/settings/SettingsStatesPage.tsx
+++ b/apps/web/src/features/settings/SettingsStatesPage.tsx
@@ -2,6 +2,7 @@
import { useShell } from '@/context/shellContext';
import { settingsSection } from '@/utils/settingsSections';
+import { useSettingsSectionText } from '@/hooks/useSectionLabels';
import SectionPageView from '@/components/common/page/SectionPageView';
import RequirePermission from '@/components/common/permissions/RequirePermission';
import { SettingsResourceProvider } from './context/settingsPermission';
@@ -12,12 +13,13 @@ const section = settingsSection('states');
// The States settings page (/project/:projectKey/settings/states).
export default function SettingsStatesPage() {
+ const sectionText = useSettingsSectionText()(section.slug);
const { project } = useShell();
if (!project) return null;
return (
<SectionPageView
- title={section.label}
- description={section.description}
+ title={sectionText.label}
+ description={sectionText.description}
wide
widthClassName="min-w-[600px] max-w-[60%]"
actions={<StatesToolbar projectKey={project.project.key} columns={project.columns} />}
diff --git a/apps/web/src/features/settings/SettingsWebhooksPage.tsx b/apps/web/src/features/settings/SettingsWebhooksPage.tsx
index f373186a..dc0222e7 100644
--- a/apps/web/src/features/settings/SettingsWebhooksPage.tsx
+++ b/apps/web/src/features/settings/SettingsWebhooksPage.tsx
@@ -1,8 +1,10 @@
'use client';
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import { useShell } from '@/context/shellContext';
import { settingsSection } from '@/utils/settingsSections';
+import { useSettingsSectionText } from '@/hooks/useSectionLabels';
import SectionPageView from '@/components/common/page/SectionPageView';
import RequirePermission from '@/components/common/permissions/RequirePermission';
import { SettingsResourceProvider } from './context/settingsPermission';
@@ -13,18 +15,20 @@ const section = settingsSection('webhooks');
// The Webhooks settings page (/project/:projectKey/settings/webhooks).
export default function SettingsWebhooksPage() {
+ const t = useTranslations('settings.webhooks');
+ const sectionText = useSettingsSectionText()(section.slug);
const { project } = useShell();
const [addNew, setAddNew] = useState(false);
if (!project) return null;
return (
<SectionPageView
- title={section.label}
- description={section.description}
+ title={sectionText.label}
+ description={sectionText.description}
wide
actions={
<SettingsHeaderAddButton
resource={section.resource}
- label="New webhook"
+ label={t('new')}
onClick={() => setAddNew(true)}
/>
}
diff --git a/apps/web/src/features/settings/components/actions/SettingsActionDialog.tsx b/apps/web/src/features/settings/components/actions/SettingsActionDialog.tsx
index c4df6814..9148acca 100644
--- a/apps/web/src/features/settings/components/actions/SettingsActionDialog.tsx
+++ b/apps/web/src/features/settings/components/actions/SettingsActionDialog.tsx
@@ -1,4 +1,5 @@
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import type { ActionEffect, ProjectDetail, CustomField } from '@/lib/api';
import { isActiveFilterSet, type FilterSet } from '@/utils/filters';
import { isEmptyEffect } from '@/utils/actions';
@@ -43,6 +44,8 @@ export function SettingsActionDialog({
}) => void;
onClose: () => void;
}) {
+ const t = useTranslations('settings.actions');
+ const tCommon = useTranslations('common');
const [name, setName] = useState(initialName);
const [icon, setIcon] = useState(initialIcon);
const [condition, setCondition] = useState<FilterSet>(initialCondition);
@@ -55,13 +58,13 @@ export function SettingsActionDialog({
onSave({ name: name.trim(), icon, condition, effect });
}
- const actionLabel = mode === 'edit' ? 'Save action' : 'Create action';
- const pendingLabel = mode === 'edit' ? 'Saving…' : 'Creating…';
+ const actionLabel = mode === 'edit' ? t('save') : t('create');
+ const pendingLabel = mode === 'edit' ? tCommon('saving') : t('creating');
return (
<Modal
- title={mode === 'edit' ? 'Edit action' : 'New action'}
- description="Pick an icon, name the action, and set which issues it applies to and what it changes."
+ title={t(mode === 'edit' ? 'dialogEdit' : 'dialogNew')}
+ description={t('dialogHint')}
projectKey={projectKey}
onClose={onClose}
wide
@@ -74,7 +77,7 @@ export function SettingsActionDialog({
}}
>
<div className="space-y-1.5">
- <Label htmlFor="action-name">Name</Label>
+ <Label htmlFor="action-name">{tCommon('name')}</Label>
<div className="flex gap-2">
<SettingsActionIconPicker value={icon} onChange={setIcon} />
<Input
@@ -83,14 +86,14 @@ export function SettingsActionDialog({
required
value={name}
onChange={(e) => setName(e.target.value)}
- placeholder="Action name (e.g. Approve)"
+ placeholder={t('namePlaceholder')}
className="h-9"
/>
</div>
</div>
<div className="space-y-1.5">
- <Label>Available when</Label>
+ <Label>{t('availableWhen')}</Label>
<FilterBar
filters={condition}
onChange={setCondition}
@@ -98,18 +101,18 @@ export function SettingsActionDialog({
customFields={customFields}
/>
{!isActiveFilterSet(condition) && (
- <p className="text-sm text-muted-foreground">No conditions. Always available.</p>
+ <p className="text-sm text-muted-foreground">{t('noConditions')}</p>
)}
</div>
<div className="space-y-2.5">
- <Label>Then set</Label>
+ <Label>{t('thenSet')}</Label>
<SettingsEffectEditor effect={effect} project={project} onChange={setEffect} />
</div>
<div className="flex justify-end gap-2 border-t border-border/50 pt-4">
<Button type="button" variant="ghost" onClick={onClose} disabled={saving}>
- Cancel
+ {tCommon('cancel')}
</Button>
<Button type="submit" disabled={!isValid || saving}>
{saving ? pendingLabel : actionLabel}
diff --git a/apps/web/src/features/settings/components/actions/SettingsActionIconPicker.tsx b/apps/web/src/features/settings/components/actions/SettingsActionIconPicker.tsx
index f93fb202..1c50b958 100644
--- a/apps/web/src/features/settings/components/actions/SettingsActionIconPicker.tsx
+++ b/apps/web/src/features/settings/components/actions/SettingsActionIconPicker.tsx
@@ -1,4 +1,5 @@
import { useMemo, useState } from 'react';
+import { useTranslations } from 'next-intl';
import { ACTION_ICON_KEYS, ACTION_ICONS, actionIcon } from '@/utils/actionIcons';
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
@@ -12,6 +13,7 @@ export function SettingsActionIconPicker({
value: string;
onChange: (key: string) => void;
}) {
+ const t = useTranslations('settings.actions');
const [open, setOpen] = useState(false);
const [query, setQuery] = useState('');
const Current = actionIcon(value);
@@ -35,7 +37,7 @@ export function SettingsActionIconPicker({
variant="ghost"
size="icon"
className="size-9 shrink-0 text-muted-foreground hover:text-foreground"
- aria-label="Action icon"
+ aria-label={t('icon')}
>
<Current className="size-4" />
</Button>
@@ -45,7 +47,7 @@ export function SettingsActionIconPicker({
autoFocus
value={query}
onChange={(e) => setQuery(e.target.value)}
- placeholder="Search icons"
+ placeholder={t('searchIcons')}
className="mb-2 h-8"
/>
<div className="grid max-h-56 grid-cols-8 gap-1 overflow-y-auto">
@@ -73,7 +75,7 @@ export function SettingsActionIconPicker({
})}
{keys.length === 0 && (
<p className="col-span-8 py-4 text-center text-xs text-muted-foreground">
- No icons found
+ {t('noIcons')}
</p>
)}
</div>
diff --git a/apps/web/src/features/settings/components/actions/SettingsActionRow.tsx b/apps/web/src/features/settings/components/actions/SettingsActionRow.tsx
index ddeb0695..68eff823 100644
--- a/apps/web/src/features/settings/components/actions/SettingsActionRow.tsx
+++ b/apps/web/src/features/settings/components/actions/SettingsActionRow.tsx
@@ -1,6 +1,8 @@
import { Copy, Pencil, Trash2 } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { ActionDef, CustomField, ProjectDetail } from '@/lib/api';
-import { describeConditions } from '@/utils/filterFields';
+import { useFilterFields } from '@/hooks/useFilterFields';
+import { useEffectText } from '@/hooks/useEffectText';
import { describeEffect } from '@/utils/actions';
import { actionIcon } from '@/utils/actionIcons';
import { Badge } from '@/components/ui/badge';
@@ -23,9 +25,12 @@ export function SettingsActionRow({
onDuplicate: () => void;
onDelete: () => void;
}) {
+ const t = useTranslations('settings.actions');
const can = useSettingsCan();
+ const { describeConditions } = useFilterFields();
+ const effectText = useEffectText();
const conditions = describeConditions(action.condition, project, customFields);
- const effects = describeEffect(action.effect, project);
+ const effects = describeEffect(action.effect, project, effectText);
const Icon = actionIcon(action.icon);
return (
<TableRow className="group/item">
@@ -38,7 +43,7 @@ export function SettingsActionRow({
<span className="truncate text-sm font-medium">{action.name}</span>
{conditions.length > 0 ? (
<div className="flex flex-wrap items-center gap-1">
- <span className="text-xs text-muted-foreground">When</span>
+ <span className="text-xs text-muted-foreground">{t('when')}</span>
{conditions.map((text, i) => (
<Badge key={i} variant="secondary" className="font-normal">
{text}
@@ -46,7 +51,7 @@ export function SettingsActionRow({
))}
</div>
) : (
- <span className="text-xs text-muted-foreground">Always available</span>
+ <span className="text-xs text-muted-foreground">{t('alwaysAvailable')}</span>
)}
</div>
</div>
@@ -61,23 +66,23 @@ export function SettingsActionRow({
))}
</div>
) : (
- <span className="text-xs text-muted-foreground">No changes</span>
+ <span className="text-xs text-muted-foreground">{t('noChanges')}</span>
)}
</TableCell>
<TableCell className="px-3 py-2 pt-3 align-top">
<div className="flex items-center justify-end gap-1">
{can('edit') && (
- <SettingsIconButton title="Edit action" onClick={onEdit}>
+ <SettingsIconButton title={t('edit')} onClick={onEdit}>
<Pencil className="size-4" />
</SettingsIconButton>
)}
{can('create') && (
- <SettingsIconButton title="Duplicate action" onClick={onDuplicate}>
+ <SettingsIconButton title={t('duplicate')} onClick={onDuplicate}>
<Copy className="size-4" />
</SettingsIconButton>
)}
{can('delete') && (
- <SettingsIconButton title="Delete action" destructive onClick={onDelete}>
+ <SettingsIconButton title={t('delete')} destructive onClick={onDelete}>
<Trash2 className="size-4" />
</SettingsIconButton>
)}
diff --git a/apps/web/src/features/settings/components/actions/SettingsActions.tsx b/apps/web/src/features/settings/components/actions/SettingsActions.tsx
index c5476176..4e29c62a 100644
--- a/apps/web/src/features/settings/components/actions/SettingsActions.tsx
+++ b/apps/web/src/features/settings/components/actions/SettingsActions.tsx
@@ -1,4 +1,5 @@
import { useEffect, useState } from 'react';
+import { useTranslations } from 'next-intl';
import type { ActionDef, ActionEffect, ProjectDetail, CustomField } from '@/lib/api';
import {
useActionsQuery,
@@ -30,6 +31,7 @@ export default function SettingsActions({
requestNew: boolean;
onNewHandled: () => void;
}) {
+ const t = useTranslations('settings.actions');
const projectKey = project.project.key;
const actionsQuery = useActionsQuery(projectKey);
const actions = actionsQuery.data ?? [];
@@ -52,7 +54,7 @@ export default function SettingsActions({
function startDuplicate(action: ActionDef) {
setNewSeed({
- name: `${action.name} copy`,
+ name: t('copySuffix', { name: action.name }),
icon: action.icon,
condition: action.condition,
effect: action.effect,
@@ -79,10 +81,7 @@ export default function SettingsActions({
{actionsQuery.isPending ? (
<ListSkeleton rows={3} rowClassName="h-12" />
) : actions.length === 0 ? (
- <EmptyState
- title="No actions yet"
- description="Pick which issues an action shows on, then what it sets."
- />
+ <EmptyState title={t('emptyTitle')} description={t('emptyHint')} />
) : (
<div className="space-y-4">
<SettingsActionsTable
@@ -115,9 +114,9 @@ export default function SettingsActions({
{deleting && (
<SettingsConfirmDeleteDialog
- title={`Delete action "${deleting.name}"`}
- confirmLabel="Delete action"
- message="This action will be removed from every issue. This cannot be undone."
+ title={t('deleteTitle', { name: deleting.name })}
+ confirmLabel={t('delete')}
+ message={t('deleteMessage')}
onClose={() => setDeleting(null)}
onConfirm={async () => {
await deleteAction.mutateAsync(deleting.id);
diff --git a/apps/web/src/features/settings/components/actions/SettingsActionsTable.tsx b/apps/web/src/features/settings/components/actions/SettingsActionsTable.tsx
index a54bccc4..7072fe74 100644
--- a/apps/web/src/features/settings/components/actions/SettingsActionsTable.tsx
+++ b/apps/web/src/features/settings/components/actions/SettingsActionsTable.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import type { ActionDef, CustomField, ProjectDetail } from '@/lib/api';
import { Table, TableBody, TableHead, TableHeader, TableRow } from '@/components/ui/table';
import { SettingsActionRow } from './SettingsActionRow';
@@ -19,6 +20,9 @@ export function SettingsActionsTable({
onDuplicate,
onDelete,
}: SettingsActionsTableProps) {
+ const t = useTranslations('settings.actions');
+ const tCommon = useTranslations('common');
+
return (
<Table className="min-w-[680px] table-fixed">
<colgroup>
@@ -28,10 +32,14 @@ export function SettingsActionsTable({
</colgroup>
<TableHeader>
<TableRow className="hover:bg-transparent">
- <TableHead className="text-xs font-medium text-muted-foreground">Action</TableHead>
- <TableHead className="text-xs font-medium text-muted-foreground">Then set</TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.action')}
+ </TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.thenSet')}
+ </TableHead>
<TableHead className="text-right text-xs font-medium text-muted-foreground">
- Actions
+ {tCommon('actions')}
</TableHead>
</TableRow>
</TableHeader>
diff --git a/apps/web/src/features/settings/components/actions/SettingsEffectEditor.tsx b/apps/web/src/features/settings/components/actions/SettingsEffectEditor.tsx
index 4f35b0c2..44e9ad71 100644
--- a/apps/web/src/features/settings/components/actions/SettingsEffectEditor.tsx
+++ b/apps/web/src/features/settings/components/actions/SettingsEffectEditor.tsx
@@ -1,12 +1,9 @@
import { Fragment, useState } from 'react';
import { Plus, X } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { ActionEffect, ProjectDetail } from '@/lib/api';
-import {
- EFFECT_FIELD_KEYS,
- EFFECT_FIELD_LABELS,
- effectFieldKeys,
- type EffectFieldKey,
-} from '@/utils/actions';
+import { EFFECT_FIELD_KEYS, effectFieldKeys, type EffectFieldKey } from '@/utils/actions';
+import { useEffectText } from '@/hooks/useEffectText';
import AssigneeSelect from '@/components/common/fields/AssigneeSelect';
import DatePill from '@/components/common/fields/DatePill';
import LabelsSelect from '@/components/common/fields/LabelsSelect';
@@ -45,6 +42,7 @@ function EffectValue({
project: ProjectDetail;
onChange: (v: ActionEffect[EffectFieldKey]) => void;
}) {
+ const t = useTranslations('settings.actions');
switch (fieldKey) {
case 'columnId':
return (
@@ -74,10 +72,12 @@ function EffectValue({
);
case 'startDate':
return (
- <DatePill value={effect.startDate ?? null} placeholder="Set date" onChange={onChange} />
+ <DatePill value={effect.startDate ?? null} placeholder={t('setDate')} onChange={onChange} />
);
case 'dueDate':
- return <DatePill value={effect.dueDate ?? null} placeholder="Set date" onChange={onChange} />;
+ return (
+ <DatePill value={effect.dueDate ?? null} placeholder={t('setDate')} onChange={onChange} />
+ );
case 'labelIds': {
const ids = effect.labelIds ?? [];
const toggle = (id: number) =>
@@ -103,6 +103,8 @@ export function SettingsEffectEditor({
project: ProjectDetail;
onChange: (e: ActionEffect) => void;
}) {
+ const t = useTranslations('settings.actions');
+ const effectText = useEffectText();
const [addOpen, setAddOpen] = useState(false);
const setKeys = effectFieldKeys(effect);
const available = EFFECT_FIELD_KEYS.filter((k) => !(k in effect));
@@ -125,7 +127,7 @@ export function SettingsEffectEditor({
<div className="grid grid-cols-[110px_1fr] items-center gap-x-3 gap-y-2.5">
{setKeys.map((key) => (
<Fragment key={key}>
- <div className="text-sm text-muted-foreground">{EFFECT_FIELD_LABELS[key]}</div>
+ <div className="text-sm text-muted-foreground">{effectText.field(key)}</div>
<div className="flex items-center gap-1.5">
<EffectValue
effect={effect}
@@ -136,7 +138,7 @@ export function SettingsEffectEditor({
<button
type="button"
onClick={() => removeKey(key)}
- title="Remove field"
+ title={t('removeField')}
className="rounded p-1 text-muted-foreground hover:bg-accent hover:text-foreground"
>
<X className="size-4" />
@@ -155,7 +157,7 @@ export function SettingsEffectEditor({
className={`h-8 gap-1.5 px-2 text-muted-foreground hover:text-foreground ${setKeys.length > 0 ? 'mt-2' : ''}`}
>
<Plus className="size-4" />
- Add field
+ {t('addField')}
</Button>
</PopoverTrigger>
<PopoverContent align="start" className="w-44 p-1">
@@ -166,7 +168,7 @@ export function SettingsEffectEditor({
onClick={() => addKey(key)}
className="w-full truncate rounded px-2 py-1.5 text-left text-sm hover:bg-accent"
>
- {EFFECT_FIELD_LABELS[key]}
+ {effectText.field(key)}
</button>
))}
</PopoverContent>
diff --git a/apps/web/src/features/settings/components/agent-skills/SettingsAgentSkills.tsx b/apps/web/src/features/settings/components/agent-skills/SettingsAgentSkills.tsx
index 2fb221b8..59f592be 100644
--- a/apps/web/src/features/settings/components/agent-skills/SettingsAgentSkills.tsx
+++ b/apps/web/src/features/settings/components/agent-skills/SettingsAgentSkills.tsx
@@ -8,12 +8,15 @@ import SettingsConfirmDeleteDialog from '../crud/SettingsConfirmDeleteDialog';
import { useSettingsCan } from '../../context/settingsPermission';
import { SkillEditDialog } from './SkillEditDialog';
import { SkillRow } from './SkillRow';
+import { useTranslations } from 'next-intl';
// Project settings for the agent skill library: reusable instructions given to
// internal agents. A skill is a SKILL.md plus optional reference files; it can be
// written inline, uploaded, or imported from GitHub. Creating opens a dialog;
// editing opens a separate dialog that also manages reference files.
export default function SettingsAgentSkills({ project }: { project: ProjectDetail }) {
+ const t = useTranslations('settings.skills');
+ const tCommon = useTranslations('common');
const projectKey = project.project.key;
const skillsQuery = useSkillsQuery(projectKey);
const skills = skillsQuery.data ?? [];
@@ -28,10 +31,7 @@ export default function SettingsAgentSkills({ project }: { project: ProjectDetai
{skillsQuery.isPending ? (
<ListSkeleton rows={3} rowClassName="h-12" />
) : skills.length === 0 ? (
- <EmptyState
- title="No skills yet"
- description="Write markdown, upload a file, or import from GitHub."
- />
+ <EmptyState title={t('empty')} description={t('emptyHint')} />
) : (
<div className="space-y-4">
<Table className="min-w-[820px] table-fixed">
@@ -42,12 +42,14 @@ export default function SettingsAgentSkills({ project }: { project: ProjectDetai
</colgroup>
<TableHeader>
<TableRow className="hover:bg-transparent">
- <TableHead className="text-xs font-medium text-muted-foreground">Skill</TableHead>
<TableHead className="text-xs font-medium text-muted-foreground">
- Description
+ {t('skill')}
+ </TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('description')}
</TableHead>
<TableHead className="text-right text-xs font-medium text-muted-foreground">
- Actions
+ {tCommon('actions')}
</TableHead>
</TableRow>
</TableHeader>
@@ -78,8 +80,8 @@ export default function SettingsAgentSkills({ project }: { project: ProjectDetai
{deleting && (
<SettingsConfirmDeleteDialog
- title="Delete skill"
- confirmLabel="Delete skill"
+ title={t('delete')}
+ confirmLabel={t('delete')}
message={
<>
Delete the skill “{deleting.name}”? It will be removed from every agent that uses it.
diff --git a/apps/web/src/features/settings/components/agent-skills/SkillCreateDialog.tsx b/apps/web/src/features/settings/components/agent-skills/SkillCreateDialog.tsx
index aeebbded..5ff52eea 100644
--- a/apps/web/src/features/settings/components/agent-skills/SkillCreateDialog.tsx
+++ b/apps/web/src/features/settings/components/agent-skills/SkillCreateDialog.tsx
@@ -9,6 +9,7 @@ import { Textarea } from '@/components/ui/textarea';
import { Checkbox } from '@/components/ui/checkbox';
import { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/ui/tabs';
import { useCreateSkill, useDiscoverGithubSkills } from '@/services/agentSkills.service';
+import { useTranslations } from 'next-intl';
type Source = 'inline' | 'upload' | 'github';
@@ -39,6 +40,8 @@ export function SkillCreateDialog({
projectKey: string;
onClose: () => void;
}) {
+ const t = useTranslations('settings.skills');
+ const tCommon = useTranslations('common');
const [source, setSource] = useState<Source>('inline');
const [markdown, setMarkdown] = useState('');
const [sourceUrl, setSourceUrl] = useState('');
@@ -150,19 +153,19 @@ export function SkillCreateDialog({
const nameAndCreate = (
<>
<div className="space-y-1.5">
- <Label>Name (optional)</Label>
+ <Label>{t('name')}</Label>
<Input
value={name}
onChange={(e) => setName(e.target.value)}
- placeholder="Defaults to the SKILL.md frontmatter name"
+ placeholder={t('namePlaceholder')}
/>
</div>
<div className="flex justify-end gap-2">
<Button variant="outline" onClick={onClose} disabled={busy}>
- Cancel
+ {tCommon('cancel')}
</Button>
<Button onClick={submitInline} disabled={busy || markdown.trim() === ''}>
- Create skill
+ {t('create')}
</Button>
</div>
</>
@@ -171,26 +174,18 @@ export function SkillCreateDialog({
// The GitHub selection step replaces the rest of the form once skills are found.
if (source === 'github' && candidates) {
return (
- <Modal title="Import skills from GitHub" projectKey={projectKey} onClose={onClose} wide>
+ <Modal title={t('importTitle')} projectKey={projectKey} onClose={onClose} wide>
<div className="space-y-4">
<div className="flex items-center justify-between gap-4">
<p className="text-sm text-muted-foreground">
- {query.trim() ? (
- <>
- {filteredCandidates.length} of {candidates.length} skill
- {candidates.length === 1 ? '' : 's'} match
- </>
- ) : (
- <>
- Found {candidates.length} skill{candidates.length === 1 ? '' : 's'}. Pick which to
- import.
- </>
- )}
+ {query.trim()
+ ? t('matchCount', { shown: filteredCandidates.length, total: candidates.length })
+ : t('foundCount', { count: candidates.length })}
</p>
{filteredCandidates.length > 1 && (
<label className="flex shrink-0 cursor-pointer items-center gap-2 text-sm">
<Checkbox checked={allFilteredSelected} onCheckedChange={toggleAllFiltered} />
- Select all
+ {t('selectAll')}
</label>
)}
</div>
@@ -201,7 +196,7 @@ export function SkillCreateDialog({
<Input
value={query}
onChange={(e) => setQuery(e.target.value)}
- placeholder="Search by name or description"
+ placeholder={t('searchPlaceholder')}
className="pr-9 pl-9"
autoFocus
/>
@@ -210,7 +205,7 @@ export function SkillCreateDialog({
type="button"
onClick={() => setQuery('')}
className="absolute top-1/2 right-3 -translate-y-1/2 rounded-sm text-muted-foreground transition-colors hover:text-foreground"
- aria-label="Clear search"
+ aria-label={tCommon('clearSearch')}
>
<X className="size-4" />
</button>
@@ -221,7 +216,7 @@ export function SkillCreateDialog({
<div className="max-h-80 space-y-1 overflow-y-auto">
{filteredCandidates.length === 0 ? (
<p className="py-10 text-center text-sm text-muted-foreground">
- No skills match &ldquo;{query.trim()}&rdquo;.
+ {t('noMatches', { query: query.trim() })}
</p>
) : (
filteredCandidates.map((c) => (
@@ -251,15 +246,14 @@ export function SkillCreateDialog({
</div>
<div className="flex justify-between gap-2">
<Button variant="ghost" onClick={() => setCandidates(null)} disabled={busy}>
- Back
+ {tCommon('back')}
</Button>
<div className="flex gap-2">
<Button variant="outline" onClick={onClose} disabled={busy}>
- Cancel
+ {tCommon('cancel')}
</Button>
<Button onClick={importSelected} disabled={busy || selected.size === 0}>
- Import {selected.size > 0 ? selected.size : ''} skill
- {selected.size === 1 ? '' : 's'}
+ {t('importCount', { count: selected.size })}
</Button>
</div>
</div>
@@ -269,12 +263,12 @@ export function SkillCreateDialog({
}
return (
- <Modal title="New skill" projectKey={projectKey} onClose={onClose} wide>
+ <Modal title={t('newSkill')} projectKey={projectKey} onClose={onClose} wide>
<Tabs value={source} onValueChange={(v) => setSource(v as Source)}>
<TabsList variant="line">
- <TabsTrigger value="inline">Write markdown</TabsTrigger>
- <TabsTrigger value="upload">Upload a file</TabsTrigger>
- <TabsTrigger value="github">Import from GitHub</TabsTrigger>
+ <TabsTrigger value="inline">{t('tabInline')}</TabsTrigger>
+ <TabsTrigger value="upload">{t('tabUpload')}</TabsTrigger>
+ <TabsTrigger value="github">{t('tabGithub')}</TabsTrigger>
</TabsList>
<TabsContent value="inline" className="mt-2 space-y-4">
@@ -295,13 +289,15 @@ export function SkillCreateDialog({
<TabsContent value="upload" className="mt-2 space-y-4">
<div className="space-y-1.5">
- <Label>SKILL.md file</Label>
+ <Label>{t('skillFile')}</Label>
<Input
type="file"
accept=".md,.markdown,.txt,text/markdown,text/plain"
onChange={(e) => onFile(e.target.files?.[0])}
/>
- {fileName && <p className="text-xs text-muted-foreground">Loaded {fileName}</p>}
+ {fileName && (
+ <p className="text-xs text-muted-foreground">{t('loaded', { file: fileName })}</p>
+ )}
</div>
{nameAndCreate}
</TabsContent>
@@ -310,32 +306,30 @@ export function SkillCreateDialog({
<div className="flex gap-2.5 rounded-md border border-amber-500/30 bg-amber-500/10 p-3 text-amber-700 dark:text-amber-300">
<TriangleAlert className="mt-px size-4 shrink-0" />
<div className="space-y-1.5 text-xs leading-relaxed">
- <p className="font-medium">Import only skills you trust</p>
+ <p className="font-medium">{t('trustWarning')}</p>
<ul className="list-disc space-y-0.5 pl-4 text-amber-700/90 dark:text-amber-300/90">
- <li>A skill becomes instructions your agents follow. Review the source first.</li>
- <li>
- Only SKILL.md and its markdown references are imported. Scripts are skipped.
- </li>
+ <li>{t('trustWarning1')}</li>
+ <li>{t('trustWarning2')}</li>
</ul>
</div>
</div>
<div className="space-y-1.5">
- <Label>GitHub URL</Label>
+ <Label>{t('githubUrl')}</Label>
<Input
value={sourceUrl}
onChange={(e) => setSourceUrl(e.target.value)}
- placeholder="https://github.com/owner/repo or a skill folder"
+ placeholder={t('githubUrlPlaceholder')}
/>
- <p className="text-xs text-muted-foreground">A repository, a folder, or a SKILL.md.</p>
+ <p className="text-xs text-muted-foreground">{t('githubUrlHint')}</p>
</div>
<div className="flex justify-end gap-2">
<Button variant="outline" onClick={onClose} disabled={busy}>
- Cancel
+ {tCommon('cancel')}
</Button>
<Button onClick={runDiscover} disabled={busy || sourceUrl.trim() === ''}>
- Find skills
+ {t('findSkills')}
</Button>
</div>
</TabsContent>
diff --git a/apps/web/src/features/settings/components/agent-skills/SkillEditDialog.tsx b/apps/web/src/features/settings/components/agent-skills/SkillEditDialog.tsx
index dbe08041..1e0e48fe 100644
--- a/apps/web/src/features/settings/components/agent-skills/SkillEditDialog.tsx
+++ b/apps/web/src/features/settings/components/agent-skills/SkillEditDialog.tsx
@@ -16,6 +16,7 @@ import {
useDeleteSkillReference,
} from '@/services/agentSkills.service';
import { SkillFileList, type SkillFileEntry } from './SkillFileList';
+import { useTranslations } from 'next-intl';
// The key used for the SKILL.md file in the explorer and the drafts map. Reference
// files use their own relative path.
@@ -36,6 +37,8 @@ export function SkillEditDialog({
canEdit: boolean;
onClose: () => void;
}) {
+ const t = useTranslations('settings.skills');
+ const tCommon = useTranslations('common');
const skillId = initialSkill.id;
// Read the live skill from the list so the file explorer reflects add/delete
// immediately; fall back to the snapshot passed in.
@@ -130,7 +133,7 @@ export function SkillEditDialog({
</DialogTitle>
{canEdit && (
<Button size="sm" onClick={save} disabled={busy || !dirty || name.trim() === ''}>
- {busy ? 'Saving…' : 'Save'}
+ {busy ? tCommon('saving') : tCommon('save')}
</Button>
)}
<Button
@@ -138,7 +141,7 @@ export function SkillEditDialog({
size="icon"
className="size-8"
onClick={onClose}
- aria-label="Close"
+ aria-label={tCommon('close')}
>
<X className="size-4" />
</Button>
@@ -147,15 +150,15 @@ export function SkillEditDialog({
<div className="grid min-h-0 grid-cols-[minmax(0,17rem)_1fr]">
<aside className="flex min-h-0 flex-col gap-5 overflow-y-auto border-r border-border/60 p-4">
<div className="space-y-1.5">
- <Label>Name</Label>
+ <Label>{tCommon('name')}</Label>
<Input value={name} onChange={(e) => setName(e.target.value)} disabled={!canEdit} />
</div>
<div className="space-y-1.5">
- <Label>Description</Label>
+ <Label>{t('description')}</Label>
<Input
value={description}
onChange={(e) => setDescription(e.target.value)}
- placeholder="Shown to the agent to decide when to load this skill"
+ placeholder={t('descriptionPlaceholder')}
disabled={!canEdit}
/>
</div>
@@ -182,7 +185,7 @@ export function SkillEditDialog({
onChange={(e) => edit(e.target.value)}
disabled={!canEdit || loading}
spellCheck={false}
- placeholder={loading ? 'Loading…' : ''}
+ placeholder={loading ? tCommon('loading') : ''}
className={cn(
'h-full w-full resize-none bg-transparent px-5 py-4 focus-visible:ring-ring/40',
'font-mono text-xs leading-relaxed outline-none focus-visible:ring-2 focus-visible:ring-inset',
diff --git a/apps/web/src/features/settings/components/agent-skills/SkillFileList.tsx b/apps/web/src/features/settings/components/agent-skills/SkillFileList.tsx
index 18ee2930..b0c0d9d4 100644
--- a/apps/web/src/features/settings/components/agent-skills/SkillFileList.tsx
+++ b/apps/web/src/features/settings/components/agent-skills/SkillFileList.tsx
@@ -1,5 +1,6 @@
import { FileText, Trash2, Upload } from 'lucide-react';
import { cn } from '@/lib/utils';
+import { useTranslations } from 'next-intl';
// One entry in the skill's file explorer. SKILL.md is pinned and cannot be
// deleted; reference files carry a size and a delete action.
@@ -30,10 +31,11 @@ export function SkillFileList({
onDelete: (path: string) => void;
onAddFile: (file: File) => void;
}) {
+ const t = useTranslations('settings.skills');
return (
<div className="flex min-h-0 flex-col">
<div className="px-1 pb-2 text-[11px] font-medium tracking-wide text-muted-foreground uppercase">
- Files
+ {t('files')}
</div>
<div className="flex-1 space-y-0.5 overflow-y-auto">
{files.map((f) => {
@@ -58,7 +60,7 @@ export function SkillFileList({
{dirtyPaths.has(f.path) && (
<span
className="size-1.5 shrink-0 rounded-full bg-primary"
- aria-label="Unsaved changes"
+ aria-label={t('unsaved')}
/>
)}
</button>
@@ -84,7 +86,7 @@ export function SkillFileList({
{canEdit && (
<label className="mt-2 flex cursor-pointer items-center justify-center gap-2 rounded-md border border-dashed border-border py-2 text-xs text-muted-foreground hover:border-foreground/30 hover:text-foreground">
<Upload className="size-3.5" />
- Add reference
+ {t('addReference')}
<input
type="file"
className="hidden"
diff --git a/apps/web/src/features/settings/components/agent-skills/SkillRow.tsx b/apps/web/src/features/settings/components/agent-skills/SkillRow.tsx
index a2f5a55f..12c61ac2 100644
--- a/apps/web/src/features/settings/components/agent-skills/SkillRow.tsx
+++ b/apps/web/src/features/settings/components/agent-skills/SkillRow.tsx
@@ -3,12 +3,7 @@ import type { AgentSkill } from '@/lib/api';
import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';
import { TableCell, TableRow } from '@/components/ui/table';
-
-const SOURCE_LABEL: Record<AgentSkill['source'], string> = {
- inline: 'Inline',
- upload: 'Uploaded',
- github: 'GitHub',
-};
+import { useTranslations } from 'next-intl';
// One skill as a table row: name and source with the reference-file count below, the
// description, and edit/delete actions gated by permission.
@@ -25,6 +20,7 @@ export function SkillRow({
onEdit: () => void;
onDelete: () => void;
}) {
+ const t = useTranslations('settings.skills');
const refCount = skill.files.length;
return (
<TableRow className="group/item">
@@ -41,12 +37,12 @@ export function SkillRow({
<div className="flex min-w-0 flex-wrap items-center gap-2">
<span className="truncate text-sm font-medium text-foreground">{skill.name}</span>
<Badge variant="outline" className="text-[10px] font-medium tracking-wide uppercase">
- {SOURCE_LABEL[skill.source]}
+ {t(`source.${skill.source}`)}
</Badge>
</div>
{refCount > 0 && (
<span className="text-xs text-muted-foreground">
- {refCount} reference{refCount === 1 ? '' : 's'}
+ {t('referenceCount', { count: refCount })}
</span>
)}
</div>
@@ -54,7 +50,7 @@ export function SkillRow({
</TableCell>
<TableCell className="px-3 py-3 pt-4 align-top whitespace-normal">
<p className="line-clamp-2 text-sm text-muted-foreground">
- {skill.description || 'No description'}
+ {skill.description || t('noDescription')}
</p>
</TableCell>
<TableCell className="px-3 py-2 pt-3 align-top">
@@ -65,7 +61,7 @@ export function SkillRow({
size="icon"
className="size-8 text-muted-foreground hover:text-foreground"
onClick={onEdit}
- aria-label="Edit skill"
+ aria-label={t('edit')}
>
<Pencil className="size-4" />
</Button>
@@ -76,7 +72,7 @@ export function SkillRow({
size="icon"
className="size-8 text-muted-foreground hover:text-destructive"
onClick={onDelete}
- aria-label="Delete skill"
+ aria-label={t('delete')}
>
<Trash2 className="size-4" />
</Button>
diff --git a/apps/web/src/features/settings/components/agent-tools/SettingsAgentTools.tsx b/apps/web/src/features/settings/components/agent-tools/SettingsAgentTools.tsx
index 1cac0b4b..fd2498a0 100644
--- a/apps/web/src/features/settings/components/agent-tools/SettingsAgentTools.tsx
+++ b/apps/web/src/features/settings/components/agent-tools/SettingsAgentTools.tsx
@@ -9,11 +9,14 @@ import SettingsConfirmDeleteDialog from '../crud/SettingsConfirmDeleteDialog';
import { useSettingsCan } from '../../context/settingsPermission';
import { ToolConfigRow } from './ToolConfigRow';
import { integrationLabel } from '../../utils/integrationLabels';
+import { useTranslations } from 'next-intl';
// Project settings for configured tools: a catalog tool bound to an integration
// credential. Adding picks a tool and a credential of its integration; deleting
// confirms first. Enabling a configured tool on an agent is done on the agent editor.
export default function SettingsAgentTools({ project }: { project: ProjectDetail }) {
+ const t = useTranslations('settings.tools');
+ const tCommon = useTranslations('common');
const projectKey = project.project.key;
const toolsQuery = useConfiguredToolsQuery(projectKey);
const tools = toolsQuery.data ?? [];
@@ -34,10 +37,7 @@ export default function SettingsAgentTools({ project }: { project: ProjectDetail
{toolsQuery.isPending ? (
<ListSkeleton rows={3} rowClassName="h-12" />
) : tools.length === 0 ? (
- <EmptyState
- title="No tools yet"
- description="Configure a tool once, then enable it on any agent."
- />
+ <EmptyState title={t('empty')} description={t('emptyHint')} />
) : (
<div className="space-y-4">
<Table className="min-w-[760px] table-fixed">
@@ -48,10 +48,14 @@ export default function SettingsAgentTools({ project }: { project: ProjectDetail
</colgroup>
<TableHeader>
<TableRow className="hover:bg-transparent">
- <TableHead className="text-xs font-medium text-muted-foreground">Tool</TableHead>
- <TableHead className="text-xs font-medium text-muted-foreground">Scopes</TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('tool')}
+ </TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('scopes')}
+ </TableHead>
<TableHead className="text-right text-xs font-medium text-muted-foreground">
- Actions
+ {tCommon('actions')}
</TableHead>
</TableRow>
</TableHeader>
@@ -74,13 +78,9 @@ export default function SettingsAgentTools({ project }: { project: ProjectDetail
{deleting && (
<SettingsConfirmDeleteDialog
- title="Delete tool"
- confirmLabel="Delete tool"
- message={
- <>
- Remove {toolLabel(deleting.toolKey)}? Agents using it will lose access to this tool.
- </>
- }
+ title={t('delete')}
+ confirmLabel={t('delete')}
+ message={<>{t('deleteMessage', { tool: toolLabel(deleting.toolKey) })}</>}
onConfirm={async () => {
await deleteTool.mutateAsync(deleting.id);
setDeleting(null);
diff --git a/apps/web/src/features/settings/components/agent-tools/ToolConfigDialog.tsx b/apps/web/src/features/settings/components/agent-tools/ToolConfigDialog.tsx
index 6e3a94d4..80a37e6a 100644
--- a/apps/web/src/features/settings/components/agent-tools/ToolConfigDialog.tsx
+++ b/apps/web/src/features/settings/components/agent-tools/ToolConfigDialog.tsx
@@ -3,6 +3,7 @@ import type { IntegrationMeta, IntegrationOption } from '@/lib/api';
import Modal from '@/components/common/overlay/Modal';
import { ToolPicker } from './ToolPicker';
import { ToolCredentialStep } from './ToolCredentialStep';
+import { useTranslations } from 'next-intl';
// One catalog tool tagged with the integration it belongs to.
export interface ToolOption {
@@ -29,6 +30,7 @@ export function ToolConfigDialog({
credentials: IntegrationOption[];
onClose: () => void;
}) {
+ const t = useTranslations('settings.tools');
const toolOptions = useMemo<ToolOption[]>(
() =>
catalog
@@ -50,7 +52,7 @@ export function ToolConfigDialog({
const tool = toolOptions.find((t) => t.toolKey === toolKey);
return (
- <Modal title="Add tool" projectKey={projectKey} onClose={onClose} wide>
+ <Modal title={t('add')} projectKey={projectKey} onClose={onClose} wide>
{tool ? (
<ToolCredentialStep
projectKey={projectKey}
diff --git a/apps/web/src/features/settings/components/agent-tools/ToolConfigRow.tsx b/apps/web/src/features/settings/components/agent-tools/ToolConfigRow.tsx
index 55349235..1c26c158 100644
--- a/apps/web/src/features/settings/components/agent-tools/ToolConfigRow.tsx
+++ b/apps/web/src/features/settings/components/agent-tools/ToolConfigRow.tsx
@@ -3,6 +3,7 @@ import type { ConfiguredTool } from '@/lib/api';
import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';
import { TableCell, TableRow } from '@/components/ui/table';
+import { useTranslations } from 'next-intl';
// One configured tool as a table row: the tool name with the integration and
// credential it runs on below, the token permissions it needs as badges, and a
@@ -22,6 +23,7 @@ export function ToolConfigRow({
canDelete: boolean;
onDelete: () => void;
}) {
+ const t = useTranslations('settings.tools');
const on = tool.credentialLabel
? `${integrationLabel} · ${tool.credentialLabel}`
: integrationLabel;
@@ -48,7 +50,7 @@ export function ToolConfigRow({
))}
</div>
) : (
- <span className="text-xs text-muted-foreground">No scopes</span>
+ <span className="text-xs text-muted-foreground">{t('noScopes')}</span>
)}
</TableCell>
<TableCell className="px-3 py-2 pt-3 align-top">
@@ -59,7 +61,7 @@ export function ToolConfigRow({
size="icon"
className="size-8 text-muted-foreground hover:text-destructive"
onClick={onDelete}
- aria-label="Delete tool"
+ aria-label={t('delete')}
>
<Trash2 className="size-4" />
</Button>
diff --git a/apps/web/src/features/settings/components/agent-tools/ToolCredentialStep.tsx b/apps/web/src/features/settings/components/agent-tools/ToolCredentialStep.tsx
index 641dedd5..b43c59b9 100644
--- a/apps/web/src/features/settings/components/agent-tools/ToolCredentialStep.tsx
+++ b/apps/web/src/features/settings/components/agent-tools/ToolCredentialStep.tsx
@@ -14,6 +14,7 @@ import { Badge } from '@/components/ui/badge';
import { useCreateConfiguredTool } from '@/services/customTools.service';
import { IntegrationIcon } from '../integrations/IntegrationIcon';
import type { ToolOption } from './ToolConfigDialog';
+import { useTranslations } from 'next-intl';
// The id is the fallback so several unlabelled credentials of the same integration
// can still be told apart.
@@ -35,6 +36,8 @@ export function ToolCredentialStep({
onBack: () => void;
onDone: () => void;
}) {
+ const t = useTranslations('settings.tools');
+ const tCommon = useTranslations('common');
const matching = credentials.filter((c) => c.integrationKey === tool.integrationKey);
const [credentialId, setCredentialId] = useState<number | null>(matching[0]?.id ?? null);
const [busy, setBusy] = useState(false);
@@ -61,7 +64,7 @@ export function ToolCredentialStep({
size="icon"
className="size-8 shrink-0"
onClick={onBack}
- aria-label="Back to tools"
+ aria-label={t('back')}
>
<ChevronLeft className="size-4" />
</Button>
@@ -79,7 +82,7 @@ export function ToolCredentialStep({
{tool.scopes.length > 0 && (
<div className="space-y-1.5">
- <Label>Required token permissions</Label>
+ <Label>{t('scopesLabel')}</Label>
<div className="flex flex-wrap gap-1">
{tool.scopes.map((s) => (
<Badge key={s} variant="secondary" className="font-mono text-[10px] font-normal">
@@ -91,10 +94,10 @@ export function ToolCredentialStep({
)}
<div className="space-y-1.5">
- <Label>Credential</Label>
+ <Label>{t('credential')}</Label>
{matching.length === 0 ? (
<p className="text-xs text-muted-foreground">
- No {tool.integrationLabel} credential yet. Add one on the Integrations page first.
+ {t('noCredential', { integration: tool.integrationLabel })}
</p>
) : (
<Select
@@ -102,7 +105,7 @@ export function ToolCredentialStep({
onValueChange={(v) => setCredentialId(Number(v))}
>
<SelectTrigger>
- <SelectValue placeholder="Choose a credential" />
+ <SelectValue placeholder={t('chooseCredential')} />
</SelectTrigger>
<SelectContent>
{matching.map((c) => (
@@ -117,10 +120,10 @@ export function ToolCredentialStep({
<div className="flex justify-end gap-2">
<Button variant="outline" onClick={onDone} disabled={busy}>
- Cancel
+ {tCommon('cancel')}
</Button>
<Button onClick={submit} disabled={!canSubmit}>
- Add tool
+ {t('add')}
</Button>
</div>
</div>
diff --git a/apps/web/src/features/settings/components/agent-tools/ToolPicker.tsx b/apps/web/src/features/settings/components/agent-tools/ToolPicker.tsx
index f752579b..4a68f8bf 100644
--- a/apps/web/src/features/settings/components/agent-tools/ToolPicker.tsx
+++ b/apps/web/src/features/settings/components/agent-tools/ToolPicker.tsx
@@ -4,6 +4,7 @@ import { Input } from '@/components/ui/input';
import { Badge } from '@/components/ui/badge';
import { IntegrationIcon } from '../integrations/IntegrationIcon';
import type { ToolOption } from './ToolConfigDialog';
+import { useTranslations } from 'next-intl';
// Step one of adding a tool: pick the tool. The catalog tools are grouped by their
// integration (Jina, Firecrawl, Telegram) in a full-width searchable list, matching the
@@ -15,6 +16,7 @@ export function ToolPicker({
options: ToolOption[];
onSelect: (toolKey: string) => void;
}) {
+ const t = useTranslations('settings.tools');
const [query, setQuery] = useState('');
const matches = useMemo(() => {
@@ -44,7 +46,7 @@ export function ToolPicker({
autoFocus
value={query}
onChange={(e) => setQuery(e.target.value)}
- placeholder="Search tools"
+ placeholder={t('search')}
className="pl-9"
/>
</div>
@@ -52,7 +54,7 @@ export function ToolPicker({
<div className="max-h-[55vh] space-y-5 overflow-y-auto pr-1">
{matches.length === 0 && (
<p className="py-6 text-center text-sm text-muted-foreground">
- No tool matches “{query.trim()}”.
+ {t('noMatches', { query: query.trim() })}
</p>
)}
{groups.map((integrationKey) => {
@@ -82,7 +84,7 @@ export function ToolPicker({
{o.scopes.length > 0 && (
<span className="mt-1.5 flex flex-wrap items-center gap-1">
<span className="text-[10px] tracking-wide text-muted-foreground uppercase">
- Scopes
+ {t('scopesUpper')}
</span>
{o.scopes.map((s) => (
<Badge
diff --git a/apps/web/src/features/settings/components/ai-agents/AgentActionsSection.tsx b/apps/web/src/features/settings/components/ai-agents/AgentActionsSection.tsx
index c0ed272c..7e5f0021 100644
--- a/apps/web/src/features/settings/components/ai-agents/AgentActionsSection.tsx
+++ b/apps/web/src/features/settings/components/ai-agents/AgentActionsSection.tsx
@@ -6,6 +6,7 @@ import { Checkbox } from '@/components/ui/checkbox';
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
import { grantedToolCount } from '../../utils/agentForm';
import { AgentFormSection } from './AgentFormSection';
+import { useTranslations } from 'next-intl';
// What the agent may do in the project. Read-only tools are always granted; the rest
// are opt-in. The counter shows the tools the agent actually has (the granted ones
@@ -25,6 +26,7 @@ export default function AgentActionsSection({
selected: string[];
onChange: (keys: string[]) => void;
}) {
+ const t = useTranslations('settings.agents');
const grantable = tools.filter((t) => !t.always);
const activeCount = grantedToolCount(tools, selected);
const allGranted = grantable.length > 0 && selected.length >= grantable.length;
@@ -42,13 +44,13 @@ export default function AgentActionsSection({
open={open}
onOpenChange={onOpenChange}
icon={ListChecks}
- title="Actions"
- hint="What the agent can do in the project"
+ title={t('actions')}
+ hint={t('actionsHint')}
headerRight={tools.length > 0 ? `${activeCount} / ${tools.length}` : undefined}
>
{toolsLoading && <p className="text-xs text-muted-foreground">Loading actions…</p>}
{!toolsLoading && tools.length === 0 && (
- <p className="text-xs text-muted-foreground">No actions available.</p>
+ <p className="text-xs text-muted-foreground">{t('noActions')}</p>
)}
{!toolsLoading && tools.length > 0 && (
<>
@@ -59,7 +61,7 @@ export default function AgentActionsSection({
onClick={() => onChange(allGranted ? [] : grantable.map((t) => t.key))}
className="text-xs font-medium text-muted-foreground transition-colors hover:text-foreground"
>
- {allGranted ? 'Clear all' : 'Select all'}
+ {allGranted ? t('clearAll') : t('selectAll')}
</button>
</div>
)}
@@ -78,9 +80,7 @@ export default function AgentActionsSection({
</span>
</div>
</TooltipTrigger>
- <TooltipContent>
- Read-only access is always on and can&apos;t be turned off.
- </TooltipContent>
+ <TooltipContent>{t('readOnlyAlwaysOn')}</TooltipContent>
</Tooltip>
) : (
<label key={tool.key} className="flex cursor-pointer items-start gap-2">
diff --git a/apps/web/src/features/settings/components/ai-agents/AgentCapabilityList.tsx b/apps/web/src/features/settings/components/ai-agents/AgentCapabilityList.tsx
index 29b7be36..d6d06405 100644
--- a/apps/web/src/features/settings/components/ai-agents/AgentCapabilityList.tsx
+++ b/apps/web/src/features/settings/components/ai-agents/AgentCapabilityList.tsx
@@ -2,6 +2,7 @@ import { useMemo, useState } from 'react';
import { Search, X } from 'lucide-react';
import { Input } from '@/components/ui/input';
import { Checkbox } from '@/components/ui/checkbox';
+import { useTranslations } from 'next-intl';
// One selectable capability row (a skill or a configured tool), normalized so the
// list renders skills and tools the same way. `search` is the lowercased haystack the
@@ -27,6 +28,8 @@ export function AgentCapabilityList({
onToggle: (id: number, on: boolean) => void;
searchPlaceholder: string;
}) {
+ const t = useTranslations('settings.agents');
+ const tCommon = useTranslations('common');
const [query, setQuery] = useState('');
const matches = useMemo(() => {
@@ -53,7 +56,7 @@ export function AgentCapabilityList({
type="button"
onClick={() => setQuery('')}
className="absolute top-1/2 right-3 -translate-y-1/2 rounded-sm text-muted-foreground transition-colors hover:text-foreground"
- aria-label="Clear search"
+ aria-label={tCommon('clearSearch')}
>
<X className="size-4" />
</button>
@@ -64,7 +67,7 @@ export function AgentCapabilityList({
<div className="max-h-72 space-y-1.5 overflow-y-auto pr-1">
{matches.length === 0 ? (
<p className="py-4 text-center text-xs text-muted-foreground">
- No match for &ldquo;{query.trim()}&rdquo;.
+ {t('noMatch', { query: query.trim() })}
</p>
) : (
matches.map((item) => (
diff --git a/apps/web/src/features/settings/components/ai-agents/AgentExpandedLayout.tsx b/apps/web/src/features/settings/components/ai-agents/AgentExpandedLayout.tsx
index 89be40f5..28374a1f 100644
--- a/apps/web/src/features/settings/components/ai-agents/AgentExpandedLayout.tsx
+++ b/apps/web/src/features/settings/components/ai-agents/AgentExpandedLayout.tsx
@@ -3,6 +3,7 @@
import { type ReactNode, useRef } from 'react';
import { SectionNav, type SectionNavItem } from '@/components/common/page/SectionNav';
import { useSectionScrollSpy } from '@/hooks/useSectionScrollSpy';
+import { useTranslations } from 'next-intl';
// Content width of the full-width internal editor. The sheet sizes its footer to
// match, so the two must stay in sync.
@@ -23,6 +24,7 @@ export default function AgentExpandedLayout({
onExpand: (id: string) => void;
children: ReactNode;
}) {
+ const t = useTranslations('settings.agents');
const containerRef = useRef<HTMLDivElement>(null);
const { activeId, setActiveId } = useSectionScrollSpy(
navSections.map((s) => s.id),
@@ -47,7 +49,7 @@ export default function AgentExpandedLayout({
<SectionNav
sections={navSections}
activeId={activeId}
- label="Agent settings"
+ label={t('agentSettings')}
onJump={jump}
/>
<div className="min-w-0 flex-1 space-y-8">{children}</div>
diff --git a/apps/web/src/features/settings/components/ai-agents/AgentInstructionsField.tsx b/apps/web/src/features/settings/components/ai-agents/AgentInstructionsField.tsx
index c6932fae..210eced2 100644
--- a/apps/web/src/features/settings/components/ai-agents/AgentInstructionsField.tsx
+++ b/apps/web/src/features/settings/components/ai-agents/AgentInstructionsField.tsx
@@ -9,6 +9,7 @@ import {
DialogHeader,
DialogTitle,
} from '@/components/ui/dialog';
+import { useTranslations } from 'next-intl';
// The agent's system-prompt field. An inline textarea plus a maximize control next
// to the label that opens the same value in a large dialog for comfortable editing.
@@ -21,26 +22,27 @@ export function AgentInstructionsField({
value: string;
onChange: (value: string) => void;
}) {
+ const t = useTranslations('settings.agents');
const [open, setOpen] = useState(false);
return (
<div className="space-y-1.5">
<div className="flex items-center justify-between">
<label htmlFor="agent-instructions" className="text-sm font-medium">
- Instructions
+ {t('instructionsLabel')}
</label>
<button
type="button"
onClick={() => setOpen(true)}
className="-my-1 rounded-md p-1 text-muted-foreground transition-colors hover:text-foreground"
- aria-label="Expand instructions editor"
- title="Expand editor"
+ aria-label={t('expandInstructions')}
+ title={t('expandEditor')}
>
<Maximize2 className="size-3.5" />
</button>
</div>
<Textarea
id="agent-instructions"
- placeholder="How the agent should behave and any rules to follow"
+ placeholder={t('instructionsPlaceholder')}
value={value}
onChange={(e) => onChange(e.target.value)}
className="min-h-24"
@@ -52,16 +54,16 @@ export function AgentInstructionsField({
className="flex h-[calc(100vh-2rem)] w-[calc(100vw-2rem)] max-w-none flex-col gap-4 sm:max-w-none"
>
<DialogHeader className="flex-row items-center justify-between space-y-0">
- <DialogTitle>Instructions</DialogTitle>
+ <DialogTitle>{t('instructions')}</DialogTitle>
<DialogClose asChild>
<Button type="button" size="sm">
- Done
+ {t('done')}
</Button>
</DialogClose>
</DialogHeader>
<Textarea
autoFocus
- placeholder="How the agent should behave and any rules to follow"
+ placeholder={t('instructionsPlaceholder')}
value={value}
onChange={(e) => onChange(e.target.value)}
className="min-h-0 flex-1 resize-none border-0 bg-transparent px-0 text-base leading-relaxed shadow-none focus-visible:ring-0"
diff --git a/apps/web/src/features/settings/components/ai-agents/AgentKeyBanner.tsx b/apps/web/src/features/settings/components/ai-agents/AgentKeyBanner.tsx
index 6b42e29d..33567b4b 100644
--- a/apps/web/src/features/settings/components/ai-agents/AgentKeyBanner.tsx
+++ b/apps/web/src/features/settings/components/ai-agents/AgentKeyBanner.tsx
@@ -2,6 +2,7 @@ import { useState } from 'react';
import { Check, Copy, X } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
+import { useTranslations } from 'next-intl';
// Inline, one-time reveal of a new external agent's plaintext API key, shown at the
// top of the sheet form right after create. The secret is never stored in list
@@ -13,6 +14,7 @@ export default function AgentKeyBanner({
apiKey: string;
onDismiss: () => void;
}) {
+ const t = useTranslations('settings.agents');
const [copied, setCopied] = useState(false);
async function copy() {
@@ -28,14 +30,12 @@ export default function AgentKeyBanner({
return (
<div className="space-y-2 rounded-md border border-primary/40 bg-primary/5 p-3">
<div className="flex items-start justify-between gap-2">
- <p className="text-xs text-muted-foreground">
- Copy this API key now. For security, it is shown only once and cannot be retrieved later.
- </p>
+ <p className="text-xs text-muted-foreground">{t('keyWarning')}</p>
<button
type="button"
onClick={onDismiss}
className="shrink-0 text-muted-foreground hover:text-foreground"
- title="Dismiss"
+ title={t('dismiss')}
>
<X className="size-4" />
</button>
@@ -52,7 +52,7 @@ export default function AgentKeyBanner({
variant="outline"
size="icon"
className="shrink-0"
- title="Copy key"
+ title={t('copyKey')}
onClick={copy}
>
{copied ? <Check className="size-4" /> : <Copy className="size-4" />}
diff --git a/apps/web/src/features/settings/components/ai-agents/AgentKeyRevealModal.tsx b/apps/web/src/features/settings/components/ai-agents/AgentKeyRevealModal.tsx
index ec513bc6..94e19066 100644
--- a/apps/web/src/features/settings/components/ai-agents/AgentKeyRevealModal.tsx
+++ b/apps/web/src/features/settings/components/ai-agents/AgentKeyRevealModal.tsx
@@ -3,6 +3,7 @@ import { Check, Copy } from 'lucide-react';
import Modal from '@/components/common/overlay/Modal';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
+import { useTranslations } from 'next-intl';
// One-time reveal of an agent's plaintext API key, shown right after create or
// regenerate. The secret is passed in and never stored in list state — it is only
@@ -16,6 +17,8 @@ export default function AgentKeyRevealModal({
apiKey: string;
onClose: () => void;
}) {
+ const t = useTranslations('settings.agents');
+ const tCommon = useTranslations('common');
const [copied, setCopied] = useState(false);
async function copy() {
@@ -31,9 +34,7 @@ export default function AgentKeyRevealModal({
return (
<Modal title={title} onClose={onClose}>
<div className="space-y-4">
- <p className="text-sm text-muted-foreground">
- Copy this key now. For security, it is shown only once and cannot be retrieved later.
- </p>
+ <p className="text-sm text-muted-foreground">{t('keyWarning')}</p>
<div className="flex items-center gap-2">
<Input
readOnly
@@ -45,14 +46,14 @@ export default function AgentKeyRevealModal({
variant="outline"
size="icon"
className="shrink-0"
- title="Copy key"
+ title={t('copyKey')}
onClick={copy}
>
{copied ? <Check className="size-4" /> : <Copy className="size-4" />}
</Button>
</div>
<div className="flex justify-end">
- <Button onClick={onClose}>Done</Button>
+ <Button onClick={onClose}>{tCommon('done')}</Button>
</div>
</div>
</Modal>
diff --git a/apps/web/src/features/settings/components/ai-agents/AgentMetaRow.tsx b/apps/web/src/features/settings/components/ai-agents/AgentMetaRow.tsx
index b2ce4e69..af3ad887 100644
--- a/apps/web/src/features/settings/components/ai-agents/AgentMetaRow.tsx
+++ b/apps/web/src/features/settings/components/ai-agents/AgentMetaRow.tsx
@@ -2,6 +2,7 @@ import type { ComponentType } from 'react';
import { AtSign, BookOpen, Sparkles, UserRoundCheck, Wrench, Zap } from 'lucide-react';
import type { AiAgent } from '@/lib/api';
import { cn } from '@/lib/utils';
+import { useTranslations } from 'next-intl';
// A single meta chip: an icon plus a short value. `accent` tints it for the enabled
// triggers so they stand out from the neutral counts.
@@ -27,8 +28,6 @@ function MetaChip({
);
}
-const plural = (n: number, one: string, many: string) => `${n} ${n === 1 ? one : many}`;
-
// The configuration chips for an internal agent: its model and provider, and the counts
// of granted actions, configured tools, and enabled skills. `providerLabel` maps the
// provider key to a readable label from the integration catalog.
@@ -39,16 +38,17 @@ export function AgentMetaRow({
agent: AiAgent;
providerLabel: (key: string) => string;
}) {
+ const t = useTranslations('settings.agents');
const model = agent.model
? `${agent.model}${agent.modelProvider ? ` · ${providerLabel(agent.modelProvider)}` : ''}`
- : 'No model set';
+ : t('noModel');
return (
<div className="flex flex-wrap items-center gap-1.5">
<MetaChip icon={Sparkles}>{model}</MetaChip>
- <MetaChip icon={Zap}>{plural(agent.actionCount, 'action', 'actions')}</MetaChip>
- <MetaChip icon={Wrench}>{plural(agent.toolCount, 'tool', 'tools')}</MetaChip>
- <MetaChip icon={BookOpen}>{plural(agent.skillCount, 'skill', 'skills')}</MetaChip>
+ <MetaChip icon={Zap}>{t('actionCount', { count: agent.actionCount })}</MetaChip>
+ <MetaChip icon={Wrench}>{t('toolCount', { count: agent.toolCount })}</MetaChip>
+ <MetaChip icon={BookOpen}>{t('skillCount', { count: agent.skillCount })}</MetaChip>
</div>
);
}
@@ -56,19 +56,20 @@ export function AgentMetaRow({
// The enabled run triggers for an internal agent (mention, delegation), or a muted
// dash when none are on.
export function AgentTriggers({ agent }: { agent: AiAgent }) {
+ const t = useTranslations('settings.agents');
if (!agent.triggerOnMention && !agent.triggerOnAssign) {
- return <span className="text-xs text-muted-foreground">None</span>;
+ return <span className="text-xs text-muted-foreground">{t('triggersNone')}</span>;
}
return (
<div className="flex flex-wrap items-center gap-1.5">
{agent.triggerOnMention && (
<MetaChip icon={AtSign} accent>
- Mention
+ {t('triggerMention')}
</MetaChip>
)}
{agent.triggerOnAssign && (
<MetaChip icon={UserRoundCheck} accent>
- Delegation
+ {t('triggerDelegation')}
</MetaChip>
)}
</div>
diff --git a/apps/web/src/features/settings/components/ai-agents/AgentModelField.tsx b/apps/web/src/features/settings/components/ai-agents/AgentModelField.tsx
index fc9cfe08..cb8e4554 100644
--- a/apps/web/src/features/settings/components/ai-agents/AgentModelField.tsx
+++ b/apps/web/src/features/settings/components/ai-agents/AgentModelField.tsx
@@ -11,6 +11,7 @@ import {
CommandList,
} from '@/components/ui/command';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
+import { useTranslations } from 'next-intl';
// Model picker for an agent: a searchable list of the selected provider's models
// (from the models.dev registry) that also accepts a model id typed by hand, so a
@@ -28,6 +29,7 @@ export default function AgentModelField({
loading: boolean;
disabled: boolean;
}) {
+ const t = useTranslations('settings.agents');
const [open, setOpen] = useState(false);
const [search, setSearch] = useState('');
@@ -53,18 +55,14 @@ export default function AgentModelField({
className="w-full justify-between font-normal"
>
<span className={value ? 'truncate' : 'truncate text-muted-foreground'}>
- {value || 'Choose a model'}
+ {value || t('chooseModel')}
</span>
<ChevronsUpDown className="ml-2 size-4 shrink-0 opacity-50" />
</Button>
</PopoverTrigger>
<PopoverContent className="w-(--radix-popover-trigger-width) p-0" align="start">
<Command>
- <CommandInput
- placeholder="Search or type a model id"
- value={search}
- onValueChange={setSearch}
- />
+ <CommandInput placeholder={t('searchModel')} value={search} onValueChange={setSearch} />
<CommandList
className="max-h-[16rem]"
// The field lives inside a Radix Sheet whose scroll lock blocks wheel
@@ -75,12 +73,12 @@ export default function AgentModelField({
>
{!loading && !showCustom && <CommandEmpty>No models found.</CommandEmpty>}
{loading && (
- <div className="px-3 py-2 text-sm text-muted-foreground">Loading models…</div>
+ <div className="px-3 py-2 text-sm text-muted-foreground">{t('loadingModels')}</div>
)}
{showCustom && (
<CommandGroup>
<CommandItem value={query} onSelect={() => select(query)}>
- Use &quot;{query}&quot;
+ {t('useCustomModel', { query })}
</CommandItem>
</CommandGroup>
)}
diff --git a/apps/web/src/features/settings/components/ai-agents/AgentModelSection.tsx b/apps/web/src/features/settings/components/ai-agents/AgentModelSection.tsx
index 987a5a19..64afbd2a 100644
--- a/apps/web/src/features/settings/components/ai-agents/AgentModelSection.tsx
+++ b/apps/web/src/features/settings/components/ai-agents/AgentModelSection.tsx
@@ -16,6 +16,7 @@ import { integrationLabel } from '../../utils/integrationLabels';
import { AgentFormSection } from './AgentFormSection';
import { AgentInstructionsField } from './AgentInstructionsField';
import AgentModelField from './AgentModelField';
+import { useTranslations } from 'next-intl';
// Which provider key the agent runs on, which model of that provider, and the system
// prompt. Only internal agents have it.
@@ -40,6 +41,7 @@ export default function AgentModelSection({
models: ProviderModel[];
modelsLoading: boolean;
}) {
+ const t = useTranslations('settings.agents');
const credentialLabel = (c: IntegrationOption) => {
const integration = integrationLabel(catalog, c.integrationKey);
return c.label ? `${integration} · ${c.label}` : integration;
@@ -51,23 +53,21 @@ export default function AgentModelSection({
open={open}
onOpenChange={onOpenChange}
icon={Cpu}
- title="Model"
- hint="Provider, model, and system prompt"
+ title={t('model')}
+ hint={t('modelHint')}
>
<div className="grid grid-cols-2 gap-3">
<div className="space-y-1.5">
- <span className="text-sm font-medium">Credential</span>
+ <span className="text-sm font-medium">{t('credential')}</span>
{credentials.length === 0 ? (
<div className="space-y-2 rounded-md bg-muted/60 px-3 py-2.5">
- <p className="text-xs font-medium">Add an AI provider key first</p>
- <p className="text-xs text-muted-foreground">
- The agent needs a provider key to pick a model.
- </p>
+ <p className="text-xs font-medium">{t('noCredential')}</p>
+ <p className="text-xs text-muted-foreground">{t('noCredentialHint')}</p>
<Link
href={integrationsPath(projectKey)}
className="inline-flex items-center gap-1 text-xs font-medium hover:underline"
>
- Add a key on Integrations
+ {t('addKey')}
<ArrowUpRight className="size-3.5" />
</Link>
</div>
@@ -85,7 +85,7 @@ export default function AgentModelSection({
}}
>
<SelectTrigger>
- <SelectValue placeholder="Choose a credential" />
+ <SelectValue placeholder={t('chooseCredential')} />
</SelectTrigger>
<SelectContent>
{credentials.map((c) => (
@@ -98,7 +98,7 @@ export default function AgentModelSection({
)}
</div>
<div className="space-y-1.5">
- <span className="text-sm font-medium">Model</span>
+ <span className="text-sm font-medium">{t('model')}</span>
<AgentModelField
value={value.model}
onChange={(model) => onChange({ model })}
diff --git a/apps/web/src/features/settings/components/ai-agents/AgentSheetForm.tsx b/apps/web/src/features/settings/components/ai-agents/AgentSheetForm.tsx
index 83db4fb1..2cb99e95 100644
--- a/apps/web/src/features/settings/components/ai-agents/AgentSheetForm.tsx
+++ b/apps/web/src/features/settings/components/ai-agents/AgentSheetForm.tsx
@@ -36,6 +36,7 @@ import {
type AgentFormValue,
} from '../../utils/agentForm';
import { integrationLabel } from '../../utils/integrationLabels';
+import { useTranslations } from 'next-intl';
// The Edit tab of the agent sheet, used for both create and edit. With no agent it
// creates one; once created (onCreated lifts it to the sheet) the same form switches
@@ -58,6 +59,8 @@ export function AgentSheetForm({
revealedKey: string | null;
onDismissKey: () => void;
}) {
+ const t = useTranslations('settings.agents');
+ const tCommon = useTranslations('common');
const [value, setValue] = useState<AgentFormValue>(() => initialAgentValue(agent ?? undefined));
const isCreate = agent == null;
// While creating, the username is derived from the name until the user edits it.
@@ -193,18 +196,16 @@ export function AgentSheetForm({
// skill library the agent may load.
const skillsContent = showSkills ? (
skillsLibrary.length === 0 ? (
- <p className="text-xs text-muted-foreground">
- No skills in the library yet. Add one on the Skills page.
- </p>
+ <p className="text-xs text-muted-foreground">{t('noSkills')}</p>
) : (
<AgentCapabilityList
- searchPlaceholder="Search skills"
+ searchPlaceholder={t('searchSkills')}
onToggle={toggleSkill}
items={skillsLibrary.map((skill) => ({
id: skill.id,
checked: selectedSkills.includes(skill.id),
title: skill.name,
- subtitle: skill.description || 'No description',
+ subtitle: skill.description || t('noDescription'),
search: `${skill.name} ${skill.description ?? ''}`.toLowerCase(),
}))}
/>
@@ -217,12 +218,10 @@ export function AgentSheetForm({
// The Tools section body: the configured custom tools the agent may call.
const toolsContent = showTools ? (
toolsLibrary.length === 0 ? (
- <p className="text-xs text-muted-foreground">
- No tools configured yet. Add one on the Tools page.
- </p>
+ <p className="text-xs text-muted-foreground">{t('noTools')}</p>
) : (
<AgentCapabilityList
- searchPlaceholder="Search tools"
+ searchPlaceholder={t('searchTools')}
onToggle={toggleTool}
items={toolsLibrary.map((tool) => {
const toolLabel =
@@ -299,7 +298,7 @@ export function AgentSheetForm({
className={expanded ? 'min-w-40' : 'w-full'}
disabled={!isAgentFormValid(value) || saving}
>
- {saving ? 'Saving…' : isCreate ? 'Create agent' : 'Save agent'}
+ {saving ? tCommon('saving') : isCreate ? t('create') : t('save')}
</Button>
</div>
</div>
diff --git a/apps/web/src/features/settings/components/ai-agents/SettingsAiAgentFields.tsx b/apps/web/src/features/settings/components/ai-agents/SettingsAiAgentFields.tsx
index 8ac785b1..4079a893 100644
--- a/apps/web/src/features/settings/components/ai-agents/SettingsAiAgentFields.tsx
+++ b/apps/web/src/features/settings/components/ai-agents/SettingsAiAgentFields.tsx
@@ -26,6 +26,7 @@ import { AgentFormSection } from './AgentFormSection';
import AgentExpandedLayout from './AgentExpandedLayout';
import AgentModelSection from './AgentModelSection';
import AgentActionsSection from './AgentActionsSection';
+import { useTranslations } from 'next-intl';
// Sentinel select value for "no explicit role" (falls back to the project default).
const DEFAULT_ROLE_VALUE = '__default__';
@@ -85,6 +86,8 @@ export default function SettingsAiAgentFields({
// used by the full-width internal layout which owns its own scroll container.
banner?: ReactNode;
}) {
+ const t = useTranslations('settings.agents');
+ const tCommon = useTranslations('common');
const [openSections, setOpenSections] = useState<Record<string, boolean>>(DEFAULT_OPEN);
const sectionProps = (id: string) => ({
id,
@@ -93,10 +96,10 @@ export default function SettingsAiAgentFields({
});
const basicsSection = (
- <AgentFormSection key="basics" {...sectionProps('basics')} icon={IdCard} title="Basics">
+ <AgentFormSection key="basics" {...sectionProps('basics')} icon={IdCard} title={t('basics')}>
{!kindLocked && (
<div className="space-y-1.5">
- <span className="text-sm font-medium">Kind</span>
+ <span className="text-sm font-medium">{t('kind')}</span>
<div className="grid grid-cols-2 gap-2">
{(['external', 'internal'] as const).map((k) => (
<button
@@ -109,10 +112,8 @@ export default function SettingsAiAgentFields({
: 'bg-muted/50 hover:bg-accent/60'
}`}
>
- <span className="font-medium capitalize">{k}</span>
- <span className="block text-xs text-muted-foreground">
- {k === 'external' ? 'Driven through the API' : 'Run by the built-in runtime'}
- </span>
+ <span className="font-medium">{t(`kindLabel.${k}`)}</span>
+ <span className="block text-xs text-muted-foreground">{t(`kindHint.${k}`)}</span>
</button>
))}
</div>
@@ -121,12 +122,12 @@ export default function SettingsAiAgentFields({
<div className="space-y-1.5">
<label htmlFor="agent-name" className="text-sm font-medium">
- Name
+ {tCommon('name')}
</label>
<Input
id="agent-name"
autoFocus
- placeholder="e.g. Triage bot"
+ placeholder={t('namePlaceholder')}
value={value.name}
onChange={(e) => onChange({ name: e.target.value })}
/>
@@ -134,17 +135,15 @@ export default function SettingsAiAgentFields({
<div className="space-y-1.5">
<label htmlFor="agent-username" className="text-sm font-medium">
- Username
+ {t('username')}
</label>
<Input
id="agent-username"
- placeholder="e.g. triage-bot"
+ placeholder={t('usernamePlaceholder')}
value={value.username}
onChange={(e) => onChange({ username: e.target.value })}
/>
- <p className="text-xs text-muted-foreground">
- Letters, digits, dots, dashes, and underscores. Up to 64 characters.
- </p>
+ <p className="text-xs text-muted-foreground">{t('usernameHint')}</p>
</div>
</AgentFormSection>
);
@@ -154,20 +153,20 @@ export default function SettingsAiAgentFields({
key="access"
{...sectionProps('access')}
icon={Shield}
- title="Access"
- hint="The permissions the agent acts under"
+ title={t('access')}
+ hint={t('accessHint')}
>
<div className="space-y-1.5">
- <span className="text-sm font-medium">Role</span>
+ <span className="text-sm font-medium">{t('role')}</span>
<Select
value={value.roleId != null ? String(value.roleId) : DEFAULT_ROLE_VALUE}
onValueChange={(v) => onChange({ roleId: v === DEFAULT_ROLE_VALUE ? null : Number(v) })}
>
<SelectTrigger>
- <SelectValue placeholder="Choose a role" />
+ <SelectValue placeholder={t('chooseRole')} />
</SelectTrigger>
<SelectContent>
- <SelectItem value={DEFAULT_ROLE_VALUE}>Default role</SelectItem>
+ <SelectItem value={DEFAULT_ROLE_VALUE}>{t('defaultRole')}</SelectItem>
{roles.map((r) => (
<SelectItem key={r.id} value={String(r.id)}>
{r.name}
@@ -176,9 +175,7 @@ export default function SettingsAiAgentFields({
</SelectContent>
</Select>
<p className="text-xs text-muted-foreground">
- {value.kind === 'external'
- ? "The agent's API requests are limited to what this role permits."
- : 'The agent can only do what both this role and its actions allow. An action the role denies fails at runtime.'}
+ {value.kind === 'external' ? t('roleHintExternal') : t('roleHintInternal')}
</p>
</div>
</AgentFormSection>
@@ -216,15 +213,13 @@ export default function SettingsAiAgentFields({
key="triggers"
{...sectionProps('triggers')}
icon={Zap}
- title="Triggers"
- hint="When the agent runs on its own"
+ title={t('triggers')}
+ hint={t('triggersHint')}
>
<label className="flex cursor-pointer items-center justify-between gap-2">
<span>
- <span className="text-sm">React to mentions</span>
- <span className="block text-xs text-muted-foreground">
- Run when @-mentioned in a comment.
- </span>
+ <span className="text-sm">{t('onMention')}</span>
+ <span className="block text-xs text-muted-foreground">{t('onMentionHint')}</span>
</span>
<Switch
checked={value.triggerOnMention}
@@ -233,10 +228,8 @@ export default function SettingsAiAgentFields({
</label>
<label className="flex cursor-pointer items-center justify-between gap-2">
<span>
- <span className="text-sm">React to delegation</span>
- <span className="block text-xs text-muted-foreground">
- Run when set as an issue&apos;s delegate.
- </span>
+ <span className="text-sm">{t('onDelegation')}</span>
+ <span className="block text-xs text-muted-foreground">{t('onDelegationHint')}</span>
</span>
<Switch
checked={value.triggerOnAssign}
@@ -252,8 +245,8 @@ export default function SettingsAiAgentFields({
key="skills"
{...sectionProps('skills')}
icon={Sparkles}
- title="Skills"
- hint="Reusable instructions the agent can load"
+ title={t('skills')}
+ hint={t('skillsHint')}
>
{skillsContent}
</AgentFormSection>
@@ -265,8 +258,8 @@ export default function SettingsAiAgentFields({
key="tools"
{...sectionProps('tools')}
icon={Wrench}
- title="Tools"
- hint="External integrations the agent can call"
+ title={t('tools')}
+ hint={t('toolsHint')}
>
{toolsContent}
</AgentFormSection>
@@ -277,13 +270,13 @@ export default function SettingsAiAgentFields({
key="advanced"
{...sectionProps('advanced')}
icon={SlidersHorizontal}
- title="Advanced"
- hint="Sampling, step limit, and memory"
+ title={t('advanced')}
+ hint={t('advancedHint')}
>
<div className="grid grid-cols-2 gap-3">
<div className="space-y-1.5">
<label htmlFor="agent-temperature" className="text-sm font-medium">
- Temperature
+ {t('temperature')}
</label>
<Input
id="agent-temperature"
@@ -291,21 +284,21 @@ export default function SettingsAiAgentFields({
step="0.1"
min="0"
max="2"
- placeholder="Optional"
+ placeholder={t('optional')}
value={value.temperature}
onChange={(e) => onChange({ temperature: e.target.value })}
/>
</div>
<div className="space-y-1.5">
<label htmlFor="agent-max-steps" className="text-sm font-medium">
- Max steps
+ {t('maxSteps')}
</label>
<Input
id="agent-max-steps"
type="number"
step="1"
min="1"
- placeholder="Optional"
+ placeholder={t('optional')}
value={value.maxSteps}
onChange={(e) => onChange({ maxSteps: e.target.value })}
/>
@@ -320,23 +313,21 @@ export default function SettingsAiAgentFields({
onCheckedChange={(v) => onChange({ memoryEnabled: v === true })}
/>
<span>
- <span className="text-sm font-medium">Conversation memory</span>
- <span className="block text-xs text-muted-foreground">
- Recall recent messages within a conversation thread.
- </span>
+ <span className="text-sm font-medium">{t('memory')}</span>
+ <span className="block text-xs text-muted-foreground">{t('memoryHint')}</span>
</span>
</label>
{value.memoryEnabled && (
<div className="space-y-1.5 pl-6">
<label htmlFor="agent-memory-n" className="text-sm font-medium">
- Remember last N messages
+ {t('memoryCount')}
</label>
<Input
id="agent-memory-n"
type="number"
step="1"
min="1"
- placeholder="e.g. 20"
+ placeholder={t('memoryCountPlaceholder')}
value={value.memoryLastMessages}
onChange={(e) => onChange({ memoryLastMessages: e.target.value })}
/>
@@ -351,18 +342,18 @@ export default function SettingsAiAgentFields({
// container so the nav's scroll spy can track which section is in view.
if (expanded && value.kind === 'internal') {
const navSections: SectionNavItem[] = [
- { id: 'basics', label: 'Basics', icon: IdCard },
- { id: 'model', label: 'Model', icon: Cpu },
- { id: 'triggers', label: 'Triggers', icon: Zap },
+ { id: 'basics', label: t('basics'), icon: IdCard },
+ { id: 'model', label: t('model'), icon: Cpu },
+ { id: 'triggers', label: t('triggers'), icon: Zap },
{
id: 'actions',
- label: 'Actions',
+ label: t('actions'),
icon: ListChecks,
badge: tools.length > 0 ? `${activeCount}/${tools.length}` : undefined,
},
- ...(skillsSection ? [{ id: 'skills', label: 'Skills', icon: Sparkles }] : []),
- ...(toolsSection ? [{ id: 'tools', label: 'Tools', icon: Wrench }] : []),
- { id: 'advanced', label: 'Advanced', icon: SlidersHorizontal },
+ ...(skillsSection ? [{ id: 'skills', label: t('skills'), icon: Sparkles }] : []),
+ ...(toolsSection ? [{ id: 'tools', label: t('tools'), icon: Wrench }] : []),
+ { id: 'advanced', label: t('advanced'), icon: SlidersHorizontal },
];
return (
diff --git a/apps/web/src/features/settings/components/ai-agents/SettingsAiAgentRow.tsx b/apps/web/src/features/settings/components/ai-agents/SettingsAiAgentRow.tsx
index e9571dac..c6120894 100644
--- a/apps/web/src/features/settings/components/ai-agents/SettingsAiAgentRow.tsx
+++ b/apps/web/src/features/settings/components/ai-agents/SettingsAiAgentRow.tsx
@@ -22,6 +22,7 @@ import { TableCell, TableRow } from '@/components/ui/table';
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
import { useSettingsCan } from '../../context/settingsPermission';
import { AgentMetaRow, AgentTriggers } from './AgentMetaRow';
+import { useTranslations } from 'next-intl';
// One agent as a table row: the Agent cell holds the name, @username, kind badge,
// and created date; the Configuration cell shows an internal agent's meta line
@@ -46,6 +47,7 @@ export function SettingsAiAgentRow({
onEdit: () => void;
onDelete: () => void;
}) {
+ const t = useTranslations('settings.agents');
const can = useSettingsCan();
const canHistory = agent.kind === 'internal' && can('read');
const canChat = canHistory;
@@ -71,7 +73,7 @@ export function SettingsAiAgentRow({
</Badge>
</div>
<span className="text-xs text-muted-foreground/80">
- Created {formatShortDate(agent.createdAt)}
+ {t('createdOn', { date: formatShortDate(agent.createdAt) })}
</span>
</div>
</div>
@@ -88,19 +90,19 @@ export function SettingsAiAgentRow({
<AgentMetaRow agent={agent} providerLabel={providerLabel} />
) : (
<span className="text-xs text-muted-foreground">
- {agent.apiKeyStart ? `API key ${agent.apiKeyStart}…` : 'API key'}
+ {agent.apiKeyStart ? t('apiKeyValue', { start: agent.apiKeyStart }) : t('apiKey')}
</span>
)}
</TableCell>
<TableCell className="px-3 py-2 pt-3 align-top">
<div className="flex items-center justify-end gap-1">
{canHistory && (
- <IconButton title="Run history" onClick={onRuns}>
+ <IconButton title={t('runHistory')} onClick={onRuns}>
<History className="size-4" />
</IconButton>
)}
{can('edit') && (
- <IconButton title="Edit agent" onClick={onEdit}>
+ <IconButton title={t('edit')} onClick={onEdit}>
<Pencil className="size-4" />
</IconButton>
)}
@@ -118,19 +120,19 @@ export function SettingsAiAgentRow({
</Button>
</DropdownMenuTrigger>
</TooltipTrigger>
- <TooltipContent>More actions</TooltipContent>
+ <TooltipContent>{t('moreActions')}</TooltipContent>
</Tooltip>
<DropdownMenuContent align="end">
{canChat && (
<DropdownMenuItem className="min-h-11 sm:min-h-8" onSelect={onChat}>
<MessageSquare />
- Test chat
+ {t('testChat')}
</DropdownMenuItem>
)}
{canRegenerate && (
<DropdownMenuItem className="min-h-11 sm:min-h-8" onSelect={onRegenerate}>
<KeyRound />
- Regenerate key
+ {t('regenerateConfirm')}
</DropdownMenuItem>
)}
{can('delete') && (canChat || canRegenerate) && <DropdownMenuSeparator />}
@@ -141,7 +143,7 @@ export function SettingsAiAgentRow({
onSelect={onDelete}
>
<Trash2 />
- Delete agent
+ {t('delete')}
</DropdownMenuItem>
)}
</DropdownMenuContent>
diff --git a/apps/web/src/features/settings/components/ai-agents/SettingsAiAgentRunsSheet.tsx b/apps/web/src/features/settings/components/ai-agents/SettingsAiAgentRunsSheet.tsx
index 60a7c55d..c5c2848b 100644
--- a/apps/web/src/features/settings/components/ai-agents/SettingsAiAgentRunsSheet.tsx
+++ b/apps/web/src/features/settings/components/ai-agents/SettingsAiAgentRunsSheet.tsx
@@ -15,6 +15,7 @@ import {
SheetTitle,
} from '@/components/ui/sheet';
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
+import { useTranslations } from 'next-intl';
// Run history for an agent, in a right-side sidebar. Shows the triggered runs (a
// mention or a delegation) queued for the agent, newest first, 25 at a time. Each run
@@ -29,13 +30,14 @@ export function SettingsAiAgentRunsSheet({
agent: AiAgent | null;
onClose: () => void;
}) {
+ const t = useTranslations('settings.agents');
return (
<Sheet open={agent != null} onOpenChange={(open) => !open && onClose()}>
<SheetContent side="right" className="w-full gap-0 p-0 sm:max-w-xl">
<SheetHeader className="border-b">
- <SheetTitle>Run history</SheetTitle>
+ <SheetTitle>{t('runHistory')}</SheetTitle>
<SheetDescription className="truncate text-xs">
- {agent ? `@${agent.username} · mention and delegation runs` : ''}
+ {agent ? t('runsSubtitle', { username: agent.username }) : ''}
</SheetDescription>
</SheetHeader>
{agent && <RunsList projectKey={projectKey} agentId={agent.id} />}
@@ -45,6 +47,8 @@ export function SettingsAiAgentRunsSheet({
}
function RunsList({ projectKey, agentId }: { projectKey: string; agentId: number }) {
+ const t = useTranslations('settings.agents');
+ const tCommon = useTranslations('common');
const query = useAgentRuns(projectKey, agentId);
const runs = query.data?.pages.flatMap((p) => p.items) ?? [];
@@ -52,12 +56,7 @@ function RunsList({ projectKey, agentId }: { projectKey: string; agentId: number
return <ListSkeleton rows={4} className="p-4" rowClassName="h-12" />;
}
if (runs.length === 0) {
- return (
- <p className="p-4 text-sm text-muted-foreground">
- No runs yet. Runs appear here when the agent is mentioned in a comment or an issue is
- delegated to it.
- </p>
- );
+ return <p className="p-4 text-sm text-muted-foreground">{t('noRuns')}</p>;
}
return (
@@ -76,10 +75,10 @@ function RunsList({ projectKey, agentId }: { projectKey: string; agentId: number
disabled={query.isFetchingNextPage}
onClick={() => query.fetchNextPage()}
>
- {query.isFetchingNextPage ? 'Loading…' : 'Load 25 more'}
+ {query.isFetchingNextPage ? tCommon('loading') : t('loadMore')}
</Button>
) : (
- <p className="text-center text-xs text-muted-foreground">End of history</p>
+ <p className="text-center text-xs text-muted-foreground">{t('endOfHistory')}</p>
)}
</div>
</div>
@@ -88,16 +87,17 @@ function RunsList({ projectKey, agentId }: { projectKey: string; agentId: number
// What the run was about: the issue it targeted, or how it was started when it
// targeted none.
-function runSubject(r: AgentRun): string {
- if (r.issueId == null) return r.trigger === 'manual' ? 'Manual task' : 'Scheduled task';
+function runSubject(r: AgentRun, t: ReturnType<typeof useTranslations<'settings.agents'>>): string {
+ if (r.issueId == null) return r.trigger === 'manual' ? t('manualTask') : t('scheduledTask');
if (!r.issueIdentifier) return `issue #${r.issueId}`;
return `${r.issueIdentifier}${r.issueTitle ? ` · ${r.issueTitle}` : ''}`;
}
function RunItem({ run: r }: { run: AgentRun }) {
+ const t = useTranslations('settings.agents');
const [open, setOpen] = useState(false);
- const subject = runSubject(r);
- const outcome = r.status === 'failed' ? (r.lastError ?? 'Failed') : '';
+ const subject = runSubject(r, t);
+ const outcome = r.status === 'failed' ? (r.lastError ?? t('failed')) : '';
return (
<div>
<button
@@ -127,13 +127,13 @@ function RunItem({ run: r }: { run: AgentRun }) {
</button>
{open && (
<div className="space-y-3 px-4 pb-3">
- <DetailBlock label="Task" value={r.prompt} />
+ <DetailBlock label={t('task')} value={r.prompt} />
{r.status === 'failed' && r.lastError && (
- <DetailBlock label="Error" value={r.lastError} />
+ <DetailBlock label={t('error')} value={r.lastError} />
)}
{r.status === 'pending' && (
<DetailBlock
- label="Queue"
+ label={t('queue')}
value={`Attempts: ${r.attempts}. Next attempt: ${formatDateTime(r.nextAttemptAt)}.`}
/>
)}
diff --git a/apps/web/src/features/settings/components/ai-agents/SettingsAiAgentSheet.tsx b/apps/web/src/features/settings/components/ai-agents/SettingsAiAgentSheet.tsx
index 1bd9a796..46d13c75 100644
--- a/apps/web/src/features/settings/components/ai-agents/SettingsAiAgentSheet.tsx
+++ b/apps/web/src/features/settings/components/ai-agents/SettingsAiAgentSheet.tsx
@@ -14,6 +14,7 @@ import { Button } from '@/components/ui/button';
import { AgentChatPanel } from '@/components/common/agent-chat/AgentChatPanel';
import { useAgentChat } from '@/hooks/useAgentChat';
import { AgentSheetForm } from './AgentSheetForm';
+import { useTranslations } from 'next-intl';
// Full-width sheet for one agent. Opened for create (agent null) or to edit an
// existing one. Create and edit share the same form (AgentSheetForm): on create the
@@ -58,6 +59,8 @@ function SheetBody({
projectKey: string;
initialAgent: AiAgent | null;
}) {
+ const t = useTranslations('settings.agents');
+ const tCommon = useTranslations('common');
// The agent just created in this sheet, if any. Once set, the form switches from
// create to edit for it without remounting.
const [createdAgent, setCreatedAgent] = useState<AiAgent | null>(null);
@@ -87,9 +90,11 @@ function SheetBody({
</div>
<div className="flex min-w-0 flex-1 items-center gap-2">
<div className="min-w-0">
- <SheetTitle className="truncate text-sm">{agent ? agent.name : 'New agent'}</SheetTitle>
+ <SheetTitle className="truncate text-sm">
+ {agent ? agent.name : t('newAgent')}
+ </SheetTitle>
<SheetDescription className="truncate text-xs">
- {agent ? `@${agent.username}` : 'A bot user you can delegate issues to'}
+ {agent ? `@${agent.username}` : t('sheetSubtitle')}
</SheetDescription>
</div>
{agent && (
@@ -104,7 +109,7 @@ function SheetBody({
variant="ghost"
size="icon"
className="size-8 shrink-0 text-muted-foreground hover:text-foreground"
- aria-label="Close"
+ aria-label={tCommon('close')}
>
<X className="size-4" />
</Button>
diff --git a/apps/web/src/features/settings/components/ai-agents/SettingsAiAgents.tsx b/apps/web/src/features/settings/components/ai-agents/SettingsAiAgents.tsx
index ac9692a1..d61e4c0d 100644
--- a/apps/web/src/features/settings/components/ai-agents/SettingsAiAgents.tsx
+++ b/apps/web/src/features/settings/components/ai-agents/SettingsAiAgents.tsx
@@ -15,6 +15,7 @@ import AgentKeyRevealModal from './AgentKeyRevealModal';
import { SettingsAiAgentSheet } from './SettingsAiAgentSheet';
import { SettingsAiAgentRunsSheet } from './SettingsAiAgentRunsSheet';
import { integrationLabel } from '../../utils/integrationLabels';
+import { useTranslations } from 'next-intl';
// Project settings tab for AI agents: bot users that issues can be delegated to.
// An external agent is driven through the API; an internal agent runs on the
@@ -23,6 +24,8 @@ import { integrationLabel } from '../../utils/integrationLabels';
// its key once, inline, then stays open to keep editing. Regenerating a key (an
// existing external agent only) reveals the new plaintext secret once.
export default function SettingsAiAgents({ project }: { project: ProjectDetail }) {
+ const t = useTranslations('settings.agents');
+ const tCommon = useTranslations('common');
const projectKey = project.project.key;
const agentsQuery = useAiAgentsQuery(projectKey);
const agents = agentsQuery.data ?? [];
@@ -55,10 +58,7 @@ export default function SettingsAiAgents({ project }: { project: ProjectDetail }
{agentsQuery.isPending ? (
<ListSkeleton rows={3} rowClassName="h-12" />
) : agents.length === 0 ? (
- <EmptyState
- title="No agents yet"
- description="An agent runs on the built-in runtime or through the API."
- />
+ <EmptyState title={t('empty')} description={t('emptyHint')} />
) : (
<div className="space-y-4">
<Table className="min-w-[1000px] table-fixed">
@@ -70,15 +70,17 @@ export default function SettingsAiAgents({ project }: { project: ProjectDetail }
</colgroup>
<TableHeader>
<TableRow className="hover:bg-transparent">
- <TableHead className="text-xs font-medium text-muted-foreground">Agent</TableHead>
<TableHead className="text-xs font-medium text-muted-foreground">
- Triggers
+ {t('agent')}
+ </TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.triggers')}
</TableHead>
<TableHead className="text-xs font-medium text-muted-foreground">
- Configuration
+ {t('columns.configuration')}
</TableHead>
<TableHead className="text-right text-xs font-medium text-muted-foreground">
- Actions
+ {tCommon('actions')}
</TableHead>
</TableRow>
</TableHeader>
@@ -115,15 +117,12 @@ export default function SettingsAiAgents({ project }: { project: ProjectDetail }
{regenerating && (
<SettingsConfirmDeleteDialog
- title="Regenerate API key"
- confirmLabel="Regenerate key"
- message={
- <>
- A new key will be issued for <span className="font-medium">{regenerating.name}</span>{' '}
- and the current one will stop working immediately. Every existing connection using it
- will break until it is updated with the new key.
- </>
- }
+ title={t('regenerateTitle')}
+ confirmLabel={t('regenerateConfirm')}
+ message={t.rich('regenerateMessage', {
+ name: regenerating.name,
+ v: (chunks) => <span className="font-medium">{chunks}</span>,
+ })}
onClose={() => setRegenerating(null)}
onConfirm={async () => {
const agent = regenerating;
@@ -135,7 +134,7 @@ export default function SettingsAiAgents({ project }: { project: ProjectDetail }
{regeneratedKey !== null && (
<AgentKeyRevealModal
- title="Key regenerated"
+ title={t('keyRegenerated')}
apiKey={regeneratedKey}
onClose={() => setRegeneratedKey(null)}
/>
@@ -143,15 +142,12 @@ export default function SettingsAiAgents({ project }: { project: ProjectDetail }
{deleting && (
<SettingsConfirmDeleteDialog
- title="Delete agent"
- confirmLabel="Delete agent"
- message={
- <>
- <span className="font-medium">{deleting.name}</span> and its API key will be removed,
- and it will be cleared from any issues it was assigned or delegated to. This cannot be
- undone.
- </>
- }
+ title={t('delete')}
+ confirmLabel={t('delete')}
+ message={t.rich('deleteMessage', {
+ name: deleting.name,
+ v: (chunks) => <span className="font-medium">{chunks}</span>,
+ })}
onClose={() => setDeleting(null)}
onConfirm={async () => {
await deleteAgent.mutateAsync(deleting.id);
diff --git a/apps/web/src/features/settings/components/configuration/SettingsAutoArchive.tsx b/apps/web/src/features/settings/components/configuration/SettingsAutoArchive.tsx
index 3cda8688..575162b3 100644
--- a/apps/web/src/features/settings/components/configuration/SettingsAutoArchive.tsx
+++ b/apps/web/src/features/settings/components/configuration/SettingsAutoArchive.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import SettingsCard from '@/components/common/page/SettingsCard';
import SettingsSection from '@/components/common/page/SettingsSection';
import type { AutoArchiveForm } from '../../hooks/useAutoArchiveForm';
@@ -6,15 +7,14 @@ import SettingsAutoArchiveRow from './SettingsAutoArchiveRow';
// The Archive block of the Configuration page: how long a closed issue may sit
// untouched before the worker archives it.
export default function SettingsAutoArchive({ form }: { form: AutoArchiveForm }) {
+ const t = useTranslations('settings.configuration');
+
return (
- <SettingsSection
- title="Archive"
- description="Archive stale closed issues so the board stays clear."
- >
+ <SettingsSection title={t('archive')} description={t('archiveHint')}>
<SettingsCard className="divide-y divide-border/60">
<SettingsAutoArchiveRow
- title="Completed issues"
- description="Archive after this many days without activity."
+ title={t('completedIssues')}
+ description={t('staleHint')}
on={form.completedOn}
days={form.completedDays}
editable={form.editable}
@@ -22,8 +22,8 @@ export default function SettingsAutoArchive({ form }: { form: AutoArchiveForm })
onDays={form.setCompletedDays}
/>
<SettingsAutoArchiveRow
- title="Canceled issues"
- description="Archive after this many days without activity."
+ title={t('canceledIssues')}
+ description={t('staleHint')}
on={form.canceledOn}
days={form.canceledDays}
editable={form.editable}
diff --git a/apps/web/src/features/settings/components/configuration/SettingsAutoArchiveRow.tsx b/apps/web/src/features/settings/components/configuration/SettingsAutoArchiveRow.tsx
index 15cc523a..2b1d58fa 100644
--- a/apps/web/src/features/settings/components/configuration/SettingsAutoArchiveRow.tsx
+++ b/apps/web/src/features/settings/components/configuration/SettingsAutoArchiveRow.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import SettingsRow from '@/components/common/page/SettingsRow';
import { Input } from '@/components/ui/input';
import { Switch } from '@/components/ui/switch';
@@ -22,6 +23,8 @@ export default function SettingsAutoArchiveRow({
onToggle: (v: boolean) => void;
onDays: (v: string) => void;
}) {
+ const t = useTranslations('settings.configuration');
+
return (
<SettingsRow
title={title}
@@ -36,7 +39,7 @@ export default function SettingsAutoArchiveRow({
disabled={!editable || !on}
className="h-8 w-20"
/>
- <span className="text-xs text-muted-foreground">days</span>
+ <span className="text-xs text-muted-foreground">{t('days')}</span>
<Switch checked={on} onCheckedChange={onToggle} disabled={!editable} />
</div>
}
diff --git a/apps/web/src/features/settings/components/configuration/SettingsSubtaskAutomation.tsx b/apps/web/src/features/settings/components/configuration/SettingsSubtaskAutomation.tsx
index f929f057..95d36f89 100644
--- a/apps/web/src/features/settings/components/configuration/SettingsSubtaskAutomation.tsx
+++ b/apps/web/src/features/settings/components/configuration/SettingsSubtaskAutomation.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import SettingsCard from '@/components/common/page/SettingsCard';
import SettingsSection from '@/components/common/page/SettingsSection';
import SettingsRow from '@/components/common/page/SettingsRow';
@@ -7,15 +8,14 @@ import type { SubtaskAutomationForm } from '../../hooks/useSubtaskAutomationForm
// The Subtasks block of the Configuration page: the two automations that keep a
// parent and its subtasks closed together. Both off unless turned on here.
export default function SettingsSubtaskAutomation({ form }: { form: SubtaskAutomationForm }) {
+ const t = useTranslations('settings.configuration');
+
return (
- <SettingsSection
- title="Subtasks"
- description="Only closing is synced. Moving an issue between open states changes nothing else."
- >
+ <SettingsSection title={t('subtasks')} description={t('subtasksHint')}>
<SettingsCard className="divide-y divide-border/60">
<SettingsRow
- title="Close the parent when its subtasks are done"
- description="The parent moves to the state its last subtask closed in."
+ title={t('completeParent')}
+ description={t('completeParentHint')}
control={
<Switch
checked={form.completeParent}
@@ -25,8 +25,8 @@ export default function SettingsSubtaskAutomation({ form }: { form: SubtaskAutom
}
/>
<SettingsRow
- title="Close subtasks when the parent closes"
- description="Open subtasks move to the state the parent closed in."
+ title={t('closeSubtasks')}
+ description={t('closeSubtasksHint')}
control={
<Switch
checked={form.closeSubtasks}
diff --git a/apps/web/src/features/settings/components/crud/SettingsColorField.tsx b/apps/web/src/features/settings/components/crud/SettingsColorField.tsx
index 59711048..f51cd8b9 100644
--- a/apps/web/src/features/settings/components/crud/SettingsColorField.tsx
+++ b/apps/web/src/features/settings/components/crud/SettingsColorField.tsx
@@ -1,4 +1,5 @@
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import { cn } from '@/lib/utils';
import { Input } from '@/components/ui/input';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
@@ -41,6 +42,7 @@ export default function SettingsColorField({
onChange: (hex: string) => void;
className?: string;
}) {
+ const t = useTranslations('common');
const [open, setOpen] = useState(false);
const selected = value.trim().toLowerCase();
return (
@@ -48,7 +50,7 @@ export default function SettingsColorField({
<PopoverTrigger asChild>
<button
type="button"
- aria-label="Pick color"
+ aria-label={t('pickColor')}
className={cn(
'size-6 shrink-0 cursor-pointer rounded-full border border-input shadow-xs outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50',
className,
diff --git a/apps/web/src/features/settings/components/crud/SettingsConfirmDeleteDialog.tsx b/apps/web/src/features/settings/components/crud/SettingsConfirmDeleteDialog.tsx
index c0227aee..34de936d 100644
--- a/apps/web/src/features/settings/components/crud/SettingsConfirmDeleteDialog.tsx
+++ b/apps/web/src/features/settings/components/crud/SettingsConfirmDeleteDialog.tsx
@@ -1,4 +1,5 @@
import { type ReactNode } from 'react';
+import { useTranslations } from 'next-intl';
import ConfirmDialog from '@/components/common/overlay/ConfirmDialog';
// Confirmation before an irreversible delete. The caller supplies the warning
@@ -6,7 +7,7 @@ import ConfirmDialog from '@/components/common/overlay/ConfirmDialog';
export default function SettingsConfirmDeleteDialog({
title,
message,
- confirmLabel = 'Delete',
+ confirmLabel,
onConfirm,
onClose,
}: {
@@ -16,10 +17,11 @@ export default function SettingsConfirmDeleteDialog({
onConfirm: () => Promise<void>;
onClose: () => void;
}) {
+ const t = useTranslations('common');
return (
<ConfirmDialog
title={title}
- confirmLabel={confirmLabel}
+ confirmLabel={confirmLabel ?? t('delete')}
onConfirm={onConfirm}
onClose={onClose}
>
diff --git a/apps/web/src/features/settings/components/crud/SettingsInlineEditForm.tsx b/apps/web/src/features/settings/components/crud/SettingsInlineEditForm.tsx
index f30764ea..c5724075 100644
--- a/apps/web/src/features/settings/components/crud/SettingsInlineEditForm.tsx
+++ b/apps/web/src/features/settings/components/crud/SettingsInlineEditForm.tsx
@@ -1,4 +1,5 @@
import type { ReactNode } from 'react';
+import { useTranslations } from 'next-intl';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
@@ -21,6 +22,8 @@ export function SettingsInlineEditForm({
leading?: ReactNode;
trailing?: ReactNode;
}) {
+ const t = useTranslations('common');
+
return (
<div className="flex items-center gap-2 px-3 py-1.5">
{leading}
@@ -40,7 +43,7 @@ export function SettingsInlineEditForm({
{submitLabel}
</Button>
<Button variant="ghost" size="sm" className="h-7" onClick={onCancel}>
- Cancel
+ {t('cancel')}
</Button>
</div>
);
diff --git a/apps/web/src/features/settings/components/crud/SettingsInlineForm.tsx b/apps/web/src/features/settings/components/crud/SettingsInlineForm.tsx
index 54a3c33f..df40ffa7 100644
--- a/apps/web/src/features/settings/components/crud/SettingsInlineForm.tsx
+++ b/apps/web/src/features/settings/components/crud/SettingsInlineForm.tsx
@@ -1,4 +1,5 @@
import type { ReactNode } from 'react';
+import { useTranslations } from 'next-intl';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
@@ -21,6 +22,8 @@ export function SettingsInlineForm({
leading?: ReactNode;
trailing?: ReactNode;
}) {
+ const t = useTranslations('common');
+
return (
<div className="flex items-center gap-2.5 rounded-lg bg-muted/40 p-2">
{leading}
@@ -37,7 +40,7 @@ export function SettingsInlineForm({
/>
{trailing}
<Button variant="ghost" size="sm" className="h-8" onClick={onCancel}>
- Cancel
+ {t('cancel')}
</Button>
<Button size="sm" className="h-8" disabled={!name.trim()} onClick={onSubmit}>
{submitLabel}
diff --git a/apps/web/src/features/settings/components/custom-fields/CustomFieldsCopyDialog.tsx b/apps/web/src/features/settings/components/custom-fields/CustomFieldsCopyDialog.tsx
index 2b3964c2..92678c5e 100644
--- a/apps/web/src/features/settings/components/custom-fields/CustomFieldsCopyDialog.tsx
+++ b/apps/web/src/features/settings/components/custom-fields/CustomFieldsCopyDialog.tsx
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import Modal from '@/components/common/overlay/Modal';
import { Button } from '@/components/ui/button';
@@ -16,19 +17,19 @@ export default function CustomFieldsCopyDialog({
onChoose: (includeTypeScoped: boolean) => void;
onClose: () => void;
}) {
+ const t = useTranslations('settings.customFields');
+
return (
- <Modal title="Copy custom fields" onClose={onClose}>
+ <Modal title={t('copyTitle')} onClose={onClose}>
<div className="space-y-4">
<p className="text-sm text-muted-foreground">
- This project has {scopedCount} field{scopedCount === 1 ? '' : 's'} scoped to an issue
- type. Copy those too, or only the {globalCount} global field
- {globalCount === 1 ? '' : 's'}?
+ {t('copyQuestion', { scoped: scopedCount, global: globalCount })}
</p>
<div className="flex justify-end gap-2">
<Button variant="outline" onClick={() => onChoose(false)} disabled={globalCount === 0}>
- Global only
+ {t('copyGlobalOnly')}
</Button>
- <Button onClick={() => onChoose(true)}>Include type-scoped</Button>
+ <Button onClick={() => onChoose(true)}>{t('copyIncludeScoped')}</Button>
</div>
</div>
</Modal>
diff --git a/apps/web/src/features/settings/components/custom-fields/CustomFieldsImportDialog.tsx b/apps/web/src/features/settings/components/custom-fields/CustomFieldsImportDialog.tsx
index 3ffd8754..4d7af496 100644
--- a/apps/web/src/features/settings/components/custom-fields/CustomFieldsImportDialog.tsx
+++ b/apps/web/src/features/settings/components/custom-fields/CustomFieldsImportDialog.tsx
@@ -2,12 +2,13 @@
import { useState } from 'react';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import type { IssueType } from '@/lib/api';
import Modal from '@/components/common/overlay/Modal';
import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';
import { useCreateCustomField, useCreateIssueType } from '../../services/settings.service';
-import { FIELD_TYPE_LABELS } from './SettingsCustomFieldForm';
+import { useFieldTypeLabel } from './SettingsCustomFieldForm';
import type { CustomFieldsImportPlan } from '../../utils/customFieldsTransfer';
// Confirms a custom fields paste before applying it. Lists any issue types that will be
@@ -25,6 +26,9 @@ export default function CustomFieldsImportDialog({
existingTypes: IssueType[];
onClose: () => void;
}) {
+ const t = useTranslations('settings.customFields');
+ const tCommon = useTranslations('common');
+ const fieldTypeLabel = useFieldTypeLabel();
const createIssueType = useCreateIssueType(projectKey);
const createCustomField = useCreateCustomField(projectKey);
const [busy, setBusy] = useState(false);
@@ -35,7 +39,7 @@ export default function CustomFieldsImportDialog({
setBusy(true);
try {
const typeIdByName = new Map<string, number>(
- existingTypes.map((t) => [t.name.toLowerCase(), t.id]),
+ existingTypes.map((type) => [type.name.toLowerCase(), type.id]),
);
for (const name of plan.newTypeNames) {
const row = (await createIssueType.mutateAsync({ name })) as IssueType;
@@ -54,8 +58,12 @@ export default function CustomFieldsImportDialog({
});
}
toast.success(
- `Applied custom fields: ${toCreate.length} created` +
- (plan.newTypeNames.length ? `, ${plan.newTypeNames.length} issue type(s) added` : ''),
+ plan.newTypeNames.length
+ ? t('importedWithTypes', {
+ created: toCreate.length,
+ types: plan.newTypeNames.length,
+ })
+ : t('imported', { created: toCreate.length }),
);
onClose();
} catch {
@@ -65,13 +73,16 @@ export default function CustomFieldsImportDialog({
}
return (
- <Modal title="Apply custom fields from clipboard" onClose={onClose} wide>
+ <Modal title={t('importTitle')} onClose={onClose} wide>
<div className="space-y-4">
<p className="text-xs text-muted-foreground">
- {toCreate.length} field{toCreate.length === 1 ? '' : 's'} will be added
{plan.newTypeNames.length > 0
- ? `, and ${plan.newTypeNames.length} new issue type${plan.newTypeNames.length === 1 ? '' : 's'} created: ${plan.newTypeNames.join(', ')}.`
- : '.'}
+ ? t('importSummaryWithTypes', {
+ count: toCreate.length,
+ types: plan.newTypeNames.length,
+ names: plan.newTypeNames.join(', '),
+ })
+ : t('importSummary', { count: toCreate.length })}
</p>
<div className="max-h-[50vh] divide-y divide-border/60 overflow-y-auto rounded-md border border-border/60">
{plan.fields.map((field) => (
@@ -81,27 +92,26 @@ export default function CustomFieldsImportDialog({
>
<span className="min-w-0 flex-1 truncate text-sm font-medium">{field.name}</span>
<span className="shrink-0 text-xs text-muted-foreground">
- {FIELD_TYPE_LABELS[field.fieldType]}
+ {fieldTypeLabel(field.fieldType)}
</span>
<span className="w-28 shrink-0 truncate text-right text-xs text-muted-foreground">
- {field.type ?? 'Global'}
+ {field.type ?? t('globalShort')}
</span>
<Badge
variant={field.action === 'skip' ? 'outline' : 'secondary'}
className="w-14 shrink-0 justify-center px-1.5 py-0 text-[10px] font-normal"
>
- {field.action === 'create' ? 'New' : 'Exists'}
+ {t(field.action === 'create' ? 'actionNew' : 'actionExists')}
</Badge>
</div>
))}
</div>
<div className="flex justify-end gap-2">
<Button variant="outline" onClick={onClose} disabled={busy}>
- Cancel
+ {tCommon('cancel')}
</Button>
<Button onClick={apply} disabled={busy || toCreate.length === 0}>
- Apply {toCreate.length > 0 ? toCreate.length : ''} field
- {toCreate.length === 1 ? '' : 's'}
+ {t('importApply', { count: toCreate.length })}
</Button>
</div>
</div>
diff --git a/apps/web/src/features/settings/components/custom-fields/CustomFieldsToolbar.tsx b/apps/web/src/features/settings/components/custom-fields/CustomFieldsToolbar.tsx
index 2980e387..295ea6d9 100644
--- a/apps/web/src/features/settings/components/custom-fields/CustomFieldsToolbar.tsx
+++ b/apps/web/src/features/settings/components/custom-fields/CustomFieldsToolbar.tsx
@@ -3,6 +3,7 @@
import { useCallback, useEffect, useMemo, useState } from 'react';
import { ClipboardPaste, Copy, MoreHorizontal } from 'lucide-react';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import type { CustomField, IssueType, PermissionResource } from '@/lib/api';
import { Button } from '@/components/ui/button';
import {
@@ -14,6 +15,7 @@ import {
} from '@/components/ui/dropdown-menu';
import { usePermissions } from '@/hooks/usePermissions';
import { useIsMac } from '@/context/useHotkeys';
+import { useTransferErrorMessage } from '../../hooks/useTransferErrorMessage';
import CustomFieldsCopyDialog from './CustomFieldsCopyDialog';
import CustomFieldsImportDialog from './CustomFieldsImportDialog';
import {
@@ -36,6 +38,9 @@ export default function CustomFieldsToolbar({
fields: CustomField[];
types: IssueType[];
}) {
+ const t = useTranslations('settings.customFields');
+ const tTransfer = useTranslations('settings.transfer');
+ const transferError = useTransferErrorMessage();
const { can } = usePermissions();
const mod = useIsMac() ? '⌘' : 'Ctrl';
const [copyChoice, setCopyChoice] = useState(false);
@@ -51,19 +56,18 @@ export default function CustomFieldsToolbar({
await navigator.clipboard.writeText(
serializeCustomFields(fields, typeNameById, includeTypeScoped),
);
- const n = includeTypeScoped ? fields.length : globalCount;
- toast.success(`Copied ${n} field${n === 1 ? '' : 's'}.`);
+ toast.success(t('copied', { count: includeTypeScoped ? fields.length : globalCount }));
} catch {
- toast.error('Could not copy to the clipboard.');
+ toast.error(tTransfer('copyFailed'));
}
setCopyChoice(false);
},
- [fields, typeNameById, globalCount],
+ [fields, typeNameById, globalCount, t, tTransfer],
);
const copyFields = useCallback(async () => {
if (fields.length === 0) {
- toast.info('No custom fields to copy.');
+ toast.info(t('nothingToCopy'));
return;
}
// Only ask when there are type-scoped fields to decide about.
@@ -72,25 +76,23 @@ export default function CustomFieldsToolbar({
return;
}
await doCopy(true);
- }, [fields.length, scopedCount, doCopy]);
+ }, [fields.length, scopedCount, doCopy, t]);
const pasteFields = useCallback(async () => {
let text: string;
try {
text = await navigator.clipboard.readText();
} catch {
- toast.error('Could not read the clipboard.');
+ toast.error(tTransfer('readFailed'));
return;
}
try {
const parsed = parseCustomFieldsText(text);
setImporting(planCustomFieldsImport(parsed, types, fields));
} catch (err) {
- toast.error(
- err instanceof Error ? err.message : 'Could not read custom fields from the clipboard.',
- );
+ toast.error(transferError(err, t('parseFailed')));
}
- }, [types, fields]);
+ }, [types, fields, t, tTransfer, transferError]);
// Cmd/Ctrl+C copies, Cmd/Ctrl+V pastes — but only on this page, not while typing,
// and Cmd+C only when no text is selected (so an intentional text copy still works).
@@ -130,7 +132,7 @@ export default function CustomFieldsToolbar({
variant="ghost"
size="icon"
className="size-8 text-muted-foreground hover:text-foreground"
- aria-label="Custom field import and export"
+ aria-label={t('menu')}
>
<MoreHorizontal className="size-4" />
</Button>
@@ -138,12 +140,12 @@ export default function CustomFieldsToolbar({
<DropdownMenuContent align="end" className="w-56">
<DropdownMenuItem onClick={() => void copyFields()} disabled={fields.length === 0}>
<Copy className="size-4" />
- Copy custom fields
+ {t('copy')}
<DropdownMenuShortcut>{mod}C</DropdownMenuShortcut>
</DropdownMenuItem>
<DropdownMenuItem onClick={() => void pasteFields()}>
<ClipboardPaste className="size-4" />
- Paste custom fields
+ {t('paste')}
<DropdownMenuShortcut>{mod}V</DropdownMenuShortcut>
</DropdownMenuItem>
</DropdownMenuContent>
diff --git a/apps/web/src/features/settings/components/custom-fields/SettingsCustomFieldForm.tsx b/apps/web/src/features/settings/components/custom-fields/SettingsCustomFieldForm.tsx
index 2a3d43a5..c6b147a8 100644
--- a/apps/web/src/features/settings/components/custom-fields/SettingsCustomFieldForm.tsx
+++ b/apps/web/src/features/settings/components/custom-fields/SettingsCustomFieldForm.tsx
@@ -1,4 +1,5 @@
import { useState, type ReactNode } from 'react';
+import { useTranslations } from 'next-intl';
import { Check } from 'lucide-react';
import { type CustomFieldType } from '@/lib/api';
import { cn } from '@/lib/utils';
@@ -27,17 +28,11 @@ const FIELD_TYPES: CustomFieldType[] = [
];
// Display labels for the field types. The stored value stays the enum key; a few
-// read as jargon when shown raw, so they map to plain words here.
-export const FIELD_TYPE_LABELS: Record<CustomFieldType, string> = {
- text: 'text',
- markdown: 'markdown',
- url: 'url',
- number: 'number',
- boolean: 'checkbox',
- date: 'date',
- select: 'select',
- multi_select: 'multi-select',
-};
+// read as jargon when shown raw, so they map to plain words in the messages.
+export function useFieldTypeLabel() {
+ const t = useTranslations('settings.customFields.fieldTypes');
+ return (fieldType: CustomFieldType) => t(fieldType);
+}
export interface FieldFormValues {
name: string;
@@ -107,6 +102,9 @@ export function SettingsCustomFieldForm({
onSubmit: (values: FieldFormValues) => void;
onCancel: () => void;
}) {
+ const t = useTranslations('settings.customFields');
+ const tCommon = useTranslations('common');
+ const fieldTypeLabel = useFieldTypeLabel();
const [name, setName] = useState(initial?.name ?? '');
const [fieldType, setFieldType] = useState<CustomFieldType>(initial?.fieldType ?? 'text');
const [showInBody, setShowInBody] = useState(initial?.showInBody ?? false);
@@ -142,7 +140,7 @@ export function SettingsCustomFieldForm({
autoFocus
value={name}
onChange={(e) => setName(e.target.value)}
- placeholder="Field name"
+ placeholder={t('namePlaceholder')}
className="h-8 flex-1 bg-background"
onKeyDown={(e) => {
if (e.key === 'Enter' && !needsOptions) submit();
@@ -150,10 +148,10 @@ export function SettingsCustomFieldForm({
}}
/>
<Button size="sm" className="h-8" disabled={!name.trim()} onClick={submit}>
- {mode === 'add' ? 'Add' : 'Save'}
+ {mode === 'add' ? tCommon('add') : tCommon('save')}
</Button>
<Button variant="ghost" size="sm" className="h-8 text-muted-foreground" onClick={onCancel}>
- Cancel
+ {tCommon('cancel')}
</Button>
</div>
@@ -161,38 +159,38 @@ export function SettingsCustomFieldForm({
<Input
value={options}
onChange={(e) => setOptions(e.target.value)}
- placeholder="Options: Low, Medium, High"
+ placeholder={t('optionsPlaceholder')}
className="h-8 bg-background"
/>
)}
<div className="flex items-center gap-4">
<div className="flex items-center gap-1.5">
- <span className="text-xs text-muted-foreground">Type</span>
+ <span className="text-xs text-muted-foreground">{t('type')}</span>
{mode === 'add' ? (
<Select value={fieldType} onValueChange={(v) => changeType(v as CustomFieldType)}>
<SelectTrigger className="h-7 w-32 bg-background">
<SelectValue />
</SelectTrigger>
<SelectContent>
- {FIELD_TYPES.map((t) => (
- <SelectItem key={t} value={t}>
- {FIELD_TYPE_LABELS[t]}
+ {FIELD_TYPES.map((option) => (
+ <SelectItem key={option} value={option}>
+ {fieldTypeLabel(option)}
</SelectItem>
))}
</SelectContent>
</Select>
) : (
- <span className="text-xs text-foreground">{FIELD_TYPE_LABELS[fieldType]}</span>
+ <span className="text-xs text-foreground">{fieldTypeLabel(fieldType)}</span>
)}
</div>
<div className="flex items-center gap-1">
<Toggle
active={showInBody}
onClick={() => setShowInBody((v) => !v)}
- tooltip="Shows in the issue body, not Properties"
+ tooltip={t('mainInfoTooltip')}
>
- Main info
+ {t('mainInfo')}
</Toggle>
</div>
</div>
diff --git a/apps/web/src/features/settings/components/custom-fields/SettingsCustomFields.tsx b/apps/web/src/features/settings/components/custom-fields/SettingsCustomFields.tsx
index fe0ce21b..299a8c43 100644
--- a/apps/web/src/features/settings/components/custom-fields/SettingsCustomFields.tsx
+++ b/apps/web/src/features/settings/components/custom-fields/SettingsCustomFields.tsx
@@ -1,4 +1,5 @@
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import { ChevronRight, Plus } from 'lucide-react';
import { type CustomField, type NewCustomFieldInput, type ProjectDetail } from '@/lib/api';
import { cn } from '@/lib/utils';
@@ -11,7 +12,7 @@ import {
useDeleteCustomField,
useUpdateCustomField,
} from '../../services/settings.service';
-import { SettingsCustomFieldForm, FIELD_TYPE_LABELS } from './SettingsCustomFieldForm';
+import { SettingsCustomFieldForm, useFieldTypeLabel } from './SettingsCustomFieldForm';
// Which group's inline add form is open: 'global' for the project-wide field group,
// or a issue type id for a type-scoped group. null when no form is open.
@@ -25,6 +26,8 @@ export default function SettingsCustomFields({ project }: { project: ProjectDeta
// Groups the user has collapsed, keyed by scope; every group is expanded by default.
const [collapsed, setCollapsed] = useState<Set<string>>(new Set());
+ const t = useTranslations('settings.customFields');
+ const fieldTypeLabel = useFieldTypeLabel();
const can = useSettingsCan();
const createCustomField = useCreateCustomField(projectKey);
const updateCustomField = useUpdateCustomField(projectKey);
@@ -34,13 +37,13 @@ export default function SettingsCustomFields({ project }: { project: ProjectDeta
const groups: { scope: AddScope; label: string; fields: CustomField[] }[] = [
{
scope: 'global',
- label: 'Global (all types)',
+ label: t('global'),
fields: fields.filter((f) => f.issueTypeId == null),
},
- ...project.issueTypes.map((t) => ({
- scope: t.id as AddScope,
- label: t.name,
- fields: fields.filter((f) => f.issueTypeId === t.id),
+ ...project.issueTypes.map((type) => ({
+ scope: type.id as AddScope,
+ label: type.name,
+ fields: fields.filter((f) => f.issueTypeId === type.id),
})),
];
@@ -96,8 +99,8 @@ export default function SettingsCustomFields({ project }: { project: ProjectDeta
);
}
const meta = [
- FIELD_TYPE_LABELS[f.fieldType],
- f.showInBody ? 'main info' : null,
+ fieldTypeLabel(f.fieldType),
+ f.showInBody ? t('mainInfoMeta') : null,
f.options.length ? f.options.map((o) => o.value).join(', ') : null,
]
.filter(Boolean)
@@ -108,8 +111,8 @@ export default function SettingsCustomFields({ project }: { project: ProjectDeta
className="h-11 pl-9"
title={f.name}
meta={meta}
- editTitle="Edit field"
- deleteTitle="Delete field"
+ editTitle={t('editField')}
+ deleteTitle={t('deleteField')}
onEdit={() => startEdit(f)}
onDelete={() => setDeleting(f)}
/>
@@ -152,8 +155,8 @@ export default function SettingsCustomFields({ project }: { project: ProjectDeta
variant="ghost"
size="icon"
className="size-7 text-muted-foreground hover:text-foreground"
- title="Add field"
- aria-label={`Add field to ${g.label}`}
+ title={t('addField')}
+ aria-label={t('addFieldTo', { group: g.label })}
onClick={() => openAdd(g.scope)}
>
<Plus className="size-4" />
@@ -174,7 +177,7 @@ export default function SettingsCustomFields({ project }: { project: ProjectDeta
</div>
)}
{g.fields.length === 0 && !adding && (
- <p className="py-3 pl-9 text-xs text-muted-foreground">No fields yet.</p>
+ <p className="py-3 pl-9 text-xs text-muted-foreground">{t('noFields')}</p>
)}
</div>
)}
@@ -185,13 +188,9 @@ export default function SettingsCustomFields({ project }: { project: ProjectDeta
{deleting && (
<SettingsConfirmDeleteDialog
- title={`Delete field "${deleting.name}"`}
- confirmLabel="Delete field"
- message={
- <>
- This field and any values set for it on issues will be removed. This cannot be undone.
- </>
- }
+ title={t('deleteTitle', { name: deleting.name })}
+ confirmLabel={t('deleteField')}
+ message={t('deleteMessage')}
onClose={() => setDeleting(null)}
onConfirm={async () => {
await deleteCustomField.mutateAsync(deleting.id);
diff --git a/apps/web/src/features/settings/components/general/SettingsFeatures.tsx b/apps/web/src/features/settings/components/general/SettingsFeatures.tsx
index 6ae58af2..df9dcdf2 100644
--- a/apps/web/src/features/settings/components/general/SettingsFeatures.tsx
+++ b/apps/web/src/features/settings/components/general/SettingsFeatures.tsx
@@ -1,42 +1,43 @@
+import { useTranslations } from 'next-intl';
import type { ProjectFeatures } from '@/lib/api';
-import { FEATURE_LABEL } from '@/utils/projectFeatures';
+import { useFeatureLabel } from '@/hooks/useFeatureLabel';
import SettingsCard from '@/components/common/page/SettingsCard';
import SettingsSection from '@/components/common/page/SettingsSection';
import SettingsRow from '@/components/common/page/SettingsRow';
import { Switch } from '@/components/ui/switch';
import type { FeatureTogglesForm } from '../../hooks/useFeatureToggles';
-// What each optional section holds: the navigation sections in the order the
-// sidebar lists them, then the sections of an issue.
-const FEATURES: { key: keyof ProjectFeatures; description: string }[] = [
- { key: 'dashboards', description: 'Charts and metrics on saved dashboards.' },
- { key: 'initiatives', description: 'Groups of issues tracked as one piece of work.' },
- { key: 'cycles', description: 'Time-boxed periods of work the issues are planned into.' },
- { key: 'notes', description: 'Freeform boards of sticky notes.' },
- { key: 'subtasks', description: 'Issues broken down into subtasks under a parent.' },
- { key: 'checklists', description: 'Lists of steps tracked inside an issue.' },
- { key: 'issueStats', description: 'How long an issue spent in each state.' },
-];
+// The navigation sections in the order the sidebar lists them, then the sections
+// of an issue.
+const FEATURES = [
+ 'dashboards',
+ 'initiatives',
+ 'cycles',
+ 'notes',
+ 'subtasks',
+ 'checklists',
+ 'issueStats',
+] as const satisfies (keyof ProjectFeatures)[];
// The Features block of the General page. Each switch saves on its own. Only an
// owner may change them; others see the current state read-only.
export default function SettingsFeatures({ form }: { form: FeatureTogglesForm }) {
+ const t = useTranslations('settings.general');
+ const featureLabel = useFeatureLabel();
+
return (
- <SettingsSection
- title="Features"
- description="Sections this project shows. Turning one off hides it and keeps its content."
- >
+ <SettingsSection title={t('features')} description={t('featuresHint')}>
<SettingsCard className="divide-y divide-border/60">
{FEATURES.map((feature) => (
<SettingsRow
- key={feature.key}
- title={FEATURE_LABEL[feature.key]}
- description={feature.description}
+ key={feature}
+ title={featureLabel(feature)}
+ description={t(`featureHints.${feature}`)}
control={
<Switch
- checked={form.features[feature.key]}
+ checked={form.features[feature]}
disabled={!form.editable || form.saving}
- onCheckedChange={(enabled) => void form.toggle(feature.key, enabled)}
+ onCheckedChange={(enabled) => void form.toggle(feature, enabled)}
/>
}
/>
diff --git a/apps/web/src/features/settings/components/general/SettingsGeneral.tsx b/apps/web/src/features/settings/components/general/SettingsGeneral.tsx
index 75899d4d..ce783514 100644
--- a/apps/web/src/features/settings/components/general/SettingsGeneral.tsx
+++ b/apps/web/src/features/settings/components/general/SettingsGeneral.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { Textarea } from '@/components/ui/textarea';
@@ -9,15 +10,18 @@ import type { GeneralForm } from '../../hooks/useGeneralForm';
// every issue and cannot change. Only an owner may edit; others see the values
// read-only.
export default function SettingsGeneral({ form }: { form: GeneralForm }) {
+ const t = useTranslations('settings.general');
+ const tCommon = useTranslations('common');
+
return (
- <SettingsSection title="Project" description="The key prefixes every issue and cannot change.">
+ <SettingsSection title={t('project')} description={t('projectHint')}>
<SettingsCard className="space-y-4 p-4">
<div className="space-y-1.5">
- <Label htmlFor="project-key">Key</Label>
+ <Label htmlFor="project-key">{t('key')}</Label>
<Input id="project-key" value={form.key} disabled readOnly />
</div>
<div className="space-y-1.5">
- <Label htmlFor="project-name">Name</Label>
+ <Label htmlFor="project-name">{tCommon('name')}</Label>
<Input
id="project-name"
value={form.name}
@@ -26,7 +30,7 @@ export default function SettingsGeneral({ form }: { form: GeneralForm }) {
/>
</div>
<div className="space-y-1.5">
- <Label htmlFor="project-description">Description</Label>
+ <Label htmlFor="project-description">{tCommon('description')}</Label>
<Textarea
id="project-description"
rows={3}
diff --git a/apps/web/src/features/settings/components/github/GithubAutomationsCard.tsx b/apps/web/src/features/settings/components/github/GithubAutomationsCard.tsx
index 85cc2a02..9bdb512f 100644
--- a/apps/web/src/features/settings/components/github/GithubAutomationsCard.tsx
+++ b/apps/web/src/features/settings/components/github/GithubAutomationsCard.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import type { Column, GithubSettings } from '@/lib/api';
import SettingsCard from '@/components/common/page/SettingsCard';
import SettingsSection from '@/components/common/page/SettingsSection';
@@ -17,38 +18,32 @@ export default function GithubAutomationsCard({
editable: boolean;
onChange: (patch: { onMergeColumnId?: number | null; onOpenColumnId?: number | null }) => void;
}) {
+ const t = useTranslations('settings.github');
+
return (
- <SettingsSection
- title="Pull request automations"
- description={
- 'Write a magic word and an issue ID in a pull request title or description, like ' +
- '“Closes KEY-123”. Close, fix, resolve, complete, and implement close the issue when ' +
- 'the PR merges. Ref, part of, and related to link it without closing. Write ' +
- '“skip KEY-123” to leave an issue out.'
- }
- >
+ <SettingsSection title={t('automations')} description={t('automationsHint')}>
<SettingsCard className="divide-y divide-border/60">
<SettingsRow
- title="When a linked PR is merged"
- description="The issue moves to this state when the PR merges into the default branch."
+ title={t('onMerge')}
+ description={t('onMergeHint')}
control={
<GithubColumnSelect
columns={columns}
value={settings.onMergeColumnId}
- noneLabel="First completed state"
+ noneLabel={t('onMergeNone')}
readOnly={!editable}
onChange={(id) => onChange({ onMergeColumnId: id })}
/>
}
/>
<SettingsRow
- title="When a linked PR is opened"
- description="Only moves issues that haven't been started. Issues in progress or closed stay where they are."
+ title={t('onOpen')}
+ description={t('onOpenHint')}
control={
<GithubColumnSelect
columns={columns}
value={settings.onOpenColumnId}
- noneLabel="No action"
+ noneLabel={t('onOpenNone')}
readOnly={!editable}
onChange={(id) => onChange({ onOpenColumnId: id })}
/>
diff --git a/apps/web/src/features/settings/components/github/GithubCliCommand.tsx b/apps/web/src/features/settings/components/github/GithubCliCommand.tsx
index e8739e0e..1b8bc99b 100644
--- a/apps/web/src/features/settings/components/github/GithubCliCommand.tsx
+++ b/apps/web/src/features/settings/components/github/GithubCliCommand.tsx
@@ -1,4 +1,5 @@
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import { Button } from '@/components/ui/button';
// A copyable `gh` command that registers the repository webhook in one step. The
@@ -12,6 +13,8 @@ export default function GithubCliCommand({
payloadUrl: string;
secret: string;
}) {
+ const t = useTranslations('settings.github');
+ const tCommon = useTranslations('common');
const command = (secretText: string) =>
[
'gh api repos/<owner>/<repo>/hooks',
@@ -21,28 +24,30 @@ export default function GithubCliCommand({
async function copy() {
await navigator.clipboard.writeText(command(secret));
- toast.success('Command copied. Replace <owner>/<repo>, then run it.');
+ toast.success(t('commandCopied'));
}
return (
<div className="space-y-1.5">
<div className="flex items-center justify-between">
<p className="text-xs text-muted-foreground">
- Requires the{' '}
- <a
- href="https://cli.github.com/"
- target="_blank"
- rel="noreferrer"
- className="text-foreground/70 underline underline-offset-2 hover:text-foreground"
- >
- GitHub CLI
- </a>
- . Copy this command, replace{' '}
- <code className="rounded bg-muted px-1 py-0.5">{'<owner>/<repo>'}</code> with your
- repository, and run it in a terminal.
+ {t.rich('cliHint', {
+ placeholder: '<owner>/<repo>',
+ link: (chunks) => (
+ <a
+ href="https://cli.github.com/"
+ target="_blank"
+ rel="noreferrer"
+ className="text-foreground/70 underline underline-offset-2 hover:text-foreground"
+ >
+ {chunks}
+ </a>
+ ),
+ code: (chunks) => <code className="rounded bg-muted px-1 py-0.5">{chunks}</code>,
+ })}
</p>
<Button variant="outline" size="sm" onClick={() => void copy()}>
- Copy
+ {tCommon('copy')}
</Button>
</div>
<pre className="overflow-x-auto rounded-md bg-muted px-3 py-2 font-mono text-xs whitespace-pre">
diff --git a/apps/web/src/features/settings/components/github/GithubColumnSelect.tsx b/apps/web/src/features/settings/components/github/GithubColumnSelect.tsx
index 8b5ef432..2ca6f8e5 100644
--- a/apps/web/src/features/settings/components/github/GithubColumnSelect.tsx
+++ b/apps/web/src/features/settings/components/github/GithubColumnSelect.tsx
@@ -1,4 +1,5 @@
import { CircleDashed } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import type { Column } from '@/lib/api';
import { colorDot } from '@/components/common/fields/colorDot';
import { Pill } from '@/components/common/fields/Pill';
@@ -19,6 +20,7 @@ export default function GithubColumnSelect({
readOnly?: boolean;
onChange: (id: number | null) => void;
}) {
+ const t = useTranslations('settings.github');
const column = value == null ? undefined : columns.find((c) => c.id === value);
return (
<PopoverPick
@@ -29,8 +31,8 @@ export default function GithubColumnSelect({
<span className="whitespace-nowrap">{column?.name ?? noneLabel}</span>
</Pill>
}
- inputPlaceholder="Change state…"
- emptyText="No state."
+ inputPlaceholder={t('changeState')}
+ emptyText={t('noState')}
items={[
{
key: 'none',
diff --git a/apps/web/src/features/settings/components/github/GithubConnectionCard.tsx b/apps/web/src/features/settings/components/github/GithubConnectionCard.tsx
index 1fac1144..0307f4cc 100644
--- a/apps/web/src/features/settings/components/github/GithubConnectionCard.tsx
+++ b/apps/web/src/features/settings/components/github/GithubConnectionCard.tsx
@@ -1,11 +1,13 @@
import { formatDistanceToNow, parseISO } from 'date-fns';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import { API_URL, type GithubSettings } from '@/lib/api';
import SettingsCard from '@/components/common/page/SettingsCard';
import SettingsSection from '@/components/common/page/SettingsSection';
import SettingsRow from '@/components/common/page/SettingsRow';
import { Button } from '@/components/ui/button';
import { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/ui/tabs';
+import { useDateFnsLocale } from '@/hooks/useDateFnsLocale';
import { useRegenerateGithubSecret } from '../../services/settings.service';
import GithubCopyField from './GithubCopyField';
import GithubCliCommand from './GithubCliCommand';
@@ -22,34 +24,42 @@ export default function GithubConnectionCard({
settings: GithubSettings;
editable: boolean;
}) {
+ const t = useTranslations('settings.github');
+ const locale = useDateFnsLocale();
const regenerate = useRegenerateGithubSecret(projectKey);
const payloadUrl = `${API_URL}/webhooks/github/${settings.webhookId}`;
+ function lastDeliveryText() {
+ if (!settings.lastEventAt) return t('noDelivery');
+ const ago = formatDistanceToNow(parseISO(settings.lastEventAt), { addSuffix: true, locale });
+ return settings.lastEventRepo
+ ? t('lastDeliveryFrom', { ago, repo: settings.lastEventRepo })
+ : t('lastDeliveryAt', { ago });
+ }
+
async function regenerateSecret() {
await regenerate.mutateAsync();
- toast.success('New secret created. Update it in your GitHub webhook too.');
+ toast.success(t('secretRegenerated'));
}
return (
- <SettingsSection title="Connection" description="Connect a GitHub repository to this project.">
+ <SettingsSection title={t('connection')} description={t('connectionHint')}>
<SettingsCard className="divide-y divide-border/60">
{settings.secret == null ? (
- <p className="p-4 text-xs text-muted-foreground">
- Only members who can edit integrations can see the connection details.
- </p>
+ <p className="p-4 text-xs text-muted-foreground">{t('connectionRestricted')}</p>
) : (
<Tabs defaultValue="cli" className="p-4">
<TabsList variant="line">
- <TabsTrigger value="cli">GitHub CLI</TabsTrigger>
- <TabsTrigger value="manual">Manual</TabsTrigger>
+ <TabsTrigger value="cli">{t('tabCli')}</TabsTrigger>
+ <TabsTrigger value="manual">{t('tabManual')}</TabsTrigger>
</TabsList>
<TabsContent value="cli" className="mt-4">
<GithubCliCommand payloadUrl={payloadUrl} secret={settings.secret} />
</TabsContent>
<TabsContent value="manual" className="mt-4 space-y-4">
- <GithubCopyField label="Payload URL" value={payloadUrl} />
+ <GithubCopyField label={t('payloadUrl')} value={payloadUrl} />
<GithubCopyField
- label="Webhook secret"
+ label={t('webhookSecret')}
value={settings.secret}
masked
action={
@@ -60,28 +70,23 @@ export default function GithubConnectionCard({
disabled={regenerate.isPending}
onClick={() => void regenerateSecret()}
>
- Regenerate
+ {t('regenerate')}
</Button>
) : undefined
}
/>
<p className="text-xs text-muted-foreground">
- In your GitHub repository, open <b>Settings → Webhooks → Add webhook</b>. Paste the
- payload URL and secret, set the content type to{' '}
- <code className="rounded bg-muted px-1 py-0.5">application/json</code>, and choose
- only the <b>Pull requests</b> event.
+ {t.rich('manualHint', {
+ b: (chunks) => <b>{chunks}</b>,
+ code: (chunks) => <code className="rounded bg-muted px-1 py-0.5">{chunks}</code>,
+ })}
</p>
</TabsContent>
</Tabs>
)}
<SettingsRow
- title="Last delivery"
- description={
- settings.lastEventAt
- ? `Received ${formatDistanceToNow(parseISO(settings.lastEventAt), { addSuffix: true })}` +
- (settings.lastEventRepo ? ` from ${settings.lastEventRepo}` : '')
- : 'Nothing received yet.'
- }
+ title={t('lastDelivery')}
+ description={lastDeliveryText()}
control={<span />}
/>
</SettingsCard>
diff --git a/apps/web/src/features/settings/components/github/GithubCopyField.tsx b/apps/web/src/features/settings/components/github/GithubCopyField.tsx
index 256b09dc..94db2306 100644
--- a/apps/web/src/features/settings/components/github/GithubCopyField.tsx
+++ b/apps/web/src/features/settings/components/github/GithubCopyField.tsx
@@ -1,4 +1,5 @@
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import { toast } from 'sonner';
import type { ReactNode } from 'react';
import { Button } from '@/components/ui/button';
@@ -17,11 +18,13 @@ export default function GithubCopyField({
masked?: boolean;
action?: ReactNode;
}) {
+ const t = useTranslations('settings.github');
+ const tCommon = useTranslations('common');
const [revealed, setRevealed] = useState(false);
async function copy() {
await navigator.clipboard.writeText(value);
- toast.success(`${label} copied`);
+ toast.success(t('copied', { label }));
}
return (
@@ -35,7 +38,7 @@ export default function GithubCopyField({
onFocus={() => setRevealed(true)}
/>
<Button variant="outline" size="sm" onClick={() => void copy()}>
- Copy
+ {tCommon('copy')}
</Button>
{action}
</div>
diff --git a/apps/web/src/features/settings/components/github/SettingsGithub.tsx b/apps/web/src/features/settings/components/github/SettingsGithub.tsx
index 26646088..da6d4739 100644
--- a/apps/web/src/features/settings/components/github/SettingsGithub.tsx
+++ b/apps/web/src/features/settings/components/github/SettingsGithub.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import type { ProjectDetail } from '@/lib/api';
import ListSkeleton from '@/components/common/skeleton/ListSkeleton';
import SettingsCard from '@/components/common/page/SettingsCard';
@@ -12,6 +13,7 @@ import GithubAutomationsCard from './GithubAutomationsCard';
// connection and the pull request automations. Every control writes immediately;
// there is no form-level save.
export default function SettingsGithub({ project }: { project: ProjectDetail }) {
+ const t = useTranslations('settings.github');
const projectKey = project.project.key;
const { can } = usePermissions();
const settingsQuery = useGithubSettingsQuery(projectKey);
@@ -26,8 +28,8 @@ export default function SettingsGithub({ project }: { project: ProjectDetail })
<div className="space-y-10">
<SettingsCard>
<SettingsRow
- title="Enable GitHub integration"
- description="A pull request that mentions an issue, like “Closes KEY-123”, is linked to it."
+ title={t('enable')}
+ description={t('enableHint')}
control={
<Switch
checked={settings.enabled}
diff --git a/apps/web/src/features/settings/components/integrations/CredentialDialog.tsx b/apps/web/src/features/settings/components/integrations/CredentialDialog.tsx
index 5c7ef598..73e5478f 100644
--- a/apps/web/src/features/settings/components/integrations/CredentialDialog.tsx
+++ b/apps/web/src/features/settings/components/integrations/CredentialDialog.tsx
@@ -3,6 +3,7 @@ import type { IntegrationCredential, IntegrationMeta } from '@/lib/api';
import Modal from '@/components/common/overlay/Modal';
import { IntegrationPicker } from './IntegrationPicker';
import { CredentialForm } from './CredentialForm';
+import { useTranslations } from 'next-intl';
// Add or edit an integration credential. Adding is two steps: pick the integration from
// the searchable, grouped catalog (IntegrationPicker), then fill its credential form
@@ -19,6 +20,7 @@ export function CredentialDialog({
existing: IntegrationCredential | null;
onClose: () => void;
}) {
+ const t = useTranslations('settings.integrations');
const isEdit = existing != null;
const [integrationKey, setIntegrationKey] = useState<string | null>(
existing?.integrationKey ?? null,
@@ -27,7 +29,7 @@ export function CredentialDialog({
if (!isEdit && !meta) {
return (
- <Modal title="Add credential" projectKey={projectKey} onClose={onClose} wide>
+ <Modal title={t('add')} projectKey={projectKey} onClose={onClose} wide>
<IntegrationPicker catalog={catalog} onSelect={setIntegrationKey} />
</Modal>
);
@@ -37,11 +39,7 @@ export function CredentialDialog({
if (!meta) return null;
return (
- <Modal
- title={isEdit ? 'Edit credential' : 'Add credential'}
- projectKey={projectKey}
- onClose={onClose}
- >
+ <Modal title={isEdit ? t('edit') : t('add')} projectKey={projectKey} onClose={onClose}>
<CredentialForm
projectKey={projectKey}
meta={meta}
diff --git a/apps/web/src/features/settings/components/integrations/CredentialForm.tsx b/apps/web/src/features/settings/components/integrations/CredentialForm.tsx
index bc3c75f5..2a9c7665 100644
--- a/apps/web/src/features/settings/components/integrations/CredentialForm.tsx
+++ b/apps/web/src/features/settings/components/integrations/CredentialForm.tsx
@@ -7,6 +7,7 @@ import { Label } from '@/components/ui/label';
import { Checkbox } from '@/components/ui/checkbox';
import { useCreateCredential, useUpdateCredential } from '@/services/integrations.service';
import { IntegrationIcon } from './IntegrationIcon';
+import { useTranslations } from 'next-intl';
type FieldValue = string | boolean;
@@ -52,6 +53,8 @@ export function CredentialForm({
onBack?: () => void;
onDone: () => void;
}) {
+ const t = useTranslations('settings.integrations');
+ const tCommon = useTranslations('common');
const isEdit = existing != null;
const [label, setLabel] = useState(existing?.label ?? '');
const [values, setValues] = useState<Record<string, FieldValue>>(() =>
@@ -120,7 +123,7 @@ export function CredentialForm({
size="icon"
className="size-8 shrink-0"
onClick={onBack}
- aria-label="Back to integrations"
+ aria-label={t('back')}
>
<ChevronLeft className="size-4" />
</Button>
@@ -163,23 +166,21 @@ export function CredentialForm({
))}
<div className="space-y-1.5">
- <Label>Label (optional)</Label>
+ <Label>{t('label')}</Label>
<Input
value={label}
onChange={(e) => setLabel(e.target.value)}
- placeholder="e.g. Team account"
+ placeholder={t('labelPlaceholder')}
/>
- <p className="text-xs text-muted-foreground">
- Helps tell apart credentials of the same integration. Secrets are stored encrypted.
- </p>
+ <p className="text-xs text-muted-foreground">{t('labelHint')}</p>
</div>
<div className="flex justify-end gap-2">
<Button variant="outline" onClick={onDone} disabled={busy}>
- Cancel
+ {tCommon('cancel')}
</Button>
<Button onClick={submit} disabled={!canSubmit}>
- {isEdit ? 'Save' : 'Add credential'}
+ {isEdit ? tCommon('save') : t('add')}
</Button>
</div>
</div>
diff --git a/apps/web/src/features/settings/components/integrations/CredentialRow.tsx b/apps/web/src/features/settings/components/integrations/CredentialRow.tsx
index 0987acd5..3fb45516 100644
--- a/apps/web/src/features/settings/components/integrations/CredentialRow.tsx
+++ b/apps/web/src/features/settings/components/integrations/CredentialRow.tsx
@@ -3,6 +3,7 @@ import type { IntegrationCredential } from '@/lib/api';
import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';
import { TableCell, TableRow } from '@/components/ui/table';
+import { useTranslations } from 'next-intl';
// One credential as a table row: the integration name and optional account label,
// the redacted fields as badges, and edit/delete actions gated by permission.
@@ -21,6 +22,7 @@ export function CredentialRow({
onEdit: () => void;
onDelete: () => void;
}) {
+ const t = useTranslations('settings.integrations');
const fields = Object.entries(credential.redacted);
return (
<TableRow className="group/item">
@@ -47,7 +49,7 @@ export function CredentialRow({
))}
</div>
) : (
- <span className="text-xs text-muted-foreground">No fields</span>
+ <span className="text-xs text-muted-foreground">{t('noFields')}</span>
)}
</TableCell>
<TableCell className="px-3 py-2 pt-3 align-top">
@@ -58,7 +60,7 @@ export function CredentialRow({
size="icon"
className="size-8 text-muted-foreground hover:text-foreground"
onClick={onEdit}
- aria-label="Edit credential"
+ aria-label={t('edit')}
>
<Pencil className="size-4" />
</Button>
@@ -69,7 +71,7 @@ export function CredentialRow({
size="icon"
className="size-8 text-muted-foreground hover:text-destructive"
onClick={onDelete}
- aria-label="Delete credential"
+ aria-label={t('delete')}
>
<Trash2 className="size-4" />
</Button>
diff --git a/apps/web/src/features/settings/components/integrations/IntegrationPicker.tsx b/apps/web/src/features/settings/components/integrations/IntegrationPicker.tsx
index aa073bf0..39505fa2 100644
--- a/apps/web/src/features/settings/components/integrations/IntegrationPicker.tsx
+++ b/apps/web/src/features/settings/components/integrations/IntegrationPicker.tsx
@@ -3,13 +3,13 @@ import { Search } from 'lucide-react';
import type { IntegrationMeta } from '@/lib/api';
import { Input } from '@/components/ui/input';
import { IntegrationIcon } from './IntegrationIcon';
+import { useTranslations } from 'next-intl';
// The groups the catalog is split into, in display order. LLM providers first, tool
// integrations second.
-const GROUPS: { kind: IntegrationMeta['kind']; title: string; hint: string }[] = [
- { kind: 'llm', title: 'AI providers', hint: 'The model an internal agent runs on' },
- { kind: 'tool', title: 'Tools', hint: 'Integrations an agent can call as tools' },
-];
+// The two kinds of integration, in picker order. Their name and blurb are
+// messages under `settings.integrations.groups`.
+const GROUPS: { kind: IntegrationMeta['kind'] }[] = [{ kind: 'llm' }, { kind: 'tool' }];
// Step one of adding a credential: pick the integration. The catalog is long (~150 LLM
// providers), so it is a full-width searchable list grouped by kind rather than a
@@ -21,6 +21,7 @@ export function IntegrationPicker({
catalog: IntegrationMeta[];
onSelect: (key: string) => void;
}) {
+ const t = useTranslations('settings.integrations');
const [query, setQuery] = useState('');
const matches = useMemo(() => {
@@ -39,7 +40,7 @@ export function IntegrationPicker({
autoFocus
value={query}
onChange={(e) => setQuery(e.target.value)}
- placeholder="Search integrations"
+ placeholder={t('search')}
className="pl-9"
/>
</div>
@@ -47,19 +48,19 @@ export function IntegrationPicker({
<div className="max-h-[55vh] space-y-5 overflow-y-auto pr-1">
{matches.length === 0 && (
<p className="py-6 text-center text-sm text-muted-foreground">
- No integration matches “{query.trim()}”.
+ {t('noMatches', { query: query.trim() })}
</p>
)}
- {GROUPS.map(({ kind, title, hint }) => {
+ {GROUPS.map(({ kind }) => {
const items = matches.filter((c) => c.kind === kind);
if (items.length === 0) return null;
return (
<div key={kind} className="space-y-1.5">
<div className="flex items-baseline gap-2 px-1">
<h3 className="text-xs font-semibold tracking-wide text-foreground uppercase">
- {title}
+ {t(`groups.${kind}.title`)}
</h3>
- <span className="text-xs text-muted-foreground">{hint}</span>
+ <span className="text-xs text-muted-foreground">{t(`groups.${kind}.hint`)}</span>
</div>
<div className="grid grid-cols-1 gap-1.5 sm:grid-cols-2">
{items.map((integration) => (
diff --git a/apps/web/src/features/settings/components/integrations/SettingsIntegrations.tsx b/apps/web/src/features/settings/components/integrations/SettingsIntegrations.tsx
index 1f5a185c..ee8acd11 100644
--- a/apps/web/src/features/settings/components/integrations/SettingsIntegrations.tsx
+++ b/apps/web/src/features/settings/components/integrations/SettingsIntegrations.tsx
@@ -11,11 +11,14 @@ import SettingsConfirmDeleteDialog from '../crud/SettingsConfirmDeleteDialog';
import { useSettingsCan } from '../../context/settingsPermission';
import { CredentialDialog } from './CredentialDialog';
import { CredentialRow } from './CredentialRow';
+import { useTranslations } from 'next-intl';
// Project settings for integration credentials: the API keys of AI providers and the
// credentials of tool integrations. Secrets are write-only, so the list shows only a
// masked view. Adding and editing happen in a dialog; deleting confirms first.
export default function SettingsIntegrations({ project }: { project: ProjectDetail }) {
+ const t = useTranslations('settings.integrations');
+ const tCommon = useTranslations('common');
const projectKey = project.project.key;
const credentialsQuery = useCredentialsQuery(projectKey);
const credentials = credentialsQuery.data ?? [];
@@ -33,10 +36,7 @@ export default function SettingsIntegrations({ project }: { project: ProjectDeta
return (
<>
{credentials.length === 0 ? (
- <EmptyState
- title="No credentials yet"
- description="Agents can't use an AI provider or a tool without one."
- />
+ <EmptyState title={t('empty')} description={t('emptyHint')} />
) : (
<div className="space-y-4">
<Table className="min-w-[720px] table-fixed">
@@ -48,13 +48,13 @@ export default function SettingsIntegrations({ project }: { project: ProjectDeta
<TableHeader>
<TableRow className="hover:bg-transparent">
<TableHead className="text-xs font-medium text-muted-foreground">
- Integration
+ {t('columns.integration')}
</TableHead>
<TableHead className="text-xs font-medium text-muted-foreground">
- Credentials
+ {t('columns.credentials')}
</TableHead>
<TableHead className="text-right text-xs font-medium text-muted-foreground">
- Actions
+ {tCommon('actions')}
</TableHead>
</TableRow>
</TableHeader>
@@ -86,13 +86,10 @@ export default function SettingsIntegrations({ project }: { project: ProjectDeta
{deleting && (
<SettingsConfirmDeleteDialog
- title="Delete credential"
- confirmLabel="Delete credential"
+ title={t('delete')}
+ confirmLabel={t('delete')}
message={
- <>
- Delete the {integrationLabel(deleting.integrationKey)} credential? Agents and tools
- using it will stop working until you add a new one.
- </>
+ <>{t('deleteMessage', { integration: integrationLabel(deleting.integrationKey) })}</>
}
onConfirm={async () => {
await deleteCredential.mutateAsync(deleting.id);
diff --git a/apps/web/src/features/settings/components/issue-types/IssueTypesImportDialog.tsx b/apps/web/src/features/settings/components/issue-types/IssueTypesImportDialog.tsx
index 05946eae..f0633283 100644
--- a/apps/web/src/features/settings/components/issue-types/IssueTypesImportDialog.tsx
+++ b/apps/web/src/features/settings/components/issue-types/IssueTypesImportDialog.tsx
@@ -2,13 +2,14 @@
import { useState } from 'react';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import { colorDot } from '@/components/common/fields/colorDot';
import Modal from '@/components/common/overlay/Modal';
import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';
import { useCreateIssueType, useUpdateIssueType } from '../../services/settings.service';
import type { PlannedIssueType } from '../../utils/issueTypesTransfer';
-import { transferActionLabel } from '../../utils/transferAction';
+import { useTransferActionLabel } from '../../utils/transferAction';
// Confirms an issue types paste before applying it: lists each incoming type and
// whether it is created or updates an existing type's color. On confirm, new types are
@@ -22,6 +23,9 @@ export default function IssueTypesImportDialog({
planned: PlannedIssueType[];
onClose: () => void;
}) {
+ const t = useTranslations('settings.issueTypes');
+ const tCommon = useTranslations('common');
+ const actionLabel = useTransferActionLabel();
const createIssueType = useCreateIssueType(projectKey);
const updateIssueType = useUpdateIssueType(projectKey);
const [busy, setBusy] = useState(false);
@@ -47,7 +51,7 @@ export default function IssueTypesImportDialog({
updated += 1;
}
}
- toast.success(`Applied issue types: ${created} created, ${updated} updated.`);
+ toast.success(t('imported', { created, updated }));
onClose();
} catch {
// The failed mutation is toasted by the global handler; keep the dialog open.
@@ -56,11 +60,10 @@ export default function IssueTypesImportDialog({
}
return (
- <Modal title="Apply issue types from clipboard" onClose={onClose} wide>
+ <Modal title={t('importTitle')} onClose={onClose} wide>
<div className="space-y-4">
<p className="text-xs text-muted-foreground">
- {applicable.length} issue type{applicable.length === 1 ? '' : 's'} will be applied. A
- matching type only has its color updated.
+ {t('importSummary', { count: applicable.length })}
</p>
<div className="max-h-[50vh] divide-y divide-border/60 overflow-y-auto rounded-md border border-border/60">
{planned.map((type) => (
@@ -71,18 +74,17 @@ export default function IssueTypesImportDialog({
variant={type.action === 'unchanged' ? 'outline' : 'secondary'}
className="shrink-0 px-1.5 py-0 text-[10px] font-normal"
>
- {transferActionLabel(type.action)}
+ {actionLabel(type.action)}
</Badge>
</div>
))}
</div>
<div className="flex justify-end gap-2">
<Button variant="outline" onClick={onClose} disabled={busy}>
- Cancel
+ {tCommon('cancel')}
</Button>
<Button onClick={apply} disabled={busy || applicable.length === 0}>
- Apply {applicable.length > 0 ? applicable.length : ''} type
- {applicable.length === 1 ? '' : 's'}
+ {t('importApply', { count: applicable.length })}
</Button>
</div>
</div>
diff --git a/apps/web/src/features/settings/components/issue-types/IssueTypesToolbar.tsx b/apps/web/src/features/settings/components/issue-types/IssueTypesToolbar.tsx
index c37dcfa6..ec2cd6f7 100644
--- a/apps/web/src/features/settings/components/issue-types/IssueTypesToolbar.tsx
+++ b/apps/web/src/features/settings/components/issue-types/IssueTypesToolbar.tsx
@@ -3,6 +3,7 @@
import { useCallback, useEffect, useState } from 'react';
import { ClipboardPaste, Copy, MoreHorizontal } from 'lucide-react';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import type { IssueType, PermissionResource } from '@/lib/api';
import { Button } from '@/components/ui/button';
import {
@@ -14,6 +15,7 @@ import {
} from '@/components/ui/dropdown-menu';
import { usePermissions } from '@/hooks/usePermissions';
import { useIsMac } from '@/context/useHotkeys';
+import { useTransferErrorMessage } from '../../hooks/useTransferErrorMessage';
import { SettingsHeaderAddButton } from '../crud/SettingsHeaderAddButton';
import IssueTypesImportDialog from './IssueTypesImportDialog';
import {
@@ -36,40 +38,41 @@ export default function IssueTypesToolbar({
types: IssueType[];
onAdd: () => void;
}) {
+ const t = useTranslations('settings.issueTypes');
+ const tTransfer = useTranslations('settings.transfer');
+ const transferError = useTransferErrorMessage();
const { can } = usePermissions();
const mod = useIsMac() ? '⌘' : 'Ctrl';
const [importing, setImporting] = useState<PlannedIssueType[] | null>(null);
const copyTypes = useCallback(async () => {
if (types.length === 0) {
- toast.info('No issue types to copy.');
+ toast.info(t('nothingToCopy'));
return;
}
try {
await navigator.clipboard.writeText(serializeIssueTypes(types));
- toast.success(`Copied ${types.length} issue type${types.length === 1 ? '' : 's'}.`);
+ toast.success(t('copied', { count: types.length }));
} catch {
- toast.error('Could not copy to the clipboard.');
+ toast.error(tTransfer('copyFailed'));
}
- }, [types]);
+ }, [types, t, tTransfer]);
const pasteTypes = useCallback(async () => {
let text: string;
try {
text = await navigator.clipboard.readText();
} catch {
- toast.error('Could not read the clipboard.');
+ toast.error(tTransfer('readFailed'));
return;
}
try {
const parsed = parseIssueTypesText(text);
setImporting(planIssueTypesImport(parsed, types));
} catch (err) {
- toast.error(
- err instanceof Error ? err.message : 'Could not read issue types from the clipboard.',
- );
+ toast.error(transferError(err, t('parseFailed')));
}
- }, [types]);
+ }, [types, t, tTransfer, transferError]);
// Cmd/Ctrl+C copies, Cmd/Ctrl+V pastes — but only on this page, not while typing,
// and Cmd+C only when no text is selected (so an intentional text copy still works).
@@ -108,7 +111,7 @@ export default function IssueTypesToolbar({
variant="ghost"
size="icon"
className="size-8 text-muted-foreground hover:text-foreground"
- aria-label="Issue type import and export"
+ aria-label={t('menu')}
>
<MoreHorizontal className="size-4" />
</Button>
@@ -116,19 +119,19 @@ export default function IssueTypesToolbar({
<DropdownMenuContent align="end" className="w-56">
<DropdownMenuItem onClick={() => void copyTypes()} disabled={types.length === 0}>
<Copy className="size-4" />
- Copy issue types
+ {t('copy')}
<DropdownMenuShortcut>{mod}C</DropdownMenuShortcut>
</DropdownMenuItem>
<DropdownMenuItem onClick={() => void pasteTypes()}>
<ClipboardPaste className="size-4" />
- Paste issue types
+ {t('paste')}
<DropdownMenuShortcut>{mod}V</DropdownMenuShortcut>
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
)}
- <SettingsHeaderAddButton resource={resource} label="Add type" onClick={onAdd} />
+ <SettingsHeaderAddButton resource={resource} label={t('add')} onClick={onAdd} />
{importing && (
<IssueTypesImportDialog
diff --git a/apps/web/src/features/settings/components/issue-types/SettingsIssueTypes.tsx b/apps/web/src/features/settings/components/issue-types/SettingsIssueTypes.tsx
index 07e7a66e..69c7bd18 100644
--- a/apps/web/src/features/settings/components/issue-types/SettingsIssueTypes.tsx
+++ b/apps/web/src/features/settings/components/issue-types/SettingsIssueTypes.tsx
@@ -1,5 +1,6 @@
import { useEffect, useState } from 'react';
import { Pencil, Trash2 } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { type IssueType, type ProjectDetail } from '@/lib/api';
import { DEFAULT_COLOR } from '@/utils/project';
import { colorDot } from '@/components/common/fields/colorDot';
@@ -41,13 +42,16 @@ export default function SettingsIssueTypes({
const [color, setColor] = useState(DEFAULT_COLOR);
const [isDefault, setIsDefault] = useState(false);
const [deleting, setDeleting] = useState<IssueType | null>(null);
+ const t = useTranslations('settings.issueTypes');
+ const tCommon = useTranslations('common');
const can = useSettingsCan();
const createIssueType = useCreateIssueType(project.project.key);
const updateIssueType = useUpdateIssueType(project.project.key);
const deleteIssueType = useDeleteIssueType(project.project.key);
const types = project.issueTypes;
- const issueCount = (typeId: number) => project.issues.filter((t) => t.typeId === typeId).length;
+ const issueCount = (typeId: number) =>
+ project.issues.filter((issue) => issue.typeId === typeId).length;
useEffect(() => {
if (adding) {
@@ -58,12 +62,12 @@ export default function SettingsIssueTypes({
}
}, [adding]);
- function startEdit(t: IssueType) {
+ function startEdit(type: IssueType) {
onAddingChange(false);
- setEditingId(t.id);
- setName(t.name);
- setColor(t.color);
- setIsDefault(t.isDefault);
+ setEditingId(type.id);
+ setName(type.name);
+ setColor(type.color);
+ setIsDefault(type.isDefault);
}
async function add() {
@@ -72,9 +76,12 @@ export default function SettingsIssueTypes({
onAddingChange(false);
}
- async function saveEdit(t: IssueType) {
+ async function saveEdit(type: IssueType) {
if (!name.trim()) return;
- await updateIssueType.mutateAsync({ id: t.id, patch: { name: name.trim(), color, isDefault } });
+ await updateIssueType.mutateAsync({
+ id: type.id,
+ patch: { name: name.trim(), color, isDefault },
+ });
setEditingId(null);
}
@@ -84,7 +91,7 @@ export default function SettingsIssueTypes({
<div className="flex items-center gap-1.5">
<Checkbox id={id} checked={isDefault} onCheckedChange={(v) => setIsDefault(v === true)} />
<Label htmlFor={id} className="text-xs whitespace-nowrap text-muted-foreground">
- Default
+ {t('default')}
</Label>
</div>
);
@@ -95,12 +102,7 @@ export default function SettingsIssueTypes({
const deletingCount = deleting ? issueCount(deleting.id) : 0;
if (showEmpty) {
- return (
- <EmptyState
- title="No issue types yet"
- description="Add the kinds of issues this project can hold, each with its own fields."
- />
- );
+ return <EmptyState title={t('emptyTitle')} description={t('emptyHint')} />;
}
const inlineForm = (
@@ -112,7 +114,7 @@ export default function SettingsIssueTypes({
<SettingsInlineForm
name={name}
onNameChange={setName}
- placeholder="Type name"
+ placeholder={t('namePlaceholder')}
submitLabel={submitLabel}
onSubmit={onSubmit}
onCancel={onCancel}
@@ -131,43 +133,45 @@ export default function SettingsIssueTypes({
</colgroup>
<TableHeader>
<TableRow className="hover:bg-transparent">
- <TableHead className="text-xs font-medium text-muted-foreground">Type</TableHead>
- <TableHead className="text-xs font-medium text-muted-foreground">Issues</TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.type')}
+ </TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.issues')}
+ </TableHead>
<TableHead className="text-right text-xs font-medium text-muted-foreground">
- Actions
+ {tCommon('actions')}
</TableHead>
</TableRow>
</TableHeader>
<TableBody>
- {types.map((t) =>
- editingId === t.id ? (
- <TableRow key={t.id} className="hover:bg-transparent">
+ {types.map((type) =>
+ editingId === type.id ? (
+ <TableRow key={type.id} className="hover:bg-transparent">
<TableCell colSpan={3} className="px-3 py-2">
{inlineForm(
- 'Save',
- () => void saveEdit(t),
+ tCommon('save'),
+ () => void saveEdit(type),
() => setEditingId(null),
- `type-default-edit-${t.id}`,
+ `type-default-edit-${type.id}`,
)}
</TableCell>
</TableRow>
) : (
- <TableRow key={t.id} className="group/item">
+ <TableRow key={type.id} className="group/item">
<TableCell className="px-3 py-3 align-middle">
<div className="flex min-w-0 items-center gap-2">
- {colorDot(t.color)}
- <span className="truncate text-sm font-medium">{t.name}</span>
- {t.isDefault && (
+ {colorDot(type.color)}
+ <span className="truncate text-sm font-medium">{type.name}</span>
+ {type.isDefault && (
<span className="rounded bg-secondary px-1.5 py-0.5 text-[11px] font-medium text-secondary-foreground">
- Default
+ {t('default')}
</span>
)}
</div>
</TableCell>
<TableCell className="px-3 py-3 align-middle text-sm text-muted-foreground tabular-nums">
- {issueCount(t.id) === 0
- ? 'No issues'
- : `${issueCount(t.id)} ${issueCount(t.id) === 1 ? 'issue' : 'issues'}`}
+ {t('issueCount', { count: issueCount(type.id) })}
</TableCell>
<TableCell className="px-3 py-2 align-middle">
<div className="flex items-center justify-end gap-1">
@@ -176,9 +180,9 @@ export default function SettingsIssueTypes({
variant="ghost"
size="icon"
className="size-8 text-muted-foreground hover:text-foreground"
- title="Edit issue type"
- aria-label="Edit issue type"
- onClick={() => startEdit(t)}
+ title={t('edit')}
+ aria-label={t('edit')}
+ onClick={() => startEdit(type)}
>
<Pencil className="size-4" />
</Button>
@@ -188,9 +192,9 @@ export default function SettingsIssueTypes({
variant="ghost"
size="icon"
className="size-8 text-muted-foreground hover:text-destructive"
- title="Delete issue type"
- aria-label="Delete issue type"
- onClick={() => setDeleting(t)}
+ title={t('delete')}
+ aria-label={t('delete')}
+ onClick={() => setDeleting(type)}
>
<Trash2 className="size-4" />
</Button>
@@ -204,7 +208,7 @@ export default function SettingsIssueTypes({
<TableRow className="hover:bg-transparent">
<TableCell colSpan={3} className="px-3 py-2">
{inlineForm(
- 'Add',
+ tCommon('add'),
() => void add(),
() => onAddingChange(false),
'type-default-new',
@@ -217,16 +221,9 @@ export default function SettingsIssueTypes({
{deleting && (
<SettingsConfirmDeleteDialog
- title={`Delete type "${deleting.name}"`}
- confirmLabel="Delete type"
- message={
- <>
- {deletingCount > 0
- ? `${deletingCount} issue${deletingCount === 1 ? '' : 's'} ${deletingCount === 1 ? 'uses' : 'use'} this type and will no longer have a type.`
- : 'No issues use this type.'}{' '}
- Custom fields specific to this type are also removed. This cannot be undone.
- </>
- }
+ title={t('deleteTitle', { name: deleting.name })}
+ confirmLabel={t('deleteConfirm')}
+ message={t('deleteMessage', { count: deletingCount })}
onClose={() => setDeleting(null)}
onConfirm={async () => {
await deleteIssueType.mutateAsync(deleting.id);
diff --git a/apps/web/src/features/settings/components/labels/LabelsImportDialog.tsx b/apps/web/src/features/settings/components/labels/LabelsImportDialog.tsx
index ad65fde2..84be682a 100644
--- a/apps/web/src/features/settings/components/labels/LabelsImportDialog.tsx
+++ b/apps/web/src/features/settings/components/labels/LabelsImportDialog.tsx
@@ -2,6 +2,7 @@
import { useState } from 'react';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import type { LabelGroup } from '@/lib/api';
import { colorDot } from '@/components/common/fields/colorDot';
import Modal from '@/components/common/overlay/Modal';
@@ -14,7 +15,7 @@ import {
useUpdateLabelGroup,
} from '../../services/settings.service';
import type { LabelsImportPlan, PlannedGroup, PlannedLabel } from '../../utils/labelsTransfer';
-import { transferActionLabel } from '../../utils/transferAction';
+import { useTransferActionLabel } from '../../utils/transferAction';
function ItemRow({
color,
@@ -27,6 +28,7 @@ function ItemRow({
meta?: string;
action: 'create' | 'update' | 'unchanged';
}) {
+ const actionLabel = useTransferActionLabel();
return (
<div className="flex items-center gap-3 px-3 py-2.5">
{colorDot(color)}
@@ -36,7 +38,7 @@ function ItemRow({
variant={action === 'unchanged' ? 'outline' : 'secondary'}
className="shrink-0 px-1.5 py-0 text-[10px] font-normal"
>
- {transferActionLabel(action)}
+ {actionLabel(action)}
</Badge>
</div>
);
@@ -56,6 +58,8 @@ export default function LabelsImportDialog({
existingGroups: LabelGroup[];
onClose: () => void;
}) {
+ const t = useTranslations('settings.labels');
+ const tCommon = useTranslations('common');
const createGroup = useCreateLabelGroup(projectKey);
const updateGroup = useUpdateLabelGroup(projectKey);
const createLabel = useCreateLabel(projectKey);
@@ -103,7 +107,7 @@ export default function LabelsImportDialog({
}
}
- toast.success(`Applied labels: ${created} created, ${updated} updated.`);
+ toast.success(t('imported', { created, updated }));
onClose();
} catch {
// The failed mutation is toasted by the global handler; keep the dialog open.
@@ -112,17 +116,14 @@ export default function LabelsImportDialog({
}
return (
- <Modal title="Apply labels from clipboard" onClose={onClose} wide>
+ <Modal title={t('importTitle')} onClose={onClose} wide>
<div className="space-y-4">
- <p className="text-xs text-muted-foreground">
- {applicable} item{applicable === 1 ? '' : 's'} will be applied. A matching label keeps its
- group; only its color is updated.
- </p>
+ <p className="text-xs text-muted-foreground">{t('importSummary', { count: applicable })}</p>
{plan.groups.length > 0 && (
<div className="space-y-1.5">
<p className="text-[11px] font-medium tracking-wide text-muted-foreground uppercase">
- Groups
+ {t('groups')}
</p>
<div className="divide-y divide-border/60 overflow-hidden rounded-md border border-border/60">
{plan.groups.map((g) => (
@@ -135,7 +136,7 @@ export default function LabelsImportDialog({
{plan.labels.length > 0 && (
<div className="space-y-1.5">
<p className="text-[11px] font-medium tracking-wide text-muted-foreground uppercase">
- Labels
+ {t('labels')}
</p>
<div className="max-h-[40vh] divide-y divide-border/60 overflow-y-auto rounded-md border border-border/60">
{plan.labels.map((l) => (
@@ -143,7 +144,7 @@ export default function LabelsImportDialog({
key={l.name}
color={l.color}
name={l.name}
- meta={l.group ?? 'Ungrouped'}
+ meta={l.group ?? t('ungrouped')}
action={l.action}
/>
))}
@@ -153,10 +154,10 @@ export default function LabelsImportDialog({
<div className="flex justify-end gap-2">
<Button variant="outline" onClick={onClose} disabled={busy}>
- Cancel
+ {tCommon('cancel')}
</Button>
<Button onClick={apply} disabled={busy || applicable === 0}>
- Apply {applicable > 0 ? applicable : ''} item{applicable === 1 ? '' : 's'}
+ {t('importApply', { count: applicable })}
</Button>
</div>
</div>
diff --git a/apps/web/src/features/settings/components/labels/LabelsToolbar.tsx b/apps/web/src/features/settings/components/labels/LabelsToolbar.tsx
index 86c9d5d7..2f7b5c7a 100644
--- a/apps/web/src/features/settings/components/labels/LabelsToolbar.tsx
+++ b/apps/web/src/features/settings/components/labels/LabelsToolbar.tsx
@@ -3,6 +3,7 @@
import { useCallback, useEffect, useState } from 'react';
import { ClipboardPaste, Copy, MoreHorizontal } from 'lucide-react';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import type { Label, LabelGroup, PermissionResource } from '@/lib/api';
import { Button } from '@/components/ui/button';
import {
@@ -14,6 +15,7 @@ import {
} from '@/components/ui/dropdown-menu';
import { usePermissions } from '@/hooks/usePermissions';
import { useIsMac } from '@/context/useHotkeys';
+import { useTransferErrorMessage } from '../../hooks/useTransferErrorMessage';
import LabelsImportDialog from './LabelsImportDialog';
import {
parseLabelsText,
@@ -37,6 +39,9 @@ export default function LabelsToolbar({
labels: Label[];
}) {
const { can } = usePermissions();
+ const t = useTranslations('settings.labels');
+ const tTransfer = useTranslations('settings.transfer');
+ const transferError = useTransferErrorMessage();
const mod = useIsMac() ? '⌘' : 'Ctrl';
const [importing, setImporting] = useState<LabelsImportPlan | null>(null);
@@ -44,32 +49,32 @@ export default function LabelsToolbar({
const copyLabels = useCallback(async () => {
if (total === 0) {
- toast.info('No labels to copy.');
+ toast.info(t('nothingToCopy'));
return;
}
try {
await navigator.clipboard.writeText(serializeLabels(groups, labels));
- toast.success(`Copied ${labels.length} label${labels.length === 1 ? '' : 's'}.`);
+ toast.success(t('copied', { count: labels.length }));
} catch {
- toast.error('Could not copy to the clipboard.');
+ toast.error(tTransfer('copyFailed'));
}
- }, [groups, labels, total]);
+ }, [groups, labels, total, t, tTransfer]);
const pasteLabels = useCallback(async () => {
let text: string;
try {
text = await navigator.clipboard.readText();
} catch {
- toast.error('Could not read the clipboard.');
+ toast.error(tTransfer('readFailed'));
return;
}
try {
const parsed = parseLabelsText(text);
setImporting(planLabelsImport(parsed, groups, labels));
} catch (err) {
- toast.error(err instanceof Error ? err.message : 'Could not read labels from the clipboard.');
+ toast.error(transferError(err, t('parseFailed')));
}
- }, [groups, labels]);
+ }, [groups, labels, t, tTransfer, transferError]);
// Cmd/Ctrl+C copies, Cmd/Ctrl+V pastes — but only on this page, not while typing,
// and Cmd+C only when no text is selected (so an intentional text copy still works).
@@ -109,7 +114,7 @@ export default function LabelsToolbar({
variant="ghost"
size="icon"
className="size-8 text-muted-foreground hover:text-foreground"
- aria-label="Label import and export"
+ aria-label={t('menu')}
>
<MoreHorizontal className="size-4" />
</Button>
@@ -117,12 +122,12 @@ export default function LabelsToolbar({
<DropdownMenuContent align="end" className="w-52">
<DropdownMenuItem onClick={() => void copyLabels()} disabled={total === 0}>
<Copy className="size-4" />
- Copy labels
+ {t('copy')}
<DropdownMenuShortcut>{mod}C</DropdownMenuShortcut>
</DropdownMenuItem>
<DropdownMenuItem onClick={() => void pasteLabels()}>
<ClipboardPaste className="size-4" />
- Paste labels
+ {t('paste')}
<DropdownMenuShortcut>{mod}V</DropdownMenuShortcut>
</DropdownMenuItem>
</DropdownMenuContent>
diff --git a/apps/web/src/features/settings/components/labels/SettingsDraggableLabelRow.tsx b/apps/web/src/features/settings/components/labels/SettingsDraggableLabelRow.tsx
index 29915f98..da0ec4f7 100644
--- a/apps/web/src/features/settings/components/labels/SettingsDraggableLabelRow.tsx
+++ b/apps/web/src/features/settings/components/labels/SettingsDraggableLabelRow.tsx
@@ -1,5 +1,6 @@
import { useDraggable } from '@dnd-kit/core';
import { GripVertical } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { type Label as LabelRow } from '@/lib/api';
import { colorDot } from '@/components/common/fields/colorDot';
import { SettingsRow } from '../crud/SettingsRow';
@@ -22,6 +23,7 @@ export function SettingsDraggableLabelRow({
// Moving a label between groups is a labels edit; disable dragging and hide the
// grip without it.
const canEdit = useSettingsCan()('edit');
+ const t = useTranslations('settings.labels');
const { setNodeRef, listeners, attributes, isDragging } = useDraggable({
id: label.id,
disabled: !canEdit,
@@ -32,8 +34,8 @@ export function SettingsDraggableLabelRow({
ref={setNodeRef}
{...listeners}
{...attributes}
- title="Drag to a group"
- aria-label="Drag label"
+ title={t('dragToGroup')}
+ aria-label={t('dragLabel')}
className="flex size-6 shrink-0 cursor-grab touch-none items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground active:cursor-grabbing"
>
<GripVertical className="size-4" />
@@ -47,8 +49,8 @@ export function SettingsDraggableLabelRow({
media={colorDot(label.color)}
title={label.name}
meta={meta}
- editTitle="Edit label"
- deleteTitle="Delete label"
+ editTitle={t('editLabel')}
+ deleteTitle={t('deleteLabel')}
onEdit={onEdit}
onDelete={onDelete}
/>
diff --git a/apps/web/src/features/settings/components/labels/SettingsLabelDeleteDialogs.tsx b/apps/web/src/features/settings/components/labels/SettingsLabelDeleteDialogs.tsx
index 80b36085..5a6fa91c 100644
--- a/apps/web/src/features/settings/components/labels/SettingsLabelDeleteDialogs.tsx
+++ b/apps/web/src/features/settings/components/labels/SettingsLabelDeleteDialogs.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import { type Label as LabelRow, type LabelGroup } from '@/lib/api';
import SettingsConfirmDeleteDialog from '../crud/SettingsConfirmDeleteDialog';
@@ -12,18 +13,12 @@ export function SettingsLabelDeleteDialog({
onClose: () => void;
onConfirm: () => Promise<void>;
}) {
+ const t = useTranslations('settings.labels');
return (
<SettingsConfirmDeleteDialog
- title={`Delete label "${label.name}"`}
- confirmLabel="Delete label"
- message={
- <>
- {issueCount > 0
- ? `This label is on ${issueCount} issue${issueCount === 1 ? '' : 's'} and will be removed from ${issueCount === 1 ? 'it' : 'them'}.`
- : 'No issues use this label.'}{' '}
- This cannot be undone.
- </>
- }
+ title={t('deleteLabelTitle', { name: label.name })}
+ confirmLabel={t('deleteLabel')}
+ message={t('deleteLabelMessage', { count: issueCount })}
onClose={onClose}
onConfirm={onConfirm}
/>
@@ -41,18 +36,12 @@ export function SettingsLabelGroupDeleteDialog({
onClose: () => void;
onConfirm: () => Promise<void>;
}) {
+ const t = useTranslations('settings.labels');
return (
<SettingsConfirmDeleteDialog
- title={`Delete group "${group.name}"`}
- confirmLabel="Delete group"
- message={
- <>
- {labelCount > 0
- ? `${labelCount} label${labelCount === 1 ? '' : 's'} will be ungrouped but kept.`
- : 'This group has no labels.'}{' '}
- This cannot be undone.
- </>
- }
+ title={t('deleteGroupTitle', { name: group.name })}
+ confirmLabel={t('deleteGroup')}
+ message={t('deleteGroupMessage', { count: labelCount })}
onClose={onClose}
onConfirm={onConfirm}
/>
diff --git a/apps/web/src/features/settings/components/labels/SettingsLabelGroupSection.tsx b/apps/web/src/features/settings/components/labels/SettingsLabelGroupSection.tsx
index a506d925..f74d8eb8 100644
--- a/apps/web/src/features/settings/components/labels/SettingsLabelGroupSection.tsx
+++ b/apps/web/src/features/settings/components/labels/SettingsLabelGroupSection.tsx
@@ -1,6 +1,7 @@
import type { ReactNode } from 'react';
import { ChevronRight, Pencil, Plus, Trash2 } from 'lucide-react';
import { useDroppable } from '@dnd-kit/core';
+import { useTranslations } from 'next-intl';
import { type LabelGroup } from '@/lib/api';
import { cn } from '@/lib/utils';
import { colorDot } from '@/components/common/fields/colorDot';
@@ -41,12 +42,13 @@ export function SettingsLabelGroupSection({
onDeleteGroup?: () => void;
children: ReactNode;
}) {
+ const t = useTranslations('settings.labels');
const can = useSettingsCan();
const { setNodeRef, isOver } = useDroppable({
id: group ? `group:${group.id}` : 'ungrouped',
data: { groupId: group?.id ?? null },
});
- const name = group?.name ?? 'Ungrouped';
+ const name = group?.name ?? t('ungrouped');
const wrapperClass = cn(
'rounded-lg transition-colors',
dragging && 'outline-1 -outline-offset-2 outline-border/60 outline-dashed',
@@ -68,7 +70,7 @@ export function SettingsLabelGroupSection({
isOver ? 'text-primary' : 'text-muted-foreground/70',
)}
>
- Drop a label here to remove it from its group
+ {t('dropToUngroup')}
</p>
)}
</div>
@@ -101,14 +103,16 @@ export function SettingsLabelGroupSection({
{count > 0 && (
<span className="text-xs text-muted-foreground tabular-nums">{count}</span>
)}
- {isOver && <span className="ml-2 text-xs font-medium text-primary">Drop here</span>}
+ {isOver && (
+ <span className="ml-2 text-xs font-medium text-primary">{t('dropHere')}</span>
+ )}
</button>
{onEditGroup && can('edit') && (
<Button
variant="ghost"
size="icon"
className="size-7 text-muted-foreground opacity-0 group-hover/gh:opacity-100 hover:text-foreground"
- title="Edit group"
+ title={t('editGroup')}
onClick={onEditGroup}
>
<Pencil className="size-4" />
@@ -119,7 +123,7 @@ export function SettingsLabelGroupSection({
variant="ghost"
size="icon"
className="size-7 text-muted-foreground opacity-0 group-hover/gh:opacity-100 hover:text-destructive"
- title="Delete group"
+ title={t('deleteGroup')}
onClick={onDeleteGroup}
>
<Trash2 className="size-4" />
@@ -130,8 +134,8 @@ export function SettingsLabelGroupSection({
variant="ghost"
size="icon"
className="size-7 text-muted-foreground hover:text-foreground"
- title="Add label"
- aria-label={`Add label to ${name}`}
+ title={t('addLabel')}
+ aria-label={t('addLabelTo', { name })}
onClick={onAddLabel}
>
<Plus className="size-4" />
@@ -151,7 +155,7 @@ export function SettingsLabelGroupSection({
isOver ? 'text-primary' : 'text-muted-foreground/70',
)}
>
- {dragging ? `Drop a label here to add it to ${name}` : 'No labels'}
+ {dragging ? t('dropToGroup', { name }) : t('noLabels')}
</p>
)}
</div>
diff --git a/apps/web/src/features/settings/components/labels/SettingsLabels.tsx b/apps/web/src/features/settings/components/labels/SettingsLabels.tsx
index ab4dfd62..8fcf3847 100644
--- a/apps/web/src/features/settings/components/labels/SettingsLabels.tsx
+++ b/apps/web/src/features/settings/components/labels/SettingsLabels.tsx
@@ -1,4 +1,5 @@
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import { DndContext, DragOverlay, type DragEndEvent } from '@dnd-kit/core';
import { type Label as LabelRow, type LabelGroup, type ProjectDetail } from '@/lib/api';
import { useDndSensors } from '@/lib/dnd';
@@ -47,6 +48,8 @@ export default function SettingsLabels({ project }: { project: ProjectDetail })
const [deletingGroup, setDeletingGroup] = useState<LabelGroup | null>(null);
const [activeId, setActiveId] = useState<number | null>(null);
+ const t = useTranslations('settings.labels');
+ const tCommon = useTranslations('common');
const can = useSettingsCan();
const sensors = useDndSensors();
@@ -156,8 +159,8 @@ export default function SettingsLabels({ project }: { project: ProjectDetail })
<SettingsInlineForm
name={lName}
onNameChange={setLName}
- placeholder="Label name"
- submitLabel={labelForm?.mode === 'edit' ? 'Save' : 'Add'}
+ placeholder={t('namePlaceholder')}
+ submitLabel={labelForm?.mode === 'edit' ? tCommon('save') : tCommon('add')}
onSubmit={() => void submitLabel()}
onCancel={() => setLabelForm(null)}
leading={<SettingsColorField value={lColor} onChange={setLColor} />}
@@ -179,7 +182,7 @@ export default function SettingsLabels({ project }: { project: ProjectDetail })
key={l.id}
label={l}
draggable={hasGroups}
- meta={count === 0 ? undefined : `${count} ${count === 1 ? 'issue' : 'issues'}`}
+ meta={count === 0 ? undefined : t('issueCount', { count })}
onEdit={() => openLabelEdit(l)}
onDelete={() => setDeletingLabel(l)}
/>
@@ -190,8 +193,8 @@ export default function SettingsLabels({ project }: { project: ProjectDetail })
<SettingsInlineForm
name={gName}
onNameChange={setGName}
- placeholder="Group name"
- submitLabel={groupForm?.mode === 'edit' ? 'Save' : 'Add'}
+ placeholder={t('groupNamePlaceholder')}
+ submitLabel={groupForm?.mode === 'edit' ? tCommon('save') : tCommon('add')}
onSubmit={() => void submitGroup()}
onCancel={() => setGroupForm(null)}
leading={<SettingsColorField value={gColor} onChange={setGColor} />}
diff --git a/apps/web/src/features/settings/components/labels/SettingsLabelsAddMenu.tsx b/apps/web/src/features/settings/components/labels/SettingsLabelsAddMenu.tsx
index cac499bf..a9be7ad5 100644
--- a/apps/web/src/features/settings/components/labels/SettingsLabelsAddMenu.tsx
+++ b/apps/web/src/features/settings/components/labels/SettingsLabelsAddMenu.tsx
@@ -1,4 +1,5 @@
import { FolderPlus, Plus, Tag } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { Button } from '@/components/ui/button';
import {
DropdownMenu,
@@ -16,6 +17,8 @@ export function SettingsLabelsAddMenu({
onAddLabel: () => void;
onAddGroup: () => void;
}) {
+ const t = useTranslations('settings.labels');
+
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
@@ -26,17 +29,17 @@ export function SettingsLabelsAddMenu({
disabled={disabled}
>
<Plus className="size-3.5" />
- Add
+ {t('add')}
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="start" className="w-40">
<DropdownMenuItem onClick={onAddLabel}>
<Tag className="size-4" />
- New label
+ {t('newLabel')}
</DropdownMenuItem>
<DropdownMenuItem onClick={onAddGroup}>
<FolderPlus className="size-4" />
- New group
+ {t('newGroup')}
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
diff --git a/apps/web/src/features/settings/components/notifications/EmailSettings.tsx b/apps/web/src/features/settings/components/notifications/EmailSettings.tsx
index 56f3ceca..4223b8f2 100644
--- a/apps/web/src/features/settings/components/notifications/EmailSettings.tsx
+++ b/apps/web/src/features/settings/components/notifications/EmailSettings.tsx
@@ -13,22 +13,20 @@ import EnabledSwitch from '@/components/common/inputs/EnabledSwitch';
import ProviderToggle from '@/components/common/inputs/ProviderToggle';
import SecretInput from '@/components/common/inputs/SecretInput';
import type { EmailForm } from '../../hooks/useEmailForm';
+import { useTranslations } from 'next-intl';
-const ENCRYPTION_OPTIONS: { value: NotificationEncryption; label: string }[] = [
- { value: 'none', label: 'None' },
- { value: 'ssl', label: 'SSL' },
- { value: 'tls', label: 'TLS' },
-];
+const ENCRYPTION_OPTIONS: NotificationEncryption[] = ['none', 'ssl', 'tls'];
// The instance provider or one of the project's own (SMTP or Resend). Non-secret
// fields prefill from the stored config; secrets start blank and are sent only when
// changed.
export default function EmailSettings({ form }: { form: EmailForm }) {
+ const t = useTranslations('settings.notifications');
const { settings, editable } = form;
return (
<SettingsSection
- title="Email provider"
- description="Send through the system provider or one of your own. Credentials are stored encrypted."
+ title={t('emailProvider')}
+ description={t('emailProviderHint')}
action={
editable && (
<EnabledSwitch checked={form.enabled} onChange={form.setEnabled} disabled={!editable} />
@@ -44,14 +42,12 @@ export default function EmailSettings({ form }: { form: EmailForm }) {
{form.provider === 'system' ? (
<p className="text-sm text-muted-foreground">
- {settings.systemAvailable
- ? 'Notifications are sent through the provider configured for this instance. No credentials needed here.'
- : 'The instance provider is not available. Ask the administrator to configure it and share it with projects, or set up a provider for this project.'}
+ {settings.systemAvailable ? t('systemAvailable') : t('systemUnavailable')}
</p>
) : form.provider === 'smtp' ? (
<div className="grid gap-4 sm:grid-cols-3">
<div className="space-y-1.5">
- <Label htmlFor="smtp-host">Host</Label>
+ <Label htmlFor="smtp-host">{t('host')}</Label>
<Input
id="smtp-host"
value={form.host}
@@ -61,7 +57,7 @@ export default function EmailSettings({ form }: { form: EmailForm }) {
/>
</div>
<div className="space-y-1.5">
- <Label htmlFor="smtp-port">Port</Label>
+ <Label htmlFor="smtp-port">{t('port')}</Label>
<Input
id="smtp-port"
type="number"
@@ -73,7 +69,7 @@ export default function EmailSettings({ form }: { form: EmailForm }) {
/>
</div>
<div className="space-y-1.5">
- <Label htmlFor="smtp-encryption">Encryption</Label>
+ <Label htmlFor="smtp-encryption">{t('encryption')}</Label>
<Select
value={form.encryption}
onValueChange={(v) => form.setEncryption(v as NotificationEncryption)}
@@ -84,15 +80,15 @@ export default function EmailSettings({ form }: { form: EmailForm }) {
</SelectTrigger>
<SelectContent>
{ENCRYPTION_OPTIONS.map((o) => (
- <SelectItem key={o.value} value={o.value}>
- {o.label}
+ <SelectItem key={o} value={o}>
+ {t(`encryptionOptions.${o}`)}
</SelectItem>
))}
</SelectContent>
</Select>
</div>
<div className="space-y-1.5">
- <Label htmlFor="smtp-username">Username</Label>
+ <Label htmlFor="smtp-username">{t('username')}</Label>
<Input
id="smtp-username"
value={form.username}
@@ -103,18 +99,18 @@ export default function EmailSettings({ form }: { form: EmailForm }) {
/>
</div>
<div className="space-y-1.5">
- <Label htmlFor="smtp-password">Password</Label>
+ <Label htmlFor="smtp-password">{t('password')}</Label>
<SecretInput
id="smtp-password"
value={form.password}
onChange={form.setPassword}
hasStored={settings.smtp.hasPassword}
editable={editable}
- placeholder="SMTP password"
+ placeholder={t('passwordPlaceholder')}
/>
</div>
<div className="space-y-1.5">
- <Label htmlFor="smtp-timeout">Timeout (s)</Label>
+ <Label htmlFor="smtp-timeout">{t('timeout')}</Label>
<Input
id="smtp-timeout"
type="number"
@@ -122,13 +118,13 @@ export default function EmailSettings({ form }: { form: EmailForm }) {
value={form.timeout}
onChange={(e) => form.setTimeout(e.target.value)}
disabled={!editable}
- placeholder="Optional"
+ placeholder={t('optional')}
/>
</div>
</div>
) : (
<div className="space-y-1.5 sm:max-w-md">
- <Label htmlFor="resend-api-key">API key</Label>
+ <Label htmlFor="resend-api-key">{t('apiKey')}</Label>
<SecretInput
id="resend-api-key"
value={form.apiKey}
diff --git a/apps/web/src/features/settings/components/notifications/NotificationPreferences.tsx b/apps/web/src/features/settings/components/notifications/NotificationPreferences.tsx
index 4f483e5d..106ff35f 100644
--- a/apps/web/src/features/settings/components/notifications/NotificationPreferences.tsx
+++ b/apps/web/src/features/settings/components/notifications/NotificationPreferences.tsx
@@ -5,6 +5,7 @@ import SettingsSection from '@/components/common/page/SettingsSection';
import NotificationTelegramAccount from './NotificationTelegramAccount';
import { NOTIFICATION_EVENTS } from '../../utils/notificationEvents';
import type { NotificationPreferencesForm } from '../../hooks/useNotificationPreferencesForm';
+import { useTranslations } from 'next-intl';
// A member's own notification preferences for the project: for each issue event, a
// checkbox per channel (email, Telegram). Visible to every member (each edits only
@@ -16,25 +17,26 @@ import type { NotificationPreferencesForm } from '../../hooks/useNotificationPre
const COLS = 'grid grid-cols-[1fr_5rem_5rem] items-center';
export default function NotificationPreferences({ form }: { form: NotificationPreferencesForm }) {
+ const t = useTranslations('settings.notifications');
const { emailEvents, setEmailEvents, telegramEvents, setTelegramEvents } = form;
return (
<div className="flex flex-col gap-10">
- <SettingsSection title="Events">
+ <SettingsSection title={t('eventsTitle')}>
<div className="max-w-xl">
<div className={`${COLS} px-3 pb-1`}>
<span />
- <ChannelHeader icon={<Mail className="size-3.5" />} label="Email" />
- <ChannelHeader icon={<Send className="size-3.5" />} label="Telegram" />
+ <ChannelHeader icon={<Mail className="size-3.5" />} label={t('email')} />
+ <ChannelHeader icon={<Send className="size-3.5" />} label={t('telegram')} />
</div>
<div className="flex flex-col">
{NOTIFICATION_EVENTS.map((event) => (
<ChannelRow
- key={event.key}
- label={event.label}
- emailChecked={emailEvents[event.key]}
- telegramChecked={telegramEvents[event.key]}
- onEmail={(v) => setEmailEvents({ ...emailEvents, [event.key]: v })}
- onTelegram={(v) => setTelegramEvents({ ...telegramEvents, [event.key]: v })}
+ key={event}
+ label={t(`events.${event}`)}
+ emailChecked={emailEvents[event]}
+ telegramChecked={telegramEvents[event]}
+ onEmail={(v) => setEmailEvents({ ...emailEvents, [event]: v })}
+ onTelegram={(v) => setTelegramEvents({ ...telegramEvents, [event]: v })}
/>
))}
</div>
diff --git a/apps/web/src/features/settings/components/notifications/NotificationTelegramAccount.tsx b/apps/web/src/features/settings/components/notifications/NotificationTelegramAccount.tsx
index 8dfba8bf..db49e2c0 100644
--- a/apps/web/src/features/settings/components/notifications/NotificationTelegramAccount.tsx
+++ b/apps/web/src/features/settings/components/notifications/NotificationTelegramAccount.tsx
@@ -4,34 +4,35 @@ import Link from 'next/link';
import { Send } from 'lucide-react';
import { Button } from '@/components/ui/button';
import SettingsSection from '@/components/common/page/SettingsSection';
-import { telegramAccountLabel, useTelegramAccountQuery } from '@/services/telegram.service';
+import { useTelegramAccountLabel, useTelegramAccountQuery } from '@/services/telegram.service';
+import { useTranslations } from 'next-intl';
// Where the member's Telegram notifications go. There is nothing to fill in here:
// the chat comes from the Telegram account connected to their profile, which is the
// same for every project. This only shows which account that is, or sends them to
// connect one.
export default function NotificationTelegramAccount() {
+ const t = useTranslations('settings.notifications');
+ const tAccounts = useTranslations('account.accounts');
+ const accountLabel = useTelegramAccountLabel();
const { data } = useTelegramAccountQuery();
// Telegram is not offered on this instance at all.
if (data && !data.botUsername) return null;
const link = data?.link ?? null;
- const label = link ? telegramAccountLabel(link) : null;
+ const label = link ? accountLabel(link) : null;
return (
- <SettingsSection
- title="Telegram account"
- description="Telegram notifications go to the account connected to your profile, for every project you are in."
- >
+ <SettingsSection title={t('telegramAccount')} description={t('telegramAccountHint')}>
<div className="flex items-center justify-between gap-6 rounded-lg border border-border p-4 sm:max-w-md">
<div className="flex min-w-0 items-center gap-3">
<Send className="size-4 shrink-0 text-muted-foreground" />
- <span className="truncate text-sm">{label ?? 'No Telegram account connected'}</span>
+ <span className="truncate text-sm">{label ?? t('noTelegramAccount')}</span>
</div>
{!label && (
<Button asChild size="sm" variant="outline" className="shrink-0">
- <Link href="/account/accounts">Connect</Link>
+ <Link href="/account/accounts">{tAccounts('connect')}</Link>
</Button>
)}
</div>
diff --git a/apps/web/src/features/settings/components/notifications/SettingsNotifications.tsx b/apps/web/src/features/settings/components/notifications/SettingsNotifications.tsx
index 6cbf76f6..d4717405 100644
--- a/apps/web/src/features/settings/components/notifications/SettingsNotifications.tsx
+++ b/apps/web/src/features/settings/components/notifications/SettingsNotifications.tsx
@@ -3,6 +3,7 @@ import EmailSettings from './EmailSettings';
import TelegramSettings from './TelegramSettings';
import type { EmailForm } from '../../hooks/useEmailForm';
import type { TelegramForm } from '../../hooks/useTelegramForm';
+import { useTranslations } from 'next-intl';
export type NotificationTab = 'email' | 'telegram';
@@ -19,6 +20,7 @@ export default function SettingsNotifications({
emailForm: EmailForm;
telegramForm: TelegramForm;
}) {
+ const t = useTranslations('settings.notifications');
return (
<Tabs
value={tab}
@@ -26,8 +28,8 @@ export default function SettingsNotifications({
className="flex flex-col gap-8"
>
<TabsList variant="line">
- <TabsTrigger value="email">Email</TabsTrigger>
- <TabsTrigger value="telegram">Telegram</TabsTrigger>
+ <TabsTrigger value="email">{t('email')}</TabsTrigger>
+ <TabsTrigger value="telegram">{t('telegram')}</TabsTrigger>
</TabsList>
<TabsContent value="email" className="mt-0">
diff --git a/apps/web/src/features/settings/components/notifications/TelegramSettings.tsx b/apps/web/src/features/settings/components/notifications/TelegramSettings.tsx
index 6e04669f..d7687479 100644
--- a/apps/web/src/features/settings/components/notifications/TelegramSettings.tsx
+++ b/apps/web/src/features/settings/components/notifications/TelegramSettings.tsx
@@ -3,17 +3,19 @@ import SettingsSection from '@/components/common/page/SettingsSection';
import EnabledSwitch from '@/components/common/inputs/EnabledSwitch';
import SecretInput from '@/components/common/inputs/SecretInput';
import type { TelegramForm } from '../../hooks/useTelegramForm';
+import { useTranslations } from 'next-intl';
// The bot this project delivers through. The token is optional: left empty, the
// project sends through the instance bot that members connect their Telegram account
// to. Members do not enter a chat anywhere, it comes from that connected account.
// The token is sent only when changed.
export default function TelegramSettings({ form }: { form: TelegramForm }) {
+ const t = useTranslations('settings.notifications');
const { settings, editable } = form;
return (
<SettingsSection
- title="Telegram bot"
- description="The bot that delivers notifications. Members choose their own chat in their preferences. The token is stored encrypted."
+ title={t('telegramBot')}
+ description={t('telegramBotHint')}
action={
editable && (
<EnabledSwitch checked={form.enabled} onChange={form.setEnabled} disabled={!editable} />
@@ -21,7 +23,7 @@ export default function TelegramSettings({ form }: { form: TelegramForm }) {
}
>
<div className="space-y-1.5 sm:max-w-md">
- <Label htmlFor="telegram-token">Bot API token (optional)</Label>
+ <Label htmlFor="telegram-token">{t('botToken')}</Label>
<SecretInput
id="telegram-token"
value={form.botToken}
diff --git a/apps/web/src/features/settings/components/schedules/SettingsScheduleDialog.tsx b/apps/web/src/features/settings/components/schedules/SettingsScheduleDialog.tsx
index cbcaf535..023a201c 100644
--- a/apps/web/src/features/settings/components/schedules/SettingsScheduleDialog.tsx
+++ b/apps/web/src/features/settings/components/schedules/SettingsScheduleDialog.tsx
@@ -14,6 +14,7 @@ import {
import { Textarea } from '@/components/ui/textarea';
import { parseScheduleInput } from '../../utils/cronSchedule';
import { SettingsScheduleInput } from './SettingsScheduleInput';
+import { useTranslations } from 'next-intl';
export function SettingsScheduleDialog({
projectKey,
@@ -30,6 +31,8 @@ export function SettingsScheduleDialog({
onSave: (value: AgentScheduleInput) => Promise<void>;
onClose: () => void;
}) {
+ const t = useTranslations('settings.schedules');
+ const tCommon = useTranslations('common');
const [agentId, setAgentId] = useState(String(initial?.agentId ?? agents[0]?.id ?? ''));
const [name, setName] = useState(initial?.name ?? '');
const [prompt, setPrompt] = useState(initial?.prompt ?? '');
@@ -55,13 +58,13 @@ export function SettingsScheduleDialog({
});
}
- const actionLabel = initial ? 'Save schedule' : 'Create schedule';
- const pendingLabel = initial ? 'Saving…' : 'Creating…';
+ const actionLabel = initial ? t('save') : t('create');
+ const pendingLabel = initial ? tCommon('saving') : t('creating');
return (
<Modal
- title={initial ? 'Edit schedule' : 'New schedule'}
- description="Choose an agent, describe the task, and set when it should run."
+ title={initial ? t('editTitle') : t('newTitle')}
+ description={t('dialogDescription')}
projectKey={projectKey}
onClose={onClose}
wide
@@ -74,7 +77,7 @@ export function SettingsScheduleDialog({
}}
>
<div className="grid gap-4 sm:grid-cols-2">
- <Field htmlFor="schedule-name" label="Name">
+ <Field htmlFor="schedule-name" label={tCommon('name')}>
<Input
id="schedule-name"
autoFocus
@@ -82,13 +85,13 @@ export function SettingsScheduleDialog({
maxLength={120}
value={name}
onChange={(event) => setName(event.target.value)}
- placeholder="Daily task review"
+ placeholder={t('namePlaceholder')}
/>
</Field>
- <Field htmlFor="schedule-agent" label="Agent">
+ <Field htmlFor="schedule-agent" label={t('agent')}>
<Select value={agentId} onValueChange={setAgentId}>
<SelectTrigger id="schedule-agent" className="w-full" aria-required="true">
- <SelectValue placeholder="Select agent" />
+ <SelectValue placeholder={t('selectAgent')} />
</SelectTrigger>
<SelectContent>
{agents.map((agent) => (
@@ -101,23 +104,21 @@ export function SettingsScheduleDialog({
</Field>
</div>
- <Field htmlFor="schedule-task" label="Task">
+ <Field htmlFor="schedule-task" label={t('task')}>
<Textarea
id="schedule-task"
required
maxLength={20_000}
value={prompt}
onChange={(event) => setPrompt(event.target.value)}
- placeholder="Review open tasks and update anything that needs attention."
+ placeholder={t('taskPlaceholder')}
className="min-h-32 resize-y"
/>
- <p className="text-xs text-muted-foreground">
- The agent receives this task on every run.
- </p>
+ <p className="text-xs text-muted-foreground">{t('taskHint')}</p>
</Field>
<div className="border-t border-border/50 pt-4">
- <Field htmlFor="schedule-input" label="Schedule (UTC)">
+ <Field htmlFor="schedule-input" label={t('scheduleUtc')}>
<SettingsScheduleInput
id="schedule-input"
value={scheduleInput}
@@ -128,7 +129,7 @@ export function SettingsScheduleDialog({
<div className="flex justify-end gap-2 border-t border-border/50 pt-4">
<Button type="button" variant="ghost" onClick={onClose} disabled={saving}>
- Cancel
+ {tCommon('cancel')}
</Button>
<Button type="submit" disabled={!isValid || saving}>
{saving ? pendingLabel : actionLabel}
diff --git a/apps/web/src/features/settings/components/schedules/SettingsScheduleInput.tsx b/apps/web/src/features/settings/components/schedules/SettingsScheduleInput.tsx
index eba46c81..1c37518e 100644
--- a/apps/web/src/features/settings/components/schedules/SettingsScheduleInput.tsx
+++ b/apps/web/src/features/settings/components/schedules/SettingsScheduleInput.tsx
@@ -1,6 +1,7 @@
import { useId } from 'react';
import { SettingsSuggestionsInput, type InputSuggestion } from './SettingsSuggestionsInput';
import { parseScheduleInput } from '../../utils/cronSchedule';
+import { useTranslations } from 'next-intl';
const scheduleSuggestions: InputSuggestion[] = [
{ value: 'Every 15 minutes', label: 'Every 15 minutes', description: '*/15 * * * *' },
@@ -22,6 +23,7 @@ export function SettingsScheduleInput({
value: string;
onChange: (value: string) => void;
}) {
+ const t = useTranslations('settings.schedules');
const result = parseScheduleInput(value);
const messageId = useId();
@@ -34,8 +36,8 @@ export function SettingsScheduleInput({
value={value}
suggestions={scheduleSuggestions}
onValueChange={onChange}
- triggerLabel="Show preset schedules"
- placeholder="Every weekday at 9:00 AM or 0 9 * * 1-5"
+ triggerLabel={t('showPresets')}
+ placeholder={t('inputPlaceholder')}
aria-invalid={!result.ok}
aria-describedby={messageId}
/>
@@ -46,7 +48,7 @@ export function SettingsScheduleInput({
}
aria-live="polite"
>
- {result.ok ? successMessage(result) : result.error}
+ {result.ok ? successMessage(result, t) : result.error}
</span>
</>
);
@@ -54,11 +56,13 @@ export function SettingsScheduleInput({
function successMessage(
result: Extract<ReturnType<typeof parseScheduleInput>, { ok: true }>,
+ t: ReturnType<typeof useTranslations<'settings.schedules'>>,
): React.ReactNode {
- if (result.source === 'cron') return `Runs: ${result.description} UTC`;
+ if (result.source === 'cron') return t('runs', { description: result.description });
return (
<>
- Cron: <code className="font-mono">{result.cron}</code> · {result.description} UTC
+ {t('cronLabel')} <code className="font-mono">{result.cron}</code> ·{' '}
+ {t('runsSuffix', { description: result.description })}
</>
);
}
diff --git a/apps/web/src/features/settings/components/schedules/SettingsScheduleRow.tsx b/apps/web/src/features/settings/components/schedules/SettingsScheduleRow.tsx
index 87bb0cb7..fa366f26 100644
--- a/apps/web/src/features/settings/components/schedules/SettingsScheduleRow.tsx
+++ b/apps/web/src/features/settings/components/schedules/SettingsScheduleRow.tsx
@@ -26,6 +26,7 @@ import { cn } from '@/lib/utils';
import SettingsIconButton from '../SettingsIconButton';
import { useSettingsCan } from '../../context/settingsPermission';
import { parseScheduleInput } from '../../utils/cronSchedule';
+import { useTranslations } from 'next-intl';
export function SettingsScheduleRow({
schedule,
@@ -44,6 +45,7 @@ export function SettingsScheduleRow({
onEdit: () => void;
onDelete: () => void;
}) {
+ const t = useTranslations('settings.schedules');
const can = useSettingsCan();
const parsedSchedule = parseScheduleInput(schedule.cron);
const scheduleDescription = parsedSchedule.ok ? parsedSchedule.description : schedule.cron;
@@ -53,7 +55,7 @@ export function SettingsScheduleRow({
<div className="flex min-w-0 items-start gap-2.5">
<span
className={cn('mt-[7px] size-2 shrink-0 rounded-full', statusDotClass(schedule.status))}
- title={schedule.status === 'active' ? 'Active' : 'Paused'}
+ title={schedule.status === 'active' ? t('statusActive') : t('statusPaused')}
/>
<Popover>
<Tooltip>
@@ -70,10 +72,10 @@ export function SettingsScheduleRow({
</Button>
</PopoverTrigger>
</TooltipTrigger>
- <TooltipContent>View task</TooltipContent>
+ <TooltipContent>{t('viewTask')}</TooltipContent>
</Tooltip>
<PopoverContent align="start" className="w-80">
- <p className="text-xs font-medium text-muted-foreground">Task</p>
+ <p className="text-xs font-medium text-muted-foreground">{t('task')}</p>
<p className="mt-1.5 text-sm whitespace-pre-wrap">{schedule.prompt}</p>
</PopoverContent>
</Popover>
@@ -102,7 +104,7 @@ export function SettingsScheduleRow({
<span
className={cn('size-2 shrink-0 rounded-full', runDotClass(schedule.lastRunStatus))}
/>
- <span className="text-sm">{runStatusLabel(schedule.lastRunStatus)}</span>
+ <span className="text-sm">{t(`runStatus.${schedule.lastRunStatus}`)}</span>
</div>
{schedule.lastRunAt && (
<p className="text-xs whitespace-nowrap text-muted-foreground tabular-nums">
@@ -111,14 +113,14 @@ export function SettingsScheduleRow({
)}
</div>
) : (
- <span className="text-xs text-muted-foreground">No runs yet</span>
+ <span className="text-xs text-muted-foreground">{t('noRunsShort')}</span>
)}
</TableCell>
<TableCell className="px-3 py-3 align-top">
<div className="flex items-center justify-end gap-1" onClick={(e) => e.stopPropagation()}>
{can('edit') && (
<SettingsIconButton
- title={schedule.status === 'active' ? 'Pause schedule' : 'Resume schedule'}
+ title={schedule.status === 'active' ? t('pause') : t('resume')}
onClick={onToggle}
>
{schedule.status === 'active' ? (
@@ -128,7 +130,7 @@ export function SettingsScheduleRow({
)}
</SettingsIconButton>
)}
- <SettingsIconButton title="Run history" onClick={onHistory}>
+ <SettingsIconButton title={t('runHistory')} onClick={onHistory}>
<History className="size-4" />
</SettingsIconButton>
{(can('edit') || can('delete')) && (
@@ -145,7 +147,7 @@ export function SettingsScheduleRow({
</Button>
</DropdownMenuTrigger>
</TooltipTrigger>
- <TooltipContent>More actions</TooltipContent>
+ <TooltipContent>{t('moreActions')}</TooltipContent>
</Tooltip>
<DropdownMenuContent align="end">
{can('edit') && (
@@ -155,13 +157,13 @@ export function SettingsScheduleRow({
onSelect={onRun}
>
{running ? <RotateCw className="animate-spin" /> : <Zap />}
- Run now
+ {t('runNow')}
</DropdownMenuItem>
)}
{can('edit') && (
<DropdownMenuItem className="min-h-11 sm:min-h-8" onSelect={onEdit}>
<Pencil />
- Edit schedule
+ {t('edit')}
</DropdownMenuItem>
)}
{can('delete') && can('edit') && <DropdownMenuSeparator />}
@@ -172,7 +174,7 @@ export function SettingsScheduleRow({
onSelect={onDelete}
>
<Trash2 />
- Delete schedule
+ {t('delete')}
</DropdownMenuItem>
)}
</DropdownMenuContent>
@@ -192,12 +194,6 @@ function formatUtc(value: string): string {
}).format(new Date(value))} UTC`;
}
-function runStatusLabel(status: NonNullable<AgentSchedule['lastRunStatus']>): string {
- if (status === 'success') return 'Succeeded';
- if (status === 'failed') return 'Failed';
- return 'Pending';
-}
-
function statusDotClass(status: AgentSchedule['status']): string {
return status === 'active' ? 'bg-emerald-500' : 'bg-muted-foreground/40';
}
diff --git a/apps/web/src/features/settings/components/schedules/SettingsScheduleRunsSheet.tsx b/apps/web/src/features/settings/components/schedules/SettingsScheduleRunsSheet.tsx
index 7edf2c60..4ee6853f 100644
--- a/apps/web/src/features/settings/components/schedules/SettingsScheduleRunsSheet.tsx
+++ b/apps/web/src/features/settings/components/schedules/SettingsScheduleRunsSheet.tsx
@@ -12,6 +12,7 @@ import {
SheetHeader,
SheetTitle,
} from '@/components/ui/sheet';
+import { useTranslations } from 'next-intl';
export function SettingsScheduleRunsSheet({
projectKey,
@@ -22,12 +23,13 @@ export function SettingsScheduleRunsSheet({
schedule: AgentSchedule | null;
onClose: () => void;
}) {
+ const t = useTranslations('settings.schedules');
const query = useAgentScheduleRuns(projectKey, schedule?.id ?? null);
return (
<Sheet open={schedule != null} onOpenChange={(open) => !open && onClose()}>
<SheetContent side="right" className="w-full gap-0 p-0 sm:max-w-xl">
<SheetHeader className="border-b">
- <SheetTitle>Run history</SheetTitle>
+ <SheetTitle>{t('runHistory')}</SheetTitle>
<SheetDescription>{schedule?.name}</SheetDescription>
</SheetHeader>
<div className="min-h-0 flex-1 overflow-y-auto">
@@ -40,7 +42,7 @@ export function SettingsScheduleRunsSheet({
))}
</div>
) : (
- <p className="p-4 text-sm text-muted-foreground">No runs yet.</p>
+ <p className="p-4 text-sm text-muted-foreground">{t('noRuns')}</p>
)}
</div>
</SheetContent>
@@ -49,6 +51,7 @@ export function SettingsScheduleRunsSheet({
}
function RunRow({ run }: { run: AgentScheduleRun }) {
+ const t = useTranslations('settings.schedules');
const [open, setOpen] = useState(false);
const contentId = useId();
const variant =
@@ -69,10 +72,10 @@ function RunRow({ run }: { run: AgentScheduleRun }) {
</button>
{open && (
<div id={contentId} className="space-y-3 px-4 pb-4 text-xs">
- <Block label="Task" value={run.prompt} />
+ <Block label={t('task')} value={run.prompt} />
<Block
- label={run.lastError ? 'Error' : 'Result'}
- value={run.lastError ?? run.output ?? 'No output'}
+ label={run.lastError ? t('error') : t('result')}
+ value={run.lastError ?? run.output ?? t('noOutput')}
/>
</div>
)}
diff --git a/apps/web/src/features/settings/components/schedules/SettingsSchedules.tsx b/apps/web/src/features/settings/components/schedules/SettingsSchedules.tsx
index 58d4b001..e3341e0c 100644
--- a/apps/web/src/features/settings/components/schedules/SettingsSchedules.tsx
+++ b/apps/web/src/features/settings/components/schedules/SettingsSchedules.tsx
@@ -18,6 +18,7 @@ import SettingsConfirmDeleteDialog from '../crud/SettingsConfirmDeleteDialog';
import { SettingsScheduleDialog } from './SettingsScheduleDialog';
import { SettingsScheduleRunsSheet } from './SettingsScheduleRunsSheet';
import { SettingsSchedulesTable } from './SettingsSchedulesTable';
+import { useTranslations } from 'next-intl';
export default function SettingsSchedules({
project,
@@ -28,6 +29,7 @@ export default function SettingsSchedules({
requestNew: boolean;
onNewHandled: () => void;
}) {
+ const t = useTranslations('settings.schedules');
const projectKey = project.project.key;
const can = useSettingsCan();
const schedulesQuery = useAgentSchedules(projectKey);
@@ -51,16 +53,13 @@ export default function SettingsSchedules({
if (agentsQuery.isError || schedulesQuery.isError) {
return (
- <EmptyState
- title="Couldn't load schedules"
- description="Check your connection and try again."
- >
+ <EmptyState title={t('loadFailed')} description={t('loadFailedHint')}>
<Button
size="sm"
variant="outline"
onClick={() => void Promise.all([agentsQuery.refetch(), schedulesQuery.refetch()])}
>
- Try again
+ {t('tryAgain')}
</Button>
</EmptyState>
);
@@ -72,13 +71,10 @@ export default function SettingsSchedules({
if (agents.length === 0) {
return (
- <EmptyState
- title="No agents to schedule"
- description="A schedule runs a task for one of your internal agents."
- >
+ <EmptyState title={t('noAgents')} description={t('noAgentsHint')}>
{can('edit') && (
<Button size="sm" asChild>
- <Link href={aiAgentsPath(projectKey)}>Create an agent</Link>
+ <Link href={aiAgentsPath(projectKey)}>{t('createAgent')}</Link>
</Button>
)}
</EmptyState>
@@ -102,10 +98,7 @@ export default function SettingsSchedules({
return (
<>
{schedules.length === 0 ? (
- <EmptyState
- title="No schedules yet"
- description="Pick an agent, a task, and how often it runs."
- />
+ <EmptyState title={t('empty')} description={t('emptyHint')} />
) : (
<div className="space-y-4">
<SettingsSchedulesTable
@@ -139,14 +132,12 @@ export default function SettingsSchedules({
{deleting && (
<SettingsConfirmDeleteDialog
- title="Delete schedule"
- confirmLabel="Delete schedule"
- message={
- <>
- The schedule <span className="font-medium">{deleting.name}</span> and its run history
- will be removed. This cannot be undone.
- </>
- }
+ title={t('delete')}
+ confirmLabel={t('delete')}
+ message={t.rich('deleteMessage', {
+ name: deleting.name,
+ v: (chunks) => <span className="font-medium">{chunks}</span>,
+ })}
onClose={() => setDeleting(null)}
onConfirm={async () => {
await deleteSchedule.mutateAsync(deleting.id);
diff --git a/apps/web/src/features/settings/components/schedules/SettingsSchedulesTable.tsx b/apps/web/src/features/settings/components/schedules/SettingsSchedulesTable.tsx
index cecaf77e..98f41e3d 100644
--- a/apps/web/src/features/settings/components/schedules/SettingsSchedulesTable.tsx
+++ b/apps/web/src/features/settings/components/schedules/SettingsSchedulesTable.tsx
@@ -1,6 +1,7 @@
import type { AgentSchedule } from '@/lib/api';
import { Table, TableBody, TableHead, TableHeader, TableRow } from '@/components/ui/table';
import { SettingsScheduleRow } from './SettingsScheduleRow';
+import { useTranslations } from 'next-intl';
interface SettingsSchedulesTableProps {
schedules: AgentSchedule[];
@@ -21,6 +22,8 @@ export function SettingsSchedulesTable({
onEdit,
onDelete,
}: SettingsSchedulesTableProps) {
+ const t = useTranslations('settings.schedules');
+ const tCommon = useTranslations('common');
return (
<Table className="min-w-[960px] table-fixed">
<colgroup>
@@ -32,12 +35,18 @@ export function SettingsSchedulesTable({
</colgroup>
<TableHeader>
<TableRow className="hover:bg-transparent">
- <TableHead className="text-xs font-medium text-muted-foreground">Task</TableHead>
- <TableHead className="text-xs font-medium text-muted-foreground">Schedule</TableHead>
- <TableHead className="text-xs font-medium text-muted-foreground">Next run</TableHead>
- <TableHead className="text-xs font-medium text-muted-foreground">Last run</TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">{t('task')}</TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('schedule')}
+ </TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('nextRun')}
+ </TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('lastRun')}
+ </TableHead>
<TableHead className="text-right text-xs font-medium text-muted-foreground">
- Actions
+ {tCommon('actions')}
</TableHead>
</TableRow>
</TableHeader>
diff --git a/apps/web/src/features/settings/components/schedules/SettingsSuggestionsInput.tsx b/apps/web/src/features/settings/components/schedules/SettingsSuggestionsInput.tsx
index 07902864..7d2852de 100644
--- a/apps/web/src/features/settings/components/schedules/SettingsSuggestionsInput.tsx
+++ b/apps/web/src/features/settings/components/schedules/SettingsSuggestionsInput.tsx
@@ -29,7 +29,7 @@ export function SettingsSuggestionsInput({
value,
suggestions,
onValueChange,
- triggerLabel = 'Show suggestions',
+ triggerLabel,
...inputProps
}: SuggestionsInputProps) {
const listId = useId();
diff --git a/apps/web/src/features/settings/components/states/SettingsDeleteStateDialog.tsx b/apps/web/src/features/settings/components/states/SettingsDeleteStateDialog.tsx
index c3bf3034..c7ee86a0 100644
--- a/apps/web/src/features/settings/components/states/SettingsDeleteStateDialog.tsx
+++ b/apps/web/src/features/settings/components/states/SettingsDeleteStateDialog.tsx
@@ -1,4 +1,5 @@
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import { type ProjectDetail, type Column } from '@/lib/api';
import ConfirmDialog from '@/components/common/overlay/ConfirmDialog';
import { Checkbox } from '@/components/ui/checkbox';
@@ -23,6 +24,8 @@ export default function SettingsDeleteStateDialog({
issueCount: number;
onClose: () => void;
}) {
+ const t = useTranslations('settings.states');
+ const tStateType = useTranslations('display.stateTypes');
const otherColumns = project.columns.filter((c) => c.id !== column.id);
const [action, setAction] = useState<'move' | 'delete'>(otherColumns.length ? 'move' : 'delete');
const [targetColumnId, setTargetColumnId] = useState<number | undefined>(otherColumns[0]?.id);
@@ -39,22 +42,17 @@ export default function SettingsDeleteStateDialog({
return (
<ConfirmDialog
- title={`Delete state "${column.name}"`}
- confirmLabel={action === 'move' && issueCount > 0 ? 'Move & delete state' : 'Delete state'}
+ title={t('deleteTitle', { name: column.name })}
+ confirmLabel={action === 'move' && issueCount > 0 ? t('moveAndDelete') : t('deleteConfirm')}
confirmDisabled={action === 'move' && issueCount > 0 && targetColumnId == null}
onConfirm={confirm}
onClose={onClose}
>
{issueCount === 0 ? (
- <p className="text-sm text-muted-foreground">
- This state has no issues. It will be removed.
- </p>
+ <p className="text-sm text-muted-foreground">{t('deleteNoIssues')}</p>
) : (
<div className="space-y-3">
- <p className="text-sm">
- This state has {issueCount} issue{issueCount === 1 ? '' : 's'}. Choose what happens to
- them.
- </p>
+ <p className="text-sm">{t('deleteHasIssues', { count: issueCount })}</p>
<div className="space-y-2">
<Label>
<Checkbox
@@ -62,7 +60,7 @@ export default function SettingsDeleteStateDialog({
disabled={otherColumns.length === 0}
onCheckedChange={(v) => v === true && setAction('move')}
/>
- Move issues to another state
+ {t('moveIssues')}
</Label>
{action === 'move' && (
<Select
@@ -70,12 +68,12 @@ export default function SettingsDeleteStateDialog({
onValueChange={(v) => setTargetColumnId(Number(v))}
>
<SelectTrigger className="ml-6 w-[calc(100%-1.5rem)]">
- <SelectValue placeholder="Select a state" />
+ <SelectValue placeholder={t('selectState')} />
</SelectTrigger>
<SelectContent>
{otherColumns.map((c) => (
<SelectItem key={c.id} value={String(c.id)}>
- {c.name} ({c.stateType})
+ {t('stateOption', { name: c.name, type: tStateType(c.stateType) })}
</SelectItem>
))}
</SelectContent>
@@ -86,7 +84,7 @@ export default function SettingsDeleteStateDialog({
checked={action === 'delete'}
onCheckedChange={(v) => v === true && setAction('delete')}
/>
- <span className="text-destructive">Delete issues permanently</span>
+ <span className="text-destructive">{t('deleteIssues')}</span>
</Label>
</div>
</div>
diff --git a/apps/web/src/features/settings/components/states/SettingsStateRow.tsx b/apps/web/src/features/settings/components/states/SettingsStateRow.tsx
index 09ecd968..a83b5e4e 100644
--- a/apps/web/src/features/settings/components/states/SettingsStateRow.tsx
+++ b/apps/web/src/features/settings/components/states/SettingsStateRow.tsx
@@ -1,6 +1,7 @@
import { useSortable } from '@dnd-kit/sortable';
import { CSS } from '@dnd-kit/utilities';
import { GripVertical, Pencil, Trash2 } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { type Column } from '@/lib/api';
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
@@ -20,6 +21,7 @@ export function SettingsStateRow({
onEdit: () => void;
onDelete: () => void;
}) {
+ const t = useTranslations('settings.states');
const can = useSettingsCan();
// Reordering is a states edit; disable dragging and hide the grip without it.
const canEdit = can('edit');
@@ -44,7 +46,7 @@ export function SettingsStateRow({
{...attributes}
{...listeners}
className="-ml-1 cursor-grab touch-none text-muted-foreground/50 group-hover/item:text-muted-foreground"
- title="Drag to reorder"
+ title={t('dragToReorder')}
>
<GripVertical className="size-4" />
</button>
@@ -61,7 +63,7 @@ export function SettingsStateRow({
variant="ghost"
size="icon"
className="size-6 text-muted-foreground hover:text-foreground"
- title="Edit state"
+ title={t('edit')}
onClick={onEdit}
>
<Pencil className="size-4" />
@@ -72,7 +74,7 @@ export function SettingsStateRow({
variant="ghost"
size="icon"
className="size-6 text-muted-foreground hover:text-destructive"
- title="Delete state"
+ title={t('delete')}
onClick={onDelete}
>
<Trash2 className="size-4" />
diff --git a/apps/web/src/features/settings/components/states/SettingsStates.tsx b/apps/web/src/features/settings/components/states/SettingsStates.tsx
index e8146ce1..1996c53e 100644
--- a/apps/web/src/features/settings/components/states/SettingsStates.tsx
+++ b/apps/web/src/features/settings/components/states/SettingsStates.tsx
@@ -2,6 +2,7 @@ import { useState } from 'react';
import { closestCenter, DndContext, type DragEndEvent } from '@dnd-kit/core';
import { SortableContext, verticalListSortingStrategy } from '@dnd-kit/sortable';
import { Plus } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { type Column, type ProjectDetail, type StateType } from '@/lib/api';
import { useDndSensors } from '@/lib/dnd';
import { STATE_TYPES } from '@/utils/fieldOptions';
@@ -30,6 +31,9 @@ export default function SettingsStates({ project }: { project: ProjectDetail })
const [editName, setEditName] = useState('');
const [editColor, setEditColor] = useState(DEFAULT_COLOR);
const [deleting, setDeleting] = useState<Column | null>(null);
+ const t = useTranslations('settings.states');
+ const tCommon = useTranslations('common');
+ const tStateType = useTranslations('display.stateTypes');
const sensors = useDndSensors();
const can = useSettingsCan();
const createColumn = useCreateColumn(project.project.key);
@@ -106,26 +110,26 @@ export default function SettingsStates({ project }: { project: ProjectDetail })
return (
<div key={s} className="mb-8 last:mb-0">
<div className="mb-1 flex items-center justify-between border-b pb-1">
- <span className="text-xs font-medium text-muted-foreground capitalize">{s}</span>
+ <span className="text-xs font-medium text-muted-foreground">{tStateType(s)}</span>
{can('create') && (
<Button
variant="ghost"
size="sm"
className="-mr-2 h-7 gap-1.5 text-xs text-muted-foreground hover:text-foreground"
- title={`Add ${s} state`}
+ title={t('addState', { type: tStateType(s) })}
onClick={() => startAdd(s)}
>
<Plus className="size-3.5" />
- New
+ {tCommon('new')}
</Button>
)}
</div>
<ItemGroup>
{group.length === 0 && addingType !== s && (
<SettingsEmpty
- title={`No ${s} states`}
- description="Add a workflow state for this group."
- addLabel="New state"
+ title={t('emptyTitle', { type: tStateType(s) })}
+ description={t('emptyHint')}
+ addLabel={t('newState')}
onAdd={() => startAdd(s)}
/>
)}
@@ -139,8 +143,8 @@ export default function SettingsStates({ project }: { project: ProjectDetail })
key={c.id}
name={editName}
onNameChange={setEditName}
- placeholder="State name"
- submitLabel="Save"
+ placeholder={t('namePlaceholder')}
+ submitLabel={tCommon('save')}
onSubmit={() => void saveEdit(c)}
onCancel={() => setEditingId(null)}
leading={<SettingsColorField value={editColor} onChange={setEditColor} />}
@@ -159,8 +163,8 @@ export default function SettingsStates({ project }: { project: ProjectDetail })
<SettingsInlineEditForm
name={name}
onNameChange={setName}
- placeholder="State name"
- submitLabel="Add"
+ placeholder={t('namePlaceholder')}
+ submitLabel={tCommon('add')}
onSubmit={() => void add(s)}
onCancel={() => setAddingType(null)}
leading={<SettingsColorField value={color} onChange={setColor} />}
diff --git a/apps/web/src/features/settings/components/states/StatesImportDialog.tsx b/apps/web/src/features/settings/components/states/StatesImportDialog.tsx
index fa1ca36c..bb92035c 100644
--- a/apps/web/src/features/settings/components/states/StatesImportDialog.tsx
+++ b/apps/web/src/features/settings/components/states/StatesImportDialog.tsx
@@ -2,13 +2,14 @@
import { useState } from 'react';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import { colorDot } from '@/components/common/fields/colorDot';
import Modal from '@/components/common/overlay/Modal';
import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';
import { useCreateColumn, useUpdateColumn } from '../../services/settings.service';
import type { PlannedState } from '../../utils/statesTransfer';
-import { transferActionLabel } from '../../utils/transferAction';
+import { useTransferActionLabel } from '../../utils/transferAction';
// Confirms a states paste before applying it: lists each incoming state, its group,
// and whether it is created or updates an existing state's color. On confirm, new
@@ -22,6 +23,10 @@ export default function StatesImportDialog({
planned: PlannedState[];
onClose: () => void;
}) {
+ const t = useTranslations('settings.states');
+ const tCommon = useTranslations('common');
+ const tStateType = useTranslations('display.stateTypes');
+ const actionLabel = useTransferActionLabel();
const createColumn = useCreateColumn(projectKey);
const updateColumn = useUpdateColumn(projectKey);
const [busy, setBusy] = useState(false);
@@ -46,7 +51,7 @@ export default function StatesImportDialog({
updated += 1;
}
}
- toast.success(`Applied states: ${created} created, ${updated} updated.`);
+ toast.success(t('imported', { created, updated }));
onClose();
} catch {
// The failed mutation is toasted by the global handler; keep the dialog open.
@@ -55,11 +60,10 @@ export default function StatesImportDialog({
}
return (
- <Modal title="Apply states from clipboard" onClose={onClose} wide>
+ <Modal title={t('importTitle')} onClose={onClose} wide>
<div className="space-y-4">
<p className="text-xs text-muted-foreground">
- {applicable.length} state{applicable.length === 1 ? '' : 's'} will be applied. A matching
- state keeps its group; only its color is updated.
+ {t('importSummary', { count: applicable.length })}
</p>
<div className="max-h-[50vh] divide-y divide-border/60 overflow-y-auto rounded-md border border-border/60">
{planned.map((state) => (
@@ -69,25 +73,24 @@ export default function StatesImportDialog({
>
{colorDot(state.color)}
<span className="min-w-0 flex-1 truncate text-sm font-medium">{state.name}</span>
- <span className="shrink-0 text-xs text-muted-foreground capitalize">
- {state.stateType}
+ <span className="shrink-0 text-xs text-muted-foreground">
+ {tStateType(state.stateType)}
</span>
<Badge
variant={state.action === 'unchanged' ? 'outline' : 'secondary'}
className="shrink-0 px-1.5 py-0 text-[10px] font-normal"
>
- {transferActionLabel(state.action)}
+ {actionLabel(state.action)}
</Badge>
</div>
))}
</div>
<div className="flex justify-end gap-2">
<Button variant="outline" onClick={onClose} disabled={busy}>
- Cancel
+ {tCommon('cancel')}
</Button>
<Button onClick={apply} disabled={busy || applicable.length === 0}>
- Apply {applicable.length > 0 ? applicable.length : ''} state
- {applicable.length === 1 ? '' : 's'}
+ {t('importApply', { count: applicable.length })}
</Button>
</div>
</div>
diff --git a/apps/web/src/features/settings/components/states/StatesToolbar.tsx b/apps/web/src/features/settings/components/states/StatesToolbar.tsx
index 690ca7a3..b7aff7e5 100644
--- a/apps/web/src/features/settings/components/states/StatesToolbar.tsx
+++ b/apps/web/src/features/settings/components/states/StatesToolbar.tsx
@@ -3,6 +3,7 @@
import { useCallback, useEffect, useState } from 'react';
import { ClipboardPaste, Copy, MoreHorizontal } from 'lucide-react';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import type { Column } from '@/lib/api';
import { Button } from '@/components/ui/button';
import {
@@ -14,6 +15,7 @@ import {
} from '@/components/ui/dropdown-menu';
import { usePermissions } from '@/hooks/usePermissions';
import { useIsMac } from '@/context/useHotkeys';
+import { useTransferErrorMessage } from '../../hooks/useTransferErrorMessage';
import StatesImportDialog from './StatesImportDialog';
import {
parseStatesText,
@@ -32,38 +34,41 @@ export default function StatesToolbar({
projectKey: string;
columns: Column[];
}) {
+ const t = useTranslations('settings.states');
+ const tTransfer = useTranslations('settings.transfer');
+ const transferError = useTransferErrorMessage();
const { can } = usePermissions();
const mod = useIsMac() ? '⌘' : 'Ctrl';
const [importing, setImporting] = useState<PlannedState[] | null>(null);
const copyStates = useCallback(async () => {
if (columns.length === 0) {
- toast.info('No states to copy.');
+ toast.info(t('nothingToCopy'));
return;
}
try {
await navigator.clipboard.writeText(serializeStates(columns));
- toast.success(`Copied ${columns.length} state${columns.length === 1 ? '' : 's'}.`);
+ toast.success(t('copied', { count: columns.length }));
} catch {
- toast.error('Could not copy to the clipboard.');
+ toast.error(tTransfer('copyFailed'));
}
- }, [columns]);
+ }, [columns, t, tTransfer]);
const pasteStates = useCallback(async () => {
let text: string;
try {
text = await navigator.clipboard.readText();
} catch {
- toast.error('Could not read the clipboard.');
+ toast.error(tTransfer('readFailed'));
return;
}
try {
const parsed = parseStatesText(text);
setImporting(planStatesImport(parsed, columns));
} catch (err) {
- toast.error(err instanceof Error ? err.message : 'Could not read states from the clipboard.');
+ toast.error(transferError(err, t('parseFailed')));
}
- }, [columns]);
+ }, [columns, t, tTransfer, transferError]);
// Cmd/Ctrl+C copies, Cmd/Ctrl+V pastes — but only on this page, not while typing,
// and Cmd+C only when no text is selected (so an intentional text copy still works).
@@ -102,7 +107,7 @@ export default function StatesToolbar({
variant="ghost"
size="icon"
className="size-8 text-muted-foreground hover:text-foreground"
- aria-label="State import and export"
+ aria-label={t('menu')}
>
<MoreHorizontal className="size-4" />
</Button>
@@ -110,12 +115,12 @@ export default function StatesToolbar({
<DropdownMenuContent align="end" className="w-52">
<DropdownMenuItem onClick={() => void copyStates()} disabled={columns.length === 0}>
<Copy className="size-4" />
- Copy states
+ {t('copy')}
<DropdownMenuShortcut>{mod}C</DropdownMenuShortcut>
</DropdownMenuItem>
<DropdownMenuItem onClick={() => void pasteStates()}>
<ClipboardPaste className="size-4" />
- Paste states
+ {t('paste')}
<DropdownMenuShortcut>{mod}V</DropdownMenuShortcut>
</DropdownMenuItem>
</DropdownMenuContent>
diff --git a/apps/web/src/features/settings/components/webhooks/JsonViewer.tsx b/apps/web/src/features/settings/components/webhooks/JsonViewer.tsx
index fe8de5fb..6243b9af 100644
--- a/apps/web/src/features/settings/components/webhooks/JsonViewer.tsx
+++ b/apps/web/src/features/settings/components/webhooks/JsonViewer.tsx
@@ -1,4 +1,5 @@
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import { Check, ChevronDown, ChevronRight, Copy } from 'lucide-react';
import { Button } from '@/components/ui/button';
@@ -7,6 +8,7 @@ import { Button } from '@/components/ui/button';
// on the fly); a non-JSON string is shown as raw text. A copy button copies the
// pretty-printed JSON.
export function JsonViewer({ value }: { value: unknown }) {
+ const t = useTranslations('common');
const { data, isJson } = normalize(value);
const [copied, setCopied] = useState(false);
@@ -26,7 +28,7 @@ export function JsonViewer({ value }: { value: unknown }) {
variant="ghost"
size="icon"
className="absolute top-1.5 right-1.5 z-10 size-6 text-muted-foreground opacity-0 group-hover/json:opacity-100 hover:text-foreground"
- title="Copy"
+ title={t('copy')}
onClick={copy}
>
{copied ? <Check className="size-3.5" /> : <Copy className="size-3.5" />}
diff --git a/apps/web/src/features/settings/components/webhooks/SettingsWebhookDeliveriesSheet.tsx b/apps/web/src/features/settings/components/webhooks/SettingsWebhookDeliveriesSheet.tsx
index 63061e42..5833fa0a 100644
--- a/apps/web/src/features/settings/components/webhooks/SettingsWebhookDeliveriesSheet.tsx
+++ b/apps/web/src/features/settings/components/webhooks/SettingsWebhookDeliveriesSheet.tsx
@@ -1,4 +1,5 @@
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import { ChevronDown, ChevronRight } from 'lucide-react';
import type { Webhook, WebhookDelivery } from '@/lib/api';
import { formatDateTime } from '@/utils/dates';
@@ -25,11 +26,13 @@ export function SettingsWebhookDeliveriesSheet({
webhook: Webhook | null;
onClose: () => void;
}) {
+ const t = useTranslations('settings.webhooks');
+
return (
<Sheet open={webhook != null} onOpenChange={(open) => !open && onClose()}>
<SheetContent side="right" className="w-full gap-0 p-0 sm:max-w-xl">
<SheetHeader className="border-b">
- <SheetTitle>Delivery history</SheetTitle>
+ <SheetTitle>{t('deliveryHistory')}</SheetTitle>
<SheetDescription className="truncate font-mono text-xs">{webhook?.url}</SheetDescription>
</SheetHeader>
{webhook && <DeliveriesList webhookId={webhook.id} />}
@@ -39,6 +42,8 @@ export function SettingsWebhookDeliveriesSheet({
}
function DeliveriesList({ webhookId }: { webhookId: number }) {
+ const t = useTranslations('settings.webhooks');
+ const tCommon = useTranslations('common');
const query = useWebhookDeliveries(webhookId);
const deliveries = query.data?.pages.flatMap((p) => p.items) ?? [];
@@ -46,7 +51,7 @@ function DeliveriesList({ webhookId }: { webhookId: number }) {
return <ListSkeleton rows={4} className="p-4" rowClassName="h-12" />;
}
if (deliveries.length === 0) {
- return <p className="p-4 text-sm text-muted-foreground">No deliveries yet.</p>;
+ return <p className="p-4 text-sm text-muted-foreground">{t('noDeliveries')}</p>;
}
return (
@@ -65,25 +70,24 @@ function DeliveriesList({ webhookId }: { webhookId: number }) {
disabled={query.isFetchingNextPage}
onClick={() => query.fetchNextPage()}
>
- {query.isFetchingNextPage ? 'Loading…' : 'Load 25 more'}
+ {query.isFetchingNextPage ? tCommon('loading') : t('loadMore')}
</Button>
) : (
- <p className="text-center text-xs text-muted-foreground">End of history</p>
+ <p className="text-center text-xs text-muted-foreground">{t('endOfHistory')}</p>
)}
</div>
</div>
);
}
-function outcomeText(d: WebhookDelivery): string {
- if (d.responseStatus != null) return `HTTP ${d.responseStatus}`;
- if (d.lastError != null) return d.lastError;
- return d.status === 'pending' ? 'Queued' : '';
-}
-
function DeliveryItem({ delivery: d }: { delivery: WebhookDelivery }) {
+ const t = useTranslations('settings.webhooks');
const [open, setOpen] = useState(false);
- const outcome = outcomeText(d);
+ // What came back: the response status, the error, or that it is still queued.
+ const outcome =
+ d.responseStatus != null
+ ? `HTTP ${d.responseStatus}`
+ : (d.lastError ?? (d.status === 'pending' ? t('queued') : ''));
return (
<div>
<button
@@ -98,7 +102,9 @@ function DeliveryItem({ delivery: d }: { delivery: WebhookDelivery }) {
)}
<StatusBadge status={d.status} />
<span className="font-mono">{d.eventType}</span>
- {d.attempts > 1 && <span className="text-muted-foreground">·{d.attempts} attempts</span>}
+ {d.attempts > 1 && (
+ <span className="text-muted-foreground">{t('attempts', { count: d.attempts })}</span>
+ )}
<span className="truncate text-muted-foreground">{outcome}</span>
<span className="ml-auto shrink-0 text-muted-foreground">
{formatDateTime(d.createdAt)}
@@ -106,9 +112,13 @@ function DeliveryItem({ delivery: d }: { delivery: WebhookDelivery }) {
</button>
{open && (
<div className="space-y-3 px-4 pb-3">
- <DetailBlock label="Sent" value={d.payload} />
+ <DetailBlock label={t('sent')} value={d.payload} />
<DetailBlock
- label={`Response${d.responseStatus != null ? ` · HTTP ${d.responseStatus}` : ''}`}
+ label={
+ d.responseStatus != null
+ ? t('responseWithStatus', { status: d.responseStatus })
+ : t('response')
+ }
value={d.responseBody ?? d.lastError}
/>
</div>
@@ -118,13 +128,14 @@ function DeliveryItem({ delivery: d }: { delivery: WebhookDelivery }) {
}
function DetailBlock({ label, value }: { label: string; value: unknown }) {
+ const t = useTranslations('settings.webhooks');
return (
<div className="space-y-1">
<div className="text-[10px] font-medium tracking-wide text-muted-foreground uppercase">
{label}
</div>
{value == null || value === '' ? (
- <p className="text-xs text-muted-foreground">(no response)</p>
+ <p className="text-xs text-muted-foreground">{t('noResponse')}</p>
) : (
<JsonViewer value={value} />
)}
@@ -139,9 +150,10 @@ const STATUS_VARIANT: Record<WebhookDelivery['status'], 'secondary' | 'destructi
};
function StatusBadge({ status }: { status: WebhookDelivery['status'] }) {
+ const t = useTranslations('settings.webhooks');
return (
- <Badge variant={STATUS_VARIANT[status]} className="shrink-0 capitalize">
- {status}
+ <Badge variant={STATUS_VARIANT[status]} className="shrink-0">
+ {t(`statuses.${status}`)}
</Badge>
);
}
diff --git a/apps/web/src/features/settings/components/webhooks/SettingsWebhookDialog.tsx b/apps/web/src/features/settings/components/webhooks/SettingsWebhookDialog.tsx
index 445b43a2..d3e6a4ab 100644
--- a/apps/web/src/features/settings/components/webhooks/SettingsWebhookDialog.tsx
+++ b/apps/web/src/features/settings/components/webhooks/SettingsWebhookDialog.tsx
@@ -1,4 +1,5 @@
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import { WEBHOOK_EVENT_TYPES, type Webhook, type WebhookEventType } from '@/lib/api';
import Modal from '@/components/common/overlay/Modal';
import { Button } from '@/components/ui/button';
@@ -28,6 +29,8 @@ export function SettingsWebhookDialog({
onSave: (value: WebhookFormValue) => Promise<void>;
onClose: () => void;
}) {
+ const t = useTranslations('settings.webhooks');
+ const tCommon = useTranslations('common');
const [url, setUrl] = useState(initial?.url ?? '');
const [events, setEvents] = useState<Set<WebhookEventType>>(new Set(initial?.events ?? []));
const [isActive, setIsActive] = useState(initial?.isActive ?? true);
@@ -48,13 +51,13 @@ export function SettingsWebhookDialog({
await onSave({ url: url.trim(), events: [...events], isActive });
}
- const actionLabel = initial ? 'Save webhook' : 'Create webhook';
- const pendingLabel = initial ? 'Saving…' : 'Creating…';
+ const actionLabel = initial ? t('save') : t('create');
+ const pendingLabel = initial ? tCommon('saving') : t('creating');
return (
<Modal
- title={initial ? 'Edit webhook' : 'New webhook'}
- description="Set the payload URL and choose which project events to send."
+ title={t(initial ? 'dialogEdit' : 'dialogNew')}
+ description={t('dialogHint')}
projectKey={projectKey}
onClose={onClose}
wide
@@ -67,7 +70,7 @@ export function SettingsWebhookDialog({
}}
>
<div className="space-y-1.5">
- <Label htmlFor="webhook-url">Payload URL</Label>
+ <Label htmlFor="webhook-url">{t('payloadUrl')}</Label>
<Input
id="webhook-url"
autoFocus
@@ -79,7 +82,7 @@ export function SettingsWebhookDialog({
</div>
<div className="space-y-1.5">
- <span className="text-sm font-medium">Events</span>
+ <span className="text-sm font-medium">{t('events')}</span>
<div className="grid gap-2 sm:grid-cols-2">
{WEBHOOK_EVENT_TYPES.map((event) => (
<label key={event} className="flex cursor-pointer items-center gap-2">
@@ -96,13 +99,13 @@ export function SettingsWebhookDialog({
<div className="border-t border-border/50 pt-4">
<label className="flex w-fit cursor-pointer items-center gap-2 text-sm">
<Checkbox checked={isActive} onCheckedChange={(v) => setIsActive(v === true)} />
- <span>Active</span>
+ <span>{t('active')}</span>
</label>
</div>
<div className="flex justify-end gap-2 border-t border-border/50 pt-4">
<Button type="button" variant="ghost" onClick={onClose} disabled={saving}>
- Cancel
+ {tCommon('cancel')}
</Button>
<Button type="submit" disabled={!valid || saving}>
{saving ? pendingLabel : actionLabel}
diff --git a/apps/web/src/features/settings/components/webhooks/SettingsWebhookRow.tsx b/apps/web/src/features/settings/components/webhooks/SettingsWebhookRow.tsx
index 16130793..55039177 100644
--- a/apps/web/src/features/settings/components/webhooks/SettingsWebhookRow.tsx
+++ b/apps/web/src/features/settings/components/webhooks/SettingsWebhookRow.tsx
@@ -1,4 +1,5 @@
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import { Check, Copy, Eye, EyeOff, History, MoreHorizontal, Pencil, Trash2 } from 'lucide-react';
import type { Webhook } from '@/lib/api';
import { Badge } from '@/components/ui/badge';
@@ -27,6 +28,7 @@ export function SettingsWebhookRow({
onEdit: () => void;
onDelete: () => void;
}) {
+ const t = useTranslations('settings.webhooks');
const can = useSettingsCan();
const [revealed, setRevealed] = useState(false);
const [copied, setCopied] = useState(false);
@@ -50,7 +52,7 @@ export function SettingsWebhookRow({
'mt-1.5 size-2 shrink-0 rounded-full',
webhook.isActive ? 'bg-emerald-500' : 'bg-muted-foreground/40',
)}
- title={webhook.isActive ? 'Active' : 'Disabled'}
+ title={t(webhook.isActive ? 'active' : 'disabled')}
/>
<div className="min-w-0 space-y-1.5">
<span className="block truncate text-sm font-medium" title={webhook.url}>
@@ -64,7 +66,7 @@ export function SettingsWebhookRow({
variant="ghost"
size="icon"
className="size-6 shrink-0"
- title={revealed ? 'Hide secret' : 'Reveal secret'}
+ title={t(revealed ? 'hideSecret' : 'revealSecret')}
onClick={() => setRevealed((r) => !r)}
>
{revealed ? <EyeOff className="size-3.5" /> : <Eye className="size-3.5" />}
@@ -73,7 +75,7 @@ export function SettingsWebhookRow({
variant="ghost"
size="icon"
className="size-6 shrink-0"
- title="Copy secret"
+ title={t('copySecret')}
onClick={copySecret}
>
{copied ? <Check className="size-3.5" /> : <Copy className="size-3.5" />}
@@ -93,7 +95,7 @@ export function SettingsWebhookRow({
</TableCell>
<TableCell className="px-3 py-3 align-top">
<div className="flex items-center justify-end gap-1">
- <SettingsIconButton title="Delivery history" onClick={onShowDeliveries}>
+ <SettingsIconButton title={t('deliveryHistory')} onClick={onShowDeliveries}>
<History className="size-4" />
</SettingsIconButton>
{(can('edit') || can('delete')) && (
@@ -110,13 +112,13 @@ export function SettingsWebhookRow({
</Button>
</DropdownMenuTrigger>
</TooltipTrigger>
- <TooltipContent>More actions</TooltipContent>
+ <TooltipContent>{t('moreActions')}</TooltipContent>
</Tooltip>
<DropdownMenuContent align="end">
{can('edit') && (
<DropdownMenuItem className="min-h-11 sm:min-h-8" onSelect={onEdit}>
<Pencil />
- Edit webhook
+ {t('edit')}
</DropdownMenuItem>
)}
{can('delete') && can('edit') && <DropdownMenuSeparator />}
@@ -127,7 +129,7 @@ export function SettingsWebhookRow({
onSelect={onDelete}
>
<Trash2 />
- Delete webhook
+ {t('delete')}
</DropdownMenuItem>
)}
</DropdownMenuContent>
diff --git a/apps/web/src/features/settings/components/webhooks/SettingsWebhooks.tsx b/apps/web/src/features/settings/components/webhooks/SettingsWebhooks.tsx
index 3645d36d..8505b316 100644
--- a/apps/web/src/features/settings/components/webhooks/SettingsWebhooks.tsx
+++ b/apps/web/src/features/settings/components/webhooks/SettingsWebhooks.tsx
@@ -1,4 +1,5 @@
import { useEffect, useState } from 'react';
+import { useTranslations } from 'next-intl';
import type { ProjectDetail, Webhook } from '@/lib/api';
import {
useWebhooksQuery,
@@ -25,6 +26,7 @@ export default function SettingsWebhooks({
requestNew: boolean;
onNewHandled: () => void;
}) {
+ const t = useTranslations('settings.webhooks');
const projectKey = project.project.key;
const webhooksQuery = useWebhooksQuery(projectKey);
const webhooks = webhooksQuery.data ?? [];
@@ -61,10 +63,7 @@ export default function SettingsWebhooks({
{webhooksQuery.isPending ? (
<ListSkeleton rows={3} rowClassName="h-12" />
) : webhooks.length === 0 ? (
- <EmptyState
- title="No webhooks yet"
- description="Set a payload URL and choose which events to send."
- />
+ <EmptyState title={t('emptyTitle')} description={t('emptyHint')} />
) : (
<div className="space-y-4">
<SettingsWebhooksTable
@@ -89,14 +88,12 @@ export default function SettingsWebhooks({
{deleting && (
<SettingsConfirmDeleteDialog
- title="Delete webhook"
- confirmLabel="Delete webhook"
- message={
- <>
- Deliveries to <span className="font-medium">{deleting.url}</span> will stop. This
- cannot be undone.
- </>
- }
+ title={t('deleteTitle')}
+ confirmLabel={t('delete')}
+ message={t.rich('deleteMessage', {
+ url: deleting.url,
+ v: (chunks) => <span className="font-medium">{chunks}</span>,
+ })}
onClose={() => setDeleting(null)}
onConfirm={async () => {
await deleteWebhook.mutateAsync(deleting.id);
diff --git a/apps/web/src/features/settings/components/webhooks/SettingsWebhooksTable.tsx b/apps/web/src/features/settings/components/webhooks/SettingsWebhooksTable.tsx
index c78f0f76..65aede0c 100644
--- a/apps/web/src/features/settings/components/webhooks/SettingsWebhooksTable.tsx
+++ b/apps/web/src/features/settings/components/webhooks/SettingsWebhooksTable.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import type { Webhook } from '@/lib/api';
import { Table, TableBody, TableHead, TableHeader, TableRow } from '@/components/ui/table';
import { SettingsWebhookRow } from './SettingsWebhookRow';
@@ -15,6 +16,9 @@ export function SettingsWebhooksTable({
onEdit,
onDelete,
}: SettingsWebhooksTableProps) {
+ const t = useTranslations('settings.webhooks');
+ const tCommon = useTranslations('common');
+
return (
<Table className="min-w-[820px] table-fixed">
<colgroup>
@@ -24,10 +28,14 @@ export function SettingsWebhooksTable({
</colgroup>
<TableHeader>
<TableRow className="hover:bg-transparent">
- <TableHead className="text-xs font-medium text-muted-foreground">Endpoint</TableHead>
- <TableHead className="text-xs font-medium text-muted-foreground">Events</TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.endpoint')}
+ </TableHead>
+ <TableHead className="text-xs font-medium text-muted-foreground">
+ {t('columns.events')}
+ </TableHead>
<TableHead className="text-right text-xs font-medium text-muted-foreground">
- Actions
+ {tCommon('actions')}
</TableHead>
</TableRow>
</TableHeader>
diff --git a/apps/web/src/features/settings/hooks/useEmailForm.ts b/apps/web/src/features/settings/hooks/useEmailForm.ts
index 905dc4f8..e79ce1ce 100644
--- a/apps/web/src/features/settings/hooks/useEmailForm.ts
+++ b/apps/web/src/features/settings/hooks/useEmailForm.ts
@@ -2,6 +2,7 @@
import { useState } from 'react';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import type { NotificationEncryption, NotificationSettings } from '@/lib/api';
import { useUpdateNotificationSettings } from '../services/settings.service';
import type { EmailProvider } from '@/components/common/inputs/ProviderToggle';
@@ -41,6 +42,7 @@ export function useEmailForm(
settings: NotificationSettings,
editable: boolean,
): EmailForm {
+ const t = useTranslations('settings.notifications');
const update = useUpdateNotificationSettings(projectKey);
// The project's own provider wins when it configured one; otherwise it sends
@@ -96,7 +98,7 @@ export function useEmailForm(
});
setPassword('');
setApiKey('');
- toast.success('Email provider saved');
+ toast.success(t('emailSaved'));
}
return {
diff --git a/apps/web/src/features/settings/hooks/useFeatureToggles.ts b/apps/web/src/features/settings/hooks/useFeatureToggles.ts
index e7b41a33..2c259fcf 100644
--- a/apps/web/src/features/settings/hooks/useFeatureToggles.ts
+++ b/apps/web/src/features/settings/hooks/useFeatureToggles.ts
@@ -1,8 +1,10 @@
'use client';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import type { ProjectDetail, ProjectFeatures } from '@/lib/api';
-import { FEATURE_LABEL, projectFeatures } from '@/utils/projectFeatures';
+import { projectFeatures } from '@/utils/projectFeatures';
+import { useFeatureLabel } from '@/hooks/useFeatureLabel';
import { usePermissions } from '@/hooks/usePermissions';
import { useUpdateProjectFeatures } from '../services/settings.service';
@@ -18,12 +20,14 @@ export interface FeatureTogglesForm {
// already loaded. Each switch saves on its own — there is nothing to draft, so the
// General page's Save button does not cover it.
export function useFeatureToggles(project: ProjectDetail): FeatureTogglesForm {
+ const t = useTranslations('settings.general');
+ const featureLabel = useFeatureLabel();
const { isOwner } = usePermissions();
const update = useUpdateProjectFeatures(project.project.key);
async function toggle(feature: keyof ProjectFeatures, enabled: boolean) {
await update.mutateAsync({ [feature]: enabled });
- toast.success(`${FEATURE_LABEL[feature]} turned ${enabled ? 'on' : 'off'}`);
+ toast.success(t(enabled ? 'featureOn' : 'featureOff', { feature: featureLabel(feature) }));
}
return {
diff --git a/apps/web/src/features/settings/hooks/useGeneralForm.ts b/apps/web/src/features/settings/hooks/useGeneralForm.ts
index 76bfc95a..d2ec6d70 100644
--- a/apps/web/src/features/settings/hooks/useGeneralForm.ts
+++ b/apps/web/src/features/settings/hooks/useGeneralForm.ts
@@ -2,6 +2,7 @@
import { useState } from 'react';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import type { ProjectDetail } from '@/lib/api';
import { useUpdateProject } from '@/services/projects.service';
import { usePermissions } from '@/hooks/usePermissions';
@@ -23,6 +24,7 @@ export interface GeneralForm {
// key is read-only. Shared between the header Save button and the body fields, so
// it lives in a hook and is threaded into both.
export function useGeneralForm(project: ProjectDetail): GeneralForm {
+ const t = useTranslations('settings.general');
const { isOwner } = usePermissions();
const { key, name: savedName, description: savedDescription } = project.project;
const updateProject = useUpdateProject();
@@ -39,7 +41,7 @@ export function useGeneralForm(project: ProjectDetail): GeneralForm {
projectKey: key,
patch: { name: trimmedName, description },
});
- toast.success('Project updated');
+ toast.success(t('saved'));
}
return {
diff --git a/apps/web/src/features/settings/hooks/useNotificationPreferencesForm.ts b/apps/web/src/features/settings/hooks/useNotificationPreferencesForm.ts
index 11632bd2..9b674c2e 100644
--- a/apps/web/src/features/settings/hooks/useNotificationPreferencesForm.ts
+++ b/apps/web/src/features/settings/hooks/useNotificationPreferencesForm.ts
@@ -2,6 +2,7 @@
import { useState } from 'react';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import type { NotificationEventToggles, NotificationPreferences } from '@/lib/api';
import { useUpdateNotificationPreferences } from '../services/settings.service';
import { eventsEqual } from '../utils/notificationEvents';
@@ -22,6 +23,7 @@ export function useNotificationPreferencesForm(
projectKey: string,
initial: NotificationPreferences,
): NotificationPreferencesForm {
+ const t = useTranslations('settings.notifications');
const update = useUpdateNotificationPreferences(projectKey);
const [emailEvents, setEmailEvents] = useState<NotificationEventToggles>(initial.emailEvents);
const [telegramEvents, setTelegramEvents] = useState<NotificationEventToggles>(
@@ -34,7 +36,7 @@ export function useNotificationPreferencesForm(
async function save() {
await update.mutateAsync({ emailEvents, telegramEvents });
- toast.success('Notification preferences saved');
+ toast.success(t('preferencesSaved'));
}
return {
diff --git a/apps/web/src/features/settings/hooks/useTelegramForm.ts b/apps/web/src/features/settings/hooks/useTelegramForm.ts
index 54005e80..f98878dd 100644
--- a/apps/web/src/features/settings/hooks/useTelegramForm.ts
+++ b/apps/web/src/features/settings/hooks/useTelegramForm.ts
@@ -2,6 +2,7 @@
import { useState } from 'react';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import type { NotificationSettings } from '@/lib/api';
import { useUpdateNotificationSettings } from '../services/settings.service';
@@ -25,6 +26,7 @@ export function useTelegramForm(
settings: NotificationSettings,
editable: boolean,
): TelegramForm {
+ const t = useTranslations('settings.notifications');
const update = useUpdateNotificationSettings(projectKey);
const [enabled, setEnabled] = useState(settings.telegram.enabled);
const [botToken, setBotToken] = useState('');
@@ -39,7 +41,7 @@ export function useTelegramForm(
},
});
setBotToken('');
- toast.success('Telegram provider saved');
+ toast.success(t('telegramSaved'));
}
return {
diff --git a/apps/web/src/features/settings/hooks/useTransferErrorMessage.ts b/apps/web/src/features/settings/hooks/useTransferErrorMessage.ts
new file mode 100644
index 00000000..38cf660d
--- /dev/null
+++ b/apps/web/src/features/settings/hooks/useTransferErrorMessage.ts
@@ -0,0 +1,14 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
+
+// A clipboard parse failure, in words. The parsers throw a code; anything else —
+// or a code the messages do not carry — falls back to the section's own message.
+export function useTransferErrorMessage() {
+ const t = useTranslations('settings.transfer.errors');
+
+ return (error: unknown, fallback: string) => {
+ const code = (error instanceof Error ? error.message : '') as Parameters<typeof t.has>[0];
+ return t.has(code) ? t(code) : fallback;
+ };
+}
diff --git a/apps/web/src/features/settings/utils/customFieldsTransfer.ts b/apps/web/src/features/settings/utils/customFieldsTransfer.ts
index 45366fdc..6473bf0b 100644
--- a/apps/web/src/features/settings/utils/customFieldsTransfer.ts
+++ b/apps/web/src/features/settings/utils/customFieldsTransfer.ts
@@ -74,11 +74,11 @@ export function parseCustomFieldsText(text: string): FieldTransfer[] {
try {
data = JSON.parse(text);
} catch {
- throw new Error('Clipboard does not contain valid JSON.');
+ throw new Error('invalidJson');
}
const env = data as Partial<CustomFieldsEnvelope>;
if (!env || env.type !== PAYLOAD_TYPE || !Array.isArray(env.fields)) {
- throw new Error('Clipboard does not contain a custom fields export.');
+ throw new Error('wrongPayload');
}
const fields: FieldTransfer[] = [];
for (const raw of env.fields) {
@@ -95,7 +95,7 @@ export function parseCustomFieldsText(text: string): FieldTransfer[] {
type,
});
}
- if (fields.length === 0) throw new Error('The custom fields export is empty.');
+ if (fields.length === 0) throw new Error('empty');
return fields;
}
diff --git a/apps/web/src/features/settings/utils/issueTypesTransfer.ts b/apps/web/src/features/settings/utils/issueTypesTransfer.ts
index 20284081..aba5eb2c 100644
--- a/apps/web/src/features/settings/utils/issueTypesTransfer.ts
+++ b/apps/web/src/features/settings/utils/issueTypesTransfer.ts
@@ -42,11 +42,11 @@ export function parseIssueTypesText(text: string): IssueTypeTransfer[] {
try {
data = JSON.parse(text);
} catch {
- throw new Error('Clipboard does not contain valid JSON.');
+ throw new Error('invalidJson');
}
const env = data as Partial<IssueTypesEnvelope>;
if (!env || env.type !== PAYLOAD_TYPE || !Array.isArray(env.issueTypes)) {
- throw new Error('Clipboard does not contain an issue types export.');
+ throw new Error('wrongPayload');
}
const types: IssueTypeTransfer[] = [];
const seen = new Set<string>();
@@ -62,7 +62,7 @@ export function parseIssueTypesText(text: string): IssueTypeTransfer[] {
color: typeof raw?.color === 'string' ? raw.color : DEFAULT_COLOR,
});
}
- if (types.length === 0) throw new Error('The issue types export is empty.');
+ if (types.length === 0) throw new Error('empty');
return types;
}
diff --git a/apps/web/src/features/settings/utils/labelsTransfer.ts b/apps/web/src/features/settings/utils/labelsTransfer.ts
index ffaca3c5..9df25e2e 100644
--- a/apps/web/src/features/settings/utils/labelsTransfer.ts
+++ b/apps/web/src/features/settings/utils/labelsTransfer.ts
@@ -69,7 +69,7 @@ export function parseLabelsText(text: string): {
try {
data = JSON.parse(text);
} catch {
- throw new Error('Clipboard does not contain valid JSON.');
+ throw new Error('invalidJson');
}
const env = data as Partial<LabelsEnvelope>;
if (
@@ -78,7 +78,7 @@ export function parseLabelsText(text: string): {
!Array.isArray(env.labels) ||
!Array.isArray(env.groups)
) {
- throw new Error('Clipboard does not contain a labels export.');
+ throw new Error('wrongPayload');
}
const groups: LabelGroupTransfer[] = [];
@@ -100,7 +100,7 @@ export function parseLabelsText(text: string): {
labels.push({ name, color: typeof raw?.color === 'string' ? raw.color : DEFAULT_COLOR, group });
}
- if (groups.length === 0 && labels.length === 0) throw new Error('The labels export is empty.');
+ if (groups.length === 0 && labels.length === 0) throw new Error('empty');
return { groups, labels };
}
diff --git a/apps/web/src/features/settings/utils/notificationEvents.ts b/apps/web/src/features/settings/utils/notificationEvents.ts
index f8e80d46..c92f2f96 100644
--- a/apps/web/src/features/settings/utils/notificationEvents.ts
+++ b/apps/web/src/features/settings/utils/notificationEvents.ts
@@ -1,12 +1,13 @@
import type { NotificationEventToggles } from '@/lib/api';
-// The issue events a channel can send, matching the inbox notification types, with a
-// display label. Shared by the email and telegram event sections.
-export const NOTIFICATION_EVENTS: { key: keyof NotificationEventToggles; label: string }[] = [
- { key: 'assigned', label: 'Assigned to an issue' },
- { key: 'mentioned', label: 'Mentioned in a comment' },
- { key: 'commented', label: 'New comment on an issue you watch' },
- { key: 'state_changed', label: 'State changed on an issue you watch' },
+// The issue events a channel can send, matching the inbox notification types.
+// Shared by the email and telegram event sections; the label of an event is a
+// message under `settings.notifications.events`.
+export const NOTIFICATION_EVENTS: (keyof NotificationEventToggles)[] = [
+ 'assigned',
+ 'mentioned',
+ 'commented',
+ 'state_changed',
];
export function eventsEqual(a: NotificationEventToggles, b: NotificationEventToggles): boolean {
diff --git a/apps/web/src/features/settings/utils/statesTransfer.ts b/apps/web/src/features/settings/utils/statesTransfer.ts
index 5496e978..1d70723b 100644
--- a/apps/web/src/features/settings/utils/statesTransfer.ts
+++ b/apps/web/src/features/settings/utils/statesTransfer.ts
@@ -43,11 +43,11 @@ export function parseStatesText(text: string): StateTransfer[] {
try {
data = JSON.parse(text);
} catch {
- throw new Error('Clipboard does not contain valid JSON.');
+ throw new Error('invalidJson');
}
const env = data as Partial<StatesEnvelope>;
if (!env || env.type !== PAYLOAD_TYPE || !Array.isArray(env.states)) {
- throw new Error('Clipboard does not contain a states export.');
+ throw new Error('wrongPayload');
}
const states: StateTransfer[] = [];
const seen = new Set<string>();
@@ -61,7 +61,7 @@ export function parseStatesText(text: string): StateTransfer[] {
const color = typeof raw?.color === 'string' ? raw.color : DEFAULT_COLOR;
states.push({ name, stateType: stateType as StateType, color });
}
- if (states.length === 0) throw new Error('The states export is empty.');
+ if (states.length === 0) throw new Error('empty');
return states;
}
diff --git a/apps/web/src/features/settings/utils/transferAction.ts b/apps/web/src/features/settings/utils/transferAction.ts
index 6eecb0ba..d374f0f3 100644
--- a/apps/web/src/features/settings/utils/transferAction.ts
+++ b/apps/web/src/features/settings/utils/transferAction.ts
@@ -1,12 +1,10 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
+
// Badge text for a planned item in the copy/paste import dialogs (states, issue
// types, labels). A match that differs only in color is applied as an update.
-export function transferActionLabel(action: 'create' | 'update' | 'unchanged'): string {
- switch (action) {
- case 'create':
- return 'New';
- case 'update':
- return 'Update color';
- case 'unchanged':
- return 'No change';
- }
+export function useTransferActionLabel() {
+ const t = useTranslations('settings.transfer.actions');
+ return (action: 'create' | 'update' | 'unchanged') => t(action);
}
diff --git a/apps/web/src/features/work-items/PublicBoardPage.tsx b/apps/web/src/features/work-items/PublicBoardPage.tsx
index 319dc893..85e5445c 100644
--- a/apps/web/src/features/work-items/PublicBoardPage.tsx
+++ b/apps/web/src/features/work-items/PublicBoardPage.tsx
@@ -2,6 +2,7 @@
import { useState } from 'react';
import { useQuery } from '@tanstack/react-query';
+import { useTranslations } from 'next-intl';
import { api } from '@/lib/api';
import PublicShareFrame from '@/components/common/page/PublicShareFrame';
import ListSkeleton from '@/components/common/skeleton/ListSkeleton';
@@ -12,6 +13,7 @@ import PublicIssueOverlay from './components/public/PublicIssueOverlay';
// the board bundle by token and renders it with no session; clicking an issue opens
// its read-only detail under the same token.
export default function PublicBoardPage({ token }: { token: string }) {
+ const t = useTranslations('workItems.share');
const [openIssueId, setOpenIssueId] = useState<number | null>(null);
const query = useQuery({
queryKey: ['share', 'view', token],
@@ -34,9 +36,7 @@ export default function PublicBoardPage({ token }: { token: string }) {
if (query.isError || !query.data) {
return (
<PublicShareFrame>
- <p className="px-6 py-10 text-sm text-muted-foreground">
- This shared board is not available. The link may have been revoked.
- </p>
+ <p className="px-6 py-10 text-sm text-muted-foreground">{t('boardUnavailable')}</p>
</PublicShareFrame>
);
}
diff --git a/apps/web/src/features/work-items/WorkItemsPage.tsx b/apps/web/src/features/work-items/WorkItemsPage.tsx
index 9b6f1f57..eea76f9d 100644
--- a/apps/web/src/features/work-items/WorkItemsPage.tsx
+++ b/apps/web/src/features/work-items/WorkItemsPage.tsx
@@ -1,8 +1,10 @@
'use client';
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import { useShell } from '@/context/shellContext';
import { usePermissions } from '@/hooks/usePermissions';
+import { useGroupLabels } from '@/hooks/useGroupLabels';
import { useProjectFeatures } from '@/hooks/useProjectFeatures';
import { useLiveRefresh } from '@/hooks/useLiveRefresh';
import { revScope } from '@/utils/revScopes';
@@ -36,9 +38,12 @@ interface TimelineCollapseState {
// It renders the saved-view tabs, the inline edit bar and the selected layout;
// the project data and the view editor come from the Shell through React context.
export default function WorkItemsPage() {
+ const t = useTranslations('workItems');
+ const tCommon = useTranslations('common');
const { project, filteredProject, views, editor, customFields, onOpenIssue, onAddIssue } =
useShell();
const { can } = usePermissions();
+ const groupLabels = useGroupLabels();
const features = useProjectFeatures();
const [timelineCollapseState, setTimelineCollapseState] = useState<TimelineCollapseState>({
scope: '',
@@ -67,7 +72,7 @@ export default function WorkItemsPage() {
const changeSettings = (next: ViewSettings) =>
editor.changeSettings(restoreHiddenSections(next, editor.settings, features));
- const timelineGroups = buildGroups(filteredProject, settings.group);
+ const timelineGroups = buildGroups(filteredProject, settings.group, groupLabels);
const timelineIssuesByGroup = groupIssues(timelineGroups, filteredProject.issues, settings.group);
const visibleTimelineGroupKeys = timelineGroups
.filter(
@@ -170,7 +175,7 @@ export default function WorkItemsPage() {
<ViewIconPicker icon={editor.draftIcon} onChange={editor.setDraftIcon} />
<Input
value={editor.draftName}
- placeholder="All issues"
+ placeholder={t('viewNamePlaceholder')}
autoFocus
onChange={(e) => editor.setDraftName(e.target.value)}
onKeyDown={(e) =>
@@ -181,7 +186,7 @@ export default function WorkItemsPage() {
className="h-8 flex-1 border-0 bg-transparent px-1 text-sm font-medium shadow-none focus-visible:ring-0"
/>
<Button variant="ghost" size="sm" onClick={editor.cancelEdits}>
- Cancel
+ {tCommon('cancel')}
</Button>
{canSaveView && (
<Button
@@ -189,7 +194,7 @@ export default function WorkItemsPage() {
disabled={!editor.activeView && !editor.draftName.trim()}
onClick={() => void editor.saveEdits()}
>
- Save
+ {tCommon('save')}
</Button>
)}
</div>
diff --git a/apps/web/src/features/work-items/components/calendar/CalendarDayOverflow.tsx b/apps/web/src/features/work-items/components/calendar/CalendarDayOverflow.tsx
index ba4a4431..34767952 100644
--- a/apps/web/src/features/work-items/components/calendar/CalendarDayOverflow.tsx
+++ b/apps/web/src/features/work-items/components/calendar/CalendarDayOverflow.tsx
@@ -1,4 +1,5 @@
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import { type Issue } from '@/lib/api';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
@@ -15,6 +16,7 @@ export function CalendarDayOverflow({
dot: (issue: Issue) => string;
onOpen: (id: number) => void;
}) {
+ const t = useTranslations('workItems.calendar');
const [open, setOpen] = useState(false);
return (
<Popover open={open} onOpenChange={setOpen}>
@@ -23,12 +25,12 @@ export function CalendarDayOverflow({
type="button"
className="px-1.5 text-left text-[10px] text-muted-foreground hover:text-foreground"
>
- +{hidden} more
+ {t('moreIssues', { count: hidden })}
</button>
</PopoverTrigger>
<PopoverContent align="start" className="w-60 p-1">
<div className="px-2 py-1 text-xs font-medium text-muted-foreground">
- {issues.length} issues
+ {t('issueCount', { count: issues.length })}
</div>
<div className="flex max-h-72 flex-col overflow-y-auto">
{issues.map((issue) => (
diff --git a/apps/web/src/features/work-items/components/calendar/CalendarMonthNav.tsx b/apps/web/src/features/work-items/components/calendar/CalendarMonthNav.tsx
index 2ae125ae..19bdb830 100644
--- a/apps/web/src/features/work-items/components/calendar/CalendarMonthNav.tsx
+++ b/apps/web/src/features/work-items/components/calendar/CalendarMonthNav.tsx
@@ -1,5 +1,6 @@
-import { addMonths, format, startOfMonth } from 'date-fns';
+import { addMonths, startOfMonth } from 'date-fns';
import { ChevronLeft, ChevronRight } from 'lucide-react';
+import { useFormatter, useTranslations } from 'next-intl';
import { Button } from '@/components/ui/button';
export function CalendarMonthNav({
@@ -9,16 +10,20 @@ export function CalendarMonthNav({
cursor: Date;
onCursorChange: (date: Date) => void;
}) {
+ const t = useTranslations('workItems.calendar');
+ const format = useFormatter();
return (
<div className="mb-3 flex items-center gap-2">
- <h2 className="text-sm font-medium text-foreground">{format(cursor, 'MMMM yyyy')}</h2>
+ <h2 className="text-sm font-medium text-foreground">
+ {format.dateTime(cursor, { month: 'long', year: 'numeric' })}
+ </h2>
<div className="flex items-center gap-1">
<Button
variant="ghost"
size="icon"
className="size-7"
onClick={() => onCursorChange(addMonths(cursor, -1))}
- title="Previous month"
+ title={t('previousMonth')}
>
<ChevronLeft />
</Button>
@@ -27,13 +32,13 @@ export function CalendarMonthNav({
size="icon"
className="size-7"
onClick={() => onCursorChange(addMonths(cursor, 1))}
- title="Next month"
+ title={t('nextMonth')}
>
<ChevronRight />
</Button>
</div>
<Button variant="outline" size="sm" onClick={() => onCursorChange(startOfMonth(new Date()))}>
- Today
+ {t('today')}
</Button>
</div>
);
diff --git a/apps/web/src/features/work-items/components/calendar/CalendarUnscheduledPanel.tsx b/apps/web/src/features/work-items/components/calendar/CalendarUnscheduledPanel.tsx
index 746d4fb7..883b2696 100644
--- a/apps/web/src/features/work-items/components/calendar/CalendarUnscheduledPanel.tsx
+++ b/apps/web/src/features/work-items/components/calendar/CalendarUnscheduledPanel.tsx
@@ -1,4 +1,5 @@
import { useDroppable } from '@dnd-kit/core';
+import { useTranslations } from 'next-intl';
import { type ProjectDetail, type Issue } from '@/lib/api';
import { cn } from '@/lib/utils';
import { type DateField } from '@/utils/viewSettings';
@@ -21,8 +22,8 @@ export function CalendarUnscheduledPanel({
dot: (issue: Issue) => string;
onOpen: (id: number) => void;
}) {
+ const t = useTranslations('workItems.calendar');
const { setNodeRef, isOver } = useDroppable({ id: UNSCHEDULED_ID });
- const fieldName = dateField === 'dueDate' ? 'due' : 'start';
return (
<div
ref={setNodeRef}
@@ -32,7 +33,7 @@ export function CalendarUnscheduledPanel({
)}
>
<div className="mb-2 flex items-center gap-2 text-sm font-medium text-muted-foreground">
- {`No ${fieldName} date`}
+ {t(`noDate.${dateField}`)}
<span className="text-muted-foreground">{issues.length}</span>
</div>
<div className="flex flex-col gap-1 overflow-y-auto">
@@ -46,7 +47,7 @@ export function CalendarUnscheduledPanel({
/>
))}
{issues.length === 0 && (
- <span className="text-xs text-muted-foreground/50">{`Everything has a ${fieldName} date.`}</span>
+ <span className="text-xs text-muted-foreground/50">{t(`allDated.${dateField}`)}</span>
)}
</div>
</div>
diff --git a/apps/web/src/features/work-items/components/calendar/CalendarView.tsx b/apps/web/src/features/work-items/components/calendar/CalendarView.tsx
index 3465434c..fa44c18f 100644
--- a/apps/web/src/features/work-items/components/calendar/CalendarView.tsx
+++ b/apps/web/src/features/work-items/components/calendar/CalendarView.tsx
@@ -7,6 +7,7 @@ import {
type DragEndEvent,
type DragStartEvent,
} from '@dnd-kit/core';
+import { useTranslations } from 'next-intl';
import { type Issue } from '@/lib/api';
import { buildMaps, issueColor, type WorkItemsViewProps } from '@/utils/project';
import { toDateStr } from '@/utils/dates';
@@ -17,12 +18,16 @@ import { CalendarMonthNav } from './CalendarMonthNav';
import { CalendarDayCell } from './CalendarDayCell';
import { CalendarUnscheduledPanel, UNSCHEDULED_ID } from './CalendarUnscheduledPanel';
+// Sunday first, which is the order buildCalendarModel rotates from.
+const WEEKDAY_KEYS = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'] as const;
+
export default function CalendarView({
project,
settings,
onOpenIssue,
readOnly,
}: WorkItemsViewProps) {
+ const t = useTranslations('workItems.calendar');
const updateIssue = useUpdateIssue(project.project.key);
const [cursor, setCursor] = useState<Date>(() => startOfMonth(new Date()));
const [activeId, setActiveId] = useState<number | null>(null);
@@ -38,6 +43,7 @@ export default function CalendarView({
dateField,
settings.weekStart,
cursor,
+ WEEKDAY_KEYS.map((key) => t(`weekdays.${key}`)),
);
function reschedule(issueId: number, value: string | null) {
diff --git a/apps/web/src/features/work-items/components/kanban/BoardColumn.tsx b/apps/web/src/features/work-items/components/kanban/BoardColumn.tsx
index cd9b8748..be707264 100644
--- a/apps/web/src/features/work-items/components/kanban/BoardColumn.tsx
+++ b/apps/web/src/features/work-items/components/kanban/BoardColumn.tsx
@@ -2,6 +2,7 @@ import { useCallback, useRef } from 'react';
import { useDroppable } from '@dnd-kit/core';
import { useVirtualizer } from '@tanstack/react-virtual';
import { ChevronsRightLeft, EyeOff, Plus } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { type ProjectDetail, type BoardIssue } from '@/lib/api';
import { type Maps, type IssueGroup } from '@/utils/project';
import { cn } from '@/lib/utils';
@@ -58,6 +59,7 @@ export function BoardColumn({
// In a read-only share the add affordance and select-all toggle are hidden.
readOnly?: boolean;
}) {
+ const t = useTranslations('workItems');
const { can } = usePermissions();
const canCreateIssue = can('work_items', 'create') && !readOnly;
const scrollRef = useRef<HTMLDivElement>(null);
@@ -106,7 +108,7 @@ export function BoardColumn({
size="icon"
className="size-6 text-muted-foreground"
onClick={onCollapse}
- title="Collapse"
+ title={t('collapse')}
>
<ChevronsRightLeft />
</Button>
@@ -115,7 +117,7 @@ export function BoardColumn({
size="icon"
className="size-6 text-muted-foreground"
onClick={onHide}
- title="Hide"
+ title={t('hide')}
>
<EyeOff />
</Button>
@@ -125,7 +127,7 @@ export function BoardColumn({
size="icon"
className="size-6 text-muted-foreground"
onClick={onAddIssue}
- title="New issue"
+ title={t('newIssue')}
>
<Plus />
</Button>
@@ -190,7 +192,7 @@ export function BoardColumn({
className="invisible absolute left-0 w-full text-muted-foreground opacity-0 group-focus-within/column:visible group-focus-within/column:opacity-100 group-hover/column:visible group-hover/column:opacity-100"
style={{ top: cardsHeight + ADD_BUTTON_GAP }}
onClick={onAddIssue}
- title="New issue"
+ title={t('newIssue')}
>
<Plus />
</Button>
diff --git a/apps/web/src/features/work-items/components/kanban/BulkActionBar.tsx b/apps/web/src/features/work-items/components/kanban/BulkActionBar.tsx
index 4c354c2f..ed3b6407 100644
--- a/apps/web/src/features/work-items/components/kanban/BulkActionBar.tsx
+++ b/apps/web/src/features/work-items/components/kanban/BulkActionBar.tsx
@@ -2,8 +2,10 @@
import { useState } from 'react';
import { Archive, Bot, CircleDashed, RefreshCw, Tag, Target, Trash2, User, X } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { type ProjectDetail } from '@/lib/api';
import { usePermissions } from '@/hooks/usePermissions';
+import { usePriorityLabel } from '@/hooks/usePriorityLabel';
import { useInitiativeOptionsQuery } from '@/services/initiatives.service';
import { CYCLE_STATUS_META } from '@/utils/cycleMeta';
import { subtaskCount } from '@/utils/subtasks';
@@ -24,6 +26,9 @@ import { BulkRemovalDialog } from './BulkRemovalDialog';
// change stays visible and further edits can be chained) and self-empties after
// archive/delete as those issues leave the board.
export function BulkActionBar({ project }: { project: ProjectDetail }) {
+ const t = useTranslations('workItems.bulk');
+ const tCommon = useTranslations('common');
+ const priorityLabel = usePriorityLabel();
const selection = useSelection();
const { can } = usePermissions();
const bulk = useBulkActions(project);
@@ -55,7 +60,9 @@ export function BulkActionBar({ project }: { project: ProjectDetail }) {
disabled && 'opacity-70',
)}
>
- <span className="pr-1 text-sm font-medium whitespace-nowrap">{ids.length} selected</span>
+ <span className="pr-1 text-sm font-medium whitespace-nowrap">
+ {t('selected', { count: ids.length })}
+ </span>
{canEdit && (
<>
@@ -63,7 +70,7 @@ export function BulkActionBar({ project }: { project: ProjectDetail }) {
<BarMenu
icon={<CircleDashed className="size-4" />}
- label="Status"
+ label={t('status')}
disabled={disabled}
>
{project.columns.map((c) => (
@@ -77,23 +84,27 @@ export function BulkActionBar({ project }: { project: ProjectDetail }) {
))}
</BarMenu>
- <BarMenu icon={PRIORITY_FIELDS[0].icon} label="Priority" disabled={disabled}>
+ <BarMenu icon={PRIORITY_FIELDS[0].icon} label={t('priority')} disabled={disabled}>
{PRIORITY_FIELDS.map((p) => (
<DropdownMenuItem
key={p.value || 'none'}
onSelect={() => void bulk.patch(ids, { priority: p.value || null })}
>
{p.icon}
- <span className="flex-1">{p.label}</span>
+ <span className="flex-1">{priorityLabel(p.value)}</span>
</DropdownMenuItem>
))}
</BarMenu>
{members.length > 0 && (
- <BarMenu icon={<User className="size-4" />} label="Assignee" disabled={disabled}>
+ <BarMenu
+ icon={<User className="size-4" />}
+ label={t('assignee')}
+ disabled={disabled}
+ >
<DropdownMenuItem onSelect={() => void bulk.patch(ids, { assigneeUserId: null })}>
<CircleDashed />
- <span className="flex-1">No assignee</span>
+ <span className="flex-1">{t('noAssignee')}</span>
</DropdownMenuItem>
{members.map((a) => (
<DropdownMenuItem
@@ -108,10 +119,14 @@ export function BulkActionBar({ project }: { project: ProjectDetail }) {
)}
{agents.length > 0 && (
- <BarMenu icon={<Bot className="size-4" />} label="Delegate" disabled={disabled}>
+ <BarMenu
+ icon={<Bot className="size-4" />}
+ label={t('delegate')}
+ disabled={disabled}
+ >
<DropdownMenuItem onSelect={() => void bulk.patch(ids, { delegateUserId: null })}>
<CircleDashed />
- <span className="flex-1">No delegate</span>
+ <span className="flex-1">{t('noDelegate')}</span>
</DropdownMenuItem>
{agents.map((a) => (
<DropdownMenuItem
@@ -128,12 +143,12 @@ export function BulkActionBar({ project }: { project: ProjectDetail }) {
{initiatives.length > 0 && (
<BarMenu
icon={<Target className="size-4" />}
- label="Initiative"
+ label={t('initiative')}
disabled={disabled}
>
<DropdownMenuItem onSelect={() => void bulk.patch(ids, { initiativeId: null })}>
<CircleDashed />
- <span className="flex-1">No initiative</span>
+ <span className="flex-1">{t('noInitiative')}</span>
</DropdownMenuItem>
{initiatives.map((initiative) => (
<DropdownMenuItem
@@ -148,10 +163,14 @@ export function BulkActionBar({ project }: { project: ProjectDetail }) {
)}
{project.plannedCycles.length > 0 && (
- <BarMenu icon={<RefreshCw className="size-4" />} label="Cycle" disabled={disabled}>
+ <BarMenu
+ icon={<RefreshCw className="size-4" />}
+ label={t('cycle')}
+ disabled={disabled}
+ >
<DropdownMenuItem onSelect={() => void bulk.patch(ids, { cycleId: null })}>
<CircleDashed />
- <span className="flex-1">No cycle</span>
+ <span className="flex-1">{t('noCycle')}</span>
</DropdownMenuItem>
{project.plannedCycles.map((cycle) => (
<DropdownMenuItem
@@ -166,7 +185,7 @@ export function BulkActionBar({ project }: { project: ProjectDetail }) {
)}
{project.labels.length > 0 && (
- <BarMenu icon={<Tag className="size-4" />} label="Labels" disabled={disabled}>
+ <BarMenu icon={<Tag className="size-4" />} label={t('labels')} disabled={disabled}>
{project.labels.map((l) => (
<DropdownMenuItem
key={l.id}
@@ -195,7 +214,7 @@ export function BulkActionBar({ project }: { project: ProjectDetail }) {
}}
>
<Archive className="size-4" />
- Archive
+ {t('archive')}
</Button>
</>
)}
@@ -209,7 +228,7 @@ export function BulkActionBar({ project }: { project: ProjectDetail }) {
onClick={() => setConfirming('delete')}
>
<Trash2 className="size-4" />
- Delete
+ {tCommon('delete')}
</Button>
)}
@@ -220,7 +239,7 @@ export function BulkActionBar({ project }: { project: ProjectDetail }) {
size="icon"
className="size-8 text-muted-foreground"
onClick={selection.clear}
- title="Clear selection"
+ title={t('clearSelection')}
>
<X />
</Button>
diff --git a/apps/web/src/features/work-items/components/kanban/BulkRemovalDialog.tsx b/apps/web/src/features/work-items/components/kanban/BulkRemovalDialog.tsx
index eaa349e7..2924ac8f 100644
--- a/apps/web/src/features/work-items/components/kanban/BulkRemovalDialog.tsx
+++ b/apps/web/src/features/work-items/components/kanban/BulkRemovalDialog.tsx
@@ -1,6 +1,7 @@
'use client';
import { useState } from 'react';
+import { useTranslations } from 'next-intl';
import { type SubtaskDisposition } from '@/lib/api';
import { dispositionReady } from '@/utils/subtasks';
import ConfirmDialog from '@/components/common/overlay/ConfirmDialog';
@@ -24,14 +25,13 @@ export function BulkRemovalDialog({
onConfirm: (subtasks?: SubtaskDisposition) => Promise<unknown>;
onClose: () => void;
}) {
+ const t = useTranslations('workItems.removal');
const [disposition, setDisposition] = useState<SubtaskDisposition | null>(null);
- const deleting = action === 'delete';
- const noun = `issue${ids.length === 1 ? '' : 's'}`;
return (
<ConfirmDialog
- title={`${deleting ? 'Delete' : 'Archive'} ${noun}`}
- confirmLabel={`${deleting ? 'Delete' : 'Archive'} ${ids.length} ${noun}`}
+ title={t(`${action}.title`, { count: ids.length })}
+ confirmLabel={t(`${action}.confirm`, { count: ids.length })}
confirmDisabled={subtaskCount > 0 && !dispositionReady(disposition)}
onConfirm={async () => {
await onConfirm(disposition ?? undefined);
@@ -40,9 +40,7 @@ export function BulkRemovalDialog({
onClose={onClose}
>
<p className="text-sm text-muted-foreground">
- {deleting
- ? `Delete ${ids.length} selected ${noun}? This also removes comments, activity and attachments. This cannot be undone.`
- : `Archive ${ids.length} selected ${noun}? ${ids.length === 1 ? 'It leaves' : 'They leave'} the board and can be restored later.`}
+ {t(`${action}.description`, { count: ids.length })}
</p>
{subtaskCount > 0 && (
<SubtaskDisposalChoice
diff --git a/apps/web/src/features/work-items/components/kanban/CollapsedColumn.tsx b/apps/web/src/features/work-items/components/kanban/CollapsedColumn.tsx
index d70dedf0..ee735df6 100644
--- a/apps/web/src/features/work-items/components/kanban/CollapsedColumn.tsx
+++ b/apps/web/src/features/work-items/components/kanban/CollapsedColumn.tsx
@@ -1,4 +1,5 @@
import { ChevronsLeftRight, Plus } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { type IssueGroup } from '@/utils/project';
import { usePermissions } from '@/hooks/usePermissions';
import { Button } from '@/components/ui/button';
@@ -21,6 +22,7 @@ export function CollapsedColumn({
// In a read-only share the add affordance is hidden.
readOnly?: boolean;
}) {
+ const t = useTranslations('workItems');
const { can } = usePermissions();
const canCreateIssue = can('work_items', 'create') && !readOnly;
return (
@@ -30,7 +32,7 @@ export function CollapsedColumn({
size="icon"
className="size-6 text-muted-foreground"
onClick={onExpand}
- title="Expand"
+ title={t('expand')}
>
<ChevronsLeftRight />
</Button>
@@ -40,7 +42,7 @@ export function CollapsedColumn({
size="icon"
className="size-6 text-muted-foreground"
onClick={onAddIssue}
- title="New issue"
+ title={t('newIssue')}
>
<Plus />
</Button>
diff --git a/apps/web/src/features/work-items/components/kanban/FlatBoard.tsx b/apps/web/src/features/work-items/components/kanban/FlatBoard.tsx
index 6a78741b..e1694376 100644
--- a/apps/web/src/features/work-items/components/kanban/FlatBoard.tsx
+++ b/apps/web/src/features/work-items/components/kanban/FlatBoard.tsx
@@ -1,6 +1,7 @@
import { DndContext } from '@dnd-kit/core';
import { toast } from 'sonner';
import { ChevronDown, Eye } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import {
buildGroups,
buildMaps,
@@ -11,9 +12,10 @@ import {
type IssueGroup,
} from '@/utils/project';
import { useBoardDnd } from '../../hooks/useBoardDnd';
+import { useSortedOrderMessage } from '../../hooks/useSortedOrderMessage';
+import { useGroupLabels } from '@/hooks/useGroupLabels';
import { useSelection } from '../../context/useSelection';
import { boardCollision, issuesToMove } from '../../utils/kanban';
-import { sortedOrderMessage } from '../../utils/dnd';
import { Button } from '@/components/ui/button';
import { GroupDot } from '../shared/GroupDot';
import { CardOverlay } from './CardOverlay';
@@ -30,6 +32,9 @@ export default function FlatBoard({
onAddIssue,
readOnly,
}: WorkItemsViewProps) {
+ const t = useTranslations('workItems');
+ const groupLabels = useGroupLabels();
+ const sortedOrderMessage = useSortedOrderMessage();
const dnd = useBoardDnd(project.project.key, readOnly);
const selection = useSelection();
@@ -57,7 +62,7 @@ export default function FlatBoard({
: settings.collapsedGroups.filter((k) => k !== key),
});
- const groups = buildGroups(project, settings.group);
+ const groups = buildGroups(project, settings.group, groupLabels);
const sorted = sortIssues(project.issues, settings.sort, project);
const issuesByGroup = groupIssues(groups, sorted, settings.group);
const maps = buildMaps(project);
@@ -69,7 +74,6 @@ export default function FlatBoard({
: groups.filter((g) => (issuesByGroup.get(g.key)?.length ?? 0) > 0);
const visibleGroups = baseGroups.filter((g) => !hiddenSet.has(g.key));
const hiddenGroups = baseGroups.filter((g) => hiddenSet.has(g.key));
- const groupNoun = settings.group === 'status' ? 'columns' : 'groups';
// Reordering inside a column only holds when the view is ordered manually: with
// any other sort field the card would snap back to where the sort puts it. Cards
@@ -142,7 +146,7 @@ export default function FlatBoard({
<div className="ml-auto w-64 shrink-0 self-start rounded-md border p-2">
<div className="flex w-full items-center gap-1.5 px-1 py-1 text-sm font-medium text-muted-foreground">
<ChevronDown className="size-4" />
- Hidden {groupNoun}
+ {settings.group === 'status' ? t('hiddenColumns') : t('hiddenGroups')}
</div>
<div className="mt-1 flex flex-col gap-1">
{hiddenGroups.map((group) => (
@@ -162,7 +166,7 @@ export default function FlatBoard({
size="icon"
className="size-6 text-muted-foreground"
onClick={() => setHidden(group.key, false)}
- title="Show"
+ title={t('show')}
>
<Eye />
</Button>
diff --git a/apps/web/src/features/work-items/components/kanban/IssueCardBody.tsx b/apps/web/src/features/work-items/components/kanban/IssueCardBody.tsx
index 71913cb5..9cc054c6 100644
--- a/apps/web/src/features/work-items/components/kanban/IssueCardBody.tsx
+++ b/apps/web/src/features/work-items/components/kanban/IssueCardBody.tsx
@@ -1,4 +1,5 @@
import { CalendarArrowUp, CalendarClock, RefreshCw, Target, Timer } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { type BoardIssue } from '@/lib/api';
import { type Maps } from '@/utils/project';
import { formatDurationShort, formatShortDate, isDueOverdue } from '@/utils/dates';
@@ -29,6 +30,7 @@ export function IssueCardBody({
properties: PropertyKey[];
onOpen?: (id: number) => void;
}) {
+ const t = useTranslations('workItems');
const has = (p: DisplayProperty) => properties.includes(p);
const type = issue.typeId != null ? maps.typeById.get(issue.typeId) : undefined;
const assignee =
@@ -89,7 +91,7 @@ export function IssueCardBody({
</Badge>
</TooltipTrigger>
<TooltipContent>
- In current status since {formatShortDate(issue.statusSince)}
+ {t('statusSince', { date: formatShortDate(issue.statusSince) })}
</TooltipContent>
</Tooltip>
)}
@@ -97,14 +99,14 @@ export function IssueCardBody({
<DateBadge
icon={<CalendarArrowUp className="size-2.5" />}
date={issue.startDate}
- title="Start date"
+ title={t('columns.startDate')}
/>
)}
{has('dueDate') && issue.dueDate && (
<DateBadge
icon={<CalendarClock className="size-2.5" />}
date={issue.dueDate}
- title="Due date"
+ title={t('columns.dueDate')}
overdue={isDueOverdue(issue.dueDate, column?.stateType)}
/>
)}
@@ -150,9 +152,9 @@ export function IssueCardBody({
{footerShown && (
<div className="mt-2 flex items-center justify-between gap-2">
<span className="text-[11px] text-muted-foreground/70">
- {has('created') && `Created ${formatShortDate(issue.createdAt)}`}
+ {has('created') && t('createdOn', { date: formatShortDate(issue.createdAt) })}
{has('created') && has('updated') && ' · '}
- {has('updated') && `Updated ${formatShortDate(issue.updatedAt)}`}
+ {has('updated') && t('updatedOn', { date: formatShortDate(issue.updatedAt) })}
</span>
{/* Negative spacing so a delegate and an assignee shown together
overlap; the ring in the card color keeps them separated. */}
diff --git a/apps/web/src/features/work-items/components/kanban/IssueCardLinks.tsx b/apps/web/src/features/work-items/components/kanban/IssueCardLinks.tsx
index 79021d24..0d36107b 100644
--- a/apps/web/src/features/work-items/components/kanban/IssueCardLinks.tsx
+++ b/apps/web/src/features/work-items/components/kanban/IssueCardLinks.tsx
@@ -1,7 +1,8 @@
import { type IssueLinkRef } from '@/lib/api';
import { type Maps } from '@/utils/project';
import { cn } from '@/lib/utils';
-import { LINK_RELATION_ICONS, LINK_RELATION_LABELS } from '@/utils/issueLinks';
+import { LINK_RELATION_ICONS } from '@/utils/issueLinks';
+import { useLinkRelationLabel } from '@/hooks/useLinkRelationLabel';
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';
import { useIssueLinks } from '../../context/useIssueLinks';
@@ -19,6 +20,7 @@ export function IssueCardLinks({
maps: Maps;
onOpen?: (id: number) => void;
}) {
+ const relationLabel = useLinkRelationLabel();
const links = useIssueLinks(refs);
if (links.length === 0) return null;
@@ -69,7 +71,7 @@ export function IssueCardLinks({
: 'text-muted-foreground',
)}
/>
- {LINK_RELATION_LABELS[link.relation]}
+ {relationLabel(link.relation)}
</>
)}
</span>
diff --git a/apps/web/src/features/work-items/components/kanban/IssueCardSubtasks.tsx b/apps/web/src/features/work-items/components/kanban/IssueCardSubtasks.tsx
index 9dcfa604..019c05ec 100644
--- a/apps/web/src/features/work-items/components/kanban/IssueCardSubtasks.tsx
+++ b/apps/web/src/features/work-items/components/kanban/IssueCardSubtasks.tsx
@@ -1,4 +1,5 @@
import { ListTree } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { type Maps } from '@/utils/project';
import { subtaskProgress } from '@/utils/subtasks';
import { cn } from '@/lib/utils';
@@ -20,6 +21,7 @@ export function IssueCardSubtasks({
maps: Maps;
onOpen?: (id: number) => void;
}) {
+ const t = useTranslations('workItems');
const subtasks = useSubtasks(issueId);
if (subtasks.length === 0) return null;
const progress = subtaskProgress(subtasks, maps.columnById);
@@ -28,7 +30,7 @@ export function IssueCardSubtasks({
<div className="mt-2.5 flex flex-col gap-1 border-t border-border/50 pt-2">
<span className="flex items-center gap-1.5 text-[10px] tracking-wide text-muted-foreground/70">
<ListTree className="size-3 shrink-0 text-muted-foreground" />
- {`Subtasks ${progress.done}/${progress.total}`}
+ {t('subtasksProgress', { done: progress.done, total: progress.total })}
</span>
{subtasks.map((subtask) => {
const column = maps.columnById.get(subtask.columnId);
diff --git a/apps/web/src/features/work-items/components/kanban/SelectAllToggle.tsx b/apps/web/src/features/work-items/components/kanban/SelectAllToggle.tsx
index 3ec5ee2f..3ea4d9e5 100644
--- a/apps/web/src/features/work-items/components/kanban/SelectAllToggle.tsx
+++ b/apps/web/src/features/work-items/components/kanban/SelectAllToggle.tsx
@@ -1,4 +1,5 @@
import { ListChecks, ListX } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { cn } from '@/lib/utils';
import { Button } from '@/components/ui/button';
import { useSelection } from '../../context/useSelection';
@@ -8,6 +9,7 @@ import { useSelection } from '../../context/useSelection';
// active, so the header stays clean otherwise — needs a `group/column` ancestor for
// the hover reveal.
export function SelectAllToggle({ ids, className }: { ids: number[]; className?: string }) {
+ const t = useTranslations('workItems');
const selection = useSelection();
if (ids.length === 0) return null;
const allSelected = ids.every((id) => selection.isSelected(id));
@@ -22,7 +24,7 @@ export function SelectAllToggle({ ids, className }: { ids: number[]; className?:
className,
)}
onClick={() => (allSelected ? selection.remove(ids) : selection.add(ids))}
- title={allSelected ? 'Deselect all' : 'Select all'}
+ title={allSelected ? t('deselectAll') : t('selectAll')}
>
{allSelected ? <ListX /> : <ListChecks />}
</Button>
diff --git a/apps/web/src/features/work-items/components/kanban/SwimlaneBoard.tsx b/apps/web/src/features/work-items/components/kanban/SwimlaneBoard.tsx
index 911cf251..16d90cab 100644
--- a/apps/web/src/features/work-items/components/kanban/SwimlaneBoard.tsx
+++ b/apps/web/src/features/work-items/components/kanban/SwimlaneBoard.tsx
@@ -16,6 +16,8 @@ import {
} from '@/utils/project';
import { usePersistedSet } from '@/hooks/usePersistedSet';
import { useBoardDnd } from '../../hooks/useBoardDnd';
+import { useSortedOrderMessage } from '../../hooks/useSortedOrderMessage';
+import { useGroupLabels } from '@/hooks/useGroupLabels';
import { useSelection } from '../../context/useSelection';
import { GroupDot } from '../shared/GroupDot';
import { SelectAllToggle } from './SelectAllToggle';
@@ -27,7 +29,6 @@ import {
collapsedSwimlanesKey,
issuesToMove,
} from '../../utils/kanban';
-import { sortedOrderMessage } from '../../utils/dnd';
// One flattened swimlane block: its header, then a row of columns.
interface SwimlaneRow {
@@ -49,13 +50,15 @@ export default function SwimlaneBoard({
onOpenIssue,
readOnly,
}: WorkItemsViewProps) {
+ const sortedOrderMessage = useSortedOrderMessage();
+ const groupLabels = useGroupLabels();
const dnd = useBoardDnd(project.project.key, readOnly);
const selection = useSelection();
const collapsed = usePersistedSet(collapsedSwimlanesKey(project.project.id, settings.subgroup));
const maps = buildMaps(project);
- const columnGroups = buildGroups(project, settings.group);
- const swimlaneGroups = buildGroups(project, settings.subgroup);
+ const columnGroups = buildGroups(project, settings.group, groupLabels);
+ const swimlaneGroups = buildGroups(project, settings.subgroup, groupLabels);
const sorted = sortIssues(project.issues, settings.sort, project);
const nested = nestIssues(
swimlaneGroups,
diff --git a/apps/web/src/features/work-items/components/public/PublicIssueOverlay.tsx b/apps/web/src/features/work-items/components/public/PublicIssueOverlay.tsx
index 37ce49fc..773dd25f 100644
--- a/apps/web/src/features/work-items/components/public/PublicIssueOverlay.tsx
+++ b/apps/web/src/features/work-items/components/public/PublicIssueOverlay.tsx
@@ -1,6 +1,7 @@
'use client';
import { useQuery } from '@tanstack/react-query';
+import { useTranslations } from 'next-intl';
import { api } from '@/lib/api';
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog';
import IssueDetailSkeleton from '@/features/issue/components/detail/IssueDetailSkeleton';
@@ -27,6 +28,7 @@ export default function PublicIssueOverlay({
onOpenIssue: (id: number) => void;
onClose: () => void;
}) {
+ const t = useTranslations('workItems.share');
const query = useQuery({
queryKey: ['share', 'view', token, 'issue', issueId],
queryFn: () => api.getSharedViewIssue(token, issueId as number),
@@ -38,7 +40,7 @@ export default function PublicIssueOverlay({
<Dialog open={issueId != null} onOpenChange={(open) => !open && onClose()}>
<DialogContent className="fixed inset-0 top-0 left-0 h-screen w-screen max-w-none translate-x-0 translate-y-0 gap-0 overflow-y-auto rounded-none border-0 p-0 sm:max-w-none">
<DialogHeader className="sr-only">
- <DialogTitle>Issue</DialogTitle>
+ <DialogTitle>{t('issueTitle')}</DialogTitle>
</DialogHeader>
{query.isLoading && (
<div className="px-8 py-2">
@@ -46,7 +48,7 @@ export default function PublicIssueOverlay({
</div>
)}
{(query.isError || (!query.isLoading && !query.data)) && (
- <p className="p-8 text-sm text-muted-foreground">This issue is not available.</p>
+ <p className="p-8 text-sm text-muted-foreground">{t('issueUnavailable')}</p>
)}
{query.data && (
<ReadOnlyIssueDetail bundle={query.data} extended={extended} onOpenIssue={onOpenIssue} />
diff --git a/apps/web/src/features/work-items/components/shared/SubtaskProgress.tsx b/apps/web/src/features/work-items/components/shared/SubtaskProgress.tsx
index c45c250d..dba5e110 100644
--- a/apps/web/src/features/work-items/components/shared/SubtaskProgress.tsx
+++ b/apps/web/src/features/work-items/components/shared/SubtaskProgress.tsx
@@ -1,4 +1,5 @@
import { ListTree } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { type Maps } from '@/utils/project';
import { subtaskProgress } from '@/utils/subtasks';
import { useSubtasks } from '../../context/useSubtasks';
@@ -7,6 +8,7 @@ import { useSubtasks } from '../../context/useSubtasks';
// subtask rows sit under. Renders nothing when the issue has no subtasks, when
// every one of them is canceled, or while the Subtasks display option is off.
export function SubtaskProgress({ issueId, maps }: { issueId: number; maps: Maps }) {
+ const t = useTranslations('workItems');
const subtasks = useSubtasks(issueId);
const { done, total } = subtaskProgress(subtasks, maps.columnById);
if (total === 0) return null;
@@ -14,7 +16,7 @@ export function SubtaskProgress({ issueId, maps }: { issueId: number; maps: Maps
return (
<span
className="flex shrink-0 items-center gap-1 text-[11px] text-muted-foreground tabular-nums"
- title={`${done} of ${total} subtasks done`}
+ title={t('subtasksDone', { done, total })}
>
<ListTree className="size-3" />
{done}/{total}
diff --git a/apps/web/src/features/work-items/components/table/TableBuiltinCell.tsx b/apps/web/src/features/work-items/components/table/TableBuiltinCell.tsx
index 8e4db2ef..50e393f3 100644
--- a/apps/web/src/features/work-items/components/table/TableBuiltinCell.tsx
+++ b/apps/web/src/features/work-items/components/table/TableBuiltinCell.tsx
@@ -2,7 +2,7 @@ import { CalendarClock } from 'lucide-react';
import { type Issue } from '@/lib/api';
import { type Maps } from '@/utils/project';
import { formatDurationShort, formatShortDate, isDueOverdue } from '@/utils/dates';
-import { priorityLabel } from '@/utils/fieldOptions';
+import { usePriorityLabel } from '@/hooks/usePriorityLabel';
import {
AssigneeAvatar,
DateBadge,
@@ -24,6 +24,7 @@ export function TableBuiltinCell({
issue: Issue;
maps: Maps;
}) {
+ const priorityLabel = usePriorityLabel();
switch (column) {
case 'status': {
const col = maps.columnById.get(issue.columnId);
diff --git a/apps/web/src/features/work-items/components/table/TableColumnHeader.tsx b/apps/web/src/features/work-items/components/table/TableColumnHeader.tsx
index 2338143f..9f01756f 100644
--- a/apps/web/src/features/work-items/components/table/TableColumnHeader.tsx
+++ b/apps/web/src/features/work-items/components/table/TableColumnHeader.tsx
@@ -1,6 +1,7 @@
import { User } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { cn } from '@/lib/utils';
-import { columnKey, COLUMN_META, TITLE_COLUMN_KEY, type OrderedColumn } from '../../utils/table';
+import { columnKey, TITLE_COLUMN_KEY, type OrderedColumn } from '../../utils/table';
import { TableColumnResizer } from './TableColumnResizer';
// The sticky column header row above the virtualized list. It shares the row grid
@@ -20,13 +21,14 @@ export function TableColumnHeader({
onResize: (columnKey: string, width: number) => void;
onResizeEnd: () => void;
}) {
+ const t = useTranslations('workItems');
return (
<div
className="sticky top-0 z-10 grid items-center gap-3 border-b bg-background px-4 py-2 text-xs font-medium text-muted-foreground"
style={{ gridTemplateColumns: gridTemplate, minWidth }}
>
<span className="relative flex min-w-0 items-center">
- <span className="truncate">Title</span>
+ <span className="truncate">{t('columns.title')}</span>
<TableColumnResizer
onResize={(width) => onResize(TITLE_COLUMN_KEY, width)}
onResizeEnd={onResizeEnd}
@@ -34,7 +36,7 @@ export function TableColumnHeader({
</span>
{columns.map((c) => {
// The assignee column shows avatars, so its header is a right-aligned icon
- // rather than a label.
+ // rather than a label; the delegate column beside it stays blank.
const isAssignee = c.kind === 'builtin' && c.col === 'assignee';
const key = columnKey(c);
return (
@@ -42,12 +44,14 @@ export function TableColumnHeader({
key={key}
className={cn('relative flex min-w-0 items-center', isAssignee && 'justify-end')}
>
- {isAssignee ? (
+ {c.kind === 'custom' ? (
+ <span className="truncate">{c.field.name}</span>
+ ) : c.col === 'assignee' ? (
<User className="size-3.5" />
+ ) : c.col === 'delegate' ? (
+ <span />
) : (
- <span className="truncate">
- {c.kind === 'custom' ? c.field.name : COLUMN_META[c.col].label}
- </span>
+ <span className="truncate">{t(`columns.${c.col}`)}</span>
)}
<TableColumnResizer
onResize={(width) => onResize(key, width)}
diff --git a/apps/web/src/features/work-items/components/table/TableColumnResizer.tsx b/apps/web/src/features/work-items/components/table/TableColumnResizer.tsx
index 6e19817d..4b70b051 100644
--- a/apps/web/src/features/work-items/components/table/TableColumnResizer.tsx
+++ b/apps/web/src/features/work-items/components/table/TableColumnResizer.tsx
@@ -1,4 +1,5 @@
import { useEffect, useRef } from 'react';
+import { useTranslations } from 'next-intl';
// The grip on the right edge of a table column's header cell: dragging it sets
// that column's width. The starting width is measured from the cell itself, so a
@@ -10,6 +11,7 @@ export function TableColumnResizer({
onResize: (width: number) => void;
onResizeEnd: () => void;
}) {
+ const t = useTranslations('workItems');
// The drag listens on the window, since the pointer leaves the 6px grip as soon
// as it moves. Switching layout or project unmounts the header mid-drag, and the
// pointerup that would drop the listeners never reaches this component.
@@ -42,7 +44,7 @@ export function TableColumnResizer({
return (
<div
onPointerDown={beginResize}
- aria-label="Resize the column"
+ aria-label={t('resizeColumn')}
// Placed in the gap after the cell, so it does not cover the label, and
// stretched over the header's padding to stay easy to grab. touch-none keeps
// a touch drag on the grip from scrolling the table instead.
diff --git a/apps/web/src/features/work-items/components/table/TableRowLinks.tsx b/apps/web/src/features/work-items/components/table/TableRowLinks.tsx
index 0e7663ec..697899a7 100644
--- a/apps/web/src/features/work-items/components/table/TableRowLinks.tsx
+++ b/apps/web/src/features/work-items/components/table/TableRowLinks.tsx
@@ -1,7 +1,7 @@
import { type IssueLinkRef } from '@/lib/api';
import { type Maps } from '@/utils/project';
import { cn } from '@/lib/utils';
-import { LINK_RELATION_LABELS } from '@/utils/issueLinks';
+import { useLinkRelationLabel } from '@/hooks/useLinkRelationLabel';
import { StateIcon } from '@/features/issue/components/shared/IssueIcons';
import { useIssueLinks } from '../../context/useIssueLinks';
@@ -17,6 +17,7 @@ export function TableRowLinks({
maps: Maps;
onOpenIssue: (id: number) => void;
}) {
+ const relationLabel = useLinkRelationLabel();
const links = useIssueLinks(refs);
if (links.length === 0) return null;
@@ -44,7 +45,7 @@ export function TableRowLinks({
onOpenIssue(link.issue.id);
}}
>
- <span className="w-24 shrink-0">{named && LINK_RELATION_LABELS[link.relation]}</span>
+ <span className="w-24 shrink-0">{named && relationLabel(link.relation)}</span>
{column && (
<StateIcon
stateType={column.stateType}
diff --git a/apps/web/src/features/work-items/components/table/TableSectionHeader.tsx b/apps/web/src/features/work-items/components/table/TableSectionHeader.tsx
index 73729ac6..f91f2993 100644
--- a/apps/web/src/features/work-items/components/table/TableSectionHeader.tsx
+++ b/apps/web/src/features/work-items/components/table/TableSectionHeader.tsx
@@ -1,4 +1,5 @@
import { ChevronDown, ChevronRight, Plus } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { type IssueGroup } from '@/utils/project';
import { usePermissions } from '@/hooks/usePermissions';
import { Button } from '@/components/ui/button';
@@ -29,6 +30,7 @@ export function TableSectionHeader({
// In a read-only share the add affordance is hidden.
readOnly?: boolean;
}) {
+ const t = useTranslations('workItems');
const { can } = usePermissions();
const canCreateIssue = can('work_items', 'create') && !readOnly;
return (
@@ -58,7 +60,7 @@ export function TableSectionHeader({
size="icon"
className="size-6 text-muted-foreground"
onClick={onAddIssue}
- title="New issue"
+ title={t('newIssue')}
>
<Plus />
</Button>
diff --git a/apps/web/src/features/work-items/components/table/TableView.tsx b/apps/web/src/features/work-items/components/table/TableView.tsx
index 420bed58..565297ee 100644
--- a/apps/web/src/features/work-items/components/table/TableView.tsx
+++ b/apps/web/src/features/work-items/components/table/TableView.tsx
@@ -14,7 +14,9 @@ import { useDndSensors } from '@/lib/dnd';
import { usePersistedSet } from '@/hooks/usePersistedSet';
import { useUpdateIssue } from '@/services/issues.service';
import { useTableColumnWidths } from '../../hooks/useTableColumnWidths';
-import { preferPrefix, sortedOrderMessage, type DropData } from '../../utils/dnd';
+import { useSortedOrderMessage } from '../../hooks/useSortedOrderMessage';
+import { useGroupLabels } from '@/hooks/useGroupLabels';
+import { preferPrefix, type DropData } from '../../utils/dnd';
import {
buildTableItems,
collapsedKey,
@@ -44,6 +46,8 @@ export default function TableView({
readOnly,
widthScope,
}: TableViewProps) {
+ const sortedOrderMessage = useSortedOrderMessage();
+ const groupLabels = useGroupLabels();
const updateIssue = useUpdateIssue(project.project.key);
const [activeId, setActiveId] = useState<number | null>(null);
const sensors = useDndSensors(readOnly);
@@ -57,8 +61,8 @@ export default function TableView({
const grouped = settings.group !== 'none';
const subgrouped = grouped && settings.subgroup !== 'none';
const sorted = sortIssues(project.issues, settings.sort, project);
- const groups = buildGroups(project, settings.group);
- const subGroups = subgrouped ? buildGroups(project, settings.subgroup) : [];
+ const groups = buildGroups(project, settings.group, groupLabels);
+ const subGroups = subgrouped ? buildGroups(project, settings.subgroup, groupLabels) : [];
const maps = buildMaps(project);
const { columns, gridTemplate, minWidth, alignTop } = resolveColumns(
diff --git a/apps/web/src/features/work-items/components/timeline/TimelineGroupRow.tsx b/apps/web/src/features/work-items/components/timeline/TimelineGroupRow.tsx
index 6b7ea638..85c9d565 100644
--- a/apps/web/src/features/work-items/components/timeline/TimelineGroupRow.tsx
+++ b/apps/web/src/features/work-items/components/timeline/TimelineGroupRow.tsx
@@ -1,4 +1,5 @@
import { ChevronDown, ChevronRight } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { DEFAULT_COLOR, type IssueGroup } from '@/utils/project';
import { cn } from '@/lib/utils';
import { GroupDot } from '../shared/GroupDot';
@@ -25,6 +26,7 @@ export function TimelineGroupRow({
isDrop: boolean;
onToggle: () => void;
}) {
+ const t = useTranslations('workItems.timeline');
return (
<div
data-group-key={group.key}
@@ -33,7 +35,7 @@ export function TimelineGroupRow({
>
<button
type="button"
- title={collapsed ? 'Expand group' : 'Collapse group'}
+ title={collapsed ? t('expandGroup') : t('collapseGroup')}
onClick={onToggle}
className={cn(
'sticky left-0 z-10 flex shrink-0 items-center gap-2 overflow-hidden border-r px-3 text-left text-sm font-medium',
diff --git a/apps/web/src/features/work-items/components/timeline/TimelineIssueRow.tsx b/apps/web/src/features/work-items/components/timeline/TimelineIssueRow.tsx
index 81ce22bd..d7f4ebc6 100644
--- a/apps/web/src/features/work-items/components/timeline/TimelineIssueRow.tsx
+++ b/apps/web/src/features/work-items/components/timeline/TimelineIssueRow.tsx
@@ -1,3 +1,4 @@
+import { useTranslations } from 'next-intl';
import { type BoardIssue, type ProjectDetail, type Issue } from '@/lib/api';
import { type Maps } from '@/utils/project';
import { isBlocked } from '@/utils/issueLinks';
@@ -52,6 +53,7 @@ export function TimelineIssueRow({
onBeginDrag: (e: React.PointerEvent, issue: Issue, mode: TimelineDragMode) => void;
onOpen: (id: number) => void;
}) {
+ const t = useTranslations('workItems.timeline');
const blocked = isBlocked(issue);
return (
@@ -102,9 +104,7 @@ export function TimelineIssueRow({
opacity: span.inferredStart ? 0.8 : 1,
borderLeft: span.inferredStart ? '2px dashed rgba(255,255,255,0.75)' : undefined,
}}
- title={
- span.inferredStart ? 'Start inferred from the created date — drag to set it' : undefined
- }
+ title={span.inferredStart ? t('inferredStartDraggable') : undefined}
>
{!readOnly && (
<span
diff --git a/apps/web/src/features/work-items/components/timeline/TimelineLinkRows.tsx b/apps/web/src/features/work-items/components/timeline/TimelineLinkRows.tsx
index 98764ee9..cfa9c0d9 100644
--- a/apps/web/src/features/work-items/components/timeline/TimelineLinkRows.tsx
+++ b/apps/web/src/features/work-items/components/timeline/TimelineLinkRows.tsx
@@ -1,7 +1,7 @@
import { type IssueLinkRef } from '@/lib/api';
import { issueColor, type Maps } from '@/utils/project';
import { cn } from '@/lib/utils';
-import { LINK_RELATION_LABELS } from '@/utils/issueLinks';
+import { useLinkRelationLabel } from '@/hooks/useLinkRelationLabel';
import { useIssueLinks } from '../../context/useIssueLinks';
import { effSpan, LINK_ROW_H } from '../../utils/timeline';
@@ -34,6 +34,7 @@ export function TimelineLinkRows({
spanToRect: (start: Date, end: Date) => { left: number; width: number };
onOpen: (id: number) => void;
}) {
+ const relationLabel = useLinkRelationLabel();
const links = useIssueLinks(refs);
return (
@@ -63,7 +64,7 @@ export function TimelineLinkRows({
>
{/* Fixed width so the identifiers stay in one column when a row
leaves its relation unnamed. */}
- <span className="w-20 shrink-0">{named && LINK_RELATION_LABELS[link.relation]}</span>
+ <span className="w-20 shrink-0">{named && relationLabel(link.relation)}</span>
<span className="shrink-0 tabular-nums">{link.issue.identifier}</span>
<span className="min-w-0 flex-1 truncate">{link.issue.title}</span>
</div>
diff --git a/apps/web/src/features/work-items/components/timeline/TimelineSubtaskRows.tsx b/apps/web/src/features/work-items/components/timeline/TimelineSubtaskRows.tsx
index 8029bfcd..7a07bfa8 100644
--- a/apps/web/src/features/work-items/components/timeline/TimelineSubtaskRows.tsx
+++ b/apps/web/src/features/work-items/components/timeline/TimelineSubtaskRows.tsx
@@ -1,4 +1,5 @@
import { CornerDownRight } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { issueColor, type Maps } from '@/utils/project';
import { cn } from '@/lib/utils';
import { useSubtasks } from '../../context/useSubtasks';
@@ -34,6 +35,7 @@ export function TimelineSubtaskRows({
spanToRect: (start: Date, end: Date) => { left: number; width: number };
onOpen: (id: number) => void;
}) {
+ const t = useTranslations('workItems.timeline');
const subtasks = useSubtasks(issueId);
return (
@@ -86,7 +88,7 @@ export function TimelineSubtaskRows({
backgroundColor: issueColor(subtask, maps),
borderLeft: span.inferredStart ? '2px dashed rgba(255,255,255,0.75)' : undefined,
}}
- title={span.inferredStart ? 'Start inferred from the created date' : subtask.title}
+ title={span.inferredStart ? t('inferredStart') : subtask.title}
>
<span className="truncate text-[10px] leading-none">{subtask.title}</span>
</div>
diff --git a/apps/web/src/features/work-items/components/timeline/TimelineView.tsx b/apps/web/src/features/work-items/components/timeline/TimelineView.tsx
index 9f7d0ab3..e7ea9b41 100644
--- a/apps/web/src/features/work-items/components/timeline/TimelineView.tsx
+++ b/apps/web/src/features/work-items/components/timeline/TimelineView.tsx
@@ -1,6 +1,8 @@
import { Fragment, useRef, useState } from 'react';
+import { useTranslations } from 'next-intl';
import { buildMaps, issueColor, type WorkItemsViewProps } from '@/utils/project';
import { usePermissions } from '@/hooks/usePermissions';
+import { useGroupLabels } from '@/hooks/useGroupLabels';
import { useElementWidth } from '@/hooks/useElementWidth';
import { useTimelineLabelWidth } from '@/hooks/useTimelineLabelWidth';
import { LABEL_NARROW_W } from '@/utils/timelineTrack';
@@ -30,7 +32,9 @@ export default function TimelineView({
viewId,
readOnly,
}: TimelineViewProps) {
+ const t = useTranslations('workItems.timeline');
const { can } = usePermissions(project);
+ const groupLabels = useGroupLabels();
const barsReadOnly = readOnly || !can('work_items', 'edit');
const [localCollapsedGroups, setLocalCollapsedGroups] = useState<Set<string>>(new Set());
const activeCollapsedGroups = collapsedGroups ?? localCollapsedGroups;
@@ -68,6 +72,7 @@ export default function TimelineView({
buildTimeline({
project,
group: settings.group,
+ groupLabels,
showEmptyGroups: settings.showEmptyGroups,
collapsedGroups: activeCollapsedGroups,
viewportW,
@@ -88,9 +93,7 @@ export default function TimelineView({
{!narrow && <TimelineLabelResizer labelW={labelW} onResize={setTitleWidth} />}
{rows.length === 0 && (
- <div className="p-8 text-center text-sm text-muted-foreground">
- No issues to place on the timeline yet.
- </div>
+ <div className="p-8 text-center text-sm text-muted-foreground">{t('empty')}</div>
)}
{rows.map((row) => {
diff --git a/apps/web/src/features/work-items/hooks/useSortedOrderMessage.ts b/apps/web/src/features/work-items/hooks/useSortedOrderMessage.ts
new file mode 100644
index 00000000..4830d7bd
--- /dev/null
+++ b/apps/web/src/features/work-items/hooks/useSortedOrderMessage.ts
@@ -0,0 +1,12 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
+import type { SortField } from '@/utils/viewTypes';
+
+// Why an issue cannot be reordered inside its group: the view is sorted by a
+// field, so the order is not the user's to set until ordering is back on Manual.
+export function useSortedOrderMessage() {
+ const t = useTranslations('workItems');
+ const tField = useTranslations('display.sortFields');
+ return (field: SortField) => t('sortedOrder', { field: tField(field) });
+}
diff --git a/apps/web/src/features/work-items/hooks/useTimelineDrag.ts b/apps/web/src/features/work-items/hooks/useTimelineDrag.ts
index cd60f0e0..cab2da47 100644
--- a/apps/web/src/features/work-items/hooks/useTimelineDrag.ts
+++ b/apps/web/src/features/work-items/hooks/useTimelineDrag.ts
@@ -2,6 +2,7 @@ import { useState } from 'react';
import { type Issue, type IssuePatch, type ProjectDetail } from '@/lib/api';
import { addDays, toDateStr } from '@/utils/dates';
import { buildGroups, groupKeyOf } from '@/utils/project';
+import { useGroupLabels } from '@/hooks/useGroupLabels';
import { useUpdateIssue } from '@/services/issues.service';
import type { GroupField } from '@/utils/viewSettings';
import { effSpan } from '../utils/timeline';
@@ -36,9 +37,10 @@ export function useTimelineDrag({
dayW: number;
onOpenIssue: (id: number) => void;
}) {
+ const groupLabels = useGroupLabels();
const updateIssue = useUpdateIssue(project.project.key);
const groupByKey = new Map(
- buildGroups(project, group).map((issueGroup) => [issueGroup.key, issueGroup]),
+ buildGroups(project, group, groupLabels).map((issueGroup) => [issueGroup.key, issueGroup]),
);
const [preview, setPreview] = useState<{ issueId: number; start: Date; end: Date } | null>(null);
const [dropGroupKey, setDropGroupKey] = useState<string | null>(null);
diff --git a/apps/web/src/features/work-items/utils/calendar.ts b/apps/web/src/features/work-items/utils/calendar.ts
index 40e41368..78d84205 100644
--- a/apps/web/src/features/work-items/utils/calendar.ts
+++ b/apps/web/src/features/work-items/utils/calendar.ts
@@ -2,8 +2,6 @@ import { addDays, startOfMonth, startOfWeek } from 'date-fns';
import { type Issue } from '@/lib/api';
import type { ViewSettings } from '@/utils/viewSettings';
-const WEEKDAYS = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
-
// The calendar layout for the visible month: issues bucketed by their chosen date
// (due or start), the rest collected as unscheduled, the weekday headers rotated
// to the chosen first day, and the six-week day grid (a constant height regardless
@@ -20,6 +18,8 @@ export function buildCalendarModel(
dateField: ViewSettings['calendarDateField'],
weekStart: ViewSettings['weekStart'],
cursor: Date,
+ // The seven weekday names, Sunday first, in the reader's language.
+ weekdayNames: string[],
): CalendarModel {
const byDay = new Map<string, Issue[]>();
const unscheduled: Issue[] = [];
@@ -34,7 +34,7 @@ export function buildCalendarModel(
}
}
- const weekdays = [...WEEKDAYS.slice(weekStart), ...WEEKDAYS.slice(0, weekStart)];
+ const weekdays = [...weekdayNames.slice(weekStart), ...weekdayNames.slice(0, weekStart)];
const gridStart = startOfWeek(startOfMonth(cursor), { weekStartsOn: weekStart });
const days = Array.from({ length: 42 }, (_, i) => addDays(gridStart, i));
diff --git a/apps/web/src/features/work-items/utils/dnd.ts b/apps/web/src/features/work-items/utils/dnd.ts
index a6ef2eed..62098b8f 100644
--- a/apps/web/src/features/work-items/utils/dnd.ts
+++ b/apps/web/src/features/work-items/utils/dnd.ts
@@ -1,5 +1,4 @@
import { pointerWithin, type CollisionDetection } from '@dnd-kit/core';
-import { SORT_FIELDS, type SortField } from '@/utils/viewTypes';
// Data a table drop target carries: the move to apply when an issue is dropped on
// it, given the dragged issue id. Section targets append; row targets insert at
@@ -9,13 +8,6 @@ export interface DropData {
onDrop: (issueId: number) => void;
}
-// Why an issue cannot be reordered inside its group: the view is sorted by a
-// field, so the order is not the user's to set until ordering is back on Manual.
-export function sortedOrderMessage(field: SortField): string {
- const label = SORT_FIELDS.find((f) => f.value === field)?.label ?? field;
- return `Issues are ordered by ${label}. Switch ordering to Manual to move them.`;
-}
-
// Item drop targets sit inside their container target, so the pointer is always
// over both. Prefer the item so hovering one inserts at it, while hovering the
// empty container area falls through to the container (append).
diff --git a/apps/web/src/features/work-items/utils/table.ts b/apps/web/src/features/work-items/utils/table.ts
index 12ace380..8dc77480 100644
--- a/apps/web/src/features/work-items/utils/table.ts
+++ b/apps/web/src/features/work-items/utils/table.ts
@@ -9,22 +9,24 @@ import {
} from '@/utils/viewSettings';
// The grid columns after the (always-present) title cell. 'id' is not here — the
-// identifier renders inside the title cell.
+// identifier renders inside the title cell. The header label of a column is a
+// message under `workItems.columns`; assignee and delegate head their avatars
+// with an icon and have none.
export type TableColumn = Exclude<DisplayProperty, 'id'>;
-export const COLUMN_META: Record<TableColumn, { label: string; width: string }> = {
- status: { label: 'State', width: '130px' },
- statusAge: { label: 'In status', width: '88px' },
- priority: { label: 'Priority', width: '88px' },
- type: { label: 'Type', width: '120px' },
- assignee: { label: '', width: '56px' },
- delegate: { label: '', width: '56px' },
- initiative: { label: 'Initiative', width: 'minmax(140px,220px)' },
- cycle: { label: 'Cycle', width: 'minmax(120px,180px)' },
- labels: { label: 'Labels', width: 'minmax(120px,220px)' },
- startDate: { label: 'Start', width: '96px' },
- dueDate: { label: 'Due', width: '96px' },
- created: { label: 'Created', width: '96px' },
- updated: { label: 'Updated', width: '96px' },
+export const COLUMN_META: Record<TableColumn, { width: string }> = {
+ status: { width: '130px' },
+ statusAge: { width: '88px' },
+ priority: { width: '88px' },
+ type: { width: '120px' },
+ assignee: { width: '56px' },
+ delegate: { width: '56px' },
+ initiative: { width: 'minmax(140px,220px)' },
+ cycle: { width: 'minmax(120px,180px)' },
+ labels: { width: 'minmax(120px,220px)' },
+ startDate: { width: '96px' },
+ dueDate: { width: '96px' },
+ created: { width: '96px' },
+ updated: { width: '96px' },
};
// A dragged width (px) per grid track, keyed by columnKey() — or by
diff --git a/apps/web/src/features/work-items/utils/timeline.ts b/apps/web/src/features/work-items/utils/timeline.ts
index d03cbbcd..5836e76c 100644
--- a/apps/web/src/features/work-items/utils/timeline.ts
+++ b/apps/web/src/features/work-items/utils/timeline.ts
@@ -2,7 +2,7 @@ import { startOfDay } from 'date-fns';
import { type BoardIssue, type Issue, type ProjectDetail } from '@/lib/api';
import { parseDate } from '@/utils/dates';
import { buildDayTrack, type DayTrack } from '@/utils/timelineTrack';
-import { buildGroups, groupIssues, type IssueGroup } from '@/utils/project';
+import { buildGroups, groupIssues, type GroupLabels, type IssueGroup } from '@/utils/project';
import type { GroupField, TimelineScale } from '@/utils/viewSettings';
// px per day at each zoom level. Wider days keep the per-day numbers legible;
@@ -60,6 +60,7 @@ export interface TimelineModel extends DayTrack {
export function buildTimeline({
project,
group,
+ groupLabels,
showEmptyGroups,
collapsedGroups,
viewportW,
@@ -68,13 +69,14 @@ export function buildTimeline({
}: {
project: ProjectDetail;
group: GroupField;
+ groupLabels: GroupLabels;
showEmptyGroups: boolean;
collapsedGroups: Set<string>;
viewportW: number;
labelW: number;
dayW: number;
}): TimelineModel {
- const groups = buildGroups(project, group);
+ const groups = buildGroups(project, group, groupLabels);
const issuesByGroup = groupIssues(groups, project.issues, group);
// Rows, and the date range that covers every bar.
const rows: TimelineRow[] = [];
diff --git a/apps/web/src/hooks/useAgentChat.ts b/apps/web/src/hooks/useAgentChat.ts
index 20e717c0..5d97c538 100644
--- a/apps/web/src/hooks/useAgentChat.ts
+++ b/apps/web/src/hooks/useAgentChat.ts
@@ -4,6 +4,7 @@ import { useCallback, useRef, useState } from 'react';
import { toast } from 'sonner';
import { ApiError, streamAiAgentRun } from '@/lib/api';
import type { AiChatMessage } from '@/lib/api';
+import { useTranslations } from 'next-intl';
export type ChatMessage = AiChatMessage;
@@ -19,6 +20,7 @@ export type ChatStatus = 'ready' | 'streaming';
// history list. loadThread() restores a past conversation; newChat() starts a fresh
// one. threadId is null while a new conversation has not produced its first reply.
export function useAgentChat(projectKey: string, agentId: number) {
+ const t = useTranslations('common.agentChat');
const [messages, setMessages] = useState<ChatMessage[]>([]);
const [status, setStatus] = useState<ChatStatus>('ready');
const [activeTool, setActiveTool] = useState<string | null>(null);
@@ -72,9 +74,7 @@ export function useAgentChat(projectKey: string, agentId: number) {
}
}
} catch (err) {
- toast.error(
- err instanceof ApiError ? err.message : 'Could not reach the agent. Try again.',
- );
+ toast.error(err instanceof ApiError ? err.message : t('unreachable'));
} finally {
setStatus('ready');
setActiveTool(null);
@@ -83,7 +83,7 @@ export function useAgentChat(projectKey: string, agentId: number) {
setMessages((m) => m.filter((msg) => !(msg.id === assistantId && msg.text === '')));
}
},
- [projectKey, agentId, status],
+ [projectKey, agentId, status, t],
);
// Restores a past conversation: shows its transcript and continues its thread.
diff --git a/apps/web/src/hooks/useAppCommands.tsx b/apps/web/src/hooks/useAppCommands.tsx
index b0010ce6..60f382aa 100644
--- a/apps/web/src/hooks/useAppCommands.tsx
+++ b/apps/web/src/hooks/useAppCommands.tsx
@@ -1,6 +1,8 @@
import { LayoutGrid, ListChecks, Plus, SquarePlus } from 'lucide-react';
import type { Project } from '@/lib/api';
+import { useTranslations } from 'next-intl';
import { VIEWS, type WorkItemsView } from '@/utils/viewTypes';
+import { byKey } from '@/utils/messageKey';
import { usePermissions } from '@/hooks/usePermissions';
import { useHotkeyFormatter } from '@/context/useHotkeys';
import type { Command, CommandSection } from '@/utils/commands';
@@ -36,15 +38,18 @@ export function useAppCommands({
general: CommandSection | null;
projects: CommandSection | null;
} {
+ const t = useTranslations('display');
+ const tPalette = useTranslations('palette');
+ const layout = byKey(useTranslations('display.layouts'));
const { can } = usePermissions();
const hotkey = useHotkeyFormatter();
const boardItems: Command[] = [];
if (hasProject && onBoard) {
- for (const { value, label, icon: Icon, hotkey: id } of VIEWS) {
+ for (const { value, icon: Icon, hotkey: id } of VIEWS) {
boardItems.push({
id: `board.view.${value}`,
- label: `${label} layout`,
+ label: t('layoutCommand', { layout: layout(value) }),
icon: <Icon />,
keywords: 'view layout switch',
shortcut: hotkey(id) ?? undefined,
@@ -55,7 +60,7 @@ export function useAppCommands({
if (view === 'kanban') {
boardItems.push({
id: 'board.select-all',
- label: 'Select all issues',
+ label: tPalette('selectAllIssues'),
icon: <ListChecks />,
keywords: 'selection multi',
shortcut: hotkey('board.select-all') ?? undefined,
@@ -68,7 +73,7 @@ export function useAppCommands({
if (hasProject && can('work_items', 'create')) {
generalItems.push({
id: 'general.new-issue',
- label: 'New issue',
+ label: tPalette('newIssue'),
icon: <Plus />,
keywords: 'create add task',
shortcut: hotkey('issue.new') ?? undefined,
@@ -77,7 +82,7 @@ export function useAppCommands({
}
generalItems.push({
id: 'general.new-project',
- label: 'New project',
+ label: tPalette('newProject'),
icon: <SquarePlus />,
keywords: 'create add',
shortcut: hotkey('project.new') ?? undefined,
@@ -96,12 +101,15 @@ export function useAppCommands({
}));
return {
- board: boardItems.length > 0 ? { id: 'board', heading: 'Board', items: boardItems } : null,
+ board:
+ boardItems.length > 0 ? { id: 'board', heading: tPalette('board'), items: boardItems } : null,
general:
- generalItems.length > 0 ? { id: 'general', heading: 'Commands', items: generalItems } : null,
+ generalItems.length > 0
+ ? { id: 'general', heading: tPalette('commands'), items: generalItems }
+ : null,
projects:
projectItems.length > 0
- ? { id: 'projects', heading: 'Switch project', items: projectItems }
+ ? { id: 'projects', heading: tPalette('switchProject'), items: projectItems }
: null,
};
}
diff --git a/apps/web/src/hooks/useDateFnsLocale.ts b/apps/web/src/hooks/useDateFnsLocale.ts
new file mode 100644
index 00000000..2f245ced
--- /dev/null
+++ b/apps/web/src/hooks/useDateFnsLocale.ts
@@ -0,0 +1,13 @@
+'use client';
+
+import { useLocale } from 'next-intl';
+import { enUS, uk, type Locale as DateFnsLocale } from 'date-fns/locale';
+
+// The date-fns locale matching the interface language, for the components that
+// format dates themselves instead of going through next-intl (the calendar's
+// month and weekday names).
+const LOCALES: Record<string, DateFnsLocale> = { en: enUS, uk };
+
+export function useDateFnsLocale(): DateFnsLocale {
+ return LOCALES[useLocale()] ?? enUS;
+}
diff --git a/apps/web/src/hooks/useEffectText.ts b/apps/web/src/hooks/useEffectText.ts
new file mode 100644
index 00000000..d78b7845
--- /dev/null
+++ b/apps/web/src/hooks/useEffectText.ts
@@ -0,0 +1,41 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
+import type { EffectFieldKey } from '@/utils/actions';
+import { usePriorityLabel } from '@/hooks/usePriorityLabel';
+
+// Names the fields of an action effect and the values that stand for "nothing
+// set", so the effect helpers stay plain functions the messages are passed into.
+export interface EffectText {
+ field: (key: EffectFieldKey) => string;
+ cleared: string;
+ noAssignee: string;
+ noType: string;
+ noLabels: string;
+ priority: (value: string | null) => string;
+}
+
+const FIELD_MESSAGES = {
+ columnId: 'state',
+ assigneeUserId: 'assignee',
+ priority: 'priority',
+ typeId: 'type',
+ startDate: 'startDate',
+ dueDate: 'dueDate',
+ labelIds: 'labels',
+} as const;
+
+export function useEffectText(): EffectText {
+ const tFields = useTranslations('issue.fields');
+ const t = useTranslations('issue.effects');
+ const priority = usePriorityLabel();
+
+ return {
+ field: (key) => tFields(FIELD_MESSAGES[key]),
+ cleared: t('cleared'),
+ noAssignee: t('noAssignee'),
+ noType: t('noType'),
+ noLabels: t('noLabels'),
+ priority,
+ };
+}
diff --git a/apps/web/src/hooks/useFeatureLabel.ts b/apps/web/src/hooks/useFeatureLabel.ts
new file mode 100644
index 00000000..9586cf21
--- /dev/null
+++ b/apps/web/src/hooks/useFeatureLabel.ts
@@ -0,0 +1,12 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
+import type { ProjectFeatures } from '@/lib/api';
+
+// What each optional section is called. Shared by the switches that turn a section
+// off, their confirmation, and the notice the section shows while it is off, so it
+// is named the same everywhere.
+export function useFeatureLabel() {
+ const t = useTranslations('common.features');
+ return (feature: keyof ProjectFeatures) => t(feature);
+}
diff --git a/apps/web/src/hooks/useFilterFields.ts b/apps/web/src/hooks/useFilterFields.ts
new file mode 100644
index 00000000..a5bf116f
--- /dev/null
+++ b/apps/web/src/hooks/useFilterFields.ts
@@ -0,0 +1,185 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
+import type { CustomField, ProjectDetail } from '@/lib/api';
+import { formatDate } from '@/utils/dates';
+import { PRIORITY_FILTER_VALUES, STATE_TYPES } from '@/utils/fieldOptions';
+import type { FilterCondition, FilterSet, FilterValue } from '@/utils/filters';
+import {
+ OPERATORS_BY_KIND,
+ type FieldKind,
+ type FieldOption,
+ type FieldSpec,
+} from '@/utils/filterFields';
+import { customFieldKey } from '@/utils/viewSettings';
+import { usePriorityLabel } from '@/hooks/usePriorityLabel';
+import { byKey } from '@/utils/messageKey';
+
+// Maps a custom field type to a filter field kind. select/multi_select are set
+// fields over their options; the scalar types map to their editors.
+function customFieldKind(field: CustomField): FieldKind {
+ switch (field.fieldType) {
+ case 'select':
+ case 'multi_select':
+ return 'set';
+ case 'number':
+ return 'number';
+ case 'boolean':
+ return 'boolean';
+ case 'date':
+ return 'date';
+ default:
+ return 'text'; // text, markdown
+ }
+}
+
+// A fresh condition for a newly picked field, with the kind's first operator and
+// no values, so it is inert (see isEffectiveCondition) until the user fills it in.
+export function newCondition(spec: FieldSpec): FilterCondition {
+ return {
+ id: crypto.randomUUID(),
+ field: spec.field,
+ op: OPERATORS_BY_KIND[spec.kind][0],
+ values: [],
+ };
+}
+
+// The filter vocabulary in the reader's language: the field catalog of a project,
+// the operator names, the boolean choices, and the short renderings a pill and a
+// saved action show.
+export function useFilterFields() {
+ const t = useTranslations('filters');
+ const operator = byKey(useTranslations('filters.operators'));
+ const stateType = byKey(useTranslations('display.stateTypes'));
+ const priorityLabel = usePriorityLabel();
+
+ const booleanOptions: FieldOption[] = [
+ { value: true, label: t('boolean.true') },
+ { value: false, label: t('boolean.false') },
+ ];
+
+ const operatorLabel = (op: FilterCondition['op']) => operator(op);
+
+ // The full catalog of filterable fields for a project: builtins plus every
+ // custom field.
+ const fieldSpecs = (project: ProjectDetail, customFields: CustomField[]): FieldSpec[] => {
+ const specs: FieldSpec[] = [
+ {
+ field: 'status',
+ label: t('fields.status'),
+ kind: 'set',
+ options: project.columns.map((c) => ({ value: c.id, label: c.name, color: c.color })),
+ },
+ {
+ field: 'statusType',
+ label: t('fields.statusType'),
+ kind: 'set',
+ options: STATE_TYPES.map((value) => ({ value, label: stateType(value) })),
+ },
+ {
+ field: 'assignee',
+ label: t('fields.assignee'),
+ kind: 'set',
+ options: [
+ ...project.assignees
+ .filter((a) => a.kind === 'member')
+ .map((a) => ({ value: a.userId, label: a.name })),
+ { value: null, label: t('unset.assignee') },
+ ],
+ },
+ {
+ field: 'delegate',
+ label: t('fields.delegate'),
+ kind: 'set',
+ options: [
+ ...project.assignees
+ .filter((a) => a.kind === 'agent')
+ .map((a) => ({ value: a.userId, label: a.name })),
+ { value: null, label: t('unset.delegate') },
+ ],
+ },
+ {
+ field: 'priority',
+ label: t('fields.priority'),
+ kind: 'set',
+ options: PRIORITY_FILTER_VALUES.map((value) => ({
+ value,
+ label: priorityLabel(value),
+ })),
+ },
+ {
+ field: 'type',
+ label: t('fields.type'),
+ kind: 'set',
+ options: [
+ ...project.issueTypes.map((ty) => ({ value: ty.id, label: ty.name, color: ty.color })),
+ { value: null, label: t('unset.type') },
+ ],
+ },
+ {
+ field: 'labels',
+ label: t('fields.labels'),
+ kind: 'set',
+ options: project.labels.map((l) => ({ value: l.id, label: l.name, color: l.color })),
+ },
+ { field: 'dueDate', label: t('fields.dueDate'), kind: 'date' },
+ { field: 'startDate', label: t('fields.startDate'), kind: 'date' },
+ { field: 'created', label: t('fields.created'), kind: 'date' },
+ { field: 'updated', label: t('fields.updated'), kind: 'date' },
+ ];
+ for (const f of customFields) {
+ const kind = customFieldKind(f);
+ specs.push({
+ field: customFieldKey(f.id),
+ label: f.name,
+ kind,
+ options:
+ kind === 'set'
+ ? f.options.map((o) => ({ value: o.id, label: o.value, color: o.color }))
+ : undefined,
+ });
+ }
+ return specs;
+ };
+
+ // Short display of a condition's chosen values for the pill.
+ const valuesLabel = (spec: FieldSpec, cond: FilterCondition): string => {
+ if (cond.op === 'is_set' || cond.op === 'is_not_set') return '';
+ if (cond.values.length === 0) return '…';
+ if (spec.kind === 'set' || spec.kind === 'boolean') {
+ const opts = spec.kind === 'boolean' ? booleanOptions : (spec.options ?? []);
+ const labels = cond.values.map(
+ (v: FilterValue) => opts.find((o) => o.value === v)?.label ?? String(v),
+ );
+ return labels.length <= 2 ? labels.join(', ') : t('selected', { count: labels.length });
+ }
+ if (spec.kind === 'date' && typeof cond.values[0] === 'string') {
+ return formatDate(cond.values[0]);
+ }
+ return String(cond.values[0] ?? '');
+ };
+
+ // Short readable labels for the effective conditions of a filter set, e.g.
+ // ["State is Done", "Priority is not Low"]. Half-built conditions (no values on
+ // a value-based operator) and conditions on unknown fields are skipped.
+ const describeConditions = (
+ filters: FilterSet | null | undefined,
+ project: ProjectDetail,
+ customFields: CustomField[],
+ ): string[] => {
+ if (!filters) return [];
+ const byField = new Map(fieldSpecs(project, customFields).map((s) => [s.field, s]));
+ const out: string[] = [];
+ for (const cond of filters.conditions) {
+ const spec = byField.get(cond.field);
+ if (!spec) continue;
+ const presence = cond.op === 'is_set' || cond.op === 'is_not_set';
+ if (!presence && cond.values.length === 0) continue;
+ const op = operatorLabel(cond.op);
+ out.push(presence ? `${spec.label} ${op}` : `${spec.label} ${op} ${valuesLabel(spec, cond)}`);
+ }
+ return out;
+ };
+
+ return { fieldSpecs, operatorLabel, booleanOptions, valuesLabel, describeConditions };
+}
diff --git a/apps/web/src/hooks/useGroupLabels.ts b/apps/web/src/hooks/useGroupLabels.ts
new file mode 100644
index 00000000..7e169581
--- /dev/null
+++ b/apps/web/src/hooks/useGroupLabels.ts
@@ -0,0 +1,21 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
+import type { GroupLabels } from '@/utils/project';
+import { usePriorityLabel } from '@/hooks/usePriorityLabel';
+
+// The names buildGroups needs beyond the project's own entities: the "No …" group
+// of each nullable grouping field, and the priority values.
+export function useGroupLabels(): GroupLabels {
+ const t = useTranslations('workItems.groups');
+ const priority = usePriorityLabel();
+ return {
+ noAssignee: t('noAssignee'),
+ noDelegate: t('noDelegate'),
+ noPriority: t('noPriority'),
+ noType: t('noType'),
+ noInitiative: t('noInitiative'),
+ noCycle: t('noCycle'),
+ priority,
+ };
+}
diff --git a/apps/web/src/hooks/useLinkRelationLabel.ts b/apps/web/src/hooks/useLinkRelationLabel.ts
new file mode 100644
index 00000000..47038e29
--- /dev/null
+++ b/apps/web/src/hooks/useLinkRelationLabel.ts
@@ -0,0 +1,12 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
+import type { IssueLinkInputKind } from '@/lib/api';
+
+// How one issue relates to another, named for the reader. Used wherever a
+// relation is listed: the issue detail panel, the board cards, the table and the
+// timeline sub-rows.
+export function useLinkRelationLabel() {
+ const t = useTranslations('issueLinks.relations');
+ return (relation: IssueLinkInputKind) => t(relation);
+}
diff --git a/apps/web/src/hooks/useNavigationCommands.tsx b/apps/web/src/hooks/useNavigationCommands.tsx
index 0dcbb2fc..286d119c 100644
--- a/apps/web/src/hooks/useNavigationCommands.tsx
+++ b/apps/web/src/hooks/useNavigationCommands.tsx
@@ -12,6 +12,7 @@ import {
Target,
Users,
} from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { useSession } from '@/lib/auth-client';
import {
aiChatPath,
@@ -34,6 +35,11 @@ import { GOD_SECTIONS } from '@/utils/godSections';
import { usePermissions } from '@/hooks/usePermissions';
import { useProjectFeatures } from '@/hooks/useProjectFeatures';
import { useSettingsNavGroups } from '@/hooks/useSettingsNavGroups';
+import {
+ useAccountSectionLabel,
+ useGodSectionText,
+ useSettingsSectionText,
+} from '@/hooks/useSectionLabels';
import type { Command, CommandSection } from '@/utils/commands';
// Every place the palette can navigate to, filtered by what the viewer may read.
@@ -43,6 +49,10 @@ import type { Command, CommandSection } from '@/utils/commands';
// under one "Sections" heading so a search separates them from commands and
// issues.
export function useNavigationCommands(projectKey: string | null): CommandSection | null {
+ const t = useTranslations('nav');
+ const sectionText = useSettingsSectionText();
+ const godText = useGodSectionText();
+ const accountLabel = useAccountSectionLabel();
const router = useRouter();
const { can } = usePermissions();
const features = useProjectFeatures();
@@ -58,32 +68,44 @@ export function useNavigationCommands(projectKey: string | null): CommandSection
if (projectKey) {
const key = projectKey;
- add('nav.inbox', 'Inbox', <Inbox />, inboxPath(key), 'notifications unread');
+ add('nav.inbox', t('inbox'), <Inbox />, inboxPath(key), 'notifications unread');
if (features.dashboards && can('dashboards', 'read'))
- add('nav.dashboards', 'Dashboards', <LayoutDashboard />, dashboardsPath(key), 'charts');
- add('nav.work-items', 'Work items', <SquareKanban />, projectPath(key), 'board issues kanban');
+ add('nav.dashboards', t('dashboards'), <LayoutDashboard />, dashboardsPath(key), 'charts');
+ add(
+ 'nav.work-items',
+ t('workItems'),
+ <SquareKanban />,
+ projectPath(key),
+ 'board issues kanban',
+ );
if (features.initiatives && can('initiatives', 'read'))
- add('nav.initiatives', 'Initiatives', <Target />, initiativesPath(key), 'epics');
+ add('nav.initiatives', t('initiatives'), <Target />, initiativesPath(key), 'epics');
if (can('ai_agents', 'read'))
- add('nav.ai-chat', 'Chat with AI Team', <MessagesSquare />, aiChatPath(key), 'ai agents');
+ add('nav.ai-chat', t('chatWithAiTeam'), <MessagesSquare />, aiChatPath(key), 'ai agents');
for (const s of AI_TEAM_SECTIONS) {
if (can(s.resource, 'read'))
- add(`nav.ai-team.${s.slug}`, s.label, <s.icon />, aiTeamPath(key, s.slug), 'ai team');
+ add(
+ `nav.ai-team.${s.slug}`,
+ sectionText(s.slug).label,
+ <s.icon />,
+ aiTeamPath(key, s.slug),
+ 'ai team',
+ );
}
for (const s of AI_SECTIONS) {
if (can(s.resource, 'read'))
add(
`nav.ai.${s.slug}`,
- s.label,
+ sectionText(s.slug).label,
<s.icon />,
aiSectionPath(key, s.slug),
'ai team configure',
);
}
- add('nav.members', 'Members', <Users />, membersPath(key), 'team people invite');
+ add('nav.members', t('members'), <Users />, membersPath(key), 'team people invite');
add(
'nav.notifications',
- 'Notification preferences',
+ t('notificationPreferences'),
<Bell />,
notificationsPath(key),
'email telegram',
@@ -102,19 +124,19 @@ export function useNavigationCommands(projectKey: string | null): CommandSection
});
}
}
- add('nav.api', 'API docs', <Braces />, apiDocsPath(key), 'rest openapi');
- add('nav.mcp', 'MCP Server', <Server />, mcpServerPath(key), 'model context protocol');
+ add('nav.api', t('apiDocs'), <Braces />, apiDocsPath(key), 'rest openapi');
+ add('nav.mcp', t('mcpServer'), <Server />, mcpServerPath(key), 'model context protocol');
}
add(
'nav.manage-projects',
- 'Manage projects',
+ t('manageProjects'),
<FolderKanban />,
manageProjectsPath(),
'account leave delete copy',
);
for (const s of ACCOUNT_SECTIONS) {
- add(`nav.account.${s.slug}`, s.label, <s.icon />, accountPath(s.slug), 'account');
+ add(`nav.account.${s.slug}`, accountLabel(s.slug), <s.icon />, accountPath(s.slug), 'account');
}
// Instance administration, owner account only. The API enforces the same, so
@@ -123,7 +145,7 @@ export function useNavigationCommands(projectKey: string | null): CommandSection
for (const s of GOD_SECTIONS) {
add(
`nav.god.${s.slug}`,
- `God mode: ${s.label}`,
+ t('godModeSection', { section: godText.section(s.slug).label }),
<Shield />,
godPath(s.slug),
'instance admin',
@@ -132,5 +154,5 @@ export function useNavigationCommands(projectKey: string | null): CommandSection
}
if (items.length === 0) return null;
- return { id: 'sections', heading: 'Sections', items };
+ return { id: 'sections', heading: t('sections'), items };
}
diff --git a/apps/web/src/hooks/usePermissionLabels.ts b/apps/web/src/hooks/usePermissionLabels.ts
new file mode 100644
index 00000000..c0bc21b8
--- /dev/null
+++ b/apps/web/src/hooks/usePermissionLabels.ts
@@ -0,0 +1,26 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
+import type { PermissionAction, PermissionResource } from '@/lib/api';
+
+// The labels of the permission matrix: one resource, one action, one display group.
+// A key the messages do not carry (a resource added on the API) falls back to its
+// prettified slug, so a new permission still reads as words.
+export function usePermissionLabels() {
+ const t = useTranslations('permissions');
+ const prettify = (slug: string) => slug.replace(/_/g, ' ');
+ // The catalog is served by the API, so a resource or group key can be one the
+ // messages do not carry yet; `t.has` decides, and the cast is what lets the key be
+ // built at runtime.
+ const label = (key: string, fallback: string) => {
+ const messageKey = key as Parameters<typeof t.has>[0];
+ return t.has(messageKey) ? t(messageKey) : fallback;
+ };
+
+ return {
+ resourceLabel: (resource: PermissionResource) =>
+ label(`resources.${resource}`, prettify(resource)),
+ actionLabel: (action: PermissionAction) => label(`actions.${action}`, prettify(action)),
+ groupLabel: (key: string) => label(`groups.${key}`, prettify(key)),
+ };
+}
diff --git a/apps/web/src/hooks/usePriorityLabel.ts b/apps/web/src/hooks/usePriorityLabel.ts
new file mode 100644
index 00000000..1c39fa38
--- /dev/null
+++ b/apps/web/src/hooks/usePriorityLabel.ts
@@ -0,0 +1,15 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
+import { PRIORITY_ORDER, type Priority } from '@/utils/fieldOptions';
+
+// The label of a priority value, with '' (and null) the explicit "no priority"
+// choice. The API types priority as a plain string, so a value outside the fixed
+// list is shown as it came instead of rendering a key path.
+export function usePriorityLabel() {
+ const t = useTranslations('common.priority');
+ return (value: string | null) => {
+ if (!value) return t('none');
+ return PRIORITY_ORDER.includes(value as Priority) ? t(value as Priority) : value;
+ };
+}
diff --git a/apps/web/src/hooks/useSectionLabels.ts b/apps/web/src/hooks/useSectionLabels.ts
new file mode 100644
index 00000000..d5823288
--- /dev/null
+++ b/apps/web/src/hooks/useSectionLabels.ts
@@ -0,0 +1,34 @@
+'use client';
+
+import { useTranslations } from 'next-intl';
+import type { GodGroup } from '@/utils/godSections';
+import { byKey } from '@/utils/messageKey';
+
+// The names and blurbs of the navigable sections — project settings, god mode and
+// the account pages. The slug is a route param typed as a plain string, so the
+// message key is built at runtime and the cast is what lets it be.
+type SectionText = { label: string; description: string };
+
+function sectionText(t: ReturnType<typeof useTranslations>, slug: string): SectionText {
+ const read = byKey(t);
+ return { label: read(`${slug}.label`), description: read(`${slug}.description`) };
+}
+
+export function useSettingsSectionText() {
+ const t = useTranslations('sections.settings');
+ return (slug: string) => sectionText(t, slug);
+}
+
+export function useGodSectionText() {
+ const t = useTranslations('sections.god');
+ const tGroup = useTranslations('sections.godGroups');
+ return {
+ section: (slug: string) => sectionText(t, slug),
+ group: (group: GodGroup) => tGroup(group),
+ };
+}
+
+export function useAccountSectionLabel() {
+ const t = useTranslations('sections.account');
+ return (slug: string) => byKey(t)(slug);
+}
diff --git a/apps/web/src/hooks/useSettingsNavGroups.ts b/apps/web/src/hooks/useSettingsNavGroups.ts
index ef276305..468b22b1 100644
--- a/apps/web/src/hooks/useSettingsNavGroups.ts
+++ b/apps/web/src/hooks/useSettingsNavGroups.ts
@@ -1,5 +1,6 @@
import { usePathname } from 'next/navigation';
import { Shield, type LucideIcon } from 'lucide-react';
+import { useTranslations } from 'next-intl';
import { rolesPath, settingsPath } from '@/utils/paths';
import {
AUTOMATION_SECTIONS,
@@ -8,6 +9,7 @@ import {
type SettingsSection,
} from '@/utils/settingsSections';
import { usePermissions } from '@/hooks/usePermissions';
+import { useSettingsSectionText } from '@/hooks/useSectionLabels';
import type { ProjectDetail } from '@/lib/api';
// The project settings sidebar (the "Project settings" mode) lists the
@@ -39,6 +41,8 @@ export function useSettingsNavGroups(
groups: SettingsNavGroup[];
firstHref: string | null;
} {
+ const t = useTranslations('nav');
+ const sectionText = useSettingsSectionText();
const pathname = usePathname();
const { can, isOwner } = usePermissions(project);
@@ -50,7 +54,7 @@ export function useSettingsNavGroups(
key: s.slug,
href: projectKey ? settingsPath(projectKey, s.slug) : '#',
icon: s.icon,
- label: s.label,
+ label: sectionText(s.slug).label,
active: pathname.endsWith(`/settings/${s.slug}`),
}));
@@ -66,16 +70,16 @@ export function useSettingsNavGroups(
key: 'roles',
href: projectKey ? rolesPath(projectKey) : '#',
icon: Shield,
- label: 'Roles',
+ label: t('roles'),
active: pathname.endsWith('/members/roles'),
},
]
: [];
const groups: SettingsNavGroup[] = [
- { key: 'general', label: 'Project', items: [...generalItems, ...rolesItems] },
- { key: 'workflow', label: 'Workflow', items: workflowItems },
- { key: 'automation', label: 'Automation', items: automationItems },
+ { key: 'general', label: t('groups.project'), items: [...generalItems, ...rolesItems] },
+ { key: 'workflow', label: t('groups.workflow'), items: workflowItems },
+ { key: 'automation', label: t('groups.automation'), items: automationItems },
].filter((g) => g.items.length > 0);
const firstHref = groups[0]?.items[0]?.href ?? null;
diff --git a/apps/web/src/hooks/useShellRoute.ts b/apps/web/src/hooks/useShellRoute.ts
index eaffa83d..c2f48817 100644
--- a/apps/web/src/hooks/useShellRoute.ts
+++ b/apps/web/src/hooks/useShellRoute.ts
@@ -1,13 +1,4 @@
import { useParams, usePathname } from 'next/navigation';
-import { SETTINGS_SECTIONS } from '@/utils/settingsSections';
-
-// The breadcrumb label for an /ai-team/:section route. The chat has no settings
-// section entry; the rest take their label from the section config.
-function aiTeamLabel(section: string | null): string | null {
- if (!section) return null;
- if (section === 'chat') return 'Chat with AI Team';
- return SETTINGS_SECTIONS.find((s) => s.slug === section)?.label ?? 'AI Team';
-}
export type ShellRoute = {
projectKey: string | null;
@@ -16,7 +7,8 @@ export type ShellRoute = {
sub: string | null;
activeViewId: number | null;
section: string | null;
- aiTeamCrumb: string | null;
+ // The /ai-team/:section segment, which the header names (see ShellHeaderTitle).
+ aiTeamSection: string | null;
// The project-scoped issue number from the URL, not the internal id.
routeIssueSeq: number | null;
routeInitiativeId: number | null;
@@ -43,7 +35,7 @@ export function useShellRoute(): ShellRoute {
sub,
activeViewId: sub === 'view' && segs[3] ? Number(segs[3]) : null,
section: sub === 'settings' ? (segs[3] ?? null) : null,
- aiTeamCrumb: sub === 'ai-team' ? aiTeamLabel(segs[3] ?? null) : null,
+ aiTeamSection: sub === 'ai-team' ? (segs[3] ?? null) : null,
routeIssueSeq: sub === 'issue' && segs[3] ? Number(segs[3]) : null,
// /initiatives/details/:id — the segment right after 'initiatives' is a list tab.
routeInitiativeId:
diff --git a/apps/web/src/i18n/cookie.ts b/apps/web/src/i18n/cookie.ts
new file mode 100644
index 00000000..2a829599
--- /dev/null
+++ b/apps/web/src/i18n/cookie.ts
@@ -0,0 +1,10 @@
+import { LOCALE_COOKIE, type Locale } from './locales';
+
+const ONE_YEAR = 60 * 60 * 24 * 365;
+
+// Mirrors the chosen language into the cookie the server renders from. The account
+// preference stays the durable copy; this is what makes the next server render, and
+// every signed-out screen, come back in the same language.
+export function setLocaleCookie(locale: Locale) {
+ document.cookie = `${LOCALE_COOKIE}=${locale}; path=/; max-age=${ONE_YEAR}; samesite=lax`;
+}
diff --git a/apps/web/src/i18n/locales.ts b/apps/web/src/i18n/locales.ts
new file mode 100644
index 00000000..1abc604a
--- /dev/null
+++ b/apps/web/src/i18n/locales.ts
@@ -0,0 +1,27 @@
+// The languages the interface ships with. `en` is the source language: every key
+// exists in `messages/en.json`, and a missing translation falls back to it.
+export const LOCALES = ['en', 'uk'] as const;
+
+export type Locale = (typeof LOCALES)[number];
+
+export const DEFAULT_LOCALE: Locale = 'en';
+
+// Read on the server to render the first paint in the right language. Written by
+// the language switcher next to the account preference, so a signed-out screen
+// (login, invite, shared issue) keeps the last choice too.
+export const LOCALE_COOKIE = 'NEXT_LOCALE';
+
+// Each language named in itself, which is what a person scanning the list looks for.
+export const LOCALE_LABELS: Record<Locale, string> = {
+ en: 'English',
+ uk: 'Українська',
+};
+
+export const LOCALE_FLAGS: Record<Locale, string> = {
+ en: '🇬🇧',
+ uk: '🇺🇦',
+};
+
+export function isLocale(value: string | undefined | null): value is Locale {
+ return value != null && (LOCALES as readonly string[]).includes(value);
+}
diff --git a/apps/web/src/i18n/messages.ts b/apps/web/src/i18n/messages.ts
new file mode 100644
index 00000000..8875e62f
--- /dev/null
+++ b/apps/web/src/i18n/messages.ts
@@ -0,0 +1,98 @@
+import account from '../../messages/en/account.json';
+import aiChat from '../../messages/en/aiChat.json';
+import apiKeys from '../../messages/en/apiKeys.json';
+import auth from '../../messages/en/auth.json';
+import common from '../../messages/en/common.json';
+import cycles from '../../messages/en/cycles.json';
+import dashboards from '../../messages/en/dashboards.json';
+import display from '../../messages/en/display.json';
+import filters from '../../messages/en/filters.json';
+import god from '../../messages/en/god.json';
+import inbox from '../../messages/en/inbox.json';
+import initiatives from '../../messages/en/initiatives.json';
+import invite from '../../messages/en/invite.json';
+import issue from '../../messages/en/issue.json';
+import issueLinks from '../../messages/en/issueLinks.json';
+import mcp from '../../messages/en/mcp.json';
+import members from '../../messages/en/members.json';
+import meta from '../../messages/en/meta.json';
+import nav from '../../messages/en/nav.json';
+import newProject from '../../messages/en/newProject.json';
+import notes from '../../messages/en/notes.json';
+import palette from '../../messages/en/palette.json';
+import permissions from '../../messages/en/permissions.json';
+import projects from '../../messages/en/projects.json';
+import sections from '../../messages/en/sections.json';
+import settings from '../../messages/en/settings.json';
+import shell from '../../messages/en/shell.json';
+import updates from '../../messages/en/updates.json';
+import views from '../../messages/en/views.json';
+import workItems from '../../messages/en/workItems.json';
+import { DEFAULT_LOCALE, type Locale } from './locales';
+
+// English is static: it is the fallback for every other language and the shape the
+// `t('…')` keys are typed against.
+const defaultMessages = {
+ meta,
+ auth,
+ common,
+ nav,
+ palette,
+ views,
+ shell,
+ sections,
+ issueLinks,
+ issue,
+ display,
+ filters,
+ workItems,
+ apiKeys,
+ invite,
+ mcp,
+ projects,
+ aiChat,
+ inbox,
+ permissions,
+ members,
+ cycles,
+ dashboards,
+ initiatives,
+ notes,
+ account,
+ settings,
+ god,
+ newProject,
+ updates,
+};
+
+export type Messages = typeof defaultMessages;
+
+const NAMESPACES = Object.keys(defaultMessages) as (keyof Messages)[];
+
+export async function loadMessages(locale: Locale): Promise<Messages> {
+ if (locale === DEFAULT_LOCALE) return defaultMessages;
+
+ const translated = await Promise.all(
+ NAMESPACES.map(async (ns) => [
+ ns,
+ (await import(`../../messages/${locale}/${ns}.json`)).default,
+ ]),
+ );
+
+ // A key still untranslated renders its English text instead of the raw key path.
+ return mergeMessages(defaultMessages, Object.fromEntries(translated)) as Messages;
+}
+
+type MessageTree = { [key: string]: string | MessageTree };
+
+function mergeMessages(base: MessageTree, override: MessageTree): MessageTree {
+ const result: MessageTree = { ...base };
+ for (const [key, value] of Object.entries(override)) {
+ const current = result[key];
+ result[key] =
+ typeof value === 'object' && typeof current === 'object'
+ ? mergeMessages(current, value)
+ : value;
+ }
+ return result;
+}
diff --git a/apps/web/src/i18n/request.ts b/apps/web/src/i18n/request.ts
new file mode 100644
index 00000000..14fc72fc
--- /dev/null
+++ b/apps/web/src/i18n/request.ts
@@ -0,0 +1,21 @@
+import { cookies } from 'next/headers';
+import { getRequestConfig } from 'next-intl/server';
+import { DEFAULT_LOCALE, LOCALE_COOKIE, isLocale } from './locales';
+import { loadMessages } from './messages';
+
+// The app has no `[locale]` route segment: the language comes from a cookie, so every
+// URL stays the same in every language. The account preference is the durable copy
+// and the switcher writes both.
+export default getRequestConfig(async () => {
+ const cookie = (await cookies()).get(LOCALE_COOKIE)?.value;
+ const locale = isLocale(cookie) ? cookie : DEFAULT_LOCALE;
+
+ return {
+ locale,
+ messages: await loadMessages(locale),
+ // What "3 hours ago" is measured against. One value per request, shared by the
+ // server render and the client, so a relative time is not computed from two
+ // different clocks and the markup matches on hydration.
+ now: new Date(),
+ };
+});
diff --git a/apps/web/src/lib/api.ts b/apps/web/src/lib/api.ts
index d6568366..9ea4c8a9 100644
--- a/apps/web/src/lib/api.ts
+++ b/apps/web/src/lib/api.ts
@@ -3,6 +3,7 @@
// NEXT_PUBLIC_API_URL. The planner routes require a better-auth session, so every
// request sends credentials (the session cookie).
+import type { Locale } from '@/i18n/locales';
import type { FilterSet } from '@/utils/filters';
import type { SavedViewDisplay } from '@/utils/viewSettings';
import type { DashboardLayout, BreakdownBy } from '@/utils/dashboardWidgets';
@@ -943,6 +944,9 @@ export type IssueActivityView = 'flat' | 'grouped';
export interface AccountPreferences {
timezone: string;
+ // The interface language. Mirrored into the NEXT_LOCALE cookie, which is what the
+ // server renders with; also the language of this user's emails and bot messages.
+ locale: Locale;
theme: ThemePreference;
issueOpenMode: IssueOpenMode;
startPage: StartPage;
diff --git a/apps/web/src/services/aiAgents.service.ts b/apps/web/src/services/aiAgents.service.ts
index 06020cca..d9f9d6e2 100644
--- a/apps/web/src/services/aiAgents.service.ts
+++ b/apps/web/src/services/aiAgents.service.ts
@@ -3,6 +3,7 @@
import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import { api } from '@/lib/api';
import { qk } from '@/services/queryKeys';
import { useInvalidateProject } from '@/services/projects.service';
@@ -79,13 +80,14 @@ export function useAgentToolsQuery(projectKey: string | null) {
}
export function useCreateAiAgent(projectKey: string | null) {
+ const t = useTranslations('settings.agents');
const qc = useQueryClient();
const invalidateProject = useInvalidateProject(projectKey);
return useMutation({
mutationFn: (input: Parameters<typeof api.createAiAgent>[1]) =>
api.createAiAgent(projectKey!, input),
onSuccess: (res) => {
- toast.success(`Agent @${res.agent.username} created`);
+ toast.success(t('created', { username: res.agent.username }));
if (projectKey) void qc.invalidateQueries({ queryKey: qk.aiAgents(projectKey) });
invalidateProject();
},
@@ -93,13 +95,14 @@ export function useCreateAiAgent(projectKey: string | null) {
}
export function useUpdateAiAgent(projectKey: string | null) {
+ const t = useTranslations('settings.agents');
const qc = useQueryClient();
const invalidateProject = useInvalidateProject(projectKey);
return useMutation({
mutationFn: ({ id, patch }: { id: number; patch: Parameters<typeof api.updateAiAgent>[2] }) =>
api.updateAiAgent(projectKey!, id, patch),
onSuccess: (agent) => {
- toast.success(`Agent @${agent.username} saved`);
+ toast.success(t('saved', { username: agent.username }));
if (projectKey) void qc.invalidateQueries({ queryKey: qk.aiAgents(projectKey) });
invalidateProject();
},
diff --git a/apps/web/src/services/members.service.ts b/apps/web/src/services/members.service.ts
index 601383b1..76f1194c 100644
--- a/apps/web/src/services/members.service.ts
+++ b/apps/web/src/services/members.service.ts
@@ -1,5 +1,6 @@
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
import { toast } from 'sonner';
+import { useTranslations } from 'next-intl';
import { api, type MemberRole } from '@/lib/api';
import { qk } from '@/services/queryKeys';
@@ -22,6 +23,7 @@ export function useRemoveMember(projectKey: string) {
// Set a member's role (owner-only on the API). role 'owner' promotes to owner;
// role 'member' assigns a custom role by roleId (null resets to the default role).
export function useSetMemberRole(projectKey: string) {
+ const t = useTranslations('members');
const qc = useQueryClient();
return useMutation({
mutationFn: ({
@@ -35,20 +37,21 @@ export function useSetMemberRole(projectKey: string) {
}) => api.setMemberRole(projectKey, userId, { role, roleId }),
onSuccess: (_data, { role }) => {
qc.invalidateQueries({ queryKey: qk.members(projectKey) });
- toast.success(role === 'owner' ? 'Member promoted to owner' : 'Member role updated');
+ toast.success(t(role === 'owner' ? 'promoted' : 'roleUpdated'));
},
});
}
// Set what a member does in the project (owner-only on the API).
export function useSetMemberDescription(projectKey: string) {
+ const t = useTranslations('members');
const qc = useQueryClient();
return useMutation({
mutationFn: ({ userId, description }: { userId: string; description: string }) =>
api.setMemberDescription(projectKey, userId, description),
onSuccess: () => {
qc.invalidateQueries({ queryKey: qk.members(projectKey) });
- toast.success('Member description updated');
+ toast.success(t('descriptionUpdated'));
},
});
}
diff --git a/apps/web/src/services/preferences.service.ts b/apps/web/src/services/preferences.service.ts
index 819ea197..8e3ace0b 100644
--- a/apps/web/src/services/preferences.service.ts
+++ b/apps/web/src/services/preferences.service.ts
@@ -10,6 +10,7 @@ import { qk } from '@/services/queryKeys';
export const PREFERENCE_DEFAULTS: AccountPreferences = {
timezone: 'UTC',
+ locale: 'en',
theme: 'system',
issueOpenMode: 'panel',
startPage: 'work-items',
diff --git a/apps/web/src/services/telegram.service.ts b/apps/web/src/services/telegram.service.ts
index 8237d1b6..86edf51f 100644
--- a/apps/web/src/services/telegram.service.ts
+++ b/apps/web/src/services/telegram.service.ts
@@ -1,5 +1,6 @@
'use client';
+import { useTranslations } from 'next-intl';
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
import { api } from '@/lib/api';
import { qk } from '@/services/queryKeys';
@@ -34,10 +35,8 @@ export function useDisconnectTelegram() {
// How to name a connected account: the @username when Telegram has one, otherwise
// the first name, otherwise a plain statement that it is connected.
-export function telegramAccountLabel(link: {
- username: string | null;
- firstName: string | null;
-}): string {
- if (link.username) return `@${link.username}`;
- return link.firstName ?? 'Connected';
+export function useTelegramAccountLabel() {
+ const t = useTranslations('account.accounts');
+ return (link: { username: string | null; firstName: string | null }) =>
+ link.username ? `@${link.username}` : (link.firstName ?? t('telegramConnectedLabel'));
}
diff --git a/apps/web/src/utils/accountSections.ts b/apps/web/src/utils/accountSections.ts
index 013234b6..64db76cb 100644
--- a/apps/web/src/utils/accountSections.ts
+++ b/apps/web/src/utils/accountSections.ts
@@ -10,14 +10,15 @@ import {
// The account pages, in the order the user menu lists them. Every signed-in user
// reaches all of them, so there is no permission gate. Each slug is a page under
// /account/<slug>. Used by the user menu and the command palette's section search.
-export type AccountSection = { slug: string; label: string; icon: LucideIcon };
+// The name of a page is a message under `sections.account`.
+export type AccountSection = { slug: string; icon: LucideIcon };
export const ACCOUNT_SECTIONS: AccountSection[] = [
- { slug: 'profile', label: 'Profile', icon: UserRound },
- { slug: 'preferences', label: 'Preferences', icon: SlidersHorizontal },
- { slug: 'accounts', label: 'Accounts', icon: Link2 },
- { slug: 'security', label: 'Security', icon: ShieldCheck },
- { slug: 'api-keys', label: 'API keys', icon: KeyRound },
+ { slug: 'profile', icon: UserRound },
+ { slug: 'preferences', icon: SlidersHorizontal },
+ { slug: 'accounts', icon: Link2 },
+ { slug: 'security', icon: ShieldCheck },
+ { slug: 'api-keys', icon: KeyRound },
];
export const accountPath = (slug: string) => `/account/${slug}`;
diff --git a/apps/web/src/utils/actions.ts b/apps/web/src/utils/actions.ts
index 765e7d20..f2f38f01 100644
--- a/apps/web/src/utils/actions.ts
+++ b/apps/web/src/utils/actions.ts
@@ -5,7 +5,7 @@
// effect object as the patch (see api.updateIssue / useUpdateIssue).
import type { ActionEffect, ProjectDetail } from '@/lib/api';
-import { priorityLabel } from '@/utils/fieldOptions';
+import type { EffectText } from '@/hooks/useEffectText';
import { formatDate } from '@/utils/dates';
// The built-in fields an effect can set, in display order.
@@ -20,16 +20,6 @@ export const EFFECT_FIELD_KEYS = [
] as const;
export type EffectFieldKey = (typeof EFFECT_FIELD_KEYS)[number];
-export const EFFECT_FIELD_LABELS: Record<EffectFieldKey, string> = {
- columnId: 'State',
- assigneeUserId: 'Assignee',
- priority: 'Priority',
- typeId: 'Type',
- startDate: 'Start date',
- dueDate: 'Due date',
- labelIds: 'Labels',
-};
-
// The effect field keys actually set on this effect, in display order.
export function effectFieldKeys(effect: ActionEffect): EffectFieldKey[] {
return EFFECT_FIELD_KEYS.filter((k) => k in effect);
@@ -40,28 +30,27 @@ export function isEmptyEffect(effect: ActionEffect): boolean {
return effectFieldKeys(effect).length === 0;
}
-function dateLabel(v: string | null | undefined): string {
- return v ? formatDate(v) : 'Cleared';
-}
-
// The display value of one set effect field, resolving ids to project names.
export function effectValueLabel(
effect: ActionEffect,
key: EffectFieldKey,
project: ProjectDetail,
+ // Names the fields and the empty values in the reader's language (see useEffectText).
+ text: EffectText,
): string {
+ const dateLabel = (v: string | null | undefined) => (v ? formatDate(v) : text.cleared);
switch (key) {
case 'columnId':
return project.columns.find((c) => c.id === effect.columnId)?.name ?? '—';
case 'assigneeUserId':
return effect.assigneeUserId == null
- ? 'No assignee'
+ ? text.noAssignee
: (project.assignees.find((a) => a.userId === effect.assigneeUserId)?.name ?? '—');
case 'priority':
- return priorityLabel(effect.priority);
+ return text.priority(effect.priority ?? null);
case 'typeId':
return effect.typeId == null
- ? 'No type'
+ ? text.noType
: (project.issueTypes.find((t) => t.id === effect.typeId)?.name ?? '—');
case 'startDate':
return dateLabel(effect.startDate);
@@ -69,7 +58,7 @@ export function effectValueLabel(
return dateLabel(effect.dueDate);
case 'labelIds': {
const ids = effect.labelIds ?? [];
- if (ids.length === 0) return 'None';
+ if (ids.length === 0) return text.noLabels;
return (
project.labels
.filter((l) => ids.includes(l.id))
@@ -84,9 +73,10 @@ export function effectValueLabel(
export function describeEffect(
effect: ActionEffect,
project: ProjectDetail,
+ text: EffectText,
): { key: EffectFieldKey; text: string }[] {
return effectFieldKeys(effect).map((key) => ({
key,
- text: `${EFFECT_FIELD_LABELS[key]} → ${effectValueLabel(effect, key, project)}`,
+ text: `${text.field(key)} → ${effectValueLabel(effect, key, project, text)}`,
}));
}
diff --git a/apps/web/src/utils/cycleMeta.ts b/apps/web/src/utils/cycleMeta.ts
index f32df484..73e4cb63 100644
--- a/apps/web/src/utils/cycleMeta.ts
+++ b/apps/web/src/utils/cycleMeta.ts
@@ -2,11 +2,11 @@ import type { CycleStatus } from '@/lib/api';
// Display metadata for the cycle status, which the API derives from the dates.
// Colors are raw hex so they can drive both a dot and a text color, like the
-// initiative status meta.
-export const CYCLE_STATUS_META: Record<CycleStatus, { label: string; color: string }> = {
- upcoming: { label: 'Upcoming', color: '#6366f1' },
- active: { label: 'Active', color: '#eab308' },
- completed: { label: 'Completed', color: '#22c55e' },
+// initiative status meta. The label of a status is a message under `cycles.status`.
+export const CYCLE_STATUS_META: Record<CycleStatus, { color: string }> = {
+ upcoming: { color: '#6366f1' },
+ active: { color: '#eab308' },
+ completed: { color: '#22c55e' },
};
// The order the list groups cycles in: what is running now, what is next, what is
diff --git a/apps/web/src/utils/dashboardWidgets.ts b/apps/web/src/utils/dashboardWidgets.ts
index 9dbdee89..33b78f1f 100644
--- a/apps/web/src/utils/dashboardWidgets.ts
+++ b/apps/web/src/utils/dashboardWidgets.ts
@@ -160,60 +160,76 @@ const UNASSIGNED_FILTER: FilterSet = {
};
// The built-in layout shown when a project has no saved dashboards. Saving it
-// persists it as the project's first real dashboard. The top row is small metric
-// tiles (each a filtered count), then the charts, pulse, and the two lists.
-export const DEFAULT_DASHBOARD_LAYOUT: DashboardLayout = [
- {
- id: 'default-open',
- type: 'stat',
- x: 0,
- y: 0,
- w: 3,
- h: 3,
- title: 'Open',
- config: { filters: OPEN_FILTER },
- },
- {
- id: 'default-progress',
- type: 'stat',
- x: 3,
- y: 0,
- w: 3,
- h: 3,
- title: 'In progress',
- config: { filters: IN_PROGRESS_FILTER },
- },
- {
- id: 'default-backlog',
- type: 'stat',
- x: 6,
- y: 0,
- w: 3,
- h: 3,
- title: 'Backlog',
- config: { filters: BACKLOG_FILTER },
- },
- {
- id: 'default-unassigned',
- type: 'stat',
- x: 9,
- y: 0,
- w: 3,
- h: 3,
- title: 'Unassigned',
- config: { filters: UNASSIGNED_FILTER },
- },
- { id: 'default-throughput', type: 'throughput', x: 0, y: 3, w: 6, h: 6, config: { weeks: 12 } },
- { id: 'default-breakdown', type: 'breakdown', x: 6, y: 3, w: 6, h: 6, config: { by: 'status' } },
- { id: 'default-pulse', type: 'pulse', x: 0, y: 9, w: 12, h: 5, config: { granularity: 'day' } },
- {
- id: 'default-recent',
- type: 'recent_issues',
- x: 0,
- y: 14,
- w: 6,
- h: 7,
- config: { sort: 'created', limit: 10 },
- },
- { id: 'default-activity', type: 'activity_feed', x: 6, y: 14, w: 6, h: 7, config: {} },
-];
+// persists it as the project's first real dashboard, so the tile names are taken
+// in the reader's language (messages under `dashboards.defaultWidgets`). The top
+// row is small metric tiles (each a filtered count), then the charts, pulse, and
+// the two lists.
+export type DefaultStatKey = 'open' | 'inProgress' | 'backlog' | 'unassigned';
+
+export function defaultDashboardLayout(
+ statTitle: (key: DefaultStatKey) => string,
+): DashboardLayout {
+ return [
+ {
+ id: 'default-open',
+ type: 'stat',
+ x: 0,
+ y: 0,
+ w: 3,
+ h: 3,
+ title: statTitle('open'),
+ config: { filters: OPEN_FILTER },
+ },
+ {
+ id: 'default-progress',
+ type: 'stat',
+ x: 3,
+ y: 0,
+ w: 3,
+ h: 3,
+ title: statTitle('inProgress'),
+ config: { filters: IN_PROGRESS_FILTER },
+ },
+ {
+ id: 'default-backlog',
+ type: 'stat',
+ x: 6,
+ y: 0,
+ w: 3,
+ h: 3,
+ title: statTitle('backlog'),
+ config: { filters: BACKLOG_FILTER },
+ },
+ {
+ id: 'default-unassigned',
+ type: 'stat',
+ x: 9,
+ y: 0,
+ w: 3,
+ h: 3,
+ title: statTitle('unassigned'),
+ config: { filters: UNASSIGNED_FILTER },
+ },
+ { id: 'default-throughput', type: 'throughput', x: 0, y: 3, w: 6, h: 6, config: { weeks: 12 } },
+ {
+ id: 'default-breakdown',
+ type: 'breakdown',
+ x: 6,
+ y: 3,
+ w: 6,
+ h: 6,
+ config: { by: 'status' },
+ },
+ { id: 'default-pulse', type: 'pulse', x: 0, y: 9, w: 12, h: 5, config: { granularity: 'day' } },
+ {
+ id: 'default-recent',
+ type: 'recent_issues',
+ x: 0,
+ y: 14,
+ w: 6,
+ h: 7,
+ config: { sort: 'created', limit: 10 },
+ },
+ { id: 'default-activity', type: 'activity_feed', x: 6, y: 14, w: 6, h: 7, config: {} },
+ ];
+}
diff --git a/apps/web/src/utils/fieldOptions.ts b/apps/web/src/utils/fieldOptions.ts
index 4dc99ab5..adfebc98 100644
--- a/apps/web/src/utils/fieldOptions.ts
+++ b/apps/web/src/utils/fieldOptions.ts
@@ -1,41 +1,28 @@
-// Canonical option lists for the fixed issue fields (priority and state type),
-// so every place that needs their values, labels or order reads them from here
-// instead of keeping its own copy. Adding or renaming a priority/state is a
-// single edit in this file (plus its icon in the two icon renderers).
+// Canonical value lists for the fixed issue fields (priority and state type), so
+// every place that needs their values or order reads them from here instead of
+// keeping its own copy. Adding a priority/state is a single edit in this file
+// (plus its icon in the two icon renderers and its message).
import type { StateType } from '@/lib/api';
export type Priority = 'urgent' | 'high' | 'medium' | 'low';
-// Priorities most-urgent-first. The filter options, sort rank, group order and
-// the field selector all derive from this list.
-export const PRIORITIES: { value: Priority; label: string }[] = [
- { value: 'urgent', label: 'Urgent' },
- { value: 'high', label: 'High' },
- { value: 'medium', label: 'Medium' },
- { value: 'low', label: 'Low' },
-];
-
-// Priority values in display/rank order (most urgent first).
-export const PRIORITY_ORDER = PRIORITIES.map((p) => p.value);
+// Priority values in display/rank order (most urgent first). The filter options,
+// sort rank, group order and the field selector all derive from this list; the
+// label of a value is a message under `common.priority` (see usePriorityLabel).
+export const PRIORITY_ORDER: Priority[] = ['urgent', 'high', 'medium', 'low'];
// value -> rank (0 = most urgent). An unset priority is absent, so callers rank
// it after every listed one.
export const PRIORITY_RANK: Record<string, number> = Object.fromEntries(
- PRIORITIES.map((p, i) => [p.value, i]),
+ PRIORITY_ORDER.map((value, i) => [value, i]),
);
-// The label for a priority value, or "No priority" for an unset one.
-export const priorityLabel = (value: string | null | undefined): string =>
- PRIORITIES.find((p) => p.value === value)?.label ?? 'No priority';
-
-// Filter-builder options: the priorities plus an explicit "unset" choice (null).
-export const PRIORITY_OPTIONS: { value: string | null; label: string }[] = [
- ...PRIORITIES,
- { value: null, label: 'No priority' },
-];
+// Filter-builder values: the priorities plus an explicit "unset" choice (null).
+export const PRIORITY_FILTER_VALUES: (Priority | null)[] = [...PRIORITY_ORDER, null];
-// State types in workflow order.
+// State types in workflow order. The label of a state type is a message under
+// `display.stateTypes`.
export const STATE_TYPES: StateType[] = [
'backlog',
'unstarted',
@@ -43,19 +30,3 @@ export const STATE_TYPES: StateType[] = [
'completed',
'canceled',
];
-
-const STATE_TYPE_LABELS: Record<StateType, string> = {
- backlog: 'Backlog',
- unstarted: 'Unstarted',
- started: 'Started',
- completed: 'Completed',
- canceled: 'Canceled',
-};
-
-// Filter-builder options for the state type field, in workflow order.
-export const STATE_TYPE_OPTIONS: { value: StateType; label: string }[] = STATE_TYPES.map(
- (value) => ({
- value,
- label: STATE_TYPE_LABELS[value],
- }),
-);
diff --git a/apps/web/src/utils/filterFields.ts b/apps/web/src/utils/filterFields.ts
index 8d6d4258..fd881c71 100644
--- a/apps/web/src/utils/filterFields.ts
+++ b/apps/web/src/utils/filterFields.ts
@@ -1,8 +1,4 @@
-import type { ProjectDetail, CustomField } from '@/lib/api';
-import { formatDate } from '@/utils/dates';
-import { PRIORITY_OPTIONS, STATE_TYPE_OPTIONS } from '@/utils/fieldOptions';
-import type { FilterCondition, FilterOperator, FilterSet, FilterValue } from '@/utils/filters';
-import { customFieldKey } from '@/utils/viewSettings';
+import type { FilterOperator, FilterValue } from '@/utils/filters';
// The kind of value a field holds, which decides its operators and value editor.
export type FieldKind = 'set' | 'date' | 'text' | 'number' | 'boolean';
@@ -15,7 +11,8 @@ export interface FieldOption {
// One filterable field: how it is labeled, what kind of value it holds, and (for
// set fields) the choices. `field` is the persisted key (a builtin name or
-// `cf:<id>`).
+// `cf:<id>`). Built by useFieldSpecs, which names the builtins in the reader's
+// language.
export interface FieldSpec {
field: string;
label: string;
@@ -23,7 +20,8 @@ export interface FieldSpec {
options?: FieldOption[];
}
-// Operators available for each field kind, in menu order.
+// Operators available for each field kind, in menu order. The name of an
+// operator is a message under `filters.operators`.
export const OPERATORS_BY_KIND: Record<FieldKind, FilterOperator[]> = {
set: ['is', 'is_not'],
date: ['before', 'after', 'is_set', 'is_not_set'],
@@ -32,153 +30,20 @@ export const OPERATORS_BY_KIND: Record<FieldKind, FilterOperator[]> = {
boolean: ['is'],
};
-export const OPERATOR_LABELS: Record<FilterOperator, string> = {
- is: 'is',
- is_not: 'is not',
- before: 'before',
- after: 'after',
- is_set: 'is set',
- is_not_set: 'is not set',
- contains: 'contains',
- not_contains: 'does not contain',
-};
-
-export const BOOLEAN_OPTIONS: FieldOption[] = [
- { value: true, label: 'True' },
- { value: false, label: 'False' },
-];
-
-// Maps a custom field type to a filter field kind. select/multi_select are set
-// fields over their options; the scalar types map to their editors.
-function customFieldKind(field: CustomField): FieldKind {
- switch (field.fieldType) {
- case 'select':
- case 'multi_select':
- return 'set';
- case 'number':
- return 'number';
- case 'boolean':
- return 'boolean';
- case 'date':
- return 'date';
- default:
- return 'text'; // text, markdown
- }
-}
-
-// The full catalog of filterable fields for a project: builtins plus every custom
-// field. Recomputed when the project or its custom fields change.
-export function buildFieldSpecs(project: ProjectDetail, customFields: CustomField[]): FieldSpec[] {
- const specs: FieldSpec[] = [
- {
- field: 'status',
- label: 'State',
- kind: 'set',
- options: project.columns.map((c) => ({ value: c.id, label: c.name, color: c.color })),
- },
- { field: 'statusType', label: 'State type', kind: 'set', options: STATE_TYPE_OPTIONS },
- {
- field: 'assignee',
- label: 'Assignee',
- kind: 'set',
- options: [
- ...project.assignees
- .filter((a) => a.kind === 'member')
- .map((a) => ({ value: a.userId, label: a.name })),
- { value: null, label: 'No assignee' },
- ],
- },
- {
- field: 'delegate',
- label: 'Delegate',
- kind: 'set',
- options: [
- ...project.assignees
- .filter((a) => a.kind === 'agent')
- .map((a) => ({ value: a.userId, label: a.name })),
- { value: null, label: 'No delegate' },
- ],
- },
- { field: 'priority', label: 'Priority', kind: 'set', options: PRIORITY_OPTIONS },
- {
- field: 'type',
- label: 'Type',
- kind: 'set',
- options: [
- ...project.issueTypes.map((t) => ({ value: t.id, label: t.name, color: t.color })),
- { value: null, label: 'No type' },
- ],
- },
- {
- field: 'labels',
- label: 'Labels',
- kind: 'set',
- options: project.labels.map((l) => ({ value: l.id, label: l.name, color: l.color })),
- },
- { field: 'dueDate', label: 'Due date', kind: 'date' },
- { field: 'startDate', label: 'Start date', kind: 'date' },
- { field: 'created', label: 'Created', kind: 'date' },
- { field: 'updated', label: 'Updated', kind: 'date' },
- ];
- for (const f of customFields) {
- const kind = customFieldKind(f);
- specs.push({
- field: customFieldKey(f.id),
- label: f.name,
- kind,
- options:
- kind === 'set'
- ? f.options.map((o) => ({ value: o.id, label: o.value, color: o.color }))
- : undefined,
- });
- }
- return specs;
-}
-
-// A fresh condition for a newly picked field, with the kind's first operator and
-// no values, so it is inert (see isEffectiveCondition) until the user fills it in.
-export function newCondition(spec: FieldSpec): FilterCondition {
- return {
- id: crypto.randomUUID(),
- field: spec.field,
- op: OPERATORS_BY_KIND[spec.kind][0],
- values: [],
- };
-}
-
-// Short display of a condition's chosen values for the pill.
-export function valuesLabel(spec: FieldSpec, cond: FilterCondition): string {
- if (cond.op === 'is_set' || cond.op === 'is_not_set') return '';
- if (cond.values.length === 0) return '…';
- if (spec.kind === 'set' || spec.kind === 'boolean') {
- const opts = spec.kind === 'boolean' ? BOOLEAN_OPTIONS : (spec.options ?? []);
- const labels = cond.values.map((v) => opts.find((o) => o.value === v)?.label ?? String(v));
- return labels.length <= 2 ? labels.join(', ') : `${labels.length} selected`;
- }
- if (spec.kind === 'date' && typeof cond.values[0] === 'string') {
- return formatDate(cond.values[0]);
- }
- return String(cond.values[0] ?? '');
-}
-
-// Short human-readable labels for the effective conditions of a filter set, e.g.
-// ["State is Done", "Priority is not Low"]. Half-built conditions (no values on a
-// value-based operator) and conditions on unknown fields are skipped.
-export function describeConditions(
- filters: FilterSet | null | undefined,
- project: ProjectDetail,
- customFields: CustomField[],
-): string[] {
- if (!filters) return [];
- const byField = new Map(buildFieldSpecs(project, customFields).map((s) => [s.field, s]));
- const out: string[] = [];
- for (const cond of filters.conditions) {
- const spec = byField.get(cond.field);
- if (!spec) continue;
- const presence = cond.op === 'is_set' || cond.op === 'is_not_set';
- if (!presence && cond.values.length === 0) continue;
- const op = OPERATOR_LABELS[cond.op];
- out.push(presence ? `${spec.label} ${op}` : `${spec.label} ${op} ${valuesLabel(spec, cond)}`);
- }
- return out;
-}
+// The builtin filterable fields, in menu order. Their options come from the
+// project (see useFieldSpecs); the custom fields follow them.
+export const BUILTIN_FILTER_FIELDS = [
+ 'status',
+ 'statusType',
+ 'assignee',
+ 'delegate',
+ 'priority',
+ 'type',
+ 'labels',
+ 'dueDate',
+ 'startDate',
+ 'created',
+ 'updated',
+] as const;
+
+export type BuiltinFilterField = (typeof BUILTIN_FILTER_FIELDS)[number];
diff --git a/apps/web/src/utils/godSections.ts b/apps/web/src/utils/godSections.ts
index ae189c42..31c4201a 100644
--- a/apps/web/src/utils/godSections.ts
+++ b/apps/web/src/utils/godSections.ts
@@ -14,15 +14,14 @@ import {
// (one slug per page under /god/<slug>), so adding one is an entry here plus a page.
// `group` is the sidebar heading a section sits under; GOD_GROUPS gives the order.
// A section with `integration: true` is not listed under its group directly: it sits
-// inside the "Integrations" item at the end of the group.
+// inside the "Integrations" item at the end of the group. The name and the blurb of
+// a section, and the name of a group, are messages under `sections.god`.
-export const GOD_GROUPS = ['Management', 'Instance'] as const;
+export const GOD_GROUPS = ['management', 'instance'] as const;
export type GodGroup = (typeof GOD_GROUPS)[number];
export interface GodSection {
slug: string;
- label: string;
- description: string;
group: GodGroup;
icon: LucideIcon;
integration?: true;
@@ -31,67 +30,44 @@ export interface GodSection {
export const GOD_SECTIONS: GodSection[] = [
{
slug: 'users',
- label: 'Users',
- description:
- 'Every account on this instance: the global role, whether the address is confirmed, and the projects each user can reach.',
- group: 'Management',
+ group: 'management',
icon: Users,
},
{
slug: 'projects',
- label: 'Projects',
- description:
- 'Every project on this instance: what each one holds, when it was last active, and who can reach it.',
- group: 'Management',
+ group: 'management',
icon: FolderKanban,
},
{
slug: 'authentication',
- label: 'Authentication',
- description:
- 'Who may register on this instance, how accounts are confirmed, and the providers people sign in with.',
- group: 'Instance',
+ group: 'instance',
icon: KeyRound,
},
{
slug: 'hotkeys',
- label: 'Keyboard shortcuts',
- description:
- 'The key each command is bound to for everyone on this instance. Each person can rebind a shortcut for their own account in their preferences.',
- group: 'Instance',
+ group: 'instance',
icon: Keyboard,
},
{
slug: 'storage',
- label: 'Storage',
- description:
- 'How much people may upload: the size of a single file, the attachment types accepted, and the storage each project gets.',
- group: 'Instance',
+ group: 'instance',
icon: HardDrive,
},
{
slug: 'telegram',
- label: 'Telegram',
- description:
- 'The bot people connect their Telegram account to, and the one that delivers Telegram notifications for projects that set no bot of their own.',
- group: 'Instance',
+ group: 'instance',
icon: Send,
integration: true,
},
{
slug: 'email',
- label: 'Email provider',
- description:
- 'The mail provider the instance sends through: password resets, address confirmation, and sign-in links.',
- group: 'Instance',
+ group: 'instance',
icon: Mail,
integration: true,
},
{
slug: 'auth-provider',
- label: 'Auth provider',
- description: 'The external accounts people may sign in with.',
- group: 'Instance',
+ group: 'instance',
icon: KeyRound,
integration: true,
},
diff --git a/apps/web/src/utils/hotkeys.ts b/apps/web/src/utils/hotkeys.ts
index 603a6422..cefba6f0 100644
--- a/apps/web/src/utils/hotkeys.ts
+++ b/apps/web/src/utils/hotkeys.ts
@@ -20,6 +20,10 @@ export type HotkeyId =
| 'project.settings'
| 'board.select-all';
+// The heading a shortcut is listed under in the editor. The name of a group, and
+// what a shortcut does, are messages under `common.hotkeys`.
+export type HotkeyGroup = 'general' | 'workItems';
+
// `scope` decides when the binding is live. A 'global' one fires even while the
// user types or an overlay is open; an 'app' one is suppressed then, because its
// combination is a plain key that would land in the text being typed.
@@ -27,28 +31,28 @@ export type HotkeyId =
// than a single combination.
export type HotkeyDef = {
id: HotkeyId;
- label: string;
- group: string;
+ group: HotkeyGroup;
combo: string;
scope: 'global' | 'app';
fixed?: true;
};
+// The groups in the order the editor lists them.
+export const HOTKEY_GROUPS: HotkeyGroup[] = ['general', 'workItems'];
+
// A combo is written as lowercase tokens joined by '+': the modifiers 'mod'
// (⌘ on macOS, Ctrl elsewhere), 'shift' and 'alt', then the key. The key 'digit'
// stands for the digits 1–9 and is only used by the positional project switch.
export const HOTKEYS: HotkeyDef[] = [
{
id: 'palette.toggle',
- label: 'Open the command palette',
- group: 'General',
+ group: 'general',
combo: 'mod+k',
scope: 'global',
},
{
id: 'project.switch',
- label: 'Switch to project 1–9',
- group: 'General',
+ group: 'general',
combo: 'mod+digit',
scope: 'global',
fixed: true,
@@ -58,29 +62,26 @@ export const HOTKEYS: HotkeyDef[] = [
// rebindable for that reason.
{
id: 'sidebar.toggle',
- label: 'Show or hide the sidebar',
- group: 'General',
+ group: 'general',
combo: 'mod+b',
scope: 'global',
fixed: true,
},
- { id: 'issue.new', label: 'New issue', group: 'General', combo: 'n', scope: 'app' },
- { id: 'project.new', label: 'New project', group: 'General', combo: 'b', scope: 'app' },
+ { id: 'issue.new', group: 'general', combo: 'n', scope: 'app' },
+ { id: 'project.new', group: 'general', combo: 'b', scope: 'app' },
{
id: 'project.settings',
- label: 'Open project settings',
- group: 'General',
+ group: 'general',
combo: 's',
scope: 'app',
},
- { id: 'view.kanban', label: 'Board layout', group: 'Work items', combo: '1', scope: 'app' },
- { id: 'view.table', label: 'Table layout', group: 'Work items', combo: '2', scope: 'app' },
- { id: 'view.timeline', label: 'Timeline layout', group: 'Work items', combo: '3', scope: 'app' },
- { id: 'view.calendar', label: 'Calendar layout', group: 'Work items', combo: '4', scope: 'app' },
+ { id: 'view.kanban', group: 'workItems', combo: '1', scope: 'app' },
+ { id: 'view.table', group: 'workItems', combo: '2', scope: 'app' },
+ { id: 'view.timeline', group: 'workItems', combo: '3', scope: 'app' },
+ { id: 'view.calendar', group: 'workItems', combo: '4', scope: 'app' },
{
id: 'board.select-all',
- label: 'Select all issues on the board',
- group: 'Work items',
+ group: 'workItems',
combo: 'mod+a',
scope: 'app',
},
diff --git a/apps/web/src/utils/initiativeMeta.ts b/apps/web/src/utils/initiativeMeta.ts
index 211dabfd..dde666f9 100644
--- a/apps/web/src/utils/initiativeMeta.ts
+++ b/apps/web/src/utils/initiativeMeta.ts
@@ -1,14 +1,16 @@
import type { InitiativeStatus, InitiativeHealth } from '@/lib/api';
// Display metadata for the initiative status lifecycle and the derived health
-// signal. Colors are raw hex so they can drive both a dot and a text color.
+// signal. Colors are raw hex so they can drive both a dot and a text color. The
+// label of a status is a message under `initiatives.status`, of a health signal
+// under `initiatives.health`.
-export const STATUS_META: Record<InitiativeStatus, { label: string; color: string }> = {
- proposed: { label: 'Proposed', color: '#a1a1aa' },
- planned: { label: 'Planned', color: '#6366f1' },
- active: { label: 'Active', color: '#eab308' },
- completed: { label: 'Completed', color: '#22c55e' },
- canceled: { label: 'Canceled', color: '#ef4444' },
+export const STATUS_META: Record<InitiativeStatus, { color: string }> = {
+ proposed: { color: '#a1a1aa' },
+ planned: { color: '#6366f1' },
+ active: { color: '#eab308' },
+ completed: { color: '#22c55e' },
+ canceled: { color: '#ef4444' },
};
// The lifecycle order used by the status picker and the list tabs.
@@ -20,13 +22,14 @@ export const STATUS_ORDER: InitiativeStatus[] = [
'canceled',
];
-// Health (computed server-side). null means there is nothing to judge yet.
-export const HEALTH_META: Record<InitiativeHealth, { label: string; color: string }> = {
- on_track: { label: 'On track', color: '#22c55e' },
- at_risk: { label: 'At risk', color: '#eab308' },
- off_track: { label: 'Off track', color: '#ef4444' },
+// Health (computed server-side). null means there is nothing to judge yet, and
+// carries the muted color of an unknown value.
+export const HEALTH_META: Record<InitiativeHealth, { color: string }> = {
+ on_track: { color: '#22c55e' },
+ at_risk: { color: '#eab308' },
+ off_track: { color: '#ef4444' },
};
-export function healthMeta(health: InitiativeHealth | null): { label: string; color: string } {
- return health ? HEALTH_META[health] : { label: 'No update', color: '#a1a1aa' };
+export function healthColor(health: InitiativeHealth | null): string {
+ return health ? HEALTH_META[health].color : '#a1a1aa';
}
diff --git a/apps/web/src/utils/issueLinks.ts b/apps/web/src/utils/issueLinks.ts
index f3ddbe20..b181b16b 100644
--- a/apps/web/src/utils/issueLinks.ts
+++ b/apps/web/src/utils/issueLinks.ts
@@ -4,15 +4,8 @@ import type { BoardIssue, IssueLink, IssueLinkInputKind, IssueLinkKind } from '@
// A relation reads differently from each of its two ends, and both the panel and
// the activity feed name it from the end being looked at. That reading is the
// IssueLinkInputKind — the same vocabulary the API takes when a relation is
-// created, so the picker's options are these too.
-
-export const LINK_RELATION_LABELS: Record<IssueLinkInputKind, string> = {
- blocked_by: 'Blocked by',
- blocks: 'Blocks',
- duplicates: 'Duplicates',
- duplicated_by: 'Duplicated by',
- relates: 'Related',
-};
+// created, so the picker's options are these too. The name of a relation is a
+// message under `issueLinks.relations` (see useLinkRelationLabel).
// Icon per relation. The two duplicate readings share one icon; the label next
// to it separates them.
@@ -37,18 +30,13 @@ export const LINK_RELATIONS: IssueLinkInputKind[] = [
// issue cannot duplicate anything, so the two duplicate readings are left out.
export const CREATE_LINK_RELATIONS: IssueLinkInputKind[] = ['blocked_by', 'blocks', 'relates'];
-// The same relations as a sentence fragment, for the activity feed and the
-// picker's prompt. The feed stores the relation as the entry's subject.
-export const LINK_RELATION_PHRASES: Record<IssueLinkInputKind, string> = {
- blocked_by: 'blocked by',
- blocks: 'blocking',
- duplicates: 'a duplicate of',
- duplicated_by: 'duplicated by',
- relates: 'related to',
-};
-
-export function linkPhrase(subject: string | null): string {
- return (subject && LINK_RELATION_PHRASES[subject as IssueLinkInputKind]) || 'linked to';
+// Whether an activity entry's subject names a relation. The feed stores the
+// relation there, and reads it as a sentence fragment ("marked this issue as
+// blocked by IAP-3") rather than the noun the panel heads a group with: the
+// phrases are messages under `issueLinks.phrases`, the nouns under
+// `issueLinks.relations` (see useLinkRelationLabel).
+export function isLinkRelation(subject: string | null): subject is IssueLinkInputKind {
+ return subject != null && LINK_RELATIONS.includes(subject as IssueLinkInputKind);
}
// How the relation reads from the issue the link was loaded for. The source side
diff --git a/apps/web/src/utils/messageKey.ts b/apps/web/src/utils/messageKey.ts
new file mode 100644
index 00000000..459839a1
--- /dev/null
+++ b/apps/web/src/utils/messageKey.ts
@@ -0,0 +1,9 @@
+import type { useTranslations } from 'next-intl';
+
+// A translator read as a plain string lookup. Message keys are typed against the
+// English catalogue (see global.d.ts), which cannot express a key composed from a
+// runtime value — a section slug, a field name, a layout id. Reading through this
+// gives up that check for those lookups only.
+export function byKey(t: ReturnType<typeof useTranslations>) {
+ return t as unknown as (key: string, values?: Record<string, string | number>) => string;
+}
diff --git a/apps/web/src/utils/permissions.ts b/apps/web/src/utils/permissions.ts
index 8bdd5d5a..87c9239d 100644
--- a/apps/web/src/utils/permissions.ts
+++ b/apps/web/src/utils/permissions.ts
@@ -1,43 +1,5 @@
import type { PermissionAction, PermissionResource } from '@/lib/api';
-// Human labels for the permission matrix. A resource/action not listed falls back
-// to its prettified slug.
-const RESOURCE_LABELS: Record<string, string> = {
- work_items: 'Work items',
- initiatives: 'Initiatives',
- cycles: 'Cycles',
- dashboards: 'Dashboards',
- views: 'Work item views',
- members_invite: 'Invites',
- members_manage: 'Members',
- states: 'States',
- issue_types: 'Issue types',
- labels: 'Labels',
- ai_agents: 'AI agents',
- integrations: 'Integrations',
- agent_skills: 'Agent skills',
- agent_tools: 'Agent tools',
- custom_fields: 'Custom fields',
- workflow_config: 'Workflow configuration',
- actions: 'Actions',
- webhooks: 'Webhooks',
- note_boards: 'Note boards',
- danger_zone: 'Danger zone',
-};
-
-const ACTION_LABELS: Record<string, string> = {
- create: 'Create',
- edit: 'Edit',
- read: 'Read',
- delete: 'Delete',
-};
-
-const prettify = (slug: string) => slug.replace(/_/g, ' ');
-
-export const resourceLabel = (resource: PermissionResource) =>
- RESOURCE_LABELS[resource] ?? prettify(resource);
-export const actionLabel = (action: PermissionAction) => ACTION_LABELS[action] ?? prettify(action);
-
// Column display order for the permission matrix. An action not listed (one added
// on the API) sorts to the end, keeping its catalog order.
export const ACTION_ORDER: PermissionAction[] = ['read', 'create', 'edit', 'delete'];
@@ -51,18 +13,19 @@ export function orderActions(actions: PermissionAction[]): PermissionAction[] {
}
export interface PermissionGroup {
- title: string;
+ // The key of the group's title in messages (permissions.groups).
+ key: string;
resources: PermissionResource[];
}
// The resources shown together in the role editor. Ordering is display order.
const GROUP_DEFS: PermissionGroup[] = [
- { title: 'Work items', resources: ['work_items', 'initiatives', 'cycles', 'views'] },
- { title: 'Dashboards', resources: ['dashboards'] },
- { title: 'Notes', resources: ['note_boards'] },
- { title: 'AI', resources: ['ai_agents', 'integrations', 'agent_skills', 'agent_tools'] },
+ { key: 'workItems', resources: ['work_items', 'initiatives', 'cycles', 'views'] },
+ { key: 'dashboards', resources: ['dashboards'] },
+ { key: 'notes', resources: ['note_boards'] },
+ { key: 'ai', resources: ['ai_agents', 'integrations', 'agent_skills', 'agent_tools'] },
{
- title: 'Configuration',
+ key: 'configuration',
resources: [
'states',
'issue_types',
@@ -73,8 +36,8 @@ const GROUP_DEFS: PermissionGroup[] = [
'webhooks',
],
},
- { title: 'Members', resources: ['members_manage', 'members_invite'] },
- { title: 'Project', resources: ['danger_zone'] },
+ { key: 'members', resources: ['members_manage', 'members_invite'] },
+ { key: 'project', resources: ['danger_zone'] },
];
// Order the catalog's resources into display groups. A resource not covered by
@@ -84,10 +47,10 @@ export function groupResources(resources: PermissionResource[]): PermissionGroup
const present = new Set(resources);
const known = new Set(GROUP_DEFS.flatMap((g) => g.resources));
const groups = GROUP_DEFS.map((g) => ({
- title: g.title,
+ key: g.key,
resources: g.resources.filter((r) => present.has(r)),
})).filter((g) => g.resources.length > 0);
const other = resources.filter((r) => !known.has(r));
- if (other.length) groups.push({ title: 'Other', resources: other });
+ if (other.length) groups.push({ key: 'other', resources: other });
return groups;
}
diff --git a/apps/web/src/utils/project.ts b/apps/web/src/utils/project.ts
index 9f717407..ce5546cf 100644
--- a/apps/web/src/utils/project.ts
+++ b/apps/web/src/utils/project.ts
@@ -15,7 +15,7 @@ import type {
NewIssueInput,
} from '@/lib/api';
import { CYCLE_STATUS_META } from '@/utils/cycleMeta';
-import { PRIORITIES, PRIORITY_RANK } from '@/utils/fieldOptions';
+import { PRIORITY_ORDER, PRIORITY_RANK } from '@/utils/fieldOptions';
import type { GroupField, ViewSettings } from '@/utils/viewSettings';
import type { Sort } from '@/utils/viewTypes';
@@ -184,10 +184,27 @@ export interface IssueGroup {
assign: IssuePatch | null;
}
+// The names a grouping needs beyond the project's own entities: the "No …" group
+// of each nullable field, and the priority values. Supplied by useGroupLabels so
+// they read in the reader's language.
+export interface GroupLabels {
+ noAssignee: string;
+ noDelegate: string;
+ noPriority: string;
+ noType: string;
+ noInitiative: string;
+ noCycle: string;
+ priority: (value: string) => string;
+}
+
// The groups for a project under the chosen grouping field, in display order.
// Includes a trailing "No …" group for the nullable fields so an unset issue
// still has a home (and a drop target that clears the field).
-export function buildGroups(project: ProjectDetail, group: GroupField): IssueGroup[] {
+export function buildGroups(
+ project: ProjectDetail,
+ group: GroupField,
+ labels: GroupLabels,
+): IssueGroup[] {
switch (group) {
case 'status':
return project.columns.map((c) => ({
@@ -206,7 +223,7 @@ export function buildGroups(project: ProjectDetail, group: GroupField): IssueGro
name: a.name,
assign: { assigneeUserId: a.userId },
})),
- { key: 'a-none', name: 'No assignee', assign: { assigneeUserId: null } },
+ { key: 'a-none', name: labels.noAssignee, assign: { assigneeUserId: null } },
];
case 'delegate':
return [
@@ -217,16 +234,16 @@ export function buildGroups(project: ProjectDetail, group: GroupField): IssueGro
name: a.name,
assign: { delegateUserId: a.userId },
})),
- { key: 'd-none', name: 'No delegate', assign: { delegateUserId: null } },
+ { key: 'd-none', name: labels.noDelegate, assign: { delegateUserId: null } },
];
case 'priority':
return [
- ...PRIORITIES.map((p) => ({
- key: `p${p.value}`,
- name: p.label,
- assign: { priority: p.value },
+ ...PRIORITY_ORDER.map((value) => ({
+ key: `p${value}`,
+ name: labels.priority(value),
+ assign: { priority: value },
})),
- { key: 'p-none', name: 'No priority', assign: { priority: null } },
+ { key: 'p-none', name: labels.noPriority, assign: { priority: null } },
];
case 'type':
return [
@@ -236,7 +253,7 @@ export function buildGroups(project: ProjectDetail, group: GroupField): IssueGro
color: t.color,
assign: { typeId: t.id },
})),
- { key: 't-none', name: 'No type', assign: { typeId: null } },
+ { key: 't-none', name: labels.noType, assign: { typeId: null } },
];
case 'initiative': {
// Lanes come from the initiatives the loaded issues are linked to (each issue
@@ -248,7 +265,10 @@ export function buildGroups(project: ProjectDetail, group: GroupField): IssueGro
const options = [...seen.entries()]
.sort((a, b) => a[1].localeCompare(b[1]))
.map(([id, title]) => ({ key: `i${id}`, name: title, assign: { initiativeId: id } }));
- return [...options, { key: 'i-none', name: 'No initiative', assign: { initiativeId: null } }];
+ return [
+ ...options,
+ { key: 'i-none', name: labels.noInitiative, assign: { initiativeId: null } },
+ ];
}
case 'cycle': {
// A column per cycle the board plans into — the unfinished ones the project
@@ -271,7 +291,7 @@ export function buildGroups(project: ProjectDetail, group: GroupField): IssueGro
color: CYCLE_STATUS_META[c.status].color,
assign: { cycleId: c.id },
})),
- { key: 'y-none', name: 'No cycle', assign: { cycleId: null } },
+ { key: 'y-none', name: labels.noCycle, assign: { cycleId: null } },
];
}
case 'none':
diff --git a/apps/web/src/utils/projectFeatures.ts b/apps/web/src/utils/projectFeatures.ts
index 9d9c900f..c2ab293d 100644
--- a/apps/web/src/utils/projectFeatures.ts
+++ b/apps/web/src/utils/projectFeatures.ts
@@ -1,18 +1,5 @@
import type { Project, ProjectFeatures } from '@/lib/api';
-// What each optional section is called. Shared by the switches that turn a section
-// off, their confirmation, and the notice the section shows while it is off, so it
-// is named the same everywhere.
-export const FEATURE_LABEL: Record<keyof ProjectFeatures, string> = {
- initiatives: 'Initiatives',
- cycles: 'Cycles',
- dashboards: 'Dashboards',
- notes: 'Notes',
- subtasks: 'Subtasks',
- checklists: 'Checklists',
- issueStats: 'Issue stats',
-};
-
// The project's flags read as the feature set the rest of the app checks. Without
// a project every section reads as off.
export function projectFeatures(project: Project | null): ProjectFeatures {
diff --git a/apps/web/src/utils/projectPresets.ts b/apps/web/src/utils/projectPresets.ts
index 6534d917..b8e3da3b 100644
--- a/apps/web/src/utils/projectPresets.ts
+++ b/apps/web/src/utils/projectPresets.ts
@@ -13,15 +13,15 @@ export type PresetKey =
| 'support'
| 'recruiting';
+// The name of a preset is a message under `newProject.presets`; the type names are
+// what the project is seeded with, so they are values, not display text.
export const PRESETS: {
key: PresetKey;
- label: string;
types: { name: string; color: string }[];
}[] = [
- { key: 'general', label: 'General', types: [{ name: 'Task', color: '#0ea5e9' }] },
+ { key: 'general', types: [{ name: 'Task', color: '#0ea5e9' }] },
{
key: 'software',
- label: 'Software',
types: [
{ name: 'Feature', color: '#8b5cf6' },
{ name: 'Bug', color: '#e11d48' },
@@ -32,7 +32,6 @@ export const PRESETS: {
},
{
key: 'product',
- label: 'Product',
types: [
{ name: 'Epic', color: '#8b5cf6' },
{ name: 'Feature', color: '#0ea5e9' },
@@ -42,7 +41,6 @@ export const PRESETS: {
},
{
key: 'content',
- label: 'Content',
types: [
{ name: 'Article', color: '#0ea5e9' },
{ name: 'Video', color: '#e11d48' },
@@ -53,7 +51,6 @@ export const PRESETS: {
},
{
key: 'marketing',
- label: 'Marketing',
types: [
{ name: 'Campaign', color: '#8b5cf6' },
{ name: 'Landing', color: '#0ea5e9' },
@@ -64,7 +61,6 @@ export const PRESETS: {
},
{
key: 'design',
- label: 'Design',
types: [
{ name: 'Screen', color: '#0ea5e9' },
{ name: 'Component', color: '#8b5cf6' },
@@ -74,7 +70,6 @@ export const PRESETS: {
},
{
key: 'sales',
- label: 'Sales',
types: [
{ name: 'Lead', color: '#0ea5e9' },
{ name: 'Deal', color: '#22c55e' },
@@ -84,7 +79,6 @@ export const PRESETS: {
},
{
key: 'operations',
- label: 'Operations',
types: [
{ name: 'Request', color: '#0ea5e9' },
{ name: 'Process', color: '#8b5cf6' },
@@ -94,7 +88,6 @@ export const PRESETS: {
},
{
key: 'support',
- label: 'Support',
types: [
{ name: 'Incident', color: '#e11d48' },
{ name: 'Request', color: '#0ea5e9' },
@@ -104,7 +97,6 @@ export const PRESETS: {
},
{
key: 'recruiting',
- label: 'Recruiting',
types: [
{ name: 'Candidate', color: '#0ea5e9' },
{ name: 'Onboarding', color: '#22c55e' },
diff --git a/apps/web/src/utils/settingsSections.ts b/apps/web/src/utils/settingsSections.ts
index ac2e9b88..d1527af1 100644
--- a/apps/web/src/utils/settingsSections.ts
+++ b/apps/web/src/utils/settingsSections.ts
@@ -31,11 +31,10 @@ export type SettingsGroup = 'general' | 'configuration' | 'automation' | 'ai' |
// components live in features/settings/components and take { project }. `resource`
// is the permission resource that gates the section: read to view it, and the
// create/edit/delete actions gate the controls inside. `group` places it in the
-// sidebar (see CONFIGURATION_SECTIONS / AUTOMATION_SECTIONS).
+// sidebar (see CONFIGURATION_SECTIONS / AUTOMATION_SECTIONS). The name and the
+// blurb of a section are messages under `sections.settings`.
export type SettingsSection = {
slug: string;
- label: string;
- description: string;
icon: LucideIcon;
resource: PermissionResource;
group: SettingsGroup;
@@ -44,89 +43,66 @@ export type SettingsSection = {
export const SETTINGS_SECTIONS: SettingsSection[] = [
{
slug: 'general',
- label: 'General',
- description: "The project's name, description, and the sections it shows.",
icon: Info,
resource: 'danger_zone',
group: 'general',
},
{
slug: 'notifications',
- label: 'Notification providers',
- description:
- 'The email (SMTP or Resend) and Telegram bot credentials this project delivers notifications through.',
icon: Bell,
resource: 'danger_zone',
group: 'general',
},
{
slug: 'states',
- label: 'States',
- description: 'The workflow states issues move through, each shown as a column.',
icon: Columns3,
resource: 'states',
group: 'configuration',
},
{
slug: 'issue-types',
- label: 'Issue types',
- description: 'The kinds of issues this project can hold, each with its own fields.',
icon: Shapes,
resource: 'issue_types',
group: 'configuration',
},
{
slug: 'labels',
- label: 'Labels',
- description: 'Tags for organizing and filtering issues across the project.',
icon: Tags,
resource: 'labels',
group: 'configuration',
},
{
slug: 'custom-fields',
- label: 'Custom fields',
- description: 'Extra fields shown on issues, global or scoped to an issue type.',
icon: ListPlus,
resource: 'custom_fields',
group: 'configuration',
},
{
slug: 'configuration',
- label: 'Configuration',
- description: 'How subtasks close with their parent, and when stale issues are archived.',
icon: SlidersHorizontal,
resource: 'workflow_config',
group: 'configuration',
},
{
slug: 'actions',
- label: 'Actions',
- description: 'Buttons on an issue that set fields in one click.',
icon: Zap,
resource: 'actions',
group: 'automation',
},
{
slug: 'schedules',
- label: 'Schedules',
- description: 'Run agent tasks on a recurring schedule.',
icon: Clock3,
resource: 'ai_agents',
group: 'ai-team',
},
{
slug: 'webhooks',
- label: 'Webhooks',
- description: 'Send project events to external URLs, signed with a per-webhook secret.',
icon: Webhook,
resource: 'webhooks',
group: 'automation',
},
{
slug: 'github',
- label: 'GitHub',
- description: 'Close issues automatically when their pull requests merge on GitHub.',
icon: Github,
resource: 'integrations',
group: 'automation',
@@ -138,8 +114,6 @@ export const SETTINGS_SECTIONS: SettingsSection[] = [
// resource. They sit in the "Configure" item of the main sidebar's AI Team group.
export const AI_AGENTS_SECTION: SettingsSection = {
slug: 'ai-agents',
- label: 'Agents',
- description: 'Bot users you can delegate issues to.',
icon: Bot,
resource: 'ai_agents',
group: 'ai',
@@ -147,9 +121,6 @@ export const AI_AGENTS_SECTION: SettingsSection = {
export const INTEGRATIONS_SECTION: SettingsSection = {
slug: 'integrations',
- label: 'Integrations',
- description:
- 'Credentials your agents use to reach AI providers and tools. Stored encrypted and never shown again.',
icon: KeyRound,
resource: 'integrations',
group: 'ai',
@@ -157,8 +128,6 @@ export const INTEGRATIONS_SECTION: SettingsSection = {
export const AGENT_SKILLS_SECTION: SettingsSection = {
slug: 'agent-skills',
- label: 'Skills',
- description: 'Reusable instructions internal agents load on demand.',
icon: BookText,
resource: 'agent_skills',
group: 'ai',
@@ -166,8 +135,6 @@ export const AGENT_SKILLS_SECTION: SettingsSection = {
export const AGENT_TOOLS_SECTION: SettingsSection = {
slug: 'agent-tools',
- label: 'Tools',
- description: 'Tools agents can call, each connected to an integration credential.',
icon: Wrench,
resource: 'agent_tools',
group: 'ai',
diff --git a/apps/web/src/utils/viewSettings.ts b/apps/web/src/utils/viewSettings.ts
index 0e70dac2..2230569a 100644
--- a/apps/web/src/utils/viewSettings.ts
+++ b/apps/web/src/utils/viewSettings.ts
@@ -44,22 +44,23 @@ export const customFieldId = (key: CustomFieldKey): number => Number(key.slice(3
// Every display property, in the canonical order they render (left to right on a
// card, and as Table columns after the title). Used to render the property
-// toggles and to keep column order stable regardless of toggle order.
-export const DISPLAY_PROPERTIES: { value: DisplayProperty; label: string }[] = [
- { value: 'id', label: 'ID' },
- { value: 'status', label: 'State' },
- { value: 'priority', label: 'Priority' },
- { value: 'type', label: 'Type' },
- { value: 'assignee', label: 'Assignee' },
- { value: 'delegate', label: 'Delegate' },
- { value: 'initiative', label: 'Initiative' },
- { value: 'cycle', label: 'Cycle' },
- { value: 'labels', label: 'Labels' },
- { value: 'startDate', label: 'Start date' },
- { value: 'dueDate', label: 'Due date' },
- { value: 'created', label: 'Created' },
- { value: 'updated', label: 'Updated' },
- { value: 'statusAge', label: 'Time in status' },
+// toggles and to keep column order stable regardless of toggle order. The name of
+// a property is a message under `display.properties`.
+export const DISPLAY_PROPERTIES: DisplayProperty[] = [
+ 'id',
+ 'status',
+ 'priority',
+ 'type',
+ 'assignee',
+ 'delegate',
+ 'initiative',
+ 'cycle',
+ 'labels',
+ 'startDate',
+ 'dueDate',
+ 'created',
+ 'updated',
+ 'statusAge',
];
// The grouping fields and display properties that name an optional section's
@@ -82,10 +83,8 @@ export function isFieldEnabled(
}
// The display properties a project offers, without the ones whose section is off.
-export function offeredDisplayProperties(
- features: ProjectFeatures,
-): { value: DisplayProperty; label: string }[] {
- return DISPLAY_PROPERTIES.filter((p) => isFieldEnabled(p.value, features));
+export function offeredDisplayProperties(features: ProjectFeatures): DisplayProperty[] {
+ return DISPLAY_PROPERTIES.filter((p) => isFieldEnabled(p, features));
}
// Timeline zoom: how much horizontal space one day gets, which sets whether day
@@ -196,7 +195,7 @@ const GROUP_FIELDS: GroupField[] = [
'initiative',
'cycle',
];
-const DISPLAY_VALUES = DISPLAY_PROPERTIES.map((p) => p.value);
+const DISPLAY_VALUES: string[] = DISPLAY_PROPERTIES;
const TIMELINE_SCALES: TimelineScale[] = ['week', 'month', 'quarter'];
function normalizeSort(sort: unknown): Sort | null {
@@ -271,8 +270,7 @@ export function normalizeViewSettings(
properties: Array.isArray(s.properties)
? (s.properties as unknown[]).filter(
(p): p is PropertyKey =>
- typeof p === 'string' &&
- ((DISPLAY_VALUES as string[]).includes(p) || isCustomFieldKey(p)),
+ typeof p === 'string' && (DISPLAY_VALUES.includes(p) || isCustomFieldKey(p)),
)
: d.properties,
timelineScale: TIMELINE_SCALES.includes(s.timelineScale as TimelineScale)
diff --git a/apps/web/src/utils/viewTypes.ts b/apps/web/src/utils/viewTypes.ts
index d9ddacd6..dcd6084e 100644
--- a/apps/web/src/utils/viewTypes.ts
+++ b/apps/web/src/utils/viewTypes.ts
@@ -33,25 +33,26 @@ export type WorkItemsView = 'kanban' | 'table' | 'timeline' | 'calendar';
// Each layout names its hotkey id rather than a key, so the switcher, the global
// key layer and the command palette all read the same binding (see lib/hotkeys).
-export const VIEWS: { value: WorkItemsView; label: string; icon: LucideIcon; hotkey: HotkeyId }[] =
- [
- { value: 'kanban', label: 'Kanban', icon: Columns3, hotkey: 'view.kanban' },
- { value: 'table', label: 'Table', icon: Table2, hotkey: 'view.table' },
- { value: 'timeline', label: 'Timeline', icon: GanttChart, hotkey: 'view.timeline' },
- { value: 'calendar', label: 'Calendar', icon: CalendarDays, hotkey: 'view.calendar' },
- ];
+// The name of a layout is a message under `display.layouts`.
+export const VIEWS: { value: WorkItemsView; icon: LucideIcon; hotkey: HotkeyId }[] = [
+ { value: 'kanban', icon: Columns3, hotkey: 'view.kanban' },
+ { value: 'table', icon: Table2, hotkey: 'view.table' },
+ { value: 'timeline', icon: GanttChart, hotkey: 'view.timeline' },
+ { value: 'calendar', icon: CalendarDays, hotkey: 'view.calendar' },
+];
-// Fields the project can be ordered by, in the order shown in the menu.
-export const SORT_FIELDS: { value: SortField; label: string }[] = [
- { value: 'manual', label: 'Manual' },
- { value: 'title', label: 'Title' },
- { value: 'identifier', label: 'Issue number' },
- { value: 'status', label: 'State' },
- { value: 'priority', label: 'Priority' },
- { value: 'assignee', label: 'Assignee' },
- { value: 'type', label: 'Type' },
- { value: 'startDate', label: 'Start date' },
- { value: 'dueDate', label: 'Due date' },
- { value: 'created', label: 'Created' },
- { value: 'updated', label: 'Updated' },
+// Fields the project can be ordered by, in the order shown in the menu. The name
+// of a field is a message under `display.sortFields`.
+export const SORT_FIELDS: SortField[] = [
+ 'manual',
+ 'title',
+ 'identifier',
+ 'status',
+ 'priority',
+ 'assignee',
+ 'type',
+ 'startDate',
+ 'dueDate',
+ 'created',
+ 'updated',
];
diff --git a/bun.lock b/bun.lock
index c4e26630..c3aef21c 100644
--- a/bun.lock
+++ b/bun.lock
@@ -106,6 +106,7 @@
"lucide-react": "^0.474.0",
"marked": "^18.0.5",
"next": "^15.1.6",
+ "next-intl": "^4.13.6",
"next-themes": "^0.4.6",
"radix-ui": "^1.6.2",
"react": "^19.0.0",
@@ -495,6 +496,14 @@
"@floating-ui/vue": ["@floating-ui/[email protected]", "", { "dependencies": { "@floating-ui/dom": "^1.7.4", "@floating-ui/utils": "^0.2.10", "vue-demi": ">=0.13.0" } }, "sha512-BfNqNW6KA83Nexspgb9DZuz578R7HT8MZw1CfK9I6Ah4QReNWEJsXWHN+SdmOVLNGmTPDi+fDT535Df5PzMLbQ=="],
+ "@formatjs/fast-memoize": ["@formatjs/[email protected]", "", {}, "sha512-zXfhLpvA6T7+efdt9JLbBwZ00tT7NsBMDVnDu8rpHeNNv8KfRZAMo2gkG0k9lK/Nzc//3kJ9pImsfuJxk3KhUA=="],
+
+ "@formatjs/icu-messageformat-parser": ["@formatjs/[email protected]", "", { "dependencies": { "@formatjs/icu-skeleton-parser": "2.1.11" } }, "sha512-kl6b/4D56gjGZi4ZewSmvXbalHwjOUI5ogEHPZqw42goeXTTrL7/yuPzvdrvr0QigDtvaOeb+UeMf62jks43Yg=="],
+
+ "@formatjs/icu-skeleton-parser": ["@formatjs/[email protected]", "", {}, "sha512-j8cUmOJzVgkHuS0QiQ6ga76UIoLOFSAMWhs7aZJztH3aAdCOAE6vpC8KVvFB4cU10ON0y2/5oOVmPJ43s2lTwA=="],
+
+ "@formatjs/intl-localematcher": ["@formatjs/[email protected]", "", { "dependencies": { "@formatjs/fast-memoize": "3.1.7" } }, "sha512-kHEAFOkeJSPNi7c5PaKaRjxcBrJwzzt81ifUu+8uve1EDW/VJl83KsxmqgqNZLzcFEhSliZGvx3+pk/RH0IOmg=="],
+
"@grammyjs/types": ["@grammyjs/[email protected]", "", {}, "sha512-Z8lDLTvOlo12e5Vnly/vQh3JC9ppaitS1dGZ3w068gNitOd/y8tTSiib+Xm38aBGbtYGmUZwOc6afYrLs2CSTg=="],
"@headlessui/tailwindcss": ["@headlessui/[email protected]", "", { "peerDependencies": { "tailwindcss": "^3.0 || ^4.0" } }, "sha512-xNe42KjdyA4kfUKLLPGzME9zkH7Q3rOZ5huFihWNWOQFxnItxPB3/67yBI8/qBfY8nwBRx5GHn4VprsoluVMGw=="],
@@ -651,6 +660,32 @@
"@opentelemetry/semantic-conventions": ["@opentelemetry/[email protected]", "", {}, "sha512-eSYWTm620tTk45EKSedaUL8MFYI8hW164hIXsgIHyxu3VobUB3fFCu5t0hQby6OoWRPsG1KkKUG2M5UadiLiVg=="],
+ "@parcel/watcher": ["@parcel/[email protected]", "", { "dependencies": { "detect-libc": "^2.0.3", "is-glob": "^4.0.3", "node-addon-api": "^7.0.0", "picomatch": "^4.0.4" }, "optionalDependencies": { "@parcel/watcher-android-arm64": "2.6.0", "@parcel/watcher-darwin-arm64": "2.6.0", "@parcel/watcher-darwin-x64": "2.6.0", "@parcel/watcher-freebsd-x64": "2.6.0", "@parcel/watcher-linux-arm-glibc": "2.6.0", "@parcel/watcher-linux-arm-musl": "2.6.0", "@parcel/watcher-linux-arm64-glibc": "2.6.0", "@parcel/watcher-linux-arm64-musl": "2.6.0", "@parcel/watcher-linux-x64-glibc": "2.6.0", "@parcel/watcher-linux-x64-musl": "2.6.0", "@parcel/watcher-win32-arm64": "2.6.0", "@parcel/watcher-win32-x64": "2.6.0" } }, "sha512-7FNeNl8NCE7aINx7WXiKQrPYZWC/hvrTsmk6zmxbI7LTXE7hVek/n8AfVgpe2y82zl3w0HvCHN0bVKMBoJcC0w=="],
+
+ "@parcel/watcher-android-arm64": ["@parcel/[email protected]", "", { "os": "android", "cpu": "arm64" }, "sha512-trgpLSCKRC/huFjXX/Smh+0sWe4+YtKfktIToiMl59ghz7z+qkH6kMvNnUbLyRs9N11t8l4svSCs1+5B3rOAhA=="],
+
+ "@parcel/watcher-darwin-arm64": ["@parcel/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Y3QV0gl7Q1zbfueunkWIERICbEojQFCgpyG7YqOGNFLsckXyI1xu9mAIUpKY9QBYzBtSkN8dBPwd3yiAO9ovMw=="],
+
+ "@parcel/watcher-darwin-x64": ["@parcel/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-Ohv6OpzhUfKYD7Beb8kDvG0jbIxORCYY1JRdZnaBtnjjkJxgD7ZVL0nw2sCYd0yTMKTvz3nnTnOF3cDifK+kvw=="],
+
+ "@parcel/watcher-freebsd-x64": ["@parcel/[email protected]", "", { "os": "freebsd", "cpu": "x64" }, "sha512-5HmXvDgs8VK+74jF9y9/2FE3/OnlcKmc56tjmSrEuZjpSZOGL+fvAu+HKJBdPs9uwoP2hE6TlSUpXZ/C5jUFmQ=="],
+
+ "@parcel/watcher-linux-arm-glibc": ["@parcel/[email protected]", "", { "os": "linux", "cpu": "arm" }, "sha512-Ps/hui3A+vMbjdqlqAowK2ZL8+BO8dBjxeWXj6npTBs3jx4wWmbPpaLuqwrQrSqIVMCnpWo238bJ1U37GhQOYg=="],
+
+ "@parcel/watcher-linux-arm-musl": ["@parcel/[email protected]", "", { "os": "linux", "cpu": "arm" }, "sha512-9c6AUHgHoG+IY88MRIHupztQiQnrbqHYQjkM2btA+Bf/wQnQMuiD0Wfk1EVv3TlNT3x41uU71rn6E4xh/+zvkw=="],
+
+ "@parcel/watcher-linux-arm64-glibc": ["@parcel/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-yHRqS2owEXe6Hic9z6Mh1ECsCd+ODVOGvZDyciqRd21+v+o+DnXMOrw50DSpIG2sb8GPEaPPmfeCAWKPJdq46g=="],
+
+ "@parcel/watcher-linux-arm64-musl": ["@parcel/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-WhB2e/V7rqdHHWZusBSPuy5Ei8S6lSz6FE5TKKQz5h3a0O+C+mhY7vxU9b/stqvMb8beLnPY82ZrFTLKs+SrKA=="],
+
+ "@parcel/watcher-linux-x64-glibc": ["@parcel/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-ulGE6x6Oz6iAwg75T8YQSoguBWasniIbX+QWpaYPcCnDOpdWX3k+4xbEYPZVLxOuoJI+svJJPD3sEj8G7lrQ3A=="],
+
+ "@parcel/watcher-linux-x64-musl": ["@parcel/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-tkBYKt7YQrjIJWYDnto2YgO8MRkjlMTSNoRHzsXinBqbLdeOM3L32wPZJvIZxqaLMfSlS/4sUjH/6STVP/XDLw=="],
+
+ "@parcel/watcher-win32-arm64": ["@parcel/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-gIZAP23jaHjGWasY/TY6yL7NHFClf0Ga7FN+iINvk+KN94rhm94lYZhFsbYFNcA04/onvGD9kKmiJLJB2HbNwQ=="],
+
+ "@parcel/watcher-win32-x64": ["@parcel/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-cA+/pXV2YkfxlIcXOQ5fSWqAzzPyD78/x5qbK/I0vUkrlYHA8TIz+MXjAbGouguKVSI4bOmkTSJ1/poVSsgt+A=="],
+
"@peculiar/asn1-android": ["@peculiar/[email protected]", "", { "dependencies": { "@peculiar/asn1-schema": "^2.8.0", "asn1js": "^3.0.10", "tslib": "^2.8.1" } }, "sha512-skLbS+IOGv1lUgDqtChr8xvtvEr3HMse/JGBaL2r1J1o/n7a8wqOrovMtlRq/UXLhxvmLaONP67hwtshgzwfzA=="],
"@peculiar/asn1-cms": ["@peculiar/[email protected]", "", { "dependencies": { "@peculiar/asn1-schema": "^2.8.0", "@peculiar/asn1-x509": "^2.8.0", "@peculiar/asn1-x509-attr": "^2.8.0", "asn1js": "^3.0.10", "tslib": "^2.8.1" } }, "sha512-NgekZOrSJFSBFLFoLfwePguAWAx7z1+f2TEsWFUMyiqqfntZ4+S/S5hzqME3q4pCA0iOsFKdwiQ35dwY24eVqA=="],
@@ -869,6 +904,8 @@
"@scalar/workspace-store": ["@scalar/[email protected]", "", { "dependencies": { "@scalar/asyncapi-upgrader": "0.1.2", "@scalar/helpers": "0.9.0", "@scalar/json-magic": "0.12.17", "@scalar/openapi-upgrader": "0.2.9", "@scalar/schemas": "0.7.2", "@scalar/snippetz": "0.9.21", "@scalar/typebox": "0.1.3", "@scalar/types": "0.16.2", "@scalar/validation": "0.6.0", "js-base64": "^3.7.8", "type-fest": "^5.3.1", "vue": "^3.5.30", "yaml": "^2.8.3" } }, "sha512-qqSSq8OSxx582h/DSgMYH68iqzp+M8c9B+YGB7/qi5ZQK3TzazeCM1BVakkSbFYvD+X4FanV4V4x/aAhjv6MfQ=="],
+ "@schummar/icu-type-parser": ["@schummar/[email protected]", "", {}, "sha512-bXHSaW5jRTmke9Vd0h5P7BtWZG9Znqb8gSDxZnxaGSJnGwPLDPfS+3g0BKzeWqzgZPsIVZkM7m2tbo18cm5HBw=="],
+
"@sec-ant/readable-stream": ["@sec-ant/[email protected]", "", {}, "sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg=="],
"@shadcn/react": ["@shadcn/[email protected]", "", { "peerDependencies": { "@types/react": ">=19", "react": ">=19" }, "optionalPeers": ["@types/react", "react"] }, "sha512-5krgi3dRMKb5jH6a+qPzVJUy/54s0kKE4Rw4LjDfLqOdVQTWKUgxWf1kW8r912I0jX/Lzxqc+pgjkjWxUIK5BQ=="],
@@ -901,8 +938,38 @@
"@standard-schema/utils": ["@standard-schema/[email protected]", "", {}, "sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g=="],
+ "@swc/core": ["@swc/[email protected]", "", { "dependencies": { "@swc/counter": "^0.1.3", "@swc/types": "^0.1.27" }, "optionalDependencies": { "@swc/core-darwin-arm64": "1.15.47", "@swc/core-darwin-x64": "1.15.47", "@swc/core-linux-arm-gnueabihf": "1.15.47", "@swc/core-linux-arm64-gnu": "1.15.47", "@swc/core-linux-arm64-musl": "1.15.47", "@swc/core-linux-ppc64-gnu": "1.15.47", "@swc/core-linux-s390x-gnu": "1.15.47", "@swc/core-linux-x64-gnu": "1.15.47", "@swc/core-linux-x64-musl": "1.15.47", "@swc/core-win32-arm64-msvc": "1.15.47", "@swc/core-win32-ia32-msvc": "1.15.47", "@swc/core-win32-x64-msvc": "1.15.47" }, "peerDependencies": { "@swc/helpers": ">=0.5.17" }, "optionalPeers": ["@swc/helpers"] }, "sha512-FbsO5JcfOjfH38W/rohBRBweJeERsAuIP4f377lmkmxTcq9exjtx4SkRuZY5CdfhR2CBVwDIJegBpJDffwNsOg=="],
+
+ "@swc/core-darwin-arm64": ["@swc/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-GsoMtan3ojGGMGFbl31mmRu5ctZ56re8grGE8mO/OHJ8O+JRkzod02fe7X6ZQ8JvamA3imkEkx/h3u+vsOgPgA=="],
+
+ "@swc/core-darwin-x64": ["@swc/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-leTi7Rx3KF4zcC637iqWgk9SoV8VXAD8ppQYXsep63px5A/UftOcxLN1pmr8Z1si/YvX90ompP/rHgpYkgwXWg=="],
+
+ "@swc/core-linux-arm-gnueabihf": ["@swc/[email protected]", "", { "os": "linux", "cpu": "arm" }, "sha512-hBqHuoWKKIsKmDBn9qVeWqj5GWZhtlcczVaqQmNRXsDfq+voR5CxKRfamA367QjJXtceYuliLFfEL8QsskRM2g=="],
+
+ "@swc/core-linux-arm64-gnu": ["@swc/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-TBxvRz+B4K205TWHHZxWVxkC2RFNP/Mz3PNcECBos5PsKwxjg3QSJzdoebr0VCf0Bfh8HOPldKxAP/8XkFe9gA=="],
+
+ "@swc/core-linux-arm64-musl": ["@swc/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-3Yu3Uq/VgytqsPjTMbkPU1ExADytbdWbruJYhA584E9jrpE2Ki+R6VVPoZCeAVk1Cb7QxcRTgblw6bSa6a/R+w=="],
+
+ "@swc/core-linux-ppc64-gnu": ["@swc/[email protected]", "", { "os": "linux", "cpu": "ppc64" }, "sha512-wfdMi5IaOaNtmh2/6geRoxIdNfqylUZFdtzTKS655y1axWfIWyx7As74vv0wVdjeCIZ3WmCI9odDd4rUttXOSQ=="],
+
+ "@swc/core-linux-s390x-gnu": ["@swc/[email protected]", "", { "os": "linux", "cpu": "s390x" }, "sha512-3hHYBY0yx8Ez7GMRrkhXHQzMdR5IZA6Wq5Ee4svlgwvSECLpnAJ9+0AimEGUFDvuLwE7nV/2+PYe8+Nm4rvNcQ=="],
+
+ "@swc/core-linux-x64-gnu": ["@swc/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-TjfhjgP/jGCfFHYC3JQPhJA1HwErbIJ9JfREDc1KNkvY6P0LodCgKVIlQ5deeTbkG7ih3bF5PHJLuLpaZjdRyQ=="],
+
+ "@swc/core-linux-x64-musl": ["@swc/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-CQpS8Ge/avfjZd0UEwG/sds83Uu32deQXcV1Jo3jD0mmvQQqtYAjpsDZXugmheeAwmt+YIuoVtVHro8LMYHqsQ=="],
+
+ "@swc/core-win32-arm64-msvc": ["@swc/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-0W8IKHsUTYiT7G2RqtOoVWk+89yzZikIiDUb/sCK6BmQDBhN91hQSfyUtW12jhEWLzYgcfmisfsZrmZE+84U1A=="],
+
+ "@swc/core-win32-ia32-msvc": ["@swc/[email protected]", "", { "os": "win32", "cpu": "ia32" }, "sha512-ZIp49d2Z4/ka2jO9otOg4hDvTdPmp86kVOgS2M5FCPI7eKKZ1W0boxWn+8XeZrfERtFGW0AlMRm4JhlJa7l3NA=="],
+
+ "@swc/core-win32-x64-msvc": ["@swc/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-2h8Iek95vnixkBRCo+H8p09+Q5ll2NgSMFrWTy0iKt7+/t+8/T5mBpiT6c0ZxSS7wcWjwZ9sGZkK70tTSYHdDw=="],
+
+ "@swc/counter": ["@swc/[email protected]", "", {}, "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ=="],
+
"@swc/helpers": ["@swc/[email protected]", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g=="],
+ "@swc/types": ["@swc/[email protected]", "", { "dependencies": { "@swc/counter": "^0.1.3" } }, "sha512-V6Mnml8v09QALx6K0elJ7o9K/MkVDtW3t6L+7Ou/JcWtb3xwId2AH4FeOceySd2JaO87IMw4+6vSZxLm34LPbw=="],
+
"@tailwindcss/node": ["@tailwindcss/[email protected]", "", { "dependencies": { "@jridgewell/remapping": "^2.3.5", "enhanced-resolve": "5.21.6", "jiti": "^2.7.0", "lightningcss": "1.32.0", "magic-string": "^0.30.21", "source-map-js": "^1.2.1", "tailwindcss": "4.3.2" } }, "sha512-yWP/sqEcBLaD8JuA6zNwxoYKr75qxTioYwlRwekj5Jr/I5GXnoJfjetH/psLUIv74cYTH2lBUEzBkinthoYcBg=="],
"@tailwindcss/oxide": ["@tailwindcss/[email protected]", "", { "optionalDependencies": { "@tailwindcss/oxide-android-arm64": "4.3.2", "@tailwindcss/oxide-darwin-arm64": "4.3.2", "@tailwindcss/oxide-darwin-x64": "4.3.2", "@tailwindcss/oxide-freebsd-x64": "4.3.2", "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.2", "@tailwindcss/oxide-linux-arm64-gnu": "4.3.2", "@tailwindcss/oxide-linux-arm64-musl": "4.3.2", "@tailwindcss/oxide-linux-x64-gnu": "4.3.2", "@tailwindcss/oxide-linux-x64-musl": "4.3.2", "@tailwindcss/oxide-wasm32-wasi": "4.3.2", "@tailwindcss/oxide-win32-arm64-msvc": "4.3.2", "@tailwindcss/oxide-win32-x64-msvc": "4.3.2" } }, "sha512-z8ZgnzX8gdNoWLBLqBPoh/sjnxkwvf9ZuWjnO0l0yIzbLa5/9S+eC5QxGZKRobVHIC3/1BoMWjHblqWjcgFgag=="],
@@ -1655,6 +1722,8 @@
"iconv-lite": ["[email protected]", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ=="],
+ "icu-minify": ["[email protected]", "", { "dependencies": { "@formatjs/icu-messageformat-parser": "^3.4.0" } }, "sha512-iYZGCJZ+kX6o7GrxpVe2sOSdW86AvEqh8RQBvWeBd9jqmuABsMc2B6xongACfItLOogyIWH6GuBslNHr79OU8Q=="],
+
"identifier-regex": ["[email protected]", "", { "dependencies": { "reserved-identifiers": "^1.0.0" } }, "sha512-SLX4H/vtcYlYnL7XqnuJKHU7Z8517TgsW9nmQiGOgMCjQ8V/deLYu6bEmbGoXe7WMMhc9+EUGyFFneHja8KabA=="],
"ieee754": ["[email protected]", "", {}, "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="],
@@ -1677,6 +1746,8 @@
"internmap": ["[email protected]", "", {}, "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg=="],
+ "intl-messageformat": ["[email protected]", "", { "dependencies": { "@formatjs/fast-memoize": "3.1.7", "@formatjs/icu-messageformat-parser": "3.5.16" } }, "sha512-JaPaE6TIX+TAS5XLhDUh41geLw4QfBHX4s5pW8Km+L9fVC8HzB9yOuhbh4EMR/F1+8C6b9qk4763Cv+LdOG1kg=="],
+
"ip-address": ["[email protected]", "", {}, "sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA=="],
"ipaddr.js": ["[email protected]", "", {}, "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="],
@@ -1999,8 +2070,14 @@
"next": ["[email protected]", "", { "dependencies": { "@next/env": "15.5.20", "@swc/helpers": "0.5.15", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", "styled-jsx": "5.1.6" }, "optionalDependencies": { "@next/swc-darwin-arm64": "15.5.20", "@next/swc-darwin-x64": "15.5.20", "@next/swc-linux-arm64-gnu": "15.5.20", "@next/swc-linux-arm64-musl": "15.5.20", "@next/swc-linux-x64-gnu": "15.5.20", "@next/swc-linux-x64-musl": "15.5.20", "@next/swc-win32-arm64-msvc": "15.5.20", "@next/swc-win32-x64-msvc": "15.5.20", "sharp": "^0.34.3" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.51.1", "babel-plugin-react-compiler": "*", "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "optionalPeers": ["@opentelemetry/api", "@playwright/test", "babel-plugin-react-compiler", "sass"], "bin": { "next": "dist/bin/next" } }, "sha512-cvyS3/geydan1xLtE3FA8VCgdoQ/Gg/dlOldFkFCbB5VcVYJV7090hQLBnvTW2PwT76Z/dHdzDZCsVhZpoOlUA=="],
+ "next-intl": ["[email protected]", "", { "dependencies": { "@formatjs/intl-localematcher": "^0.8.1", "@parcel/watcher": "^2.4.1", "@swc/core": "^1.15.2", "icu-minify": "^4.13.6", "negotiator": "^1.0.0", "next-intl-swc-plugin-extractor": "^4.13.6", "po-parser": "^2.1.1", "use-intl": "^4.13.6" }, "peerDependencies": { "next": "^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0 || ^19.0.0" } }, "sha512-loS6tjWWkr/IP+EV1yXUm9URB54QmZOp4+ZsMZNmeYxY8IZxLvO2esUegnXIDxj5DpK/4BsxwDGfGhlqodpkCQ=="],
+
+ "next-intl-swc-plugin-extractor": ["[email protected]", "", {}, "sha512-M2L8jtPEAXj0CPmXbiW66THdr3OnDqA9IsU1hqv3CdxtVow3Bl9eXPdT9Opeji7L4AFrUZ016dJOs+CoTw66OA=="],
+
"next-themes": ["[email protected]", "", { "peerDependencies": { "react": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc", "react-dom": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc" } }, "sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA=="],
+ "node-addon-api": ["[email protected]", "", {}, "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ=="],
+
"node-exports-info": ["[email protected]", "", { "dependencies": { "array.prototype.flatmap": "^1.3.3", "es-errors": "^1.3.0", "object.entries": "^1.1.9", "semver": "^6.3.1" } }, "sha512-kXs9Go0cah0qHVV2v389IXQLdLCeE1xfFtjOAF+iobu0OIoG1pje8At2vMHyaPMiPMnG/LWP50twML21eMcAag=="],
"node-fetch": ["[email protected]", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" }, "optionalPeers": ["encoding"] }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="],
@@ -2087,6 +2164,8 @@
"pkce-challenge": ["[email protected]", "", {}, "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ=="],
+ "po-parser": ["[email protected]", "", {}, "sha512-ECF4zHLbUItpUgE3OTtLKlPjeBN+fKEczj2zYjDfCGOzicNs0GK3Vg2IoAYwx7LH/XYw43fZQP6xnZ4TkNxSLQ=="],
+
"possible-typed-array-names": ["[email protected]", "", {}, "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg=="],
"postcss": ["[email protected]", "", { "dependencies": { "nanoid": "^3.3.12", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-Mz8SaolMd8nB+G13WkORcxQKHZ/NE4xXevtkJHVuG+guo9/wYKlIMTKAqGdEmYOXR2ijPjTYNHssizdaVSUNdQ=="],
@@ -2463,6 +2542,8 @@
"use-callback-ref": ["[email protected]", "", { "dependencies": { "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg=="],
+ "use-intl": ["[email protected]", "", { "dependencies": { "@formatjs/fast-memoize": "^3.1.0", "@schummar/icu-type-parser": "1.21.5", "icu-minify": "^4.13.6", "intl-messageformat": "^11.1.0" }, "peerDependencies": { "react": "^17.0.0 || ^18.0.0 || >=19.0.0-rc <19.0.0 || ^19.0.0" } }, "sha512-RLej84qL6PGTDp/PSG3tqRpwr7IvJfOu4Qfv/uyy8CrnYn1oEOQb6osNJb++jZ7FQxqN3aQ5BI7wTIerUgrgMA=="],
+
"use-sidecar": ["[email protected]", "", { "dependencies": { "detect-node-es": "^1.1.0", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ=="],
"use-sync-external-store": ["[email protected]", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w=="],
diff --git a/docs/dev/i18n.md b/docs/dev/i18n.md
new file mode 100644
index 00000000..cddda110
--- /dev/null
+++ b/docs/dev/i18n.md
@@ -0,0 +1,86 @@
+# Languages
+
+The interface language is an account preference. A cookie gives it to the server render, and
+next-intl reads that cookie one time for each request.
+
+## The message files
+
+`apps/web/messages/<locale>/<namespace>.json`. There is one file for each top-level namespace,
+and the same set of files for each language. A namespace is a domain (`issue`, `members`,
+`settings`), not a page. Thus a screen that contains parts of more than one feature reads more
+than one namespace.
+
+English is the source language. `src/i18n/messages.ts` imports all the English files statically.
+The messages of the selected language then replace the English text, key by key. A key with no
+translation keeps its English text and does not show the key path.
+
+TypeScript uses the same imports for the type `Messages` in `global.d.ts`. That type gives the
+permitted keys for `t('…')`. `loadMessages` imports the other languages dynamically, one
+namespace at a time.
+
+## Where the code is
+
+| File | Content |
+| ---------------------------------------------- | ---------------------------------------------------------- |
+| `apps/web/messages/<locale>/*.json` | the messages, one file for each namespace |
+| `apps/web/src/i18n/messages.ts` | the English imports, `loadMessages`, the English fallback |
+| `apps/web/src/i18n/request.ts` | reads the cookie and gives the messages to next-intl |
+| `apps/web/src/i18n/locales.ts` | the language list, the labels, the flags, `isLocale` |
+| `apps/web/src/i18n/cookie.ts` | writes `NEXT_LOCALE` |
+| `apps/web/global.d.ts` | types each key against the English files |
+| `apps/web/src/components/preferences-sync.tsx` | writes the cookie from the account preference, and refreshes |
+| `apps/web/src/components/locale-toggle.tsx` | the language switcher |
+| `apps/web/src/hooks/useDateFnsLocale.ts` | the month names and the weekday names of the calendar |
+| `apps/api/src/user-preferences/` | the stored preference and its validation |
+
+## How to add a key
+
+Add the key to `messages/en/<namespace>.json` first. Then add it to the other languages. The
+English file gives the type. Thus a `t('…')` for a key that is not in that file causes a
+typecheck error. A key that is absent from a translated file causes no error.
+
+## How to add a namespace
+
+Make the file in each language directory. Then add the namespace to `defaultMessages` in
+`src/i18n/messages.ts`. No code finds the file automatically.
+
+## How to add a language
+
+There are four locations, and no migration is necessary.
+
+1. Copy `messages/en/` to `apps/web/messages/<code>/` and translate the files. A partial
+ translation is permitted, because the other keys show in English.
+2. Add the code to `LOCALES` in `apps/web/src/i18n/locales.ts`. Add the name of the language, in
+ that language, to `LOCALE_LABELS`. Add a flag to `LOCALE_FLAGS`. TypeScript types both
+ records by locale, thus an absent entry causes a typecheck error.
+3. Add the applicable import from `date-fns/locale` to
+ `apps/web/src/hooks/useDateFnsLocale.ts`. If you do not, the month names and the weekday
+ names of the calendar stay in English, and no error occurs.
+4. Add the code to `LOCALES` in `apps/api/src/user-preferences/store.ts`, and to `Locale` in
+ `routes.ts`. If you do not, the API refuses the new code with status 422, and the switcher
+ cannot save it.
+
+The `user_preference.locale` column is a plain `text` column with no CHECK, so the set of
+languages can increase with no change to the schema.
+
+## Dates and relative times
+
+next-intl formats the dates, the numbers, and the relative times for the active locale.
+`request.ts` also sets `now` one time for each request. The server render and the client use
+that same value. Thus "3 hours ago" does not come from two different clocks, and the markup
+agrees at hydration.
+
+The calendar makes its own month names and weekday names with date-fns. `useDateFnsLocale` gives
+the applicable date-fns locale. For a locale that is not in its map, it gives `enUS`.
+
+## Rejected alternatives
+
+**One file for each namespace.** The alternative is one file for each language, with all the
+namespaces in it. In that file each change conflicts with the other changes, and you must scroll
+to find a key.
+
+**All the messages go to the client.** `NextIntlClientProvider` receives the full set. If you
+send only some namespaces with `pick()`, you save approximately 100 KB of raw JSON for each
+page. But a namespace that is absent from that list then causes a failure at runtime, in the
+component that needs it, and not at typecheck. The next-intl maintainer does not recommend this
+at this size.
diff --git a/docs/development.md b/docs/development.md
index 665dc081..be856865 100644
--- a/docs/development.md
+++ b/docs/development.md
@@ -76,3 +76,4 @@ docker compose -f docker-compose.test.yml run --rm api-test
Descriptions of the mechanisms that span several apps live in [`docs/dev/`](dev/):
- [The revision engine](dev/revision-engine.md) — how an open screen stays current.
+- [Languages](dev/i18n.md) — how the interface language is resolved, and how to add one.
diff --git a/packages/db/drizzle/0071_little_omega_red.sql b/packages/db/drizzle/0071_little_omega_red.sql
new file mode 100644
index 00000000..297263f1
--- /dev/null
+++ b/packages/db/drizzle/0071_little_omega_red.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "user_preference" ADD COLUMN "locale" text DEFAULT 'en' NOT NULL;--> statement-breakpoint
+ALTER TABLE "user_preference" ADD CONSTRAINT "user_preference_locale_check" CHECK ("user_preference"."locale" IN ('en', 'uk'));
\ No newline at end of file
diff --git a/packages/db/drizzle/0072_amused_magik.sql b/packages/db/drizzle/0072_amused_magik.sql
new file mode 100644
index 00000000..2f0a6a82
--- /dev/null
+++ b/packages/db/drizzle/0072_amused_magik.sql
@@ -0,0 +1 @@
+ALTER TABLE "user_preference" DROP CONSTRAINT "user_preference_locale_check";
\ No newline at end of file
diff --git a/packages/db/drizzle/meta/0071_snapshot.json b/packages/db/drizzle/meta/0071_snapshot.json
new file mode 100644
index 00000000..7265e90a
--- /dev/null
+++ b/packages/db/drizzle/meta/0071_snapshot.json
@@ -0,0 +1,6039 @@
+{
+ "id": "4f6f8200-4966-4667-b3fa-f0f8e505281b",
+ "prevId": "e4d943cc-5ca8-488a-8069-0e30ea989997",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.account": {
+ "name": "account",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "account_id": {
+ "name": "account_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "access_token": {
+ "name": "access_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token": {
+ "name": "refresh_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "id_token": {
+ "name": "id_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_token_expires_at": {
+ "name": "access_token_expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token_expires_at": {
+ "name": "refresh_token_expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scope": {
+ "name": "scope",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {
+ "account_userId_idx": {
+ "name": "account_userId_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "account_user_id_user_id_fk": {
+ "name": "account_user_id_user_id_fk",
+ "tableFrom": "account",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.apikey": {
+ "name": "apikey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "config_id": {
+ "name": "config_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'default'"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start": {
+ "name": "start",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reference_id": {
+ "name": "reference_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refill_interval": {
+ "name": "refill_interval",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refill_amount": {
+ "name": "refill_amount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_refill_at": {
+ "name": "last_refill_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "rate_limit_enabled": {
+ "name": "rate_limit_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "rate_limit_time_window": {
+ "name": "rate_limit_time_window",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 86400000
+ },
+ "rate_limit_max": {
+ "name": "rate_limit_max",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 10
+ },
+ "request_count": {
+ "name": "request_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "remaining": {
+ "name": "remaining",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_request": {
+ "name": "last_request",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "apikey_configId_idx": {
+ "name": "apikey_configId_idx",
+ "columns": [
+ {
+ "expression": "config_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "apikey_referenceId_idx": {
+ "name": "apikey_referenceId_idx",
+ "columns": [
+ {
+ "expression": "reference_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "apikey_key_idx": {
+ "name": "apikey_key_idx",
+ "columns": [
+ {
+ "expression": "key",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.passkey": {
+ "name": "passkey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "aaguid": {
+ "name": "aaguid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "passkey_userId_idx": {
+ "name": "passkey_userId_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "passkey_credentialID_idx": {
+ "name": "passkey_credentialID_idx",
+ "columns": [
+ {
+ "expression": "credential_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "passkey_user_id_user_id_fk": {
+ "name": "passkey_user_id_user_id_fk",
+ "tableFrom": "passkey",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session": {
+ "name": "session",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {
+ "session_userId_idx": {
+ "name": "session_userId_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "session_user_id_user_id_fk": {
+ "name": "session_user_id_user_id_fk",
+ "tableFrom": "session",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_token_unique": {
+ "name": "session_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user": {
+ "name": "user",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email_verified": {
+ "name": "email_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'user'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_email_unique": {
+ "name": "user_email_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.verification": {
+ "name": "verification",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identifier": {
+ "name": "identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "verification_identifier_idx": {
+ "name": "verification_identifier_idx",
+ "columns": [
+ {
+ "expression": "identifier",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.agent_run": {
+ "name": "agent_run",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "agent_id": {
+ "name": "agent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issue_id": {
+ "name": "issue_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "schedule_id": {
+ "name": "schedule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "trigger": {
+ "name": "trigger",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'delegation'"
+ },
+ "scheduled_for": {
+ "name": "scheduled_for",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source_activity_id": {
+ "name": "source_activity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prompt": {
+ "name": "prompt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "attempts": {
+ "name": "attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "next_attempt_at": {
+ "name": "next_attempt_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_error": {
+ "name": "last_error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "output": {
+ "name": "output",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finished_at": {
+ "name": "finished_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "agent_run_schedule_fire_uq": {
+ "name": "agent_run_schedule_fire_uq",
+ "columns": [
+ {
+ "expression": "schedule_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "scheduled_for",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_run_due_idx": {
+ "name": "agent_run_due_idx",
+ "columns": [
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "next_attempt_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_run_schedule_idx": {
+ "name": "agent_run_schedule_idx",
+ "columns": [
+ {
+ "expression": "schedule_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "agent_run_agent_id_ai_agent_id_fk": {
+ "name": "agent_run_agent_id_ai_agent_id_fk",
+ "tableFrom": "agent_run",
+ "tableTo": "ai_agent",
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "agent_run_issue_id_issue_id_fk": {
+ "name": "agent_run_issue_id_issue_id_fk",
+ "tableFrom": "agent_run",
+ "tableTo": "issue",
+ "columnsFrom": [
+ "issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "agent_run_schedule_id_agent_schedule_id_fk": {
+ "name": "agent_run_schedule_id_agent_schedule_id_fk",
+ "tableFrom": "agent_run",
+ "tableTo": "agent_schedule",
+ "columnsFrom": [
+ "schedule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "agent_run_source_activity_id_issue_activity_id_fk": {
+ "name": "agent_run_source_activity_id_issue_activity_id_fk",
+ "tableFrom": "agent_run",
+ "tableTo": "issue_activity",
+ "columnsFrom": [
+ "source_activity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "agent_run_status_check": {
+ "name": "agent_run_status_check",
+ "value": "\"agent_run\".\"status\" IN ('pending', 'success', 'failed')"
+ },
+ "agent_run_trigger_check": {
+ "name": "agent_run_trigger_check",
+ "value": "\"agent_run\".\"trigger\" IN ('mention', 'delegation', 'schedule', 'manual')"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.agent_schedule": {
+ "name": "agent_schedule",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "agent_id": {
+ "name": "agent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prompt": {
+ "name": "prompt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cron": {
+ "name": "cron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "timezone": {
+ "name": "timezone",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'active'"
+ },
+ "next_run_at": {
+ "name": "next_run_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_run_at": {
+ "name": "last_run_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "agent_schedule_due_idx": {
+ "name": "agent_schedule_due_idx",
+ "columns": [
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "next_run_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_schedule_agent_idx": {
+ "name": "agent_schedule_agent_idx",
+ "columns": [
+ {
+ "expression": "agent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "agent_schedule_agent_id_ai_agent_id_fk": {
+ "name": "agent_schedule_agent_id_ai_agent_id_fk",
+ "tableFrom": "agent_schedule",
+ "tableTo": "ai_agent",
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "agent_schedule_agent_id_name_unique": {
+ "name": "agent_schedule_agent_id_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "agent_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {
+ "agent_schedule_status_check": {
+ "name": "agent_schedule_status_check",
+ "value": "\"agent_schedule\".\"status\" IN ('active', 'paused')"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.agent_skill": {
+ "name": "agent_skill",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "source_url": {
+ "name": "source_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "s3_prefix": {
+ "name": "s3_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "files": {
+ "name": "files",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'[]'::jsonb"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "agent_skill_project_idx": {
+ "name": "agent_skill_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "agent_skill_project_id_project_id_fk": {
+ "name": "agent_skill_project_id_project_id_fk",
+ "tableFrom": "agent_skill",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "agent_skill_project_id_name_unique": {
+ "name": "agent_skill_project_id_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {
+ "agent_skill_source_check": {
+ "name": "agent_skill_source_check",
+ "value": "\"agent_skill\".\"source\" IN ('upload', 'inline', 'github')"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.agent_skill_link": {
+ "name": "agent_skill_link",
+ "schema": "",
+ "columns": {
+ "agent_id": {
+ "name": "agent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "skill_id": {
+ "name": "skill_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {
+ "agent_skill_link_skill_idx": {
+ "name": "agent_skill_link_skill_idx",
+ "columns": [
+ {
+ "expression": "skill_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "agent_skill_link_agent_id_ai_agent_id_fk": {
+ "name": "agent_skill_link_agent_id_ai_agent_id_fk",
+ "tableFrom": "agent_skill_link",
+ "tableTo": "ai_agent",
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "agent_skill_link_skill_id_agent_skill_id_fk": {
+ "name": "agent_skill_link_skill_id_agent_skill_id_fk",
+ "tableFrom": "agent_skill_link",
+ "tableTo": "agent_skill",
+ "columnsFrom": [
+ "skill_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "agent_skill_link_agent_id_skill_id_pk": {
+ "name": "agent_skill_link_agent_id_skill_id_pk",
+ "columns": [
+ "agent_id",
+ "skill_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.agent_tool": {
+ "name": "agent_tool",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tool_key": {
+ "name": "tool_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "agent_tool_project_idx": {
+ "name": "agent_tool_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_tool_credential_idx": {
+ "name": "agent_tool_credential_idx",
+ "columns": [
+ {
+ "expression": "credential_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "agent_tool_project_id_project_id_fk": {
+ "name": "agent_tool_project_id_project_id_fk",
+ "tableFrom": "agent_tool",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "agent_tool_credential_id_integration_credential_id_fk": {
+ "name": "agent_tool_credential_id_integration_credential_id_fk",
+ "tableFrom": "agent_tool",
+ "tableTo": "integration_credential",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "agent_tool_project_id_tool_key_credential_id_unique": {
+ "name": "agent_tool_project_id_tool_key_credential_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "tool_key",
+ "credential_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.agent_tool_link": {
+ "name": "agent_tool_link",
+ "schema": "",
+ "columns": {
+ "agent_id": {
+ "name": "agent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "agent_tool_id": {
+ "name": "agent_tool_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {
+ "agent_tool_link_tool_idx": {
+ "name": "agent_tool_link_tool_idx",
+ "columns": [
+ {
+ "expression": "agent_tool_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "agent_tool_link_agent_id_ai_agent_id_fk": {
+ "name": "agent_tool_link_agent_id_ai_agent_id_fk",
+ "tableFrom": "agent_tool_link",
+ "tableTo": "ai_agent",
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "agent_tool_link_agent_tool_id_agent_tool_id_fk": {
+ "name": "agent_tool_link_agent_tool_id_agent_tool_id_fk",
+ "tableFrom": "agent_tool_link",
+ "tableTo": "agent_tool",
+ "columnsFrom": [
+ "agent_tool_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "agent_tool_link_agent_id_agent_tool_id_pk": {
+ "name": "agent_tool_link_agent_id_agent_tool_id_pk",
+ "columns": [
+ "agent_id",
+ "agent_tool_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ai_agent": {
+ "name": "ai_agent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "model_credential_id": {
+ "name": "model_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "instructions": {
+ "name": "instructions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tools": {
+ "name": "tools",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'[]'::jsonb"
+ },
+ "temperature": {
+ "name": "temperature",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_steps": {
+ "name": "max_steps",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "trigger_on_mention": {
+ "name": "trigger_on_mention",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "trigger_on_assign": {
+ "name": "trigger_on_assign",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "api_key_ciphertext": {
+ "name": "api_key_ciphertext",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "api_key_iv": {
+ "name": "api_key_iv",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "api_key_auth_tag": {
+ "name": "api_key_auth_tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memory_enabled": {
+ "name": "memory_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "memory_last_messages": {
+ "name": "memory_last_messages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "ai_agent_project_idx": {
+ "name": "ai_agent_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ai_agent_project_id_project_id_fk": {
+ "name": "ai_agent_project_id_project_id_fk",
+ "tableFrom": "ai_agent",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ai_agent_user_id_user_id_fk": {
+ "name": "ai_agent_user_id_user_id_fk",
+ "tableFrom": "ai_agent",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ai_agent_model_credential_id_integration_credential_id_fk": {
+ "name": "ai_agent_model_credential_id_integration_credential_id_fk",
+ "tableFrom": "ai_agent",
+ "tableTo": "integration_credential",
+ "columnsFrom": [
+ "model_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ai_agent_role_id_project_role_id_fk": {
+ "name": "ai_agent_role_id_project_role_id_fk",
+ "tableFrom": "ai_agent",
+ "tableTo": "project_role",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ai_agent_project_id_username_unique": {
+ "name": "ai_agent_project_id_username_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "username"
+ ]
+ },
+ "ai_agent_user_id_unique": {
+ "name": "ai_agent_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {
+ "ai_agent_kind_check": {
+ "name": "ai_agent_kind_check",
+ "value": "\"ai_agent\".\"kind\" IN ('external', 'internal')"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.app_secret": {
+ "name": "app_secret",
+ "schema": "",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "ciphertext": {
+ "name": "ciphertext",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "iv": {
+ "name": "iv",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "auth_tag": {
+ "name": "auth_tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "redacted": {
+ "name": "redacted",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.app_setting": {
+ "name": "app_setting",
+ "schema": "",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.custom_field": {
+ "name": "custom_field",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issue_type_id": {
+ "name": "issue_type_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "field_type": {
+ "name": "field_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "show_in_body": {
+ "name": "show_in_body",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "position": {
+ "name": "position",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "custom_field_project_id_project_id_fk": {
+ "name": "custom_field_project_id_project_id_fk",
+ "tableFrom": "custom_field",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "custom_field_issue_type_id_issue_type_id_fk": {
+ "name": "custom_field_issue_type_id_issue_type_id_fk",
+ "tableFrom": "custom_field",
+ "tableTo": "issue_type",
+ "columnsFrom": [
+ "issue_type_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "custom_field_field_type_check": {
+ "name": "custom_field_field_type_check",
+ "value": "\"custom_field\".\"field_type\" IN ('text', 'markdown', 'url', 'number', 'boolean', 'date', 'select', 'multi_select')"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.custom_field_option": {
+ "name": "custom_field_option",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "field_id": {
+ "name": "field_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'#6b7280'"
+ },
+ "position": {
+ "name": "position",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "custom_field_option_field_id_custom_field_id_fk": {
+ "name": "custom_field_option_field_id_custom_field_id_fk",
+ "tableFrom": "custom_field_option",
+ "tableTo": "custom_field",
+ "columnsFrom": [
+ "field_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "custom_field_option_field_id_value_unique": {
+ "name": "custom_field_option_field_id_value_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "field_id",
+ "value"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.cycle": {
+ "name": "cycle",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "goal": {
+ "name": "goal",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "start_date": {
+ "name": "start_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "end_date": {
+ "name": "end_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "cycle_project_idx": {
+ "name": "cycle_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "start_date",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "cycle_project_id_project_id_fk": {
+ "name": "cycle_project_id_project_id_fk",
+ "tableFrom": "cycle",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "cycle_dates_check": {
+ "name": "cycle_dates_check",
+ "value": "\"cycle\".\"end_date\" >= \"cycle\".\"start_date\""
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.initiative": {
+ "name": "initiative",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'planned'"
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "priority": {
+ "name": "priority",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start_date": {
+ "name": "start_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_date": {
+ "name": "target_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "position": {
+ "name": "position",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "initiative_project_idx": {
+ "name": "initiative_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "position",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "initiative_project_id_project_id_fk": {
+ "name": "initiative_project_id_project_id_fk",
+ "tableFrom": "initiative",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "initiative_owner_user_id_user_id_fk": {
+ "name": "initiative_owner_user_id_user_id_fk",
+ "tableFrom": "initiative",
+ "tableTo": "user",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "initiative_status_check": {
+ "name": "initiative_status_check",
+ "value": "\"initiative\".\"status\" IN ('proposed', 'planned', 'active', 'completed', 'canceled')"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.initiative_label": {
+ "name": "initiative_label",
+ "schema": "",
+ "columns": {
+ "initiative_id": {
+ "name": "initiative_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label_id": {
+ "name": "label_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "initiative_label_initiative_id_initiative_id_fk": {
+ "name": "initiative_label_initiative_id_initiative_id_fk",
+ "tableFrom": "initiative_label",
+ "tableTo": "initiative",
+ "columnsFrom": [
+ "initiative_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "initiative_label_label_id_label_id_fk": {
+ "name": "initiative_label_label_id_label_id_fk",
+ "tableFrom": "initiative_label",
+ "tableTo": "label",
+ "columnsFrom": [
+ "label_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "initiative_label_initiative_id_label_id_pk": {
+ "name": "initiative_label_initiative_id_label_id_pk",
+ "columns": [
+ "initiative_id",
+ "label_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.integration_credential": {
+ "name": "integration_credential",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "integration_key": {
+ "name": "integration_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ciphertext": {
+ "name": "ciphertext",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "iv": {
+ "name": "iv",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "auth_tag": {
+ "name": "auth_tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "redacted": {
+ "name": "redacted",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "integration_credential_project_idx": {
+ "name": "integration_credential_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "integration_credential_project_id_project_id_fk": {
+ "name": "integration_credential_project_id_project_id_fk",
+ "tableFrom": "integration_credential",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.issue": {
+ "name": "issue",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sequence_number": {
+ "name": "sequence_number",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initiative_id": {
+ "name": "initiative_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cycle_id": {
+ "name": "cycle_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "column_id": {
+ "name": "column_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assignee_user_id": {
+ "name": "assignee_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delegate_user_id": {
+ "name": "delegate_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "priority": {
+ "name": "priority",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start_date": {
+ "name": "start_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "position": {
+ "name": "position",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "archived_at": {
+ "name": "archived_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "share_token": {
+ "name": "share_token",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "share_extended": {
+ "name": "share_extended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "issue_project_active_idx": {
+ "name": "issue_project_active_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "column_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "where": "\"issue\".\"archived_at\" IS NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "issue_parent_idx": {
+ "name": "issue_parent_idx",
+ "columns": [
+ {
+ "expression": "parent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "where": "\"issue\".\"parent_id\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "issue_cycle_idx": {
+ "name": "issue_cycle_idx",
+ "columns": [
+ {
+ "expression": "cycle_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "where": "\"issue\".\"cycle_id\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "issue_project_id_project_id_fk": {
+ "name": "issue_project_id_project_id_fk",
+ "tableFrom": "issue",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "issue_type_id_issue_type_id_fk": {
+ "name": "issue_type_id_issue_type_id_fk",
+ "tableFrom": "issue",
+ "tableTo": "issue_type",
+ "columnsFrom": [
+ "type_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "issue_initiative_id_initiative_id_fk": {
+ "name": "issue_initiative_id_initiative_id_fk",
+ "tableFrom": "issue",
+ "tableTo": "initiative",
+ "columnsFrom": [
+ "initiative_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "issue_cycle_id_cycle_id_fk": {
+ "name": "issue_cycle_id_cycle_id_fk",
+ "tableFrom": "issue",
+ "tableTo": "cycle",
+ "columnsFrom": [
+ "cycle_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "issue_column_id_project_column_id_fk": {
+ "name": "issue_column_id_project_column_id_fk",
+ "tableFrom": "issue",
+ "tableTo": "project_column",
+ "columnsFrom": [
+ "column_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "issue_parent_id_issue_id_fk": {
+ "name": "issue_parent_id_issue_id_fk",
+ "tableFrom": "issue",
+ "tableTo": "issue",
+ "columnsFrom": [
+ "parent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "issue_assignee_user_id_user_id_fk": {
+ "name": "issue_assignee_user_id_user_id_fk",
+ "tableFrom": "issue",
+ "tableTo": "user",
+ "columnsFrom": [
+ "assignee_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "issue_delegate_user_id_user_id_fk": {
+ "name": "issue_delegate_user_id_user_id_fk",
+ "tableFrom": "issue",
+ "tableTo": "user",
+ "columnsFrom": [
+ "delegate_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "issue_share_token_unique": {
+ "name": "issue_share_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "share_token"
+ ]
+ },
+ "issue_project_id_sequence_number_unique": {
+ "name": "issue_project_id_sequence_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "sequence_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.issue_activity": {
+ "name": "issue_activity",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "issue_id": {
+ "name": "issue_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initiative_id": {
+ "name": "initiative_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "actor_user_id": {
+ "name": "actor_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actor_name": {
+ "name": "actor_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "body": {
+ "name": "body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "from_text": {
+ "name": "from_text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "to_text": {
+ "name": "to_text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "issue_activity_issue_idx": {
+ "name": "issue_activity_issue_idx",
+ "columns": [
+ {
+ "expression": "issue_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": false,
+ "nulls": "last"
+ },
+ {
+ "expression": "id",
+ "isExpression": false,
+ "asc": false,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "issue_activity_initiative_idx": {
+ "name": "issue_activity_initiative_idx",
+ "columns": [
+ {
+ "expression": "initiative_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": false,
+ "nulls": "last"
+ },
+ {
+ "expression": "id",
+ "isExpression": false,
+ "asc": false,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "issue_activity_issue_id_issue_id_fk": {
+ "name": "issue_activity_issue_id_issue_id_fk",
+ "tableFrom": "issue_activity",
+ "tableTo": "issue",
+ "columnsFrom": [
+ "issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "issue_activity_initiative_id_initiative_id_fk": {
+ "name": "issue_activity_initiative_id_initiative_id_fk",
+ "tableFrom": "issue_activity",
+ "tableTo": "initiative",
+ "columnsFrom": [
+ "initiative_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "issue_activity_actor_user_id_user_id_fk": {
+ "name": "issue_activity_actor_user_id_user_id_fk",
+ "tableFrom": "issue_activity",
+ "tableTo": "user",
+ "columnsFrom": [
+ "actor_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "issue_activity_kind_check": {
+ "name": "issue_activity_kind_check",
+ "value": "\"issue_activity\".\"kind\" IN ('comment', 'activity')"
+ },
+ "issue_activity_owner_check": {
+ "name": "issue_activity_owner_check",
+ "value": "(\"issue_activity\".\"issue_id\" IS NOT NULL) <> (\"issue_activity\".\"initiative_id\" IS NOT NULL)"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.issue_attachment": {
+ "name": "issue_attachment",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "public_id": {
+ "name": "public_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "issue_id": {
+ "name": "issue_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "s3_key": {
+ "name": "s3_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "filename": {
+ "name": "filename",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content_type": {
+ "name": "content_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "size_bytes": {
+ "name": "size_bytes",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "issue_attachment_issue_idx": {
+ "name": "issue_attachment_issue_idx",
+ "columns": [
+ {
+ "expression": "issue_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "issue_attachment_issue_id_issue_id_fk": {
+ "name": "issue_attachment_issue_id_issue_id_fk",
+ "tableFrom": "issue_attachment",
+ "tableTo": "issue",
+ "columnsFrom": [
+ "issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "issue_attachment_public_id_unique": {
+ "name": "issue_attachment_public_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "public_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.issue_checklist": {
+ "name": "issue_checklist",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "issue_id": {
+ "name": "issue_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "position": {
+ "name": "position",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "issue_checklist_issue_idx": {
+ "name": "issue_checklist_issue_idx",
+ "columns": [
+ {
+ "expression": "issue_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "position",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "issue_checklist_issue_id_issue_id_fk": {
+ "name": "issue_checklist_issue_id_issue_id_fk",
+ "tableFrom": "issue_checklist",
+ "tableTo": "issue",
+ "columnsFrom": [
+ "issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.issue_checklist_item": {
+ "name": "issue_checklist_item",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "checklist_id": {
+ "name": "checklist_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "done": {
+ "name": "done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "position": {
+ "name": "position",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "issue_checklist_item_checklist_idx": {
+ "name": "issue_checklist_item_checklist_idx",
+ "columns": [
+ {
+ "expression": "checklist_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "position",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "issue_checklist_item_checklist_id_issue_checklist_id_fk": {
+ "name": "issue_checklist_item_checklist_id_issue_checklist_id_fk",
+ "tableFrom": "issue_checklist_item",
+ "tableTo": "issue_checklist",
+ "columnsFrom": [
+ "checklist_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.issue_field_option": {
+ "name": "issue_field_option",
+ "schema": "",
+ "columns": {
+ "issue_id": {
+ "name": "issue_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "field_id": {
+ "name": "field_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "option_id": {
+ "name": "option_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "issue_field_option_issue_id_issue_id_fk": {
+ "name": "issue_field_option_issue_id_issue_id_fk",
+ "tableFrom": "issue_field_option",
+ "tableTo": "issue",
+ "columnsFrom": [
+ "issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "issue_field_option_field_id_custom_field_id_fk": {
+ "name": "issue_field_option_field_id_custom_field_id_fk",
+ "tableFrom": "issue_field_option",
+ "tableTo": "custom_field",
+ "columnsFrom": [
+ "field_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "issue_field_option_option_id_custom_field_option_id_fk": {
+ "name": "issue_field_option_option_id_custom_field_option_id_fk",
+ "tableFrom": "issue_field_option",
+ "tableTo": "custom_field_option",
+ "columnsFrom": [
+ "option_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "issue_field_option_issue_id_field_id_option_id_pk": {
+ "name": "issue_field_option_issue_id_field_id_option_id_pk",
+ "columns": [
+ "issue_id",
+ "field_id",
+ "option_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.issue_field_value": {
+ "name": "issue_field_value",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "issue_id": {
+ "name": "issue_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "field_id": {
+ "name": "field_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "value_text": {
+ "name": "value_text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "value_number": {
+ "name": "value_number",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "value_bool": {
+ "name": "value_bool",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "value_date": {
+ "name": "value_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "issue_field_value_issue_id_issue_id_fk": {
+ "name": "issue_field_value_issue_id_issue_id_fk",
+ "tableFrom": "issue_field_value",
+ "tableTo": "issue",
+ "columnsFrom": [
+ "issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "issue_field_value_field_id_custom_field_id_fk": {
+ "name": "issue_field_value_field_id_custom_field_id_fk",
+ "tableFrom": "issue_field_value",
+ "tableTo": "custom_field",
+ "columnsFrom": [
+ "field_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "issue_field_value_issue_id_field_id_unique": {
+ "name": "issue_field_value_issue_id_field_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "issue_id",
+ "field_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.issue_label": {
+ "name": "issue_label",
+ "schema": "",
+ "columns": {
+ "issue_id": {
+ "name": "issue_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label_id": {
+ "name": "label_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "issue_label_issue_id_issue_id_fk": {
+ "name": "issue_label_issue_id_issue_id_fk",
+ "tableFrom": "issue_label",
+ "tableTo": "issue",
+ "columnsFrom": [
+ "issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "issue_label_label_id_label_id_fk": {
+ "name": "issue_label_label_id_label_id_fk",
+ "tableFrom": "issue_label",
+ "tableTo": "label",
+ "columnsFrom": [
+ "label_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "issue_label_issue_id_label_id_pk": {
+ "name": "issue_label_issue_id_label_id_pk",
+ "columns": [
+ "issue_id",
+ "label_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.issue_link": {
+ "name": "issue_link",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "source_issue_id": {
+ "name": "source_issue_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_issue_id": {
+ "name": "target_issue_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "issue_link_pair_kind_idx": {
+ "name": "issue_link_pair_kind_idx",
+ "columns": [
+ {
+ "expression": "least(\"source_issue_id\", \"target_issue_id\")",
+ "asc": true,
+ "isExpression": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "greatest(\"source_issue_id\", \"target_issue_id\")",
+ "asc": true,
+ "isExpression": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "kind",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "issue_link_source_idx": {
+ "name": "issue_link_source_idx",
+ "columns": [
+ {
+ "expression": "source_issue_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "issue_link_target_idx": {
+ "name": "issue_link_target_idx",
+ "columns": [
+ {
+ "expression": "target_issue_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "issue_link_source_issue_id_issue_id_fk": {
+ "name": "issue_link_source_issue_id_issue_id_fk",
+ "tableFrom": "issue_link",
+ "tableTo": "issue",
+ "columnsFrom": [
+ "source_issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "issue_link_target_issue_id_issue_id_fk": {
+ "name": "issue_link_target_issue_id_issue_id_fk",
+ "tableFrom": "issue_link",
+ "tableTo": "issue",
+ "columnsFrom": [
+ "target_issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "issue_link_kind_check": {
+ "name": "issue_link_kind_check",
+ "value": "\"issue_link\".\"kind\" IN ('blocks', 'relates', 'duplicates')"
+ },
+ "issue_link_self_check": {
+ "name": "issue_link_self_check",
+ "value": "\"issue_link\".\"source_issue_id\" <> \"issue_link\".\"target_issue_id\""
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.issue_type": {
+ "name": "issue_type",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'#6b7280'"
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "position": {
+ "name": "position",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "issue_type_project_id_project_id_fk": {
+ "name": "issue_type_project_id_project_id_fk",
+ "tableFrom": "issue_type",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "issue_type_project_id_name_unique": {
+ "name": "issue_type_project_id_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.issue_watcher": {
+ "name": "issue_watcher",
+ "schema": "",
+ "columns": {
+ "issue_id": {
+ "name": "issue_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subscribed": {
+ "name": "subscribed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "issue_watcher_issue_id_issue_id_fk": {
+ "name": "issue_watcher_issue_id_issue_id_fk",
+ "tableFrom": "issue_watcher",
+ "tableTo": "issue",
+ "columnsFrom": [
+ "issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "issue_watcher_user_id_user_id_fk": {
+ "name": "issue_watcher_user_id_user_id_fk",
+ "tableFrom": "issue_watcher",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "issue_watcher_issue_id_user_id_pk": {
+ "name": "issue_watcher_issue_id_user_id_pk",
+ "columns": [
+ "issue_id",
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.label": {
+ "name": "label",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'#6b7280'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "label_project_id_project_id_fk": {
+ "name": "label_project_id_project_id_fk",
+ "tableFrom": "label",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "label_group_id_label_group_id_fk": {
+ "name": "label_group_id_label_group_id_fk",
+ "tableFrom": "label",
+ "tableTo": "label_group",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "label_project_id_name_unique": {
+ "name": "label_project_id_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.label_group": {
+ "name": "label_group",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'#6b7280'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "label_group_project_id_project_id_fk": {
+ "name": "label_group_project_id_project_id_fk",
+ "tableFrom": "label_group",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "label_group_project_id_name_unique": {
+ "name": "label_group_project_id_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.note_board": {
+ "name": "note_board",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_user_id": {
+ "name": "created_by_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "canvas": {
+ "name": "canvas",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "note_board_project_idx": {
+ "name": "note_board_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "updated_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "note_board_project_id_project_id_fk": {
+ "name": "note_board_project_id_project_id_fk",
+ "tableFrom": "note_board",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "note_board_owner_user_id_user_id_fk": {
+ "name": "note_board_owner_user_id_user_id_fk",
+ "tableFrom": "note_board",
+ "tableTo": "user",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "note_board_created_by_user_id_user_id_fk": {
+ "name": "note_board_created_by_user_id_user_id_fk",
+ "tableFrom": "note_board",
+ "tableTo": "user",
+ "columnsFrom": [
+ "created_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.note_board_member": {
+ "name": "note_board_member",
+ "schema": "",
+ "columns": {
+ "board_id": {
+ "name": "board_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {
+ "note_board_member_user_idx": {
+ "name": "note_board_member_user_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "note_board_member_board_id_note_board_id_fk": {
+ "name": "note_board_member_board_id_note_board_id_fk",
+ "tableFrom": "note_board_member",
+ "tableTo": "note_board",
+ "columnsFrom": [
+ "board_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "note_board_member_user_id_user_id_fk": {
+ "name": "note_board_member_user_id_user_id_fk",
+ "tableFrom": "note_board_member",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "note_board_member_board_id_user_id_pk": {
+ "name": "note_board_member_board_id_user_id_pk",
+ "columns": [
+ "board_id",
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification": {
+ "name": "notification",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issue_id": {
+ "name": "issue_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "source_activity_id": {
+ "name": "source_activity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "actor_user_id": {
+ "name": "actor_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actor_name": {
+ "name": "actor_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "read_at": {
+ "name": "read_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "snoozed_until": {
+ "name": "snoozed_until",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "notification_user_idx": {
+ "name": "notification_user_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": false,
+ "nulls": "last"
+ },
+ {
+ "expression": "id",
+ "isExpression": false,
+ "asc": false,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "notification_user_unread_idx": {
+ "name": "notification_user_unread_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "id",
+ "isExpression": false,
+ "asc": false,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "where": "\"notification\".\"read_at\" IS NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "notification_user_id_user_id_fk": {
+ "name": "notification_user_id_user_id_fk",
+ "tableFrom": "notification",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_project_id_project_id_fk": {
+ "name": "notification_project_id_project_id_fk",
+ "tableFrom": "notification",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_issue_id_issue_id_fk": {
+ "name": "notification_issue_id_issue_id_fk",
+ "tableFrom": "notification",
+ "tableTo": "issue",
+ "columnsFrom": [
+ "issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_source_activity_id_issue_activity_id_fk": {
+ "name": "notification_source_activity_id_issue_activity_id_fk",
+ "tableFrom": "notification",
+ "tableTo": "issue_activity",
+ "columnsFrom": [
+ "source_activity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "notification_actor_user_id_user_id_fk": {
+ "name": "notification_actor_user_id_user_id_fk",
+ "tableFrom": "notification",
+ "tableTo": "user",
+ "columnsFrom": [
+ "actor_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "notification_type_check": {
+ "name": "notification_type_check",
+ "value": "\"notification\".\"type\" IN ('assigned', 'mentioned', 'commented', 'state_changed')"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.notification_delivery": {
+ "name": "notification_delivery",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel": {
+ "name": "channel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "recipient": {
+ "name": "recipient",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "attempts": {
+ "name": "attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "next_attempt_at": {
+ "name": "next_attempt_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_error": {
+ "name": "last_error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "notification_delivery_due_idx": {
+ "name": "notification_delivery_due_idx",
+ "columns": [
+ {
+ "expression": "next_attempt_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "where": "\"notification_delivery\".\"status\" = 'pending'",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "notification_delivery_project_id_project_id_fk": {
+ "name": "notification_delivery_project_id_project_id_fk",
+ "tableFrom": "notification_delivery",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "notification_delivery_channel_check": {
+ "name": "notification_delivery_channel_check",
+ "value": "\"notification_delivery\".\"channel\" IN ('email', 'telegram')"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.project": {
+ "name": "project",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "next_sequence": {
+ "name": "next_sequence",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "mcp_enabled": {
+ "name": "mcp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "initiatives_enabled": {
+ "name": "initiatives_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "dashboards_enabled": {
+ "name": "dashboards_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "notes_enabled": {
+ "name": "notes_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "cycles_enabled": {
+ "name": "cycles_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "subtasks_enabled": {
+ "name": "subtasks_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "checklists_enabled": {
+ "name": "checklists_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "issue_stats_enabled": {
+ "name": "issue_stats_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "project_key_unique": {
+ "name": "project_key_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "key"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_action": {
+ "name": "project_action",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "condition": {
+ "name": "condition",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "effect": {
+ "name": "effect",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "position": {
+ "name": "position",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "project_action_project_idx": {
+ "name": "project_action_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "position",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "project_action_project_id_project_id_fk": {
+ "name": "project_action_project_id_project_id_fk",
+ "tableFrom": "project_action",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_column": {
+ "name": "project_column",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state_type": {
+ "name": "state_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'unstarted'"
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'#6b7280'"
+ },
+ "position": {
+ "name": "position",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "project_column_project_id_project_id_fk": {
+ "name": "project_column_project_id_project_id_fk",
+ "tableFrom": "project_column",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "project_column_project_id_position_unique": {
+ "name": "project_column_project_id_position_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "position"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {
+ "project_column_state_type_check": {
+ "name": "project_column_state_type_check",
+ "value": "\"project_column\".\"state_type\" IN ('backlog', 'unstarted', 'started', 'completed', 'canceled')"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.project_dashboard": {
+ "name": "project_dashboard",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'[]'::jsonb"
+ },
+ "position": {
+ "name": "position",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "project_dashboard_project_idx": {
+ "name": "project_dashboard_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "position",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "project_dashboard_project_id_project_id_fk": {
+ "name": "project_dashboard_project_id_project_id_fk",
+ "tableFrom": "project_dashboard",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_invite": {
+ "name": "project_invite",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'member'"
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "invited_by_user_id": {
+ "name": "invited_by_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accepted_by_user_id": {
+ "name": "accepted_by_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "project_invite_pending_uq": {
+ "name": "project_invite_pending_uq",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "email",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"project_invite\".\"status\" = 'pending'",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "project_invite_project_idx": {
+ "name": "project_invite_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "project_invite_project_id_project_id_fk": {
+ "name": "project_invite_project_id_project_id_fk",
+ "tableFrom": "project_invite",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "project_invite_role_id_project_role_id_fk": {
+ "name": "project_invite_role_id_project_role_id_fk",
+ "tableFrom": "project_invite",
+ "tableTo": "project_role",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "project_invite_invited_by_user_id_user_id_fk": {
+ "name": "project_invite_invited_by_user_id_user_id_fk",
+ "tableFrom": "project_invite",
+ "tableTo": "user",
+ "columnsFrom": [
+ "invited_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "project_invite_accepted_by_user_id_user_id_fk": {
+ "name": "project_invite_accepted_by_user_id_user_id_fk",
+ "tableFrom": "project_invite",
+ "tableTo": "user",
+ "columnsFrom": [
+ "accepted_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "project_invite_token_unique": {
+ "name": "project_invite_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {
+ "project_invite_role_check": {
+ "name": "project_invite_role_check",
+ "value": "\"project_invite\".\"role\" IN ('owner', 'member')"
+ },
+ "project_invite_status_check": {
+ "name": "project_invite_status_check",
+ "value": "\"project_invite\".\"status\" IN ('pending', 'accepted', 'rejected')"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.project_member": {
+ "name": "project_member",
+ "schema": "",
+ "columns": {
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'member'"
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "project_member_user_idx": {
+ "name": "project_member_user_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "project_member_project_id_project_id_fk": {
+ "name": "project_member_project_id_project_id_fk",
+ "tableFrom": "project_member",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "project_member_user_id_user_id_fk": {
+ "name": "project_member_user_id_user_id_fk",
+ "tableFrom": "project_member",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "project_member_role_id_project_role_id_fk": {
+ "name": "project_member_role_id_project_role_id_fk",
+ "tableFrom": "project_member",
+ "tableTo": "project_role",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "project_member_project_id_user_id_pk": {
+ "name": "project_member_project_id_user_id_pk",
+ "columns": [
+ "project_id",
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "project_member_role_check": {
+ "name": "project_member_role_check",
+ "value": "\"project_member\".\"role\" IN ('owner', 'member')"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.project_notification_setting": {
+ "name": "project_notification_setting",
+ "schema": "",
+ "columns": {
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "ciphertext": {
+ "name": "ciphertext",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "iv": {
+ "name": "iv",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "auth_tag": {
+ "name": "auth_tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "redacted": {
+ "name": "redacted",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "project_notification_setting_project_id_project_id_fk": {
+ "name": "project_notification_setting_project_id_project_id_fk",
+ "tableFrom": "project_notification_setting",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_role": {
+ "name": "project_role",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "project_role_default_uq": {
+ "name": "project_role_default_uq",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"project_role\".\"is_default\"",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "project_role_project_idx": {
+ "name": "project_role_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "project_role_project_id_project_id_fk": {
+ "name": "project_role_project_id_project_id_fk",
+ "tableFrom": "project_role",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "project_role_project_id_name_unique": {
+ "name": "project_role_project_id_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_setting": {
+ "name": "project_setting",
+ "schema": "",
+ "columns": {
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "project_setting_project_id_project_id_fk": {
+ "name": "project_setting_project_id_project_id_fk",
+ "tableFrom": "project_setting",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "project_setting_project_id_key_pk": {
+ "name": "project_setting_project_id_key_pk",
+ "columns": [
+ "project_id",
+ "key"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_view": {
+ "name": "project_view",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "filters": {
+ "name": "filters",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "display": {
+ "name": "display",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "position": {
+ "name": "position",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "share_token": {
+ "name": "share_token",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "share_extended": {
+ "name": "share_extended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "project_view_project_idx": {
+ "name": "project_view_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "position",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "project_view_project_id_project_id_fk": {
+ "name": "project_view_project_id_project_id_fk",
+ "tableFrom": "project_view",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "project_view_share_token_unique": {
+ "name": "project_view_share_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "share_token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.revision": {
+ "name": "revision",
+ "schema": "",
+ "columns": {
+ "scope": {
+ "name": "scope",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rev": {
+ "name": "rev",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "revision_project_idx": {
+ "name": "revision_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_notification_preference": {
+ "name": "user_notification_preference",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email_events": {
+ "name": "email_events",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "telegram_events": {
+ "name": "telegram_events",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_notification_preference_user_id_user_id_fk": {
+ "name": "user_notification_preference_user_id_user_id_fk",
+ "tableFrom": "user_notification_preference",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_notification_preference_project_id_project_id_fk": {
+ "name": "user_notification_preference_project_id_project_id_fk",
+ "tableFrom": "user_notification_preference",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_notification_pref_user_project_unique": {
+ "name": "user_notification_pref_user_project_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "project_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_preference": {
+ "name": "user_preference",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "timezone": {
+ "name": "timezone",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'UTC'"
+ },
+ "locale": {
+ "name": "locale",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'en'"
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'system'"
+ },
+ "issue_open_mode": {
+ "name": "issue_open_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'panel'"
+ },
+ "start_page": {
+ "name": "start_page",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'work-items'"
+ },
+ "show_chat_by_default": {
+ "name": "show_chat_by_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "issue_stats_open": {
+ "name": "issue_stats_open",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "issue_stats_view": {
+ "name": "issue_stats_view",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'compact'"
+ },
+ "issue_activity_view": {
+ "name": "issue_activity_view",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'flat'"
+ },
+ "auto_watch": {
+ "name": "auto_watch",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "hotkeys": {
+ "name": "hotkeys",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_project_id": {
+ "name": "last_project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preference_user_id_user_id_fk": {
+ "name": "user_preference_user_id_user_id_fk",
+ "tableFrom": "user_preference",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_preference_last_project_id_project_id_fk": {
+ "name": "user_preference_last_project_id_project_id_fk",
+ "tableFrom": "user_preference",
+ "tableTo": "project",
+ "columnsFrom": [
+ "last_project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "user_preference_locale_check": {
+ "name": "user_preference_locale_check",
+ "value": "\"user_preference\".\"locale\" IN ('en', 'uk')"
+ },
+ "user_preference_theme_check": {
+ "name": "user_preference_theme_check",
+ "value": "\"user_preference\".\"theme\" IN ('light', 'dark', 'system')"
+ },
+ "user_preference_issue_open_mode_check": {
+ "name": "user_preference_issue_open_mode_check",
+ "value": "\"user_preference\".\"issue_open_mode\" IN ('panel', 'page')"
+ },
+ "user_preference_start_page_check": {
+ "name": "user_preference_start_page_check",
+ "value": "\"user_preference\".\"start_page\" IN ('inbox', 'dashboard', 'work-items', 'initiatives', 'ai-chat')"
+ },
+ "user_preference_issue_stats_view_check": {
+ "name": "user_preference_issue_stats_view_check",
+ "value": "\"user_preference\".\"issue_stats_view\" IN ('compact', 'timeline')"
+ },
+ "user_preference_issue_activity_view_check": {
+ "name": "user_preference_issue_activity_view_check",
+ "value": "\"user_preference\".\"issue_activity_view\" IN ('flat', 'grouped')"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.user_telegram_account": {
+ "name": "user_telegram_account",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "chat_id": {
+ "name": "chat_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_name": {
+ "name": "first_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "link_code": {
+ "name": "link_code",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "link_code_expires_at": {
+ "name": "link_code_expires_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "linked_at": {
+ "name": "linked_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "user_telegram_account_chat_id_unique": {
+ "name": "user_telegram_account_chat_id_unique",
+ "columns": [
+ {
+ "expression": "chat_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"user_telegram_account\".\"chat_id\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "user_telegram_account_link_code_unique": {
+ "name": "user_telegram_account_link_code_unique",
+ "columns": [
+ {
+ "expression": "link_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"user_telegram_account\".\"link_code\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_telegram_account_user_id_user_id_fk": {
+ "name": "user_telegram_account_user_id_user_id_fk",
+ "tableFrom": "user_telegram_account",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webhook": {
+ "name": "webhook",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "events": {
+ "name": "events",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'[]'::jsonb"
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "consecutive_failures": {
+ "name": "consecutive_failures",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "webhook_project_idx": {
+ "name": "webhook_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "webhook_project_id_project_id_fk": {
+ "name": "webhook_project_id_project_id_fk",
+ "tableFrom": "webhook",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webhook_delivery": {
+ "name": "webhook_delivery",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhook_id": {
+ "name": "webhook_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "event_id": {
+ "name": "event_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "event_type": {
+ "name": "event_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "attempts": {
+ "name": "attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "next_attempt_at": {
+ "name": "next_attempt_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_error": {
+ "name": "last_error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_body": {
+ "name": "response_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "webhook_delivery_due_idx": {
+ "name": "webhook_delivery_due_idx",
+ "columns": [
+ {
+ "expression": "next_attempt_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "where": "\"webhook_delivery\".\"status\" = 'pending'",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "webhook_delivery_webhook_idx": {
+ "name": "webhook_delivery_webhook_idx",
+ "columns": [
+ {
+ "expression": "webhook_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "webhook_delivery_webhook_id_webhook_id_fk": {
+ "name": "webhook_delivery_webhook_id_webhook_id_fk",
+ "tableFrom": "webhook_delivery",
+ "tableTo": "webhook",
+ "columnsFrom": [
+ "webhook_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db/drizzle/meta/0072_snapshot.json b/packages/db/drizzle/meta/0072_snapshot.json
new file mode 100644
index 00000000..907ee65d
--- /dev/null
+++ b/packages/db/drizzle/meta/0072_snapshot.json
@@ -0,0 +1,6035 @@
+{
+ "id": "c22ed41e-7306-43e2-b8e8-c65e3043759a",
+ "prevId": "4f6f8200-4966-4667-b3fa-f0f8e505281b",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.account": {
+ "name": "account",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "account_id": {
+ "name": "account_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "access_token": {
+ "name": "access_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token": {
+ "name": "refresh_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "id_token": {
+ "name": "id_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_token_expires_at": {
+ "name": "access_token_expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refresh_token_expires_at": {
+ "name": "refresh_token_expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scope": {
+ "name": "scope",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {
+ "account_userId_idx": {
+ "name": "account_userId_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "account_user_id_user_id_fk": {
+ "name": "account_user_id_user_id_fk",
+ "tableFrom": "account",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.apikey": {
+ "name": "apikey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "config_id": {
+ "name": "config_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'default'"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start": {
+ "name": "start",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "reference_id": {
+ "name": "reference_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prefix": {
+ "name": "prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refill_interval": {
+ "name": "refill_interval",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refill_amount": {
+ "name": "refill_amount",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_refill_at": {
+ "name": "last_refill_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "rate_limit_enabled": {
+ "name": "rate_limit_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": true
+ },
+ "rate_limit_time_window": {
+ "name": "rate_limit_time_window",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 86400000
+ },
+ "rate_limit_max": {
+ "name": "rate_limit_max",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 10
+ },
+ "request_count": {
+ "name": "request_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "remaining": {
+ "name": "remaining",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_request": {
+ "name": "last_request",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "metadata": {
+ "name": "metadata",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "apikey_configId_idx": {
+ "name": "apikey_configId_idx",
+ "columns": [
+ {
+ "expression": "config_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "apikey_referenceId_idx": {
+ "name": "apikey_referenceId_idx",
+ "columns": [
+ {
+ "expression": "reference_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "apikey_key_idx": {
+ "name": "apikey_key_idx",
+ "columns": [
+ {
+ "expression": "key",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.passkey": {
+ "name": "passkey",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "aaguid": {
+ "name": "aaguid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "passkey_userId_idx": {
+ "name": "passkey_userId_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "passkey_credentialID_idx": {
+ "name": "passkey_credentialID_idx",
+ "columns": [
+ {
+ "expression": "credential_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "passkey_user_id_user_id_fk": {
+ "name": "passkey_user_id_user_id_fk",
+ "tableFrom": "passkey",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session": {
+ "name": "session",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {
+ "session_userId_idx": {
+ "name": "session_userId_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "session_user_id_user_id_fk": {
+ "name": "session_user_id_user_id_fk",
+ "tableFrom": "session",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_token_unique": {
+ "name": "session_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user": {
+ "name": "user",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email_verified": {
+ "name": "email_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "image": {
+ "name": "image",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'user'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_email_unique": {
+ "name": "user_email_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.verification": {
+ "name": "verification",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identifier": {
+ "name": "identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "verification_identifier_idx": {
+ "name": "verification_identifier_idx",
+ "columns": [
+ {
+ "expression": "identifier",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.agent_run": {
+ "name": "agent_run",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "agent_id": {
+ "name": "agent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issue_id": {
+ "name": "issue_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "schedule_id": {
+ "name": "schedule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "trigger": {
+ "name": "trigger",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'delegation'"
+ },
+ "scheduled_for": {
+ "name": "scheduled_for",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source_activity_id": {
+ "name": "source_activity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "prompt": {
+ "name": "prompt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "attempts": {
+ "name": "attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "next_attempt_at": {
+ "name": "next_attempt_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_error": {
+ "name": "last_error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "output": {
+ "name": "output",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "finished_at": {
+ "name": "finished_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "agent_run_schedule_fire_uq": {
+ "name": "agent_run_schedule_fire_uq",
+ "columns": [
+ {
+ "expression": "schedule_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "scheduled_for",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_run_due_idx": {
+ "name": "agent_run_due_idx",
+ "columns": [
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "next_attempt_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_run_schedule_idx": {
+ "name": "agent_run_schedule_idx",
+ "columns": [
+ {
+ "expression": "schedule_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "agent_run_agent_id_ai_agent_id_fk": {
+ "name": "agent_run_agent_id_ai_agent_id_fk",
+ "tableFrom": "agent_run",
+ "tableTo": "ai_agent",
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "agent_run_issue_id_issue_id_fk": {
+ "name": "agent_run_issue_id_issue_id_fk",
+ "tableFrom": "agent_run",
+ "tableTo": "issue",
+ "columnsFrom": [
+ "issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "agent_run_schedule_id_agent_schedule_id_fk": {
+ "name": "agent_run_schedule_id_agent_schedule_id_fk",
+ "tableFrom": "agent_run",
+ "tableTo": "agent_schedule",
+ "columnsFrom": [
+ "schedule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "agent_run_source_activity_id_issue_activity_id_fk": {
+ "name": "agent_run_source_activity_id_issue_activity_id_fk",
+ "tableFrom": "agent_run",
+ "tableTo": "issue_activity",
+ "columnsFrom": [
+ "source_activity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "agent_run_status_check": {
+ "name": "agent_run_status_check",
+ "value": "\"agent_run\".\"status\" IN ('pending', 'success', 'failed')"
+ },
+ "agent_run_trigger_check": {
+ "name": "agent_run_trigger_check",
+ "value": "\"agent_run\".\"trigger\" IN ('mention', 'delegation', 'schedule', 'manual')"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.agent_schedule": {
+ "name": "agent_schedule",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "agent_id": {
+ "name": "agent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "prompt": {
+ "name": "prompt",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cron": {
+ "name": "cron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "timezone": {
+ "name": "timezone",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'active'"
+ },
+ "next_run_at": {
+ "name": "next_run_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_run_at": {
+ "name": "last_run_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "agent_schedule_due_idx": {
+ "name": "agent_schedule_due_idx",
+ "columns": [
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "next_run_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_schedule_agent_idx": {
+ "name": "agent_schedule_agent_idx",
+ "columns": [
+ {
+ "expression": "agent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "agent_schedule_agent_id_ai_agent_id_fk": {
+ "name": "agent_schedule_agent_id_ai_agent_id_fk",
+ "tableFrom": "agent_schedule",
+ "tableTo": "ai_agent",
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "agent_schedule_agent_id_name_unique": {
+ "name": "agent_schedule_agent_id_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "agent_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {
+ "agent_schedule_status_check": {
+ "name": "agent_schedule_status_check",
+ "value": "\"agent_schedule\".\"status\" IN ('active', 'paused')"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.agent_skill": {
+ "name": "agent_skill",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "source_url": {
+ "name": "source_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "s3_prefix": {
+ "name": "s3_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "files": {
+ "name": "files",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'[]'::jsonb"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "agent_skill_project_idx": {
+ "name": "agent_skill_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "agent_skill_project_id_project_id_fk": {
+ "name": "agent_skill_project_id_project_id_fk",
+ "tableFrom": "agent_skill",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "agent_skill_project_id_name_unique": {
+ "name": "agent_skill_project_id_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {
+ "agent_skill_source_check": {
+ "name": "agent_skill_source_check",
+ "value": "\"agent_skill\".\"source\" IN ('upload', 'inline', 'github')"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.agent_skill_link": {
+ "name": "agent_skill_link",
+ "schema": "",
+ "columns": {
+ "agent_id": {
+ "name": "agent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "skill_id": {
+ "name": "skill_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {
+ "agent_skill_link_skill_idx": {
+ "name": "agent_skill_link_skill_idx",
+ "columns": [
+ {
+ "expression": "skill_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "agent_skill_link_agent_id_ai_agent_id_fk": {
+ "name": "agent_skill_link_agent_id_ai_agent_id_fk",
+ "tableFrom": "agent_skill_link",
+ "tableTo": "ai_agent",
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "agent_skill_link_skill_id_agent_skill_id_fk": {
+ "name": "agent_skill_link_skill_id_agent_skill_id_fk",
+ "tableFrom": "agent_skill_link",
+ "tableTo": "agent_skill",
+ "columnsFrom": [
+ "skill_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "agent_skill_link_agent_id_skill_id_pk": {
+ "name": "agent_skill_link_agent_id_skill_id_pk",
+ "columns": [
+ "agent_id",
+ "skill_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.agent_tool": {
+ "name": "agent_tool",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tool_key": {
+ "name": "tool_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "agent_tool_project_idx": {
+ "name": "agent_tool_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_tool_credential_idx": {
+ "name": "agent_tool_credential_idx",
+ "columns": [
+ {
+ "expression": "credential_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "agent_tool_project_id_project_id_fk": {
+ "name": "agent_tool_project_id_project_id_fk",
+ "tableFrom": "agent_tool",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "agent_tool_credential_id_integration_credential_id_fk": {
+ "name": "agent_tool_credential_id_integration_credential_id_fk",
+ "tableFrom": "agent_tool",
+ "tableTo": "integration_credential",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "agent_tool_project_id_tool_key_credential_id_unique": {
+ "name": "agent_tool_project_id_tool_key_credential_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "tool_key",
+ "credential_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.agent_tool_link": {
+ "name": "agent_tool_link",
+ "schema": "",
+ "columns": {
+ "agent_id": {
+ "name": "agent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "agent_tool_id": {
+ "name": "agent_tool_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {
+ "agent_tool_link_tool_idx": {
+ "name": "agent_tool_link_tool_idx",
+ "columns": [
+ {
+ "expression": "agent_tool_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "agent_tool_link_agent_id_ai_agent_id_fk": {
+ "name": "agent_tool_link_agent_id_ai_agent_id_fk",
+ "tableFrom": "agent_tool_link",
+ "tableTo": "ai_agent",
+ "columnsFrom": [
+ "agent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "agent_tool_link_agent_tool_id_agent_tool_id_fk": {
+ "name": "agent_tool_link_agent_tool_id_agent_tool_id_fk",
+ "tableFrom": "agent_tool_link",
+ "tableTo": "agent_tool",
+ "columnsFrom": [
+ "agent_tool_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "agent_tool_link_agent_id_agent_tool_id_pk": {
+ "name": "agent_tool_link_agent_id_agent_tool_id_pk",
+ "columns": [
+ "agent_id",
+ "agent_tool_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ai_agent": {
+ "name": "ai_agent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "model_credential_id": {
+ "name": "model_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "instructions": {
+ "name": "instructions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tools": {
+ "name": "tools",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'[]'::jsonb"
+ },
+ "temperature": {
+ "name": "temperature",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_steps": {
+ "name": "max_steps",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "trigger_on_mention": {
+ "name": "trigger_on_mention",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "trigger_on_assign": {
+ "name": "trigger_on_assign",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "api_key_ciphertext": {
+ "name": "api_key_ciphertext",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "api_key_iv": {
+ "name": "api_key_iv",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "api_key_auth_tag": {
+ "name": "api_key_auth_tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "memory_enabled": {
+ "name": "memory_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "memory_last_messages": {
+ "name": "memory_last_messages",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "ai_agent_project_idx": {
+ "name": "ai_agent_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ai_agent_project_id_project_id_fk": {
+ "name": "ai_agent_project_id_project_id_fk",
+ "tableFrom": "ai_agent",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ai_agent_user_id_user_id_fk": {
+ "name": "ai_agent_user_id_user_id_fk",
+ "tableFrom": "ai_agent",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ai_agent_model_credential_id_integration_credential_id_fk": {
+ "name": "ai_agent_model_credential_id_integration_credential_id_fk",
+ "tableFrom": "ai_agent",
+ "tableTo": "integration_credential",
+ "columnsFrom": [
+ "model_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ai_agent_role_id_project_role_id_fk": {
+ "name": "ai_agent_role_id_project_role_id_fk",
+ "tableFrom": "ai_agent",
+ "tableTo": "project_role",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ai_agent_project_id_username_unique": {
+ "name": "ai_agent_project_id_username_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "username"
+ ]
+ },
+ "ai_agent_user_id_unique": {
+ "name": "ai_agent_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {
+ "ai_agent_kind_check": {
+ "name": "ai_agent_kind_check",
+ "value": "\"ai_agent\".\"kind\" IN ('external', 'internal')"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.app_secret": {
+ "name": "app_secret",
+ "schema": "",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "ciphertext": {
+ "name": "ciphertext",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "iv": {
+ "name": "iv",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "auth_tag": {
+ "name": "auth_tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "redacted": {
+ "name": "redacted",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.app_setting": {
+ "name": "app_setting",
+ "schema": "",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.custom_field": {
+ "name": "custom_field",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issue_type_id": {
+ "name": "issue_type_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "field_type": {
+ "name": "field_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "show_in_body": {
+ "name": "show_in_body",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "position": {
+ "name": "position",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "custom_field_project_id_project_id_fk": {
+ "name": "custom_field_project_id_project_id_fk",
+ "tableFrom": "custom_field",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "custom_field_issue_type_id_issue_type_id_fk": {
+ "name": "custom_field_issue_type_id_issue_type_id_fk",
+ "tableFrom": "custom_field",
+ "tableTo": "issue_type",
+ "columnsFrom": [
+ "issue_type_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "custom_field_field_type_check": {
+ "name": "custom_field_field_type_check",
+ "value": "\"custom_field\".\"field_type\" IN ('text', 'markdown', 'url', 'number', 'boolean', 'date', 'select', 'multi_select')"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.custom_field_option": {
+ "name": "custom_field_option",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "field_id": {
+ "name": "field_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'#6b7280'"
+ },
+ "position": {
+ "name": "position",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "custom_field_option_field_id_custom_field_id_fk": {
+ "name": "custom_field_option_field_id_custom_field_id_fk",
+ "tableFrom": "custom_field_option",
+ "tableTo": "custom_field",
+ "columnsFrom": [
+ "field_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "custom_field_option_field_id_value_unique": {
+ "name": "custom_field_option_field_id_value_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "field_id",
+ "value"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.cycle": {
+ "name": "cycle",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "goal": {
+ "name": "goal",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "start_date": {
+ "name": "start_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "end_date": {
+ "name": "end_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "cycle_project_idx": {
+ "name": "cycle_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "start_date",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "cycle_project_id_project_id_fk": {
+ "name": "cycle_project_id_project_id_fk",
+ "tableFrom": "cycle",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "cycle_dates_check": {
+ "name": "cycle_dates_check",
+ "value": "\"cycle\".\"end_date\" >= \"cycle\".\"start_date\""
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.initiative": {
+ "name": "initiative",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'planned'"
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "priority": {
+ "name": "priority",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start_date": {
+ "name": "start_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_date": {
+ "name": "target_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "position": {
+ "name": "position",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "initiative_project_idx": {
+ "name": "initiative_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "position",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "initiative_project_id_project_id_fk": {
+ "name": "initiative_project_id_project_id_fk",
+ "tableFrom": "initiative",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "initiative_owner_user_id_user_id_fk": {
+ "name": "initiative_owner_user_id_user_id_fk",
+ "tableFrom": "initiative",
+ "tableTo": "user",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "initiative_status_check": {
+ "name": "initiative_status_check",
+ "value": "\"initiative\".\"status\" IN ('proposed', 'planned', 'active', 'completed', 'canceled')"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.initiative_label": {
+ "name": "initiative_label",
+ "schema": "",
+ "columns": {
+ "initiative_id": {
+ "name": "initiative_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label_id": {
+ "name": "label_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "initiative_label_initiative_id_initiative_id_fk": {
+ "name": "initiative_label_initiative_id_initiative_id_fk",
+ "tableFrom": "initiative_label",
+ "tableTo": "initiative",
+ "columnsFrom": [
+ "initiative_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "initiative_label_label_id_label_id_fk": {
+ "name": "initiative_label_label_id_label_id_fk",
+ "tableFrom": "initiative_label",
+ "tableTo": "label",
+ "columnsFrom": [
+ "label_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "initiative_label_initiative_id_label_id_pk": {
+ "name": "initiative_label_initiative_id_label_id_pk",
+ "columns": [
+ "initiative_id",
+ "label_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.integration_credential": {
+ "name": "integration_credential",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "integration_key": {
+ "name": "integration_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ciphertext": {
+ "name": "ciphertext",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "iv": {
+ "name": "iv",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "auth_tag": {
+ "name": "auth_tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "redacted": {
+ "name": "redacted",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "integration_credential_project_idx": {
+ "name": "integration_credential_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "integration_credential_project_id_project_id_fk": {
+ "name": "integration_credential_project_id_project_id_fk",
+ "tableFrom": "integration_credential",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.issue": {
+ "name": "issue",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sequence_number": {
+ "name": "sequence_number",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initiative_id": {
+ "name": "initiative_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cycle_id": {
+ "name": "cycle_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "column_id": {
+ "name": "column_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "parent_id": {
+ "name": "parent_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "assignee_user_id": {
+ "name": "assignee_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "delegate_user_id": {
+ "name": "delegate_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "priority": {
+ "name": "priority",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "start_date": {
+ "name": "start_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "due_date": {
+ "name": "due_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "position": {
+ "name": "position",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "archived_at": {
+ "name": "archived_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "share_token": {
+ "name": "share_token",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "share_extended": {
+ "name": "share_extended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "issue_project_active_idx": {
+ "name": "issue_project_active_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "column_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "where": "\"issue\".\"archived_at\" IS NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "issue_parent_idx": {
+ "name": "issue_parent_idx",
+ "columns": [
+ {
+ "expression": "parent_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "where": "\"issue\".\"parent_id\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "issue_cycle_idx": {
+ "name": "issue_cycle_idx",
+ "columns": [
+ {
+ "expression": "cycle_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "where": "\"issue\".\"cycle_id\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "issue_project_id_project_id_fk": {
+ "name": "issue_project_id_project_id_fk",
+ "tableFrom": "issue",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "issue_type_id_issue_type_id_fk": {
+ "name": "issue_type_id_issue_type_id_fk",
+ "tableFrom": "issue",
+ "tableTo": "issue_type",
+ "columnsFrom": [
+ "type_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "issue_initiative_id_initiative_id_fk": {
+ "name": "issue_initiative_id_initiative_id_fk",
+ "tableFrom": "issue",
+ "tableTo": "initiative",
+ "columnsFrom": [
+ "initiative_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "issue_cycle_id_cycle_id_fk": {
+ "name": "issue_cycle_id_cycle_id_fk",
+ "tableFrom": "issue",
+ "tableTo": "cycle",
+ "columnsFrom": [
+ "cycle_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "issue_column_id_project_column_id_fk": {
+ "name": "issue_column_id_project_column_id_fk",
+ "tableFrom": "issue",
+ "tableTo": "project_column",
+ "columnsFrom": [
+ "column_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "issue_parent_id_issue_id_fk": {
+ "name": "issue_parent_id_issue_id_fk",
+ "tableFrom": "issue",
+ "tableTo": "issue",
+ "columnsFrom": [
+ "parent_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "issue_assignee_user_id_user_id_fk": {
+ "name": "issue_assignee_user_id_user_id_fk",
+ "tableFrom": "issue",
+ "tableTo": "user",
+ "columnsFrom": [
+ "assignee_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "issue_delegate_user_id_user_id_fk": {
+ "name": "issue_delegate_user_id_user_id_fk",
+ "tableFrom": "issue",
+ "tableTo": "user",
+ "columnsFrom": [
+ "delegate_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "issue_share_token_unique": {
+ "name": "issue_share_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "share_token"
+ ]
+ },
+ "issue_project_id_sequence_number_unique": {
+ "name": "issue_project_id_sequence_number_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "sequence_number"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.issue_activity": {
+ "name": "issue_activity",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "issue_id": {
+ "name": "issue_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "initiative_id": {
+ "name": "initiative_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "actor_user_id": {
+ "name": "actor_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actor_name": {
+ "name": "actor_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "body": {
+ "name": "body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "from_text": {
+ "name": "from_text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "to_text": {
+ "name": "to_text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "issue_activity_issue_idx": {
+ "name": "issue_activity_issue_idx",
+ "columns": [
+ {
+ "expression": "issue_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": false,
+ "nulls": "last"
+ },
+ {
+ "expression": "id",
+ "isExpression": false,
+ "asc": false,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "issue_activity_initiative_idx": {
+ "name": "issue_activity_initiative_idx",
+ "columns": [
+ {
+ "expression": "initiative_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": false,
+ "nulls": "last"
+ },
+ {
+ "expression": "id",
+ "isExpression": false,
+ "asc": false,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "issue_activity_issue_id_issue_id_fk": {
+ "name": "issue_activity_issue_id_issue_id_fk",
+ "tableFrom": "issue_activity",
+ "tableTo": "issue",
+ "columnsFrom": [
+ "issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "issue_activity_initiative_id_initiative_id_fk": {
+ "name": "issue_activity_initiative_id_initiative_id_fk",
+ "tableFrom": "issue_activity",
+ "tableTo": "initiative",
+ "columnsFrom": [
+ "initiative_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "issue_activity_actor_user_id_user_id_fk": {
+ "name": "issue_activity_actor_user_id_user_id_fk",
+ "tableFrom": "issue_activity",
+ "tableTo": "user",
+ "columnsFrom": [
+ "actor_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "issue_activity_kind_check": {
+ "name": "issue_activity_kind_check",
+ "value": "\"issue_activity\".\"kind\" IN ('comment', 'activity')"
+ },
+ "issue_activity_owner_check": {
+ "name": "issue_activity_owner_check",
+ "value": "(\"issue_activity\".\"issue_id\" IS NOT NULL) <> (\"issue_activity\".\"initiative_id\" IS NOT NULL)"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.issue_attachment": {
+ "name": "issue_attachment",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "public_id": {
+ "name": "public_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "issue_id": {
+ "name": "issue_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "s3_key": {
+ "name": "s3_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "filename": {
+ "name": "filename",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content_type": {
+ "name": "content_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "size_bytes": {
+ "name": "size_bytes",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "issue_attachment_issue_idx": {
+ "name": "issue_attachment_issue_idx",
+ "columns": [
+ {
+ "expression": "issue_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "issue_attachment_issue_id_issue_id_fk": {
+ "name": "issue_attachment_issue_id_issue_id_fk",
+ "tableFrom": "issue_attachment",
+ "tableTo": "issue",
+ "columnsFrom": [
+ "issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "issue_attachment_public_id_unique": {
+ "name": "issue_attachment_public_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "public_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.issue_checklist": {
+ "name": "issue_checklist",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "issue_id": {
+ "name": "issue_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "position": {
+ "name": "position",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "issue_checklist_issue_idx": {
+ "name": "issue_checklist_issue_idx",
+ "columns": [
+ {
+ "expression": "issue_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "position",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "issue_checklist_issue_id_issue_id_fk": {
+ "name": "issue_checklist_issue_id_issue_id_fk",
+ "tableFrom": "issue_checklist",
+ "tableTo": "issue",
+ "columnsFrom": [
+ "issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.issue_checklist_item": {
+ "name": "issue_checklist_item",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "checklist_id": {
+ "name": "checklist_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "done": {
+ "name": "done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "position": {
+ "name": "position",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "issue_checklist_item_checklist_idx": {
+ "name": "issue_checklist_item_checklist_idx",
+ "columns": [
+ {
+ "expression": "checklist_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "position",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "issue_checklist_item_checklist_id_issue_checklist_id_fk": {
+ "name": "issue_checklist_item_checklist_id_issue_checklist_id_fk",
+ "tableFrom": "issue_checklist_item",
+ "tableTo": "issue_checklist",
+ "columnsFrom": [
+ "checklist_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.issue_field_option": {
+ "name": "issue_field_option",
+ "schema": "",
+ "columns": {
+ "issue_id": {
+ "name": "issue_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "field_id": {
+ "name": "field_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "option_id": {
+ "name": "option_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "issue_field_option_issue_id_issue_id_fk": {
+ "name": "issue_field_option_issue_id_issue_id_fk",
+ "tableFrom": "issue_field_option",
+ "tableTo": "issue",
+ "columnsFrom": [
+ "issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "issue_field_option_field_id_custom_field_id_fk": {
+ "name": "issue_field_option_field_id_custom_field_id_fk",
+ "tableFrom": "issue_field_option",
+ "tableTo": "custom_field",
+ "columnsFrom": [
+ "field_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "issue_field_option_option_id_custom_field_option_id_fk": {
+ "name": "issue_field_option_option_id_custom_field_option_id_fk",
+ "tableFrom": "issue_field_option",
+ "tableTo": "custom_field_option",
+ "columnsFrom": [
+ "option_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "issue_field_option_issue_id_field_id_option_id_pk": {
+ "name": "issue_field_option_issue_id_field_id_option_id_pk",
+ "columns": [
+ "issue_id",
+ "field_id",
+ "option_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.issue_field_value": {
+ "name": "issue_field_value",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "issue_id": {
+ "name": "issue_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "field_id": {
+ "name": "field_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "value_text": {
+ "name": "value_text",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "value_number": {
+ "name": "value_number",
+ "type": "numeric",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "value_bool": {
+ "name": "value_bool",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "value_date": {
+ "name": "value_date",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "issue_field_value_issue_id_issue_id_fk": {
+ "name": "issue_field_value_issue_id_issue_id_fk",
+ "tableFrom": "issue_field_value",
+ "tableTo": "issue",
+ "columnsFrom": [
+ "issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "issue_field_value_field_id_custom_field_id_fk": {
+ "name": "issue_field_value_field_id_custom_field_id_fk",
+ "tableFrom": "issue_field_value",
+ "tableTo": "custom_field",
+ "columnsFrom": [
+ "field_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "issue_field_value_issue_id_field_id_unique": {
+ "name": "issue_field_value_issue_id_field_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "issue_id",
+ "field_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.issue_label": {
+ "name": "issue_label",
+ "schema": "",
+ "columns": {
+ "issue_id": {
+ "name": "issue_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label_id": {
+ "name": "label_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "issue_label_issue_id_issue_id_fk": {
+ "name": "issue_label_issue_id_issue_id_fk",
+ "tableFrom": "issue_label",
+ "tableTo": "issue",
+ "columnsFrom": [
+ "issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "issue_label_label_id_label_id_fk": {
+ "name": "issue_label_label_id_label_id_fk",
+ "tableFrom": "issue_label",
+ "tableTo": "label",
+ "columnsFrom": [
+ "label_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "issue_label_issue_id_label_id_pk": {
+ "name": "issue_label_issue_id_label_id_pk",
+ "columns": [
+ "issue_id",
+ "label_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.issue_link": {
+ "name": "issue_link",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "source_issue_id": {
+ "name": "source_issue_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_issue_id": {
+ "name": "target_issue_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "issue_link_pair_kind_idx": {
+ "name": "issue_link_pair_kind_idx",
+ "columns": [
+ {
+ "expression": "least(\"source_issue_id\", \"target_issue_id\")",
+ "asc": true,
+ "isExpression": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "greatest(\"source_issue_id\", \"target_issue_id\")",
+ "asc": true,
+ "isExpression": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "kind",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "issue_link_source_idx": {
+ "name": "issue_link_source_idx",
+ "columns": [
+ {
+ "expression": "source_issue_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "issue_link_target_idx": {
+ "name": "issue_link_target_idx",
+ "columns": [
+ {
+ "expression": "target_issue_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "issue_link_source_issue_id_issue_id_fk": {
+ "name": "issue_link_source_issue_id_issue_id_fk",
+ "tableFrom": "issue_link",
+ "tableTo": "issue",
+ "columnsFrom": [
+ "source_issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "issue_link_target_issue_id_issue_id_fk": {
+ "name": "issue_link_target_issue_id_issue_id_fk",
+ "tableFrom": "issue_link",
+ "tableTo": "issue",
+ "columnsFrom": [
+ "target_issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "issue_link_kind_check": {
+ "name": "issue_link_kind_check",
+ "value": "\"issue_link\".\"kind\" IN ('blocks', 'relates', 'duplicates')"
+ },
+ "issue_link_self_check": {
+ "name": "issue_link_self_check",
+ "value": "\"issue_link\".\"source_issue_id\" <> \"issue_link\".\"target_issue_id\""
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.issue_type": {
+ "name": "issue_type",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'#6b7280'"
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "position": {
+ "name": "position",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "issue_type_project_id_project_id_fk": {
+ "name": "issue_type_project_id_project_id_fk",
+ "tableFrom": "issue_type",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "issue_type_project_id_name_unique": {
+ "name": "issue_type_project_id_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.issue_watcher": {
+ "name": "issue_watcher",
+ "schema": "",
+ "columns": {
+ "issue_id": {
+ "name": "issue_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subscribed": {
+ "name": "subscribed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "issue_watcher_issue_id_issue_id_fk": {
+ "name": "issue_watcher_issue_id_issue_id_fk",
+ "tableFrom": "issue_watcher",
+ "tableTo": "issue",
+ "columnsFrom": [
+ "issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "issue_watcher_user_id_user_id_fk": {
+ "name": "issue_watcher_user_id_user_id_fk",
+ "tableFrom": "issue_watcher",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "issue_watcher_issue_id_user_id_pk": {
+ "name": "issue_watcher_issue_id_user_id_pk",
+ "columns": [
+ "issue_id",
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.label": {
+ "name": "label",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'#6b7280'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "label_project_id_project_id_fk": {
+ "name": "label_project_id_project_id_fk",
+ "tableFrom": "label",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "label_group_id_label_group_id_fk": {
+ "name": "label_group_id_label_group_id_fk",
+ "tableFrom": "label",
+ "tableTo": "label_group",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "label_project_id_name_unique": {
+ "name": "label_project_id_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.label_group": {
+ "name": "label_group",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'#6b7280'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "label_group_project_id_project_id_fk": {
+ "name": "label_group_project_id_project_id_fk",
+ "tableFrom": "label_group",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "label_group_project_id_name_unique": {
+ "name": "label_group_project_id_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.note_board": {
+ "name": "note_board",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by_user_id": {
+ "name": "created_by_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "canvas": {
+ "name": "canvas",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "note_board_project_idx": {
+ "name": "note_board_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "updated_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "note_board_project_id_project_id_fk": {
+ "name": "note_board_project_id_project_id_fk",
+ "tableFrom": "note_board",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "note_board_owner_user_id_user_id_fk": {
+ "name": "note_board_owner_user_id_user_id_fk",
+ "tableFrom": "note_board",
+ "tableTo": "user",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "note_board_created_by_user_id_user_id_fk": {
+ "name": "note_board_created_by_user_id_user_id_fk",
+ "tableFrom": "note_board",
+ "tableTo": "user",
+ "columnsFrom": [
+ "created_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.note_board_member": {
+ "name": "note_board_member",
+ "schema": "",
+ "columns": {
+ "board_id": {
+ "name": "board_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {
+ "note_board_member_user_idx": {
+ "name": "note_board_member_user_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "note_board_member_board_id_note_board_id_fk": {
+ "name": "note_board_member_board_id_note_board_id_fk",
+ "tableFrom": "note_board_member",
+ "tableTo": "note_board",
+ "columnsFrom": [
+ "board_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "note_board_member_user_id_user_id_fk": {
+ "name": "note_board_member_user_id_user_id_fk",
+ "tableFrom": "note_board_member",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "note_board_member_board_id_user_id_pk": {
+ "name": "note_board_member_board_id_user_id_pk",
+ "columns": [
+ "board_id",
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification": {
+ "name": "notification",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issue_id": {
+ "name": "issue_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "source_activity_id": {
+ "name": "source_activity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "actor_user_id": {
+ "name": "actor_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "actor_name": {
+ "name": "actor_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "read_at": {
+ "name": "read_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "snoozed_until": {
+ "name": "snoozed_until",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "notification_user_idx": {
+ "name": "notification_user_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": false,
+ "nulls": "last"
+ },
+ {
+ "expression": "id",
+ "isExpression": false,
+ "asc": false,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "notification_user_unread_idx": {
+ "name": "notification_user_unread_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "id",
+ "isExpression": false,
+ "asc": false,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "where": "\"notification\".\"read_at\" IS NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "notification_user_id_user_id_fk": {
+ "name": "notification_user_id_user_id_fk",
+ "tableFrom": "notification",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_project_id_project_id_fk": {
+ "name": "notification_project_id_project_id_fk",
+ "tableFrom": "notification",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_issue_id_issue_id_fk": {
+ "name": "notification_issue_id_issue_id_fk",
+ "tableFrom": "notification",
+ "tableTo": "issue",
+ "columnsFrom": [
+ "issue_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "notification_source_activity_id_issue_activity_id_fk": {
+ "name": "notification_source_activity_id_issue_activity_id_fk",
+ "tableFrom": "notification",
+ "tableTo": "issue_activity",
+ "columnsFrom": [
+ "source_activity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "notification_actor_user_id_user_id_fk": {
+ "name": "notification_actor_user_id_user_id_fk",
+ "tableFrom": "notification",
+ "tableTo": "user",
+ "columnsFrom": [
+ "actor_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "notification_type_check": {
+ "name": "notification_type_check",
+ "value": "\"notification\".\"type\" IN ('assigned', 'mentioned', 'commented', 'state_changed')"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.notification_delivery": {
+ "name": "notification_delivery",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel": {
+ "name": "channel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "recipient": {
+ "name": "recipient",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "attempts": {
+ "name": "attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "next_attempt_at": {
+ "name": "next_attempt_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_error": {
+ "name": "last_error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "notification_delivery_due_idx": {
+ "name": "notification_delivery_due_idx",
+ "columns": [
+ {
+ "expression": "next_attempt_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "where": "\"notification_delivery\".\"status\" = 'pending'",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "notification_delivery_project_id_project_id_fk": {
+ "name": "notification_delivery_project_id_project_id_fk",
+ "tableFrom": "notification_delivery",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "notification_delivery_channel_check": {
+ "name": "notification_delivery_channel_check",
+ "value": "\"notification_delivery\".\"channel\" IN ('email', 'telegram')"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.project": {
+ "name": "project",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "next_sequence": {
+ "name": "next_sequence",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "mcp_enabled": {
+ "name": "mcp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "initiatives_enabled": {
+ "name": "initiatives_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "dashboards_enabled": {
+ "name": "dashboards_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "notes_enabled": {
+ "name": "notes_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "cycles_enabled": {
+ "name": "cycles_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "subtasks_enabled": {
+ "name": "subtasks_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "checklists_enabled": {
+ "name": "checklists_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "issue_stats_enabled": {
+ "name": "issue_stats_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "project_key_unique": {
+ "name": "project_key_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "key"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_action": {
+ "name": "project_action",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "condition": {
+ "name": "condition",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "effect": {
+ "name": "effect",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "position": {
+ "name": "position",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "project_action_project_idx": {
+ "name": "project_action_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "position",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "project_action_project_id_project_id_fk": {
+ "name": "project_action_project_id_project_id_fk",
+ "tableFrom": "project_action",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_column": {
+ "name": "project_column",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state_type": {
+ "name": "state_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'unstarted'"
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'#6b7280'"
+ },
+ "position": {
+ "name": "position",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "project_column_project_id_project_id_fk": {
+ "name": "project_column_project_id_project_id_fk",
+ "tableFrom": "project_column",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "project_column_project_id_position_unique": {
+ "name": "project_column_project_id_position_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "position"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {
+ "project_column_state_type_check": {
+ "name": "project_column_state_type_check",
+ "value": "\"project_column\".\"state_type\" IN ('backlog', 'unstarted', 'started', 'completed', 'canceled')"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.project_dashboard": {
+ "name": "project_dashboard",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'[]'::jsonb"
+ },
+ "position": {
+ "name": "position",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "project_dashboard_project_idx": {
+ "name": "project_dashboard_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "position",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "project_dashboard_project_id_project_id_fk": {
+ "name": "project_dashboard_project_id_project_id_fk",
+ "tableFrom": "project_dashboard",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_invite": {
+ "name": "project_invite",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'member'"
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "invited_by_user_id": {
+ "name": "invited_by_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accepted_by_user_id": {
+ "name": "accepted_by_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "responded_at": {
+ "name": "responded_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "project_invite_pending_uq": {
+ "name": "project_invite_pending_uq",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "email",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"project_invite\".\"status\" = 'pending'",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "project_invite_project_idx": {
+ "name": "project_invite_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "project_invite_project_id_project_id_fk": {
+ "name": "project_invite_project_id_project_id_fk",
+ "tableFrom": "project_invite",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "project_invite_role_id_project_role_id_fk": {
+ "name": "project_invite_role_id_project_role_id_fk",
+ "tableFrom": "project_invite",
+ "tableTo": "project_role",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "project_invite_invited_by_user_id_user_id_fk": {
+ "name": "project_invite_invited_by_user_id_user_id_fk",
+ "tableFrom": "project_invite",
+ "tableTo": "user",
+ "columnsFrom": [
+ "invited_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "project_invite_accepted_by_user_id_user_id_fk": {
+ "name": "project_invite_accepted_by_user_id_user_id_fk",
+ "tableFrom": "project_invite",
+ "tableTo": "user",
+ "columnsFrom": [
+ "accepted_by_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "project_invite_token_unique": {
+ "name": "project_invite_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {
+ "project_invite_role_check": {
+ "name": "project_invite_role_check",
+ "value": "\"project_invite\".\"role\" IN ('owner', 'member')"
+ },
+ "project_invite_status_check": {
+ "name": "project_invite_status_check",
+ "value": "\"project_invite\".\"status\" IN ('pending', 'accepted', 'rejected')"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.project_member": {
+ "name": "project_member",
+ "schema": "",
+ "columns": {
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'member'"
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "project_member_user_idx": {
+ "name": "project_member_user_idx",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "project_member_project_id_project_id_fk": {
+ "name": "project_member_project_id_project_id_fk",
+ "tableFrom": "project_member",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "project_member_user_id_user_id_fk": {
+ "name": "project_member_user_id_user_id_fk",
+ "tableFrom": "project_member",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "project_member_role_id_project_role_id_fk": {
+ "name": "project_member_role_id_project_role_id_fk",
+ "tableFrom": "project_member",
+ "tableTo": "project_role",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "project_member_project_id_user_id_pk": {
+ "name": "project_member_project_id_user_id_pk",
+ "columns": [
+ "project_id",
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "project_member_role_check": {
+ "name": "project_member_role_check",
+ "value": "\"project_member\".\"role\" IN ('owner', 'member')"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.project_notification_setting": {
+ "name": "project_notification_setting",
+ "schema": "",
+ "columns": {
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "ciphertext": {
+ "name": "ciphertext",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "iv": {
+ "name": "iv",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "auth_tag": {
+ "name": "auth_tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "redacted": {
+ "name": "redacted",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "project_notification_setting_project_id_project_id_fk": {
+ "name": "project_notification_setting_project_id_project_id_fk",
+ "tableFrom": "project_notification_setting",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_role": {
+ "name": "project_role",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "project_role_default_uq": {
+ "name": "project_role_default_uq",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"project_role\".\"is_default\"",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "project_role_project_idx": {
+ "name": "project_role_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "project_role_project_id_project_id_fk": {
+ "name": "project_role_project_id_project_id_fk",
+ "tableFrom": "project_role",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "project_role_project_id_name_unique": {
+ "name": "project_role_project_id_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "project_id",
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_setting": {
+ "name": "project_setting",
+ "schema": "",
+ "columns": {
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "project_setting_project_id_project_id_fk": {
+ "name": "project_setting_project_id_project_id_fk",
+ "tableFrom": "project_setting",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "project_setting_project_id_key_pk": {
+ "name": "project_setting_project_id_key_pk",
+ "columns": [
+ "project_id",
+ "key"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.project_view": {
+ "name": "project_view",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "filters": {
+ "name": "filters",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "display": {
+ "name": "display",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "position": {
+ "name": "position",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "share_token": {
+ "name": "share_token",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "share_extended": {
+ "name": "share_extended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "project_view_project_idx": {
+ "name": "project_view_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "position",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "project_view_project_id_project_id_fk": {
+ "name": "project_view_project_id_project_id_fk",
+ "tableFrom": "project_view",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "project_view_share_token_unique": {
+ "name": "project_view_share_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "share_token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.revision": {
+ "name": "revision",
+ "schema": "",
+ "columns": {
+ "scope": {
+ "name": "scope",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rev": {
+ "name": "rev",
+ "type": "bigint",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "revision_project_idx": {
+ "name": "revision_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_notification_preference": {
+ "name": "user_notification_preference",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email_events": {
+ "name": "email_events",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "telegram_events": {
+ "name": "telegram_events",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_notification_preference_user_id_user_id_fk": {
+ "name": "user_notification_preference_user_id_user_id_fk",
+ "tableFrom": "user_notification_preference",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_notification_preference_project_id_project_id_fk": {
+ "name": "user_notification_preference_project_id_project_id_fk",
+ "tableFrom": "user_notification_preference",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_notification_pref_user_project_unique": {
+ "name": "user_notification_pref_user_project_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "project_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_preference": {
+ "name": "user_preference",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "timezone": {
+ "name": "timezone",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'UTC'"
+ },
+ "locale": {
+ "name": "locale",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'en'"
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'system'"
+ },
+ "issue_open_mode": {
+ "name": "issue_open_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'panel'"
+ },
+ "start_page": {
+ "name": "start_page",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'work-items'"
+ },
+ "show_chat_by_default": {
+ "name": "show_chat_by_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "issue_stats_open": {
+ "name": "issue_stats_open",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "issue_stats_view": {
+ "name": "issue_stats_view",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'compact'"
+ },
+ "issue_activity_view": {
+ "name": "issue_activity_view",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'flat'"
+ },
+ "auto_watch": {
+ "name": "auto_watch",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "hotkeys": {
+ "name": "hotkeys",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_project_id": {
+ "name": "last_project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preference_user_id_user_id_fk": {
+ "name": "user_preference_user_id_user_id_fk",
+ "tableFrom": "user_preference",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_preference_last_project_id_project_id_fk": {
+ "name": "user_preference_last_project_id_project_id_fk",
+ "tableFrom": "user_preference",
+ "tableTo": "project",
+ "columnsFrom": [
+ "last_project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "user_preference_theme_check": {
+ "name": "user_preference_theme_check",
+ "value": "\"user_preference\".\"theme\" IN ('light', 'dark', 'system')"
+ },
+ "user_preference_issue_open_mode_check": {
+ "name": "user_preference_issue_open_mode_check",
+ "value": "\"user_preference\".\"issue_open_mode\" IN ('panel', 'page')"
+ },
+ "user_preference_start_page_check": {
+ "name": "user_preference_start_page_check",
+ "value": "\"user_preference\".\"start_page\" IN ('inbox', 'dashboard', 'work-items', 'initiatives', 'ai-chat')"
+ },
+ "user_preference_issue_stats_view_check": {
+ "name": "user_preference_issue_stats_view_check",
+ "value": "\"user_preference\".\"issue_stats_view\" IN ('compact', 'timeline')"
+ },
+ "user_preference_issue_activity_view_check": {
+ "name": "user_preference_issue_activity_view_check",
+ "value": "\"user_preference\".\"issue_activity_view\" IN ('flat', 'grouped')"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "public.user_telegram_account": {
+ "name": "user_telegram_account",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "chat_id": {
+ "name": "chat_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "first_name": {
+ "name": "first_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "link_code": {
+ "name": "link_code",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "link_code_expires_at": {
+ "name": "link_code_expires_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "linked_at": {
+ "name": "linked_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "user_telegram_account_chat_id_unique": {
+ "name": "user_telegram_account_chat_id_unique",
+ "columns": [
+ {
+ "expression": "chat_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"user_telegram_account\".\"chat_id\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "user_telegram_account_link_code_unique": {
+ "name": "user_telegram_account_link_code_unique",
+ "columns": [
+ {
+ "expression": "link_code",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "where": "\"user_telegram_account\".\"link_code\" IS NOT NULL",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_telegram_account_user_id_user_id_fk": {
+ "name": "user_telegram_account_user_id_user_id_fk",
+ "tableFrom": "user_telegram_account",
+ "tableTo": "user",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webhook": {
+ "name": "webhook",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "project_id": {
+ "name": "project_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "secret": {
+ "name": "secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "events": {
+ "name": "events",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'[]'::jsonb"
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "consecutive_failures": {
+ "name": "consecutive_failures",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "webhook_project_idx": {
+ "name": "webhook_project_idx",
+ "columns": [
+ {
+ "expression": "project_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "webhook_project_id_project_id_fk": {
+ "name": "webhook_project_id_project_id_fk",
+ "tableFrom": "webhook",
+ "tableTo": "project",
+ "columnsFrom": [
+ "project_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webhook_delivery": {
+ "name": "webhook_delivery",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "webhook_id": {
+ "name": "webhook_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "event_id": {
+ "name": "event_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "event_type": {
+ "name": "event_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "attempts": {
+ "name": "attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "next_attempt_at": {
+ "name": "next_attempt_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_error": {
+ "name": "last_error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_status": {
+ "name": "response_status",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response_body": {
+ "name": "response_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "webhook_delivery_due_idx": {
+ "name": "webhook_delivery_due_idx",
+ "columns": [
+ {
+ "expression": "next_attempt_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "where": "\"webhook_delivery\".\"status\" = 'pending'",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "webhook_delivery_webhook_idx": {
+ "name": "webhook_delivery_webhook_idx",
+ "columns": [
+ {
+ "expression": "webhook_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "webhook_delivery_webhook_id_webhook_id_fk": {
+ "name": "webhook_delivery_webhook_id_webhook_id_fk",
+ "tableFrom": "webhook_delivery",
+ "tableTo": "webhook",
+ "columnsFrom": [
+ "webhook_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db/drizzle/meta/_journal.json b/packages/db/drizzle/meta/_journal.json
index 3d9db611..99d42ac6 100644
--- a/packages/db/drizzle/meta/_journal.json
+++ b/packages/db/drizzle/meta/_journal.json
@@ -498,6 +498,20 @@
"when": 1786401369000,
"tag": "0070_revision_triggers",
"breakpoints": true
+ },
+ {
+ "idx": 71,
+ "version": "7",
+ "when": 1786457359419,
+ "tag": "0071_little_omega_red",
+ "breakpoints": true
+ },
+ {
+ "idx": 72,
+ "version": "7",
+ "when": 1786497730861,
+ "tag": "0072_amused_magik",
+ "breakpoints": true
}
]
}
\ No newline at end of file
diff --git a/packages/db/src/schema/app.ts b/packages/db/src/schema/app.ts
index 65923799..492be559 100644
--- a/packages/db/src/schema/app.ts
+++ b/packages/db/src/schema/app.ts
@@ -94,6 +94,9 @@ export const projectSetting = pgTable(
// A user's own interface preferences, held per account rather than per project so
// the same choices apply on every device. timezone is an IANA zone name used by the
// web app to render stored UTC timestamps; the API keeps storing and returning UTC.
+// locale is the interface language, also used for the emails and the Telegram bot
+// messages this user receives; it has no CHECK, unlike the columns below, so adding a
+// language costs no migration.
// theme is 'light' | 'dark' | 'system', issue_open_mode is 'panel' | 'page' (how a
// clicked issue opens), start_page is the section the app root lands on. Absent row
// means the user has not changed anything and the defaults below apply.
@@ -116,6 +119,7 @@ export const userPreference = pgTable(
.primaryKey()
.references(() => user.id, { onDelete: 'cascade' }),
timezone: text('timezone').notNull().default('UTC'),
+ locale: text('locale').notNull().default('en'),
theme: text('theme').notNull().default('system'),
issueOpenMode: text('issue_open_mode').notNull().default('panel'),
startPage: text('start_page').notNull().default('work-items'),