Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

feat(web): translate the global search dialog

Kilynbb5adcd713cb
diff --git a/apps/web/src/features/search/global-search-dialog.tsx b/apps/web/src/features/search/global-search-dialog.tsx
index 9bb7c100..5c458a51 100644
--- a/apps/web/src/features/search/global-search-dialog.tsx
+++ b/apps/web/src/features/search/global-search-dialog.tsx
@@ -1,7 +1,9 @@
import { ModalDialog } from "@/components/ui/modal-dialog";
import { useTeamHubRuntime } from "@/features/teamhub/teamhub-runtime";
+import { useT } from "@/i18n/use-translation";
import { SCOPES } from "./global-search-model";
+import { searchMessages as m } from "./global-search.messages";
import {
GlobalSearchField,
GlobalSearchFooter,
@@ -33,6 +35,7 @@ export function GlobalSearchDialog({
tenantId: string;
}) {
const { client } = useTeamHubRuntime();
+ const t = useT();
const {
debounced,
enterScope,
@@ -109,7 +112,7 @@ export function GlobalSearchDialog({
return (
<ModalDialog
- ariaLabel="Search"
+ ariaLabel={t(m.dialogLabel)}
className="global-search flex flex-col overflow-hidden"
closeOnBackdrop
onClose={onClose}
diff --git a/apps/web/src/features/search/global-search-model.ts b/apps/web/src/features/search/global-search-model.ts
index d8df68c5..20dc59f4 100644
--- a/apps/web/src/features/search/global-search-model.ts
+++ b/apps/web/src/features/search/global-search-model.ts
@@ -19,7 +19,10 @@ import type {
TeamHubRoomListItem,
TeamHubTenantAgent,
} from "@/features/teamhub/teamhub-types";
+import { type Translate, translate } from "@/i18n/language";
+import type { Message } from "@/i18n/messages";
+import { searchMessages as m } from "./global-search.messages";
import type { SearchTarget, SearchTargetActor } from "./global-search-recent";
/** "people" is the Members scope: the Agents a Human can open a Direct Room with. */
@@ -35,35 +38,36 @@ export const GROUP_ORDER: readonly GroupTab[] = [
"rooms",
];
-export const SCOPES: Record<
- GroupTab,
- { hint: string; icon: IconSvgElement; label: string; placeholder: string }
-> = {
+/** Each scope's texts are messages, worded when they are shown. */
+export const SCOPES = {
messages: {
- hint: "Chats in your Rooms",
+ hint: m.messagesHint,
icon: Message01Icon,
- label: "Messages",
- placeholder: "Search messages",
+ label: m.messagesLabel,
+ placeholder: m.messagesPlaceholder,
},
people: {
- hint: "Agents you can message",
+ hint: m.membersHint,
icon: UserGroupIcon,
- label: "Members",
- placeholder: "Search members",
+ label: m.membersLabel,
+ placeholder: m.membersPlaceholder,
},
docs: {
- hint: "Docs and notes",
+ hint: m.docsHint,
icon: File01Icon,
- label: "Docs",
- placeholder: "Search docs",
+ label: m.docsLabel,
+ placeholder: m.docsPlaceholder,
},
rooms: {
- hint: "Rooms you can join",
+ hint: m.roomsHint,
icon: HashtagIcon,
- label: "Rooms",
- placeholder: "Search rooms",
+ label: m.roomsLabel,
+ placeholder: m.roomsPlaceholder,
},
-};
+} satisfies Record<
+ GroupTab,
+ { hint: Message; icon: IconSvgElement; label: Message; placeholder: Message }
+>;
export const SCOPE_ORDER: readonly GroupTab[] = [
"messages",
@@ -104,7 +108,7 @@ export interface ResultGroup {
}
export interface ResultSection {
- action?: { label: string; onSelect: () => void };
+ action?: { ariaLabel: string; label: string; onSelect: () => void };
items: SearchResult[];
key: string;
label: string;
@@ -140,18 +144,20 @@ export function rowScope(row: SearchResult | undefined): GroupTab | undefined {
}
}
-export function emptyDetail(tab: GlobalSearchTab, query: string) {
+export function emptyDetail(
+ tab: GlobalSearchTab,
+ query: string,
+ t: Translate = translate,
+) {
if (query === "") {
- return tab === "messages"
- ? "Type a word from the message you are looking for."
- : "Type a title or a word from the doc.";
+ return tab === "messages" ? t(m.emptyMessageHint) : t(m.emptyDocHint);
}
if (query.length < MIN_BACKEND_QUERY_LENGTH && tab !== "people") {
- return `Type at least ${MIN_BACKEND_QUERY_LENGTH} characters to search messages and docs.`;
+ return t(m.emptyTooShort, { min: MIN_BACKEND_QUERY_LENGTH });
}
return tab === "all"
- ? "Check the spelling or try a shorter word."
- : `Nothing in ${SCOPES[tab].label}. Try searching everywhere.`;
+ ? t(m.emptyCheckSpelling)
+ : t(m.emptyNothingIn, { scope: t(SCOPES[tab].label) });
}
export function byName<T>(read: (value: T) => string) {
@@ -171,14 +177,14 @@ function messageRoomLabel(
const parentName = room.parent_room_id
? roomNames.get(room.parent_room_id)
: undefined;
- return `#${parentName ?? room.name} · thread`;
+ return translate(m.threadIn, { name: parentName ?? room.name });
}
if (room.kind === "direct") return room.name;
return `#${room.name}`;
}
function documentLocationLabel(document: TeamHubDocument) {
- if (document.from.length === 0) return "Library";
+ if (document.from.length === 0) return translate(m.library);
return document.from
.map(
(binding) =>
diff --git a/apps/web/src/features/search/global-search-rows.tsx b/apps/web/src/features/search/global-search-rows.tsx
index 80b7d4c6..95f961d3 100644
--- a/apps/web/src/features/search/global-search-rows.tsx
+++ b/apps/web/src/features/search/global-search-rows.tsx
@@ -12,6 +12,8 @@ import { WorkspaceFileIcon } from "@/features/library/workspace-file-icon";
import { ActorAvatar } from "@/features/rooms/members/actor-avatar";
import { RoomAvatar } from "@/features/rooms/members/room-avatar";
import { markdownPlainText } from "@/features/teamhub/markdown-plain-text";
+import type { Translate } from "@/i18n/language";
+import { useT } from "@/i18n/use-translation";
import {
resultTarget,
@@ -20,6 +22,7 @@ import {
type SearchResult,
type TargetContext,
} from "./global-search-model";
+import { searchMessages as m } from "./global-search.messages";
import type { SearchTarget } from "./global-search-recent";
import { HighlightedText } from "./search-highlight";
import { relativeTimeLabel, snippetAround } from "./search-text";
@@ -94,6 +97,7 @@ export function ScopeCard({
onOpen: () => void;
tab: GroupTab;
}) {
+ const t = useT();
const scope = SCOPES[tab];
return (
<button
@@ -115,10 +119,10 @@ export function ScopeCard({
</span>
<span className="min-w-0">
<span className="block text-sm font-medium text-app-ink">
- {scope.label}
+ {t(scope.label)}
</span>
<span className="block truncate text-xs text-app-muted">
- {scope.hint}
+ {t(scope.hint)}
</span>
</span>
<Icon
@@ -153,14 +157,16 @@ export function ResultRow({
query: string;
result: SearchResult;
}) {
+ // Read before the early return so the row follows a language switch.
+ const t = useT();
if (result.kind === "scope") return null;
const target =
result.kind === "query" ? undefined : resultTarget(result, context);
const meta =
target?.kind === "message"
- ? relativeTimeLabel(target.createdAt)
+ ? relativeTimeLabel(target.createdAt, t)
: target?.kind === "document"
- ? relativeTimeLabel(target.updatedAt)
+ ? relativeTimeLabel(target.updatedAt, t)
: "";
return (
<button
@@ -233,7 +239,8 @@ function TargetRowContent({
/** A live Message's full text; a stored entry only keeps a preview. */
text?: string;
}) {
- const [title, detail] = rowLines(target, query, text);
+ const t = useT();
+ const [title, detail] = rowLines(target, query, t, text);
return (
<>
<TargetTile target={target} />
@@ -248,7 +255,7 @@ function TargetRowContent({
</span>
{target.kind === "message" ? (
<span className="shrink-0 truncate text-xs text-muted-foreground">
- in {target.roomLabel}
+ {t(m.inRoom, { room: target.roomLabel })}
</span>
) : null}
{target.kind === "agent" ? <AgentTag /> : null}
@@ -268,6 +275,7 @@ function TargetRowContent({
function rowLines(
target: SearchTarget,
query: string,
+ t: Translate,
text?: string,
): [string, string] {
switch (target.kind) {
@@ -281,14 +289,14 @@ function rowLines(
case "document":
return [target.fileName, `${target.location} · ${target.ownerName}`];
case "agent":
- return [target.name, target.description || "No description yet"];
+ return [target.name, target.description || t(m.noDescription)];
case "room":
return [
target.roomKind === "room" ? `#${target.name}` : target.name,
target.description ||
(target.roomKind === "thread"
- ? `#${target.parentName ?? ""} · thread`
- : "Room"),
+ ? t(m.threadIn, { name: target.parentName ?? "" })
+ : t(m.roomKind)),
];
}
}
@@ -338,9 +346,10 @@ function TargetTile({ target }: { target: SearchTarget }) {
}
function AgentTag() {
+ const t = useT();
return (
<span className="shrink-0 rounded-full bg-(--app-mention-surface) px-1.5 text-xs leading-[18px] font-medium text-(--app-mention-text)">
- Agent
+ {t(m.agentTag)}
</span>
);
}
diff --git a/apps/web/src/features/search/global-search-sections.tsx b/apps/web/src/features/search/global-search-sections.tsx
index c0a980ec..c2aeb645 100644
--- a/apps/web/src/features/search/global-search-sections.tsx
+++ b/apps/web/src/features/search/global-search-sections.tsx
@@ -8,6 +8,7 @@ import type { KeyboardEvent as ReactKeyboardEvent, RefObject } from "react";
import { Icon } from "@/components/ui/icon";
import { Spinner } from "@/components/ui/spinner";
+import { useT } from "@/i18n/use-translation";
import {
emptyDetail,
@@ -18,6 +19,7 @@ import {
type SearchResult,
type TargetContext,
} from "./global-search-model";
+import { searchMessages as m } from "./global-search.messages";
import {
EmptyState,
ResultRow,
@@ -54,9 +56,8 @@ export function GlobalSearchField({
scope: Scope | undefined;
tab: GlobalSearchTab;
}) {
- const placeholder = scope
- ? scope.placeholder
- : "Search messages, docs, members and rooms";
+ const t = useT();
+ const placeholder = scope ? t(scope.placeholder) : t(m.placeholderAll);
return (
<>
<div className="flex h-12 shrink-0 items-center gap-2 pl-4 pr-3">
@@ -75,9 +76,10 @@ export function GlobalSearchField({
{scope && tab !== "all" ? (
<span className="ml-1 inline-flex h-8 shrink-0 items-center gap-2 rounded-full bg-(--app-field-surface) pl-2.5 pr-1 text-xs font-medium text-foreground shadow-outline">
<Icon className="text-app-subtle" icon={scope.icon} size={16} />
- {scope.label}
+ {t(scope.label)}
<button
- aria-label={`Remove ${scope.label} scope`}
+ data-voice-risk="never"
+ aria-label={t(m.removeScope, { scope: t(scope.label) })}
className="grid size-6 shrink-0 place-items-center rounded-full text-muted-foreground transition-colors duration-150 hover:bg-accent hover:text-foreground"
onClick={() => enterScope("all")}
type="button"
@@ -92,7 +94,7 @@ export function GlobalSearchField({
}
aria-controls="global-search-results"
aria-expanded={rowCount > 0}
- aria-label="Search messages, docs, people, agents and rooms"
+ aria-label={t(m.inputLabel)}
className="ml-1 h-full min-w-0 flex-1 bg-transparent text-sm text-app-ink outline-none placeholder:text-app-placeholder"
onChange={(event) => onQueryChange(event.target.value)}
onKeyDown={onInputKeyDown}
@@ -156,6 +158,7 @@ export function GlobalSearchResultList({
tab: GlobalSearchTab;
targetContext: TargetContext;
}) {
+ const t = useT();
let rowIndex = 0;
return (
<div
@@ -176,8 +179,8 @@ export function GlobalSearchResultList({
/>
{error ? (
<EmptyState
- detail={error.message || "Search is unavailable."}
- title="Search failed"
+ detail={error.message || t(m.unavailable)}
+ title={t(m.failed)}
tone="danger"
/>
) : sections.length === 0 ? (
@@ -185,16 +188,18 @@ export function GlobalSearchResultList({
action={
tab !== "all" && debouncedQuery !== ""
? {
- label: "Search everywhere",
+ label: t(m.searchEverywhere),
onSelect: () => enterScope("all"),
}
: undefined
}
- detail={emptyDetail(tab, debouncedQuery)}
+ detail={emptyDetail(tab, debouncedQuery, t)}
title={
debouncedQuery === ""
- ? `Search ${scope?.label.toLocaleLowerCase() ?? ""}`.trim()
- : `No results for “${debouncedRaw}”`
+ ? scope
+ ? t(scope.placeholder)
+ : t(m.dialogLabel)
+ : t(m.noResults, { query: debouncedRaw })
}
/>
) : (
@@ -261,6 +266,7 @@ function SectionHeader({
inputRef: RefObject<HTMLInputElement | null>;
section: ResultSection;
}) {
+ const t = useT();
return (
<div className="flex h-7 items-center px-3 text-xs text-app-subtle">
{section.label}
@@ -270,12 +276,12 @@ function SectionHeader({
onClick={() => enterScope(section.seeAll!)}
type="button"
>
- See all in {SCOPES[section.seeAll].label}
+ {t(m.seeAllIn, { scope: t(SCOPES[section.seeAll].label) })}
<Icon icon={ArrowRight01Icon} size={14} />
</button>
) : section.action ? (
<button
- aria-label={`${section.action.label} ${section.label.toLocaleLowerCase()} searches`}
+ aria-label={section.action.ariaLabel}
className="-mr-1.5 ml-auto inline-flex h-6 items-center rounded-md px-1.5 text-xs text-app-subtle transition-colors hover:bg-app-hover hover:text-app-ink"
onClick={() => {
section.action!.onSelect();
@@ -296,6 +302,7 @@ export function GlobalSearchFooter({
}: {
openError: string | null;
}) {
+ const t = useT();
return (
<>
{openError ? (
@@ -312,17 +319,17 @@ export function GlobalSearchFooter({
<ShortcutKey>↑</ShortcutKey>
<ShortcutKey>↓</ShortcutKey>
</span>
- Navigate
+ {t(m.legendNavigate)}
</span>
<span className="flex items-center gap-2">
<ShortcutKey>
<Icon icon={ArrowTurnBackwardIcon} size={12} />
</ShortcutKey>
- Open
+ {t(m.legendOpen)}
</span>
<span className="flex items-center gap-2">
<ShortcutKey>Tab</ShortcutKey>
- Search in type
+ {t(m.legendScope)}
</span>
</div>
</>
diff --git a/apps/web/src/features/search/global-search.messages.ts b/apps/web/src/features/search/global-search.messages.ts
new file mode 100644
index 00000000..5bd655e7
--- /dev/null
+++ b/apps/web/src/features/search/global-search.messages.ts
@@ -0,0 +1,50 @@
+import { defineMessages } from "@/i18n/messages";
+
+/** The global search dialog: its field, scopes, result rows and empty states. */
+export const searchMessages = defineMessages("search", {
+ dialogLabel: "Search",
+ inputLabel: "Search messages, docs, people, agents and rooms",
+ placeholderAll: "Search messages, docs, members and rooms",
+ messagesLabel: "Messages",
+ messagesHint: "Chats in your Rooms",
+ messagesPlaceholder: "Search messages",
+ membersLabel: "Members",
+ membersHint: "Agents you can message",
+ membersPlaceholder: "Search members",
+ docsLabel: "Docs",
+ docsHint: "Docs and notes",
+ docsPlaceholder: "Search docs",
+ roomsLabel: "Rooms",
+ roomsHint: "Rooms you can join",
+ roomsPlaceholder: "Search rooms",
+ removeScope: "Remove {scope} scope",
+ searchIn: "Search in",
+ recent: "Recent",
+ clear: "Clear",
+ clearRecent: "Clear recent searches",
+ seeAllIn: "See all in {scope}",
+ failed: "Search failed",
+ unavailable: "Search is unavailable.",
+ searchEverywhere: "Search everywhere",
+ noResults: "No results for “{query}”",
+ emptyMessageHint: "Type a word from the message you are looking for.",
+ emptyDocHint: "Type a title or a word from the doc.",
+ emptyTooShort: "Type at least {min} characters to search messages and docs.",
+ emptyCheckSpelling: "Check the spelling or try a shorter word.",
+ emptyNothingIn: "Nothing in {scope}. Try searching everywhere.",
+ threadIn: "#{name} · thread",
+ library: "Library",
+ inRoom: "in {room}",
+ noDescription: "No description yet",
+ roomKind: "Room",
+ agentTag: "Agent",
+ ageNow: "now",
+ ageMinutes: "{value}m",
+ ageHours: "{value}h",
+ ageDays: "{value}d",
+ legendNavigate: "Navigate",
+ legendOpen: "Open",
+ legendScope: "Search in type",
+ openFailed: "This conversation could not be opened.",
+ openFailedUnknown: "The conversation could not be opened.",
+});
diff --git a/apps/web/src/features/search/search-text.ts b/apps/web/src/features/search/search-text.ts
index b1f0d1ff..d99d7597 100644
--- a/apps/web/src/features/search/search-text.ts
+++ b/apps/web/src/features/search/search-text.ts
@@ -1,5 +1,9 @@
/** Keyword helpers shared by the global search dialog: one case-insensitive substring, no ranking. */
+import { formatLocale, type Translate, translate } from "@/i18n/language";
+
+import { searchMessages as m } from "./global-search.messages";
+
export function normalizeSearchQuery(raw: string) {
return raw.trim().toLocaleLowerCase();
}
@@ -35,19 +39,26 @@ export function snippetAround(
}
/** Compact relative age for result rows: 5m, 3h, 2d, then a short date. */
-export function relativeTimeLabel(iso: string, now = Date.now()) {
+export function relativeTimeLabel(
+ iso: string,
+ t: Translate = translate,
+ now = Date.now(),
+) {
const time = Date.parse(iso);
if (!Number.isFinite(time)) return "";
const elapsed = Math.max(0, now - time);
const minute = 60_000;
- if (elapsed < minute) return "now";
- if (elapsed < 60 * minute) return `${Math.round(elapsed / minute)}m`;
- if (elapsed < 24 * 60 * minute)
- return `${Math.round(elapsed / (60 * minute))}h`;
+ if (elapsed < minute) return t(m.ageNow);
+ if (elapsed < 60 * minute) {
+ return t(m.ageMinutes, { value: Math.round(elapsed / minute) });
+ }
+ if (elapsed < 24 * 60 * minute) {
+ return t(m.ageHours, { value: Math.round(elapsed / (60 * minute)) });
+ }
if (elapsed < 7 * 24 * 60 * minute) {
- return `${Math.round(elapsed / (24 * 60 * minute))}d`;
+ return t(m.ageDays, { value: Math.round(elapsed / (24 * 60 * minute)) });
}
- return new Date(time).toLocaleDateString("en-US", {
+ return new Date(time).toLocaleDateString(formatLocale(), {
day: "numeric",
month: "short",
year: "numeric",
diff --git a/apps/web/src/features/search/use-global-search-actions.ts b/apps/web/src/features/search/use-global-search-actions.ts
index 9ea80fec..b4b52c9c 100644
--- a/apps/web/src/features/search/use-global-search-actions.ts
+++ b/apps/web/src/features/search/use-global-search-actions.ts
@@ -13,6 +13,7 @@ import { registerVoiceSearch } from "@/features/rooms/chat/voice-mode/voice-ui-b
import { tenantRoomsQueryKey } from "@/features/rooms/room-queries";
import { teamHubData } from "@/features/teamhub/teamhub-api";
import type { TeamHubClient } from "@/features/teamhub/teamhub-client";
+import { useT } from "@/i18n/use-translation";
import {
HIGHLIGHT_MAX_LENGTH,
@@ -24,6 +25,7 @@ import {
type SearchResult,
type TargetContext,
} from "./global-search-model";
+import { searchMessages as m } from "./global-search.messages";
import {
recordGlobalSearchQuery,
type GlobalSearchStore,
@@ -58,6 +60,7 @@ export function useOpenResult({
}) {
const queryClient = useQueryClient();
const navigate = useNavigate();
+ const t = useT();
const [openError, setOpenError] = useState<string | null>(null);
const openingRef = useRef(false);
@@ -97,7 +100,7 @@ export function useOpenResult({
const target = resultTarget(result, targetContext);
const destination = await conversationPath(target);
if (!destination) {
- setOpenError("This conversation could not be opened.");
+ setOpenError(t(m.openFailed));
return;
}
const keyword = query.trim().slice(0, HIGHLIGHT_MAX_LENGTH);
@@ -116,7 +119,7 @@ export function useOpenResult({
setOpenError(
cause instanceof Error && cause.message
? cause.message
- : "The conversation could not be opened.",
+ : t(m.openFailedUnknown),
);
} finally {
openingRef.current = false;
diff --git a/apps/web/src/features/search/use-global-search-results.ts b/apps/web/src/features/search/use-global-search-results.ts
index 2f35a78d..e371a8bb 100644
--- a/apps/web/src/features/search/use-global-search-results.ts
+++ b/apps/web/src/features/search/use-global-search-results.ts
@@ -14,6 +14,7 @@ import {
} from "@/features/rooms/room-queries";
import { teamHubData } from "@/features/teamhub/teamhub-api";
import type { TeamHubClient } from "@/features/teamhub/teamhub-client";
+import { useT } from "@/i18n/use-translation";
import {
clearGlobalSearchQueries,
@@ -36,6 +37,7 @@ import {
type SearchResult,
type TargetContext,
} from "./global-search-model";
+import { searchMessages as m } from "./global-search.messages";
import { matchesSearchQuery, normalizeSearchQuery } from "./search-text";
/** The typed text, its debounced form, the type scope and Recent searches. */
@@ -284,6 +286,7 @@ export function useResultSections({
tab: GlobalSearchTab;
tenantId: string;
}) {
+ const t = useT();
const showingStart = debouncedQuery === "" && tab === "all";
const sections = useMemo<ResultSection[]>(() => {
if (showingStart) {
@@ -297,14 +300,15 @@ export function useResultSections({
}),
),
key: "search-in",
- label: "Search in",
+ label: t(m.searchIn),
layout: "scopes",
},
];
if (store.queries.length > 0) {
startSections.push({
action: {
- label: "Clear",
+ ariaLabel: t(m.clearRecent),
+ label: t(m.clear),
onSelect: () => setStore(clearGlobalSearchQueries(tenantId)),
},
items: store.queries.map(
@@ -315,7 +319,7 @@ export function useResultSections({
}),
),
key: "recent-searches",
- label: "Recent",
+ label: t(m.recent),
layout: "rows",
});
}
@@ -324,7 +328,7 @@ export function useResultSections({
const visible =
tab === "all" ? groups : groups.filter((g) => g.tab === tab);
return visible.flatMap((group): ResultSection[] => {
- const label = SCOPES[group.tab].label;
+ const label = t(SCOPES[group.tab].label);
const loading =
(group.tab === "messages" && messagesLoading) ||
(group.tab === "docs" && docsLoading);
@@ -356,6 +360,7 @@ export function useResultSections({
setStore,
showingStart,
store,
+ t,
tab,
tenantId,
]);
diff --git a/apps/web/src/i18n/locales/zh-CN.glossary.md b/apps/web/src/i18n/locales/zh-CN.glossary.md
index a25ce512..88dc75c6 100644
--- a/apps/web/src/i18n/locales/zh-CN.glossary.md
+++ b/apps/web/src/i18n/locales/zh-CN.glossary.md
@@ -135,6 +135,8 @@ elsewhere.
| Publish (a template) | 发布 | |
| Marketplace | 模板市场 | Where published Agent templates are listed. |
| Official template | 官方模板 | |
+| Docs | 文档 | The short form of Documents in search. |
+| Search scope | 搜索范围 | Messages, Members, Docs or Rooms. |
## Style
diff --git a/apps/web/src/i18n/locales/zh-CN.json b/apps/web/src/i18n/locales/zh-CN.json
index 1da4e49b..10cf7771 100644
--- a/apps/web/src/i18n/locales/zh-CN.json
+++ b/apps/web/src/i18n/locales/zh-CN.json
@@ -1663,5 +1663,52 @@
"publishConnectorNote": "只会分享连接器的名称。你已连接的账号和凭据不会公开,使用这个模板的人需要授权自己的账号。",
"staysPrivate": "Runtime、模型和本地电脑仅属于这个 Agent,不会分享。之后你可以移除这个模板。",
"routinesLoadFailed": "无法加载 Routine。"
+ },
+ "search": {
+ "dialogLabel": "搜索",
+ "inputLabel": "搜索消息、文档、成员、Agent 和 Room",
+ "placeholderAll": "搜索消息、文档、成员和 Room",
+ "messagesLabel": "消息",
+ "messagesHint": "你的 Room 里的聊天",
+ "messagesPlaceholder": "搜索消息",
+ "membersLabel": "成员",
+ "membersHint": "可以发消息的 Agent",
+ "membersPlaceholder": "搜索成员",
+ "docsLabel": "文档",
+ "docsHint": "文档和笔记",
+ "docsPlaceholder": "搜索文档",
+ "roomsLabel": "Room",
+ "roomsHint": "你可以加入的 Room",
+ "roomsPlaceholder": "搜索 Room",
+ "removeScope": "移除“{scope}”范围",
+ "searchIn": "搜索范围",
+ "recent": "最近搜索",
+ "clear": "清除",
+ "clearRecent": "清除最近搜索",
+ "seeAllIn": "在“{scope}”中查看全部",
+ "failed": "搜索失败",
+ "unavailable": "搜索暂不可用。",
+ "searchEverywhere": "搜索全部",
+ "noResults": "没有找到“{query}”的结果",
+ "emptyMessageHint": "输入你要找的消息里的一个词。",
+ "emptyDocHint": "输入文档的标题或其中的一个词。",
+ "emptyTooShort": "至少输入 {min} 个字符才能搜索消息和文档。",
+ "emptyCheckSpelling": "检查一下拼写,或换一个更短的词。",
+ "emptyNothingIn": "“{scope}”中没有结果,试试搜索全部。",
+ "threadIn": "#{name} · 话题",
+ "library": "资料库",
+ "inRoom": "位于 {room}",
+ "noDescription": "暂无描述",
+ "roomKind": "Room",
+ "agentTag": "Agent",
+ "ageNow": "刚刚",
+ "ageMinutes": "{value} 分钟前",
+ "ageHours": "{value} 小时前",
+ "ageDays": "{value} 天前",
+ "legendNavigate": "移动",
+ "legendOpen": "打开",
+ "legendScope": "按类型搜索",
+ "openFailed": "无法打开这个对话。",
+ "openFailedUnknown": "无法打开对话。"
}
}