diff --git a/jams-react-client/src/components/CaSetup/CaSetup.tsx b/jams-react-client/src/components/CaSetup/CaSetup.tsx index 99e0c92833e772bc054559478092458cee0d6e09..0ceabdd2a5d269f46916075b8545726a889f8ae2 100644 --- a/jams-react-client/src/components/CaSetup/CaSetup.tsx +++ b/jams-react-client/src/components/CaSetup/CaSetup.tsx @@ -59,16 +59,19 @@ export default function CaSetup(props) { const validationSchemaform1 = Yup.object().shape({ commonname: Yup.string().required( - i18next.t("common_name_is_required", "Common name is required.") + i18next.t("common_name_is_required", "Common name is required.") as string ), state: Yup.string().required( - i18next.t("state_is_required", "State is required.") + i18next.t("state_is_required", "State is required.") as string ), city: Yup.string().required( - i18next.t("city_is_required", "City is required.") + i18next.t("city_is_required", "City is required.") as string ), organization: Yup.string().required( - i18next.t("organization_is_required", "Organization is required.") + i18next.t( + "organization_is_required", + "Organization is required." + ) as string ), organizationunit: Yup.string().required( i18next.t( @@ -77,16 +80,22 @@ export default function CaSetup(props) { ) ), country: Yup.string().required( - i18next.t("country_is_required", "Country is required.") + i18next.t("country_is_required", "Country is required.") as string ), }); const validationSchemaform2 = Yup.object().shape({ certificatefile: Yup.mixed().required( - i18next.t("certificate_file_is_required", "Certificate file is required.") + i18next.t( + "certificate_file_is_required", + "Certificate file is required." + ) as string ), privkeyfile: Yup.mixed().required( - i18next.t("private_key_file_is_required", "Private key file is required.") + i18next.t( + "private_key_file_is_required", + "Private key file is required." + ) as string ), }); @@ -108,8 +117,8 @@ export default function CaSetup(props) { ]; const validityPeriods = [ - { value: 157784630000, label: i18next.t("5_years", "5 years") }, - { value: 315569260000, label: i18next.t("10_years", "10 years") }, + { value: 157784630000, label: i18next.t("5_years", "5 years") as string }, + { value: 315569260000, label: i18next.t("10_years", "10 years") as string }, ]; const certificateOptionsItems = tool.buildSelectMenuItems( @@ -201,10 +210,12 @@ export default function CaSetup(props) { return ( <form className={classes.form} noValidate onSubmit={handleSubmit}> <h4> - {i18next.t( - "ca_setup_header", - "Select an option for setting-up the certificate authority that will be used to sign all Jami accounts generated on this JAMS instance." - )} + { + i18next.t( + "ca_setup_header", + "Select an option for setting-up the certificate authority that will be used to sign all Jami accounts generated on this JAMS instance." + ) as string + } </h4> <Select labelId="certificate-option-select-label" @@ -222,7 +233,7 @@ export default function CaSetup(props) { required fullWidth id="commonname" - label={i18next.t("common_name", "Common Name")} + label={i18next.t("common_name", "Common Name") as string} name="commonname" autoComplete="commonname" autoFocus @@ -245,7 +256,7 @@ export default function CaSetup(props) { required fullWidth name="state" - label={i18next.t("state", "State")} + label={i18next.t("state", "State") as string} id="state" autoComplete="state" value={values.state} @@ -260,7 +271,7 @@ export default function CaSetup(props) { required fullWidth name="city" - label={i18next.t("cistatety", "City")} + label={i18next.t("cistatety", "City") as string} id="city" autoComplete="city" value={values.city} @@ -275,7 +286,7 @@ export default function CaSetup(props) { required fullWidth name="organization" - label={i18next.t("organization", "Organization")} + label={i18next.t("organization", "Organization") as string} id="organization" autoComplete="organization" value={values.organization} @@ -294,7 +305,9 @@ export default function CaSetup(props) { required fullWidth name="organizationunit" - label={i18next.t("organization_unit", "Organization Unit")} + label={ + i18next.t("organization_unit", "Organization Unit") as string + } id="organizationunit" autoComplete="organizationunit" value={values.organizationunit} @@ -324,10 +337,12 @@ export default function CaSetup(props) { color="primary" className={classes.submit} > - {i18next.t( - "generate_self_signed_certificate_authority", - "Generate Self-Signed Certificate Authority" - )} + { + i18next.t( + "generate_self_signed_certificate_authority", + "Generate Self-Signed Certificate Authority" + ) as string + } </Button> </form> ); @@ -348,10 +363,12 @@ export default function CaSetup(props) { return ( <form className={classes.form} noValidate onSubmit={handleSubmit}> <h4> - {i18next.t( - "select_option_setting_up_certificate_authority", - "Select an option for setting-up the certificate authority that will be used to sign all Jami accounts generated on this JAMS instance." - )} + { + i18next.t( + "select_option_setting_up_certificate_authority", + "Select an option for setting-up the certificate authority that will be used to sign all Jami accounts generated on this JAMS instance." + ) as string + } </h4> <Select @@ -405,10 +422,12 @@ export default function CaSetup(props) { color="primary" className={classes.submit} > - {i18next.t( - "import_certificate_authority", - "Import Certificate Authority" - )} + { + i18next.t( + "import_certificate_authority", + "Import Certificate Authority" + ) as string + } </Button> </form> ); diff --git a/jams-react-client/src/components/CountrySelect/CountrySelect.tsx b/jams-react-client/src/components/CountrySelect/CountrySelect.tsx index bbf48ca38f7b45ed4ab9d1825b80e7c68468a674..716ba1852c119a642d2400bd9594ab2b1f27b8c0 100644 --- a/jams-react-client/src/components/CountrySelect/CountrySelect.tsx +++ b/jams-react-client/src/components/CountrySelect/CountrySelect.tsx @@ -43,7 +43,7 @@ export default function CountrySelect({ setFieldValue, handleBlur }) { renderInput={(params) => ( <TextField {...params} - label={i18next.t("choose_a_country", "Choose a country")} + label={i18next.t("choose_a_country", "Choose a country") as string} name="country" variant="outlined" onBlur={handleBlur} diff --git a/jams-react-client/src/components/CreateAdmin/CreateAdmin.tsx b/jams-react-client/src/components/CreateAdmin/CreateAdmin.tsx index 642c79bff980a80c4fdfebc2874c524f476d286d..683cb6682e148dd6cae930aae9aa7f55880103bd 100644 --- a/jams-react-client/src/components/CreateAdmin/CreateAdmin.tsx +++ b/jams-react-client/src/components/CreateAdmin/CreateAdmin.tsx @@ -57,7 +57,9 @@ export default function CreateAdmin(props) { "Must be 60 characters or less" ) ) - .required(i18next.t("username_is_required", "Username is required!")), + .required( + i18next.t("username_is_required", "Username is required!") as string + ), password: Yup.string() .max( 50, @@ -70,7 +72,7 @@ export default function CreateAdmin(props) { confirmPassword: Yup.string() .oneOf( [Yup.ref("password"), null], - i18next.t("password_must_match", "Passwords must match") + i18next.t("password_must_match", "Passwords must match") as string ) .max( 50, @@ -119,7 +121,12 @@ export default function CreateAdmin(props) { return ( <form className={classes.form} noValidate onSubmit={formik.handleSubmit}> <Typography variant="h5" gutterBottom color="primary"> - {i18next.t("create_administrator", "Create administrator account")} + { + i18next.t( + "create_administrator", + "Create administrator account" + ) as string + } </Typography> <Grid container spacing={3}> <Grid item xs={12}> @@ -129,7 +136,7 @@ export default function CreateAdmin(props) { required fullWidth id="username" - label={i18next.t("username", "Username")} + label={i18next.t("username", "Username") as string} name="username" autoComplete="email" autoFocus @@ -146,7 +153,7 @@ export default function CreateAdmin(props) { required fullWidth name="password" - label={i18next.t("password", "Password")} + label={i18next.t("password", "Password") as string} type="password" id="password" autoComplete="current-password" @@ -164,7 +171,7 @@ export default function CreateAdmin(props) { required fullWidth name="confirmPassword" - label={i18next.t("confirm_password", "Confirm password")} + label={i18next.t("confirm_password", "Confirm password") as string} type="password" id="confirmPassword" autoComplete="current-password" @@ -183,7 +190,7 @@ export default function CreateAdmin(props) { color="primary" className={classes.submit} > - {i18next.t("continue", "Continue")} + {i18next.t("continue", "Continue") as string} </Button> </form> ); diff --git a/jams-react-client/src/components/CustomUiPreview/CustomUiPreview.tsx b/jams-react-client/src/components/CustomUiPreview/CustomUiPreview.tsx index 7d792452f867a7d608431a7977757a208e4261cb..6673681ba7ce7956aba202e2aa6e37f2b382e757 100644 --- a/jams-react-client/src/components/CustomUiPreview/CustomUiPreview.tsx +++ b/jams-react-client/src/components/CustomUiPreview/CustomUiPreview.tsx @@ -133,7 +133,7 @@ export const CustomUiPreview: FC<CustomUiPreviewProps> = ({ } = uiCustomization; if (!title) { - title = i18next.t("welcome_title", "Welcome to Jami"); + title = i18next.t("welcome_title", "Welcome to Jami") as string; } if (!description) { description = i18next.t( @@ -173,8 +173,11 @@ export const CustomUiPreview: FC<CustomUiPreviewProps> = ({ "preview_tip1", "Add a picture and a nickname to complete your profile" ); - const tip2 = i18next.t("preview_tip2", "Why should I save my account?"); - const tip3 = i18next.t("preview_tip3", "How to set shortcuts?"); + const tip2 = i18next.t( + "preview_tip2", + "Why should I save my account?" + ) as string; + const tip3 = i18next.t("preview_tip3", "How to set shortcuts?") as string; return ( <div className={classes.root}> diff --git a/jams-react-client/src/components/CustomizedSteppers/CustomizedSteppers.tsx b/jams-react-client/src/components/CustomizedSteppers/CustomizedSteppers.tsx index 7c1cea9652b6b3daffee7a1f460740a4b86fed4b..401f588cc01841c1faecb2f2e1b66ace393cb663 100644 --- a/jams-react-client/src/components/CustomizedSteppers/CustomizedSteppers.tsx +++ b/jams-react-client/src/components/CustomizedSteppers/CustomizedSteppers.tsx @@ -139,10 +139,16 @@ const useStyles = makeStyles((theme) => ({ function getSteps() { return [ - i18next.t("create_administrator_user", "Create Administrator User"), - i18next.t("certificate_authority_setup", "Certificate Authority Setup"), - i18next.t("identity_management", "Identity Management"), - i18next.t("server_parameters", "Server Parameters"), + i18next.t( + "create_administrator_user", + "Create Administrator User" + ) as string, + i18next.t( + "certificate_authority_setup", + "Certificate Authority Setup" + ) as string, + i18next.t("identity_management", "Identity Management") as string, + i18next.t("server_parameters", "Server Parameters") as string, ]; } diff --git a/jams-react-client/src/components/Devices/Devices.tsx b/jams-react-client/src/components/Devices/Devices.tsx index de8304216ddc7d83c6621fd9efe7d7405a4d84cf..45721ea0971d035dcfdc88ea075d46cea7702d42 100755 --- a/jams-react-client/src/components/Devices/Devices.tsx +++ b/jams-react-client/src/components/Devices/Devices.tsx @@ -174,11 +174,17 @@ const Devices: FC<DevicesProps> = ({ username }) => { <Table className={classes.table}> <TableHead> <TableRow> - <TableCell>{i18next.t("device_name", "Device Name")}</TableCell> - <TableCell>{i18next.t("device_id", "Device Id")}</TableCell> - <TableCell align="right">{i18next.t("status", "Status")}</TableCell> + <TableCell> + {i18next.t("device_name", "Device Name") as string} + </TableCell> + <TableCell> + {i18next.t("device_id", "Device Id") as string} + </TableCell> + <TableCell align="right"> + {i18next.t("status", "Status") as string} + </TableCell> <TableCell align="right"> - {i18next.t("actions", "Actions")} + {i18next.t("actions", "Actions") as string} </TableCell> </TableRow> </TableHead> @@ -218,7 +224,9 @@ const Devices: FC<DevicesProps> = ({ username }) => { </Tooltip> <Tooltip id="tooltip-top-start" - title={i18next.t("revoke_device", "Revoke Device")} + title={ + i18next.t("revoke_device", "Revoke Device") as string + } placement="top" classes={{ tooltip: classes.tooltip }} > diff --git a/jams-react-client/src/components/Devices/EditDeviceDialog.tsx b/jams-react-client/src/components/Devices/EditDeviceDialog.tsx index a43b8865b660fe4e3ea5c292e938dc96ff17c6e6..cc7fac87cc4ffb10daee07b49f3825d77999f9ce 100644 --- a/jams-react-client/src/components/Devices/EditDeviceDialog.tsx +++ b/jams-react-client/src/components/Devices/EditDeviceDialog.tsx @@ -44,7 +44,12 @@ const EditDeviceDialog: FC<EditDeviceDialogProps> = ({ aria-labelledby="form-dialog-title" > <DialogTitle id="form-edit-dialog-title"> - {i18next.t("update_device_information", "Update Device Information")} + { + i18next.t( + "update_device_information", + "Update Device Information" + ) as string + } </DialogTitle> <Formik initialValues={{ @@ -80,7 +85,7 @@ const EditDeviceDialog: FC<EditDeviceDialogProps> = ({ </DialogContent> <DialogActions> <Button onClick={handleClose} color="primary"> - {i18next.t("cancel", "Cancel")} + {i18next.t("cancel", "Cancel") as string} </Button> <Button onClick={() => @@ -88,7 +93,7 @@ const EditDeviceDialog: FC<EditDeviceDialogProps> = ({ } color="primary" > - {i18next.t("update", "Update")} + {i18next.t("update", "Update") as string} </Button> </DialogActions> </form> diff --git a/jams-react-client/src/components/Devices/RevokeDeviceDialog.tsx b/jams-react-client/src/components/Devices/RevokeDeviceDialog.tsx index 53662b2996d66afc859b6e870c0cf8d48c28c7fd..613b72d8d352192274089062d0c90bcaf6a83410 100644 --- a/jams-react-client/src/components/Devices/RevokeDeviceDialog.tsx +++ b/jams-react-client/src/components/Devices/RevokeDeviceDialog.tsx @@ -27,22 +27,24 @@ const RevokeDeviceDialog: FC<RevokeDeviceDialogProps> = ({ aria-labelledby="form-dialog-title" > <DialogTitle id="form-revoke-dialog-title"> - {i18next.t("revoke_device", "Revoke Device")} + {i18next.t("revoke_device", "Revoke Device") as string} </DialogTitle> <DialogContent> <DialogContentText> - {i18next.t( - "are_you_sure_you_want_to_revoke_this_device", - "Are you sure you want to revoke this device?" - )} + { + i18next.t( + "are_you_sure_you_want_to_revoke_this_device", + "Are you sure you want to revoke this device?" + ) as string + } </DialogContentText> </DialogContent> <DialogActions> <Button onClick={handleClose} color="primary"> - {i18next.t("cancel", "Cancel")} + {i18next.t("cancel", "Cancel") as string} </Button> <Button onClick={handleDeviceRevoke} color="primary"> - {i18next.t("confirm_revoke", "Confirm Revoke")} + {i18next.t("confirm_revoke", "Confirm Revoke") as string} </Button> </DialogActions> </Dialog> diff --git a/jams-react-client/src/components/IdentityManagement/AdStorageForm.tsx b/jams-react-client/src/components/IdentityManagement/AdStorageForm.tsx index 4064a8f3f443411eae5d759979765beabdf447c4..04184cf2e9a36c8bdd705b1f1565f6a781186328 100644 --- a/jams-react-client/src/components/IdentityManagement/AdStorageForm.tsx +++ b/jams-react-client/src/components/IdentityManagement/AdStorageForm.tsx @@ -13,10 +13,12 @@ export default function AdStorageForm(props) { <Grid container spacing={3}> <Grid item xs={12}> <Typography variant="subtitle1" gutterBottom color="primary"> - {i18next.t( - "active_directory_server_informations", - "Active Directory server information" - )} + { + i18next.t( + "active_directory_server_informations", + "Active Directory server information" + ) as string + } </Typography> </Grid> <Grid item xs={6}> @@ -26,7 +28,7 @@ export default function AdStorageForm(props) { required fullWidth id="port" - label={i18next.t("port", "Port")} + label={i18next.t("port", "Port") as string} name="port" autoComplete="port" value={props.values.port} @@ -44,7 +46,7 @@ export default function AdStorageForm(props) { required fullWidth id="host" - label={i18next.t("host", "Host")} + label={i18next.t("host", "Host") as string} name="host" autoComplete="host" value={props.values.host} @@ -62,7 +64,7 @@ export default function AdStorageForm(props) { required fullWidth id="adminusername" - label={i18next.t("admin_username", "Admin username")} + label={i18next.t("admin_username", "Admin username") as string} name="adadminusername" autoComplete="adminusername" value={props.values.adadminusername} @@ -82,7 +84,7 @@ export default function AdStorageForm(props) { required fullWidth id="password" - label={i18next.t("password", "Password")} + label={i18next.t("password", "Password") as string} name="adpassword" autoComplete="password" type="password" @@ -103,7 +105,7 @@ export default function AdStorageForm(props) { required fullWidth id="domainname" - label={i18next.t("domain_name", "Domain Name")} + label={i18next.t("domain_name", "Domain Name") as string} name="domainname" autoComplete="domainname" value={props.values.domainname} @@ -130,12 +132,12 @@ export default function AdStorageForm(props) { <FormControlLabel value="true" control={<Radio color="primary" />} - label={i18next.t("yes", "Yes")} + label={i18next.t("yes", "Yes") as string} /> <FormControlLabel value="false" control={<Radio color="default" />} - label={i18next.t("no", "No")} + label={i18next.t("no", "No") as string} /> </RadioGroup> </Grid> diff --git a/jams-react-client/src/components/IdentityManagement/IdentityManagement.tsx b/jams-react-client/src/components/IdentityManagement/IdentityManagement.tsx index 2804c981989b3d57c34eac9e33dec59041deb138..13df64f194aa013ce7b7e6aa6ac18f0b27bd4750 100644 --- a/jams-react-client/src/components/IdentityManagement/IdentityManagement.tsx +++ b/jams-react-client/src/components/IdentityManagement/IdentityManagement.tsx @@ -64,45 +64,63 @@ export default function IdentityManagement(props) { const validationSchemaLDAPform = Yup.object().shape({ servername: Yup.string().required( - i18next.t("servername_is_required", "Server name is required.") + i18next.t("servername_is_required", "Server name is required.") as string ), ldapadminusername: Yup.string().required( - i18next.t("username_is_required", "Username is required!") + i18next.t("username_is_required", "Username is required!") as string ), ldappassword: Yup.string().required( - i18next.t("password_is_required", "Password is required!") + i18next.t("password_is_required", "Password is required!") as string ), basedn: Yup.string().required( - i18next.t("domain_name_is_required", "Domain name is required.") + i18next.t("domain_name_is_required", "Domain name is required.") as string ), }); const validationSchemaADform = Yup.object().shape({ port: Yup.number() - .typeError(i18next.t("port_must_be_a_number", "Port must be a number.")) - .positive(i18next.t("port_must_be_positive", "Port must be positive.")) - .integer(i18next.t("port_must_be_an_integer", "Port must be an integer.")) + .typeError( + i18next.t("port_must_be_a_number", "Port must be a number.") as string + ) + .positive( + i18next.t("port_must_be_positive", "Port must be positive.") as string + ) + .integer( + i18next.t( + "port_must_be_an_integer", + "Port must be an integer." + ) as string + ) .required( - i18next.t("port_number_is_required", "Port number is required.") + i18next.t( + "port_number_is_required", + "Port number is required." + ) as string ), host: Yup.string().required( - i18next.t("host_is_required", "Host is required.") + i18next.t("host_is_required", "Host is required.") as string ), adadminusername: Yup.string().required( - i18next.t("username_is_required", "Username is required!") + i18next.t("username_is_required", "Username is required!") as string ), domainname: Yup.string().required( - i18next.t("domain_name_is_required", "Domain name is required.") + i18next.t("domain_name_is_required", "Domain name is required.") as string ), adpassword: Yup.string().required( - i18next.t("password_is_required", "Password is required!") + i18next.t("password_is_required", "Password is required!") as string ), }); const directoryTypes = [ - { value: 0, label: i18next.t("local_database", "Local Database") }, - { value: 1, label: i18next.t("ldap_server", "LDAP Server") }, - { value: 2, label: i18next.t("active_directory", "Active Directory") }, + { + value: 0, + label: i18next.t("local_database", "Local Database") as string, + }, + { value: 1, label: i18next.t("ldap_server", "LDAP Server") as string }, + { + value: 2, + label: i18next.t("active_directory", "Active Directory") as string, + }, ]; const directoryTypesItems = buildSelectMenuItems(directoryTypes); @@ -307,15 +325,17 @@ export default function IdentityManagement(props) { return ( <form className={classes.form} noValidate onSubmit={handleLocalSubmit}> <Typography variant="h5" gutterBottom color="primary"> - {i18next.t("identity_management", "Identity Management")} + {i18next.t("identity_management", "Identity Management") as string} </Typography> <Grid container spacing={3}> <Grid item xs={12}> <Typography variant="body1" gutterBottom> - {i18next.t( - "select_type_of_user_directory", - "Select the type of user directory to be integrated with JAMS" - )} + { + i18next.t( + "select_type_of_user_directory", + "Select the type of user directory to be integrated with JAMS" + ) as string + } </Typography> <Select labelId="demo-simple-select-label" @@ -339,7 +359,12 @@ export default function IdentityManagement(props) { color="primary" className={classes.submit} > - {i18next.t("set_identity_parameters", "Set identity parameters")} + { + i18next.t( + "set_identity_parameters", + "Set identity parameters" + ) as string + } </Button> </form> ); @@ -364,15 +389,22 @@ export default function IdentityManagement(props) { return ( <form className={classes.form} noValidate onSubmit={handleSubmit}> <Typography variant="h5" gutterBottom color="primary"> - {i18next.t("identity_management", "Identity Management")} + { + i18next.t( + "identity_management", + "Identity Management" + ) as string + } </Typography> <Grid container spacing={3}> <Grid item xs={12}> <Typography variant="body1" gutterBottom> - {i18next.t( - "select_type_of_user_directory", - "Select the type of user directory to be integrated with JAMS" - )} + { + i18next.t( + "select_type_of_user_directory", + "Select the type of user directory to be integrated with JAMS" + ) as string + } </Typography> <Select labelId="demo-simple-select-label" @@ -393,10 +425,12 @@ export default function IdentityManagement(props) { color="primary" className={classes.submit} > - {i18next.t( - "set_identity_parameters", - "Set identity parameters" - )} + { + i18next.t( + "set_identity_parameters", + "Set identity parameters" + ) as string + } </Button> </form> ); @@ -424,15 +458,22 @@ export default function IdentityManagement(props) { return ( <form className={classes.form} noValidate onSubmit={handleSubmit}> <Typography variant="h5" gutterBottom color="primary"> - {i18next.t("identity_management", "Identity Management")} + { + i18next.t( + "identity_management", + "Identity Management" + ) as string + } </Typography> <Grid container spacing={3}> <Grid item xs={12}> <Typography variant="body1" gutterBottom> - {i18next.t( - "select_type_of_user_directory", - "Select the type of user directory to be integrated with JAMS" - )} + { + i18next.t( + "select_type_of_user_directory", + "Select the type of user directory to be integrated with JAMS" + ) as string + } </Typography> <Select labelId="demo-simple-select-label" @@ -453,10 +494,12 @@ export default function IdentityManagement(props) { color="primary" className={classes.submit} > - {i18next.t( - "set_identity_parameters", - "Set identity parameters" - )} + { + i18next.t( + "set_identity_parameters", + "Set identity parameters" + ) as string + } </Button> </form> ); diff --git a/jams-react-client/src/components/IdentityManagement/LdapStorageForm.tsx b/jams-react-client/src/components/IdentityManagement/LdapStorageForm.tsx index 35bdad3136f4ead7aa8ab37effd1ecc8c0a6461d..40a303cc385fb225726af8be398bff33e484fda4 100644 --- a/jams-react-client/src/components/IdentityManagement/LdapStorageForm.tsx +++ b/jams-react-client/src/components/IdentityManagement/LdapStorageForm.tsx @@ -15,7 +15,12 @@ export default function LdapStorageForm(props) { <Grid container spacing={3}> <Grid item xs={12}> <Typography variant="subtitle1" gutterBottom color="primary"> - {i18next.t("ldap_server_information", "LDAP Server informations")} + { + i18next.t( + "ldap_server_information", + "LDAP Server informations" + ) as string + } </Typography> </Grid> <Grid item xs={12}> @@ -25,7 +30,7 @@ export default function LdapStorageForm(props) { required fullWidth id="servername" - label={i18next.t("server_address", "Server address")} + label={i18next.t("server_address", "Server address") as string} name="servername" autoComplete="servername" value={props.values.servername} @@ -46,7 +51,12 @@ export default function LdapStorageForm(props) { required fullWidth id="adminusername" - label={i18next.t("administrator_username", "Administrator username")} + label={ + i18next.t( + "administrator_username", + "Administrator username" + ) as string + } name="ldapadminusername" autoComplete="adminusername" value={props.values.ldapadminusername} @@ -66,7 +76,7 @@ export default function LdapStorageForm(props) { required fullWidth id="password" - label={i18next.t("password", "Password")} + label={i18next.t("password", "Password") as string} name="ldappassword" autoComplete="password" type="password" @@ -84,10 +94,12 @@ export default function LdapStorageForm(props) { <TextField variant="outlined" id="basedn" - label={i18next.t( - "base_dn_please_use_ldap_convention", - "Base DN (Please use LDAP convention)" - )} + label={ + i18next.t( + "base_dn_please_use_ldap_convention", + "Base DN (Please use LDAP convention)" + ) as string + } name="basedn" autoComplete="basedn" required @@ -114,12 +126,12 @@ export default function LdapStorageForm(props) { <FormControlLabel value="true" control={<Radio color="primary" />} - label={i18next.t("yes", "Yes")} + label={i18next.t("yes", "Yes") as string} /> <FormControlLabel value="false" control={<Radio color="default" />} - label={i18next.t("no", "No")} + label={i18next.t("no", "No") as string} /> </RadioGroup> </Grid> diff --git a/jams-react-client/src/components/IdentityManagement/LocalStorageForm.tsx b/jams-react-client/src/components/IdentityManagement/LocalStorageForm.tsx index 0524c41899282a1ff227b2e45f44b6dcef063e80..775b138c260dff5873ff685550232dc26c780416 100644 --- a/jams-react-client/src/components/IdentityManagement/LocalStorageForm.tsx +++ b/jams-react-client/src/components/IdentityManagement/LocalStorageForm.tsx @@ -11,7 +11,7 @@ export default function LocalStorageForm(props) { <Grid container spacing={3}> <Grid item xs={12}> <Typography variant="subtitle1" gutterBottom color="primary"> - {i18next.t("advanced_settings", "Advanced settings")} + {i18next.t("advanced_settings", "Advanced settings") as string} </Typography> </Grid> <Grid item xs={12}> @@ -24,7 +24,12 @@ export default function LocalStorageForm(props) { color="primary" /> } - label={i18next.t("use_public_nameserver", "Use public nameserver")} + label={ + i18next.t( + "use_public_nameserver", + "Use public nameserver" + ) as string + } /> <CustomPopupState message={i18next.t( diff --git a/jams-react-client/src/components/ServerParameters/ServerParameters.tsx b/jams-react-client/src/components/ServerParameters/ServerParameters.tsx index 2045eb8c59b6f1d388e7a28ea5f02d6236cec38f..9b6a4a3eaa86c32e28449cad0487de8535266f63 100644 --- a/jams-react-client/src/components/ServerParameters/ServerParameters.tsx +++ b/jams-react-client/src/components/ServerParameters/ServerParameters.tsx @@ -48,30 +48,30 @@ export default function ServerParameters({ setError, setErrorMessage }) { const initialValues = { domain: backend_address.origin }; const validationSchema = Yup.object().shape({ domain: Yup.string().required( - i18next.t("domain_is_required", "Domain is required.") + i18next.t("domain_is_required", "Domain is required.") as string ), }); type Settings = Yup.InferType<typeof validationSchema>; const certificateRevocationTypes = [ - { value: 300000, label: i18next.t("5_minutes", "5 minutes") }, - { value: 600000, label: i18next.t("10_minutes", "10 minutes") }, - { value: 900000, label: i18next.t("15_minutes", "15 minutes") }, - { value: 1800000, label: i18next.t("30_minutes", "30 minutes") }, - { value: 3600000, label: i18next.t("60_minutes", "60 minutes") }, + { value: 300000, label: i18next.t("5_minutes", "5 minutes") as string }, + { value: 600000, label: i18next.t("10_minutes", "10 minutes") as string }, + { value: 900000, label: i18next.t("15_minutes", "15 minutes") as string }, + { value: 1800000, label: i18next.t("30_minutes", "30 minutes") as string }, + { value: 3600000, label: i18next.t("60_minutes", "60 minutes") as string }, ]; const deviceLifetimeTypes = [ - { value: 2629746000, label: i18next.t("1_month", "1 month") }, - { value: 7889238000, label: i18next.t("3_months", "3 months") }, - { value: 15778476000, label: i18next.t("6_months", "6 months") }, - { value: 31556952000, label: i18next.t("1_year", "1 year") }, + { value: 2629746000, label: i18next.t("1_month", "1 month") as string }, + { value: 7889238000, label: i18next.t("3_months", "3 months") as string }, + { value: 15778476000, label: i18next.t("6_months", "6 months") as string }, + { value: 31556952000, label: i18next.t("1_year", "1 year") as string }, ]; const userAccountLifetimeTypes = [ - { value: 31556952000, label: i18next.t("1_year", "1 year") }, - { value: 157784760000, label: i18next.t("5_years", "5 years") }, + { value: 31556952000, label: i18next.t("1_year", "1 year") as string }, + { value: 157784760000, label: i18next.t("5_years", "5 years") as string }, ]; const certificateRevocationTypesItems = tool.buildSelectMenuItems( @@ -189,16 +189,18 @@ export default function ServerParameters({ setError, setErrorMessage }) { return ( <form className={classes.form} noValidate onSubmit={handleSubmit}> <Typography variant="h5" gutterBottom color="primary"> - {i18next.t("server_parameters", "Server Parameters")} + {i18next.t("server_parameters", "Server Parameters") as string} </Typography> <Typography variant="body1" gutterBottom> - {i18next.t( - "global_parameters_cover_general_configuration_of_servers_engine", - "The global parameters cover the general configuration of the server's engine." - )} + { + i18next.t( + "global_parameters_cover_general_configuration_of_servers_engine", + "The global parameters cover the general configuration of the server's engine." + ) as string + } </Typography> <Typography variant="subtitle1" gutterBottom> - {i18next.t("cors_domain_name", "CORS domain name")} + {i18next.t("cors_domain_name", "CORS domain name") as string} <CustomPopupState message={i18next.t( "set_domain_of_web_cleint_server_to_connect_to_hans_admin_dashboard_and_jami_accounts_also_to_set_client_crls_ocsps", @@ -207,10 +209,12 @@ export default function ServerParameters({ setError, setErrorMessage }) { /> </Typography> <Typography variant="body1" gutterBottom> - {i18next.t( - "domain_name_of_web_client_server", - "The domain name of your web client server." - )} + { + i18next.t( + "domain_name_of_web_client_server", + "The domain name of your web client server." + ) as string + } </Typography> <TextField variant="outlined" @@ -218,7 +222,7 @@ export default function ServerParameters({ setError, setErrorMessage }) { required fullWidth id="domain" - label={i18next.t("domain", "Domain")} + label={i18next.t("domain", "Domain") as string} name="domain" autoComplete="domain" autoFocus @@ -228,10 +232,12 @@ export default function ServerParameters({ setError, setErrorMessage }) { helperText={errors.domain && touched.domain && errors.domain} /> <Typography variant="subtitle1" gutterBottom> - {i18next.t( - "certificate_revocation_list_lifetime", - "Certificate Revocation List Lifetime" - )} + { + i18next.t( + "certificate_revocation_list_lifetime", + "Certificate Revocation List Lifetime" + ) as string + } <CustomPopupState message={i18next.t( "set_liftetime_crl_list_certificates_revoked", @@ -249,7 +255,7 @@ export default function ServerParameters({ setError, setErrorMessage }) { {certificateRevocationTypesItems} </Select> <Typography variant="subtitle1" gutterBottom> - {i18next.t("device_lifetime", "Device lifetime")} + {i18next.t("device_lifetime", "Device lifetime") as string} </Typography> <Select labelId="device-lifetime-select-label" @@ -261,7 +267,12 @@ export default function ServerParameters({ setError, setErrorMessage }) { {deviceLifetimeTypesItems} </Select> <Typography variant="subtitle1" gutterBottom> - {i18next.t("user_account_lifetime", "User account lifetime")} + { + i18next.t( + "user_account_lifetime", + "User account lifetime" + ) as string + } </Typography> <Select labelId="user-account-lifetime-select-label" @@ -274,17 +285,21 @@ export default function ServerParameters({ setError, setErrorMessage }) { </Select> {userlifeDisabled ? ( <span className="spanError"> - {i18next.t( - "account_lifetime_should_be_bigger_to_device_lifetime", - "The account lifetime should be longer than the Device lifetime." - )} + { + i18next.t( + "account_lifetime_should_be_bigger_to_device_lifetime", + "The account lifetime should be longer than the Device lifetime." + ) as string + } </span> ) : null} <Typography variant="subtitle1" gutterBottom> - {i18next.t( - "sip_configuration_template", - "SIP Configuration Template" - )} + { + i18next.t( + "sip_configuration_template", + "SIP Configuration Template" + ) as string + } </Typography> <Input fullWidth @@ -299,7 +314,12 @@ export default function ServerParameters({ setError, setErrorMessage }) { color="primary" className={classes.submit} > - {i18next.t("set_server_parameters", "Set Server Parameters")} + { + i18next.t( + "set_server_parameters", + "Set Server Parameters" + ) as string + } </Button> </form> ); diff --git a/jams-react-client/src/components/Sidebar/Sidebar.tsx b/jams-react-client/src/components/Sidebar/Sidebar.tsx index c9310c159b2fbd2aa764253feaa4ef2cf2817fde..d66b25073492021c5110713cfc42b800b8591990 100755 --- a/jams-react-client/src/components/Sidebar/Sidebar.tsx +++ b/jams-react-client/src/components/Sidebar/Sidebar.tsx @@ -154,7 +154,7 @@ export default function Sidebar(props) { <ExitToAppIcon /> </Icon> <ListItemText - primary={i18next.t("Logout", "Logout")} + primary={i18next.t("Logout", "Logout") as string} className={classNames(classes.itemText, { [classes.itemTextRTL]: false, })} diff --git a/jams-react-client/src/layouts/BaseLayout.tsx b/jams-react-client/src/layouts/BaseLayout.tsx index a083021f837ec5c492a6635527dc0b787d1ad07b..c59c5703010b410e2c76861f3b02dac3a42c7880 100644 --- a/jams-react-client/src/layouts/BaseLayout.tsx +++ b/jams-react-client/src/layouts/BaseLayout.tsx @@ -66,21 +66,21 @@ export default function Admin(props) { const Routes = [ { path: `/user/${auth.getUsername()}`, - name: i18next.t("myprofile", "My profile"), + name: i18next.t("myprofile", "My profile") as string, icon: AccountCircleIcon, component: Users, layout: "/admin", }, { path: "/users", - name: i18next.t("users", "Users"), + name: i18next.t("users", "Users") as string, icon: Person, component: Users, layout: "/admin", }, { path: "/groups", - name: i18next.t("groups", "Groups"), + name: i18next.t("groups", "Groups") as string, icon: Group, component: Groups, layout: "/admin", @@ -88,7 +88,7 @@ export default function Admin(props) { }, { path: "/blueprints", - name: i18next.t("blueprints", "Blueprints"), + name: i18next.t("blueprints", "Blueprints") as string, icon: AllInbox, component: Blueprints, layout: "/admin", @@ -96,7 +96,7 @@ export default function Admin(props) { }, { path: "/settings", - name: i18next.t("settings", "Settings"), + name: i18next.t("settings", "Settings") as string, icon: SettingsIcon, component: Settings, layout: "/admin", diff --git a/jams-react-client/src/layouts/ListLayout.tsx b/jams-react-client/src/layouts/ListLayout.tsx index e92d9c9e695704a227672c64a5d9a155e6a8d633..c95207ee0aa2d2f04e297256852b143efec00b13 100644 --- a/jams-react-client/src/layouts/ListLayout.tsx +++ b/jams-react-client/src/layouts/ListLayout.tsx @@ -66,7 +66,7 @@ export default function Admin(props) { const Routes = [ { path: `/user/${auth.getUsername()}`, - name: i18next.t("myprofile", "My profile"), + name: i18next.t("myprofile", "My profile") as string, icon: AccountCircleIcon, component: Users, layout: "/admin", @@ -74,7 +74,7 @@ export default function Admin(props) { }, { path: "/users", - name: i18next.t("users", "Users"), + name: i18next.t("users", "Users") as string, icon: Person, component: Users, layout: "/admin", @@ -82,7 +82,7 @@ export default function Admin(props) { }, { path: "/groups", - name: i18next.t("groups", "Groups"), + name: i18next.t("groups", "Groups") as string, icon: Group, component: Groups, layout: "/admin", @@ -90,7 +90,7 @@ export default function Admin(props) { }, { path: "/blueprints", - name: i18next.t("blueprints", "Blueprints"), + name: i18next.t("blueprints", "Blueprints") as string, icon: AllInbox, component: Blueprints, layout: "/admin", @@ -98,7 +98,7 @@ export default function Admin(props) { }, { path: "/settings", - name: i18next.t("settings", "Settings"), + name: i18next.t("settings", "Settings") as string, icon: SettingsIcon, component: Settings, layout: "/admin", diff --git a/jams-react-client/src/layouts/SignIn.tsx b/jams-react-client/src/layouts/SignIn.tsx index f139bea832ff1ee5bac79c2eb0f9581287ba334a..691bda615a9c0258675653d8b237e5474f67e2bd 100644 --- a/jams-react-client/src/layouts/SignIn.tsx +++ b/jams-react-client/src/layouts/SignIn.tsx @@ -107,7 +107,10 @@ export default function SignIn() { } else { setError(true); setErrorMessage( - i18next.t("login_failed", "Login failed. Check your credentials.") + i18next.t( + "login_failed", + "Login failed. Check your credentials." + ) as string ); } }); @@ -123,7 +126,7 @@ export default function SignIn() { alt="logo" /> <Typography component="h1" variant="h5"> - {i18next.t("sign_in", "Sign In")} + {i18next.t("sign_in", "Sign In") as string} </Typography> {error && <Alert severity="error">{errorMessage}</Alert>} <Formik @@ -150,7 +153,7 @@ export default function SignIn() { required fullWidth id="username" - label={i18next.t("username", "Username")} + label={i18next.t("username", "Username") as string} name="username" autoComplete="username" autoFocus @@ -167,7 +170,7 @@ export default function SignIn() { required fullWidth name="password" - label={i18next.t("password", "Password")} + label={i18next.t("password", "Password") as string} type="password" id="password" autoComplete="current-password" @@ -185,7 +188,7 @@ export default function SignIn() { color="primary" className={classes.submit} > - {i18next.t("sign_in", "Sign In")} + {i18next.t("sign_in", "Sign In") as string} </Button> </form> ); diff --git a/jams-react-client/src/views/Blueprint/Blueprint.tsx b/jams-react-client/src/views/Blueprint/Blueprint.tsx index 8b1dee29c1ee850f54d6a9ea6d17d88e7e0d6208..e5ad325bdbcef65525106f6efa1f356e604353da 100644 --- a/jams-react-client/src/views/Blueprint/Blueprint.tsx +++ b/jams-react-client/src/views/Blueprint/Blueprint.tsx @@ -68,15 +68,15 @@ export const Blueprint: FC<BlueprintProps> = ({ blueprintName }) => { indicatorColor="secondary" > <Tab - label={i18next.t("permissions", "Permissions")} + label={i18next.t("permissions", "Permissions") as string} {...a11yProps(openedTab, 0)} /> <Tab - label={i18next.t("configuration", "Configuration")} + label={i18next.t("configuration", "Configuration") as string} {...a11yProps(openedTab, 1)} /> <Tab - label={i18next.t("customization", "Customization")} + label={i18next.t("customization", "Customization") as string} {...a11yProps(openedTab, 2)} /> </Tabs> diff --git a/jams-react-client/src/views/Blueprint/EditBlueprintConfiguration.tsx b/jams-react-client/src/views/Blueprint/EditBlueprintConfiguration.tsx index a167c62fa35f58abb3ed7af4e90c75bdc47eb303..76a14576ed7c9d02c9f201ea73da2677a9e9b50b 100644 --- a/jams-react-client/src/views/Blueprint/EditBlueprintConfiguration.tsx +++ b/jams-react-client/src/views/Blueprint/EditBlueprintConfiguration.tsx @@ -203,7 +203,7 @@ export default function EditBlueprintConfiguration(props) { <BuildOutlinedIcon /> </CardIcon> <p className={classes.cardCategory}> - {i18next.t("configuration", "Configuration")} + {i18next.t("configuration", "Configuration") as string} </p> <h3 className={classes.cardTitle}>{props.blueprintName}</h3> </CardHeader> @@ -232,7 +232,7 @@ export default function EditBlueprintConfiguration(props) { inputProps={{ "aria-label": "secondary checkbox" }} /> } - label={i18next.t("enable_upnp", "Enable UPnP")} + label={i18next.t("enable_upnp", "Enable UPnP") as string} /> </Grid> <Grid item xs={12} sm={12} md={12}> @@ -255,18 +255,22 @@ export default function EditBlueprintConfiguration(props) { <FormControlLabel value="defaultTurn" control={<StyledRadio />} - label={i18next.t( - "use_jami_default_turn_configuration", - "Use default TURN configuration" - )} + label={ + i18next.t( + "use_jami_default_turn_configuration", + "Use default TURN configuration" + ) as string + } /> <FormControlLabel value="customTurn" control={<StyledRadio />} - label={i18next.t( - "use_a_custom_turn_configuration", - "Use a custom TURN configuration" - )} + label={ + i18next.t( + "use_a_custom_turn_configuration", + "Use a custom TURN configuration" + ) as string + } /> <FormGroup row @@ -279,10 +283,12 @@ export default function EditBlueprintConfiguration(props) { > <FormControl className={classes.margin}> <InputLabel htmlFor="turnServer"> - {i18next.t( - "turn_server_address", - "TURN Server address" - )} + { + i18next.t( + "turn_server_address", + "TURN Server address" + ) as string + } </InputLabel> <Input id="turnServer" @@ -309,10 +315,12 @@ export default function EditBlueprintConfiguration(props) { > <FormControl className={classes.margin}> <InputLabel htmlFor="turnServerUserName"> - {i18next.t( - "turn_server_username", - "TURN server username" - )} + { + i18next.t( + "turn_server_username", + "TURN server username" + ) as string + } </InputLabel> <Input id="turnServerUserName" @@ -342,10 +350,12 @@ export default function EditBlueprintConfiguration(props) { > <FormControl className={classes.margin}> <InputLabel htmlFor="turnServerPassword"> - {i18next.t( - "turn_server_password", - "TURN server password" - )} + { + i18next.t( + "turn_server_password", + "TURN server password" + ) as string + } </InputLabel> <Input id="turnServerPassword" @@ -382,10 +392,12 @@ export default function EditBlueprintConfiguration(props) { <FormControlLabel value="disabledTurn" control={<StyledRadio />} - label={i18next.t( - "disable_turn_configuration", - "Disable TURN configuration" - )} + label={ + i18next.t( + "disable_turn_configuration", + "Disable TURN configuration" + ) as string + } /> </RadioGroup> </FormControl> @@ -411,18 +423,22 @@ export default function EditBlueprintConfiguration(props) { <FormControlLabel value="defaultDHTProxy" control={<StyledRadio />} - label={i18next.t( - "use_jami_default_dht_proxy_configuration", - "Use Jami default DHT Proxy configuration" - )} + label={ + i18next.t( + "use_jami_default_dht_proxy_configuration", + "Use Jami default DHT Proxy configuration" + ) as string + } /> <FormControlLabel value="customDHTProxy" control={<StyledRadio />} - label={i18next.t( - "use_a_custom_dht_proxy_configuration", - "Use a custom DHT Proxy configuration" - )} + label={ + i18next.t( + "use_a_custom_dht_proxy_configuration", + "Use a custom DHT Proxy configuration" + ) as string + } /> <FormGroup row> <FormControl @@ -435,10 +451,12 @@ export default function EditBlueprintConfiguration(props) { }} > <InputLabel htmlFor="proxyServer"> - {i18next.t( - "dht_proxy_server_name", - "DHT proxy server name" - )} + { + i18next.t( + "dht_proxy_server_name", + "DHT proxy server name" + ) as string + } </InputLabel> <Input id="proxyServer" @@ -465,10 +483,12 @@ export default function EditBlueprintConfiguration(props) { }} > <InputLabel htmlFor="dhtProxyListUrl"> - {i18next.t( - "dht_proxy_list_url", - "DHT proxy List URL" - )} + { + i18next.t( + "dht_proxy_list_url", + "DHT proxy List URL" + ) as string + } </InputLabel> <Input id="proxyServer" @@ -490,10 +510,12 @@ export default function EditBlueprintConfiguration(props) { <FormControlLabel value="disabledDHTProxy" control={<StyledRadio />} - label={i18next.t( - "disable_dht_proxy_configuration", - "Disable DHT Proxy configuration" - )} + label={ + i18next.t( + "disable_dht_proxy_configuration", + "Disable DHT Proxy configuration" + ) as string + } /> </RadioGroup> </FormControl> diff --git a/jams-react-client/src/views/Blueprint/EditBlueprintPermissions.tsx b/jams-react-client/src/views/Blueprint/EditBlueprintPermissions.tsx index 3ae6a983136cf56087daa7b6f827145f02b36ed8..9bd45d98af222a9618f73b0c012255712fc6f64a 100644 --- a/jams-react-client/src/views/Blueprint/EditBlueprintPermissions.tsx +++ b/jams-react-client/src/views/Blueprint/EditBlueprintPermissions.tsx @@ -187,7 +187,7 @@ export default function EditBlueprintPermissions(props) { <PriorityHighOutlinedIcon /> </CardIcon> <p className={classes.cardCategory}> - {i18next.t("permissions", "Permissions")} + {i18next.t("permissions", "Permissions") as string} </p> <h3 className={classes.cardTitle}>{props.blueprintName}</h3> </CardHeader> @@ -198,7 +198,12 @@ export default function EditBlueprintPermissions(props) { <Grid container spacing={2}> <Grid item xs={12} sm={12} md={12}> <FormLabel component="legend"> - {i18next.t("call_parameters", "Call parameters")} + { + i18next.t( + "call_parameters", + "Call parameters" + ) as string + } </FormLabel> <FormGroup row> <FormControlLabel @@ -215,10 +220,12 @@ export default function EditBlueprintPermissions(props) { name="videoEnabled" /> } - label={i18next.t( - "allow_video_calls", - "Allow video calls" - )} + label={ + i18next.t( + "allow_video_calls", + "Allow video calls" + ) as string + } /> <CustomPopupState message={i18next.t( @@ -242,10 +249,12 @@ export default function EditBlueprintPermissions(props) { name="publicInCalls" /> } - label={i18next.t( - "allow_incoming_calls_from_unknown_contacts", - "Allow incoming calls from unknown contacts" - )} + label={ + i18next.t( + "allow_incoming_calls_from_unknown_contacts", + "Allow incoming calls from unknown contacts" + ) as string + } /> <CustomPopupState message={i18next.t( @@ -269,10 +278,12 @@ export default function EditBlueprintPermissions(props) { name="autoAnswer" /> } - label={i18next.t( - "auto_answer_calss", - "Auto answer calls" - )} + label={ + i18next.t( + "auto_answer_calss", + "Auto answer calls" + ) as string + } /> <CustomPopupState message={i18next.t( @@ -284,7 +295,7 @@ export default function EditBlueprintPermissions(props) { </Grid> <Grid item xs={12} sm={12} md={12}> <FormLabel component="legend"> - {i18next.t("local_lan", "Local LAN")} + {i18next.t("local_lan", "Local LAN") as string} </FormLabel> <FormGroup row> <FormControlLabel @@ -301,10 +312,12 @@ export default function EditBlueprintPermissions(props) { name="peerDiscovery" /> } - label={i18next.t( - "allow_use_of_jami_in_local_lan", - "Allow discovery of other peers on a local network" - )} + label={ + i18next.t( + "allow_use_of_jami_in_local_lan", + "Allow discovery of other peers on a local network" + ) as string + } /> <CustomPopupState message={i18next.t( @@ -316,10 +329,12 @@ export default function EditBlueprintPermissions(props) { </Grid> <Grid item xs={12} sm={12} md={12}> <FormLabel component="legend"> - {i18next.t( - "contact_management", - "Contact management" - )} + { + i18next.t( + "contact_management", + "Contact management" + ) as string + } </FormLabel> <FormGroup row> <FormControlLabel @@ -336,10 +351,12 @@ export default function EditBlueprintPermissions(props) { name="allowLookup" /> } - label={i18next.t( - "allow_jami_user_to_search_for_other_contacts", - "Allow user to add new contacts" - )} + label={ + i18next.t( + "allow_jami_user_to_search_for_other_contacts", + "Allow user to add new contacts" + ) as string + } /> <CustomPopupState message={i18next.t( @@ -373,10 +390,12 @@ export default function EditBlueprintPermissions(props) { inputProps={{ "aria-label": "secondary checkbox" }} /> } - label={i18next.t( - "convert_your_account_into_a_rendezvous_point", - "Set the account as a Rendezvous point" - )} + label={ + i18next.t( + "convert_your_account_into_a_rendezvous_point", + "Set the account as a Rendezvous point" + ) as string + } /> <CustomPopupState message={i18next.t( @@ -392,7 +411,7 @@ export default function EditBlueprintPermissions(props) { }} > <AddCircleOutlineIcon />{" "} - {i18next.t("add_moderator_to", "Add moderator to")}{" "} + {i18next.t("add_moderator_to", "Add moderator to") as string}{" "} {props.blueprintName} </Button> <CustomPopupState @@ -407,16 +426,16 @@ export default function EditBlueprintPermissions(props) { <TableRow> <TableCell align="left"></TableCell> <TableCell align="left"> - {i18next.t("username", "Username")} + {i18next.t("username", "Username") as string} </TableCell> <TableCell align="left"> - {i18next.t("first_name", "First name")} + {i18next.t("first_name", "First name") as string} </TableCell> <TableCell align="left"> - {i18next.t("last_name", "Last name")} + {i18next.t("last_name", "Last name") as string} </TableCell> <TableCell align="right"> - {i18next.t("action", "Action")} + {i18next.t("action", "Action") as string} </TableCell> </TableRow> </TableHead> @@ -451,7 +470,12 @@ export default function EditBlueprintPermissions(props) { color="primary" onClick={() => removeModeratorFromBlueprint(user)} > - {i18next.t("remove_moderator", "Remove moderator")} + { + i18next.t( + "remove_moderator", + "Remove moderator" + ) as string + } </Button> </TableCell> </TableRow> diff --git a/jams-react-client/src/views/Blueprint/EditBlueprintUi.tsx b/jams-react-client/src/views/Blueprint/EditBlueprintUi.tsx index 9968f4e9d2ab4935410f81714ce09a9c818f3179..ddea4eee709db4c2ee34df277c2c5614167cc4ea 100644 --- a/jams-react-client/src/views/Blueprint/EditBlueprintUi.tsx +++ b/jams-react-client/src/views/Blueprint/EditBlueprintUi.tsx @@ -184,7 +184,7 @@ export default function EditBlueprintUi({ blueprintName }) { <SettingsIcon /> </CardIcon> <p className={classes.cardCategory}> - {i18next.t("customization", "Customization")} + {i18next.t("customization", "Customization") as string} </p> <h3 className={classes.cardTitle}>{blueprintName}</h3> </CardHeader> diff --git a/jams-react-client/src/views/Blueprint/EditBlueprintUiForm.tsx b/jams-react-client/src/views/Blueprint/EditBlueprintUiForm.tsx index 312ba414d6a489bd044d54e4e30588d78db15102..41a8a3ae92df3e14b69fff92bf6b69d23c7846c1 100644 --- a/jams-react-client/src/views/Blueprint/EditBlueprintUiForm.tsx +++ b/jams-react-client/src/views/Blueprint/EditBlueprintUiForm.tsx @@ -28,7 +28,12 @@ const IsCustomizationEnabledForm = ({ name="isCustomizationEnabled" /> } - label={i18next.t("is_customization_enabled", "Enable customization")} + label={ + i18next.t( + "is_customization_enabled", + "Enable customization" + ) as string + } /> </FormGroup> ); @@ -48,7 +53,7 @@ const HasTitleForm = ({ uiCustomization, handleUpdateUi }) => { name="hasTitle" /> } - label={i18next.t("welcome_has_title", "Title")} + label={i18next.t("welcome_has_title", "Title") as string} /> </FormGroup> ); @@ -62,14 +67,16 @@ const TitleForm = ({ uiCustomization, handleUpdateUi }) => { return ( <FormGroup row> <span> - {i18next.t( - "instruction_title", - "Use Jami title or personalize it (max 40 characters)" - )} + { + i18next.t( + "instruction_title", + "Use Jami title or personalize it (max 40 characters)" + ) as string + } </span> <TextField id="title" - placeholder={i18next.t("welcome_title", "Welcome to Jami")} + placeholder={i18next.t("welcome_title", "Welcome to Jami") as string} value={uiCustomization.title} onChange={(e) => { handleUpdateUi("title", e.target.value); @@ -96,7 +103,7 @@ const HasDescriptionForm = ({ uiCustomization, handleUpdateUi }) => { }} /> } - label={i18next.t("welcome_has_description", "Description")} + label={i18next.t("welcome_has_description", "Description") as string} /> </FormGroup> ); @@ -108,17 +115,21 @@ const DescriptionForm = ({ uiCustomization, handleUpdateUi }) => { {uiCustomization.hasDescription && ( <> <span> - {i18next.t( - "instruction_description", - "Use Jami description or personalize it (max 100 characters)" - )} + { + i18next.t( + "instruction_description", + "Use Jami description or personalize it (max 100 characters)" + ) as string + } </span> <TextField id="description" - placeholder={i18next.t( - "welcome_Description", - "Here is your Jami identifier, don't hesitate to share it in order to be contacted more easily!" - )} + placeholder={ + i18next.t( + "welcome_Description", + "Here is your Jami identifier, don't hesitate to share it in order to be contacted more easily!" + ) as string + } value={uiCustomization.description} onChange={(e) => { handleUpdateUi("description", e.target.value); @@ -147,7 +158,7 @@ const HasTipsForm = ({ uiCustomization, handleUpdateUi }) => { name="hasTips" /> } - label={i18next.t("welcome_has_Tips", "Enable Tips display")} + label={i18next.t("welcome_has_Tips", "Enable Tips display") as string} /> </FormGroup> ); @@ -167,7 +178,9 @@ const HasBackgroundCustomForm = ({ uiCustomization, handleUpdateUi }) => { name="hasBackground" /> } - label={i18next.t("welcome_has_BackgroundCustom", "Background")} + label={ + i18next.t("welcome_has_BackgroundCustom", "Background") as string + } /> </FormGroup> ); @@ -183,10 +196,12 @@ const CustomBackgroundForm = ({ return ( <> <span> - {i18next.t( - "instruction_background", - "Choose a background color or a background image" - )} + { + i18next.t( + "instruction_background", + "Choose a background color or a background image" + ) as string + } </span> <FormGroup row @@ -207,7 +222,7 @@ const CustomBackgroundForm = ({ /> <div style={{ padding: "0 20px" }}> - <Typography>{i18next.t("or", "or")}</Typography> + <Typography>{i18next.t("or", "or") as string}</Typography> </div> <div style={{ padding: "0 20px" }}> @@ -234,7 +249,9 @@ const CustomBackgroundForm = ({ const TipBoxAndIdColorForm = ({ uiCustomization, handleUpdateUi }) => { return ( <> - <span>{i18next.t("tip_box_id_color", "Tip Box and Jami ID color")}</span> + <span> + {i18next.t("tip_box_id_color", "Tip Box and Jami ID color") as string} + </span> <ColorPickerPopup hasAlphaChannel color={uiCustomization.tipBoxAndIdColor} @@ -261,15 +278,17 @@ const MainBoxColorForm = ({ uiCustomization, handleUpdateUi }) => { name="hasMainBoxColor" /> } - label={i18next.t( - "enable_main_box", - "Add a box behind the title, description and Jami ID" - )} + label={ + i18next.t( + "enable_main_box", + "Add a box behind the title, description and Jami ID" + ) as string + } /> </FormGroup> {uiCustomization.hasMainBoxColor && ( <> - <span>{i18next.t("main_box_color", "Box color")}</span> + <span>{i18next.t("main_box_color", "Box color") as string}</span> <ColorPickerPopup hasAlphaChannel color={uiCustomization.mainBoxColor} @@ -297,7 +316,7 @@ const HasLogoForm = ({ uiCustomization, handleUpdateUi }) => { name="hasLogo" /> } - label={i18next.t("welcome_has_Logo", "Logotype")} + label={i18next.t("welcome_has_Logo", "Logotype") as string} /> </FormGroup> ); @@ -312,10 +331,12 @@ const LogoForm = ({ return ( <> <span> - {i18next.t( - "instruction_logo", - "Use Jami logotype or upload a logotype" - )} + { + i18next.t( + "instruction_logo", + "Use Jami logotype or upload a logotype" + ) as string + } </span> <FormGroup row style={{ padding: "10px 0" }}> @@ -338,7 +359,7 @@ const LogoForm = ({ const LogoSizeForm = ({ uiCustomization, handleUpdateUi }) => { return ( <Box sx={{ width: "200px" }}> - <span>{i18next.t("logo_size", "Size")}</span> + <span>{i18next.t("logo_size", "Size") as string}</span> <Slider size="small" min={10} diff --git a/jams-react-client/src/views/Blueprints/Blueprints.tsx b/jams-react-client/src/views/Blueprints/Blueprints.tsx index 2951d03d9d609572ecfa3c8c7e2ba46da47a08d5..63013b91bd2ec9289b9675162bdf26d0232f0f0c 100644 --- a/jams-react-client/src/views/Blueprints/Blueprints.tsx +++ b/jams-react-client/src/views/Blueprints/Blueprints.tsx @@ -153,23 +153,25 @@ export default function Blueprints() { aria-describedby="alert-dialog-description" > <DialogTitle id="alert-dialog-title"> - {i18next.t("remove_blueprint", "Remove blueprint")} + {i18next.t("remove_blueprint", "Remove blueprint") as string} </DialogTitle> <DialogContent> <DialogContentText id="alert-dialog-description"> - {i18next.t( - "are_you_sure_you_want_to_delete", - "Are you sure you want to delete" - )}{" "} + { + i18next.t( + "are_you_sure_you_want_to_delete", + "Are you sure you want to delete" + ) as string + } <strong>{removedBlueprint}</strong> ? </DialogContentText> </DialogContent> <DialogActions> <Button onClick={() => setOpenRemoveDialog(false)} color="primary"> - {i18next.t("cancel", "Cancel")} + {i18next.t("cancel", "Cancel") as string} </Button> <Button onClick={removeBlueprint} color="info" autoFocus> - {i18next.t("remove", "Remove")} + {i18next.t("remove", "Remove") as string} </Button> </DialogActions> </Dialog> @@ -182,7 +184,7 @@ export default function Blueprints() { onClick={() => setOpen(true)} > <AddCircleOutlineIcon />{" "} - {i18next.t("create_blueprint", "Create blueprint")} + {i18next.t("create_blueprint", "Create blueprint") as string} </Button> <div className={classes.searchWrapper}> {!zeroBlueprint && ( @@ -216,7 +218,12 @@ export default function Blueprints() { <div className={classes.blueprintsNotFound}> <InfoIcon /> <p style={{ marginLeft: "10px" }}> - {i18next.t("no_blueprints_found", "No blueprints found")} + { + i18next.t( + "no_blueprints_found", + "No blueprints found" + ) as string + } </p> </div> ) : ( @@ -228,7 +235,10 @@ export default function Blueprints() { <h3 className={classes.cardTitle}> {blueprint.name ? blueprint.name - : i18next.t("no_blueprint_name", "No blueprint name")} + : (i18next.t( + "no_blueprint_name", + "No blueprint name" + ) as string)} </h3> <ul> <li> @@ -239,7 +249,7 @@ export default function Blueprints() { fontSize="small" style={{ marginRight: "10px" }} /> - {i18next.t("rendezvous", "Rendezvous")} + {i18next.t("rendezvous", "Rendezvous") as string} </p> ) : ( <p> @@ -247,7 +257,7 @@ export default function Blueprints() { fontSize="small" style={{ marginRight: "10px" }} /> - {i18next.t("standalone", "Standalone")} + {i18next.t("standalone", "Standalone") as string} </p> )} </li> diff --git a/jams-react-client/src/views/Blueprints/CreateBlueprintDialog.tsx b/jams-react-client/src/views/Blueprints/CreateBlueprintDialog.tsx index 946cfd154d9b096e0d16d15d31cd1e3e5b7d80d4..00aa17700b0a282a381e78e1044243bf019e8e3e 100644 --- a/jams-react-client/src/views/Blueprints/CreateBlueprintDialog.tsx +++ b/jams-react-client/src/views/Blueprints/CreateBlueprintDialog.tsx @@ -26,7 +26,10 @@ const getHelperText = (disableCreate, blueprintName) => { ); } if (disableCreate && blueprintName.length === 0) { - return i18next.t("blueprint_name_is_empty", "Blueprint name is empty"); + return i18next.t( + "blueprint_name_is_empty", + "Blueprint name is empty" + ) as string; } return ""; @@ -119,7 +122,7 @@ export default function CreateBlueprintDialog({ open, setOpen }) { aria-describedby="alert-dialog-description" > <DialogTitle id="alert-dialog-title"> - {i18next.t("create_blueprint", "Create blueprint")} + {i18next.t("create_blueprint", "Create blueprint") as string} </DialogTitle> <DialogContent> <TextField @@ -127,7 +130,7 @@ export default function CreateBlueprintDialog({ open, setOpen }) { error={blueprintNameExists} margin="dense" id="blueprintName" - label={i18next.t("blueprint_name", "Blueprint name")} + label={i18next.t("blueprint_name", "Blueprint name") as string} helperText={helperText} type="text" variant="standard" @@ -146,14 +149,14 @@ export default function CreateBlueprintDialog({ open, setOpen }) { </DialogContent> <DialogActions> <Button onClick={handleClose} color="primary"> - {i18next.t("cancel", "Cancel")} + {i18next.t("cancel", "Cancel") as string} </Button> <Button onClick={handleCreateBlueprint} color="info" disabled={disableCreate} > - {i18next.t("create_blueprint", "Create blueprint")} + {i18next.t("create_blueprint", "Create blueprint") as string} </Button> </DialogActions> </Dialog> diff --git a/jams-react-client/src/views/Contacts/Contacts.tsx b/jams-react-client/src/views/Contacts/Contacts.tsx index cbe92c23d92df0f63e788a46f70cced73e884741..d51149c6dbb0f9dc58d390227f6026d8177025a9 100644 --- a/jams-react-client/src/views/Contacts/Contacts.tsx +++ b/jams-react-client/src/views/Contacts/Contacts.tsx @@ -304,7 +304,7 @@ export default function Users(props) { openDrawer={openDrawer} setOpenDrawer={setOpenDrawer} direction="right" - placeholder={i18next.t("add_contact", "Add contact…")} + placeholder={i18next.t("add_contact", "Add contact…") as string} searchTargets={searchContacts} targets={users} existingTargets={contacts} @@ -318,26 +318,28 @@ export default function Users(props) { aria-describedby="alert-dialog-description" > <DialogTitle id="alert-dialog-title"> - {i18next.t("remove_contact", "Remove contact")} + {i18next.t("remove_contact", "Remove contact") as string} </DialogTitle> <DialogContent> <DialogContentText id="alert-dialog-description"> - {i18next.t( - "are_you_sure_you_want_to_remove", - "Are you sure you want to remove" - )} + { + i18next.t( + "are_you_sure_you_want_to_remove", + "Are you sure you want to remove" + ) as string + } <strong>{" " + removedContactName + " "}</strong> - {i18next.t("from", "from")} + {i18next.t("from", "from") as string} {" " + props.username + " "} - {i18next.t("contacts", "contacts")}? + {i18next.t("contacts", "contacts") as string}? </DialogContentText> </DialogContent> <DialogActions> <Button onClick={() => setOpen(false)} color="primary"> - {i18next.t("cancel", "Cancel")} + {i18next.t("cancel", "Cancel") as string} </Button> <Button onClick={removeContact} color="info" autoFocus> - {i18next.t("remove", "Remove")} + {i18next.t("remove", "Remove") as string} </Button> </DialogActions> </Dialog> @@ -354,7 +356,7 @@ export default function Users(props) { }} > <AddCircleOutlineIcon />{" "} - {i18next.t("add_a_contact", "Add contact")} + {i18next.t("add_a_contact", "Add contact") as string} </Button> )} </div> @@ -369,7 +371,10 @@ export default function Users(props) { "Search contact fields (URI, firstname, lastname)" ), inputProps: { - "aria-label": i18next.t("search_contacts", "Search contacts"), + "aria-label": i18next.t( + "search_contacts", + "Search contacts" + ) as string, }, onKeyUp: (e) => setSearchValue(e.target.value), }} @@ -499,7 +504,8 @@ export default function Users(props) { </GridItem> ))} {contacts === [] && - props.username + i18next.t("has_no_contacts", " has no contacts")} + ((props.username + + i18next.t("has_no_contacts", " has no contacts")) as string)} </GridContainer> </div> ); diff --git a/jams-react-client/src/views/Groups/CreateGroupDialog.tsx b/jams-react-client/src/views/Groups/CreateGroupDialog.tsx index 23288deefbd897f509086540eb6edb551509911a..aac99f20874ff9f8dea946471dd32c10947fe5fc 100644 --- a/jams-react-client/src/views/Groups/CreateGroupDialog.tsx +++ b/jams-react-client/src/views/Groups/CreateGroupDialog.tsx @@ -27,10 +27,13 @@ import Button from "components/CustomButtons/Button"; const getHelperText = (disableCreate, groupName) => { if (disableCreate && groupName.length > 0) { - return i18next.t("group_name_already_exists", "Group name already exists!"); + return i18next.t( + "group_name_already_exists", + "Group name already exists!" + ) as string; } if (disableCreate && groupName.length === 0) { - return i18next.t("group_name_is_empty", "Group name is empty"); + return i18next.t("group_name_is_empty", "Group name is empty") as string; } return ""; @@ -156,7 +159,7 @@ export default function CreateGroupDialog({ aria-describedby="alert-dialog-description" > <DialogTitle id="alert-dialog-title"> - {i18next.t("create_group", "Create group")} + {i18next.t("create_group", "Create group") as string} </DialogTitle> <DialogContent> <Grid container spacing={2}> @@ -165,7 +168,7 @@ export default function CreateGroupDialog({ autoFocus error={groupNameExits} id="groupName" - label={i18next.t("group_name", "Group name")} + label={i18next.t("group_name", "Group name") as string} helperText={helperText} type="text" fullWidth @@ -187,7 +190,9 @@ export default function CreateGroupDialog({ <TextField select fullWidth - label={i18next.t("select_blueprint", "Select a blueprint")} + label={ + i18next.t("select_blueprint", "Select a blueprint") as string + } value={selectedBlueprint.value} onChange={handleBlueprintsChange} disabled={blueprints.length === 0} diff --git a/jams-react-client/src/views/Groups/EditGroup.tsx b/jams-react-client/src/views/Groups/EditGroup.tsx index 7f541d37ec198fdb73556c452806d8c313066a6c..ef28b95171cd267781cba352cdf625328afaeb03 100644 --- a/jams-react-client/src/views/Groups/EditGroup.tsx +++ b/jams-react-client/src/views/Groups/EditGroup.tsx @@ -365,7 +365,9 @@ export default function EditGroup(props) { openDrawer={openDrawer} setOpenDrawer={setOpenDrawer} direction="right" - placeholder={i18next.t("add_user_to_group", "Add user to group ...")} + placeholder={ + i18next.t("add_user_to_group", "Add user to group ...") as string + } searchTargets={searchUsers} targets={users} existingTargets={groupMembers} @@ -380,7 +382,7 @@ export default function EditGroup(props) { <EditIcon /> </CardIcon> <p className={classes.cardCategory}> - {i18next.t("edit_group", "Edit group")} + {i18next.t("edit_group", "Edit group") as string} </p> <h3 className={classes.cardTitle}>{name}</h3> </CardHeader> @@ -427,7 +429,12 @@ export default function EditGroup(props) { className={classes.inputBottomMargin} htmlFor="blueprint" > - {i18next.t("select_blueprint", "Select a blueprint")} + { + i18next.t( + "select_blueprint", + "Select a blueprint" + ) as string + } </InputLabel> <FormControl className={classes.margin} fullWidth> <Select @@ -454,24 +461,24 @@ export default function EditGroup(props) { setOpenDrawer(true); }} > - <AddCircleOutlineIcon /> {i18next.t("add_user_to", "Add user to")}{" "} - {name} + <AddCircleOutlineIcon />{" "} + {i18next.t("add_user_to", "Add user to") as string} {name} </Button> <Table className={classes.table}> <TableHead> <TableRow> <TableCell align="left"></TableCell> <TableCell align="left"> - {i18next.t("username", "Username")} + {i18next.t("username", "Username") as string} </TableCell> <TableCell align="left"> - {i18next.t("first_name", "First name")} + {i18next.t("first_name", "First name") as string} </TableCell> <TableCell align="left"> - {i18next.t("last_name", "Last name")} + {i18next.t("last_name", "Last name") as string} </TableCell> <TableCell align="right"> - {i18next.t("action", "Action")} + {i18next.t("action", "Action") as string} </TableCell> </TableRow> </TableHead> @@ -505,7 +512,7 @@ export default function EditGroup(props) { color="primary" onClick={() => deleteUserFromGroup(user)} > - {i18next.t("remove_user", "Remove user")} + {i18next.t("remove_user", "Remove user") as string} </Button> </TableCell> </TableRow> diff --git a/jams-react-client/src/views/Groups/Groups.tsx b/jams-react-client/src/views/Groups/Groups.tsx index 9d0ae494f19b19473153080188d46d6e7c9af963..0a2efa756c16eb480f5f74ca2a2b2264035e7396 100644 --- a/jams-react-client/src/views/Groups/Groups.tsx +++ b/jams-react-client/src/views/Groups/Groups.tsx @@ -181,10 +181,12 @@ export default function Groups() { return ( <div> <h4> - {i18next.t( - "you_are_not_allowed_to_access_this_section", - "You are not allowed to access this section. Please contact your administrator to get administrator privileges." - )} + { + i18next.t( + "you_are_not_allowed_to_access_this_section", + "You are not allowed to access this section. Please contact your administrator to get administrator privileges." + ) as string + } </h4> </div> ); @@ -203,23 +205,25 @@ export default function Groups() { aria-describedby="alert-dialog-description" > <DialogTitle id="alert-dialog-title"> - {i18next.t("remove_group", "Remove group")} + {i18next.t("remove_group", "Remove group") as string} </DialogTitle> <DialogContent> <DialogContentText id="alert-dialog-description"> - {i18next.t( - "are_you_sure_you_want_to_delete", - "Are you sure you want to delete" - )}{" "} + { + i18next.t( + "are_you_sure_you_want_to_delete", + "Are you sure you want to delete" + ) as string + }{" "} <strong>{removedGroup.name}</strong> ? </DialogContentText> </DialogContent> <DialogActions> <Button onClick={() => setOpenRemoveDialog(false)} color="primary"> - {i18next.t("cancel", "Cancel")} + {i18next.t("cancel", "Cancel") as string} </Button> <Button onClick={removeGroup} color="info" autoFocus> - {i18next.t("remove", "Remove")} + {i18next.t("remove", "Remove") as string} </Button> </DialogActions> </Dialog> @@ -233,7 +237,7 @@ export default function Groups() { onClick={() => setOpenCreate(true)} > <AddCircleOutlineIcon />{" "} - {i18next.t("create_group", "Create group")} + {i18next.t("create_group", "Create group") as string} </Button> } <div className={classes.searchWrapper}> @@ -248,7 +252,10 @@ export default function Groups() { "Search groups…" ), inputProps: { - "aria-label": i18next.t("search_groups", "Search groups"), + "aria-label": i18next.t( + "search_groups", + "Search groups" + ) as string, }, onKeyUp: (e) => setSearchValue(e.target.value), }} @@ -266,7 +273,7 @@ export default function Groups() { <div className={classes.groupsNotFound}> <InfoIcon />{" "} <p style={{ marginLeft: "10px" }}> - {i18next.t("no_groups_found", "No groups Found")} + {i18next.t("no_groups_found", "No groups Found") as string} </p> </div> ) : ( @@ -295,7 +302,7 @@ export default function Groups() { <strong style={{ marginRight: "5px" }}> {group.groupMembersLength} </strong> - {i18next.t("users", "Users")} + {i18next.t("users", "Users") as string} </li> <li> <MailOutlineIcon @@ -303,7 +310,7 @@ export default function Groups() { style={{ marginRight: "10px" }} /> <strong style={{ marginRight: "5px" }}> - {i18next.t("blueprint", "Blueprint")} + {i18next.t("blueprint", "Blueprint") as string} </strong> {group.blueprint} </li> diff --git a/jams-react-client/src/views/Settings/General.tsx b/jams-react-client/src/views/Settings/General.tsx index 37d376c0afcbac07db7fd723c686b3de49d010ee..5b77b9121159f44e458268b6160295060f5a0ea2 100644 --- a/jams-react-client/src/views/Settings/General.tsx +++ b/jams-react-client/src/views/Settings/General.tsx @@ -81,10 +81,12 @@ export default function General(props) { .catch((error) => { props.setSeverity("error"); props.setErrorMessage( - i18next.t("updating_user", "Updating user ") + + (((i18next.t("updating_user", "Updating user ") as string) + props.username + - i18next.t("password_failed", " password failed with error: ") + - error + i18next.t( + "password_failed", + " password failed with error: " + )) as string) + error ); props.setError(true); }); @@ -105,14 +107,16 @@ export default function General(props) { const passwordSchema = Yup.object().shape({ password: Yup.string().required( - i18next.t("password_is_required", "Password is required!") + i18next.t("password_is_required", "Password is required!") as string ), confirmPassword: Yup.string() .oneOf( [Yup.ref("password")], - i18next.t("password_must_match", "Passwords must match") + i18next.t("password_must_match", "Passwords must match") as string ) - .required(i18next.t("password_is_required", "Password is required!")), + .required( + i18next.t("password_is_required", "Password is required!") as string + ), }); const handleMouseDownPassword = () => { @@ -149,7 +153,12 @@ export default function General(props) { <Grid container spacing={2}> <Grid item lg={6} style={{ display: "flex" }}> <Typography component="p" gutterBottom color="primary"> - {i18next.t("change_language", "Change language")} + { + i18next.t( + "change_language", + "Change language" + ) as string + } </Typography> </Grid> <Grid item lg={6}> @@ -157,17 +166,21 @@ export default function General(props) { </Grid> <Grid item lg={6}> <Typography component="p" gutterBottom color="primary"> - {i18next.t( - "enter_the_following_information_below_to_change_your_admin_password", - "Enter the following information to change your admin password." - )} + { + i18next.t( + "enter_the_following_information_below_to_change_your_admin_password", + "Enter the following information to change your admin password." + ) as string + } </Typography> </Grid> <Grid item lg={6}> <FormikField name="password" - label={i18next.t("password", "Password")} - placeholder={i18next.t("password", "Password")} + label={i18next.t("password", "Password") as string} + placeholder={ + i18next.t("password", "Password") as string + } type={passwordVisible ? "text" : "password"} startAdornment={ <InputAdornment position="start"> @@ -255,7 +268,7 @@ export default function General(props) { setGenerated(true); }} > - {i18next.t("generate", "Generate")} + {i18next.t("generate", "Generate") as string} </Button> <CopyToClipboard text={values.password} @@ -270,17 +283,22 @@ export default function General(props) { className={classes.button} startIcon={<FileCopyIcon />} > - {i18next.t("copy_to_clipboard", "Copy to clipboard")} + { + i18next.t( + "copy_to_clipboard", + "Copy to clipboard" + ) as string + } </Button> </CopyToClipboard> {copied ? ( <span style={{ marginLeft: "10px" }}> - {i18next.t("copied", "Copied")} + {i18next.t("copied", "Copied") as string} </span> ) : null} {generated ? ( <span style={{ marginLeft: "10px" }}> - {i18next.t("generated", "Generated")} + {i18next.t("generated", "Generated") as string} </span> ) : null} </Grid> @@ -294,10 +312,12 @@ export default function General(props) { disabled={!isValid || !dirty} className={classes.submit} > - {i18next.t( - "change_admin_password", - "Change administrator password" - )} + { + i18next.t( + "change_admin_password", + "Change administrator password" + ) as string + } </Button> </Grid> <Grid item lg={6}> diff --git a/jams-react-client/src/views/Settings/Settings.tsx b/jams-react-client/src/views/Settings/Settings.tsx index 9a1c0dcf477e855c3a0a812bca4c4adc2238079b..e98b17dff7ad105d9193a9f1291c0a6aba9bf1f6 100644 --- a/jams-react-client/src/views/Settings/Settings.tsx +++ b/jams-react-client/src/views/Settings/Settings.tsx @@ -67,10 +67,12 @@ export default function Settings() { return ( <div> <h4> - {i18next.t( - "you_are_not_allowed_to_access_this_section", - "You are not allowed to access this section. Please contact your administrator to get administrator privileges." - )} + { + i18next.t( + "you_are_not_allowed_to_access_this_section", + "You are not allowed to access this section. Please contact your administrator to get administrator privileges." + ) as string + } </h4> </div> ); @@ -86,11 +88,11 @@ export default function Settings() { indicatorColor="secondary" > <Tab - label={i18next.t("general", "General")} + label={i18next.t("general", "General") as string} {...a11yProps(value, 0)} /> <Tab - label={i18next.t("subscription", "Subscription")} + label={i18next.t("subscription", "Subscription") as string} {...a11yProps(value, 1)} /> </Tabs> diff --git a/jams-react-client/src/views/Settings/Subscription.tsx b/jams-react-client/src/views/Settings/Subscription.tsx index 3a30ade81bf93e19086c286d785ead9b7d411f31..0533c56b4fc78059fe81cc592a8f5020dba3b99c 100644 --- a/jams-react-client/src/views/Settings/Subscription.tsx +++ b/jams-react-client/src/views/Settings/Subscription.tsx @@ -142,10 +142,12 @@ export default function Subscription(props) { <Grid container spacing={3}> <Grid item lg={6}> <Typography component="p" gutterBottom color="primary"> - {i18next.t( - "paste_your_jams_enterprise_subscription_code_received_from_jami", - "Paste your JAMS Enterprise subscription code received from the Jami store." - )} + { + i18next.t( + "paste_your_jams_enterprise_subscription_code_received_from_jami", + "Paste your JAMS Enterprise subscription code received from the Jami store." + ) as string + } </Typography> </Grid> <Grid item lg={6}> @@ -155,10 +157,12 @@ export default function Subscription(props) { required fullWidth id="subscriptionCode" - label={i18next.t( - "subscription_code", - "Subscription Code" - )} + label={ + i18next.t( + "subscription_code", + "Subscription Code" + ) as string + } name="subscriptionCode" autoComplete="subscriptionCode" autoFocus @@ -175,7 +179,7 @@ export default function Subscription(props) { color="primary" className={classes.submit} > - {i18next.t("register", "Register")} + {i18next.t("register", "Register") as string} </Button> </Grid> </Grid> @@ -189,10 +193,12 @@ export default function Subscription(props) { return ( <div> <p> - {i18next.t( - "your_license_is_already_activated", - "Your subscription is already activated!" - )} + { + i18next.t( + "your_license_is_already_activated", + "Your subscription is already activated!" + ) as string + } </p> </div> ); diff --git a/jams-react-client/src/views/UserProfile/AdminAddUserToGroup.tsx b/jams-react-client/src/views/UserProfile/AdminAddUserToGroup.tsx index d6f05f2b37834910e3220f324e7347b78c25e672..60fcdea04113bf9eb2d5716ce1ca51dd1791a5bb 100644 --- a/jams-react-client/src/views/UserProfile/AdminAddUserToGroup.tsx +++ b/jams-react-client/src/views/UserProfile/AdminAddUserToGroup.tsx @@ -109,7 +109,9 @@ const AdminAddUserToGroup: FC<AdminAddUserToGroupProps> = ({ openDrawer={openDrawer} setOpenDrawer={setOpenDrawer} direction="right" - placeholder={i18next.t("add_user_to_group", "Add user to group ...")} + placeholder={ + i18next.t("add_user_to_group", "Add user to group ...") as string + } searchTargets={setSearchValue} targets={groups.filter((group) => group.name.includes(searchValue))} existingTargets={groupMemberships} @@ -125,16 +127,16 @@ const AdminAddUserToGroup: FC<AdminAddUserToGroupProps> = ({ }} > <AddCircleOutlineIcon />{" "} - {i18next.t("add_user_to_a_group", "Add user to a group")} + {i18next.t("add_user_to_a_group", "Add user to a group") as string} </Button> <Table className={classes.table}> <TableHead> <TableRow> <TableCell align="left"> - {i18next.t("group_name", "Group name")} + {i18next.t("group_name", "Group name") as string} </TableCell> <TableCell align="right"> - {i18next.t("action", "Action")} + {i18next.t("action", "Action") as string} </TableCell> </TableRow> </TableHead> @@ -152,7 +154,12 @@ const AdminAddUserToGroup: FC<AdminAddUserToGroupProps> = ({ color="primary" onClick={() => removeUserFromGroup(group)} > - {i18next.t("remove_from_group", "Remove from group")} + { + i18next.t( + "remove_from_group", + "Remove from group" + ) as string + } </Button> </TableCell> </TableRow> diff --git a/jams-react-client/src/views/UserProfile/DisplayUserProfile.tsx b/jams-react-client/src/views/UserProfile/DisplayUserProfile.tsx index 7881b01f4c93bb93ec9becc42b62473e8c0c94d8..2c85ca411c1b3dda9575048b1dd9edad894b793e 100644 --- a/jams-react-client/src/views/UserProfile/DisplayUserProfile.tsx +++ b/jams-react-client/src/views/UserProfile/DisplayUserProfile.tsx @@ -316,8 +316,8 @@ const DisplayUserProfile: FC<DisplayUserProfileProps> = ({ const getUserStatus = () => { const label = revoked - ? i18next.t("revoked", "Revoked") - : i18next.t("active", "Active"); + ? (i18next.t("revoked", "Revoked") as string) + : (i18next.t("active", "Active") as string); return ( <Chip style={{ flex: 1 }} @@ -377,20 +377,22 @@ const DisplayUserProfile: FC<DisplayUserProfileProps> = ({ aria-describedby="alert-dialog-description" > <DialogTitle id="alert-dialog-title"> - {i18next.t("revoke_user_account", "Revoke user account")} + {i18next.t("revoke_user_account", "Revoke user account") as string} </DialogTitle> <DialogContent> <DialogContentText id="alert-dialog-description"> - {i18next.t( - "are_you_sure_want_revoke", - "Are you sure you want to revoke" - )}{" "} + { + i18next.t( + "are_you_sure_want_revoke", + "Are you sure you want to revoke" + ) as string + }{" "} <strong>{revokedUser}</strong> ? </DialogContentText> </DialogContent> <DialogActions> <Button onClick={handleClose} color="primary"> - {i18next.t("cancel", "Cancel")} + {i18next.t("cancel", "Cancel") as string} </Button> <Button onClick={revokeUser} @@ -398,7 +400,7 @@ const DisplayUserProfile: FC<DisplayUserProfileProps> = ({ className={classes.whiteButtonText} autoFocus > - {i18next.t("revoke", "Revoke")} + {i18next.t("revoke", "Revoke") as string} </Button> </DialogActions> </Dialog> @@ -454,7 +456,8 @@ const DisplayUserProfile: FC<DisplayUserProfileProps> = ({ className={classes.whiteButtonText} onClick={() => setDisplayUser(false)} > - <EditIcon /> {i18next.t("edit_profile", "Edit profile")} + <EditIcon />{" "} + {i18next.t("edit_profile", "Edit profile") as string} </Button> )} </Grid> @@ -468,7 +471,12 @@ const DisplayUserProfile: FC<DisplayUserProfileProps> = ({ }} > <VpnKeyIcon />{" "} - {i18next.t("change_password", "Change password")} + { + i18next.t( + "change_password", + "Change password" + ) as string + } </Button> )} </Grid> @@ -483,7 +491,7 @@ const DisplayUserProfile: FC<DisplayUserProfileProps> = ({ onClick={() => handleClickOpen(user.username)} > <DeleteIcon fontSize="small" />{" "} - {i18next.t("revoke_user", "Revoke user")} + {i18next.t("revoke_user", "Revoke user") as string} </Button> )} </Grid> diff --git a/jams-react-client/src/views/UserProfile/EditCreateUserProfile.tsx b/jams-react-client/src/views/UserProfile/EditCreateUserProfile.tsx index b74695f7babab2812b077232fb5e7f873727f95b..2b1fbefd785b9287856fc84d8d5aa73346414843 100644 --- a/jams-react-client/src/views/UserProfile/EditCreateUserProfile.tsx +++ b/jams-react-client/src/views/UserProfile/EditCreateUserProfile.tsx @@ -483,9 +483,17 @@ export default function EditCreateUserProfile(props) { const EditCreateSchema = Yup.object().shape({ username: Yup.string() - .min(3, i18next.t("minimum_3_characters", "Minimum 3 characters!")) - .max(32, i18next.t("maximum_32_characters", "Maximum 32 characters!")) - .required(i18next.t("username_is_required", "Username is required!")) + .min( + 3, + i18next.t("minimum_3_characters", "Minimum 3 characters!") as string + ) + .max( + 32, + i18next.t("maximum_32_characters", "Maximum 32 characters!") as string + ) + .required( + i18next.t("username_is_required", "Username is required!") as string + ) .matches( /^[A-Za-z_][A-Za-z0-9_]*$/, i18next.t( @@ -495,22 +503,22 @@ export default function EditCreateUserProfile(props) { ), password: props.createUser ? Yup.string().required( - i18next.t("password_is_required", "Password is required!") + i18next.t("password_is_required", "Password is required!") as string ) : null, confirmPassword: props.createUser ? Yup.string().oneOf( [Yup.ref("password"), null], - i18next.t("password_must_match", "Passwords must match") + i18next.t("password_must_match", "Passwords must match") as string ) : null, firstName: Yup.string().min( 2, - i18next.t("first_name_is_too_short", "First name is too short!") + i18next.t("first_name_is_too_short", "First name is too short!") as string ), lastName: Yup.string().min( 2, - i18next.t("last_name_is_too_short", "Last Name is too short!") + i18next.t("last_name_is_too_short", "Last Name is too short!") as string ), email: Yup.string().email(i18next.t("invalid_email", "Invalid email!")), profilePicture: Yup.string(), @@ -523,16 +531,16 @@ export default function EditCreateUserProfile(props) { ), faxNumber: Yup.string().matches( /^(\+\d{1,2}\s?)?1?-?\.?\s?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}$/, - i18next.t("fax_not_valid", "Fax number not valid!") + i18next.t("fax_not_valid", "Fax number not valid!") as string ), phoneNumber: Yup.string().matches( /^(\+\d{1,2}\s?)?1?-?\.?\s?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}$/, - i18next.t("phone_not_valid", "Phone number not valid!") + i18next.t("phone_not_valid", "Phone number not valid!") as string ), phoneNumberExtension: Yup.number().positive().integer(), mobileNumber: Yup.string().matches( /^(\+\d{1,2}\s?)?1?-?\.?\s?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}$/, - i18next.t("mobile_not_valid", "Mobile number not valid!") + i18next.t("mobile_not_valid", "Mobile number not valid!") as string ), }); @@ -546,7 +554,7 @@ export default function EditCreateUserProfile(props) { classes={{ paper: classes.dialogPaper }} > <DialogTitle id="alert-dialog-title"> - {i18next.t("crop_image", "Crop image")} + {i18next.t("crop_image", "Crop image") as string} </DialogTitle> <DialogContent> <div className={classes.cropContainer}> @@ -569,7 +577,7 @@ export default function EditCreateUserProfile(props) { variant="overline" classes={{ root: classes.sliderLabel }} > - {i18next.t("zoom", "Zoom")} + {i18next.t("zoom", "Zoom") as string} </Typography> <Slider value={zoom} @@ -586,7 +594,7 @@ export default function EditCreateUserProfile(props) { variant="overline" classes={{ root: classes.sliderLabel }} > - {i18next.t("rotation", "Rotation")} + {i18next.t("rotation", "Rotation") as string} </Typography> <Slider value={rotation} @@ -607,7 +615,7 @@ export default function EditCreateUserProfile(props) { className={classes.whiteButtonText} autoFocus > - {i18next.t("validate", "Validate")} + {i18next.t("validate", "Validate") as string} </Button> </DialogActions> </Dialog> @@ -633,11 +641,14 @@ export default function EditCreateUserProfile(props) { > <p className={classes.cardCategory}> {props.createUser - ? i18next.t( + ? (i18next.t( "create_new_profile", "Create new profile" - ) - : i18next.t("edit_profile", "Edit profile")} + ) as string) + : (i18next.t( + "edit_profile", + "Edit profile" + ) as string)} </p> {props.createUser ? ( "" @@ -687,18 +698,24 @@ export default function EditCreateUserProfile(props) { > <PhotoCamera /> </IconButton>{" "} - {i18next.t( - "change_profile_image", - "Change profile image" - )} + { + i18next.t( + "change_profile_image", + "Change profile image" + ) as string + } </label> </Grid> {props.createUser && ( <Grid item xs={12} sm={12} md={6}> <FormikField name="username" - label={i18next.t("username", "Username")} - placeholder={i18next.t("username", "Username")} + label={ + i18next.t("username", "Username") as string + } + placeholder={ + i18next.t("username", "Username") as string + } startAdornment={ <InputAdornment position="start"> <AccountCircleIcon /> @@ -732,8 +749,12 @@ export default function EditCreateUserProfile(props) { <FormikField type={passwordVisible ? "text" : "password"} name="password" - label={i18next.t("password", "Password")} - placeholder={i18next.t("password", "Password")} + label={ + i18next.t("password", "Password") as string + } + placeholder={ + i18next.t("password", "Password") as string + } startAdornment={ <InputAdornment position="start"> <VpnKeyIcon /> @@ -835,7 +856,7 @@ export default function EditCreateUserProfile(props) { setGenerated(true); }} > - {i18next.t("generate", "Generate")} + {i18next.t("generate", "Generate") as string} </Button> <CopyToClipboard text={values.password} @@ -851,20 +872,27 @@ export default function EditCreateUserProfile(props) { className={classes.button} startIcon={<FileCopyIcon />} > - {i18next.t( - "copy_to_clipboard", - "Copy to clipboard" - )} + { + i18next.t( + "copy_to_clipboard", + "Copy to clipboard" + ) as string + } </Button> </CopyToClipboard> {copied ? ( <span style={{ marginLeft: "10px" }}> - {i18next.t("copied", "Copied")} + {i18next.t("copied", "Copied") as string} </span> ) : null} {generated ? ( <span style={{ marginLeft: "10px" }}> - {i18next.t("generated", "Generated")} + { + i18next.t( + "generated", + "Generated" + ) as string + } </span> ) : null} </Grid> @@ -872,7 +900,9 @@ export default function EditCreateUserProfile(props) { <Grid item align="center" xs={12} sm={12} md={6}> <FormikField name="firstName" - label={i18next.t("first_name", "First name")} + label={ + i18next.t("first_name", "First name") as string + } placeholder={i18next.t( "first_name", "First name" @@ -890,8 +920,12 @@ export default function EditCreateUserProfile(props) { <Grid item align="center" xs={12} sm={12} md={6}> <FormikField name="lastName" - label={i18next.t("last_name", "Last name")} - placeholder={i18next.t("last_name", "Last name")} + label={ + i18next.t("last_name", "Last name") as string + } + placeholder={ + i18next.t("last_name", "Last name") as string + } startAdornment={ <InputAdornment position="start"> <PersonOutlinedIcon /> @@ -905,8 +939,10 @@ export default function EditCreateUserProfile(props) { <Grid item align="center" xs={12} sm={12} md={6}> <FormikField name="email" - label={i18next.t("email", "Email")} - placeholder={i18next.t("email", "Email")} + label={i18next.t("email", "Email") as string} + placeholder={ + i18next.t("email", "Email") as string + } startAdornment={ <InputAdornment position="start"> <AlternateEmailOutlinedIcon /> @@ -920,7 +956,12 @@ export default function EditCreateUserProfile(props) { <Grid item align="center" xs={12} sm={12} md={6}> <FormikField name="organization" - label={i18next.t("organization", "Organization")} + label={ + i18next.t( + "organization", + "Organization" + ) as string + } placeholder={i18next.t( "organization", "Organization" @@ -938,7 +979,9 @@ export default function EditCreateUserProfile(props) { <Grid item align="center" xs={12} sm={12} md={6}> <FormikField name="faxNumber" - label={i18next.t("fax_number", "Fax number")} + label={ + i18next.t("fax_number", "Fax number") as string + } placeholder={i18next.t( "fax_number", "Fax number" @@ -956,7 +999,12 @@ export default function EditCreateUserProfile(props) { <Grid item align="center" xs={12} sm={12} md={6}> <FormikField name="phoneNumber" - label={i18next.t("phone_number", "Phone number")} + label={ + i18next.t( + "phone_number", + "Phone number" + ) as string + } placeholder={i18next.t( "phone_number", "Phone number" @@ -974,8 +1022,12 @@ export default function EditCreateUserProfile(props) { <Grid item align="center" xs={12} sm={12} md={6}> <FormikField name="phoneNumberExtension" - label={i18next.t("extension", "Extension")} - placeholder={i18next.t("extension", "Extension")} + label={ + i18next.t("extension", "Extension") as string + } + placeholder={ + i18next.t("extension", "Extension") as string + } startAdornment={ <InputAdornment position="start"> <PhoneForwardedOutlinedIcon /> @@ -989,8 +1041,10 @@ export default function EditCreateUserProfile(props) { <Grid item align="center" xs={12} sm={12} md={6}> <FormikField name="mobileNumber" - label={i18next.t("mobile", "Mobile")} - placeholder={i18next.t("mobile", "Mobile")} + label={i18next.t("mobile", "Mobile") as string} + placeholder={ + i18next.t("mobile", "Mobile") as string + } startAdornment={ <InputAdornment position="start"> <SmartphoneOutlinedIcon /> @@ -1011,7 +1065,7 @@ export default function EditCreateUserProfile(props) { className={classes.whiteButtonText} onClick={handleCancelUpdate} > - {i18next.t("cancel", "Cancel")} + {i18next.t("cancel", "Cancel") as string} </Button> )} {props.createUser ? ( @@ -1021,7 +1075,12 @@ export default function EditCreateUserProfile(props) { color="info" className={classes.whiteButtonText} > - {i18next.t("create_profile", "Create Profile")} + { + i18next.t( + "create_profile", + "Create Profile" + ) as string + } </Button> ) : ( <Button @@ -1030,7 +1089,7 @@ export default function EditCreateUserProfile(props) { color="info" className={classes.whiteButtonText} > - {i18next.t("save_profile", "Save Profile")} + {i18next.t("save_profile", "Save Profile") as string} </Button> )} </CardFooter> diff --git a/jams-react-client/src/views/UserProfile/UserProfile.tsx b/jams-react-client/src/views/UserProfile/UserProfile.tsx index 92e6642be84657a76465fca490b1b7017a149f38..625061699fd48e7b93d9ffaf46fb8ddb874613b8 100755 --- a/jams-react-client/src/views/UserProfile/UserProfile.tsx +++ b/jams-react-client/src/views/UserProfile/UserProfile.tsx @@ -79,15 +79,15 @@ export default function UserProfile(props) { indicatorColor="secondary" > <Tab - label={i18next.t("profile", "Profile")} + label={i18next.t("profile", "Profile") as string} {...a11yProps(value, 0)} /> <Tab - label={i18next.t("devices", "Devices")} + label={i18next.t("devices", "Devices") as string} {...a11yProps(value, 1)} /> <Tab - label={i18next.t("contacts", "contacts")} + label={i18next.t("contacts", "contacts") as string} {...a11yProps(value, 2)} /> </Tabs> diff --git a/jams-react-client/src/views/Users/Users.tsx b/jams-react-client/src/views/Users/Users.tsx index 700eaf12282fe3a7973245221edcf1ec0374af90..5757f1d0f95ce670d21aadc7e4404673ed35d5c8 100644 --- a/jams-react-client/src/views/Users/Users.tsx +++ b/jams-react-client/src/views/Users/Users.tsx @@ -168,7 +168,7 @@ export default function Users() { <Link to={"/createuser"}> <Button variant="contained" color="primary"> <AddCircleOutlineIcon />{" "} - {i18next.t("create_user", "Create user")} + {i18next.t("create_user", "Create user") as string} </Button> </Link> )} @@ -198,7 +198,10 @@ export default function Users() { "Search users using (username, first name, last name)" ), inputProps: { - "aria-label": i18next.t("search_users", "Search users"), + "aria-label": i18next.t( + "search_users", + "Search users" + ) as string, }, onKeyUp: handleSearchUsers, }} @@ -228,7 +231,7 @@ export default function Users() { <InfoIcon /> <p style={{ marginLeft: "10px" }}> - {i18next.t("no_users_found", "No users found")} + {i18next.t("no_users_found", "No users found") as string} </p> </div> )} @@ -307,10 +310,12 @@ export default function Users() { <InfoIcon /> <p style={{ marginLeft: "10px" }}> - {i18next.t( - "no_users_found_matching", - "No users found matching search value!" - )} + { + i18next.t( + "no_users_found_matching", + "No users found matching search value!" + ) as string + } </p> </div> )}