@smart-cloud/ai-kit-ui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitattributes +8 -0
- package/dist/ai-kit-ui.css +201 -0
- package/dist/index.cjs +14 -0
- package/dist/index.d.cts +87 -0
- package/dist/index.d.ts +87 -0
- package/dist/index.js +14 -0
- package/eslint.config.js +18 -0
- package/package.json +75 -0
- package/src/ShadowBoundary.tsx +266 -0
- package/src/ai-feature/AiFeature.tsx +1824 -0
- package/src/ai-feature/AiFeatureBorder.tsx +22 -0
- package/src/ai-feature/ProofreadDiff.tsx +118 -0
- package/src/ai-feature/index.tsx +2 -0
- package/src/ai-feature/utils.tsx +20 -0
- package/src/i18n/ar.ts +156 -0
- package/src/i18n/de.ts +157 -0
- package/src/i18n/en.ts +156 -0
- package/src/i18n/es.ts +157 -0
- package/src/i18n/fr.ts +158 -0
- package/src/i18n/he.ts +156 -0
- package/src/i18n/hi.ts +157 -0
- package/src/i18n/hu.ts +156 -0
- package/src/i18n/id.ts +157 -0
- package/src/i18n/index.ts +47 -0
- package/src/i18n/it.ts +159 -0
- package/src/i18n/ja.ts +157 -0
- package/src/i18n/ko.ts +155 -0
- package/src/i18n/nb.ts +156 -0
- package/src/i18n/nl.ts +157 -0
- package/src/i18n/pl.ts +158 -0
- package/src/i18n/pt.ts +155 -0
- package/src/i18n/ru.ts +157 -0
- package/src/i18n/sv.ts +156 -0
- package/src/i18n/th.ts +154 -0
- package/src/i18n/tr.ts +158 -0
- package/src/i18n/ua.ts +159 -0
- package/src/i18n/zh.ts +151 -0
- package/src/index.tsx +4 -0
- package/src/styles/ai-kit-ui.css +201 -0
- package/src/useAiRun.ts +177 -0
- package/src/withAiKitShell.tsx +208 -0
- package/tsconfig.json +32 -0
- package/tsconfig.node.json +13 -0
- package/tsup.config.ts +21 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export function AiFeatureBorder({
|
|
2
|
+
enabled = true,
|
|
3
|
+
working = false,
|
|
4
|
+
variation = "default",
|
|
5
|
+
children,
|
|
6
|
+
}: React.PropsWithChildren<{
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
working?: boolean;
|
|
9
|
+
variation?: string;
|
|
10
|
+
}>) {
|
|
11
|
+
const active = Boolean(enabled && working);
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<div
|
|
15
|
+
className="ai-kit-feature-border"
|
|
16
|
+
data-ai-kit-active={active ? "true" : "false"}
|
|
17
|
+
data-ai-kit-variation={variation}
|
|
18
|
+
>
|
|
19
|
+
<div className="ai-kit-feature-border__content">{children}</div>
|
|
20
|
+
</div>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { Tooltip } from "@mantine/core";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { I18n } from "aws-amplify/utils";
|
|
4
|
+
|
|
5
|
+
// Minimal shape compatible with dom-chromium-ai ProofreadCorrection
|
|
6
|
+
export type Correction = {
|
|
7
|
+
startIndex: number;
|
|
8
|
+
endIndex: number;
|
|
9
|
+
correction?: string;
|
|
10
|
+
replacement?: string;
|
|
11
|
+
explanation?: string;
|
|
12
|
+
type?: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
type Segment =
|
|
16
|
+
| { kind: "plain"; text: string }
|
|
17
|
+
| { kind: "corr"; original: string; corr: Correction };
|
|
18
|
+
|
|
19
|
+
export type ProofreadDiffProps = {
|
|
20
|
+
original: string;
|
|
21
|
+
corrections: Correction[];
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
function normalizeCorrections(corrections: Correction[]): Correction[] {
|
|
25
|
+
const sorted = [...corrections].sort((a, b) => a.startIndex - b.startIndex);
|
|
26
|
+
const out: Correction[] = [];
|
|
27
|
+
let lastEnd = -1;
|
|
28
|
+
for (const c of sorted) {
|
|
29
|
+
if (
|
|
30
|
+
typeof c.startIndex !== "number" ||
|
|
31
|
+
typeof c.endIndex !== "number" ||
|
|
32
|
+
c.startIndex < 0 ||
|
|
33
|
+
c.endIndex <= c.startIndex
|
|
34
|
+
) {
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
// Drop overlaps (best-effort)
|
|
38
|
+
if (c.startIndex < lastEnd) continue;
|
|
39
|
+
out.push(c);
|
|
40
|
+
lastEnd = c.endIndex;
|
|
41
|
+
}
|
|
42
|
+
return out;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function ProofreadDiff({ original, corrections }: ProofreadDiffProps) {
|
|
46
|
+
const segments = useMemo<Segment[]>(() => {
|
|
47
|
+
const corr = normalizeCorrections(corrections || []);
|
|
48
|
+
const segs: Segment[] = [];
|
|
49
|
+
let cursor = 0;
|
|
50
|
+
for (const c of corr) {
|
|
51
|
+
if (c.startIndex > cursor) {
|
|
52
|
+
segs.push({
|
|
53
|
+
kind: "plain",
|
|
54
|
+
text: original.slice(cursor, c.startIndex),
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
const orig = original.slice(c.startIndex, c.endIndex);
|
|
58
|
+
segs.push({ kind: "corr", original: orig, corr: c });
|
|
59
|
+
cursor = c.endIndex;
|
|
60
|
+
}
|
|
61
|
+
if (cursor < original.length) {
|
|
62
|
+
segs.push({ kind: "plain", text: original.slice(cursor) });
|
|
63
|
+
}
|
|
64
|
+
return segs;
|
|
65
|
+
}, [original, corrections]);
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<div
|
|
69
|
+
style={{
|
|
70
|
+
padding: 12,
|
|
71
|
+
border: "1px solid rgba(0,0,0,0.1)",
|
|
72
|
+
borderRadius: 6,
|
|
73
|
+
background: "rgba(0,0,0,0.02)",
|
|
74
|
+
whiteSpace: "pre-wrap",
|
|
75
|
+
lineHeight: 1.5,
|
|
76
|
+
}}
|
|
77
|
+
>
|
|
78
|
+
{segments.map((s, idx) => {
|
|
79
|
+
if (s.kind === "plain") {
|
|
80
|
+
return <span key={idx}>{s.text}</span>;
|
|
81
|
+
}
|
|
82
|
+
const replacement = (
|
|
83
|
+
s.corr.replacement ??
|
|
84
|
+
s.corr.correction ??
|
|
85
|
+
""
|
|
86
|
+
).trim();
|
|
87
|
+
const explanation = (s.corr.explanation ?? "").trim();
|
|
88
|
+
const type = (s.corr.type ?? "").trim();
|
|
89
|
+
const tooltip = [
|
|
90
|
+
type ? I18n.get("Type") + ": - " + I18n.get(type) : "",
|
|
91
|
+
replacement ? I18n.get("Replace with") + ": " + replacement : "",
|
|
92
|
+
explanation ? I18n.get("Why") + ": " + explanation : "",
|
|
93
|
+
]
|
|
94
|
+
.filter(Boolean)
|
|
95
|
+
.join("\n");
|
|
96
|
+
|
|
97
|
+
return (
|
|
98
|
+
<Tooltip
|
|
99
|
+
key={idx}
|
|
100
|
+
label={tooltip || I18n.get("Suggested change")}
|
|
101
|
+
multiline={true}
|
|
102
|
+
>
|
|
103
|
+
<span
|
|
104
|
+
style={{
|
|
105
|
+
textDecoration: "underline",
|
|
106
|
+
textDecorationStyle: "wavy",
|
|
107
|
+
cursor: "help",
|
|
108
|
+
padding: "0 1px",
|
|
109
|
+
}}
|
|
110
|
+
>
|
|
111
|
+
{s.original}
|
|
112
|
+
</span>
|
|
113
|
+
</Tooltip>
|
|
114
|
+
);
|
|
115
|
+
})}
|
|
116
|
+
</div>
|
|
117
|
+
);
|
|
118
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import rehypeSanitize, { defaultSchema } from "rehype-sanitize";
|
|
2
|
+
import rehypeStringify from "rehype-stringify";
|
|
3
|
+
import remarkGfm from "remark-gfm";
|
|
4
|
+
import remarkParse from "remark-parse";
|
|
5
|
+
import remarkRehype from "remark-rehype";
|
|
6
|
+
import { unified } from "unified";
|
|
7
|
+
|
|
8
|
+
export const markdownToHtml = async (markdown: string): Promise<string> => {
|
|
9
|
+
return String(
|
|
10
|
+
await unified()
|
|
11
|
+
.use(remarkParse)
|
|
12
|
+
.use(remarkGfm)
|
|
13
|
+
.use(remarkRehype, {
|
|
14
|
+
allowDangerousHtml: false,
|
|
15
|
+
})
|
|
16
|
+
.use(rehypeSanitize, defaultSchema)
|
|
17
|
+
.use(rehypeStringify)
|
|
18
|
+
.process(markdown),
|
|
19
|
+
);
|
|
20
|
+
};
|
package/src/i18n/ar.ts
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
export const arDict: Record<string, string> = {
|
|
2
|
+
"WPSuite AI-Kit": "WPSuite AI-Kit",
|
|
3
|
+
Accept: "يقبل",
|
|
4
|
+
"Additional instructions to guide the AI.":
|
|
5
|
+
"تعليمات إضافية لتوجيه الذكاء الاصطناعي.",
|
|
6
|
+
"Alt Text": "نص بديل",
|
|
7
|
+
"An unknown error occurred.": "حدث خطأ غير معروف.",
|
|
8
|
+
Arabic: "عربي",
|
|
9
|
+
"As-Is": "بدون تغيير",
|
|
10
|
+
"Auto-detect": "الكشف التلقائي",
|
|
11
|
+
Cancel: "يلغي",
|
|
12
|
+
Caption: "التسمية التوضيحية",
|
|
13
|
+
Casual: "غير رسمي",
|
|
14
|
+
"Checking capabilities...": "إمكانيات الفحص...",
|
|
15
|
+
Chinese: "الصينية",
|
|
16
|
+
Close: "يغلق",
|
|
17
|
+
Corrected: "تم التصحيح",
|
|
18
|
+
"Creating LanguageDetector session": "إنشاء جلسة كاشف اللغة",
|
|
19
|
+
"Creating LanguageModel session": "إنشاء جلسة نموذج اللغة",
|
|
20
|
+
"Creating Proofreader session": "إنشاء جلسة مدقق لغوي",
|
|
21
|
+
"Creating Rewriter session": "إنشاء جلسة إعادة الكتابة",
|
|
22
|
+
"Creating Summarizer session": "إنشاء جلسة تلخيص",
|
|
23
|
+
"Creating Translator session": "إنشاء جلسة ترجمة",
|
|
24
|
+
"Creating Writer session": "إنشاء جلسة الكتابة",
|
|
25
|
+
"Deciding capability": "القدرة على اتخاذ القرار",
|
|
26
|
+
Description: "وصف",
|
|
27
|
+
"Detecting language": "الكشف عن اللغة",
|
|
28
|
+
"Done.": "منتهي.",
|
|
29
|
+
"Downloading model...": "جارٍ تنزيل النموذج...",
|
|
30
|
+
Dutch: "هولندي",
|
|
31
|
+
English: "إنجليزي",
|
|
32
|
+
Excerpt: "مقتطفات",
|
|
33
|
+
Formal: "رَسمِيّ",
|
|
34
|
+
French: "فرنسي",
|
|
35
|
+
Generate: "يولد",
|
|
36
|
+
"Generated content": "المحتوى المُنشأ",
|
|
37
|
+
"Generating text": "إنشاء نص",
|
|
38
|
+
"Generating...": "جارٍ التوليد...",
|
|
39
|
+
German: "الألمانية",
|
|
40
|
+
HTML: "HTML",
|
|
41
|
+
Headline: "العنوان",
|
|
42
|
+
Hebrew: "العبرية",
|
|
43
|
+
Hide: "يخفي",
|
|
44
|
+
Hindi: "الهندية",
|
|
45
|
+
"Hover highlights to see explanations.":
|
|
46
|
+
"مرر مؤشر الماوس فوق العناصر المميزة للاطلاع على التفسيرات.",
|
|
47
|
+
Hungarian: "المجرية",
|
|
48
|
+
Indonesian: "إندونيسيا",
|
|
49
|
+
"Initializing on-device AI...": "جارٍ تهيئة الذكاء الاصطناعي على الجهاز...",
|
|
50
|
+
"Inlining images as base64": "تضمين الصور بصيغة base64",
|
|
51
|
+
"Input and output languages cannot be the same.":
|
|
52
|
+
"لا يمكن أن تكون لغات الإدخال والإخراج متطابقة.",
|
|
53
|
+
"Input language": "لغة الإدخال",
|
|
54
|
+
Instructions: "تعليمات",
|
|
55
|
+
Italian: "إيطالي",
|
|
56
|
+
Japanese: "اليابانية",
|
|
57
|
+
"Key Points": "النقاط الرئيسية",
|
|
58
|
+
Korean: "كوري",
|
|
59
|
+
Length: "طول",
|
|
60
|
+
Long: "طويل",
|
|
61
|
+
Longer: "أطول",
|
|
62
|
+
Markdown: "تخفيض السعر",
|
|
63
|
+
Medium: "واسطة",
|
|
64
|
+
"More casual": "أكثر عفوية",
|
|
65
|
+
"More formal": "أكثر رسمية",
|
|
66
|
+
Neutral: "حيادي",
|
|
67
|
+
"No issues found. Your text looks great!":
|
|
68
|
+
"لم يتم العثور على أي مشاكل. النص يبدو رائعاً!",
|
|
69
|
+
"No overrides": "لا توجد تجاوزات",
|
|
70
|
+
Norwegian: "النرويجية",
|
|
71
|
+
"On-device model ready.": "النموذج جاهز للاستخدام على الجهاز.",
|
|
72
|
+
Options: "خيارات",
|
|
73
|
+
"Output format": "تنسيق الإخراج",
|
|
74
|
+
"Output language": "لغة الإخراج",
|
|
75
|
+
Polish: "بولندي",
|
|
76
|
+
Portuguese: "البرتغالية",
|
|
77
|
+
Preview: "معاينة",
|
|
78
|
+
Proofread: "التدقيق اللغوي",
|
|
79
|
+
"Proofread again": "راجع النص مرة أخرى",
|
|
80
|
+
"Proofread on Backend": "تمت المراجعة في الواجهة الخلفية",
|
|
81
|
+
Proofreading: "التدقيق اللغوي",
|
|
82
|
+
"Received backend response.": "تم استلام رد من الخادم الخلفي.",
|
|
83
|
+
Regenerate: "تجديد",
|
|
84
|
+
"Regenerate on Backend": "إعادة التوليد في الواجهة الخلفية",
|
|
85
|
+
"Replace with": "استبدل بـ",
|
|
86
|
+
"Requesting signed URL": "طلب عنوان URL موقّع",
|
|
87
|
+
Rewrite: "إعادة كتابة",
|
|
88
|
+
"Rewrite again": "أعد الكتابة مرة أخرى",
|
|
89
|
+
"Rewrite on Backend": "إعادة كتابة الكود في الواجهة الخلفية",
|
|
90
|
+
"Rewriting text": "إعادة كتابة النص",
|
|
91
|
+
Russian: "الروسية",
|
|
92
|
+
"Sending request to backend...": "إرسال الطلب إلى الواجهة الخلفية...",
|
|
93
|
+
Short: "قصير",
|
|
94
|
+
Shorter: "أقصر",
|
|
95
|
+
Show: "يعرض",
|
|
96
|
+
"Something went wrong.": "حدث خطأ ما.",
|
|
97
|
+
Spanish: "الأسبانية",
|
|
98
|
+
"Suggested change": "التغيير المقترح",
|
|
99
|
+
Summarize: "لخص",
|
|
100
|
+
"Summarize again": "أعد التلخيص",
|
|
101
|
+
"Summarize on Backend": "تلخيص على الواجهة الخلفية",
|
|
102
|
+
Summarizing: "ملخص",
|
|
103
|
+
Swedish: "السويدية",
|
|
104
|
+
"TL;DR": "باختصار شديد",
|
|
105
|
+
Teaser: "إعلان تشويقي",
|
|
106
|
+
Thai: "تايلاندي",
|
|
107
|
+
"The alt text for the image.": "النص البديل للصورة.",
|
|
108
|
+
"The caption for the image.": "التعليق المصاحب للصورة.",
|
|
109
|
+
"The description for the image.": "وصف الصورة.",
|
|
110
|
+
"The excerpt for the post.":
|
|
111
|
+
"اختياري. ملخص قصير قد يظهر في نتائج البحث والمعاينات.",
|
|
112
|
+
"The language AI-Kit should use for generated text by default (when applicable).":
|
|
113
|
+
"اللغة التي يجب أن يستخدمها برنامج AI-Kit للنصوص المُولّدة افتراضيًا (عند الاقتضاء).",
|
|
114
|
+
"The language of the input text.": "لغة النص المدخل.",
|
|
115
|
+
"The summary style to generate.": "نمط الملخص المراد إنشاؤه.",
|
|
116
|
+
"The target output length.": "طول الإخراج المستهدف.",
|
|
117
|
+
"The title for the image.": "عنوان الصورة.",
|
|
118
|
+
"The title for the post.": "عنوان المنشور.",
|
|
119
|
+
"The tone or style for the AI to use.":
|
|
120
|
+
"النبرة أو الأسلوب الذي سيستخدمه الذكاء الاصطناعي.",
|
|
121
|
+
"The topic or subject for the AI to write about.":
|
|
122
|
+
"الموضوع أو الفكرة التي سيكتب عنها الذكاء الاصطناعي.",
|
|
123
|
+
Title: "عنوان",
|
|
124
|
+
Tone: "نغمة",
|
|
125
|
+
Topic: "عنوان",
|
|
126
|
+
Translate: "يترجم",
|
|
127
|
+
"Translate again": "ترجم مرة أخرى",
|
|
128
|
+
"Translate on Backend": "الترجمة في الواجهة الخلفية",
|
|
129
|
+
Translating: "الترجمة",
|
|
130
|
+
Turkish: "تركي",
|
|
131
|
+
Type: "يكتب",
|
|
132
|
+
Ukrainian: "الأوكرانية",
|
|
133
|
+
Uploading: "جارٍ التحميل",
|
|
134
|
+
"Uploading images via signed URL": "تحميل الصور عبر رابط موقّع",
|
|
135
|
+
"Using backend": "استخدام الواجهة الخلفية",
|
|
136
|
+
"Using on-device": "استخدام الجهاز",
|
|
137
|
+
"Waiting for backend response...": "في انتظار رد من الخادم الخلفي...",
|
|
138
|
+
Why: "لماذا",
|
|
139
|
+
"Working...": "عمل...",
|
|
140
|
+
"as-is": "كما هي",
|
|
141
|
+
auto: "آلي",
|
|
142
|
+
casual: "غير رسمي",
|
|
143
|
+
formal: "رَسمِيّ",
|
|
144
|
+
headline: "عنوان رئيسي",
|
|
145
|
+
"key-points": "النقاط الرئيسية",
|
|
146
|
+
long: "طويل",
|
|
147
|
+
longer: "أطول",
|
|
148
|
+
medium: "واسطة",
|
|
149
|
+
"more-casual": "أكثر عفوية",
|
|
150
|
+
"more-formal": "أكثر رسمية",
|
|
151
|
+
neutral: "حيادي",
|
|
152
|
+
short: "قصير",
|
|
153
|
+
shorter: "أقصر",
|
|
154
|
+
teaser: "إعلان تشويقي",
|
|
155
|
+
tldr: "باختصار",
|
|
156
|
+
};
|
package/src/i18n/de.ts
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
export const deDict: Record<string, string> = {
|
|
2
|
+
"Deciding capability": "Fähigkeit wird ermittelt",
|
|
3
|
+
"Using on-device": "On-Device wird verwendet",
|
|
4
|
+
"Using backend": "Backend wird verwendet",
|
|
5
|
+
"Creating Writer session": "Writer-Sitzung wird erstellt",
|
|
6
|
+
"Generating text": "Text wird generiert",
|
|
7
|
+
"Creating Rewriter session": "Rewriter-Sitzung wird erstellt",
|
|
8
|
+
"Rewriting text": "Text wird umgeschrieben",
|
|
9
|
+
"Creating Proofreader session": "Proofreader-Sitzung wird erstellt",
|
|
10
|
+
Proofreading: "Textprüfung",
|
|
11
|
+
"Creating Summarizer session": "Summarizer-Sitzung wird erstellt",
|
|
12
|
+
Summarizing: "Zusammenfassung",
|
|
13
|
+
"Creating LanguageDetector session": "LanguageDetector-Sitzung wird erstellt",
|
|
14
|
+
"Detecting language": "Spracherkennung",
|
|
15
|
+
"Creating Translator session": "Translator-Sitzung wird erstellt",
|
|
16
|
+
Translating: "Übersetzung",
|
|
17
|
+
"Inlining images as base64": "Bilder werden als Base64 eingebettet",
|
|
18
|
+
"Uploading images via signed URL":
|
|
19
|
+
"Bilder werden per signierter URL hochgeladen",
|
|
20
|
+
"Requesting signed URL": "Signierte URL wird angefordert",
|
|
21
|
+
Uploading: "Wird hochgeladen",
|
|
22
|
+
"Creating LanguageModel session": "LanguageModel-Sitzung wird erstellt",
|
|
23
|
+
"Checking capabilities...": "Fähigkeiten werden geprüft...",
|
|
24
|
+
"Initializing on-device AI...": "On-Device-KI wird initialisiert...",
|
|
25
|
+
"Downloading model...": "Modell wird heruntergeladen...",
|
|
26
|
+
"On-device model ready.": "On-Device-Modell ist bereit.",
|
|
27
|
+
"Generating...": "Wird generiert...",
|
|
28
|
+
"Sending request to backend...": "Anfrage wird an das Backend gesendet...",
|
|
29
|
+
"Waiting for backend response...": "Warte auf Backend-Antwort...",
|
|
30
|
+
"Received backend response.": "Backend-Antwort erhalten.",
|
|
31
|
+
"Done.": "Fertig.",
|
|
32
|
+
"Something went wrong.": "Etwas ist schiefgelaufen.",
|
|
33
|
+
"Working...": "Wird verarbeitet...",
|
|
34
|
+
"Replace with": "Ersetzen durch",
|
|
35
|
+
Type: "Typ",
|
|
36
|
+
Why: "Warum",
|
|
37
|
+
"Suggested change": "Vorgeschlagene Änderung",
|
|
38
|
+
"WPSuite AI-Kit": "WPSuite AI-Kit",
|
|
39
|
+
Accept: "Übernehmen",
|
|
40
|
+
"Input and output languages cannot be the same.":
|
|
41
|
+
"Eingabe- und Ausgabesprache dürfen nicht identisch sein.",
|
|
42
|
+
"An unknown error occurred.": "Ein unbekannter Fehler ist aufgetreten.",
|
|
43
|
+
Proofread: "Prüfen",
|
|
44
|
+
"Proofread on Backend": "Serverseitig prüfen",
|
|
45
|
+
"Proofread again": "Erneut prüfen",
|
|
46
|
+
Translate: "Übersetzen",
|
|
47
|
+
"Translate again": "Erneut übersetzen",
|
|
48
|
+
"Translate on Backend": "Serverseitig übersetzen",
|
|
49
|
+
Rewrite: "Umschreiben",
|
|
50
|
+
"Rewrite again": "Erneut umschreiben",
|
|
51
|
+
"Rewrite on Backend": "Serverseitig umschreiben",
|
|
52
|
+
Summarize: "Zusammenfassen",
|
|
53
|
+
"Summarize again": "Erneut zusammenfassen",
|
|
54
|
+
"Summarize on Backend": "Serverseitig zusammenfassen",
|
|
55
|
+
Generate: "Generieren",
|
|
56
|
+
Regenerate: "Neu generieren",
|
|
57
|
+
"Regenerate on Backend": "Serverseitig neu generieren",
|
|
58
|
+
"Input language": "Eingabesprache",
|
|
59
|
+
"Output language": "Ausgabesprache",
|
|
60
|
+
Options: "Optionen",
|
|
61
|
+
Hide: "Ausblenden",
|
|
62
|
+
Show: "Anzeigen",
|
|
63
|
+
Topic: "Thema",
|
|
64
|
+
"The topic or subject for the AI to write about.":
|
|
65
|
+
"Thema bzw. Gegenstand, über den die KI schreiben soll.",
|
|
66
|
+
Instructions: "Anweisungen",
|
|
67
|
+
"Additional instructions to guide the AI.":
|
|
68
|
+
"Zusätzliche Anweisungen zur Steuerung der KI.",
|
|
69
|
+
"The language of the input text.": "Sprache des Eingabetextes.",
|
|
70
|
+
"Auto-detect": "Automatisch erkennen",
|
|
71
|
+
"The language AI-Kit should use for generated text by default (when applicable).":
|
|
72
|
+
"Standardsprache, die AI‑Kit (falls anwendbar) für generierte Texte verwenden soll.",
|
|
73
|
+
"The summary style to generate.": "Gewünschter Stil der Zusammenfassung.",
|
|
74
|
+
Headline: "Überschrift",
|
|
75
|
+
"Key Points": "Kernaussagen",
|
|
76
|
+
Teaser: "Teaser",
|
|
77
|
+
"TL;DR": "Kurzfassung",
|
|
78
|
+
Neutral: "Neutral",
|
|
79
|
+
Formal: "Formell",
|
|
80
|
+
Casual: "Locker",
|
|
81
|
+
"As-Is": "Unverändert",
|
|
82
|
+
"More formal": "Formeller",
|
|
83
|
+
"More casual": "Lockerer",
|
|
84
|
+
"The tone or style for the AI to use.":
|
|
85
|
+
"Tonfall bzw. Stil, den die KI verwenden soll.",
|
|
86
|
+
"The target output length.": "Gewünschte Ausgabelänge.",
|
|
87
|
+
Short: "Kurz",
|
|
88
|
+
Medium: "Mittel",
|
|
89
|
+
Long: "Lang",
|
|
90
|
+
Shorter: "Kürzer",
|
|
91
|
+
Longer: "Länger",
|
|
92
|
+
"Output format": "Ausgabeformat",
|
|
93
|
+
Markdown: "Markdown",
|
|
94
|
+
HTML: "HTML",
|
|
95
|
+
"No issues found. Your text looks great!":
|
|
96
|
+
"Keine Probleme gefunden. Dein Text sieht super aus!",
|
|
97
|
+
"Hover highlights to see explanations.":
|
|
98
|
+
"Fahre über Markierungen, um Erklärungen zu sehen.",
|
|
99
|
+
Corrected: "Korrigiert",
|
|
100
|
+
"Alt Text": "Alt-Text",
|
|
101
|
+
"The alt text for the image.": "Alt-Text für das Bild.",
|
|
102
|
+
Title: "Titel",
|
|
103
|
+
"The title for the image.": "Titel für das Bild.",
|
|
104
|
+
Caption: "Bildunterschrift",
|
|
105
|
+
"The caption for the image.": "Bildunterschrift für das Bild.",
|
|
106
|
+
Description: "Beschreibung",
|
|
107
|
+
"The description for the image.": "Beschreibung für das Bild.",
|
|
108
|
+
"The title for the post.": "Titel des Beitrags.",
|
|
109
|
+
Excerpt: "Auszug",
|
|
110
|
+
"The excerpt for the post.":
|
|
111
|
+
"Kurzbeschreibung/Auszug für den Beitrag (kann in Suchergebnissen/Previews erscheinen).",
|
|
112
|
+
Cancel: "Abbrechen",
|
|
113
|
+
Close: "Schließen",
|
|
114
|
+
"Generated content": "Generierter Inhalt",
|
|
115
|
+
Preview: "Vorschau",
|
|
116
|
+
Tone: "Tonfall",
|
|
117
|
+
Length: "Länge",
|
|
118
|
+
"No overrides": "Ohne Überschreibungen",
|
|
119
|
+
tldr: "Kurzfassung",
|
|
120
|
+
teaser: "Teaser",
|
|
121
|
+
"key-points": "Kernaussagen",
|
|
122
|
+
headline: "Überschrift",
|
|
123
|
+
formal: "formell",
|
|
124
|
+
neutral: "neutral",
|
|
125
|
+
casual: "locker",
|
|
126
|
+
"as-is": "unverändert",
|
|
127
|
+
"more-formal": "formeller",
|
|
128
|
+
"more-casual": "lockerer",
|
|
129
|
+
short: "kurz",
|
|
130
|
+
medium: "mittel",
|
|
131
|
+
long: "lang",
|
|
132
|
+
shorter: "kürzer",
|
|
133
|
+
longer: "länger",
|
|
134
|
+
auto: "automatisch",
|
|
135
|
+
Arabic: "Arabisch",
|
|
136
|
+
Chinese: "Chinesisch",
|
|
137
|
+
Dutch: "Niederländisch",
|
|
138
|
+
English: "Englisch",
|
|
139
|
+
French: "Französisch",
|
|
140
|
+
German: "Deutsch",
|
|
141
|
+
Hebrew: "Hebräisch",
|
|
142
|
+
Hindi: "Hindi",
|
|
143
|
+
Hungarian: "Ungarisch",
|
|
144
|
+
Indonesian: "Indonesisch",
|
|
145
|
+
Italian: "Italienisch",
|
|
146
|
+
Japanese: "Japanisch",
|
|
147
|
+
Korean: "Koreanisch",
|
|
148
|
+
Norwegian: "Norwegisch",
|
|
149
|
+
Polish: "Polnisch",
|
|
150
|
+
Portuguese: "Portugiesisch",
|
|
151
|
+
Russian: "Russisch",
|
|
152
|
+
Spanish: "Spanisch",
|
|
153
|
+
Swedish: "Schwedisch",
|
|
154
|
+
Thai: "Thailändisch",
|
|
155
|
+
Turkish: "Türkisch",
|
|
156
|
+
Ukrainian: "Ukrainisch",
|
|
157
|
+
};
|
package/src/i18n/en.ts
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
export const enDict: Record<string, string> = {
|
|
2
|
+
"WPSuite AI-Kit": "WPSuite AI-Kit",
|
|
3
|
+
Accept: "Accept",
|
|
4
|
+
"Additional instructions to guide the AI.":
|
|
5
|
+
"Additional instructions to guide the AI.",
|
|
6
|
+
"Alt Text": "Alt Text",
|
|
7
|
+
"An unknown error occurred.": "An unknown error occurred.",
|
|
8
|
+
Arabic: "Arabic",
|
|
9
|
+
"As-Is": "As-Is",
|
|
10
|
+
"Auto-detect": "Auto-detect",
|
|
11
|
+
Cancel: "Cancel",
|
|
12
|
+
Caption: "Caption",
|
|
13
|
+
Casual: "Casual",
|
|
14
|
+
"Checking capabilities...": "Checking capabilities...",
|
|
15
|
+
Chinese: "Chinese",
|
|
16
|
+
Close: "Close",
|
|
17
|
+
Corrected: "Corrected",
|
|
18
|
+
"Creating LanguageDetector session": "Creating LanguageDetector session",
|
|
19
|
+
"Creating LanguageModel session": "Creating LanguageModel session",
|
|
20
|
+
"Creating Proofreader session": "Creating Proofreader session",
|
|
21
|
+
"Creating Rewriter session": "Creating Rewriter session",
|
|
22
|
+
"Creating Summarizer session": "Creating Summarizer session",
|
|
23
|
+
"Creating Translator session": "Creating Translator session",
|
|
24
|
+
"Creating Writer session": "Creating Writer session",
|
|
25
|
+
"Deciding capability": "Deciding capability",
|
|
26
|
+
Description: "Description",
|
|
27
|
+
"Detecting language": "Detecting language",
|
|
28
|
+
"Done.": "Done.",
|
|
29
|
+
"Downloading model...": "Downloading model...",
|
|
30
|
+
Dutch: "Dutch",
|
|
31
|
+
English: "English",
|
|
32
|
+
Excerpt: "Excerpt",
|
|
33
|
+
Formal: "Formal",
|
|
34
|
+
French: "French",
|
|
35
|
+
Generate: "Generate",
|
|
36
|
+
"Generated content": "Generated content",
|
|
37
|
+
"Generating text": "Generating text",
|
|
38
|
+
"Generating...": "Generating...",
|
|
39
|
+
German: "German",
|
|
40
|
+
HTML: "HTML",
|
|
41
|
+
Headline: "Headline",
|
|
42
|
+
Hebrew: "Hebrew",
|
|
43
|
+
Hide: "Hide",
|
|
44
|
+
Hindi: "Hindi",
|
|
45
|
+
"Hover highlights to see explanations.":
|
|
46
|
+
"Hover highlights to see explanations.",
|
|
47
|
+
Hungarian: "Hungarian",
|
|
48
|
+
Indonesian: "Indonesian",
|
|
49
|
+
"Initializing on-device AI...": "Initializing on-device AI...",
|
|
50
|
+
"Inlining images as base64": "Inlining images as base64",
|
|
51
|
+
"Input and output languages cannot be the same.":
|
|
52
|
+
"Input and output languages cannot be the same.",
|
|
53
|
+
"Input language": "Input language",
|
|
54
|
+
Instructions: "Instructions",
|
|
55
|
+
Italian: "Italian",
|
|
56
|
+
Japanese: "Japanese",
|
|
57
|
+
"Key Points": "Key Points",
|
|
58
|
+
Korean: "Korean",
|
|
59
|
+
Length: "Length",
|
|
60
|
+
Long: "Long",
|
|
61
|
+
Longer: "Longer",
|
|
62
|
+
Markdown: "Markdown",
|
|
63
|
+
Medium: "Medium",
|
|
64
|
+
"More casual": "More casual",
|
|
65
|
+
"More formal": "More formal",
|
|
66
|
+
Neutral: "Neutral",
|
|
67
|
+
"No issues found. Your text looks great!":
|
|
68
|
+
"No issues found. Your text looks great!",
|
|
69
|
+
"No overrides": "No overrides",
|
|
70
|
+
Norwegian: "Norwegian",
|
|
71
|
+
"On-device model ready.": "On-device model ready.",
|
|
72
|
+
Options: "Options",
|
|
73
|
+
"Output format": "Output format",
|
|
74
|
+
"Output language": "Output language",
|
|
75
|
+
Polish: "Polish",
|
|
76
|
+
Portuguese: "Portuguese",
|
|
77
|
+
Preview: "Preview",
|
|
78
|
+
Proofread: "Proofread",
|
|
79
|
+
"Proofread again": "Proofread again",
|
|
80
|
+
"Proofread on Backend": "Proofread on Backend",
|
|
81
|
+
Proofreading: "Proofreading",
|
|
82
|
+
"Received backend response.": "Received backend response.",
|
|
83
|
+
Regenerate: "Regenerate",
|
|
84
|
+
"Regenerate on Backend": "Regenerate on Backend",
|
|
85
|
+
"Replace with": "Replace with",
|
|
86
|
+
"Requesting signed URL": "Requesting signed URL",
|
|
87
|
+
Rewrite: "Rewrite",
|
|
88
|
+
"Rewrite again": "Rewrite again",
|
|
89
|
+
"Rewrite on Backend": "Rewrite on Backend",
|
|
90
|
+
"Rewriting text": "Rewriting text",
|
|
91
|
+
Russian: "Russian",
|
|
92
|
+
"Sending request to backend...": "Sending request to backend...",
|
|
93
|
+
Short: "Short",
|
|
94
|
+
Shorter: "Shorter",
|
|
95
|
+
Show: "Show",
|
|
96
|
+
"Something went wrong.": "Something went wrong.",
|
|
97
|
+
Spanish: "Spanish",
|
|
98
|
+
"Suggested change": "Suggested change",
|
|
99
|
+
Summarize: "Summarize",
|
|
100
|
+
"Summarize again": "Summarize again",
|
|
101
|
+
"Summarize on Backend": "Summarize on Backend",
|
|
102
|
+
Summarizing: "Summarizing",
|
|
103
|
+
Swedish: "Swedish",
|
|
104
|
+
"TL;DR": "TL;DR",
|
|
105
|
+
Teaser: "Teaser",
|
|
106
|
+
Thai: "Thai",
|
|
107
|
+
"The alt text for the image.": "The alt text for the image.",
|
|
108
|
+
"The caption for the image.": "The caption for the image.",
|
|
109
|
+
"The description for the image.": "The description for the image.",
|
|
110
|
+
"The excerpt for the post.":
|
|
111
|
+
"Optional. A short summary that may appear in search results and previews.",
|
|
112
|
+
"The language AI-Kit should use for generated text by default (when applicable).":
|
|
113
|
+
"The language AI-Kit should use for generated text by default (when applicable).",
|
|
114
|
+
"The language of the input text.": "The language of the input text.",
|
|
115
|
+
"The summary style to generate.": "The summary style to generate.",
|
|
116
|
+
"The target output length.": "The target output length.",
|
|
117
|
+
"The title for the image.": "The title for the image.",
|
|
118
|
+
"The title for the post.": "The title for the post.",
|
|
119
|
+
"The tone or style for the AI to use.":
|
|
120
|
+
"The tone or style for the AI to use.",
|
|
121
|
+
"The topic or subject for the AI to write about.":
|
|
122
|
+
"The topic or subject for the AI to write about.",
|
|
123
|
+
Title: "Title",
|
|
124
|
+
Tone: "Tone",
|
|
125
|
+
Topic: "Topic",
|
|
126
|
+
Translate: "Translate",
|
|
127
|
+
"Translate again": "Translate again",
|
|
128
|
+
"Translate on Backend": "Translate on Backend",
|
|
129
|
+
Translating: "Translating",
|
|
130
|
+
Turkish: "Turkish",
|
|
131
|
+
Type: "Type",
|
|
132
|
+
Ukrainian: "Ukrainian",
|
|
133
|
+
Uploading: "Uploading",
|
|
134
|
+
"Uploading images via signed URL": "Uploading images via signed URL",
|
|
135
|
+
"Using backend": "Using backend",
|
|
136
|
+
"Using on-device": "Using on-device",
|
|
137
|
+
"Waiting for backend response...": "Waiting for backend response...",
|
|
138
|
+
Why: "Why",
|
|
139
|
+
"Working...": "Working...",
|
|
140
|
+
"as-is": "as-is",
|
|
141
|
+
auto: "auto",
|
|
142
|
+
casual: "casual",
|
|
143
|
+
formal: "formal",
|
|
144
|
+
headline: "headline",
|
|
145
|
+
"key-points": "key-points",
|
|
146
|
+
long: "long",
|
|
147
|
+
longer: "longer",
|
|
148
|
+
medium: "medium",
|
|
149
|
+
"more-casual": "more-casual",
|
|
150
|
+
"more-formal": "more-formal",
|
|
151
|
+
neutral: "neutral",
|
|
152
|
+
short: "short",
|
|
153
|
+
shorter: "shorter",
|
|
154
|
+
teaser: "teaser",
|
|
155
|
+
tldr: "tldr",
|
|
156
|
+
};
|