chore: bump i18next from 21.9.1 to 22.5.0 in /site (#7812)

* chore: Bump i18next from 21.9.1 to 22.5.0 in /site

Bumps [i18next](https://github.com/i18next/i18next) from 21.9.1 to 22.5.0.
- [Release notes](https://github.com/i18next/i18next/releases)
- [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next/compare/v21.9.1...v22.5.0)

---
updated-dependencies:
- dependency-name: i18next
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix i18n types

* prettier

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rodrigo Maia <rodrigo.maia.pereira@gmail.com>
This commit is contained in:
dependabot[bot]
2023-06-09 18:54:17 -05:00
committed by GitHub
parent 634e146032
commit 1ec463d74d
24 changed files with 102 additions and 99 deletions

View File

@ -64,7 +64,7 @@
"formik": "2.4.1", "formik": "2.4.1",
"front-matter": "4.0.2", "front-matter": "4.0.2",
"history": "5.3.0", "history": "5.3.0",
"i18next": "21.9.1", "i18next": "22.5.0",
"jest-environment-jsdom": "29.5.0", "jest-environment-jsdom": "29.5.0",
"jest-location-mock": "1.0.9", "jest-location-mock": "1.0.9",
"just-debounce-it": "3.1.1", "just-debounce-it": "3.1.1",

View File

@ -11,7 +11,7 @@ import { render } from "testHelpers/renderHelpers"
import { screen } from "@testing-library/react" import { screen } from "@testing-library/react"
import { i18n } from "i18n" import { i18n } from "i18n"
const t = (str: string, variables?: Record<string, unknown>) => const t = (str: string, variables: Record<string, unknown>) =>
i18n.t<string>(str, variables) i18n.t<string>(str, variables)
const getByTextContent = (text: string) => { const getByTextContent = (text: string) => {

View File

@ -77,7 +77,7 @@ export const EditRolesButton: FC<EditRolesButtonProps> = ({
ref={anchorRef} ref={anchorRef}
size="small" size="small"
className={styles.editButton} className={styles.editButton}
title={t("editUserRolesTooltip")} title={t("editUserRolesTooltip") || ""}
onClick={() => setIsOpen(true)} onClick={() => setIsOpen(true)}
> >
<EditSquare /> <EditSquare />
@ -101,7 +101,7 @@ export const EditRolesButton: FC<EditRolesButtonProps> = ({
<fieldset <fieldset
className={styles.fieldset} className={styles.fieldset}
disabled={isLoading} disabled={isLoading}
title={t("fieldSetRolesTooltip")} title={t("fieldSetRolesTooltip") || ""}
> >
<Stack className={styles.options} spacing={3}> <Stack className={styles.options} spacing={3}>
{roles.map((role) => ( {roles.map((role) => (

View File

@ -118,6 +118,10 @@ export const FormFooter: FC<BaseFormFooterProps> = (props) => {
/> />
) )
} }
const getFlexDirection = ({ direction }: FormContextValue = {}):
| "row"
| "column" =>
direction === "horizontal" ? ("row" as const) : ("column" as const)
const useStyles = makeStyles((theme) => ({ const useStyles = makeStyles((theme) => ({
form: { form: {
@ -136,8 +140,7 @@ const useStyles = makeStyles((theme) => ({
alignItems: "flex-start", alignItems: "flex-start",
gap: ({ direction }: FormContextValue = {}) => gap: ({ direction }: FormContextValue = {}) =>
direction === "horizontal" ? theme.spacing(15) : theme.spacing(3), direction === "horizontal" ? theme.spacing(15) : theme.spacing(3),
flexDirection: ({ direction }: FormContextValue = {}) => flexDirection: getFlexDirection,
direction === "horizontal" ? "row" : "column",
[theme.breakpoints.down("md")]: { [theme.breakpoints.down("md")]: {
flexDirection: "column", flexDirection: "column",
@ -156,7 +159,7 @@ const useStyles = makeStyles((theme) => ({
[theme.breakpoints.down("md")]: { [theme.breakpoints.down("md")]: {
width: "100%", width: "100%",
position: "initial", position: "initial" as const,
}, },
}, },

View File

@ -19,14 +19,14 @@ import Link from "@mui/material/Link"
// connected:ready, connected:shutting_down, connected:shutdown_timeout, // connected:ready, connected:shutting_down, connected:shutdown_timeout,
// connected:shutdown_error, connected:off. // connected:shutdown_error, connected:off.
const ReadyLifecycle: React.FC = () => { const ReadyLifecycle = () => {
const styles = useStyles() const styles = useStyles()
const { t } = useTranslation("workspacePage") const { t } = useTranslation("workspacePage")
return ( return (
<div <div
role="status" role="status"
aria-label={t("agentStatus.connected.ready")} aria-label={t("agentStatus.connected.ready") || "Ready"}
className={combineClasses([styles.status, styles.connected])} className={combineClasses([styles.status, styles.connected])}
/> />
) )
@ -34,13 +34,12 @@ const ReadyLifecycle: React.FC = () => {
const StartingLifecycle: React.FC = () => { const StartingLifecycle: React.FC = () => {
const styles = useStyles() const styles = useStyles()
const { t } = useTranslation("workspacePage")
return ( return (
<Tooltip title={t("agentStatus.connected.starting")}> <Tooltip title="Starting...">
<div <div
role="status" role="status"
aria-label={t("agentStatus.connected.starting")} aria-label="Starting..."
className={combineClasses([styles.status, styles.connecting])} className={combineClasses([styles.status, styles.connecting])}
/> />
</Tooltip> </Tooltip>
@ -135,13 +134,12 @@ const StartErrorLifecycle: React.FC<{
const ShuttingDownLifecycle: React.FC = () => { const ShuttingDownLifecycle: React.FC = () => {
const styles = useStyles() const styles = useStyles()
const { t } = useTranslation("workspacePage")
return ( return (
<Tooltip title={t("agentStatus.connected.shuttingDown")}> <Tooltip title="Stopping...">
<div <div
role="status" role="status"
aria-label={t("agentStatus.connected.shuttingDown")} aria-label="Stopping..."
className={combineClasses([styles.status, styles.connecting])} className={combineClasses([styles.status, styles.connecting])}
/> />
</Tooltip> </Tooltip>
@ -236,13 +234,12 @@ const ShutdownErrorLifecycle: React.FC<{
const OffLifecycle: React.FC = () => { const OffLifecycle: React.FC = () => {
const styles = useStyles() const styles = useStyles()
const { t } = useTranslation("workspacePage")
return ( return (
<Tooltip title={t("agentStatus.connected.off")}> <Tooltip title="Stopped">
<div <div
role="status" role="status"
aria-label={t("agentStatus.connected.off")} aria-label="Stopped"
className={combineClasses([styles.status, styles.disconnected])} className={combineClasses([styles.status, styles.disconnected])}
/> />
</Tooltip> </Tooltip>
@ -289,13 +286,12 @@ const ConnectedStatus: React.FC<{
const DisconnectedStatus: React.FC = () => { const DisconnectedStatus: React.FC = () => {
const styles = useStyles() const styles = useStyles()
const { t } = useTranslation("workspacePage")
return ( return (
<Tooltip title={t("agentStatus.disconnected")}> <Tooltip title="Disconnected">
<div <div
role="status" role="status"
aria-label={t("agentStatus.disconnected")} aria-label="Disconnected"
className={combineClasses([styles.status, styles.disconnected])} className={combineClasses([styles.status, styles.disconnected])}
/> />
</Tooltip> </Tooltip>
@ -304,13 +300,12 @@ const DisconnectedStatus: React.FC = () => {
const ConnectingStatus: React.FC = () => { const ConnectingStatus: React.FC = () => {
const styles = useStyles() const styles = useStyles()
const { t } = useTranslation("workspacePage")
return ( return (
<Tooltip title={t("agentStatus.connecting")}> <Tooltip title="Connecting...">
<div <div
role="status" role="status"
aria-label={t("agentStatus.connecting")} aria-label="Connecting..."
className={combineClasses([styles.status, styles.connecting])} className={combineClasses([styles.status, styles.connecting])}
/> />
</Tooltip> </Tooltip>

View File

@ -71,25 +71,22 @@ const validationSchema = Yup.object({
), ),
description: Yup.string().max( description: Yup.string().max(
MAX_DESCRIPTION_CHAR_LIMIT, MAX_DESCRIPTION_CHAR_LIMIT,
i18next.t("form.error.descriptionMax", { ns: "createTemplatePage" }), "Please enter a description that is less than or equal to 128 characters.",
), ),
icon: Yup.string().optional(), icon: Yup.string().optional(),
default_ttl_hours: Yup.number() default_ttl_hours: Yup.number()
.integer() .integer()
.min( .min(0, "Default time until autostop must not be less than 0.")
0,
i18next.t("form.error.defaultTTLMin", { ns: "templateSettingsPage" }),
)
.max( .max(
24 * MAX_TTL_DAYS /* 7 days in hours */, 24 * MAX_TTL_DAYS /* 7 days in hours */,
i18next.t("form.error.defaultTTLMax", { ns: "templateSettingsPage" }), "Please enter a limit that is less than or equal to 168 hours (7 days).",
), ),
max_ttl_hours: Yup.number() max_ttl_hours: Yup.number()
.integer() .integer()
.min(0, i18next.t("form.error.maxTTLMin", { ns: "templateSettingsPage" })) .min(0, "Maximum time until autostop must not be less than 0.")
.max( .max(
24 * MAX_TTL_DAYS /* 7 days in hours */, 24 * MAX_TTL_DAYS /* 7 days in hours */,
i18next.t("form.error.maxTTLMax", { ns: "templateSettingsPage" }), "Please enter a limit that is less than or equal to 168 hours(7 days).",
), ),
}) })
@ -223,8 +220,8 @@ export const CreateTemplateForm: FC<CreateTemplateFormProps> = ({
<HorizontalForm onSubmit={form.handleSubmit}> <HorizontalForm onSubmit={form.handleSubmit}>
{/* General info */} {/* General info */}
<FormSection <FormSection
title={t("form.generalInfo.title")} title="General info"
description={t("form.generalInfo.description")} description="The name is used to identify the template in URLs and the API. It must be unique within your organization."
> >
<FormFields> <FormFields>
{starterTemplate ? ( {starterTemplate ? (
@ -255,8 +252,8 @@ export const CreateTemplateForm: FC<CreateTemplateFormProps> = ({
{/* Display info */} {/* Display info */}
<FormSection <FormSection
title={t("form.displayInfo.title")} title="Display info"
description={t("form.displayInfo.description")} description="Give your template a friendly name, description, and icon."
> >
<FormFields> <FormFields>
<TextField <TextField
@ -288,8 +285,8 @@ export const CreateTemplateForm: FC<CreateTemplateFormProps> = ({
{/* Schedule */} {/* Schedule */}
<FormSection <FormSection
title={t("form.schedule.title")} title="Schedule"
description={t("form.schedule.description")} description="Define when workspaces created from this template automatically stop."
> >
<FormFields> <FormFields>
<Stack direction="row" className={styles.ttlFields}> <Stack direction="row" className={styles.ttlFields}>
@ -384,8 +381,8 @@ export const CreateTemplateForm: FC<CreateTemplateFormProps> = ({
{/* Operations */} {/* Operations */}
<FormSection <FormSection
title={t("form.operations.title")} title="Operations"
description={t("form.operations.description")} description="Regulate actions allowed on workspaces created from this template."
> >
<FormFields> <FormFields>
<label htmlFor="allow_user_cancel_workspace_jobs"> <label htmlFor="allow_user_cancel_workspace_jobs">

View File

@ -47,7 +47,7 @@ const CreateTemplatePage: FC = () => {
return ( return (
<> <>
<Helmet> <Helmet>
<title>{pageTitle(t("title"))}</title> <title>{pageTitle("Create Template")}</title>
</Helmet> </Helmet>
<FullPageHorizontalForm title={t("title")} onCancel={onCancel}> <FullPageHorizontalForm title={t("title")} onCancel={onCancel}>

View File

@ -62,8 +62,8 @@ export const CreateTokenForm: FC<CreateTokenFormProps> = ({
return ( return (
<HorizontalForm onSubmit={form.handleSubmit}> <HorizontalForm onSubmit={form.handleSubmit}>
<FormSection <FormSection
title={t("createToken.nameSection.title")} title="Name"
description={t("createToken.nameSection.description")} description="What is this token for?"
classes={{ sectionInfo: styles.formSectionInfo }} classes={{ sectionInfo: styles.formSectionInfo }}
> >
<FormFields> <FormFields>
@ -78,16 +78,14 @@ export const CreateTokenForm: FC<CreateTokenFormProps> = ({
</FormFields> </FormFields>
</FormSection> </FormSection>
<FormSection <FormSection
title={t("createToken.lifetimeSection.title")} title="Expiration"
description={ description={
form.values.lifetime form.values.lifetime
? t("createToken.lifetimeSection.description", { ? `The token will expire on ${dayjs()
date: dayjs() .add(form.values.lifetime, "days")
.add(form.values.lifetime, "days") .utc()
.utc() .format("MMMM DD, YYYY")}`
.format("MMMM DD, YYYY"), : "Please set a token expiration."
})
: t("createToken.lifetimeSection.emptyDescription")
} }
classes={{ sectionInfo: styles.formSectionInfo }} classes={{ sectionInfo: styles.formSectionInfo }}
> >
@ -148,11 +146,7 @@ export const CreateTokenForm: FC<CreateTokenFormProps> = ({
<FormFooter <FormFooter
onCancel={() => navigate("/settings/tokens")} onCancel={() => navigate("/settings/tokens")}
isLoading={isCreating} isLoading={isCreating}
submitLabel={ submitLabel={creationFailed ? "Retry" : "Create token"}
creationFailed
? t("createToken.footer.retry")
: t("createToken.footer.submit")
}
/> />
</HorizontalForm> </HorizontalForm>
) )

View File

@ -85,7 +85,7 @@ export const CreateTokenPage: FC = () => {
return ( return (
<> <>
<Helmet> <Helmet>
<title>{pageTitle(t("createToken.title"))}</title> <title>{pageTitle("Create Token")}</title>
</Helmet> </Helmet>
{tokenFetchFailed && <ErrorAlert error={tokenFetchError} />} {tokenFetchFailed && <ErrorAlert error={tokenFetchError} />}
<FullPageHorizontalForm <FullPageHorizontalForm

View File

@ -213,7 +213,7 @@ export const CreateWorkspacePageView: FC<
<UserAutocomplete <UserAutocomplete
value={props.owner} value={props.owner}
onChange={props.setOwner} onChange={props.setOwner}
label={t("ownerLabel")} label={t("ownerLabel").toString()}
size="medium" size="medium"
/> />
</FormFields> </FormFields>
@ -291,7 +291,7 @@ export const CreateWorkspacePageView: FC<
<FormFooter <FormFooter
onCancel={props.onCancel} onCancel={props.onCancel}
isLoading={props.creatingWorkspace} isLoading={props.creatingWorkspace}
submitLabel={t("createWorkspace")} submitLabel={t("createWorkspace").toString()}
/> />
</HorizontalForm> </HorizontalForm>
</FullPageHorizontalForm> </FullPageHorizontalForm>

View File

@ -17,7 +17,7 @@ const StarterTemplatesPage: FC = () => {
return ( return (
<> <>
<Helmet> <Helmet>
<title>{pageTitle(t("title"))}</title> <title>{pageTitle(t("title").toString())}</title>
</Helmet> </Helmet>
<StarterTemplatesPageView context={state.context} /> <StarterTemplatesPageView context={state.context} />

View File

@ -36,7 +36,9 @@ export const getValidationSchema = (): Yup.AnyObjectSchema =>
), ),
description: Yup.string().max( description: Yup.string().max(
MAX_DESCRIPTION_CHAR_LIMIT, MAX_DESCRIPTION_CHAR_LIMIT,
i18next.t("descriptionMaxError", { ns: "templateSettingsPage" }), i18next
.t("descriptionMaxError", { ns: "templateSettingsPage" })
.toString(),
), ),
allow_user_cancel_workspace_jobs: Yup.boolean(), allow_user_cancel_workspace_jobs: Yup.boolean(),
icon: iconValidator, icon: iconValidator,
@ -82,11 +84,11 @@ export const TemplateSettingsForm: FC<TemplateSettingsForm> = ({
return ( return (
<HorizontalForm <HorizontalForm
onSubmit={form.handleSubmit} onSubmit={form.handleSubmit}
aria-label={t("formAriaLabel")} aria-label={t("formAriaLabel").toString()}
> >
<FormSection <FormSection
title={t("generalInfo.title")} title={t("generalInfo.title").toString()}
description={t("generalInfo.description")} description={t("generalInfo.description").toString()}
> >
<FormFields> <FormFields>
<TextField <TextField
@ -101,8 +103,8 @@ export const TemplateSettingsForm: FC<TemplateSettingsForm> = ({
</FormSection> </FormSection>
<FormSection <FormSection
title={t("displayInfo.title")} title={t("displayInfo.title").toString()}
description={t("displayInfo.description")} description={t("displayInfo.description").toString()}
> >
<FormFields> <FormFields>
<TextField <TextField
@ -133,8 +135,8 @@ export const TemplateSettingsForm: FC<TemplateSettingsForm> = ({
</FormSection> </FormSection>
<FormSection <FormSection
title={t("operations.title")} title={t("operations.title").toString()}
description={t("operations.description")} description={t("operations.description").toString()}
> >
<label htmlFor="allow_user_cancel_workspace_jobs"> <label htmlFor="allow_user_cancel_workspace_jobs">
<Stack direction="row" spacing={1}> <Stack direction="row" spacing={1}>

View File

@ -107,7 +107,7 @@ describe("TemplateSettingsPage", () => {
} }
const validate = () => getValidationSchema().validateSync(values) const validate = () => getValidationSchema().validateSync(values)
expect(validate).toThrowError( expect(validate).toThrowError(
t("descriptionMaxError", { ns: "templateSettingsPage" }), t("descriptionMaxError", { ns: "templateSettingsPage" }).toString(),
) )
}) })
}) })

View File

@ -52,17 +52,27 @@ export const getValidationSchema = (): Yup.AnyObjectSchema =>
Yup.object({ Yup.object({
default_ttl_ms: Yup.number() default_ttl_ms: Yup.number()
.integer() .integer()
.min(0, i18next.t("defaultTTLMinError", { ns: "templateSettingsPage" })) .min(
0,
i18next
.t("defaultTTLMinError", { ns: "templateSettingsPage" })
.toString(),
)
.max( .max(
24 * MAX_TTL_DAYS /* 7 days in hours */, 24 * MAX_TTL_DAYS /* 7 days in hours */,
i18next.t("defaultTTLMaxError", { ns: "templateSettingsPage" }), i18next
.t("defaultTTLMaxError", { ns: "templateSettingsPage" })
.toString(),
), ),
max_ttl_ms: Yup.number() max_ttl_ms: Yup.number()
.integer() .integer()
.min(0, i18next.t("maxTTLMinError", { ns: "templateSettingsPage" })) .min(
0,
i18next.t("maxTTLMinError", { ns: "templateSettingsPage" }).toString(),
)
.max( .max(
24 * MAX_TTL_DAYS /* 7 days in hours */, 24 * MAX_TTL_DAYS /* 7 days in hours */,
i18next.t("maxTTLMaxError", { ns: "templateSettingsPage" }), i18next.t("maxTTLMaxError", { ns: "templateSettingsPage" }).toString(),
), ),
failure_ttl_ms: Yup.number() failure_ttl_ms: Yup.number()
.min(0, "Failure cleanup days must not be less than 0.") .min(0, "Failure cleanup days must not be less than 0.")
@ -214,11 +224,11 @@ export const TemplateScheduleForm: FC<TemplateScheduleForm> = ({
return ( return (
<HorizontalForm <HorizontalForm
onSubmit={form.handleSubmit} onSubmit={form.handleSubmit}
aria-label={t("formAriaLabel")} aria-label={t("formAriaLabel").toString()}
> >
<FormSection <FormSection
title={t("schedule.title")} title={t("schedule.title").toString()}
description={t("schedule.description")} description={t("schedule.description").toString()}
> >
<Stack direction="row" className={styles.ttlFields}> <Stack direction="row" className={styles.ttlFields}>
<TextField <TextField

View File

@ -157,7 +157,7 @@ describe("TemplateSchedulePage", () => {
} }
const validate = () => getValidationSchema().validateSync(values) const validate = () => getValidationSchema().validateSync(values)
expect(validate).toThrowError( expect(validate).toThrowError(
t("defaultTTLMaxError", { ns: "templateSettingsPage" }), t("defaultTTLMaxError", { ns: "templateSettingsPage" }).toString(),
) )
}) })

View File

@ -69,7 +69,7 @@ export const TemplateVariablesForm: FC<TemplateVariablesForm> = ({
return ( return (
<HorizontalForm <HorizontalForm
onSubmit={form.handleSubmit} onSubmit={form.handleSubmit}
aria-label={t("formAriaLabel")} aria-label={t("formAriaLabel").toString()}
> >
{templateVariables.map((templateVariable, index) => { {templateVariables.map((templateVariable, index) => {
let fieldHelpers let fieldHelpers
@ -175,7 +175,7 @@ const ValidationSchemaForTemplateVariables = (
if (!val || val.length === 0) { if (!val || val.length === 0) {
return ctx.createError({ return ctx.createError({
path: ctx.path, path: ctx.path,
message: t("validationRequiredVariable"), message: t("validationRequiredVariable").toString(),
}) })
} }
} }

View File

@ -116,7 +116,9 @@ export const TokensPageView: FC<
onDelete(token) onDelete(token)
}} }}
size="medium" size="medium"
aria-label={t("tokenActions.deleteToken.delete")} aria-label={t(
"tokenActions.deleteToken.delete",
).toString()}
> >
<DeleteOutlineIcon /> <DeleteOutlineIcon />
</IconButton> </IconButton>

View File

@ -72,7 +72,7 @@ const deleteUser = async (setupActionSpies: () => void) => {
// Check if the confirm message is displayed // Check if the confirm message is displayed
const confirmDialog = await screen.findByRole("dialog") const confirmDialog = await screen.findByRole("dialog")
expect(confirmDialog).toHaveTextContent( expect(confirmDialog).toHaveTextContent(
t("deleteDialog.confirm", { ns: "common", entity: "user" }), t("deleteDialog.confirm", { ns: "common", entity: "user" }).toString(),
) )
// Confirm with text input // Confirm with text input

View File

@ -186,7 +186,7 @@ export const WorkspaceReadyPage = ({
name={workspace.name} name={workspace.name}
info={t("deleteDialog.info", { info={t("deleteDialog.info", {
timeAgo: dayjs(workspace.created_at).fromNow(), timeAgo: dayjs(workspace.created_at).fromNow(),
})} }).toString()}
isOpen={workspaceState.matches({ ready: { build: "askingDelete" } })} isOpen={workspaceState.matches({ ready: { build: "askingDelete" } })}
onCancel={() => workspaceSend({ type: "CANCEL_DELETE" })} onCancel={() => workspaceSend({ type: "CANCEL_DELETE" })}
onConfirm={() => { onConfirm={() => {

View File

@ -77,8 +77,8 @@ export const WorkspaceParametersForm: FC<{
<HorizontalForm onSubmit={form.handleSubmit} data-testid="form"> <HorizontalForm onSubmit={form.handleSubmit} data-testid="form">
{mutableParameters.length > 0 && ( {mutableParameters.length > 0 && (
<FormSection <FormSection
title={t("parameters")} title={t("parameters").toString()}
description={t("parametersDescription")} description={t("parametersDescription").toString()}
> >
<FormFields> <FormFields>
{mutableParameters.map((parameter, index) => ( {mutableParameters.map((parameter, index) => (

View File

@ -118,7 +118,7 @@ export const WorkspaceSchedulePage: FC = () => {
title={t("dialogTitle")} title={t("dialogTitle")}
description={t("dialogDescription")} description={t("dialogDescription")}
confirmText={t("restart")} confirmText={t("restart")}
cancelText={t("applyLater")} cancelText={t("applyLater").toString()}
hideCancel={false} hideCancel={false}
onConfirm={() => { onConfirm={() => {
scheduleSend("RESTART_WORKSPACE") scheduleSend("RESTART_WORKSPACE")

View File

@ -42,8 +42,8 @@ export const WorkspaceSettingsForm: FC<{
return ( return (
<HorizontalForm onSubmit={form.handleSubmit} data-testid="form"> <HorizontalForm onSubmit={form.handleSubmit} data-testid="form">
<FormSection <FormSection
title={t("generalInfo")} title="General info"
description={t("generalInfoDescription")} description="The name of your new workspace."
> >
<FormFields> <FormFields>
<TextField <TextField

View File

@ -77,7 +77,7 @@ export const useValidationSchemaForRichParameters = (
path: ctx.path, path: ctx.path,
message: t("validationNumberLesserThan", { message: t("validationNumberLesserThan", {
min: templateParameter.validation_min, min: templateParameter.validation_min,
}), }).toString(),
}) })
} }
} else if ( } else if (
@ -89,7 +89,7 @@ export const useValidationSchemaForRichParameters = (
path: ctx.path, path: ctx.path,
message: t("validationNumberGreaterThan", { message: t("validationNumberGreaterThan", {
max: templateParameter.validation_max, max: templateParameter.validation_max,
}), }).toString(),
}) })
} }
} else if ( } else if (
@ -105,7 +105,7 @@ export const useValidationSchemaForRichParameters = (
message: t("validationNumberNotInRange", { message: t("validationNumberNotInRange", {
min: templateParameter.validation_min, min: templateParameter.validation_min,
max: templateParameter.validation_max, max: templateParameter.validation_max,
}), }).toString(),
}) })
} }
} }
@ -125,7 +125,7 @@ export const useValidationSchemaForRichParameters = (
path: ctx.path, path: ctx.path,
message: t("validationNumberNotIncreasing", { message: t("validationNumberNotIncreasing", {
last: lastBuildParameter.value, last: lastBuildParameter.value,
}), }).toString(),
}) })
} }
break break
@ -135,7 +135,7 @@ export const useValidationSchemaForRichParameters = (
path: ctx.path, path: ctx.path,
message: t("validationNumberNotDecreasing", { message: t("validationNumberNotDecreasing", {
last: lastBuildParameter.value, last: lastBuildParameter.value,
}), }).toString(),
}) })
} }
break break
@ -159,7 +159,7 @@ export const useValidationSchemaForRichParameters = (
message: t("validationPatternNotMatched", { message: t("validationPatternNotMatched", {
error: templateParameter.validation_error, error: templateParameter.validation_error,
pattern: templateParameter.validation_regex, pattern: templateParameter.validation_regex,
}), }).toString(),
}) })
} }
} }

View File

@ -1004,7 +1004,7 @@
resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310"
integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==
"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.17.2", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.3", "@babel/runtime@^7.20.6", "@babel/runtime@^7.20.7", "@babel/runtime@^7.21.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": "@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.3", "@babel/runtime@^7.20.6", "@babel/runtime@^7.20.7", "@babel/runtime@^7.21.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2":
version "7.22.3" version "7.22.3"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.3.tgz#0a7fce51d43adbf0f7b517a71f4c3aaca92ebcbb" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.3.tgz#0a7fce51d43adbf0f7b517a71f4c3aaca92ebcbb"
integrity sha512-XsDuspWKLUsxwCp6r7EhsExHtYfbe5oAGQ19kqngTdCPUoPQzOPdUbD/pB9PJiwb2ptYKQDjSJT3R6dC+EPqfQ== integrity sha512-XsDuspWKLUsxwCp6r7EhsExHtYfbe5oAGQ19kqngTdCPUoPQzOPdUbD/pB9PJiwb2ptYKQDjSJT3R6dC+EPqfQ==
@ -6805,12 +6805,12 @@ hyphenate-style-name@^1.0.3:
resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz#691879af8e220aea5750e8827db4ef62a54e361d" resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz#691879af8e220aea5750e8827db4ef62a54e361d"
integrity sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ== integrity sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ==
i18next@21.9.1: i18next@22.5.0:
version "21.9.1" version "22.5.0"
resolved "https://registry.yarnpkg.com/i18next/-/i18next-21.9.1.tgz#9e3428990f5b2cc9ac1b98dd025f3e411c368249" resolved "https://registry.yarnpkg.com/i18next/-/i18next-22.5.0.tgz#16d98eba7c748ab183a36505046b5b91f87e989b"
integrity sha512-ITbDrAjbRR73spZAiu6+ex5WNlHRr1mY+acDi2ioTHuUiviJqSz269Le1xHAf0QaQ6GgIHResUhQNcxGwa/PhA== integrity sha512-sqWuJFj+wJAKQP2qBQ+b7STzxZNUmnSxrehBCCj9vDOW9RDYPfqCaK1Hbh2frNYQuPziz6O2CGoJPwtzY3vAYA==
dependencies: dependencies:
"@babel/runtime" "^7.17.2" "@babel/runtime" "^7.20.6"
iconv-lite@0.4.24, iconv-lite@^0.4.24: iconv-lite@0.4.24, iconv-lite@^0.4.24:
version "0.4.24" version "0.4.24"