Update localization files and remove unused files

This commit is contained in:
n4ze3m 2024-04-06 21:51:13 +05:30
parent 0ec5621b89
commit e96a579e02
22 changed files with 212 additions and 31 deletions

View File

@ -48,5 +48,6 @@
"submit": "Submit",
"noData": "No data",
"noHistory": "No chat history",
"chatWithCurrentPage": "Chat with current page"
"chatWithCurrentPage": "Chat with current page",
"beta": "Beta"
}

View File

@ -0,0 +1,42 @@
{
"addBtn": "Add New Knowledge",
"columns": {
"title": "Title",
"status": "Status",
"embeddings": "Embedding Model",
"createdAt": "Created At",
"action": "Actions"
},
"expandedColumns": {
"name": "Name"
},
"tooltip": {
"delete": "Delete"
},
"confirm": {
"delete": "Are you sure you want to delete this knowledge?"
},
"deleteSuccess": "Knowledge deleted successfully",
"status": {
"pending": "Pending",
"finished": "Finished",
"processing": "Processing"
},
"addKnowledge": "Add Knowledge",
"form": {
"title": {
"label": "Knowledge Title",
"placeholder": "Enter knowledge title",
"required": "Knowledge title is required"
},
"uploadFile": {
"label": "Upload File",
"uploadText": "Drag and drop a file here or click to upload",
"uploadHint": "Supported file types: .pdf, .csv, .txt",
"required": "File is required"
},
"submit": "Submit",
"success": "Knowledge added successfully"
},
"noEmbeddingModel": "Please add an embedding model first from the Ollama settings page"
}

View File

@ -1,3 +0,0 @@
{
"addBtn": "Add New Knowledge"
}

View File

@ -48,5 +48,6 @@
"submit": "送信",
"noData": "データがありません",
"noHistory": "チャット履歴がありません",
"chatWithCurrentPage": "現在のページでチャット"
"chatWithCurrentPage": "現在のページでチャット",
"beta": "ベータ"
}

View File

@ -0,0 +1,42 @@
{
"addBtn": "新しい知識を追加",
"columns": {
"title": "タイトル",
"status": "ステータス",
"embeddings": "埋め込みモデル",
"createdAt": "作成日",
"action": "アクション"
},
"expandedColumns": {
"name": "名前"
},
"tooltip": {
"delete": "削除"
},
"confirm": {
"delete": "この知識を削除してもよろしいですか?"
},
"deleteSuccess": "知識が正常に削除されました",
"status": {
"pending": "保留中",
"finished": "完了",
"processing": "処理中"
},
"addKnowledge": "知識を追加",
"form": {
"title": {
"label": "知識タイトル",
"placeholder": "知識のタイトルを入力してください",
"required": "知識のタイトルは必須です"
},
"uploadFile": {
"label": "ファイルをアップロード",
"uploadText": "ファイルをここにドラッグアンドドロップするか、クリックしてアップロード",
"uploadHint": "サポートされているファイルタイプ: .pdf、.csv、.txt",
"required": "ファイルは必須です"
},
"submit": "送信",
"success": "知識が正常に追加されました"
},
"noEmbeddingModel": "最初にOllamaの設定ページから埋め込みモデルを追加してください"
}

View File

@ -1 +0,0 @@
{}

View File

@ -245,5 +245,9 @@
"koFi": "Ko-fiで支援する",
"githubSponsor": "GitHubでスポンサーする",
"githubRepo": "GitHubリポジトリ"
}
},
"manageKnowledge": {
"title": "知識を管理する",
"heading": "知識ベースを構成する"
}
}

View File

@ -48,5 +48,6 @@
"submit": "സമർപ്പിക്കുക",
"noData": "ഡാറ്റ ലഭ്യമല്ല",
"noHistory": "ചാറ്റ് ചരിത്രം ലഭ്യമല്ല",
"chatWithCurrentPage": "നിലവിലെ പേജിനുമായി ചാറ്റ് ചെയ്യുക"
"chatWithCurrentPage": "നിലവിലെ പേജിനുമായി ചാറ്റ് ചെയ്യുക",
"beta": "ബീറ്റ"
}

View File

