diff options
Diffstat (limited to 'packages/console/app/src/routes/workspace')
| -rw-r--r-- | packages/console/app/src/routes/workspace/[id]/billing/lite-section.tsx | 3 | ||||
| -rw-r--r-- | packages/console/app/src/routes/workspace/[id]/billing/reload-section.tsx | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/packages/console/app/src/routes/workspace/[id]/billing/lite-section.tsx b/packages/console/app/src/routes/workspace/[id]/billing/lite-section.tsx index 395d008e1..f67775d79 100644 --- a/packages/console/app/src/routes/workspace/[id]/billing/lite-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/billing/lite-section.tsx @@ -12,6 +12,7 @@ import { queryBillingInfo } from "../../common" import styles from "./lite-section.module.css" import { useI18n } from "~/context/i18n" import { useLanguage } from "~/context/language" +import { formError } from "~/lib/form-error" const queryLiteSubscription = query(async (workspaceID: string) => { "use server" @@ -114,7 +115,7 @@ const createSessionUrl = action(async (workspaceID: string, returnUrl: string) = const setLiteUseBalance = action(async (form: FormData) => { "use server" const workspaceID = form.get("workspaceID")?.toString() - if (!workspaceID) return { error: "Workspace ID is required" } + if (!workspaceID) return { error: formError.workspaceRequired } const useBalance = form.get("useBalance")?.toString() === "true" return json( diff --git a/packages/console/app/src/routes/workspace/[id]/billing/reload-section.tsx b/packages/console/app/src/routes/workspace/[id]/billing/reload-section.tsx index 7084be133..90c9d7a2e 100644 --- a/packages/console/app/src/routes/workspace/[id]/billing/reload-section.tsx +++ b/packages/console/app/src/routes/workspace/[id]/billing/reload-section.tsx @@ -202,7 +202,8 @@ export function ReloadSection() { minute: "2-digit", second: "2-digit", })} - . {i18n.t("workspace.reload.reason")} {billingInfo()?.reloadError?.replace(/\.$/, "")}.{" "} + . {i18n.t("workspace.reload.reason")}{" "} + {localizeError(i18n.t, billingInfo()?.reloadError ?? undefined).replace(/\.$/, "")}.{" "} {i18n.t("workspace.reload.updatePaymentMethod")} </p> <form action={reload} method="post" data-slot="create-form"> |
