From f042d07ee7312dc792ef78c497ba68655ccfc4be Mon Sep 17 00:00:00 2001 From: tscherrie tscherru Date: Sun, 16 Apr 2023 05:07:54 +0000 Subject: [PATCH] added de to index and other files --- app/locales/cn.ts | 1 + app/locales/es.ts | 1 + app/locales/index.ts | 27 +++++++++++++++++++++++---- app/locales/it.ts | 1 + app/locales/jp.ts | 1 + app/locales/tr.ts | 1 + app/locales/tw.ts | 4 +++- app/store/app.ts | 1 + 8 files changed, 32 insertions(+), 5 deletions(-) diff --git a/app/locales/cn.ts b/app/locales/cn.ts index 9973a3c6..aa99227c 100644 --- a/app/locales/cn.ts +++ b/app/locales/cn.ts @@ -74,6 +74,7 @@ const cn = { it: "Italiano", tr: "Türkçe", jp: "日本語", + de: "Deutsch", }, }, Avatar: "头像", diff --git a/app/locales/es.ts b/app/locales/es.ts index 88bcd201..a895367f 100644 --- a/app/locales/es.ts +++ b/app/locales/es.ts @@ -77,6 +77,7 @@ const es: LocaleType = { it: "Italiano", tr: "Türkçe", jp: "日本語", + de: "Deutsch", }, }, Avatar: "Avatar", diff --git a/app/locales/index.ts b/app/locales/index.ts index dff1e661..e4b303b4 100644 --- a/app/locales/index.ts +++ b/app/locales/index.ts @@ -5,10 +5,20 @@ import ES from "./es"; import IT from "./it"; import TR from "./tr"; import JP from "./jp"; +import DE from "./de"; 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]; const LANG_KEY = "lang"; @@ -56,6 +66,8 @@ export function getLang(): Lang { return "tr"; } else if (lang.includes("jp")) { return "jp"; + } else if (lang.includes("de")) { + return "de"; } else { return "en"; } @@ -66,6 +78,13 @@ export function changeLang(lang: Lang) { location.reload(); } -export default { en: EN, cn: CN, tw: TW, es: ES, it: IT, tr: TR, jp: JP }[ - getLang() -]; +export default { + en: EN, + cn: CN, + tw: TW, + es: ES, + it: IT, + tr: TR, + jp: JP, + de: DE, +}[getLang()]; diff --git a/app/locales/it.ts b/app/locales/it.ts index c785d616..92857221 100644 --- a/app/locales/it.ts +++ b/app/locales/it.ts @@ -77,6 +77,7 @@ const it: LocaleType = { it: "Italiano", tr: "Türkçe", jp: "日本語", + de: "Deutsch", }, }, Avatar: "Avatar", diff --git a/app/locales/jp.ts b/app/locales/jp.ts index 50ac2160..09623a57 100644 --- a/app/locales/jp.ts +++ b/app/locales/jp.ts @@ -76,6 +76,7 @@ const jp = { it: "Italiano", tr: "Türkçe", jp: "日本語", + de: "Deutsch", }, }, Avatar: "アバター", diff --git a/app/locales/tr.ts b/app/locales/tr.ts index 708d2d7d..a77771be 100644 --- a/app/locales/tr.ts +++ b/app/locales/tr.ts @@ -77,6 +77,7 @@ const tr: LocaleType = { it: "Italiano", tr: "Türkçe", jp: "日本語", + de: "Deutsch", }, }, Avatar: "Avatar", diff --git a/app/locales/tw.ts b/app/locales/tw.ts index b239ed65..318bdcd2 100644 --- a/app/locales/tw.ts +++ b/app/locales/tw.ts @@ -75,6 +75,7 @@ const tw: LocaleType = { it: "Italiano", tr: "Türkçe", jp: "日本語", + de: "Deutsch", }, }, Avatar: "大頭貼", @@ -152,7 +153,8 @@ const tw: LocaleType = { Prompt: { History: (content: string) => "這是 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: "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.", }, diff --git a/app/store/app.ts b/app/store/app.ts index 81366890..c767d999 100644 --- a/app/store/app.ts +++ b/app/store/app.ts @@ -560,6 +560,7 @@ export const useChatStore = create()( onError(error) { console.error("[Summarize] ", error); }, + enen, }, ); }