@ -0,0 +1,42 @@
{
"addBtn": "പുതിയ വിജ്ഞാനം ചേര്‍ക്കുക",
"columns": {
"title": "തലക്കെട്ട്",
"status": "സ്ഥിതി",
"embeddings": "എംബെഡിംഗ് മോഡല്‍",
"createdAt": "സൃഷ്ടിച്ചത്",
"action": "പ്രവർത്തനങ്ങൾ"
},
"expandedColumns": {
"name": "നാമം"
},
"tooltip": {
"delete": "ഇല്ലാതാക്കുക"
},
"confirm": {
"delete": "നിങ്ങൾക്ക് ഈ വിജ്ഞാനം ഇല്ലാതാക്കണമെന്ന് ഉറപ്പാണോ?"
},
"deleteSuccess": "വിജ്ഞാനം വിജയകരമായി ഇല്ലാതാക്കി",
"status": {
"pending": "തീരുമാനിക്കാനുണ്ട്",
"finished": "പൂർത്തീകരിച്ചു",
"processing": "പ്രോസസ്സിംഗ്"
},
"addKnowledge": "വിജ്ഞാനം ചേര്‍ക്കുക",
"form": {
"title": {
"label": "വിജ്ഞാനത്തിന്റെ തലക്കെട്ട്",
"placeholder": "വിജ്ഞാനത്തിന്റെ തലക്കെട്ട് നല്‍കുക",
"required": "വിജ്ഞാനത്തിന്റെ തലക്കെട്ട് ആവശ്യമാണ്"
},
"uploadFile": {
"label": "ഫയല്‍ അപ്‌ലോഡ് ചെയ്യുക",
"uploadText": "ഇവിടെ ഒരു ഫയല്‍ എടുത്തിടുക അല്ലെങ്കില്‍ അപ്‌ലോഡ് ചെയ്യാന്‍ ക്ലിക്ക് ചെയ്യുക",
"uploadHint": "പിന്തുണയുള്ള ഫയല്‍ തരങ്ങള്‍: .pdf, .csv, .txt",
"required": "ഫയല്‍ ആവശ്യമാണ്"
},
"submit": "സമര്‍പ്പിക്കുക",
"success": "വിജ്ഞാനം വിജയകരമായി ചേര്‍ത്തു"
},
"noEmbeddingModel": "ദയവായി ആദ്യം Ollama ക്രമീകരണ പേജില്‍ നിന്ന് ഒരു എംബെഡിംഗ് മോഡല്‍ ചേര്‍ക്കുക"
}

View File

@ -1 +0,0 @@
{}

View File

@ -245,6 +245,9 @@
"koFi": "കോഫിയിൽ പിന്തുണയ്ക്കുക",
"githubSponsor": "ഗിറ്റ്ഹബ്ബിൽ സ്പോൺസർ ചെയ്യുക",
"githubRepo": "ഗിറ്റ്ഹബ്ബ് റെപ്പോസിറ്ററി"
}
},
"manageKnowledge": {
"title": "വിജ്ഞാനം നിര്‍വ്വഹിക്കുക",
"heading": "വിജ്ഞാനാധാരം കോണ്‍ഫിഗര്‍ ചെയ്യുക"
}
}

View File

@ -48,5 +48,6 @@
"submit": "提交",
"noData": "无数据",
"noHistory": "无聊天记录",
"chatWithCurrentPage": "与当前页面聊天"
"chatWithCurrentPage": "与当前页面聊天",
"beta": "Beta"
}

View File

@ -0,0 +1,42 @@
{
"addBtn": "添加新知识",
"columns": {
"title": "标题",
"status": "状态",
"embeddings": "嵌入模型",
"createdAt": "创建于",
"action": "操作"
},
"expandedColumns": {
"name": "名称"
},
"tooltip": {
"delete": "删除"
},
"confirm": {
"delete": "您确定要删除此知识吗?"
},
"deleteSuccess": "知识删除成功",
"status": {
"pending": "待定",
"finished": "已完成",
"processing": "处理中"
},
"addKnowledge": "添加知识",
"form": {
"title": {
"label": "知识标题",
"placeholder": "输入知识标题",
"required": "知识标题是必需的"
},
"uploadFile": {
"label": "上传文件",
"uploadText": "将文件拖放到此处或点击上传",
"uploadHint": "支持的文件类型: .pdf, .csv, .txt",
"required": "文件是必需的"
},
"submit": "提交",
"success": "知识添加成功"
},
"noEmbeddingModel": "请先从Ollama设置页面添加一个嵌入模型"
}

View File

@ -1 +0,0 @@
{}

View File

@ -246,5 +246,9 @@
"koFi": "在Ko-fi上支持",
"githubSponsor": "在GitHub上赞助",
"githubRepo": "GitHub仓库"
}
},
"manageKnowledge": {
"title": "管理知识",
"heading": "配置知识库"
}
}

View File

