Merge remote-tracking branch 'upstream/main' into dev

This commit is contained in:
Jason Wang 2023-04-16 18:28:54 +08:00
commit 5819d8b8b4
9 changed files with 222 additions and 12 deletions

View File

@ -74,6 +74,7 @@ const cn = {
it: "Italiano", it: "Italiano",
tr: "Türkçe", tr: "Türkçe",
jp: "日本語", jp: "日本語",
de: "Deutsch",
}, },
}, },
Avatar: "头像", Avatar: "头像",

183
app/locales/de.ts Normal file
View File

@ -0,0 +1,183 @@
import { SubmitKey } from "../store/app";
import type { LocaleType } from "./index";
const de: LocaleType = {
WIP: "In Bearbeitung...",
Error: {
Unauthorized:
"Unbefugter Zugriff, bitte geben Sie den Zugangscode auf der Einstellungsseite ein.",
},
ChatItem: {
ChatItemCount: (count: number) => `${count} Nachrichten`,
},
Chat: {
SubTitle: (count: number) => `${count} Nachrichten mit ChatGPT`,
Actions: {
ChatList: "Zur Chat-Liste gehen",
CompressedHistory: "Komprimierter Gedächtnis-Prompt",
Export: "Alle Nachrichten als Markdown exportieren",
Copy: "Kopieren",
Stop: "Stop",
Retry: "Wiederholen",
},
Rename: "Chat umbenennen",
Typing: "Tippen...",
Input: (submitKey: string) => {
var inputHints = `${submitKey} um zu Senden`;
if (submitKey === String(SubmitKey.Enter)) {
inputHints += ", Umschalt + Eingabe für Zeilenumbruch";
}
return inputHints + ", / zum Durchsuchen von Prompts";
},
Send: "Senden",
},
Export: {
Title: "Alle Nachrichten",
Copy: "Alles kopieren",
Download: "Herunterladen",
MessageFromYou: "Deine Nachricht",
MessageFromChatGPT: "Nachricht von ChatGPT",
},
Memory: {
Title: "Gedächtnis-Prompt",
EmptyContent: "Noch nichts.",
Send: "Gedächtnis senden",
Copy: "Gedächtnis kopieren",
Reset: "Sitzung zurücksetzen",
ResetConfirm:
"Das Zurücksetzen löscht den aktuellen Gesprächsverlauf und das Langzeit-Gedächtnis. Möchten Sie wirklich zurücksetzen?",
},
Home: {
NewChat: "Neuer Chat",
DeleteChat: "Bestätigen Sie, um das ausgewählte Gespräch zu löschen?",
DeleteToast: "Chat gelöscht",
Revert: "Zurücksetzen",
},
Settings: {
Title: "Einstellungen",
SubTitle: "Alle Einstellungen",
Actions: {
ClearAll: "Alle Daten löschen",
ResetAll: "Alle Einstellungen zurücksetzen",
Close: "Schließen",
ConfirmResetAll: {
Confirm: "Möchten Sie wirklich alle Konfigurationen zurücksetzen?",
},
ConfirmClearAll: {
Confirm: "Möchten Sie wirklich alle Chats zurücksetzen?",
},
},
Lang: {
Name: "Language", // ATTENTION: if you wanna add a new translation, please do not translate this value, leave it as `Language`
Options: {
cn: "简体中文",
en: "English",
tw: "繁體中文",
es: "Español",
it: "Italiano",
tr: "Türkçe",
jp: "日本語",
de: "Deutsch",
},
},
Avatar: "Avatar",
FontSize: {
Title: "Schriftgröße",
SubTitle: "Schriftgröße des Chat-Inhalts anpassen",
},
Update: {
Version: (x: string) => `Version: ${x}`,
IsLatest: "Neueste Version",
CheckUpdate: "Update prüfen",
IsChecking: "Update wird geprüft...",
FoundUpdate: (x: string) => `Neue Version gefunden: ${x}`,
GoToUpdate: "Aktualisieren",
},
SendKey: "Senden-Taste",
Theme: "Erscheinungsbild",
TightBorder: "Enger Rahmen",
SendPreviewBubble: "Vorschau-Bubble senden",
Prompt: {
Disable: {
Title: "Autovervollständigung deaktivieren",
SubTitle: "Autovervollständigung mit / starten",
},
List: "Prompt-Liste",
ListCount: (builtin: number, custom: number) =>
`${builtin} integriert, ${custom} benutzerdefiniert`,
Edit: "Bearbeiten",
},
HistoryCount: {
Title: "Anzahl der angehängten Nachrichten",
SubTitle: "Anzahl der pro Anfrage angehängten gesendeten Nachrichten",
},
CompressThreshold: {
Title: "Schwellenwert für Verlaufskomprimierung",
SubTitle:
"Komprimierung, wenn die Länge der unkomprimierten Nachrichten den Wert überschreitet",
},
Token: {
Title: "API-Schlüssel",
SubTitle:
"Verwenden Sie Ihren Schlüssel, um das Zugangscode-Limit zu ignorieren",
Placeholder: "OpenAI API-Schlüssel",
},
Usage: {
Title: "Kontostand",
SubTitle(used: any, total: any) {
return `Diesen Monat ausgegeben $${used}, Abonnement $${total}`;
},
IsChecking: "Wird überprüft...",
Check: "Erneut prüfen",
NoAccess: "API-Schlüssel eingeben, um den Kontostand zu überprüfen",
},
AccessCode: {
Title: "Zugangscode",
SubTitle: "Zugangskontrolle aktiviert",
Placeholder: "Zugangscode erforderlich",
},
Model: "Modell",
Temperature: {
Title: "Temperature", //Temperatur
SubTitle: "Ein größerer Wert führt zu zufälligeren Antworten",
},
MaxTokens: {
Title: "Max Tokens", //Maximale Token
SubTitle: "Maximale Anzahl der Anfrage- plus Antwort-Token",
},
PresencePenlty: {
Title: "Presence Penalty", //Anwesenheitsstrafe
SubTitle:
"Ein größerer Wert erhöht die Wahrscheinlichkeit, dass über neue Themen gesprochen wird",
},
},
Store: {
DefaultTopic: "Neues Gespräch",
BotHello: "Hallo! Wie kann ich Ihnen heute helfen?",
Error:
"Etwas ist schief gelaufen, bitte versuchen Sie es später noch einmal.",
Prompt: {
History: (content: string) =>
"Dies ist eine Zusammenfassung des Chatverlaufs zwischen dem KI und dem Benutzer als Rückblick: " +
content,
Topic:
"Bitte erstellen Sie einen vier- bis fünfwörtigen Titel, der unser Gespräch zusammenfasst, ohne Einleitung, Zeichensetzung, Anführungszeichen, Punkte, Symbole oder zusätzlichen Text. Entfernen Sie Anführungszeichen.",
Summarize:
"Fassen Sie unsere Diskussion kurz in 200 Wörtern oder weniger zusammen, um sie als Pronpt für zukünftige Gespräche zu verwenden.",
},
ConfirmClearAll:
"Bestätigen Sie, um alle Chat- und Einstellungsdaten zu löschen?",
},
Copy: {
Success: "In die Zwischenablage kopiert",
Failed:
"Kopieren fehlgeschlagen, bitte geben Sie die Berechtigung zum Zugriff auf die Zwischenablage frei",
},
Context: {
Toast: (x: any) => `Mit ${x} Kontext-Prompts`,
Edit: "Kontext- und Gedächtnis-Prompts",
Add: "Hinzufügen",
},
};
export default de;

