more translations

This commit is contained in:
Philipinho
2025-09-03 10:11:19 -07:00
parent cf7534de3d
commit 73b78f625d
9 changed files with 70 additions and 30 deletions

View File

@ -53,6 +53,7 @@
"e.g Space for product team": "e.g Space for product team", "e.g Space for product team": "e.g Space for product team",
"e.g Space for sales team to collaborate": "e.g Space for sales team to collaborate", "e.g Space for sales team to collaborate": "e.g Space for sales team to collaborate",
"Edit": "Edit", "Edit": "Edit",
"Read": "Read",
"Edit group": "Edit group", "Edit group": "Edit group",
"Email": "Email", "Email": "Email",
"Enter a strong password": "Enter a strong password", "Enter a strong password": "Enter a strong password",
@ -500,5 +501,31 @@
"Failed to load subpages": "Failed to load subpages", "Failed to load subpages": "Failed to load subpages",
"No subpages": "No subpages", "No subpages": "No subpages",
"Subpages (Child pages)": "Subpages (Child pages)", "Subpages (Child pages)": "Subpages (Child pages)",
"List all subpages of the current page": "List all subpages of the current page" "List all subpages of the current page": "List all subpages of the current page",
"Attachments": "Attachments",
"All spaces": "All spaces",
"Unknown": "Unknown",
"Find a space": "Find a space",
"Search in all your spaces": "Search in all your spaces",
"Type": "Type",
"Enterprise": "Enterprise",
"Download attachment": "Download attachment",
"Allowed email domains": "Allowed email domains",
"Only users with email addresses from these domains can signup via SSO.": "Only users with email addresses from these domains can signup via SSO.",
"Enter valid domain names separated by comma or space": "Enter valid domain names separated by comma or space",
"Enforce two-factor authentication": "Enforce two-factor authentication",
"Once enforced, all members must enable two-factor authentication to access the workspace." : "Once enforced, all members must enable two-factor authentication to access the workspace.",
"Toggle MFA enforcement": "Toggle MFA enforcement",
"Display name": "Display name",
"Allow signup": "Allow signup",
"Enabled": "Enabled",
"Advanced Settings": "Advanced Settings",
"Enable TLS/SSL": "Enable TLS/SSL",
"Use secure connection to LDAP server": "Use secure connection to LDAP server",
"Group sync": "Group sync",
"No SSO providers found.": "No SSO providers found.",
"Delete SSO provider": "Delete SSO provider",
"Are you sure you want to delete this SSO provider?": "Are you sure you want to delete this SSO provider?",
"Action": "Action",
"{{ssoProviderType}} configuration": "{{ssoProviderType}} configuration"
} }

View File

