Skip to content

Commit

Permalink
Merge pull request ChatGPTNextWeb#5147 from ConnectAI-E/fix-locales
Browse files Browse the repository at this point in the history
fix: locales => Locale
  • Loading branch information
lloydzhou authored Aug 2, 2024
2 parents 957244b + 8cb72d8 commit 9193a9a
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions app/components/sd/sd.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import CopyIcon from "@/app/icons/copy.svg";
import PromptIcon from "@/app/icons/prompt.svg";
import ResetIcon from "@/app/icons/reload.svg";
import { useSdStore } from "@/app/store/sd";
import locales from "@/app/locales";
import LoadingIcon from "@/app/icons/three-dots.svg";
import ErrorIcon from "@/app/icons/delete.svg";
import SDIcon from "@/app/icons/sd.svg";
Expand Down Expand Up @@ -64,14 +63,14 @@ function getSdTaskStatus(item: any) {
return (
<p className={styles["line-1"]} title={item.error} style={{ color: color }}>
<span>
{locales.Sd.Status.Name}: {s}
{Locale.Sd.Status.Name}: {s}
</span>
{item.status === "error" && (
<span
className="clickable"
onClick={() => {
showModal({
title: locales.Sd.Detail,
title: Locale.Sd.Detail,
children: (
<div style={{ color: color, userSelect: "text" }}>
{item.error}
Expand Down Expand Up @@ -189,13 +188,13 @@ export function Sd() {
className={styles["sd-img-item-info"]}
>
<p className={styles["line-1"]}>
{locales.SdPanel.Prompt}:{" "}
{Locale.SdPanel.Prompt}:{" "}
<span
className="clickable"
title={item.params.prompt}
onClick={() => {
showModal({
title: locales.Sd.Detail,
title: Locale.Sd.Detail,
children: (
<div style={{ userSelect: "text" }}>
{item.params.prompt}
Expand All @@ -208,7 +207,7 @@ export function Sd() {
</span>
</p>
<p>
{locales.SdPanel.AIModel}: {item.model_name}
{Locale.SdPanel.AIModel}: {item.model_name}
</p>
{getSdTaskStatus(item)}
<p>{item.created_at}</p>
Expand All @@ -219,7 +218,7 @@ export function Sd() {
icon={<PromptIcon />}
onClick={() => {
showModal({
title: locales.Sd.GenerateParams,
title: Locale.Sd.GenerateParams,
children: (
<div style={{ userSelect: "text" }}>
{Object.keys(item.params).map((key) => {
Expand Down Expand Up @@ -325,7 +324,7 @@ export function Sd() {
);
})
) : (
<div>{locales.Sd.EmptyRecord}</div>
<div>{Locale.Sd.EmptyRecord}</div>
)}
</div>
</div>
Expand Down

0 comments on commit 9193a9a

Please sign in to comment.