mirror of
https://github.com/docmost/docmost.git
synced 2026-05-07 06:23:06 +08:00
fix translations
This commit is contained in:
@@ -629,18 +629,16 @@
|
|||||||
"MCP": "MCP",
|
"MCP": "MCP",
|
||||||
"Model Context Protocol (MCP)": "Model Context Protocol (MCP)",
|
"Model Context Protocol (MCP)": "Model Context Protocol (MCP)",
|
||||||
"Enable the MCP server to allow AI assistants and tools to interact with your workspace content.": "Enable the MCP server to allow AI assistants and tools to interact with your workspace content.",
|
"Enable the MCP server to allow AI assistants and tools to interact with your workspace content.": "Enable the MCP server to allow AI assistants and tools to interact with your workspace content.",
|
||||||
"MCP requires a paid plan. Visit docmost.com for more information.": "MCP requires a paid plan. Visit docmost.com for more information.",
|
"MCP is only available in the Docmost enterprise edition. Contact sales@docmost.com.": "MCP is only available in the Docmost enterprise edition. Contact sales@docmost.com.",
|
||||||
"MCP documentation": "MCP documentation",
|
|
||||||
"MCP Server URL": "MCP Server URL",
|
"MCP Server URL": "MCP Server URL",
|
||||||
"Use your API key for authentication. You can manage API keys in your account settings.": "Use your API key for authentication. You can manage API keys in your account settings.",
|
"Use your API key for authentication. You can manage API keys in your account settings.": "Use your API key for authentication. You can manage API keys in your account settings.",
|
||||||
"Supported tools": "Supported tools",
|
"Supported tools": "Supported tools",
|
||||||
"Your workspace has MCP enabled. Use your API key to connect AI assistants.": "Your workspace has MCP enabled. Use your API key to connect AI assistants.",
|
"Your workspace has MCP enabled. Use your API key to connect AI assistants.": "Your workspace has MCP enabled. Use your API key to connect AI assistants.",
|
||||||
"MCP server URL:": "MCP server URL:",
|
"MCP server URL:": "MCP server URL:",
|
||||||
"Learn more": "Learn more",
|
"Learn more": "Learn more",
|
||||||
"View the": "View the",
|
"Manage API keys for all users in the workspace. View the <anchor>API documentation</anchor> for usage details.": "Manage API keys for all users in the workspace. View the <anchor>API documentation</anchor> for usage details.",
|
||||||
"for usage details.": "for usage details.",
|
"View the <anchor>API documentation</anchor> for usage details.": "View the <anchor>API documentation</anchor> for usage details.",
|
||||||
"for setup instructions.": "for setup instructions.",
|
"View the <anchor>MCP documentation</anchor>.": "View the <anchor>MCP documentation</anchor>.",
|
||||||
"API documentation": "API documentation",
|
|
||||||
"Sources": "Sources",
|
"Sources": "Sources",
|
||||||
"AI Answers not available for attachments": "AI Answers not available for attachments",
|
"AI Answers not available for attachments": "AI Answers not available for attachments",
|
||||||
"No answer available": "No answer available",
|
"No answer available": "No answer available",
|
||||||
@@ -655,12 +653,12 @@
|
|||||||
"Mark all as read": "Mark all as read",
|
"Mark all as read": "Mark all as read",
|
||||||
"Mark as read": "Mark as read",
|
"Mark as read": "Mark as read",
|
||||||
"More options": "More options",
|
"More options": "More options",
|
||||||
"mentioned you in a comment": "mentioned you in a comment",
|
"<bold>{{name}}</bold> mentioned you in a comment": "<bold>{{name}}</bold> mentioned you in a comment",
|
||||||
"commented on a page": "commented on a page",
|
"<bold>{{name}}</bold> commented on a page": "<bold>{{name}}</bold> commented on a page",
|
||||||
"resolved a comment": "resolved a comment",
|
"<bold>{{name}}</bold> resolved a comment": "<bold>{{name}}</bold> resolved a comment",
|
||||||
"mentioned you on a page": "mentioned you on a page",
|
"<bold>{{name}}</bold> mentioned you on a page": "<bold>{{name}}</bold> mentioned you on a page",
|
||||||
"gave you edit access to a page": "gave you edit access to a page",
|
"<bold>{{name}}</bold> gave you edit access to a page": "<bold>{{name}}</bold> gave you edit access to a page",
|
||||||
"gave you view access to a page": "gave you view access to a page",
|
"<bold>{{name}}</bold> gave you view access to a page": "<bold>{{name}}</bold> gave you view access to a page",
|
||||||
"Today": "Today",
|
"Today": "Today",
|
||||||
"Yesterday": "Yesterday",
|
"Yesterday": "Yesterday",
|
||||||
"This week": "This week",
|
"This week": "This week",
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import {
|
|||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
import { workspaceAtom } from "@/features/user/atoms/current-user-atom.ts";
|
import { workspaceAtom } from "@/features/user/atoms/current-user-atom.ts";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { Trans, useTranslation } from "react-i18next";
|
||||||
import { updateWorkspace } from "@/features/workspace/services/workspace-service.ts";
|
import { updateWorkspace } from "@/features/workspace/services/workspace-service.ts";
|
||||||
import { notifications } from "@mantine/notifications";
|
import { notifications } from "@mantine/notifications";
|
||||||
import { useHasFeature } from "@/ee/hooks/use-feature";
|
import { useHasFeature } from "@/ee/hooks/use-feature";
|
||||||
@@ -51,7 +51,7 @@ export default function McpSettings() {
|
|||||||
{!hasAccess && (
|
{!hasAccess && (
|
||||||
<Alert icon={<IconInfoCircle />} title={upgradeLabel} color="blue">
|
<Alert icon={<IconInfoCircle />} title={upgradeLabel} color="blue">
|
||||||
{t(
|
{t(
|
||||||
"MCP requires a paid plan. Visit docmost.com for more information.",
|
"MCP is only available in the Docmost enterprise edition. Contact sales@docmost.com.",
|
||||||
)}
|
)}
|
||||||
</Alert>
|
</Alert>
|
||||||
)}
|
)}
|
||||||
@@ -63,15 +63,12 @@ export default function McpSettings() {
|
|||||||
{t(
|
{t(
|
||||||
"Enable the MCP server to allow AI assistants and tools to interact with your workspace content.",
|
"Enable the MCP server to allow AI assistants and tools to interact with your workspace content.",
|
||||||
)}{" "}
|
)}{" "}
|
||||||
{t("View the")}{" "}
|
<Trans
|
||||||
<Anchor
|
i18nKey="View the <anchor>MCP documentation</anchor>."
|
||||||
href="https://docmost.com/docs/user-guide/mcp"
|
components={{
|
||||||
target="_blank"
|
anchor: <Anchor href="https://docmost.com/docs/user-guide/mcp" target="_blank" size="sm" />,
|
||||||
size="sm"
|
}}
|
||||||
>
|
/>
|
||||||
{t("MCP documentation")}
|
|
||||||
</Anchor>
|
|
||||||
.
|
|
||||||
</Text>
|
</Text>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React, { useState } from "react";
|
|||||||
import { Anchor, Alert, Button, Group, Space, Text } from "@mantine/core";
|
import { Anchor, Alert, Button, Group, Space, Text } from "@mantine/core";
|
||||||
import { IconInfoCircle } from "@tabler/icons-react";
|
import { IconInfoCircle } from "@tabler/icons-react";
|
||||||
import { Helmet } from "react-helmet-async";
|
import { Helmet } from "react-helmet-async";
|
||||||
import { useTranslation } from "react-i18next";
|
import { Trans, useTranslation } from "react-i18next";
|
||||||
import SettingsTitle from "@/components/settings/settings-title";
|
import SettingsTitle from "@/components/settings/settings-title";
|
||||||
import { getAppName, getAppUrl } from "@/lib/config";
|
import { getAppName, getAppUrl } from "@/lib/config";
|
||||||
import { ApiKeyTable } from "@/ee/api-key/components/api-key-table";
|
import { ApiKeyTable } from "@/ee/api-key/components/api-key-table";
|
||||||
@@ -58,11 +58,12 @@ export default function UserApiKeys() {
|
|||||||
<SettingsTitle title={t("API keys")} />
|
<SettingsTitle title={t("API keys")} />
|
||||||
|
|
||||||
<Text size="sm" c="dimmed" mb="md">
|
<Text size="sm" c="dimmed" mb="md">
|
||||||
{t("View the")}{" "}
|
<Trans
|
||||||
<Anchor href="https://docmost.com/api-docs" target="_blank" size="sm">
|
i18nKey="View the <anchor>API documentation</anchor> for usage details."
|
||||||
{t("API documentation")}
|
components={{
|
||||||
</Anchor>{" "}
|
anchor: <Anchor href="https://docmost.com/api-docs" target="_blank" size="sm" />,
|
||||||
{t("for usage details.")}
|
}}
|
||||||
|
/>
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
{mcpEnabled && canCreate && (
|
{mcpEnabled && canCreate && (
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { Anchor, Button, Divider, Group, Space, Text } from "@mantine/core";
|
import { Anchor, Button, Divider, Group, Space, Text } from "@mantine/core";
|
||||||
import { Helmet } from "react-helmet-async";
|
import { Helmet } from "react-helmet-async";
|
||||||
import { useTranslation } from "react-i18next";
|
import { Trans, useTranslation } from "react-i18next";
|
||||||
import SettingsTitle from "@/components/settings/settings-title";
|
import SettingsTitle from "@/components/settings/settings-title";
|
||||||
import { getAppName } from "@/lib/config";
|
import { getAppName } from "@/lib/config";
|
||||||
import { ApiKeyTable } from "@/ee/api-key/components/api-key-table";
|
import { ApiKeyTable } from "@/ee/api-key/components/api-key-table";
|
||||||
@@ -56,12 +56,12 @@ export default function WorkspaceApiKeys() {
|
|||||||
<SettingsTitle title={t("API management")} />
|
<SettingsTitle title={t("API management")} />
|
||||||
|
|
||||||
<Text size="sm" c="dimmed" mb="md">
|
<Text size="sm" c="dimmed" mb="md">
|
||||||
{t("Manage API keys for all users in the workspace.")}{" "}
|
<Trans
|
||||||
{t("View the")}{" "}
|
i18nKey="Manage API keys for all users in the workspace. View the <anchor>API documentation</anchor> for usage details."
|
||||||
<Anchor href="https://docmost.com/api-docs" target="_blank" size="sm">
|
components={{
|
||||||
{t("API documentation")}
|
anchor: <Anchor href="https://docmost.com/api-docs" target="_blank" size="sm" />,
|
||||||
</Anchor>{" "}
|
}}
|
||||||
{t("for usage details.")}
|
/>
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
<RestrictApiToAdmins />
|
<RestrictApiToAdmins />
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
} from "@tabler/icons-react";
|
} from "@tabler/icons-react";
|
||||||
import { CustomAvatar } from "@/components/ui/custom-avatar";
|
import { CustomAvatar } from "@/components/ui/custom-avatar";
|
||||||
import { INotification } from "../types/notification.types";
|
import { INotification } from "../types/notification.types";
|
||||||
import { useTranslation } from "react-i18next";
|
import { Trans, useTranslation } from "react-i18next";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { useMarkReadMutation } from "../queries/notification-query";
|
import { useMarkReadMutation } from "../queries/notification-query";
|
||||||
@@ -36,20 +36,20 @@ export function NotificationItem({
|
|||||||
|
|
||||||
const isUnread = !notification.readAt;
|
const isUnread = !notification.readAt;
|
||||||
|
|
||||||
const getNotificationMessage = (): string => {
|
const getNotificationMessageKey = (): string => {
|
||||||
switch (notification.type) {
|
switch (notification.type) {
|
||||||
case "comment.user_mention":
|
case "comment.user_mention":
|
||||||
return t("mentioned you in a comment");
|
return "<bold>{{name}}</bold> mentioned you in a comment";
|
||||||
case "comment.created":
|
case "comment.created":
|
||||||
return t("commented on a page");
|
return "<bold>{{name}}</bold> commented on a page";
|
||||||
case "comment.resolved":
|
case "comment.resolved":
|
||||||
return t("resolved a comment");
|
return "<bold>{{name}}</bold> resolved a comment";
|
||||||
case "page.user_mention":
|
case "page.user_mention":
|
||||||
return t("mentioned you on a page");
|
return "<bold>{{name}}</bold> mentioned you on a page";
|
||||||
case "page.permission_granted":
|
case "page.permission_granted":
|
||||||
return notification.data?.role === "writer"
|
return notification.data?.role === "writer"
|
||||||
? t("gave you edit access to a page")
|
? "<bold>{{name}}</bold> gave you edit access to a page"
|
||||||
: t("gave you view access to a page");
|
: "<bold>{{name}}</bold> gave you view access to a page";
|
||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@@ -95,10 +95,11 @@ export function NotificationItem({
|
|||||||
|
|
||||||
<div style={{ flex: 1, minWidth: 0 }}>
|
<div style={{ flex: 1, minWidth: 0 }}>
|
||||||
<Text size="sm" lineClamp={2}>
|
<Text size="sm" lineClamp={2}>
|
||||||
<Text span fw={600}>
|
<Trans
|
||||||
{notification.actor?.name}
|
i18nKey={getNotificationMessageKey()}
|
||||||
</Text>{" "}
|
values={{ name: notification.actor?.name }}
|
||||||
{getNotificationMessage()}
|
components={{ bold: <Text span fw={600} /> }}
|
||||||
|
/>
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
{notification.page && (
|
{notification.page && (
|
||||||
|
|||||||
Reference in New Issue
Block a user