View File

@ -77,6 +77,7 @@ const en: LocaleType = {
it: "Italiano", it: "Italiano",
tr: "Türkçe", tr: "Türkçe",
jp: "日本語", jp: "日本語",
de: "Deutsch",
}, },
}, },
Avatar: "Avatar", Avatar: "Avatar",

View File

@ -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",

View File

@ -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()];

View File

@ -45,12 +45,12 @@ const it: LocaleType = {
Send: "Send Memory", Send: "Send Memory",
Reset: "Reset Session", Reset: "Reset Session",
ResetConfirm: ResetConfirm:
"Resetting will clear the current conversation history and historical memory. Are you sure you want to reset?", "Ripristinare cancellerà la conversazione corrente e la cronologia di memoria. Sei sicuro che vuoi riavviare?",
}, },
Home: { Home: {
NewChat: "Nuova Chat", NewChat: "Nuova Chat",
DeleteChat: "Confermare la cancellazione della conversazione selezionata?", DeleteChat: "Confermare la cancellazione della conversazione selezionata?",
DeleteToast: "Chat Deleted", DeleteToast: "Chat Cancellata",
Revert: "Revert", Revert: "Revert",
}, },
Settings: { Settings: {
@ -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",
@ -93,9 +94,9 @@ const it: LocaleType = {
GoToUpdate: "Aggiorna", GoToUpdate: "Aggiorna",
}, },
SendKey: "Tasto invia", SendKey: "Tasto invia",
Theme: "tema", Theme: "Tema",
TightBorder: "Bordi stretti", TightBorder: "Schermo intero",
SendPreviewBubble: "Invia l'anteprima della bolla", SendPreviewBubble: "Anteprima di digitazione",
Prompt: { Prompt: {
Disable: { Disable: {
Title: "Disabilita l'auto completamento", Title: "Disabilita l'auto completamento",
@ -116,7 +117,7 @@ const it: LocaleType = {
"Comprimerà se la lunghezza dei messaggi non compressi supera il valore", "Comprimerà se la lunghezza dei messaggi non compressi supera il valore",
}, },
Token: { Token: {
Title: "Chiave API", Title: "API Key",
SubTitle: SubTitle:
"Utilizzare la chiave per ignorare il limite del codice di accesso", "Utilizzare la chiave per ignorare il limite del codice di accesso",
Placeholder: "OpenAI API Key", Placeholder: "OpenAI API Key",
@ -124,7 +125,7 @@ const it: LocaleType = {
Usage: { Usage: {
Title: "Bilancio Account", Title: "Bilancio Account",
SubTitle(used: any, total: any) { SubTitle(used: any, total: any) {
return `Usato in questo mese $${used}, subscription $${total}`; return `Attualmente usato in questo mese $${used}, soglia massima $${total}`;
}, },
IsChecking: "Controllando...", IsChecking: "Controllando...",
Check: "Controlla ancora", Check: "Controlla ancora",

View File

@ -76,6 +76,7 @@ const jp = {
it: "Italiano", it: "Italiano",
tr: "Türkçe", tr: "Türkçe",
jp: "日本語", jp: "日本語",
de: "Deutsch",
}, },
}, },
Avatar: "アバター", Avatar: "アバター",

View File

@ -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",

View File

@ -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.",
}, },