@ -53,7 +53,7 @@ export const SettingsLayout = ({ children }: { children: React.ReactNode }) => {
return (
<>
<div className="mx-auto max-w-7xl lg:flex lg:gap-x-16 lg:px-8">
<aside className="flex lg:rounded-md bg-white lg:p-4 lg:mt-20 overflow-x-auto lg:border-0 border-b py-4 lg:block lg:w-64 lg:flex-none dark:bg-[#171717] dark:border-gray-600">
<aside className="flex lg:rounded-md bg-white lg:p-4 lg:mt-20 overflow-x-auto lg:border-0 border-b py-4 lg:block lg:w-72 lg:flex-none dark:bg-[#171717] dark:border-gray-600">
<nav className="flex-none px-4 sm:px-6 lg:px-0">
<ul
role="list"

View File

@ -14,7 +14,7 @@ type Props = {
}
export const AddKnowledge = ({ open, setOpen }: Props) => {
const { t } = useTranslation("knowledge")
const { t } = useTranslation(["knowledge", "common"])
const [form] = Form.useForm()
const onUploadHandler = async (data: {
@ -51,6 +51,7 @@ export const AddKnowledge = ({ open, setOpen }: Props) => {
onSuccess: async (id) => {
message.success(t("form.success"))
PubSub.publish(KNOWLEDGE_QUEUE, id)
form.resetFields()
setOpen(false)
}
})

View File

@ -9,13 +9,10 @@ import { KnowledgeIcon } from "./KnowledgeIcon"
import { useMessageOption } from "@/hooks/useMessageOption"
export const KnowledgeSettings = () => {
const { t } = useTranslation(["knownledge", "common"])
const { t } = useTranslation(["knowledge", "common"])
const [open, setOpen] = useState(false)
const queryClient = useQueryClient()
const {
selectedKnowledge,
setSelectedKnowledge
} = useMessageOption()
const { selectedKnowledge, setSelectedKnowledge } = useMessageOption()
const { data, status } = useQuery({
queryKey: ["fetchAllKnowledge"],
@ -38,6 +35,12 @@ export const KnowledgeSettings = () => {
}
})
const statusColor = {
finished: "green",
processing: "blue",
pending: "gray"
}
return (
<div>
<div>
@ -68,7 +71,7 @@ export const KnowledgeSettings = () => {
dataIndex: "status",
key: "status",
render: (text: string) => (
<Tag color="blue">{t(`status.${text}`)}</Tag>
<Tag color={statusColor[text]}>{t(`status.${text}`)}</Tag>
)
},
{
@ -93,7 +96,7 @@ export const KnowledgeSettings = () => {
onClick={() => {
if (window.confirm(t("confirm.delete"))) {
deleteKnowledgeMutation(record.id)
if(selectedKnowledge.id === record.id) {
if (selectedKnowledge.id === record.id) {
setSelectedKnowledge(null)
}
}

View File

@ -3,7 +3,7 @@ import playground from "@/assets/locale/en/playground.json";
import common from "@/assets/locale/en/common.json";
import sidepanel from "@/assets/locale/en/sidepanel.json";
import settings from "@/assets/locale/en/settings.json";
import knownledge from "@/assets/locale/en/knownledge.json";
import knowledge from "@/assets/locale/en/knowledge.json";
export const en = {
option,
@ -11,5 +11,5 @@ export const en = {
common,
sidepanel,
settings,
knownledge
knowledge
}

View File

@ -3,7 +3,7 @@ import playground from "@/assets/locale/ja-JP/playground.json";
import common from "@/assets/locale/ja-JP/common.json";
import sidepanel from "@/assets/locale/ja-JP/sidepanel.json";
import settings from "@/assets/locale/ja-JP/settings.json";
import knownledge from "@/assets/locale/ja-JP/knownledge.json";
import knowledge from "@/assets/locale/ja-JP/knowledge.json";
export const ja = {
@ -12,5 +12,5 @@ export const ja = {
common,
sidepanel,
settings,
knownledge
knowledge
}

View File

@ -3,7 +3,7 @@ import playground from "@/assets/locale/ml/playground.json";
import common from "@/assets/locale/ml/common.json";
import sidepanel from "@/assets/locale/ml/sidepanel.json";
import settings from "@/assets/locale/ml/settings.json";
import knownledge from "@/assets/locale/ml/knownledge.json";
import knowledge from "@/assets/locale/ml/knowledge.json";
export const ml = {
option,
@ -11,5 +11,5 @@ export const ml = {
common,
sidepanel,
settings,
knownledge
knowledge
}

View File

@ -3,7 +3,7 @@ import playground from "@/assets/locale/zh/playground.json";
import common from "@/assets/locale/zh/common.json";
import sidepanel from "@/assets/locale/zh/sidepanel.json";
import settings from "@/assets/locale/zh/settings.json";
import knownledge from "@/assets/locale/zh/knownledge.json";
import knowledge from "@/assets/locale/zh/knowledge.json";
export const zh = {
@ -12,5 +12,5 @@ export const zh = {
common,
sidepanel,
settings,
knownledge
knowledge
}