Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: i18n in message exporter #2048

Merged
merged 1 commit into from
Jun 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/components/exporter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -449,16 +449,16 @@ export function ImagePreviewer(props: {
</div>
<div>
<div className={styles["chat-info-item"]}>
Model: {mask.modelConfig.model}
{Locale.Exporter.Model}: {mask.modelConfig.model}
</div>
<div className={styles["chat-info-item"]}>
Messages: {props.messages.length}
{Locale.Exporter.Messages}: {props.messages.length}
</div>
<div className={styles["chat-info-item"]}>
Topic: {session.topic}
{Locale.Exporter.Topic}: {session.topic}
</div>
<div className={styles["chat-info-item"]}>
Time:{" "}
{Locale.Exporter.Time}:{" "}
{new Date(
props.messages.at(-1)?.date ?? Date.now(),
).toLocaleString()}
Expand Down
6 changes: 6 additions & 0 deletions app/locales/cn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,12 @@ const cn = {
Create: "新建",
Edit: "编辑",
},
Exporter: {
Model: "模型",
Messages: "消息",
Topic: "主题",
Time: "时间",
},
};

type DeepPartial<T> = T extends object
Expand Down
6 changes: 6 additions & 0 deletions app/locales/cs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,12 @@ const cs: PartialLocaleType = {
Create: "Vytvořit",
Edit: "Upravit",
},
Exporter: {
Model: "Model",
Messages: "Zprávy",
Topic: "Téma",
Time: "Čas",
},
};

export default cs;
6 changes: 6 additions & 0 deletions app/locales/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,12 @@ const de: PartialLocaleType = {
Create: "Create",
Edit: "Edit",
},
Exporter: {
Model: "Modell",
Messages: "Nachrichten",
Topic: "Thema",
Time: "Zeit",
},
};

export default de;
6 changes: 6 additions & 0 deletions app/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,12 @@ const en: LocaleType = {
Create: "Create",
Edit: "Edit",
},
Exporter: {
Model: "Model",
Messages: "Messages",
Topic: "Topic",
Time: "Time",
},
};

export default en;
6 changes: 6 additions & 0 deletions app/locales/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,12 @@ const es: PartialLocaleType = {
Create: "Create",
Edit: "Edit",
},
Exporter: {
Model: "Modelo",
Messages: "Mensajes",
Topic: "Tema",
Time: "Time",
},
};

export default es;
6 changes: 6 additions & 0 deletions app/locales/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,12 @@ const fr: PartialLocaleType = {
Create: "Créer",
Edit: "Éditer",
},
Exporter: {
Model: "Modèle",
Messages: "Messages",
Topic: "Sujet",
Time: "Temps",
},
};

export default fr;
6 changes: 6 additions & 0 deletions app/locales/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,12 @@ const it: PartialLocaleType = {
Create: "Create",
Edit: "Edit",
},
Exporter: {
Model: "Modello",
Messages: "Messaggi",
Topic: "Argomento",
Time: "Tempo",
},
};

export default it;
6 changes: 6 additions & 0 deletions app/locales/jp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,12 @@ const jp: PartialLocaleType = {
Create: "新規",
Edit: "編集",
},
Exporter: {
Model: "モデル",
Messages: "メッセージ",
Topic: "トピック",
Time: "時間",
},
};

export default jp;
6 changes: 6 additions & 0 deletions app/locales/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,12 @@ const ko: PartialLocaleType = {
Create: "생성",
Edit: "편집",
},
Exporter: {
Model: "모델",
Messages: "메시지",
Topic: "주제",
Time: "시간",
},
};

export default ko;
6 changes: 6 additions & 0 deletions app/locales/no.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ const no: PartialLocaleType = {
Edit: "Kontekstuelle -og minneinstrukser",
Add: "Legg til",
},
Exporter: {
Model: "Model",
Messages: "Meldingar",
Topic: "Emne",
Time: "Tid",
},
};

export default no;
6 changes: 6 additions & 0 deletions app/locales/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,12 @@ const ru: PartialLocaleType = {
Create: "Создать",
Edit: "Редактировать",
},
Exporter: {
Model: "Модель",
Messages: "Сообщения",
Topic: "Тема",
Time: "Время",
},
};

export default ru;
6 changes: 6 additions & 0 deletions app/locales/tr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,12 @@ const tr: PartialLocaleType = {
Create: "Create",
Edit: "Edit",
},
Exporter: {
Model: "Model",
Messages: "Mesajlar",
Topic: "Konu",
Time: "Zaman",
},
};

export default tr;
6 changes: 6 additions & 0 deletions app/locales/tw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,12 @@ const tw: PartialLocaleType = {
Create: "新建",
Edit: "编辑",
},
Exporter: {
Model: "模型",
Messages: "消息",
Topic: "主題",
Time: "時間",
},
};

export default tw;
6 changes: 6 additions & 0 deletions app/locales/vi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,12 @@ const vi: PartialLocaleType = {
Create: "Tạo",
Edit: "Chỉnh sửa",
},
Exporter: {
Model: "Mô hình",
Messages: "Thông điệp",
Topic: "Chủ đề",
Time: "Thời gian",
},
};

export default vi;