From 71f9984faa1a67e06f416b8a556d4d7ad6962f98 Mon Sep 17 00:00:00 2001 From: Matthew Lipski Date: Thu, 15 May 2025 19:28:15 +0200 Subject: [PATCH 1/3] Added right section to input and fixed AI UI --- packages/ariakit/src/input/TextInput.tsx | 5 +- packages/ariakit/src/style.css | 93 +++++++++++++++++-- .../suggestionMenu/SuggestionMenuLoader.tsx | 11 ++- packages/mantine/src/style.css | 52 ++++++++--- .../suggestionMenu/SuggestionMenuLoader.tsx | 10 +- .../react/src/editor/ComponentsContext.tsx | 3 +- packages/shadcn/src/form/TextInput.tsx | 62 ++++++------- packages/shadcn/src/style.css | 5 + .../suggestionMenu/SuggestionMenuLoader.tsx | 15 ++- packages/xl-ai-server/README.md | 2 +- .../xl-ai/src/components/AIMenu/AIMenu.tsx | 61 +++++++++--- .../AIMenu/PromptSuggestionMenu.tsx | 12 +-- packages/xl-ai/src/i18n/locales/ar.ts | 3 + packages/xl-ai/src/i18n/locales/en.ts | 3 + packages/xl-ai/src/i18n/locales/fr.ts | 3 + packages/xl-ai/src/i18n/locales/is.ts | 3 + packages/xl-ai/src/i18n/locales/ja.ts | 3 + packages/xl-ai/src/i18n/locales/ko.ts | 3 + packages/xl-ai/src/i18n/locales/nl.ts | 3 + packages/xl-ai/src/i18n/locales/pl.ts | 3 + packages/xl-ai/src/i18n/locales/pt.ts | 3 + packages/xl-ai/src/i18n/locales/ru.ts | 3 + packages/xl-ai/src/i18n/locales/vi.ts | 3 + packages/xl-ai/src/i18n/locales/zh.ts | 3 + packages/xl-ai/src/style.css | 16 +--- 25 files changed, 283 insertions(+), 100 deletions(-) diff --git a/packages/ariakit/src/input/TextInput.tsx b/packages/ariakit/src/input/TextInput.tsx index aa2132348..d4b9817f4 100644 --- a/packages/ariakit/src/input/TextInput.tsx +++ b/packages/ariakit/src/input/TextInput.tsx @@ -25,7 +25,7 @@ export const TextInput = forwardRef< onChange, onSubmit, autoComplete, - rightSection, // TODO: add rightSection + rightSection, ...rest } = props; @@ -40,7 +40,7 @@ export const TextInput = forwardRef< className={mergeCSSClasses( "bn-ak-input", className || "", - variant === "large" ? "bn-ak-input-large" : "" + variant === "large" ? "bn-ak-input-large" : "", )} ref={ref} name={name} @@ -53,6 +53,7 @@ export const TextInput = forwardRef< onSubmit={onSubmit} autoComplete={autoComplete} /> + {rightSection} ); diff --git a/packages/ariakit/src/style.css b/packages/ariakit/src/style.css index feeeffe7e..cf47b87d1 100644 --- a/packages/ariakit/src/style.css +++ b/packages/ariakit/src/style.css @@ -11,6 +11,10 @@ gap: 0.5rem; } +.bn-ak-input-wrapper svg { + width: 24px; +} + .bn-ak-toolbar { height: fit-content; overflow: scroll; @@ -23,11 +27,15 @@ .bn-toolbar .bn-ak-button[data-selected] { padding-top: 0.125rem; - box-shadow: inset 0 0 0 1px var(--border), inset 0 2px 0 var(--border); + box-shadow: + inset 0 0 0 1px var(--border), + inset 0 2px 0 var(--border); } .bn-toolbar .bn-ak-button[data-selected]:where(.dark, .dark *) { - box-shadow: inset 0 0 0 1px var(--border), inset 0 1px 1px 1px var(--shadow); + box-shadow: + inset 0 0 0 1px var(--border), + inset 0 1px 1px 1px var(--shadow); } .bn-toolbar .bn-ak-popover { @@ -64,9 +72,11 @@ overflow: visible; } -.bn-ariakit .bn-suggestion-menu { +.bn-ariakit .bn-suggestion-menu, +.bn-ariakit .ai-suggestion-menu { height: fit-content; max-height: inherit; + overflow: auto; } .bn-ariakit .bn-color-picker-dropdown { @@ -106,13 +116,34 @@ --border: rgb(0 0 0/13%); --highlight: rgb(255 255 255/20%); --shadow: rgb(0 0 0/10%); - box-shadow: inset 0 0 0 1px var(--border), inset 0 2px 0 var(--highlight), - inset 0 -1px 0 var(--shadow), 0 1px 1px var(--shadow); + box-shadow: + inset 0 0 0 1px var(--border), + inset 0 2px 0 var(--highlight), + inset 0 -1px 0 var(--shadow), + 0 1px 1px var(--shadow); font-size: 0.7rem; border-radius: 4px; padding-inline: 4px; } +@keyframes spin { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} + +.bn-ariakit .bn-suggestion-menu-loader { + align-items: center; + animation: spin 1s linear infinite; + display: flex; + height: 16px; + justify-content: center; + width: 16px; +} + .bn-ariakit .bn-grid-suggestion-menu { background: var(--bn-colors-menu-background); border-radius: var(--bn-border-radius-large); @@ -263,7 +294,7 @@ .bn-ak-author-info { align-items: center; display: flex; - gap: 16px + gap: 16px; } .bn-ariakit .bn-comment-editor .bn-editor { @@ -319,6 +350,54 @@ padding: 0; } +.bn-ariakit .bn-combobox .bn-ak-input-wrapper { + display: flex; + border-radius: 0.5rem; + border-width: 1px; + border-style: solid; + border-color: hsl(204 20% 88%); + background-color: hsl(204 20% 100%); + padding: 0.5rem; + color: hsl(204 4% 0%); + box-shadow: + 0 10px 15px -3px rgb(0 0 0 / 0.1), + 0 4px 6px -4px rgb(0 0 0 / 0.1); +} + +.bn-ariakit .bn-combobox .bn-ak-input-wrapper:where(.dark, .dark *) { + border-color: hsl(204 4% 24%); + background-color: hsl(204 4% 16%); + color: hsl(204 20% 100%); + box-shadow: + 0 10px 15px -3px rgb(0 0 0 / 0.25), + 0 4px 6px -4px rgb(0 0 0 / 0.1); +} + +.bn-ariakit .bn-combobox .bn-ak-input { + background: transparent; + border: none; + box-shadow: none; + outline: none; +} + +.bn-ariakit .bn-combobox .bn-combobox-icon, +.bn-ariakit .bn-combobox .bn-combobox-right-section { + align-items: start; + display: flex; + justify-content: center; + width: 24px; +} + +.bn-ariakit .bn-combobox .bn-combobox-error > span { + align-items: center; + color: var(--bn-colors-highlights-red-background); + display: flex; + font-size: 1.2rem; + font-weight: bold; + justify-content: center; + width: 24px; +} + .bn-ariakit .bn-comment-actions-wrapper { align-items: start; display: flex; @@ -355,4 +434,4 @@ .bn-ariakit .bn-thread.selected .bn-ak-author-info, .bn-ariakit .bn-thread.selected .bn-ak-expand-sections-prompt { color: var(--bn-colors-selected-text); -} \ No newline at end of file +} diff --git a/packages/ariakit/src/suggestionMenu/SuggestionMenuLoader.tsx b/packages/ariakit/src/suggestionMenu/SuggestionMenuLoader.tsx index ff43ed5ea..2b87f8ad7 100644 --- a/packages/ariakit/src/suggestionMenu/SuggestionMenuLoader.tsx +++ b/packages/ariakit/src/suggestionMenu/SuggestionMenuLoader.tsx @@ -6,13 +6,20 @@ export const SuggestionMenuLoader = forwardRef< HTMLDivElement, ComponentProps["SuggestionMenu"]["Loader"] >((props, ref) => { - const { className, children, ...rest } = props; + const { className, ...rest } = props; assertEmpty(rest); return (
- {children} + + +
); }); diff --git a/packages/mantine/src/style.css b/packages/mantine/src/style.css index 23149a68e..fc578e859 100644 --- a/packages/mantine/src/style.css +++ b/packages/mantine/src/style.css @@ -262,7 +262,8 @@ max-height: 100%; position: relative; box-shadow: var(--mantine-shadow-md); - border: calc(0.0625rem * var(--mantine-scale)) solid var(--mantine-color-gray-2); + border: calc(0.0625rem * var(--mantine-scale)) solid + var(--mantine-color-gray-2); border-radius: var(--mantine-radius-default); padding: 4px; } @@ -350,12 +351,15 @@ padding: 8px; } -.bn-suggestion-menu-item-small .bn-mt-suggestion-menu-item-section[data-position="left"] { +.bn-suggestion-menu-item-small + .bn-mt-suggestion-menu-item-section[data-position="left"] { background-color: transparent; padding: 0; } -.bn-suggestion-menu-item-small .bn-mt-suggestion-menu-item-section[data-position="left"] svg { +.bn-suggestion-menu-item-small + .bn-mt-suggestion-menu-item-section[data-position="left"] + svg { height: 14px; width: 14px; } @@ -607,8 +611,8 @@ } .bn-mt-sub-menu-item -> .mantine-Menu-itemLabel -> div:not(.mantine-Menu-dropdown) { + > .mantine-Menu-itemLabel + > div:not(.mantine-Menu-dropdown) { align-items: center; display: flex; justify-content: space-between; @@ -745,23 +749,47 @@ } .bn-mantine -.bn-badge -.mantine-Chip-label -> span:not(.mantine-Chip-iconWrapper) { + .bn-badge + .mantine-Chip-label + > span:not(.mantine-Chip-iconWrapper) { display: inline-flex; gap: 4px; } .bn-mantine -.bn-badge -.mantine-Chip-label -> span:not(.mantine-Chip-iconWrapper) -> span { + .bn-badge + .mantine-Chip-label + > span:not(.mantine-Chip-iconWrapper) + > span { align-items: center; display: inline-flex; justify-content: center; } +/* Combobox styling */ +.bn-mantine .bn-combobox-input, +.bn-mantine .bn-combobox-items:not(:empty) { + background-color: var(--bn-colors-menu-background); + border: var(--bn-border); + border-radius: var(--bn-border-radius-medium); + box-shadow: var(--bn-shadow-medium); + color: var(--bn-colors-menu-text); + gap: 4px; + min-width: 145px; + padding: 2px; +} + +.bn-mantine .bn-combobox-input .bn-combobox-icon { + align-items: center; + display: flex; + justify-content: center; +} + +.bn-mantine .bn-combobox-input .bn-combobox-error { + color: var(--bn-colors-highlights-red-background); + font-weight: bold; +} + /* We need to get rid of the checked icon - you can set the icon prop to an empty element (<>), but even so Mantine leaves extra space for the icon, so we just don't display it in CSS instead. */ diff --git a/packages/mantine/src/suggestionMenu/SuggestionMenuLoader.tsx b/packages/mantine/src/suggestionMenu/SuggestionMenuLoader.tsx index 3f1596bfe..93255e0bd 100644 --- a/packages/mantine/src/suggestionMenu/SuggestionMenuLoader.tsx +++ b/packages/mantine/src/suggestionMenu/SuggestionMenuLoader.tsx @@ -8,13 +8,11 @@ export const SuggestionMenuLoader = forwardRef< HTMLDivElement, ComponentProps["SuggestionMenu"]["Loader"] >((props, ref) => { - const { - className, - children, // unused, using "dots" instead - ...rest - } = props; + const { className, ...rest } = props; assertEmpty(rest); - return ; + return ( + + ); }); diff --git a/packages/react/src/editor/ComponentsContext.tsx b/packages/react/src/editor/ComponentsContext.tsx index c72c267f1..2eb161d82 100644 --- a/packages/react/src/editor/ComponentsContext.tsx +++ b/packages/react/src/editor/ComponentsContext.tsx @@ -150,7 +150,6 @@ export type ComponentProps = { }; Loader: { className?: string; - children?: ReactNode; }; }; GridSuggestionMenu: { @@ -360,7 +359,7 @@ export type Components = { }; export const ComponentsContext = createContext( - undefined + undefined, ); export function useComponentsContext(): Components | undefined { diff --git a/packages/shadcn/src/form/TextInput.tsx b/packages/shadcn/src/form/TextInput.tsx index 71a3baeeb..9a3bd12cc 100644 --- a/packages/shadcn/src/form/TextInput.tsx +++ b/packages/shadcn/src/form/TextInput.tsx @@ -3,6 +3,7 @@ import { ComponentProps } from "@blocknote/react"; import { forwardRef } from "react"; import { useShadCNComponentsContext } from "../ShadCNComponentsContext.js"; +import { cn } from "../lib/utils.js"; export const TextInput = forwardRef< HTMLInputElement, @@ -30,41 +31,34 @@ export const TextInput = forwardRef< const ShadCNComponents = useShadCNComponentsContext()!; - if (!label) { - return ( - - ); - } - return ( -
- - {label} - - +
+ {icon} +
+ {label && ( + + {label} + + )} + +
+ {rightSection}
); }); diff --git a/packages/shadcn/src/style.css b/packages/shadcn/src/style.css index 00c52b618..00707adb6 100644 --- a/packages/shadcn/src/style.css +++ b/packages/shadcn/src/style.css @@ -189,3 +189,8 @@ font-size: 14px; font-style: italic; } + +.bn-shadcn .bn-combobox-error { + color: var(--bn-colors-highlights-red-background); + font-weight: bold; +} diff --git a/packages/shadcn/src/suggestionMenu/SuggestionMenuLoader.tsx b/packages/shadcn/src/suggestionMenu/SuggestionMenuLoader.tsx index ff43ed5ea..59eb14747 100644 --- a/packages/shadcn/src/suggestionMenu/SuggestionMenuLoader.tsx +++ b/packages/shadcn/src/suggestionMenu/SuggestionMenuLoader.tsx @@ -2,17 +2,26 @@ import { assertEmpty } from "@blocknote/core"; import { ComponentProps } from "@blocknote/react"; import { forwardRef } from "react"; +import { cn } from "../lib/utils.js"; + export const SuggestionMenuLoader = forwardRef< HTMLDivElement, ComponentProps["SuggestionMenu"]["Loader"] >((props, ref) => { - const { className, children, ...rest } = props; + const { className, ...rest } = props; assertEmpty(rest); return ( -
- {children} +
+ + +
); }); diff --git a/packages/xl-ai-server/README.md b/packages/xl-ai-server/README.md index 852eea310..ca6c27523 100644 --- a/packages/xl-ai-server/README.md +++ b/packages/xl-ai-server/README.md @@ -17,7 +17,7 @@ Configure your environment variables according to `.env.example`. ## Running (dev mode): mkcert localhost - npm run dev + pnpm run dev ## Client Usage diff --git a/packages/xl-ai/src/components/AIMenu/AIMenu.tsx b/packages/xl-ai/src/components/AIMenu/AIMenu.tsx index 544fa4dd7..ae61fe07c 100644 --- a/packages/xl-ai/src/components/AIMenu/AIMenu.tsx +++ b/packages/xl-ai/src/components/AIMenu/AIMenu.tsx @@ -1,8 +1,9 @@ -import { useBlockNoteEditor } from "@blocknote/react"; -import { useCallback, useEffect, useMemo, useState } from "react"; -// import { useAIDictionary } from "../../i18n/useAIDictionary"; import { BlockNoteEditor } from "@blocknote/core"; +import { useBlockNoteEditor, useComponentsContext } from "@blocknote/react"; +import { useCallback, useEffect, useMemo, useState } from "react"; +import { RiSparkling2Fill } from "react-icons/ri"; import { useStore } from "zustand"; + import { getAIExtension } from "../../AIExtension.js"; import { useAIDictionary } from "../../i18n/useAIDictionary.js"; import { PromptSuggestionMenu } from "./PromptSuggestionMenu.js"; @@ -22,7 +23,7 @@ export const AIMenu = (props: { | "ai-writing" | "error" | "user-reviewing" - | "closed" + | "closed", ) => AIMenuSuggestionItem[]; onManualPromptSubmit?: (userPrompt: string) => void; }) => { @@ -30,10 +31,12 @@ export const AIMenu = (props: { const [prompt, setPrompt] = useState(""); const dict = useAIDictionary(); + const Components = useComponentsContext()!; + const ai = getAIExtension(editor); const aiResponseStatus = useStore(ai.store, (state) => - state.aiMenuState !== "closed" ? state.aiMenuState.status : "closed" + state.aiMenuState !== "closed" ? state.aiMenuState.status : "closed", ); const { items: externalItems } = props; @@ -72,7 +75,7 @@ export const AIMenu = (props: { useSelection: editor.getSelection() !== undefined, }); }, - [ai, editor] + [ai, editor], ); useEffect(() => { @@ -82,6 +85,36 @@ export const AIMenu = (props: { } }, [aiResponseStatus]); + const placeholder = useMemo(() => { + if (aiResponseStatus === "thinking") { + return dict.formatting_toolbar.ai.thinking; + } else if (aiResponseStatus === "ai-writing") { + return dict.formatting_toolbar.ai.editing; + } else if (aiResponseStatus === "error") { + return dict.formatting_toolbar.ai.error; + } + + return dict.formatting_toolbar.ai.input_placeholder; + }, [aiResponseStatus, dict]); + + const rightSection = useMemo(() => { + if (aiResponseStatus === "thinking" || aiResponseStatus === "ai-writing") { + return ( + + ); + } else if (aiResponseStatus === "error") { + return ( +
+ ! +
+ ); + } + + return undefined; + }, [Components, aiResponseStatus]); + return ( + +
} + rightSection={rightSection} /> ); }; diff --git a/packages/xl-ai/src/components/AIMenu/PromptSuggestionMenu.tsx b/packages/xl-ai/src/components/AIMenu/PromptSuggestionMenu.tsx index 605de5e77..b18e423a8 100644 --- a/packages/xl-ai/src/components/AIMenu/PromptSuggestionMenu.tsx +++ b/packages/xl-ai/src/components/AIMenu/PromptSuggestionMenu.tsx @@ -7,23 +7,22 @@ import { import { ChangeEvent, KeyboardEvent, + ReactNode, useCallback, useEffect, useMemo, useState, } from "react"; -import { RiSparkling2Fill } from "react-icons/ri"; - export type PromptSuggestionMenuProps = { items: DefaultReactSuggestionItem[]; onManualPromptSubmit: (userPrompt: string) => void; promptText?: string; onPromptTextChange?: (userPrompt: string) => void; + icon?: ReactNode; + rightSection?: ReactNode; placeholder?: string; disabled?: boolean; - loading?: boolean; - error?: string; }; export const PromptSuggestionMenu = (props: PromptSuggestionMenuProps) => { @@ -99,7 +98,7 @@ export const PromptSuggestionMenu = (props: PromptSuggestionMenuProps) => { className={"bn-combobox-input"} name={"ai-prompt"} variant={"large"} - icon={} + icon={props.icon} value={promptTextToUse || ""} autoFocus={true} placeholder={props.placeholder} @@ -107,8 +106,7 @@ export const PromptSuggestionMenu = (props: PromptSuggestionMenuProps) => { onKeyDown={handleKeyDown} onChange={handleChange} autoComplete={"off"} - // TODO: loader or error - // rightSection={props.loading ? : props.error} + rightSection={props.rightSection} /> .bn-combobox-input, -div:not(.bn-popover-content) > .bn-combobox-items:not(:empty) { - background-color: var(--bn-colors-menu-background); - border: var(--bn-border); - border-radius: var(--bn-border-radius-medium); - box-shadow: var(--bn-shadow-medium); - color: var(--bn-colors-menu-text); - gap: 4px; - min-width: 145px; - padding: 2px; -} - .bn-combobox-items { max-width: 50%; } +.bn-combobox-items:empty { + display: none; +} + div[data-type="modification"] { display: inline; } From 774af34106b320dc49c3f7798fa5315b1d379088 Mon Sep 17 00:00:00 2001 From: Matthew Lipski Date: Fri, 16 May 2025 14:48:59 +0200 Subject: [PATCH 2/3] Implemented PR feedback --- packages/ariakit/src/style.css | 8 +------- .../src/suggestionMenu/SuggestionMenuLoader.tsx | 2 ++ packages/mantine/src/style.css | 4 ++-- .../src/suggestionMenu/SuggestionMenuLoader.tsx | 2 ++ packages/xl-ai/src/components/AIMenu/AIMenu.tsx | 11 ++++++++++- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/packages/ariakit/src/style.css b/packages/ariakit/src/style.css index cf47b87d1..23ab0d04f 100644 --- a/packages/ariakit/src/style.css +++ b/packages/ariakit/src/style.css @@ -388,14 +388,8 @@ width: 24px; } -.bn-ariakit .bn-combobox .bn-combobox-error > span { - align-items: center; +.bn-ariakit .bn-combobox .bn-combobox-error { color: var(--bn-colors-highlights-red-background); - display: flex; - font-size: 1.2rem; - font-weight: bold; - justify-content: center; - width: 24px; } .bn-ariakit .bn-comment-actions-wrapper { diff --git a/packages/ariakit/src/suggestionMenu/SuggestionMenuLoader.tsx b/packages/ariakit/src/suggestionMenu/SuggestionMenuLoader.tsx index 2b87f8ad7..987142824 100644 --- a/packages/ariakit/src/suggestionMenu/SuggestionMenuLoader.tsx +++ b/packages/ariakit/src/suggestionMenu/SuggestionMenuLoader.tsx @@ -12,6 +12,8 @@ export const SuggestionMenuLoader = forwardRef< return (
+ {/* Taken from Google Material Icons */} + {/* https://fonts.google.com/icons?selected=Material+Symbols+Rounded:progress_activity:FILL@0;wght@400;GRAD@0;opsz@24&icon.query=load&icon.size=24&icon.color=%23e8eaed&icon.set=Material+Symbols&icon.style=Rounded&icon.platform=web */} + {/* Taken from Google Material Icons */} + {/* https://fonts.google.com/icons?selected=Material+Symbols+Rounded:progress_activity:FILL@0;wght@400;GRAD@0;opsz@24&icon.query=load&icon.size=24&icon.color=%23e8eaed&icon.set=Material+Symbols&icon.style=Rounded&icon.platform=web */} - ! + {/* Taken from Google Material Icons */} + {/* https://fonts.google.com/icons?selected=Material+Symbols+Rounded:error:FILL@0;wght@400;GRAD@0;opsz@24&icon.query=error&icon.size=24&icon.color=%23e8eaed&icon.set=Material+Symbols&icon.style=Rounded&icon.platform=web */} + + +
); } From 50d6e92724f21566bf6d78817a2302d3e94c8129 Mon Sep 17 00:00:00 2001 From: Matthew Lipski Date: Fri, 16 May 2025 14:49:09 +0200 Subject: [PATCH 3/3] Fixed translations --- packages/xl-ai/src/i18n/locales/ar.ts | 77 +++++++++++++++------------ packages/xl-ai/src/i18n/locales/en.ts | 41 -------------- packages/xl-ai/src/i18n/locales/fr.ts | 77 +++++++++++++++------------ packages/xl-ai/src/i18n/locales/is.ts | 77 +++++++++++++++------------ packages/xl-ai/src/i18n/locales/ja.ts | 75 ++++++++++++++------------ packages/xl-ai/src/i18n/locales/ko.ts | 75 ++++++++++++++------------ packages/xl-ai/src/i18n/locales/nl.ts | 75 ++++++++++++++------------ packages/xl-ai/src/i18n/locales/pl.ts | 75 ++++++++++++++------------ packages/xl-ai/src/i18n/locales/pt.ts | 74 +++++++++++++------------ packages/xl-ai/src/i18n/locales/ru.ts | 77 +++++++++++++++------------ packages/xl-ai/src/i18n/locales/vi.ts | 75 ++++++++++++++------------ packages/xl-ai/src/i18n/locales/zh.ts | 77 +++++++++++++++------------ 12 files changed, 455 insertions(+), 420 deletions(-) diff --git a/packages/xl-ai/src/i18n/locales/ar.ts b/packages/xl-ai/src/i18n/locales/ar.ts index b487d9d8d..6298c1727 100644 --- a/packages/xl-ai/src/i18n/locales/ar.ts +++ b/packages/xl-ai/src/i18n/locales/ar.ts @@ -3,51 +3,58 @@ import type { AIDictionary } from "../dictionary"; export const ar: AIDictionary = { formatting_toolbar: { ai: { - tooltip: "Generate content", - input_placeholder: "Enter a prompt", + tooltip: "إنشاء محتوى", + input_placeholder: "أدخل طلبًا", thinking: "جارِ التفكير", editing: "تحرير", error: "حدث خطأ", }, }, slash_menu: { - ai_block: { - title: "AI Block", - subtext: "Block with AI generated content", - aliases: ["ai", "artificial intelligence", "generate"], - group: "AI", - }, ai: { - title: "Ask AI", - subtext: "Continue writing with AI", + title: "اسأل الذكاء الاصطناعي", + subtext: "متابعة الكتابة بالذكاء الاصطناعي", aliases: ["ai", "artificial intelligence", "generate"], - group: "AI", + group: "الذكاء الاصطناعي", }, }, - placeholders: { - ai: "Enter a prompt", - }, ai_menu: { - custom_prompt: { - title: "Custom Prompt", - subtext: "Use your query as an AI prompt", - aliases: ["", "custom prompt"], - }, - make_longer: { - title: "Make Longer", - aliases: ["make longer"], - }, - } as any, // TODO - ai_block_toolbar: { - show_prompt: "Generated by AI", - show_prompt_datetime_tooltip: "Generated:", - update: "Update", - updating: "Updating…", - }, - ai_inline_toolbar: { - accept: "Accept", - retry: "Retry", - updating: "Updating…", - revert: "Revert", + continue_writing: { + title: "متابعة الكتابة", + aliases: undefined, + }, + summarize: { + title: "تلخيص", + aliases: undefined, + }, + add_action_items: { + title: "إضافة عناصر إجرائية", + aliases: undefined, + }, + write_anything: { + title: "اكتب أي شيء…", + aliases: undefined, + prompt_placeholder: "اكتب عن ", + }, + simplify: { + title: "تبسيط", + aliases: undefined, + }, + translate: { + title: "ترجمة…", + aliases: undefined, + prompt_placeholder: "ترجم إلى ", + }, + fix_spelling: { + title: "تصحيح الإملاء", + aliases: undefined, + }, + improve_writing: { + title: "تحسين الكتابة", + aliases: undefined, + }, + accept: { title: "قبول", aliases: undefined }, + retry: { title: "إعادة المحاولة", aliases: undefined }, + revert: { title: "استعادة", aliases: undefined }, }, }; diff --git a/packages/xl-ai/src/i18n/locales/en.ts b/packages/xl-ai/src/i18n/locales/en.ts index 986338504..19f7e9e7b 100644 --- a/packages/xl-ai/src/i18n/locales/en.ts +++ b/packages/xl-ai/src/i18n/locales/en.ts @@ -9,12 +9,6 @@ export const en = { }, }, slash_menu: { - ai_block: { - title: "AI Block", - subtext: "Block with AI generated content", - aliases: ["ai", "artificial intelligence", "generate"], - group: "AI", - }, ai: { title: "Ask AI", subtext: "Continue writing with AI", @@ -22,18 +16,7 @@ export const en = { group: "AI", }, }, - placeholders: { - ai: "Enter a prompt", - }, ai_menu: { - // custom_prompt: { - // title: "Custom Prompt", - // subtext: "Use your query as an AI prompt", - // aliases: [ - // "", // TODO: add comment - // "custom prompt", - // ], - // }, continue_writing: { title: "Continue Writing", aliases: undefined, @@ -51,18 +34,6 @@ export const en = { aliases: undefined, prompt_placeholder: "Write about ", }, - make_longer: { - title: "Make Longer", - aliases: undefined, - }, - make_shorter: { - title: "Make Shorter", - aliases: undefined, - }, - rewrite: { - title: "Rewrite", - aliases: undefined, - }, simplify: { title: "Simplify", aliases: undefined, @@ -84,16 +55,4 @@ export const en = { retry: { title: "Retry", aliases: undefined }, revert: { title: "Revert", aliases: undefined }, }, - ai_block_toolbar: { - show_prompt: "Generated by AI", - show_prompt_datetime_tooltip: "Generated:", - update: "Update", - updating: "Updating…", - }, - ai_inline_toolbar: { - accept: "Accept", - retry: "Retry", - updating: "Updating…", - revert: "Revert", - }, }; diff --git a/packages/xl-ai/src/i18n/locales/fr.ts b/packages/xl-ai/src/i18n/locales/fr.ts index 8e2cc3fb3..ee5965b0f 100644 --- a/packages/xl-ai/src/i18n/locales/fr.ts +++ b/packages/xl-ai/src/i18n/locales/fr.ts @@ -3,51 +3,58 @@ import type { AIDictionary } from "../dictionary"; export const fr: AIDictionary = { formatting_toolbar: { ai: { - tooltip: "Generate content", - input_placeholder: "Enter a prompt", + tooltip: "Générer du contenu", + input_placeholder: "Entrez une requête", thinking: "Réflexion en cours", editing: "Édition", error: "Une erreur s'est produite", }, }, slash_menu: { - ai_block: { - title: "AI Block", - subtext: "Block with AI generated content", - aliases: ["ai", "artificial intelligence", "generate"], - group: "AI", - }, ai: { - title: "Ask AI", - subtext: "Continue writing with AI", + title: "Demander à l'IA", + subtext: "Continuer à écrire avec l'IA", aliases: ["ai", "artificial intelligence", "generate"], - group: "AI", + group: "IA", }, }, - placeholders: { - ai: "Enter a prompt", - }, ai_menu: { - // custom_prompt: { - // title: "Custom Prompt", - // subtext: "Use your query as an AI prompt", - // aliases: undefined, - // }, - make_longer: { - title: "Make Longer", - aliases: undefined, - }, - } as any, // TODO - ai_block_toolbar: { - show_prompt: "Generated by AI", - show_prompt_datetime_tooltip: "Generated:", - update: "Update", - updating: "Updating…", - }, - ai_inline_toolbar: { - accept: "Accept", - retry: "Retry", - updating: "Updating…", - revert: "Revert", + continue_writing: { + title: "Continuer à écrire", + aliases: undefined, + }, + summarize: { + title: "Résumer", + aliases: undefined, + }, + add_action_items: { + title: "Ajouter des éléments d'action", + aliases: undefined, + }, + write_anything: { + title: "Écrire n'importe quoi…", + aliases: undefined, + prompt_placeholder: "Écrire à propos de ", + }, + simplify: { + title: "Simplifier", + aliases: undefined, + }, + translate: { + title: "Traduire…", + aliases: undefined, + prompt_placeholder: "Traduire en ", + }, + fix_spelling: { + title: "Corriger l'orthographe", + aliases: undefined, + }, + improve_writing: { + title: "Améliorer l'écriture", + aliases: undefined, + }, + accept: { title: "Accepter", aliases: undefined }, + retry: { title: "Réessayer", aliases: undefined }, + revert: { title: "Annuler", aliases: undefined }, }, }; diff --git a/packages/xl-ai/src/i18n/locales/is.ts b/packages/xl-ai/src/i18n/locales/is.ts index 457dd00ee..df224cbf1 100644 --- a/packages/xl-ai/src/i18n/locales/is.ts +++ b/packages/xl-ai/src/i18n/locales/is.ts @@ -3,51 +3,58 @@ import type { AIDictionary } from "../dictionary"; export const is: AIDictionary = { formatting_toolbar: { ai: { - tooltip: "Generate content", - input_placeholder: "Enter a prompt", + tooltip: "Búa til efni", + input_placeholder: "Sláðu inn leiðbeiningar", thinking: "Hugsa", editing: "Breyta", error: "Villa kom upp", }, }, slash_menu: { - ai_block: { - title: "AI Block", - subtext: "Block with AI generated content", - aliases: ["ai", "artificial intelligence", "generate"], - group: "AI", - }, ai: { - title: "Ask AI", - subtext: "Continue writing with AI", + title: "Spyrja gervigreind", + subtext: "Halda áfram að skrifa með gervigreind", aliases: ["ai", "artificial intelligence", "generate"], - group: "AI", + group: "Gervigreind", }, }, - placeholders: { - ai: "Enter a prompt", - }, ai_menu: { - custom_prompt: { - title: "Custom Prompt", - subtext: "Use your query as an AI prompt", - aliases: ["", "custom prompt"], - }, - make_longer: { - title: "Make Longer", - aliases: ["make longer"], - }, - } as any, // TODO - ai_block_toolbar: { - show_prompt: "Generated by AI", - show_prompt_datetime_tooltip: "Generated:", - update: "Update", - updating: "Updating…", - }, - ai_inline_toolbar: { - accept: "Accept", - retry: "Retry", - updating: "Updating…", - revert: "Revert", + continue_writing: { + title: "Halda áfram að skrifa", + aliases: undefined, + }, + summarize: { + title: "Draga saman", + aliases: undefined, + }, + add_action_items: { + title: "Bæta við aðgerðaatriðum", + aliases: undefined, + }, + write_anything: { + title: "Skrifa hvað sem er…", + aliases: undefined, + prompt_placeholder: "Skrifa um ", + }, + simplify: { + title: "Einfalda", + aliases: undefined, + }, + translate: { + title: "Þýða…", + aliases: undefined, + prompt_placeholder: "Þýða yfir á ", + }, + fix_spelling: { + title: "Laga stafsetningu", + aliases: undefined, + }, + improve_writing: { + title: "Bæta ritun", + aliases: undefined, + }, + accept: { title: "Samþykkja", aliases: undefined }, + retry: { title: "Reyna aftur", aliases: undefined }, + revert: { title: "Afturkalla", aliases: undefined }, }, }; diff --git a/packages/xl-ai/src/i18n/locales/ja.ts b/packages/xl-ai/src/i18n/locales/ja.ts index 5193833ff..37248d359 100644 --- a/packages/xl-ai/src/i18n/locales/ja.ts +++ b/packages/xl-ai/src/i18n/locales/ja.ts @@ -3,51 +3,58 @@ import type { AIDictionary } from "../dictionary"; export const ja: AIDictionary = { formatting_toolbar: { ai: { - tooltip: "Generate content", - input_placeholder: "Enter a prompt", + tooltip: "コンテンツを生成", + input_placeholder: "プロンプトを入力", thinking: "考え中", editing: "編集中", error: "エラーが発生しました", }, }, slash_menu: { - ai_block: { - title: "AI Block", - subtext: "Block with AI generated content", - aliases: ["ai", "artificial intelligence", "generate"], - group: "AI", - }, ai: { - title: "Ask AI", - subtext: "Continue writing with AI", + title: "AIに質問", + subtext: "AIで執筆を継続", aliases: ["ai", "artificial intelligence", "generate"], group: "AI", }, }, - placeholders: { - ai: "Enter a prompt", - }, ai_menu: { - custom_prompt: { - title: "Custom Prompt", - subtext: "Use your query as an AI prompt", - aliases: ["", "custom prompt"], - }, - make_longer: { - title: "Make Longer", - aliases: ["make longer"], - }, - } as any, // TODO - ai_block_toolbar: { - show_prompt: "Generated by AI", - show_prompt_datetime_tooltip: "Generated:", - update: "Update", - updating: "Updating…", - }, - ai_inline_toolbar: { - accept: "Accept", - retry: "Retry", - updating: "Updating…", - revert: "Revert", + continue_writing: { + title: "続けて書く", + aliases: undefined, + }, + summarize: { + title: "要約する", + aliases: undefined, + }, + add_action_items: { + title: "アクション項目を追加", + aliases: undefined, + }, + write_anything: { + title: "何でも書く…", + aliases: undefined, + prompt_placeholder: "次のことについて書く ", + }, + simplify: { + title: "簡略化する", + aliases: undefined, + }, + translate: { + title: "翻訳する…", + aliases: undefined, + prompt_placeholder: "次の言語に翻訳 ", + }, + fix_spelling: { + title: "スペルを修正", + aliases: undefined, + }, + improve_writing: { + title: "文章を改善", + aliases: undefined, + }, + accept: { title: "承認", aliases: undefined }, + retry: { title: "再試行", aliases: undefined }, + revert: { title: "元に戻す", aliases: undefined }, }, }; diff --git a/packages/xl-ai/src/i18n/locales/ko.ts b/packages/xl-ai/src/i18n/locales/ko.ts index 6a2129c31..63e0a1ff1 100644 --- a/packages/xl-ai/src/i18n/locales/ko.ts +++ b/packages/xl-ai/src/i18n/locales/ko.ts @@ -3,51 +3,58 @@ import type { AIDictionary } from "../dictionary"; export const ko: AIDictionary = { formatting_toolbar: { ai: { - tooltip: "Generate content", - input_placeholder: "Enter a prompt", + tooltip: "콘텐츠 생성", + input_placeholder: "프롬프트 입력", thinking: "생각 중", editing: "편집 중", error: "오류가 발생했습니다", }, }, slash_menu: { - ai_block: { - title: "AI Block", - subtext: "Block with AI generated content", - aliases: ["ai", "artificial intelligence", "generate"], - group: "AI", - }, ai: { - title: "Ask AI", - subtext: "Continue writing with AI", + title: "AI에게 질문하기", + subtext: "AI로 계속 작성하기", aliases: ["ai", "artificial intelligence", "generate"], group: "AI", }, }, - placeholders: { - ai: "Enter a prompt", - }, ai_menu: { - custom_prompt: { - title: "Custom Prompt", - subtext: "Use your query as an AI prompt", - aliases: ["", "custom prompt"], - }, - make_longer: { - title: "Make Longer", - aliases: ["make longer"], - }, - } as any, // TODO - ai_block_toolbar: { - show_prompt: "Generated by AI", - show_prompt_datetime_tooltip: "Generated:", - update: "Update", - updating: "Updating…", - }, - ai_inline_toolbar: { - accept: "Accept", - retry: "Retry", - updating: "Updating…", - revert: "Revert", + continue_writing: { + title: "계속 작성하기", + aliases: undefined, + }, + summarize: { + title: "요약하기", + aliases: undefined, + }, + add_action_items: { + title: "작업 항목 추가", + aliases: undefined, + }, + write_anything: { + title: "무엇이든 작성하기…", + aliases: undefined, + prompt_placeholder: "다음에 대해 작성: ", + }, + simplify: { + title: "단순화하기", + aliases: undefined, + }, + translate: { + title: "번역하기…", + aliases: undefined, + prompt_placeholder: "다음으로 번역: ", + }, + fix_spelling: { + title: "맞춤법 수정", + aliases: undefined, + }, + improve_writing: { + title: "글쓰기 개선", + aliases: undefined, + }, + accept: { title: "수락", aliases: undefined }, + retry: { title: "다시 시도", aliases: undefined }, + revert: { title: "되돌리기", aliases: undefined }, }, }; diff --git a/packages/xl-ai/src/i18n/locales/nl.ts b/packages/xl-ai/src/i18n/locales/nl.ts index 9a18ad1d8..6c4e40998 100644 --- a/packages/xl-ai/src/i18n/locales/nl.ts +++ b/packages/xl-ai/src/i18n/locales/nl.ts @@ -3,51 +3,58 @@ import type { AIDictionary } from "../dictionary"; export const nl: AIDictionary = { formatting_toolbar: { ai: { - tooltip: "Generate content", - input_placeholder: "Enter a prompt", + tooltip: "Inhoud genereren", + input_placeholder: "Voer een prompt in", thinking: "Denken", editing: "Bewerken", error: "Er is een fout opgetreden", }, }, slash_menu: { - ai_block: { - title: "AI Block", - subtext: "Block with AI generated content", - aliases: ["ai", "artificial intelligence", "generate"], - group: "AI", - }, ai: { - title: "Ask AI", - subtext: "Continue writing with AI", + title: "Vraag AI", + subtext: "Schrijf verder met AI", aliases: ["ai", "artificial intelligence", "generate"], group: "AI", }, }, - placeholders: { - ai: "Enter a prompt", - }, ai_menu: { - custom_prompt: { - title: "Custom Prompt", - subtext: "Use your query as an AI prompt", - aliases: ["", "custom prompt"], - }, - make_longer: { - title: "Make Longer", - aliases: ["make longer"], - }, - } as any, // TODO - ai_block_toolbar: { - show_prompt: "Generated by AI", - show_prompt_datetime_tooltip: "Generated:", - update: "Update", - updating: "Updating…", - }, - ai_inline_toolbar: { - accept: "Accept", - retry: "Retry", - updating: "Updating…", - revert: "Revert", + continue_writing: { + title: "Schrijven Voortzetten", + aliases: undefined, + }, + summarize: { + title: "Samenvatten", + aliases: undefined, + }, + add_action_items: { + title: "Actiepunten Toevoegen", + aliases: undefined, + }, + write_anything: { + title: "Schrijf Iets…", + aliases: undefined, + prompt_placeholder: "Schrijf over ", + }, + simplify: { + title: "Vereenvoudigen", + aliases: undefined, + }, + translate: { + title: "Vertalen…", + aliases: undefined, + prompt_placeholder: "Vertaal naar ", + }, + fix_spelling: { + title: "Spelling Corrigeren", + aliases: undefined, + }, + improve_writing: { + title: "Schrijven Verbeteren", + aliases: undefined, + }, + accept: { title: "Accepteren", aliases: undefined }, + retry: { title: "Opnieuw Proberen", aliases: undefined }, + revert: { title: "Terugdraaien", aliases: undefined }, }, }; diff --git a/packages/xl-ai/src/i18n/locales/pl.ts b/packages/xl-ai/src/i18n/locales/pl.ts index ea633c762..c7b6c193c 100644 --- a/packages/xl-ai/src/i18n/locales/pl.ts +++ b/packages/xl-ai/src/i18n/locales/pl.ts @@ -3,51 +3,58 @@ import type { AIDictionary } from "../dictionary"; export const pl: AIDictionary = { formatting_toolbar: { ai: { - tooltip: "Generate content", - input_placeholder: "Enter a prompt", + tooltip: "Generuj treść", + input_placeholder: "Wprowadź polecenie", thinking: "Myślę", editing: "Edytuję", error: "Wystąpił błąd", }, }, slash_menu: { - ai_block: { - title: "AI Block", - subtext: "Block with AI generated content", - aliases: ["ai", "artificial intelligence", "generate"], - group: "AI", - }, ai: { - title: "Ask AI", - subtext: "Continue writing with AI", + title: "Zapytaj AI", + subtext: "Kontynuuj pisanie z AI", aliases: ["ai", "artificial intelligence", "generate"], group: "AI", }, }, - placeholders: { - ai: "Enter a prompt", - }, ai_menu: { - custom_prompt: { - title: "Custom Prompt", - subtext: "Use your query as an AI prompt", - aliases: ["", "custom prompt"], - }, - make_longer: { - title: "Make Longer", - aliases: ["make longer"], - }, - } as any, // TODO - ai_block_toolbar: { - show_prompt: "Generated by AI", - show_prompt_datetime_tooltip: "Generated:", - update: "Update", - updating: "Updating…", - }, - ai_inline_toolbar: { - accept: "Accept", - retry: "Retry", - updating: "Updating…", - revert: "Revert", + continue_writing: { + title: "Kontynuuj Pisanie", + aliases: undefined, + }, + summarize: { + title: "Podsumuj", + aliases: undefined, + }, + add_action_items: { + title: "Dodaj Elementy Działań", + aliases: undefined, + }, + write_anything: { + title: "Napisz Cokolwiek…", + aliases: undefined, + prompt_placeholder: "Napisz o ", + }, + simplify: { + title: "Uprość", + aliases: undefined, + }, + translate: { + title: "Przetłumacz…", + aliases: undefined, + prompt_placeholder: "Przetłumacz na ", + }, + fix_spelling: { + title: "Popraw Pisownię", + aliases: undefined, + }, + improve_writing: { + title: "Popraw Styl Pisania", + aliases: undefined, + }, + accept: { title: "Akceptuj", aliases: undefined }, + retry: { title: "Spróbuj Ponownie", aliases: undefined }, + revert: { title: "Przywróć", aliases: undefined }, }, }; diff --git a/packages/xl-ai/src/i18n/locales/pt.ts b/packages/xl-ai/src/i18n/locales/pt.ts index 44f21b0b8..8097eb60d 100644 --- a/packages/xl-ai/src/i18n/locales/pt.ts +++ b/packages/xl-ai/src/i18n/locales/pt.ts @@ -3,52 +3,58 @@ import type { AIDictionary } from "../dictionary"; export const pt: AIDictionary = { formatting_toolbar: { ai: { - tooltip: "Generate content", - input_placeholder: "Enter a prompt", + tooltip: "Gerar conteúdo", + input_placeholder: "Digite um comando", thinking: "Pensando", editing: "Editando", error: "Ocorreu um erro", }, }, slash_menu: { - ai_block: { - title: "AI Block", - subtext: "Block with AI generated content", - aliases: ["ai", "artificial intelligence", "generate"], - group: "AI", - }, ai: { - title: "Ask AI", - subtext: "Continue writing with AI", + title: "Perguntar à IA", + subtext: "Continuar escrevendo com IA", aliases: ["ai", "artificial intelligence", "generate"], - group: "AI", + group: "IA", }, }, - placeholders: { - ai: "Enter a prompt", - }, ai_menu: { - custom_prompt: { - title: "Custom Prompt", - subtext: "Use your query as an AI prompt", - aliases: ["", "custom prompt"], + continue_writing: { + title: "Continuar Escrevendo", + aliases: undefined, }, - make_longer: { - title: "Make Longer", - aliases: ["make longer"], + summarize: { + title: "Resumir", + aliases: undefined, }, - } as any, // TODO - - ai_block_toolbar: { - show_prompt: "Generated by AI", - show_prompt_datetime_tooltip: "Generated:", - update: "Update", - updating: "Updating…", - }, - ai_inline_toolbar: { - accept: "Accept", - retry: "Retry", - updating: "Updating…", - revert: "Revert", + add_action_items: { + title: "Adicionar Itens de Ação", + aliases: undefined, + }, + write_anything: { + title: "Escrever Qualquer Coisa…", + aliases: undefined, + prompt_placeholder: "Escrever sobre ", + }, + simplify: { + title: "Simplificar", + aliases: undefined, + }, + translate: { + title: "Traduzir…", + aliases: undefined, + prompt_placeholder: "Traduzir para ", + }, + fix_spelling: { + title: "Corrigir Ortografia", + aliases: undefined, + }, + improve_writing: { + title: "Melhorar Escrita", + aliases: undefined, + }, + accept: { title: "Aceitar", aliases: undefined }, + retry: { title: "Tentar Novamente", aliases: undefined }, + revert: { title: "Reverter", aliases: undefined }, }, }; diff --git a/packages/xl-ai/src/i18n/locales/ru.ts b/packages/xl-ai/src/i18n/locales/ru.ts index 7b794d604..a555d2a4a 100644 --- a/packages/xl-ai/src/i18n/locales/ru.ts +++ b/packages/xl-ai/src/i18n/locales/ru.ts @@ -3,51 +3,58 @@ import type { AIDictionary } from "../dictionary"; export const ru: AIDictionary = { formatting_toolbar: { ai: { - tooltip: "Generate content", - input_placeholder: "Enter a prompt", + tooltip: "Создать контент", + input_placeholder: "Введите запрос", thinking: "Обработка", editing: "Редактирование", error: "Произошла ошибка", }, }, slash_menu: { - ai_block: { - title: "AI Block", - subtext: "Block with AI generated content", - aliases: ["ai", "artificial intelligence", "generate"], - group: "AI", - }, ai: { - title: "Ask AI", - subtext: "Continue writing with AI", + title: "Спросить ИИ", + subtext: "Продолжить писать с помощью ИИ", aliases: ["ai", "artificial intelligence", "generate"], - group: "AI", + group: "ИИ", }, }, - placeholders: { - ai: "Enter a prompt", - }, ai_menu: { - custom_prompt: { - title: "Custom Prompt", - subtext: "Use your query as an AI prompt", - aliases: ["", "custom prompt"], - }, - make_longer: { - title: "Make Longer", - aliases: ["make longer"], - }, - } as any, // TODO - ai_block_toolbar: { - show_prompt: "Generated by AI", - show_prompt_datetime_tooltip: "Generated:", - update: "Update", - updating: "Updating…", - }, - ai_inline_toolbar: { - accept: "Accept", - retry: "Retry", - updating: "Updating…", - revert: "Revert", + continue_writing: { + title: "Продолжить написание", + aliases: undefined, + }, + summarize: { + title: "Резюмировать", + aliases: undefined, + }, + add_action_items: { + title: "Добавить пункты действий", + aliases: undefined, + }, + write_anything: { + title: "Написать что угодно…", + aliases: undefined, + prompt_placeholder: "Написать о ", + }, + simplify: { + title: "Упростить", + aliases: undefined, + }, + translate: { + title: "Перевести…", + aliases: undefined, + prompt_placeholder: "Перевести на ", + }, + fix_spelling: { + title: "Исправить орфографию", + aliases: undefined, + }, + improve_writing: { + title: "Улучшить текст", + aliases: undefined, + }, + accept: { title: "Принять", aliases: undefined }, + retry: { title: "Повторить", aliases: undefined }, + revert: { title: "Отменить", aliases: undefined }, }, }; diff --git a/packages/xl-ai/src/i18n/locales/vi.ts b/packages/xl-ai/src/i18n/locales/vi.ts index 6b6decae1..31888feae 100644 --- a/packages/xl-ai/src/i18n/locales/vi.ts +++ b/packages/xl-ai/src/i18n/locales/vi.ts @@ -3,51 +3,58 @@ import type { AIDictionary } from "../dictionary"; export const vi: AIDictionary = { formatting_toolbar: { ai: { - tooltip: "Generate content", - input_placeholder: "Enter a prompt", + tooltip: "Tạo nội dung", + input_placeholder: "Nhập lệnh", thinking: "Đang suy nghĩ", editing: "Đang chỉnh sửa", error: "Đã xảy ra lỗi", }, }, slash_menu: { - ai_block: { - title: "AI Block", - subtext: "Block with AI generated content", - aliases: ["ai", "artificial intelligence", "generate"], - group: "AI", - }, ai: { - title: "Ask AI", - subtext: "Continue writing with AI", + title: "Hỏi AI", + subtext: "Tiếp tục viết với AI", aliases: ["ai", "artificial intelligence", "generate"], group: "AI", }, }, - placeholders: { - ai: "Enter a prompt", - }, ai_menu: { - custom_prompt: { - title: "Custom Prompt", - subtext: "Use your query as an AI prompt", - aliases: ["", "custom prompt"], - }, - make_longer: { - title: "Make Longer", - aliases: ["make longer"], - }, - } as any, // TODO - ai_block_toolbar: { - show_prompt: "Generated by AI", - show_prompt_datetime_tooltip: "Generated:", - update: "Update", - updating: "Updating…", - }, - ai_inline_toolbar: { - accept: "Accept", - retry: "Retry", - updating: "Updating…", - revert: "Revert", + continue_writing: { + title: "Tiếp tục Viết", + aliases: undefined, + }, + summarize: { + title: "Tóm tắt", + aliases: undefined, + }, + add_action_items: { + title: "Thêm mục hành động", + aliases: undefined, + }, + write_anything: { + title: "Viết bất kỳ điều gì…", + aliases: undefined, + prompt_placeholder: "Viết về ", + }, + simplify: { + title: "Đơn giản hóa", + aliases: undefined, + }, + translate: { + title: "Dịch…", + aliases: undefined, + prompt_placeholder: "Dịch sang ", + }, + fix_spelling: { + title: "Sửa lỗi chính tả", + aliases: undefined, + }, + improve_writing: { + title: "Cải thiện bài viết", + aliases: undefined, + }, + accept: { title: "Chấp nhận", aliases: undefined }, + retry: { title: "Thử lại", aliases: undefined }, + revert: { title: "Hoàn tác", aliases: undefined }, }, }; diff --git a/packages/xl-ai/src/i18n/locales/zh.ts b/packages/xl-ai/src/i18n/locales/zh.ts index 510c21849..05ef2ec22 100644 --- a/packages/xl-ai/src/i18n/locales/zh.ts +++ b/packages/xl-ai/src/i18n/locales/zh.ts @@ -3,51 +3,58 @@ import type { AIDictionary } from "../dictionary"; export const zh: AIDictionary = { formatting_toolbar: { ai: { - tooltip: "Generate content", - input_placeholder: "Enter a prompt", + tooltip: "生成内容", + input_placeholder: "输入提示词", thinking: "思考中", editing: "编辑中", error: "发生错误", }, }, slash_menu: { - ai_block: { - title: "AI Block", - subtext: "Block with AI generated content", - aliases: ["ai", "artificial intelligence", "generate"], - group: "AI", - }, ai: { - title: "Ask AI", - subtext: "Continue writing with AI", + title: "询问人工智能", + subtext: "使用人工智能继续写作", aliases: ["ai", "artificial intelligence", "generate"], - group: "AI", + group: "人工智能", }, }, - placeholders: { - ai: "Enter a prompt", - }, ai_menu: { - custom_prompt: { - title: "Custom Prompt", - subtext: "Use your query as an AI prompt", - aliases: ["", "custom prompt"], - }, - make_longer: { - title: "Make Longer", - aliases: ["make longer"], - }, - } as any, // TODO - ai_block_toolbar: { - show_prompt: "Generated by AI", - show_prompt_datetime_tooltip: "Generated:", - update: "Update", - updating: "Updating…", - }, - ai_inline_toolbar: { - accept: "Accept", - retry: "Retry", - updating: "Updating…", - revert: "Revert", + continue_writing: { + title: "继续写作", + aliases: undefined, + }, + summarize: { + title: "总结", + aliases: undefined, + }, + add_action_items: { + title: "添加行动项", + aliases: undefined, + }, + write_anything: { + title: "写任何内容…", + aliases: undefined, + prompt_placeholder: "写关于 ", + }, + simplify: { + title: "简化", + aliases: undefined, + }, + translate: { + title: "翻译…", + aliases: undefined, + prompt_placeholder: "翻译成 ", + }, + fix_spelling: { + title: "修正拼写", + aliases: undefined, + }, + improve_writing: { + title: "改进写作", + aliases: undefined, + }, + accept: { title: "接受", aliases: undefined }, + retry: { title: "重试", aliases: undefined }, + revert: { title: "恢复", aliases: undefined }, }, };