@ -55,9 +55,11 @@ export default function AllowedDomains() {
return ( return (
<> <>
<div> <div>
<Text size="md">Allowed email domains</Text> <Text size="md">{t("Allowed email domains")}</Text>
<Text size="sm" c="dimmed"> <Text size="sm" c="dimmed">
Only users with email addresses from these domains can signup via SSO. {t(
"Only users with email addresses from these domains can signup via SSO.",
)}
</Text> </Text>
</div> </div>
<form onSubmit={form.onSubmit(handleSubmit)}> <form onSubmit={form.onSubmit(handleSubmit)}>

View File

@ -1,6 +1,7 @@
import React from "react"; import React from "react";
import { z } from "zod"; import { z } from "zod";
import { useForm, zodResolver } from "@mantine/form"; import { useForm } from "@mantine/form";
import { zodResolver } from "mantine-form-zod-resolver";
import { Box, Button, Group, Stack, Switch, TextInput } from "@mantine/core"; import { Box, Button, Group, Stack, Switch, TextInput } from "@mantine/core";
import classes from "@/ee/security/components/sso.module.css"; import classes from "@/ee/security/components/sso.module.css";
import { IAuthProvider } from "@/ee/security/types/security.types.ts"; import { IAuthProvider } from "@/ee/security/types/security.types.ts";

View File

@ -110,7 +110,7 @@ export function SsoLDAPForm({ provider, onClose }: SsoFormProps) {
<form onSubmit={form.onSubmit(handleSubmit)}> <form onSubmit={form.onSubmit(handleSubmit)}>
<Stack> <Stack>
<TextInput <TextInput
label="Display name" label={t("Display name")}
placeholder="e.g Company LDAP" placeholder="e.g Company LDAP"
data-autofocus data-autofocus
{...form.getInputProps("name")} {...form.getInputProps("name")}
@ -155,7 +155,7 @@ export function SsoLDAPForm({ provider, onClose }: SsoFormProps) {
<Accordion variant="separated"> <Accordion variant="separated">
<Accordion.Item value="advanced"> <Accordion.Item value="advanced">
<Accordion.Control icon={<IconInfoCircle size={20} />}> <Accordion.Control icon={<IconInfoCircle size={20} />}>
Advanced Settings {t("Advanced Settings")}
</Accordion.Control> </Accordion.Control>
<Accordion.Panel> <Accordion.Panel>
<Stack> <Stack>

View File

@ -83,7 +83,7 @@ export function SsoOIDCForm({ provider, onClose }: SsoFormProps) {
<form onSubmit={form.onSubmit(handleSubmit)}> <form onSubmit={form.onSubmit(handleSubmit)}>
<Stack> <Stack>
<TextInput <TextInput
label="Display name" label={t("Display name")}
placeholder="e.g Google SSO" placeholder="e.g Google SSO"
data-autofocus data-autofocus
{...form.getInputProps("name")} {...form.getInputProps("name")}

View File

@ -6,6 +6,7 @@ import { SSO_PROVIDER } from "@/ee/security/contants.ts";
import { SsoOIDCForm } from "@/ee/security/components/sso-oidc-form.tsx"; import { SsoOIDCForm } from "@/ee/security/components/sso-oidc-form.tsx";
import { SsoGoogleForm } from "@/ee/security/components/sso-google-form.tsx"; import { SsoGoogleForm } from "@/ee/security/components/sso-google-form.tsx";
import { SsoLDAPForm } from "@/ee/security/components/sso-ldap-form.tsx"; import { SsoLDAPForm } from "@/ee/security/components/sso-ldap-form.tsx";
import { useTranslation } from "react-i18next";
interface SsoModalProps { interface SsoModalProps {
opened: boolean; opened: boolean;
@ -18,6 +19,8 @@ export default function SsoProviderModal({
onClose, onClose,
provider, provider,
}: SsoModalProps) { }: SsoModalProps) {
const { t } = useTranslation();
if (!provider) { if (!provider) {
return null; return null;
} }
@ -25,7 +28,9 @@ export default function SsoProviderModal({
return ( return (
<Modal <Modal
opened={opened} opened={opened}
title={`${provider.type.toUpperCase()} Configuration`} title={t("{{ssoProviderType}} configuration", {
ssoProviderType: provider.type.toUpperCase(),
})}
onClose={onClose} onClose={onClose}
> >
{provider.type === SSO_PROVIDER.SAML && ( {provider.type === SSO_PROVIDER.SAML && (

View File

@ -1,6 +1,7 @@
import React from "react"; import React from "react";
import { z } from "zod"; import { z } from "zod";
import { useForm, zodResolver } from "@mantine/form"; import { useForm } from "@mantine/form";
import { zodResolver } from "mantine-form-zod-resolver";
import { import {
Box, Box,
Button, Button,
@ -91,7 +92,7 @@ export function SsoSamlForm({ provider, onClose }: SsoFormProps) {
<form onSubmit={form.onSubmit(handleSubmit)}> <form onSubmit={form.onSubmit(handleSubmit)}>
<Stack> <Stack>
<TextInput <TextInput
label="Display name" label={t("Display name")}
placeholder="e.g Azure Entra" placeholder="e.g Azure Entra"
data-autofocus data-autofocus
{...form.getInputProps("name")} {...form.getInputProps("name")}

View File

@ -1,5 +1,5 @@
import React from "react"; import React from "react";
import { Group, Center, Text, Badge, ActionIcon } from "@mantine/core"; import { Group, Center, Text, Badge, ActionIcon, Tooltip } from "@mantine/core";
import { Spotlight } from "@mantine/spotlight"; import { Spotlight } from "@mantine/spotlight";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import { IconFile, IconDownload } from "@tabler/icons-react"; import { IconFile, IconDownload } from "@tabler/icons-react";
@ -10,6 +10,7 @@ import {
IPageSearch, IPageSearch,
} from "@/features/search/types/search.types"; } from "@/features/search/types/search.types";
import DOMPurify from "dompurify"; import DOMPurify from "dompurify";
import { useTranslation } from "react-i18next";
interface SearchResultItemProps { interface SearchResultItemProps {
result: IPageSearch | IAttachmentSearch; result: IPageSearch | IAttachmentSearch;
@ -22,6 +23,8 @@ export function SearchResultItem({
isAttachmentResult, isAttachmentResult,
showSpace, showSpace,
}: SearchResultItemProps) { }: SearchResultItemProps) {
const { t } = useTranslation();
if (isAttachmentResult) { if (isAttachmentResult) {
const attachmentResult = result as IAttachmentSearch; const attachmentResult = result as IAttachmentSearch;
@ -68,14 +71,15 @@ export function SearchResultItem({
)} )}
</div> </div>
<ActionIcon <Tooltip label={t("Download attachment")} withArrow>
variant="subtle" <ActionIcon
color="gray" variant="subtle"
onClick={handleDownload} color="gray"
title="Download attachment" onClick={handleDownload}
> >
<IconDownload size={18} /> <IconDownload size={18} />
</ActionIcon> </ActionIcon>
</Tooltip>
</Group> </Group>
</Spotlight.Action> </Spotlight.Action>
); );

View File

@ -75,10 +75,10 @@ export function SearchSpotlightFilters({
}, []); }, []);
const contentTypeOptions = [ const contentTypeOptions = [
{ value: "page", label: "Pages" }, { value: "page", label: t("Pages") },
{ {
value: "attachment", value: "attachment",
label: "Attachments", label: t("Attachments"),
disabled: !hasLicenseKey, disabled: !hasLicenseKey,
}, },
]; ];
@ -136,13 +136,13 @@ export function SearchSpotlightFilters({
fw={500} fw={500}
> >
{selectedSpaceId {selectedSpaceId
? `Space: ${selectedSpaceData?.name || "Unknown"}` ? `${t("Space")}: ${selectedSpaceData?.name || t("Unknown")}`
: "Space: All spaces"} : `${t("Space")}: ${t("All spaces")}`}
</Button> </Button>
</Menu.Target> </Menu.Target>
<Menu.Dropdown> <Menu.Dropdown>
<TextInput <TextInput
placeholder="Find a space" placeholder={t("Find a space")}
data-autofocus data-autofocus
autoFocus autoFocus
leftSection={<IconSearch size={16} />} leftSection={<IconSearch size={16} />}
@ -160,15 +160,15 @@ export function SearchSpotlightFilters({
<Avatar <Avatar
color="initials" color="initials"
variant="filled" variant="filled"
name="All spaces" name={t("All spaces")}
size={20} size={20}
/> />
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<Text size="sm" fw={500}> <Text size="sm" fw={500}>
All spaces {t("All spaces")}
</Text> </Text>
<Text size="xs" c="dimmed"> <Text size="xs" c="dimmed">
Search in all your spaces {t("Search in all your spaces")}
</Text> </Text>
</div> </div>
{!selectedSpaceId && <IconCheck size={20} />} {!selectedSpaceId && <IconCheck size={20} />}
@ -217,8 +217,8 @@ export function SearchSpotlightFilters({
fw={500} fw={500}
> >
{contentType {contentType
? `Type: ${contentTypeOptions.find((opt) => opt.value === contentType)?.label || contentType}` ? `${t("Type")}: ${contentTypeOptions.find((opt) => opt.value === contentType)?.label || t(contentType === "page" ? "Pages" : "Attachments")}`
: "Type"} : t("Type")}
</Button> </Button>
</Menu.Target> </Menu.Target>
<Menu.Dropdown> <Menu.Dropdown>
@ -237,7 +237,7 @@ export function SearchSpotlightFilters({
<Text size="sm">{option.label}</Text> <Text size="sm">{option.label}</Text>
{option.disabled && ( {option.disabled && (
<Badge size="xs" mt={4}> <Badge size="xs" mt={4}>
Enterprise {t("Enterprise")}
</Badge> </Badge>
)} )}
</div> </div>