forked from XiaoMo/ChatGPT-Next-Web
added de to index and other files
This commit is contained in:
parent
4ce5f89c66
commit
f042d07ee7
@ -74,6 +74,7 @@ const cn = {
|
|||||||
it: "Italiano",
|
it: "Italiano",
|
||||||
tr: "Türkçe",
|
tr: "Türkçe",
|
||||||
jp: "日本語",
|
jp: "日本語",
|
||||||
|
de: "Deutsch",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Avatar: "头像",
|
Avatar: "头像",
|
||||||
|
@ -77,6 +77,7 @@ const es: LocaleType = {
|
|||||||
it: "Italiano",
|
it: "Italiano",
|
||||||
tr: "Türkçe",
|
tr: "Türkçe",
|
||||||
jp: "日本語",
|
jp: "日本語",
|
||||||
|
de: "Deutsch",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Avatar: "Avatar",
|
Avatar: "Avatar",
|
||||||
|
@ -5,10 +5,20 @@ import ES from "./es";
|
|||||||
import IT from "./it";
|
import IT from "./it";
|
||||||
import TR from "./tr";
|
import TR from "./tr";
|
||||||
import JP from "./jp";
|
import JP from "./jp";
|
||||||
|
import DE from "./de";
|
||||||
|
|
||||||
export type { LocaleType } from "./cn";
|
export type { LocaleType } from "./cn";
|
||||||
|
|
||||||
export const AllLangs = ["en", "cn", "tw", "es", "it", "tr", "jp"] as const;
|
export const AllLangs = [
|
||||||
|
"en",
|
||||||
|
"cn",
|
||||||
|
"tw",
|
||||||
|
"es",
|
||||||
|
"it",
|
||||||
|
"tr",
|
||||||
|
"jp",
|
||||||
|
"de",
|
||||||
|
] as const;
|
||||||
type Lang = (typeof AllLangs)[number];
|
type Lang = (typeof AllLangs)[number];
|
||||||
|
|
||||||
const LANG_KEY = "lang";
|
const LANG_KEY = "lang";
|
||||||
@ -56,6 +66,8 @@ export function getLang(): Lang {
|
|||||||
return "tr";
|
return "tr";
|
||||||
} else if (lang.includes("jp")) {
|
} else if (lang.includes("jp")) {
|
||||||
return "jp";
|
return "jp";
|
||||||
|
} else if (lang.includes("de")) {
|
||||||
|
return "de";
|
||||||
} else {
|
} else {
|
||||||
return "en";
|
return "en";
|
||||||
}
|
}
|
||||||
@ -66,6 +78,13 @@ export function changeLang(lang: Lang) {
|
|||||||
location.reload();
|
location.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { en: EN, cn: CN, tw: TW, es: ES, it: IT, tr: TR, jp: JP }[
|
export default {
|
||||||
getLang()
|
en: EN,
|
||||||
];
|
cn: CN,
|
||||||
|
tw: TW,
|
||||||
|
es: ES,
|
||||||
|
it: IT,
|
||||||
|
tr: TR,
|
||||||
|
jp: JP,
|
||||||
|
de: DE,
|
||||||
|
}[getLang()];
|
||||||
|
@ -77,6 +77,7 @@ const it: LocaleType = {
|
|||||||
it: "Italiano",
|
it: "Italiano",
|
||||||
tr: "Türkçe",
|
tr: "Türkçe",
|
||||||
jp: "日本語",
|
jp: "日本語",
|
||||||
|
de: "Deutsch",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Avatar: "Avatar",
|
Avatar: "Avatar",
|
||||||
|
@ -76,6 +76,7 @@ const jp = {
|
|||||||
it: "Italiano",
|
it: "Italiano",
|
||||||
tr: "Türkçe",
|
tr: "Türkçe",
|
||||||
jp: "日本語",
|
jp: "日本語",
|
||||||
|
de: "Deutsch",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Avatar: "アバター",
|
Avatar: "アバター",
|
||||||
|
@ -77,6 +77,7 @@ const tr: LocaleType = {
|
|||||||
it: "Italiano",
|
it: "Italiano",
|
||||||
tr: "Türkçe",
|
tr: "Türkçe",
|
||||||
jp: "日本語",
|
jp: "日本語",
|
||||||
|
de: "Deutsch",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Avatar: "Avatar",
|
Avatar: "Avatar",
|
||||||
|
@ -75,6 +75,7 @@ const tw: LocaleType = {
|
|||||||
it: "Italiano",
|
it: "Italiano",
|
||||||
tr: "Türkçe",
|
tr: "Türkçe",
|
||||||
jp: "日本語",
|
jp: "日本語",
|
||||||
|
de: "Deutsch",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Avatar: "大頭貼",
|
Avatar: "大頭貼",
|
||||||
@ -152,7 +153,8 @@ const tw: LocaleType = {
|
|||||||
Prompt: {
|
Prompt: {
|
||||||
History: (content: string) =>
|
History: (content: string) =>
|
||||||
"這是 AI 與用戶的歷史聊天總結,作為前情提要:" + content,
|
"這是 AI 與用戶的歷史聊天總結,作為前情提要:" + content,
|
||||||
Topic: "Summarise the conversation in a short and concise eye-catching title that instantly conveys the main topic. Use as few words as possible. Use the language used in the enquiry, e.g. use English for English enquiry, use zh-hant for traditional chinese enquiry. Don't use quotation marks at the beginning and the end.",
|
Topic:
|
||||||
|
"Summarise the conversation in a short and concise eye-catching title that instantly conveys the main topic. Use as few words as possible. Use the language used in the enquiry, e.g. use English for English enquiry, use zh-hant for traditional chinese enquiry. Don't use quotation marks at the beginning and the end.",
|
||||||
Summarize:
|
Summarize:
|
||||||
"Summarise the conversation in at most 250 tokens for continuing the conversation in future. Use the language used in the conversation, e.g. use English for English conversation, use zh-hant for traditional chinese conversation.",
|
"Summarise the conversation in at most 250 tokens for continuing the conversation in future. Use the language used in the conversation, e.g. use English for English conversation, use zh-hant for traditional chinese conversation.",
|
||||||
},
|
},
|
||||||
|
@ -560,6 +560,7 @@ export const useChatStore = create<ChatStore>()(
|
|||||||
onError(error) {
|
onError(error) {
|
||||||
console.error("[Summarize] ", error);
|
console.error("[Summarize] ", error);
|
||||||
},
|
},
|
||||||
|
enen,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user