Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

feat: language updates

Iuliia Shnai0995a19d9392
diff --git a/components/datarooms/folders/view-tree.tsx b/components/datarooms/folders/view-tree.tsx
index cce93063..a0bb78da 100644
--- a/components/datarooms/folders/view-tree.tsx
+++ b/components/datarooms/folders/view-tree.tsx
@@ -5,6 +5,7 @@ import type { CSSProperties } from "react";
import { DataroomFolder } from "@prisma/client";
import { HomeIcon } from "lucide-react";
+import { useTranslation } from "react-i18next";
import { cn } from "@/lib/utils";
import {
@@ -195,6 +196,8 @@ const HomeLink = memo(
setFolderId: React.Dispatch<React.SetStateAction<string | null>>;
}) => {
const { usesLightText, palette } = useViewerSurfaceTheme();
+ const { t } = useTranslation("dataroom");
+ const homeLabel = t("breadcrumb.home", "Home");
return (
<li
@@ -228,8 +231,8 @@ const HomeLink = memo(
}}
>
<HomeIcon className="h-5 w-5 shrink-0" aria-hidden="true" />
- <span className="ml-2 min-w-0 flex-1 truncate" title="Home">
- Home
+ <span className="ml-2 min-w-0 flex-1 truncate" title={homeLabel}>
+ {homeLabel}
</span>
</span>
</li>
diff --git a/components/view/access-form/agreement-section.tsx b/components/view/access-form/agreement-section.tsx
index a9ffa1d2..d6e3f47f 100644
--- a/components/view/access-form/agreement-section.tsx
+++ b/components/view/access-form/agreement-section.tsx
@@ -18,6 +18,7 @@ import {
FileSignatureIcon,
PenLineIcon,
} from "lucide-react";
+import { useTranslation } from "react-i18next";
import { toast } from "sonner";
import useSWRImmutable from "swr/immutable";
@@ -192,6 +193,7 @@ export default function AgreementSection({
useCustomAccessForm?: boolean;
}) {
const theme = useAccessFormTheme();
+ const { t } = useTranslation("access-form");
const isChecked = !!data.hasConfirmedAgreement;
const visitorEmail = typeof data.email === "string" ? data.email.trim() : "";
const visitorName = typeof data.name === "string" ? data.name.trim() : "";
@@ -791,7 +793,7 @@ export default function AgreementSection({
) : (
<>
<span className="cursor-pointer" onClick={toggleAgreement}>
- I have reviewed and agree to the terms of this{" "}
+ {t("agreement.fallbackPrefix", "I have reviewed and agree to the terms of this")}{" "}
</span>
<a
href={`${agreementContent}`}
diff --git a/components/view/access-form/custom-fields-section.tsx b/components/view/access-form/custom-fields-section.tsx
index ad27aab3..89b44ab8 100644
--- a/components/view/access-form/custom-fields-section.tsx
+++ b/components/view/access-form/custom-fields-section.tsx
@@ -1,5 +1,6 @@
import { Brand, CustomField, DataroomBrand } from "@prisma/client";
import { E164Number } from "libphonenumber-js";
+import { useTranslation } from "react-i18next";
import { cn } from "@/lib/utils";
@@ -21,6 +22,7 @@ export default function CustomFieldsSection({
brand?: Partial<Brand> | Partial<DataroomBrand> | null;
}) {
const theme = useAccessFormTheme();
+ const { t } = useTranslation("access-form");
const handleInputChange = (
e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>,
@@ -94,7 +96,9 @@ export default function CustomFieldsSection({
onChange={(phoneValue) =>
handlePhoneChange(phoneValue, field.identifier!)
}
- placeholder={field.placeholder || "+1 123 456 7890"}
+ placeholder={
+ field.placeholder || t("fields.phone.placeholderDefault", "+1 123 456 7890")
+ }
defaultCountry="US"
disabled={field.disabled}
translate="no"
@@ -127,7 +131,7 @@ export default function CustomFieldsSection({
onInvalid={(e) => {
if (field.type === "URL") {
e.currentTarget.setCustomValidity(
- "Please enter a valid URL starting with https://",
+ t("fields.url.errorInvalid", "Please enter a valid URL starting with https://"),
);
}
}}
diff --git a/components/view/access-form/email-section.tsx b/components/view/access-form/email-section.tsx
index a03f964c..fa6b9b1a 100644
--- a/components/view/access-form/email-section.tsx
+++ b/components/view/access-form/email-section.tsx
@@ -8,6 +8,7 @@ import {
} from "react";
import { Brand, DataroomBrand } from "@prisma/client";
+import { useTranslation } from "react-i18next";
import { useDebouncedCallback } from "use-debounce";
import { cn } from "@/lib/utils";
@@ -33,6 +34,7 @@ export default function EmailSection({
}) {
const { email } = data;
const theme = useAccessFormTheme();
+ const { t } = useTranslation("access-form");
const [emailError, setEmailError] = useState<string | null>(null);
const [isDirty, setIsDirty] = useState(false);
@@ -53,14 +55,14 @@ export default function EmailSection({
const handleInvalid = (e: React.InvalidEvent<HTMLInputElement>) => {
e.preventDefault(); // Prevent default browser validation popup
- setEmailError("Please enter a valid email address");
+ setEmailError(t("fields.email.errorInvalid", "Please enter a valid email address"));
};
const debouncedValidation = useDebouncedCallback(
(value: string) => {
const isValid = !value || validateEmail(value);
if (isDirty && value && !isValid) {
- setEmailError("Please enter a valid email address");
+ setEmailError(t("fields.email.errorInvalid", "Please enter a valid email address"));
} else {
setEmailError(null);
}
@@ -92,7 +94,7 @@ export default function EmailSection({
const value = e.target.value;
const isValid = !value || validateEmail(value);
if (value && !isValid) {
- setEmailError("Please enter a valid email address");
+ setEmailError(t("fields.email.errorInvalid", "Please enter a valid email address"));
}
onValidationChange?.(isValid);
};
@@ -109,7 +111,7 @@ export default function EmailSection({
className="block text-sm font-medium leading-6 text-white"
style={{ color: theme.textColor }}
>
- Email address
+ {t("fields.email.label", "Email address")}
</label>
<input
name="email"
@@ -134,7 +136,7 @@ export default function EmailSection({
} as CSSProperties
}
value={email || ""}
- placeholder="Enter email"
+ placeholder={t("fields.email.placeholder", "Enter email")}
onChange={handleEmailChange}
onInvalid={handleInvalid}
onBlur={handleBlur}
@@ -155,8 +157,8 @@ export default function EmailSection({
)}
<p className="text-sm" style={{ color: theme.subtleTextColor }}>
{useCustomAccessForm
- ? "This data will be shared with the content provider."
- : "This data will be shared with the sender."}
+ ? t("fields.email.sharedWithProvider", "This data will be shared with the content provider.")
+ : t("fields.email.sharedWithSender", "This data will be shared with the sender.")}
</p>
</div>
);
diff --git a/components/view/access-form/email-verification-form.tsx b/components/view/access-form/email-verification-form.tsx
index e743186b..fef0146e 100644
--- a/components/view/access-form/email-verification-form.tsx
+++ b/components/view/access-form/email-verification-form.tsx
@@ -1,6 +1,7 @@
import { useEffect, useState } from "react";
import { Brand, DataroomBrand } from "@prisma/client";
+import { Trans, useTranslation } from "react-i18next";
import { useMediaQuery } from "@/lib/utils/use-media-query";
@@ -36,6 +37,7 @@ export default function EmailVerificationMessage({
}) {
const { isMobile } = useMediaQuery();
const theme = createAccessFormTheme(brand?.accentColor);
+ const { t } = useTranslation("access-form");
const [isResendLoading, setIsResendLoading] = useState(false);
const [delaySeconds, setDelaySeconds] = useState(60);
@@ -63,16 +65,22 @@ export default function EmailVerificationMessage({
className="mt-10 text-2xl font-bold leading-9 tracking-tight"
style={{ color: theme.textColor }}
>
- Verify your email address
+ {t("verification.title", "Verify your email address")}
</h2>
<p
className="text-pretty text-sm leading-6"
style={{ color: theme.textColor }}
>
- Enter the six digit verification code sent to{" "}
- <strong className="font-medium" title={data.email ?? ""}>
- {data.email}
- </strong>
+ <Trans
+ ns="access-form"
+ i18nKey="verification.description"
+ values={{ email: data.email ?? "" }}
+ components={{
+ email: (
+ <strong className="font-medium" title={data.email ?? ""} />
+ ),
+ }}
+ />
</p>
<form onSubmit={onSubmitHandler} translate="no">
<InputOTP
@@ -96,7 +104,7 @@ export default function EmailVerificationMessage({
{isInvalidCode && (
<p className="mb-6 mt-2 text-sm text-red-500">
- Invalid code. Please try again.
+ {t("verification.errorInvalid", "Invalid code. Please try again.")}
</p>
)}
@@ -110,7 +118,9 @@ export default function EmailVerificationMessage({
color: theme.ctaTextColor,
}}
>
- {isLoading && !isResendLoading ? "Verifying..." : "Continue"}
+ {isLoading && !isResendLoading
+ ? t("buttons.verifying", "Verifying...")
+ : t("buttons.continue", "Continue")}
</Button>
</form>
@@ -120,7 +130,7 @@ export default function EmailVerificationMessage({
className="text-xs"
style={{ color: theme.subtleTextColor }}
>
- Didn&apos;t receive the email?
+ {t("verification.noEmail", "Didn't receive the email?")}
</p>{" "}
<Button
variant="link"
@@ -140,10 +150,10 @@ export default function EmailVerificationMessage({
}}
>
{isResendLoading && !isLoading
- ? "Resending code..."
+ ? t("verification.resending", "Resending code...")
: delaySeconds > 0
- ? `Resend Code (${delaySeconds}s)`
- : "Resend Code"}
+ ? t("verification.resendIn", "Resend Code ({{seconds}}s)", { seconds: delaySeconds })
+ : t("verification.resend", "Resend Code")}
</Button>
</div>
</div>
diff --git a/components/view/access-form/index.tsx b/components/view/access-form/index.tsx
index 6a7cbe1b..45f29116 100644
--- a/components/view/access-form/index.tsx
+++ b/components/view/access-form/index.tsx
@@ -2,6 +2,7 @@ import { useEffect, useMemo, useState } from "react";
import { Brand, CustomField, DataroomBrand } from "@prisma/client";
import { ArrowUpRightIcon } from "lucide-react";
+import { useTranslation } from "react-i18next";
import { Button } from "@/components/ui/button";
@@ -82,6 +83,7 @@ export default function AccessForm({
() => createAccessFormTheme(brand?.accentColor),
[brand?.accentColor],
);
+ const { t } = useTranslation("access-form");
const isSigningAgreement =
signingProvider === "DOCUMENSO" || agreementContentType === "SIGNING";
@@ -171,7 +173,7 @@ export default function AccessForm({
>
{linkWelcomeMessage ||
(brand && "welcomeMessage" in brand && brand.welcomeMessage) ||
- "Your action is requested to continue"}
+ t("welcome.fallback", "Your action is requested to continue")}
</h1>
</div>
@@ -232,7 +234,7 @@ export default function AccessForm({
color: accessFormTheme.ctaTextColor,
}}
>
- Continue
+ {t("buttons.continue", "Continue")}
</Button>
</div>
</form>
@@ -244,7 +246,7 @@ export default function AccessForm({
className="text-center text-sm tracking-tight"
style={{ color: accessFormTheme.subtleTextColor }}
>
- This document is securely shared with you using{" "}
+ {t("footer.sharedSecurelyVia", "This document is securely shared with you using")}{" "}
<a
href="https://www.papermark.com"
target="_blank"
@@ -252,7 +254,7 @@ export default function AccessForm({
className="font-medium"
style={{ color: accessFormTheme.mutedTextColor }}
>
- Papermark
+ {t("footer.papermark", "Papermark")}
</a>
.
</p>
@@ -260,7 +262,7 @@ export default function AccessForm({
className="text-center text-sm tracking-tight"
style={{ color: accessFormTheme.subtleTextColor }}
>
- See how we protect your data in our{" "}
+ {t("footer.seeHowWeProtect", "See how we protect your data in our")}{" "}
<a
href={`${process.env.NEXT_PUBLIC_MARKETING_URL}/privacy`}
target="_blank"
@@ -268,7 +270,7 @@ export default function AccessForm({
className="inline-flex items-center gap-0.5"
style={{ color: accessFormTheme.mutedTextColor }}
>
- <span>Privacy Policy</span>
+ <span>{t("footer.privacyPolicy", "Privacy Policy")}</span>
<ArrowUpRightIcon className="h-3 w-3" />
</a>
</p>
diff --git a/components/view/access-form/name-section.tsx b/components/view/access-form/name-section.tsx
index 0f84688b..5eada783 100644
--- a/components/view/access-form/name-section.tsx
+++ b/components/view/access-form/name-section.tsx
@@ -2,6 +2,7 @@ import { Dispatch, SetStateAction, useEffect } from "react";
import type { CSSProperties } from "react";
import { Brand, DataroomBrand } from "@prisma/client";
+import { useTranslation } from "react-i18next";
import { DEFAULT_ACCESS_FORM_TYPE } from ".";
import { useAccessFormTheme } from "./access-form-theme";
@@ -19,6 +20,7 @@ export default function NameSection({
}) {
const { name } = data;
const theme = useAccessFormTheme();
+ const { t } = useTranslation("access-form");
useEffect(() => {
if (disableEditName) {
@@ -46,7 +48,7 @@ export default function NameSection({
className="block text-sm font-medium leading-6 text-white"
style={{ color: theme.textColor }}
>
- Name
+ {t("fields.name.label", "Name")}
</label>
<input
name="name"
@@ -65,7 +67,7 @@ export default function NameSection({
color: disableEditName ? theme.subtleTextColor : theme.textColor,
} as CSSProperties}
value={name || ""}
- placeholder="Enter your full name"
+ placeholder={t("fields.name.placeholder", "Enter your full name")}
onChange={handleNameChange}
disabled={disableEditName}
aria-invalid="true"
diff --git a/components/view/access-form/password-section.tsx b/components/view/access-form/password-section.tsx
index 57b31a23..4ce53bbb 100644
--- a/components/view/access-form/password-section.tsx
+++ b/components/view/access-form/password-section.tsx
@@ -2,6 +2,7 @@ import { Dispatch, SetStateAction, useState } from "react";
import type { CSSProperties } from "react";
import { Brand, DataroomBrand } from "@prisma/client";
+import { useTranslation } from "react-i18next";
import Eye from "@/components/shared/icons/eye";
import EyeOff from "@/components/shared/icons/eye-off";
@@ -20,6 +21,7 @@ export default function PasswordSection({
}) {
const { password } = data;
const theme = useAccessFormTheme();
+ const { t } = useTranslation("access-form");
const [showPassword, setShowPassword] = useState<boolean>(false);
return (
@@ -29,7 +31,7 @@ export default function PasswordSection({
className="block text-sm font-medium leading-6 text-white"
style={{ color: theme.textColor }}
>
- Passcode
+ {t("fields.password.label", "Passcode")}
</label>
<div className="relative">
<input
@@ -48,7 +50,7 @@ export default function PasswordSection({
color: theme.textColor,
} as CSSProperties}
value={password || ""}
- placeholder="Enter passcode"
+ placeholder={t("fields.password.placeholder", "Enter passcode")}
onChange={(e) => {
setData({ ...data, password: e.target.value });
}}
diff --git a/components/view/dataroom/compact-dataroom-list-header.tsx b/components/view/dataroom/compact-dataroom-list-header.tsx
index df5e9497..5d50e4af 100644
--- a/components/view/dataroom/compact-dataroom-list-header.tsx
+++ b/components/view/dataroom/compact-dataroom-list-header.tsx
@@ -1,3 +1,5 @@
+import { useTranslation } from "react-i18next";
+
import { cn } from "@/lib/utils";
import { useViewerSurfaceTheme } from "@/components/view/viewer/viewer-surface-theme";
@@ -50,6 +52,7 @@ export function CompactDataroomListHeader({
className?: string;
}) {
const { palette } = useViewerSurfaceTheme();
+ const { t } = useTranslation("dataroom");
return (
<div
@@ -73,12 +76,14 @@ export function CompactDataroomListHeader({
{showIndexColumn ? (
<div className="text-left tabular-nums opacity-80">#</div>
) : null}
- <div>Name</div>
+ <div>{t("compactList.name", "Name")}</div>
{showUpdatedColumn ? (
- <div className="text-right sm:text-right">Updated</div>
+ <div className="text-right sm:text-right">
+ {t("compactList.updated", "Updated")}
+ </div>
) : null}
{showSettingsColumn ? (
- <div className="text-center">Settings</div>
+ <div className="text-center">{t("compactList.settings", "Settings")}</div>
) : null}
</div>
);
diff --git a/components/view/dataroom/dataroom-document-view.tsx b/components/view/dataroom/dataroom-document-view.tsx
index 48c3c5bc..fb297377 100644
--- a/components/view/dataroom/dataroom-document-view.tsx
+++ b/components/view/dataroom/dataroom-document-view.tsx
@@ -5,6 +5,7 @@ import React, { useEffect, useRef, useState } from "react";
import { DataroomBrand } from "@prisma/client";
import Cookies from "js-cookie";
import { ExtendedRecordMap } from "notion-types";
+import { Trans, useTranslation } from "react-i18next";
import { toast } from "sonner";
import { useAnalytics } from "@/lib/analytics";
@@ -119,6 +120,7 @@ export default function DataroomDocumentView({
const analytics = useAnalytics();
const router = useRouter();
+ const { t } = useTranslation("access-form");
const didMount = useRef<boolean>(false);
const [submitted, setSubmitted] = useState<boolean>(false);
@@ -348,10 +350,14 @@ export default function DataroomDocumentView({
<div className="flex min-h-screen items-center justify-center bg-background px-4">
<div className="w-full max-w-sm space-y-4 rounded-lg border bg-card p-6 shadow-sm">
<div className="space-y-1">
- <h1 className="text-lg font-semibold">Verify it&apos;s you</h1>
+ <h1 className="text-lg font-semibold">{t("reauth.title", "Verify it's you")}</h1>
<p className="text-sm text-muted-foreground">
- This file was uploaded by you. To reopen it, confirm you control{" "}
- <strong>{uploadReauth.email}</strong>.
+ <Trans
+ ns="access-form"
+ i18nKey="reauth.description"
+ values={{ email: uploadReauth.email }}
+ components={{ email: <strong /> }}
+ />
</p>
</div>
<DownloadOtpVerification
@@ -360,8 +366,12 @@ export default function DataroomDocumentView({
sendOtpOnMount
description={
<p className="text-sm text-muted-foreground">
- We sent a 6-digit code to <strong>{uploadReauth.email}</strong>.
- Enter it below to access your uploaded file.
+ <Trans
+ ns="access-form"
+ i18nKey="reauth.otpDescription"
+ values={{ email: uploadReauth.email }}
+ components={{ email: <strong /> }}
+ />
</p>
}
onVerified={() => {
diff --git a/components/view/dataroom/dataroom-folder-picker.tsx b/components/view/dataroom/dataroom-folder-picker.tsx
index 3bcfe0f7..dd7a87c5 100644
--- a/components/view/dataroom/dataroom-folder-picker.tsx
+++ b/components/view/dataroom/dataroom-folder-picker.tsx
@@ -2,6 +2,7 @@ import { useMemo } from "react";
import { DataroomFolder } from "@prisma/client";
import { ChevronDownIcon } from "lucide-react";
+import { useTranslation } from "react-i18next";
import { buildNestedFolderStructure } from "@/components/datarooms/folders/utils";
import { cn } from "@/lib/utils";
@@ -102,6 +103,7 @@ export function DataroomFolderPicker({
className?: string;
}) {
const { palette } = useViewerSurfaceTheme();
+ const { t } = useTranslation("dataroom");
const nested = useMemo(() => {
const roots = buildNestedFolderStructure(folders as any) as NestedFolder[];
@@ -110,16 +112,16 @@ export function DataroomFolderPicker({
const triggerLabel = useMemo(() => {
if (folderId === null) {
- return "Home";
+ return t("folderPicker.home", "Home");
}
const current = folders.find((f) => f.id === folderId);
- if (!current) return "Home";
+ if (!current) return t("folderPicker.home", "Home");
return getHierarchicalDisplayName(
current.name,
current.hierarchicalIndex,
dataroomIndexEnabled ?? false,
);
- }, [folderId, folders, dataroomIndexEnabled]);
+ }, [folderId, folders, dataroomIndexEnabled, t]);
return (
<DropdownMenu>
@@ -163,7 +165,7 @@ export function DataroomFolderPicker({
}}
onClick={() => setFolderId(null)}
>
- Home
+ {t("folderPicker.home", "Home")}
</DropdownMenuItem>
{nested.length > 0 ? <DropdownMenuSeparator /> : null}
<FolderPickerBranch
diff --git a/components/view/dataroom/dataroom-no-banner-title.tsx b/components/view/dataroom/dataroom-no-banner-title.tsx
index 96463f2a..ea5a4ffc 100644
--- a/components/view/dataroom/dataroom-no-banner-title.tsx
+++ b/components/view/dataroom/dataroom-no-banner-title.tsx
@@ -1,4 +1,7 @@
-import { formatDate } from "@/lib/utils";
+import { useTranslation } from "react-i18next";
+
+import { formatDateLocalized } from "@/lib/i18n/format";
+import { asSupportedLocale, DEFAULT_LOCALE } from "@/lib/i18n/locales";
import { cn } from "@/lib/utils";
import { useViewerSurfaceTheme } from "@/components/view/viewer/viewer-surface-theme";
@@ -15,6 +18,8 @@ export function DataroomNoBannerTitle({
className?: string;
}) {
const { usesLightText, palette } = useViewerSurfaceTheme();
+ const { t, i18n } = useTranslation("dataroom");
+ const activeLocale = asSupportedLocale(i18n.language) ?? DEFAULT_LOCALE;
return (
<div className={cn("min-w-0", className)}>
@@ -38,7 +43,9 @@ export function DataroomNoBannerTitle({
usesLightText ? { color: palette.mutedTextColor } : undefined
}
>
- {`Last updated ${formatDate(new Date(lastUpdatedAt).toISOString())}`}
+ {t("shell.lastUpdated", "Last updated {{date}}", {
+ date: formatDateLocalized(lastUpdatedAt, activeLocale),
+ })}
</time>
) : null}
</div>
diff --git a/components/view/dataroom/dataroom-trailing-actions.tsx b/components/view/dataroom/dataroom-trailing-actions.tsx
index 41d1d779..108a2aaf 100644
--- a/components/view/dataroom/dataroom-trailing-actions.tsx
+++ b/components/view/dataroom/dataroom-trailing-actions.tsx
@@ -1,4 +1,5 @@
import { BadgeInfoIcon, Download } from "lucide-react";
+import { useTranslation } from "react-i18next";
import { cn } from "@/lib/utils";
@@ -53,6 +54,7 @@ export function DataroomTrailingActions({
onToggleConversations: () => void;
onOpenDownload: () => void;
}) {
+ const { t } = useTranslation("dataroom");
const showNavCta = !!brand?.ctaLabel && !!brand?.ctaUrl;
// "onLight" picks up the surface-aware viewer CSS vars so the button blends
@@ -76,8 +78,7 @@ export function DataroomTrailingActions({
</TooltipTrigger>
<TooltipContent>
<p className="max-w-xs text-wrap text-center">
- Skipped verification because you are a team member; no analytics
- will be collected
+ {t("trailingActions.teamMemberTooltip", "Skipped verification because you are a team member; no analytics will be collected")}
</p>
</TooltipContent>
</Tooltip>
@@ -109,11 +110,11 @@ export function DataroomTrailingActions({
"bg-gray-900 text-white hover:bg-gray-900/90",
)}
>
- View Q&A
+ {t("trailingActions.viewQA", "View Q&A")}
</Button>
)}
{allowDownload && allowBulkDownload && viewerEmail ? (
- <ButtonTooltip content="Download Dataroom">
+ <ButtonTooltip content={t("trailingActions.downloadDataroom", "Download Dataroom")}>
<Button
onClick={onOpenDownload}
className={cn("m-1 size-9 sm:size-10", chip)}
diff --git a/components/view/dataroom/document-card.tsx b/components/view/dataroom/document-card.tsx
index 33c3ec47..2c504680 100644
--- a/components/view/dataroom/document-card.tsx
+++ b/components/view/dataroom/document-card.tsx
@@ -6,9 +6,11 @@ import { Download, MoreVerticalIcon } from "lucide-react";
import { type DataroomCardLayout } from "@/ee/features/branding/lib/dataroom-viewer-layout";
import { useTheme } from "next-themes";
+import { useTranslation } from "react-i18next";
import { toast } from "sonner";
-import { timeAgo } from "@/lib/utils";
+import { timeAgoLocalized } from "@/lib/i18n/format";
+import { asSupportedLocale, DEFAULT_LOCALE } from "@/lib/i18n/locales";
import { cn } from "@/lib/utils";
import { downloadFromLinkEndpoint } from "@/lib/utils/download-document";
import { ensureFileExtension } from "@/lib/utils/get-content-type";
@@ -92,6 +94,8 @@ export default function DocumentCard({
}: DocumentsCardProps) {
const { theme, systemTheme } = useTheme();
const { palette } = useViewerSurfaceTheme();
+ const { t, i18n } = useTranslation("dataroom");
+ const activeLocale = asSupportedLocale(i18n.language) ?? DEFAULT_LOCALE;
const canDownload = document.canDownload && allowDownload;
const isLight =
@@ -133,9 +137,7 @@ export default function DocumentCard({
const handleDocumentClick = (e: React.MouseEvent) => {
if (isProcessing) {
e.preventDefault();
- toast.error(
- "Document is still processing. Please wait a moment and try again.",
- );
+ toast.error(t("navToasts.documentStillProcessing", "Document is still processing. Please wait a moment and try again."));
return;
}
@@ -155,7 +157,7 @@ export default function DocumentCard({
const downloadDocument = async () => {
if (isPreview) {
- toast.error("You cannot download dataroom document in preview mode.");
+ toast.error(t("navToasts.cannotDownloadDocPreview", "You cannot download dataroom document in preview mode."));
return;
}
@@ -169,9 +171,9 @@ export default function DocumentCard({
});
toast.promise(downloadPromise, {
- loading: "Preparing download...",
- success: "File downloaded successfully",
- error: (err) => err.message || "Failed to download file",
+ loading: t("navToasts.downloadPreparing", "Preparing download..."),
+ success: t("navToasts.downloadSuccess", "File downloaded successfully"),
+ error: (err) => err.message || t("navToasts.downloadFailed", "Failed to download file"),
});
};
@@ -199,13 +201,13 @@ export default function DocumentCard({
"text-[var(--viewer-control-icon)] border-[var(--viewer-control-border)] hover:bg-[var(--viewer-control-bg)]",
"group-hover/row:text-[var(--viewer-text)] group-hover/row:border-[var(--viewer-control-border-strong)]",
)}
- aria-label="Open menu"
+ aria-label={t("cards.openMenu", "Open menu")}
>
<MoreVerticalIcon className="h-4 w-4" />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
- <DropdownMenuLabel>Actions</DropdownMenuLabel>
+ <DropdownMenuLabel>{t("cards.actionsLabel", "Actions")}</DropdownMenuLabel>
<DropdownMenuItem
onClick={(e) => {
e.preventDefault();
@@ -214,7 +216,7 @@ export default function DocumentCard({
}}
>
<Download className="h-4 w-4" />
- Download
+ {t("cards.download", "Download")}
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
@@ -239,7 +241,7 @@ export default function DocumentCard({
onClick={handleDocumentClick}
className="absolute inset-0 z-0 cursor-pointer"
disabled={isProcessing}
- aria-label={`Open document ${document.name}`}
+ aria-label={t("cards.openDocument", "Open document {{name}}", { name: document.name })}
/>
{/* Preview area */}
@@ -277,13 +279,18 @@ export default function DocumentCard({
{displayNameNode}
{isProcessing && (
<span className="ml-2 text-xs text-[var(--viewer-muted-text)]">
- (Processing...)
+ {t("cards.processing", "(Processing...)")}
</span>
)}
</h2>
{showLastUpdated && (
<p className="truncate text-xs leading-4 text-[var(--viewer-muted-text)]">
- Updated {timeAgo(document.versions[0].updatedAt)}
+ {t("cards.updated", "Updated {{when}}", {
+ when: timeAgoLocalized(
+ document.versions[0].updatedAt,
+ activeLocale,
+ ),
+ })}
</p>
)}
</div>
@@ -335,7 +342,7 @@ export default function DocumentCard({
{displayNameNode}
{isProcessing && (
<span className="ml-2 text-xs text-[var(--viewer-muted-text)]">
- (Processing...)
+ {t("cards.processing", "(Processing...)")}
</span>
)}
</h2>
@@ -358,7 +365,9 @@ export default function DocumentCard({
onClick={handleDocumentClick}
className="absolute inset-0 z-0 cursor-pointer rounded-none border-0 bg-transparent p-0 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--viewer-control-border-strong)]"
disabled={isProcessing}
- aria-label={`Open document ${compactShowIndexColumn ? `${indexLabel} ` : ""}${document.name}`}
+ aria-label={t("cards.openDocument", {
+ name: `${compactShowIndexColumn ? `${indexLabel} ` : ""}${document.name}`,
+ })}
/>
<div className="pointer-events-none relative z-[1] flex items-center justify-between gap-3 sm:hidden">
{compactShowIndexColumn ? (
@@ -370,7 +379,10 @@ export default function DocumentCard({
<div className="flex shrink-0 items-center gap-2">
{showUpdatedCell ? (
<p className="max-w-[38vw] truncate text-xs tabular-nums text-[var(--viewer-muted-text)]">
- {timeAgo(document.versions[0].updatedAt)}
+ {timeAgoLocalized(
+ document.versions[0].updatedAt,
+ activeLocale,
+ )}
</p>
) : null}
{compactShowActionsColumn && downloadMenuButton ? (
@@ -392,7 +404,10 @@ export default function DocumentCard({
<div className="flex min-w-0 items-center gap-3">{nameBlock}</div>
{showUpdatedCell ? (
<p className="truncate text-right text-xs tabular-nums text-[var(--viewer-muted-text)]">
- {timeAgo(document.versions[0].updatedAt)}
+ {timeAgoLocalized(
+ document.versions[0].updatedAt,
+ activeLocale,
+ )}
</p>
) : null}
{actionsSlot}
@@ -412,9 +427,9 @@ export default function DocumentCard({
? "NOTION"
: (ver?.type ?? "").replace(/\./g, "").slice(0, 8).toUpperCase() ||
"FILE";
- const captionLabel = documentFolderLabel || "Documents";
+ const captionLabel = documentFolderLabel || t("cards.documents", "Documents");
const updatedLabel = showLastUpdated
- ? `Updated ${timeAgo(ver.updatedAt)}`
+ ? t("cards.updated", "Updated {{when}}", { when: timeAgoLocalized(ver.updatedAt, activeLocale) })
: null;
return (
@@ -432,7 +447,7 @@ export default function DocumentCard({
onClick={handleDocumentClick}
className="absolute inset-0 z-0 cursor-pointer"
disabled={isProcessing}
- aria-label={`Open document ${document.name}`}
+ aria-label={t("cards.openDocument", "Open document {{name}}", { name: document.name })}
/>
<div className="pointer-events-none relative z-[1] flex flex-col gap-2 md:hidden">
<div className="flex items-start justify-between gap-3 pl-7">
@@ -475,7 +490,7 @@ export default function DocumentCard({
{displayNameNode}
{isProcessing ? (
<span className="ml-2 text-xs font-normal text-[var(--viewer-muted-text)]">
- (Processing…)
+ {t("cards.processing", "(Processing...)")}
</span>
) : null}
</h2>
@@ -536,7 +551,7 @@ export default function DocumentCard({
{displayNameNode}
{isProcessing && (
<span className="ml-2 text-xs text-[var(--viewer-muted-text)]">
- (Processing...)
+ {t("cards.processing", "(Processing...)")}
</span>
)}
</h2>
@@ -544,7 +559,12 @@ export default function DocumentCard({
{showLastUpdated && (
<div className="mt-1 flex items-center space-x-1 text-xs leading-5 text-[var(--viewer-muted-text)]">
<p className="truncate">
- Updated {timeAgo(document.versions[0].updatedAt)}
+ {t("cards.updated", "Updated {{when}}", {
+ when: timeAgoLocalized(
+ document.versions[0].updatedAt,
+ activeLocale,
+ ),
+ })}
</p>
</div>
)}
diff --git a/components/view/dataroom/document-upload-modal.tsx b/components/view/dataroom/document-upload-modal.tsx
index 4ef6929e..f27bc0bb 100644
--- a/components/view/dataroom/document-upload-modal.tsx
+++ b/components/view/dataroom/document-upload-modal.tsx
@@ -6,6 +6,7 @@ import {
PlusIcon,
UploadIcon,
} from "lucide-react";
+import { useTranslation } from "react-i18next";
import { cn } from "@/lib/utils";
@@ -68,6 +69,7 @@ export function DocumentUploadModal({
* to the surrounding surface (e.g. dark viewer background). */
triggerClassName?: string;
}) {
+ const { t } = useTranslation("dataroom");
const [isOpen, setIsOpen] = useState(false);
const [uploadSuccess, setUploadSuccess] = useState(false);
@@ -132,10 +134,10 @@ export function DocumentUploadModal({
"group flex items-center justify-start gap-x-3 px-3 text-left",
triggerClassName,
)}
- title="Add Document"
+ title={t("upload.trigger", "Add Document")}
>
<PlusIcon className="h-5 w-5 shrink-0" aria-hidden="true" />
- <span>Add Document</span>
+ <span>{t("upload.trigger", "Add Document")}</span>
</Button>
<Dialog open={isOpen} onOpenChange={handleOpenChange}>
@@ -143,25 +145,24 @@ export function DocumentUploadModal({
<DialogHeader className="border-b border-gray-100 bg-gray-50 px-6 py-5 dark:border-gray-800 dark:bg-gray-900">
<DialogTitle className="flex items-center gap-2 text-lg font-semibold">
<UploadIcon className="h-5 w-5 text-muted-foreground" />
- Upload Document to Dataroom
+ {t("upload.title", "Upload Document to Dataroom")}
</DialogTitle>
<p className="mt-1 text-sm text-muted-foreground">
- Your document will appear immediately in the dataroom and will be
- processed in the background.
+ {t("upload.description", "Your document will appear immediately in the dataroom and will be processed in the background.")}
</p>
{showSelect ? (
<div className="mt-3 space-y-1.5">
<label className="flex items-center gap-1.5 text-xs font-medium text-muted-foreground">
<FolderIcon className="h-3.5 w-3.5" />
- Destination folder
+ {t("upload.destinationLabel", "Destination folder")}
</label>
<Select
value={destinationId}
onValueChange={(value) => setDestinationId(value)}
>
<SelectTrigger className="h-9 w-full">
- <SelectValue placeholder="Select destination folder" />
+ <SelectValue placeholder={t("upload.selectDestination", "Select destination folder")} />
</SelectTrigger>
<SelectContent>
{allowedFolders!.map((folder) => (
@@ -181,13 +182,13 @@ export function DocumentUploadModal({
<div className="mt-2 flex items-center gap-1.5 text-xs text-muted-foreground">
<FolderIcon className="h-3.5 w-3.5" />
<span>
- Uploading to:{" "}
+ {t("upload.uploadingTo", "Uploading to:")}{" "}
<span className="font-medium text-foreground">
{destinationName}
</span>
{showReadOnlyRestriction ? (
<span className="ml-1 text-muted-foreground">
- (set by the dataroom owner)
+ {t("upload.setByOwner", "(set by the dataroom owner)")}
</span>
) : null}
</span>
@@ -200,10 +201,10 @@ export function DocumentUploadModal({
<div className="flex flex-col items-center justify-center py-8">
<CheckCircle2 className="h-12 w-12 text-green-500" />
<p className="mt-3 text-sm font-medium text-foreground">
- Document uploaded successfully!
+ {t("upload.success", "Document uploaded successfully!")}
</p>
<p className="mt-1 text-xs text-muted-foreground">
- Your document is now visible in the dataroom.
+ {t("upload.successDescription", "Your document is now visible in the dataroom.")}
</p>
</div>
) : (
diff --git a/components/view/dataroom/download-otp-verification.tsx b/components/view/dataroom/download-otp-verification.tsx
index b17cf5f6..a236a4f3 100644
--- a/components/view/dataroom/download-otp-verification.tsx
+++ b/components/view/dataroom/download-otp-verification.tsx
@@ -2,6 +2,8 @@
import { ReactNode, useCallback, useEffect, useRef, useState } from "react";
+import { Trans, useTranslation } from "react-i18next";
+
import {
InputOTP,
InputOTPGroup,
@@ -41,6 +43,7 @@ export function DownloadOtpVerification({
sendOtpOnMount = false,
description,
}: DownloadOtpVerificationProps) {
+ const { t } = useTranslation("dataroom");
const [code, setCode] = useState<string | null>(null);
const [isLoading, setIsLoading] = useState(false);
const [isSending, setIsSending] = useState(false);
@@ -62,14 +65,14 @@ export function DownloadOtpVerification({
});
const data = await res.json().catch(() => ({}));
if (!res.ok) {
- setError(data.error ?? "Failed to send code");
+ setError(data.error ?? t("downloadOtp.sendFailed", "Failed to send code"));
return;
}
setResendCooldown(RESEND_COOLDOWN_SECONDS);
} finally {
setIsSending(false);
}
- }, [linkId, viewId, email]);
+ }, [linkId, viewId, email, t]);
useEffect(() => {
if (!sendOtpOnMount || hasSentOnMountRef.current) return;
@@ -93,7 +96,7 @@ export function DownloadOtpVerification({
});
const data = await res.json().catch(() => ({}));
if (!res.ok) {
- setError(data.error ?? "Invalid code");
+ setError(data.error ?? t("downloadOtp.invalidCode", "Invalid code"));
return;
}
onVerified();
@@ -115,8 +118,12 @@ export function DownloadOtpVerification({
<form onSubmit={verifyOtp} className="space-y-4">
{description ?? (
<p className="text-sm text-muted-foreground">
- We sent a 6-digit code to <strong>{email}</strong>. Enter it below to
- verify and receive download notifications.
+ <Trans
+ ns="dataroom"
+ i18nKey="downloadOtp.defaultDescription"
+ values={{ email }}
+ components={{ email: <strong /> }}
+ />
</p>
)}
<InputOTP
@@ -144,11 +151,11 @@ export function DownloadOtpVerification({
type="submit"
disabled={!code || code.length !== 6 || isLoading}
>
- {isLoading ? "Verifying..." : "Verify"}
+ {isLoading ? t("downloadOtp.verifying", "Verifying...") : t("downloadOtp.verify", "Verify")}
</Button>
</div>
<p className="text-sm text-muted-foreground">
- Didn&apos;t receive the email?{" "}
+ {t("downloadOtp.noEmail", "Didn't receive the email?")}{" "}
<Button
type="button"
variant="link"
@@ -157,10 +164,10 @@ export function DownloadOtpVerification({
onClick={sendOtp}
>
{isSending
- ? "Sending..."
+ ? t("downloadOtp.resending", "Sending...")
: resendCooldown > 0
- ? `Resend code (${resendCooldown}s)`
- : "Resend code"}
+ ? t("downloadOtp.resendIn", "Resend code ({{seconds}}s)", { seconds: resendCooldown })
+ : t("downloadOtp.resend", "Resend code")}
</Button>
</p>
</form>
diff --git a/components/view/dataroom/downloads-panel.tsx b/components/view/dataroom/downloads-panel.tsx
index ec67cd2e..cf4e4289 100644
--- a/components/view/dataroom/downloads-panel.tsx
+++ b/components/view/dataroom/downloads-panel.tsx
@@ -9,6 +9,8 @@ import {
FolderOpen,
Loader2,
} from "lucide-react";
+import type { TFunction } from "i18next";
+import { useTranslation } from "react-i18next";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
@@ -30,29 +32,34 @@ type Job = {
expiresAt?: string;
};
-function getJobStatusLabel(job: Job): string {
- if (job.status === "COMPLETED") return "Ready";
- if (job.status === "FAILED") return job.error || "Failed";
+function getJobStatusLabel(job: Job, t: TFunction<"dataroom">): string {
+ if (job.status === "COMPLETED") return t("downloadsPanel.ready", "Ready");
+ if (job.status === "FAILED")
+ return job.error || t("downloadsPanel.failedFallback", "Failed");
if (job.status === "PROCESSING") {
if (job.totalFiles > 0) {
- return `${job.processedFiles} / ${job.totalFiles} files`;
+ return t("downloadsPanel.filesCount", "{{processed}} / {{total}} files", {
+ processed: job.processedFiles,
+ total: job.totalFiles,
+ });
}
- return "Creating ZIP...";
+ return t("downloadsPanel.creatingZip", "Creating ZIP...");
}
// PENDING — break out the sub-phase so users see meaningful progress.
switch (job.phase) {
case "VALIDATING":
- return "Verifying access...";
+ return t("downloadsPanel.verifying", "Verifying access...");
case "BUILDING":
- return "Building file list...";
+ return t("downloadsPanel.buildingFileList", "Building file list...");
default:
- return "Preparing...";
+ return t("downloadsPanel.preparing", "Preparing...");
}
}
const POLL_INTERVAL_MS = 5_000;
export function DownloadsPanel({ linkId }: { linkId: string }) {
+ const { t } = useTranslation("dataroom");
const [loading, setLoading] = useState(true);
const [hasSession, setHasSession] = useState<boolean | null>(null);
const [email, setEmail] = useState("");
@@ -181,23 +188,21 @@ export function DownloadsPanel({ linkId }: { linkId: string }) {
});
const data = await res.json().catch(() => ({}));
if (res.status === 404) {
- setError(
- "No access found for this email. Use the email you used to open the dataroom.",
- );
+ setError(t("downloadsPage.errors.noAccess", "No access found for this email. Use the email you used to open the dataroom."));
return;
}
if (res.status === 429) {
- setError(data.error ?? "Too many requests. Please try again later.");
+ setError(data.error ?? t("downloadsPage.errors.rateLimit", "Too many requests. Please try again later."));
return;
}
if (!res.ok) {
- setError(data.error ?? "Something went wrong.");
+ setError(data.error ?? t("downloadsPage.errors.generic", "Something went wrong."));
return;
}
// OTP sent successfully — move to verification step
setStep("otp");
} catch {
- setError("Something went wrong.");
+ setError(t("downloadsPage.errors.generic", "Something went wrong."));
} finally {
setEmailSubmitting(false);
}
@@ -246,15 +251,18 @@ export function DownloadsPanel({ linkId }: { linkId: string }) {
if (!expiresAt) return "";
const exp = new Date(expiresAt);
const now = new Date();
- if (exp.getTime() <= now.getTime()) return "expired";
+ if (exp.getTime() <= now.getTime()) return t("downloadsPage.expired", "expired");
const d = Math.floor(
(exp.getTime() - now.getTime()) / (1000 * 60 * 60 * 24),
);
- if (d > 0) return `${d} day${d > 1 ? "s" : ""}`;
+ // i18next handles `_one` vs `_other` plural keys via the `count` arg.
+ if (d > 0) return t("download.expiresDays", "{{count}} days", { count: d });
const h = Math.floor(
(exp.getTime() - now.getTime()) / (1000 * 60 * 60),
);
- return h > 0 ? `${h} hour${h > 1 ? "s" : ""}` : "soon";
+ return h > 0
+ ? t("download.expiresHours", "{{count}} hours", { count: h })
+ : t("download.expiresSoon", "soon");
};
const getJobTitle = (job: Job) => {
@@ -265,7 +273,7 @@ export function DownloadsPanel({ linkId }: { linkId: string }) {
<span className="text-muted-foreground">
{" "}
— <FolderOpen className="mr-0.5 inline h-3.5 w-3" />
- Folder: {job.folderName}
+ {t("downloadsPage.jobFolderPrefix", "Folder:")} {job.folderName}
</span>
</>
);
@@ -274,7 +282,10 @@ export function DownloadsPanel({ linkId }: { linkId: string }) {
<>
<span className="font-medium">{job.dataroomName}</span>
{job.type === "bulk" && (
- <span className="text-muted-foreground"> — Full dataroom</span>
+ <span className="text-muted-foreground">
+ {" "}
+ — {t("downloadsPage.jobFullDataroom", "Full dataroom")}
+ </span>
)}
</>
);
@@ -293,21 +304,25 @@ export function DownloadsPanel({ linkId }: { linkId: string }) {
if (step === "email") {
return (
<div className="mx-auto flex min-h-screen max-w-sm flex-col justify-center px-4">
- <h1 className="text-xl font-semibold">View your downloads</h1>
+ <h1 className="text-xl font-semibold">
+ {t("downloadsPage.emailHeading", "View your downloads")}
+ </h1>
<p className="mt-2 text-sm text-muted-foreground">
- Enter the email you used to access this dataroom.
+ {t("downloadsPage.emailDescription", "Enter the email you used to access this dataroom.")}
</p>
<form onSubmit={handleEmailSubmit} className="mt-6 space-y-4">
<Input
type="email"
- placeholder="[email protected]"
+ placeholder={t("downloadsPage.emailPlaceholder", "[email protected]")}
value={email}
onChange={(e) => setEmail(e.target.value)}
required
/>
{error && <p className="text-sm text-destructive">{error}</p>}
<Button type="submit" className="w-full" disabled={emailSubmitting}>
- {emailSubmitting ? "Sending code..." : "Continue"}
+ {emailSubmitting
+ ? t("downloadsPage.sendingCode", "Sending code...")
+ : t("downloadsPage.continueButton", "Continue")}
</Button>
</form>
</div>
@@ -317,7 +332,9 @@ export function DownloadsPanel({ linkId }: { linkId: string }) {
if (step === "otp") {
return (
<div className="mx-auto flex min-h-screen max-w-sm flex-col justify-center px-4">
- <h1 className="text-xl font-semibold">Verify your email</h1>
+ <h1 className="text-xl font-semibold">
+ {t("downloadsPage.verifyEmailHeading", "Verify your email")}
+ </h1>
<DownloadOtpVerification
linkId={linkId}
email={email.trim()}
@@ -329,9 +346,9 @@ export function DownloadsPanel({ linkId }: { linkId: string }) {
return (
<div className="mx-auto min-h-screen max-w-2xl px-4 py-10">
- <h1 className="text-xl font-semibold">Your downloads</h1>
+ <h1 className="text-xl font-semibold">{t("downloadsPage.title", "Your downloads")}</h1>
<p className="mt-1 text-sm text-muted-foreground">
- Download your prepared files below. Links expire after 3 days.
+ {t("downloadsPage.description", "Download your prepared files below. Links expire after 3 days.")}
</p>
{jobsLoading && jobs.length === 0 ? (
@@ -340,8 +357,7 @@ export function DownloadsPanel({ linkId }: { linkId: string }) {
</div>
) : jobs.length === 0 ? (
<p className="mt-8 text-sm text-muted-foreground">
- You have no downloads yet. Start a download from the dataroom to see
- it here.
+ {t("downloadsPage.empty", "You have no downloads yet. Start a download from the dataroom to see it here.")}
</p>
) : (
<ul className="mt-6 space-y-4">
@@ -367,7 +383,7 @@ export function DownloadsPanel({ linkId }: { linkId: string }) {
<FileArchive className="h-4 w-4 shrink-0 text-muted-foreground" />
)}
<span className="text-muted-foreground">
- {getJobStatusLabel(job)}
+ {getJobStatusLabel(job, t)}
</span>
</div>
{job.status === "COMPLETED" &&
@@ -380,7 +396,7 @@ export function DownloadsPanel({ linkId }: { linkId: string }) {
onClick={() => handleDownload(job.downloadUrls![0])}
>
<Download className="mr-1 h-3 w-3" />
- Download
+ {t("cards.download", "Download")}
</Button>
) : (
<>
@@ -396,12 +412,14 @@ export function DownloadsPanel({ linkId }: { linkId: string }) {
{expandedJobId === job.id ? (
<>
<ChevronUp className="mr-1 h-3 w-3" />
- Hide parts
+ {t("downloadsPage.hideParts", "Hide parts")}
</>
) : (
<>
<ChevronDown className="mr-1 h-3 w-3" />
- Show parts ({job.downloadUrls!.length})
+ {t("downloadsPage.showParts", "Show parts ({{count}})", {
+ count: job.downloadUrls!.length,
+ })}
</>
)}
</Button>
@@ -418,18 +436,22 @@ export function DownloadsPanel({ linkId }: { linkId: string }) {
{downloadProgress?.jobId === job.id ? (
<>
<Loader2 className="mr-2 h-3 w-3 animate-spin" />
- Downloading {downloadProgress.current} of{" "}
- {downloadProgress.total}...
+ {t("download.downloadingProgress", "Downloading {{current}} of {{total}}...", {
+ current: downloadProgress.current,
+ total: downloadProgress.total,
+ })}
</>
) : (
<>
<Download className="mr-2 h-3 w-3" />
- Download all ({job.downloadUrls!.length} parts)
+ {t("download.downloadAll", "Download all ({{count}} parts)", {
+ count: job.downloadUrls!.length,
+ })}
</>
)}
</Button>
<p className="text-xs text-muted-foreground">
- Or download individually:
+ {t("downloadsPage.orIndividual", "Or download individually:")}
</p>
<div className="max-h-32 space-y-1 overflow-y-auto">
{job.downloadUrls!.map((url, i) => (
@@ -441,7 +463,10 @@ export function DownloadsPanel({ linkId }: { linkId: string }) {
onClick={() => handleDownload(url)}
>
<FileArchive className="mr-2 h-3 w-3" />
- Part {i + 1} of {job.downloadUrls!.length}
+ {t("downloadsPage.partOf", "Part {{index}} of {{total}}", {
+ index: i + 1,
+ total: job.downloadUrls!.length,
+ })}
</Button>
))}
</div>
@@ -451,7 +476,9 @@ export function DownloadsPanel({ linkId }: { linkId: string }) {
)}
{job.expiresAt && (
<span className="text-xs text-muted-foreground">
- Expires {formatExpiration(job.expiresAt)}
+ {t("downloadsPage.expiresPrefix", "Expires {{time}}", {
+ time: formatExpiration(job.expiresAt),
+ })}
</span>
)}
</div>
diff --git a/components/view/dataroom/folder-card.tsx b/components/view/dataroom/folder-card.tsx
index a36b206d..d4e125e9 100644
--- a/components/view/dataroom/folder-card.tsx
+++ b/components/view/dataroom/folder-card.tsx
@@ -5,10 +5,13 @@ import { DataroomFolder } from "@prisma/client";
import { Download, MoreVerticalIcon } from "lucide-react";
import { type DataroomCardLayout } from "@/ee/features/branding/lib/dataroom-viewer-layout";
+import { useTranslation } from "react-i18next";
import { toast } from "sonner";
import { getFolderColorClasses, getFolderIcon } from "@/lib/constants/folder-constants";
-import { cn, timeAgo } from "@/lib/utils";
+import { timeAgoLocalized } from "@/lib/i18n/format";
+import { asSupportedLocale, DEFAULT_LOCALE } from "@/lib/i18n/locales";
+import { cn } from "@/lib/utils";
import { HIERARCHICAL_DISPLAY_STYLE } from "@/lib/utils/hierarchical-display";
import { Button } from "@/components/ui/button";
@@ -61,6 +64,8 @@ export default function FolderCard({
}: FolderCardProps) {
const [open, setOpen] = useState(false);
const { palette } = useViewerSurfaceTheme();
+ const { t, i18n } = useTranslation("dataroom");
+ const activeLocale = asSupportedLocale(i18n.language) ?? DEFAULT_LOCALE;
const plainTitle =
layout === "COMPACT" || (layout === "LIST" && editorialList);
@@ -91,11 +96,11 @@ export default function FolderCard({
);
const openFolderDownloadModal = () => {
if (!allowDownload) {
- toast.error("Downloading folders is not allowed.");
+ toast.error(t("navToasts.foldersNotAllowed", "Downloading folders is not allowed."));
return;
}
if (isPreview) {
- toast.error("You cannot download dataroom folders in preview mode.");
+ toast.error(t("navToasts.cannotDownloadFolderPreview", "You cannot download dataroom folders in preview mode."));
return;
}
@@ -133,13 +138,13 @@ export default function FolderCard({
"text-[var(--viewer-control-icon)] border-[var(--viewer-control-border)] hover:bg-[var(--viewer-control-bg)]",
"group-hover/row:text-[var(--viewer-text)] group-hover/row:border-[var(--viewer-control-border-strong)]",
)}
- aria-label="Open menu"
+ aria-label={t("cards.openMenu", "Open menu")}
>
<MoreVerticalIcon className="h-4 w-4" />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
- <DropdownMenuLabel>Actions</DropdownMenuLabel>
+ <DropdownMenuLabel>{t("cards.actionsLabel", "Actions")}</DropdownMenuLabel>
<DropdownMenuItem
onClick={(e) => {
e.preventDefault();
@@ -150,7 +155,7 @@ export default function FolderCard({
disabled={isPreview}
>
<Download className="h-4 w-4" />
- Download
+ {t("cards.download", "Download")}
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
@@ -177,7 +182,7 @@ export default function FolderCard({
<button
onClick={() => setFolderId(folder.id)}
className="absolute inset-0 z-0 cursor-pointer"
- aria-label={`Open folder ${folder.name}`}
+ aria-label={t("cards.openFolder", "Open folder {{name}}", { name: folder.name })}
/>
<div className="pointer-events-none relative flex min-w-0 flex-1 items-center gap-2">
{!hideFolderIcons && colorClasses ? (
@@ -195,7 +200,9 @@ export default function FolderCard({
</h2>
{showLastUpdated && (
<p className="truncate text-xs leading-4 text-[var(--viewer-muted-text)]">
- Updated {timeAgo(folder.updatedAt)}
+ {t("cards.updated", "Updated {{when}}", {
+ when: timeAgoLocalized(folder.updatedAt, activeLocale),
+ })}
</p>
)}
</div>
@@ -264,7 +271,9 @@ export default function FolderCard({
type="button"
onClick={() => setFolderId(folder.id)}
className="absolute inset-0 z-0 cursor-pointer rounded-none border-0 bg-transparent p-0 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--viewer-control-border-strong)]"
- aria-label={`Open folder ${compactShowIndexColumn ? `${indexLabel} ` : ""}${folder.name}`}
+ aria-label={t("cards.openFolder", {
+ name: `${compactShowIndexColumn ? `${indexLabel} ` : ""}${folder.name}`,
+ })}
/>
<div className="pointer-events-none relative z-[1] flex items-center justify-between gap-3 sm:hidden">
{compactShowIndexColumn ? (
@@ -276,7 +285,7 @@ export default function FolderCard({
<div className="flex shrink-0 items-center gap-2">
{showUpdatedCell ? (
<p className="max-w-[38vw] truncate text-xs tabular-nums text-[var(--viewer-muted-text)]">
- {timeAgo(folder.updatedAt)}
+ {timeAgoLocalized(folder.updatedAt, activeLocale)}
</p>
) : null}
{compactShowActionsColumn && downloadMenuButton ? (
@@ -298,7 +307,7 @@ export default function FolderCard({
<div className="flex min-w-0 items-center gap-3">{nameBlock}</div>
{showUpdatedCell ? (
<p className="truncate text-right text-xs tabular-nums text-[var(--viewer-muted-text)]">
- {timeAgo(folder.updatedAt)}
+ {timeAgoLocalized(folder.updatedAt, activeLocale)}
</p>
) : null}
{actionsSlot}
@@ -312,7 +321,9 @@ export default function FolderCard({
folder.hierarchicalIndex?.trim() ||
String(editorialIndex + 1).padStart(2, "0");
const updatedLabel = showLastUpdated
- ? `Updated ${timeAgo(folder.updatedAt)}`
+ ? t("cards.updated", "Updated {{when}}", {
+ when: timeAgoLocalized(folder.updatedAt, activeLocale),
+ })
: null;
return (
@@ -328,7 +339,7 @@ export default function FolderCard({
<button
onClick={() => setFolderId(folder.id)}
className="absolute inset-0 z-0 cursor-pointer"
- aria-label={`Open folder ${folder.name}`}
+ aria-label={t("cards.openFolder", "Open folder {{name}}", { name: folder.name })}
/>
<div className="pointer-events-none relative z-[1] flex flex-col gap-2 md:hidden">
<div className="flex items-start justify-between gap-3 pl-7">
@@ -343,12 +354,12 @@ export default function FolderCard({
{displayNameNode}
</h2>
<p className="mt-1 text-xs text-[var(--viewer-muted-text)]">
- Folder
+ {t("cards.folder", "Folder")}
</p>
</div>
<div className="flex shrink-0 flex-col items-end gap-1 text-[11px] text-[var(--viewer-muted-text)]">
{updatedLabel ? <span>{updatedLabel}</span> : null}
- <span className="font-medium">FOLDER</span>
+ <span className="font-medium">{t("cards.folderBadge", "FOLDER")}</span>
</div>
</div>
{downloadMenuButton ? (
@@ -370,14 +381,14 @@ export default function FolderCard({
{displayNameNode}
</h2>
<p className="mt-0.5 truncate text-xs text-[var(--viewer-muted-text)]">
- Folder
+ {t("cards.folder", "Folder")}
</p>
</div>
<span className="truncate text-right text-xs tabular-nums text-[var(--viewer-muted-text)]">
{updatedLabel ?? "—"}
</span>
<span className="text-center text-[11px] font-medium uppercase tracking-wide text-[var(--viewer-muted-text)]">
- FOLDER
+ {t("cards.folderBadge", "FOLDER")}
</span>
<div className="pointer-events-auto flex justify-end">
{downloadMenuButton ?? (
@@ -424,7 +435,11 @@ export default function FolderCard({
</div>
{showLastUpdated && (
<div className="mt-1 flex items-center space-x-1 text-xs leading-5 text-[var(--viewer-muted-text)]">
- <p className="truncate">Updated {timeAgo(folder.updatedAt)}</p>
+ <p className="truncate">
+ {t("cards.updated", "Updated {{when}}", {
+ when: timeAgoLocalized(folder.updatedAt, activeLocale),
+ })}
+ </p>
</div>
)}
</div>
diff --git a/components/view/dataroom/index-file-dialog.tsx b/components/view/dataroom/index-file-dialog.tsx
index ba1c338a..d2b32f36 100644
--- a/components/view/dataroom/index-file-dialog.tsx
+++ b/components/view/dataroom/index-file-dialog.tsx
@@ -6,6 +6,7 @@ import {
FileSpreadsheet,
FileText,
} from "lucide-react";
+import { useTranslation } from "react-i18next";
import { toast } from "sonner";
import { useAnalytics } from "@/lib/analytics";
@@ -43,6 +44,7 @@ export default function IndexFileDialog({
viewerId,
triggerClassName,
}: IndexFileDialogProps) {
+ const { t } = useTranslation("dataroom");
const [isLoading, setIsLoading] = useState(false);
const [selectedFormat, setSelectedFormat] =
useState<IndexFileFormat>("excel");
@@ -51,7 +53,7 @@ export default function IndexFileDialog({
const handleGenerateIndex = async () => {
if (!linkId) {
- toast.error("Something went wrong. Please try again.");
+ toast.error(t("indexFile.genericError", "Something went wrong. Please try again."));
return;
}
@@ -74,7 +76,7 @@ export default function IndexFileDialog({
if (!response.ok) {
const errorData = await response.json();
- throw new Error(errorData.error || "Failed to generate index");
+ throw new Error(errorData.error || t("indexFile.errorToast", "Failed to generate index"));
}
analytics.identify(viewerEmail);
analytics.capture("Generated Index File by visitor", {
@@ -108,12 +110,12 @@ export default function IndexFileDialog({
document.body.removeChild(link);
}, 100);
- toast.success("Index file generated successfully");
+ toast.success(t("indexFile.successToast", "Index file generated successfully"));
setIsOpen(false);
} catch (error) {
console.error("Error generating index:", error);
toast.error(
- error instanceof Error ? error.message : "Failed to generate index",
+ error instanceof Error ? error.message : t("indexFile.errorToast", "Failed to generate index"),
);
} finally {
setIsLoading(false);
@@ -130,19 +132,19 @@ export default function IndexFileDialog({
className={triggerClassName}
>
<FileSlidersIcon />
- Generate Index File
+ {t("indexFile.trigger", "Generate Index File")}
</Button>
</DialogTrigger>
<DialogContent className="sm:max-w-md">
<DialogHeader>
- <DialogTitle>Generate Dataroom Index File</DialogTitle>
- <DialogDescription>
- Select a format to generate the index file.
- </DialogDescription>
+ <DialogTitle>{t("indexFile.title", "Generate Dataroom Index File")}</DialogTitle>
+ <DialogDescription>{t("indexFile.description", "Select a format to generate the index file.")}</DialogDescription>
</DialogHeader>
<div className="grid gap-4 py-4">
<div className="space-y-2">
- <h4 className="text-sm font-medium">Select Format</h4>
+ <h4 className="text-sm font-medium">
+ {t("indexFile.selectFormat", "Select Format")}
+ </h4>
<div className="grid grid-cols-2 gap-2">
<Button
variant={selectedFormat === "excel" ? "default" : "outline"}
@@ -181,7 +183,7 @@ export default function IndexFileDialog({
onClick={handleGenerateIndex}
disabled={isLoading || disabled}
>
- {isLoading ? "Generating..." : "Generate"}
+ {isLoading ? t("indexFile.generating", "Generating...") : t("indexFile.generate", "Generate")}
</Button>
</DialogFooter>
</DialogContent>
diff --git a/components/view/dataroom/introduction-modal.tsx b/components/view/dataroom/introduction-modal.tsx
index f2589e3c..39f5097c 100644
--- a/components/view/dataroom/introduction-modal.tsx
+++ b/components/view/dataroom/introduction-modal.tsx
@@ -9,6 +9,7 @@ import React, {
} from "react";
import { InfoIcon } from "lucide-react";
+import { useTranslation } from "react-i18next";
import { Button } from "@/components/ui/button";
import {
@@ -53,6 +54,7 @@ export const useIntroduction = () => useContext(IntroductionContext);
// Info button component to be placed inline (e.g., next to dataroom name)
export function IntroductionInfoButton() {
const { openIntroduction, hasIntroduction, hasSeen } = useIntroduction();
+ const { t } = useTranslation("dataroom");
if (!hasIntroduction) return null;
@@ -67,13 +69,13 @@ export function IntroductionInfoButton() {
? "text-[var(--viewer-muted-text)] hover:bg-[var(--viewer-panel-bg-hover)] hover:text-[var(--viewer-text)]"
: "border-2 border-[var(--viewer-control-border-strong)] text-[var(--viewer-text)] hover:bg-[var(--viewer-panel-bg-hover)]"
}`}
- aria-label="View introduction"
+ aria-label={t("intro.viewIntroduction", "View introduction")}
>
<InfoIcon className="h-5 w-5" />
</button>
</TooltipTrigger>
<TooltipContent side="left">
- <p>View introduction</p>
+ <p>{t("intro.viewIntroduction", "View introduction")}</p>
</TooltipContent>
</Tooltip>
</TooltipProvider>
@@ -236,6 +238,7 @@ export function IntroductionProvider({
viewerId,
children,
}: IntroductionProviderProps) {
+ const { t } = useTranslation("dataroom");
const [isOpen, setIsOpen] = useState(false);
const [hasSeen, setHasSeen] = useState(true); // Default to true, will be updated on mount
@@ -294,7 +297,9 @@ export function IntroductionProvider({
<DialogContent className="max-h-[85vh] max-w-2xl overflow-hidden border-0 p-0 shadow-2xl sm:max-w-xl sm:rounded-2xl md:max-w-2xl">
<DialogHeader className="border-b border-gray-100 bg-gray-50 px-6 py-6 dark:border-gray-800 dark:bg-gray-900">
<DialogTitle className="text-xl font-semibold">
- Welcome to {dataroom.name || "Data Room"}
+ {t("intro.title", "Welcome to {{name}}", {
+ name: dataroom.name || t("intro.defaultName", "Data Room"),
+ })}
</DialogTitle>
</DialogHeader>
<ScrollArea className="max-h-[60vh] px-6 py-5">
@@ -304,7 +309,7 @@ export function IntroductionProvider({
</ScrollArea>
<div className="flex justify-end border-t border-gray-100 bg-gray-50 px-6 py-4 dark:border-gray-800 dark:bg-gray-900">
<Button onClick={handleClose} size="lg">
- Continue to Data Room
+ {t("intro.continueButton", "Continue to Data Room")}
</Button>
</div>
</DialogContent>
diff --git a/components/view/dataroom/nav-dataroom.tsx b/components/view/dataroom/nav-dataroom.tsx
index 293a9cec..f18eeb97 100644
--- a/components/view/dataroom/nav-dataroom.tsx
+++ b/components/view/dataroom/nav-dataroom.tsx
@@ -3,6 +3,7 @@ import Link from "next/link";
import React, { useEffect, useMemo, useState } from "react";
import { DataroomBrand } from "@prisma/client";
+import { useTranslation } from "react-i18next";
import { toast } from "sonner";
import {
@@ -13,7 +14,9 @@ import { RequestListSheet } from "@/ee/features/request-lists/components/viewer/
import { VIEWER_TOGGLE_REQUEST_LIST_EVENT } from "@/ee/features/request-lists/lib/events";
import { useViewerRequestList } from "@/ee/features/request-lists/lib/swr/use-viewer-request-list";
-import { cn, formatDate } from "@/lib/utils";
+import { formatDateLocalized } from "@/lib/i18n/format";
+import { asSupportedLocale, DEFAULT_LOCALE } from "@/lib/i18n/locales";
+import { cn } from "@/lib/utils";
import { useLogoTone } from "@/ee/features/branding/lib/use-logo-tone";
import { classifyDataroomBanner } from "@/ee/features/branding/lib/dataroom-banner";
@@ -129,6 +132,11 @@ export default function DataroomNav({
* header so it matches the body when accent color is enabled. */
surfaceBackgroundColor?: string | null;
}) {
+ const { t, i18n } = useTranslation("dataroom");
+ // Lock the formatter to the active i18next language so dates re-render when
+ // the visitor uses the language switcher without forcing a full page reload.
+ const activeLocale =
+ asSupportedLocale(i18n.language) ?? DEFAULT_LOCALE;
const [showConversations, setShowConversations] = useState<boolean>(false);
const [showRequestList, setShowRequestList] = useState<boolean>(false);
const [showDownloadModal, setShowDownloadModal] = useState<boolean>(false);
@@ -207,12 +215,12 @@ export default function DataroomNav({
const openDownloadModal = () => {
if (isPreview) {
- toast.error("You cannot download datarooms in preview mode.");
+ toast.error(t("navToasts.cannotDownloadPreview", "You cannot download datarooms in preview mode."));
return;
}
if (!allowDownload || !allowBulkDownload) return;
if (!viewerEmail) {
- toast.error("Enter your email in the dataroom to download.");
+ toast.error(t("navToasts.enterEmailFirst", "Enter your email in the dataroom to download."));
return;
}
setDownloadModalJobId(null);
@@ -302,12 +310,16 @@ export default function DataroomNav({
null;
const eyebrowLine = useMemo(() => {
- const parts = ["Data room"];
+ const parts = [t("shell.dataRoomEyebrow", "Data room")];
if (dataroom?.showLastUpdated && dataroom?.lastUpdatedAt) {
- parts.push(`Updated ${formatDate(dataroom.lastUpdatedAt)}`);
+ parts.push(
+ t("shell.updatedOn", "Updated {{date}}", {
+ date: formatDateLocalized(dataroom.lastUpdatedAt, activeLocale),
+ }),
+ );
}
return parts.join(" · ").toUpperCase();
- }, [dataroom?.showLastUpdated, dataroom?.lastUpdatedAt]);
+ }, [dataroom?.showLastUpdated, dataroom?.lastUpdatedAt, activeLocale, t]);
const renderToolbarTrailing = (
variant: "onBrand" | "onLight" = "onBrand",
@@ -460,7 +472,12 @@ export default function DataroomNav({
style={surfaceMutedTextStyle}
dateTime={new Date(dataroom.lastUpdatedAt).toISOString()}
>
- {`Last updated ${formatDate(dataroom.lastUpdatedAt)}`}
+ {t("shell.lastUpdated", "Last updated {{date}}", {
+ date: formatDateLocalized(
+ dataroom.lastUpdatedAt,
+ activeLocale,
+ ),
+ })}
</time>
) : null}
</div>
@@ -566,7 +583,12 @@ export default function DataroomNav({
className="mt-0.5 block text-sm"
dateTime={new Date(dataroom.lastUpdatedAt).toISOString()}
>
- {`Last updated ${formatDate(dataroom.lastUpdatedAt)}`}
+ {t("shell.lastUpdated", "Last updated {{date}}", {
+ date: formatDateLocalized(
+ dataroom.lastUpdatedAt,
+ activeLocale,
+ ),
+ })}
</time>
) : null}
</div>
diff --git a/components/view/dataroom/pending-document-card.tsx b/components/view/dataroom/pending-document-card.tsx
index dec27a0e..d9579850 100644
--- a/components/view/dataroom/pending-document-card.tsx
+++ b/components/view/dataroom/pending-document-card.tsx
@@ -12,6 +12,7 @@ import {
Upload,
} from "lucide-react";
import { useTheme } from "next-themes";
+import { useTranslation } from "react-i18next";
import { toast } from "sonner";
import useSWRImmutable from "swr/immutable";
@@ -44,14 +45,17 @@ type PendingDocumentCardProps = {
showFolderPath?: boolean;
};
-/** Build a breadcrumb path like "Home > Company Info > Financials > Q4" */
+/** Build a breadcrumb path like "Home > Company Info > Financials > Q4".
+ * `homeLabel` is injected so the label can be localized at the call site —
+ * folder names are admin-authored and intentionally left as-is. */
function getFolderPath(
folderId: string | null,
folders: FolderInfo[],
+ homeLabel: string,
): string {
- if (!folderId) return "Home";
+ if (!folderId) return homeLabel;
- const parts: string[] = ["Home"];
+ const parts: string[] = [homeLabel];
const folderParts: string[] = [];
let current = folders.find((f) => f.id === folderId);
while (current) {
@@ -70,6 +74,7 @@ export default function PendingDocumentCard({
onNavigateToFolder,
showFolderPath = false,
}: PendingDocumentCardProps) {
+ const { t } = useTranslation("dataroom");
const { theme, systemTheme } = useTheme();
const router = useRouter();
const { updatePendingUpload } = usePendingUploads();
@@ -202,7 +207,7 @@ export default function PendingDocumentCard({
const folderPath =
showFolderPath && folders.length > 0
- ? getFolderPath(pendingUpload.folderId, folders)
+ ? getFolderPath(pendingUpload.folderId, folders, t("breadcrumb.home", "Home"))
: null;
return (
diff --git a/components/view/dataroom/viewer-download-progress-modal.tsx b/components/view/dataroom/viewer-download-progress-modal.tsx
index a5cd35bc..205427e4 100644
--- a/components/view/dataroom/viewer-download-progress-modal.tsx
+++ b/components/view/dataroom/viewer-download-progress-modal.tsx
@@ -10,6 +10,7 @@ import {
Loader2,
XCircle,
} from "lucide-react";
+import { useTranslation } from "react-i18next";
import { DownloadOtpVerification } from "./download-otp-verification";
import { Button } from "@/components/ui/button";
@@ -68,6 +69,7 @@ export function ViewerDownloadProgressModal({
folderId,
folderName,
}: ViewerDownloadProgressModalProps) {
+ const { t } = useTranslation("dataroom");
const isFolderDownload = !!folderId;
const [step, setStep] = useState<Step>("choose");
const [wantEmail, setWantEmail] = useState(false);
@@ -124,11 +126,11 @@ export function ViewerDownloadProgressModal({
);
if (!res.ok) {
const data = await res.json().catch(() => ({}));
- throw new Error(data.error ?? "Failed to fetch status");
+ throw new Error(data.error ?? t("download.statusFetchFailed", "Failed to fetch status"));
}
return res.json();
},
- [linkId],
+ [linkId, t],
);
useEffect(() => {
@@ -179,7 +181,7 @@ export function ViewerDownloadProgressModal({
});
const data = await res.json().catch(() => ({}));
if (!res.ok) {
- setError(data.error ?? "Failed to start download");
+ setError(data.error ?? t("download.startFailed", "Failed to start download"));
return;
}
if (data.jobId) {
@@ -261,9 +263,10 @@ export function ViewerDownloadProgressModal({
const diffMs = expires.getTime() - now.getTime();
const diffHours = Math.floor(diffMs / (1000 * 60 * 60));
const diffDays = Math.floor(diffHours / 24);
- if (diffDays > 0) return `${diffDays} day${diffDays > 1 ? "s" : ""}`;
- if (diffHours > 0) return `${diffHours} hour${diffHours > 1 ? "s" : ""}`;
- return "less than an hour";
+ // i18next plural keys (`_one` / `_other`) are picked via `count`.
+ if (diffDays > 0) return t("download.expiresDays", "{{count}} days", { count: diffDays });
+ if (diffHours > 0) return t("download.expiresHours", "{{count}} hours", { count: diffHours });
+ return t("download.expiresLessThanHour", "less than an hour");
};
return (
@@ -272,17 +275,18 @@ export function ViewerDownloadProgressModal({
<DialogHeader>
<DialogTitle>
{isFolderDownload
- ? `Download folder: ${folderName}`
- : `Download ${dataroomName || "Dataroom"}`}
+ ? t("download.folderTitle", "Download folder: {{name}}", { name: folderName ?? "" })
+ : t("download.dataroomTitle", "Download {{name}}", {
+ name: dataroomName || t("download.defaultName", "Dataroom"),
+ })}
</DialogTitle>
<DialogDescription>
- {step === "choose" &&
- "Start the download. You can optionally get an email when it's ready."}
- {step === "otp" && "Verify your email to receive download notifications."}
+ {step === "choose" && t("download.chooseDescription", "Start the download. You can optionally get an email when it's ready.")}
+ {step === "otp" && t("download.otpDescription", "Verify your email to receive download notifications.")}
{step === "progress" &&
(status?.status === "COMPLETED"
- ? "Your files are ready to download."
- : "Preparing your files...")}
+ ? t("download.ready", "Your files are ready to download.")
+ : t("download.preparing", "Preparing your files..."))}
</DialogDescription>
</DialogHeader>
@@ -294,11 +298,11 @@ export function ViewerDownloadProgressModal({
checked={wantEmail}
onChange={(e) => setWantEmail(e.target.checked)}
/>
- Notify me by email when the download is ready
+ {t("download.notifyByEmail", "Notify me by email when the download is ready")}
</label>
{wantEmail && verified === false && (
<p className="text-xs text-muted-foreground">
- You’ll need to verify your email with a one-time code first.
+ {t("download.needsVerification", "You'll need to verify your email with a one-time code first.")}
</p>
)}
<div className="flex gap-2">
@@ -306,10 +310,12 @@ export function ViewerDownloadProgressModal({
onClick={handleStartClick}
disabled={isStarting}
>
- {isStarting ? "Starting..." : "Start download"}
+ {isStarting
+ ? t("download.starting", "Starting...")
+ : t("download.start", "Start download")}
</Button>
<Button variant="outline" onClick={handleClose}>
- Cancel
+ {t("download.cancel", "Cancel")}
</Button>
</div>
<p className="text-xs text-muted-foreground">
@@ -319,7 +325,7 @@ export function ViewerDownloadProgressModal({
target="_blank"
rel="noopener noreferrer"
>
- View your downloads
+ {t("download.viewDownloads", "View your downloads")}
</a>
</p>
</div>
@@ -349,14 +355,17 @@ export function ViewerDownloadProgressModal({
</div>
<p className="text-center text-sm text-muted-foreground">
{!status
- ? "Starting..."
+ ? t("download.starting", "Starting...")
: status.status === "PENDING"
- ? "Preparing..."
+ ? t("download.preparingShort", "Preparing...")
: status.status === "PROCESSING"
- ? `Processing ${status.processedFiles} of ${status.totalFiles} files...`
+ ? t("download.processingFiles", "Processing {{processed}} of {{total}} files...", {
+ processed: status.processedFiles,
+ total: status.totalFiles,
+ })
: status.status === "COMPLETED"
- ? "Your download is ready!"
- : status.error ?? "Download failed."}
+ ? t("download.complete", "Your download is ready!")
+ : status.error ?? t("download.failed", "Download failed.")}
</p>
{(status?.status === "PROCESSING" || status?.status === "PENDING") && (
<Progress value={status?.progress ?? 0} className="h-2" />
@@ -369,7 +378,7 @@ export function ViewerDownloadProgressModal({
onClick={() => handleDownload(status.downloadUrls![0])}
>
<Download className="mr-2 h-4 w-4" />
- Download ZIP
+ {t("download.downloadZip", "Download ZIP")}
</Button>
) : (
<>
@@ -381,13 +390,17 @@ export function ViewerDownloadProgressModal({
{downloadProgress ? (
<>
<Loader2 className="mr-2 h-4 w-4 animate-spin" />
- Downloading {downloadProgress.current} of{" "}
- {downloadProgress.total}...
+ {t("download.downloadingProgress", "Downloading {{current}} of {{total}}...", {
+ current: downloadProgress.current,
+ total: downloadProgress.total,
+ })}
</>
) : (
<>
<Download className="mr-2 h-4 w-4" />
- Download all ({status.downloadUrls.length} parts)
+ {t("download.downloadAll", "Download all ({{count}} parts)", {
+ count: status.downloadUrls.length,
+ })}
</>
)}
</Button>
@@ -400,7 +413,7 @@ export function ViewerDownloadProgressModal({
className="w-full justify-start"
onClick={() => handleDownload(url)}
>
- Part {i + 1}
+ {t("download.part", "Part {{index}}", { index: i + 1 })}
</Button>
))}
</div>
@@ -408,7 +421,9 @@ export function ViewerDownloadProgressModal({
)}
{status.expiresAt && (
<p className="text-center text-xs text-muted-foreground">
- Expires in {formatExpirationTime(status.expiresAt)}
+ {t("download.expiresIn", "Expires in {{time}}", {
+ time: formatExpirationTime(status.expiresAt),
+ })}
</p>
)}
</div>
@@ -417,19 +432,19 @@ export function ViewerDownloadProgressModal({
<DialogFooter>
<p className="text-xs text-muted-foreground">
{wantEmail
- ? "You can close this. We’ll email you when it’s ready."
- : "You can close this. Check back on the downloads page when it’s ready."}
+ ? t("download.willEmailWhenReady", "You can close this. We'll email you when it's ready.")
+ : t("download.checkBackOnDownloads", "You can close this. Check back on the downloads page when it's ready.")}
</p>
</DialogFooter>
)}
{status?.status === "FAILED" && (
<Button variant="outline" onClick={() => setStep("choose")}>
- Try again
+ {t("download.tryAgain", "Try again")}
</Button>
)}
<p className="text-xs text-muted-foreground">
<a href={downloadsPageUrl} className="underline" target="_blank" rel="noopener noreferrer">
- Open downloads page
+ {t("download.openDownloads", "Open downloads page")}
</a>
</p>
{error && (
diff --git a/components/view/nav.tsx b/components/view/nav.tsx
index 30522b6b..67d4fb38 100644
--- a/components/view/nav.tsx
+++ b/components/view/nav.tsx
@@ -5,6 +5,7 @@ import React, { useEffect, useState } from "react";
import { useViewerChatSafe } from "@/ee/features/ai/components/viewer-chat-provider";
import { Brand, DataroomBrand } from "@prisma/client";
+import { useTranslation } from "react-i18next";
import {
ArrowUpRight,
BadgeInfoIcon,
@@ -117,6 +118,7 @@ export default function Nav({
onToggleAnnotations,
} = navData;
+ const { t } = useTranslation("viewer");
const [showConversations, setShowConversations] = useState(false);
const navColorPalette = createAdaptiveSurfacePalette(brand?.brandColor);
@@ -127,7 +129,7 @@ export default function Nav({
const downloadFile = async () => {
if (isPreview) {
- toast.error("You cannot download documents in preview mode.");
+ toast.error(t("toasts.cannotDownloadPreview", "You cannot download documents in preview mode."));
return;
}
if (!allowDownload || type === "notion") return;
@@ -149,10 +151,10 @@ export default function Nav({
toast.promise(downloadPromise, {
loading: hasWatermark
- ? "Preparing download with watermark..."
- : "Preparing download...",
- success: "File downloaded successfully",
- error: (err) => err.message || "Failed to download file",
+ ? t("toasts.preparingDownloadWatermark", "Preparing download with watermark...")
+ : t("toasts.preparingDownload", "Preparing download..."),
+ success: t("toasts.downloadSuccess", "File downloaded successfully"),
+ error: (err) => err.message || t("toasts.downloadFailed", "Failed to download file"),
});
};
@@ -226,7 +228,7 @@ export default function Nav({
color: navColorPalette.textColor,
}}
>
- Home
+ {t("nav.home", "Home")}
</BreadcrumbLink>
</BreadcrumbItem>
{type === "notion" ? (
@@ -261,8 +263,7 @@ export default function Nav({
</TooltipTrigger>
<TooltipContent>
<p className="max-w-xs text-wrap text-center">
- Skipped verification because you are a team member; no
- analytics will be collected
+ {t("nav.teamMemberTooltip", "Skipped verification because you are a team member; no analytics will be collected")}
</p>
</TooltipContent>
</Tooltip>
@@ -274,7 +275,7 @@ export default function Nav({
onClick={() => setShowConversations(!showConversations)}
className="bg-gray-900 text-white hover:bg-gray-900/80"
>
- View Q&A
+ {t("nav.viewQA", "View Q&A")}
</Button>
)}
{/* Annotations toggle button */}
@@ -289,11 +290,13 @@ export default function Nav({
<DropdownMenu>
<DropdownMenuTrigger>
<Button className="bg-gray-900 text-sm font-medium text-white hover:bg-gray-900/80">
- Links on Page
+ {t("nav.linksOnPage", "Links on Page")}
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent className="space-y-2" align="end">
- <DropdownMenuLabel>Links on current page</DropdownMenuLabel>
+ <DropdownMenuLabel>
+ {t("nav.linksOnCurrentPage", "Links on current page")}
+ </DropdownMenuLabel>
<DropdownMenuSeparator />
{embeddedLinks.map((link, index) => (
<Link
@@ -321,7 +324,7 @@ export default function Nav({
onClick={downloadFile}
className="size-8 bg-gray-900 text-white hover:bg-gray-900/80 sm:size-10"
size="icon"
- title="Download document"
+ title={t("nav.downloadDocument", "Download document")}
>
<Download className="size-4 sm:size-5" />
</Button>
@@ -341,7 +344,7 @@ export default function Nav({
</Button>
</TooltipTrigger>
<TooltipContent>
- <span className="mr-2 text-xs">Zoom in</span>
+ <span className="mr-2 text-xs">{t("nav.zoomIn", "Zoom in")}</span>
<span className="ml-auto rounded-sm border bg-muted p-0.5 text-xs tracking-widest text-muted-foreground">
⌘+
</span>
@@ -361,7 +364,7 @@ export default function Nav({
</Button>
</TooltipTrigger>
<TooltipContent>
- <span className="mr-2 text-xs">Zoom out</span>
+ <span className="mr-2 text-xs">{t("nav.zoomOut", "Zoom out")}</span>
<span className="ml-auto rounded-sm border bg-muted p-0.5 text-xs tracking-widest text-muted-foreground">
⌘-
</span>
@@ -382,7 +385,7 @@ export default function Nav({
</Button>
</TooltipTrigger>
<TooltipContent>
- <span className="mr-2 text-xs">Fullscreen</span>
+ <span className="mr-2 text-xs">{t("nav.fullscreen", "Fullscreen")}</span>
<span className="ml-auto rounded-sm border bg-muted p-0.5 text-xs tracking-widest text-muted-foreground">
F
</span>
diff --git a/components/view/powered-by.tsx b/components/view/powered-by.tsx
index 0279956c..25425b76 100644
--- a/components/view/powered-by.tsx
+++ b/components/view/powered-by.tsx
@@ -1,6 +1,9 @@
import { createPortal } from "react-dom";
+import { useTranslation } from "react-i18next";
+
export const PoweredBy = ({ linkId }: { linkId: string }) => {
+ const { t } = useTranslation("viewer");
return createPortal(
<div className="absolute bottom-0 right-0 z-[100] w-fit">
<div className="p-6">
@@ -12,7 +15,7 @@ export const PoweredBy = ({ linkId }: { linkId: string }) => {
className="rounded-sm text-sm"
style={{ paddingInlineStart: "12px", paddingInlineEnd: "12px" }}
>
- Share docs via{" "}
+ {t("poweredBy.shareDocsVia", "Share docs via")}{" "}
<span className="font-semibold tracking-tighter">Papermark</span>
</a>
</div>
diff --git a/components/view/report-form.tsx b/components/view/report-form.tsx
index 893f5776..40824c70 100644
--- a/components/view/report-form.tsx
+++ b/components/view/report-form.tsx
@@ -1,6 +1,7 @@
import { useState } from "react";
import { Flag } from "lucide-react";
+import { useTranslation } from "react-i18next";
import { toast } from "sonner";
import { Button } from "@/components/ui/button";
@@ -14,6 +15,17 @@ import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";
import { ButtonTooltip } from "../ui/tooltip";
+// Keeps the legacy `not-working` radio value working with the camelCased
+// translation key (`types.notWorking`) without changing the API contract.
+const ABUSE_TYPE_TO_TRANSLATION_KEY: Record<string, string> = {
+ spam: "spam",
+ malware: "malware",
+ copyright: "copyright",
+ harmful: "harmful",
+ "not-working": "notWorking",
+ other: "other",
+};
+
export default function ReportForm({
linkId,
documentId,
@@ -23,6 +35,7 @@ export default function ReportForm({
documentId: string | undefined;
viewId: string | undefined;
}) {
+ const { t } = useTranslation("viewer");
const [abuseType, setAbuseType] = useState("");
const [loading, setLoading] = useState(false);
const [open, setOpen] = useState(false);
@@ -38,7 +51,7 @@ export default function ReportForm({
const handleSubmit = async () => {
if (!abuseType) {
- toast.error("Please select an abuse type.");
+ toast.error(t("report.selectTypeError", "Please select an abuse type."));
return;
}
@@ -68,16 +81,18 @@ export default function ReportForm({
return;
}
- toast.success("Report submitted successfully");
+ toast.success(t("report.successToast", "Report submitted successfully"));
setOpen(false);
setLoading(false);
};
+ const triggerLabel = t("report.trigger", "Report abuse");
+
return (
<>
<Popover open={open} onOpenChange={setOpen}>
<ButtonTooltip
- content="Report abuse"
+ content={triggerLabel}
sideOffset={8}
className="border-gray-800"
>
@@ -85,7 +100,7 @@ export default function ReportForm({
<Button
className="h-8 w-8 bg-gray-900 text-xs text-gray-300 hover:bg-gray-900/80 hover:text-gray-50 sm:h-10 sm:w-10 sm:text-sm"
size="icon"
- title="Report abuse"
+ title={triggerLabel}
>
<Flag className="size-3 sm:size-4" />
</Button>
@@ -94,50 +109,27 @@ export default function ReportForm({
<PopoverContent className="w-auto" align="end">
<div className="flex max-w-xs flex-col gap-4">
<div className="space-y-2">
- <h4 className="font-medium leading-none">Report an issue</h4>
+ <h4 className="font-medium leading-none">{t("report.title", "Report an issue")}</h4>
<p className="text-sm text-muted-foreground">
- See something inappropriate? We will take a look and, when
- appropriate, take action.
+ {t("report.description", "See something inappropriate? We will take a look and, when appropriate, take action.")}
</p>
</div>
<div className="flex flex-col space-y-4">
- <RadioGroup value={abuseType} onValueChange={setAbuseType} className="grid gap-2">
- <div className="flex items-center space-x-2">
- <RadioGroupItem value="spam" id="spam" />
- <Label htmlFor="spam" className="font-normal">
- Spam, Fraud, or Scam
- </Label>
- </div>
- <div className="flex items-center space-x-2">
- <RadioGroupItem value="malware" id="malware" />
- <Label htmlFor="malware" className="font-normal">
- Malware or virus
- </Label>
- </div>
- <div className="flex items-center space-x-2">
- <RadioGroupItem value="copyright" id="copyright" />
- <Label htmlFor="copyright" className="font-normal">
- Copyright violation
- </Label>
- </div>
- <div className="flex items-center space-x-2">
- <RadioGroupItem value="harmful" id="harmful" />
- <Label htmlFor="harmful" className="font-normal">
- Harmful content
- </Label>
- </div>
- <div className="flex items-center space-x-2">
- <RadioGroupItem value="not-working" id="not-working" />
- <Label htmlFor="not-working" className="font-normal">
- Content is not working properly
- </Label>
- </div>
- <div className="flex items-center space-x-2">
- <RadioGroupItem value="other" id="other" />
- <Label htmlFor="other" className="font-normal">
- Other
- </Label>
- </div>
+ <RadioGroup
+ value={abuseType}
+ onValueChange={setAbuseType}
+ className="grid gap-2"
+ >
+ {Object.entries(ABUSE_TYPE_TO_TRANSLATION_KEY).map(
+ ([value, key]) => (
+ <div key={value} className="flex items-center space-x-2">
+ <RadioGroupItem value={value} id={value} />
+ <Label htmlFor={value} className="font-normal">
+ {t(`report.types.${key}`)}
+ </Label>
+ </div>
+ ),
+ )}
</RadioGroup>
<Button
onClick={handleSubmit}
@@ -145,7 +137,7 @@ export default function ReportForm({
loading={loading}
size="sm"
>
- Submit Report
+ {t("report.submit", "Submit Report")}
</Button>
</div>
</div>
diff --git a/components/view/viewer-i18n-provider.tsx b/components/view/viewer-i18n-provider.tsx
new file mode 100644
index 00000000..c1240897
--- /dev/null
+++ b/components/view/viewer-i18n-provider.tsx
@@ -0,0 +1,54 @@
+"use client";
+
+import { useEffect, useMemo } from "react";
+
+import { I18nextProvider } from "react-i18next";
+
+import type {
+ SupportedLocaleCode,
+ ViewerNamespace,
+} from "@/lib/i18n/locales";
+import { getOrCreateViewerI18n } from "@/lib/i18n/viewer-i18n";
+
+export type ViewerI18nProviderProps = {
+ /** Locale picked by the admin in branding (always one of SUPPORTED_LOCALE_CODES). */
+ locale: SupportedLocaleCode;
+ /**
+ * Translation bundles inlined by `getStaticProps`/`getServerSideProps` so
+ * the first paint is already translated and visitors never see an English
+ * flash before the JSON hydrates. We only ever inline the one active locale.
+ */
+ resources: Partial<Record<ViewerNamespace, Record<string, unknown>>>;
+ children: React.ReactNode;
+};
+
+/**
+ * Wraps the viewer tree in a singleton-per-locale i18next instance so every
+ * child component can call `useTranslation()` without prop-drilling.
+ *
+ * Deliberately minimal — there is no visitor-side language switching, cookie
+ * reading, or Accept-Language detection. Whatever locale the admin set on
+ * the brand is the locale the page renders in.
+ */
+export function ViewerI18nProvider({
+ locale,
+ resources,
+ children,
+}: ViewerI18nProviderProps) {
+ const i18n = useMemo(
+ () => getOrCreateViewerI18n(locale, resources),
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ [locale],
+ );
+
+ // When the page re-renders with fresh resources (e.g. the visitor navigates
+ // to a deeper route that ships more namespaces), merge them into the cached
+ // instance so any newly-required key resolves instead of falling back to en.
+ useEffect(() => {
+ for (const [ns, content] of Object.entries(resources)) {
+ if (content) i18n.addResourceBundle(locale, ns, content, true, true);
+ }
+ }, [resources, i18n, locale]);
+
+ return <I18nextProvider i18n={i18n}>{children}</I18nextProvider>;
+}
diff --git a/components/view/viewer/away-poster.tsx b/components/view/viewer/away-poster.tsx
index fe82f613..97d741c7 100644
--- a/components/view/viewer/away-poster.tsx
+++ b/components/view/viewer/away-poster.tsx
@@ -1,4 +1,5 @@
import { Play } from "lucide-react";
+import { useTranslation } from "react-i18next";
import { cn } from "@/lib/utils";
@@ -19,17 +20,18 @@ export function AwayPoster({
onDismiss,
className,
}: AwayPosterProps) {
+ const { t } = useTranslation("viewer");
const formatTime = (ms: number) => {
const seconds = Math.floor(ms / 1000);
const minutes = Math.floor(seconds / 60);
const remainingSeconds = seconds % 60;
-
+
if (minutes > 0) {
return remainingSeconds > 0
- ? `${minutes}min ${remainingSeconds}sec`
- : `${minutes}min`;
+ ? t("awayPoster.minSec", "{{minutes}}min {{seconds}}sec", { minutes, seconds: remainingSeconds })
+ : t("awayPoster.minOnly", "{{minutes}}min", { minutes });
}
- return `${seconds}sec`;
+ return t("awayPoster.secOnly", "{{seconds}}sec", { seconds });
};
if (!isVisible) return null;
@@ -54,12 +56,11 @@ export function AwayPoster({
)}
>
<h2 id="away-poster-title" className="sr-only">
- Auto-paused session notification
+ {t("awayPoster.ariaTitle", "Auto-paused session notification")}
</h2>
<p id="away-poster-description" className="sr-only">
- Your session was paused due to inactivity. Click continue or move your
- mouse to resume.
+ {t("awayPoster.ariaDescription", "Your session was paused due to inactivity. Click continue or move your mouse to resume.")}
</p>
<div className="space-y-5">
@@ -68,32 +69,33 @@ export function AwayPoster({
variant="outline"
className="border-orange-400 bg-orange-100 text-orange-600"
>
- Auto-paused
+ {t("awayPoster.badge", "Auto-paused")}
</Badge>
<span className="mr-6 text-xs text-muted-foreground">
- {formatTime(inactivityThreshold)} idle
+ {t("awayPoster.idleFor", "{{duration}} idle", {
+ duration: formatTime(inactivityThreshold),
+ })}
</span>
</div>
<div className="space-y-2">
- <h3 className="text-lg font-semibold">
- We paused to protect your session
- </h3>
+ <h3 className="text-lg font-semibold">{t("awayPoster.title", "We paused to protect your session")}</h3>
<p className="text-sm text-muted-foreground">
- You were inactive since {formatTime(inactivityThreshold)}, so we
- paused the document preview to keep session safe.
+ {t("awayPoster.description", "You were inactive since {{duration}}, so we paused the document preview to keep session safe.", {
+ duration: formatTime(inactivityThreshold),
+ })}
</p>
</div>
<div className="pt-2">
<Button onClick={onDismiss} className="w-full">
<Play className="mr-2 h-4 w-4" />
- Continue where you left off
+ {t("awayPoster.resume", "Continue where you left off")}
</Button>
</div>
<p className="text-center text-[11px] text-muted-foreground">
- Or just move your mouse or press any key to continue
+ {t("awayPoster.moveHint", "Or just move your mouse or press any key to continue")}
</p>
</div>
</div>
diff --git a/components/view/viewer/dataroom-viewer.tsx b/components/view/viewer/dataroom-viewer.tsx
index 3dac080d..478aa772 100644
--- a/components/view/viewer/dataroom-viewer.tsx
+++ b/components/view/viewer/dataroom-viewer.tsx
@@ -24,6 +24,7 @@ import {
} from "@/ee/features/branding/lib/dataroom-viewer-layout";
import * as SheetPrimitive from "@radix-ui/react-dialog";
import { PanelLeftIcon, UploadIcon, XIcon } from "lucide-react";
+import { useTranslation } from "react-i18next";
import { usePendingUploads } from "@/context/pending-uploads-context";
import { cn } from "@/lib/utils";
@@ -219,6 +220,7 @@ export default function DataroomViewer({
};
const router = useRouter();
+ const { t } = useTranslation("dataroom");
const searchQuery = (router.query.search as string)?.toLowerCase() || "";
// Tab state: "documents" (normal view) or "my-uploads" (visitor's uploads)
@@ -250,7 +252,7 @@ export default function DataroomViewer({
onClick={() => setFolderId(null)}
className="-mx-1.5 cursor-pointer rounded-md px-1.5 py-0.5 text-[var(--viewer-muted-text)] transition-colors hover:bg-[var(--viewer-panel-bg-hover)] hover:text-[var(--viewer-text)]"
>
- Home
+ {t("breadcrumb.home", "Home")}
</BreadcrumbLink>
</BreadcrumbItem>
@@ -272,7 +274,7 @@ export default function DataroomViewer({
</BreadcrumbList>
</Breadcrumb>
),
- [breadcrumbFolders, dataroomIndexEnabled, setFolderId],
+ [breadcrumbFolders, dataroomIndexEnabled, setFolderId, t],
);
// Index access controls by `itemId` once per change so the per-document
@@ -714,6 +716,7 @@ export default function DataroomViewer({
topBarSearch={
isModernLayout ? (
<SearchBoxPersisted
+ placeholder={t("search.placeholder", "Search...")}
inputClassName="h-9 border-[var(--viewer-control-border)] bg-[var(--viewer-control-bg)] text-[var(--viewer-text)] placeholder:text-[var(--viewer-placeholder)] shadow-sm hover:border-[var(--viewer-control-border-strong)] focus:border-[var(--viewer-control-border-strong)]"
leftIconClassName="text-[var(--viewer-control-icon)]"
clearIconClassName="text-[var(--viewer-control-icon)] hover:text-[var(--viewer-text)]"
@@ -924,6 +927,7 @@ export default function DataroomViewer({
<div className="flex flex-wrap items-center justify-end gap-2 sm:flex-nowrap sm:gap-x-2">
<IntroductionInfoButton />
<SearchBoxPersisted
+ placeholder={t("search.placeholder", "Search...")}
inputClassName="h-9 border-[var(--viewer-control-border)] bg-[var(--viewer-control-bg)] text-[var(--viewer-text)] placeholder:text-[var(--viewer-placeholder)] shadow-sm hover:border-[var(--viewer-control-border-strong)] focus:border-[var(--viewer-control-border-strong)]"
leftIconClassName="text-[var(--viewer-control-icon)]"
clearIconClassName="text-[var(--viewer-control-icon)] hover:text-[var(--viewer-text)]"
@@ -1014,7 +1018,7 @@ export default function DataroomViewer({
: "border-transparent text-[var(--viewer-subtle-text)] hover:border-[var(--viewer-panel-border-hover)] hover:text-[var(--viewer-text)]",
)}
>
- Documents
+ {t("tabs.documents", "Documents")}
</button>
<button
onClick={() => setActiveTab("my-uploads")}
@@ -1026,7 +1030,7 @@ export default function DataroomViewer({
)}
>
<UploadIcon className="h-3.5 w-3.5" />
- My Uploads
+ {t("tabs.myUploads", "My Uploads")}
<span
className="inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-xs font-medium"
style={{
@@ -1045,11 +1049,10 @@ export default function DataroomViewer({
<div className="mt-4 rounded-md border border-[var(--viewer-panel-border)] bg-[var(--viewer-control-bg)] px-4 py-3">
<div className="flex items-center gap-2">
<div className="text-sm font-medium text-[var(--viewer-muted-text)]">
- Search results for &quot;{searchQuery}&quot;
+ {t("search.results", "Search results for \"{{query}}\"", { query: searchQuery })}
</div>
<div className="text-xs text-[var(--viewer-subtle-text)]">
- ({mixedItems.length} result
- {mixedItems.length !== 1 ? "s" : ""} across all folders)
+ {t("search.resultCount", "({{count}} results across all folders)", { count: mixedItems.length })}
</div>
</div>
</div>
@@ -1060,8 +1063,7 @@ export default function DataroomViewer({
<ul role="list" className="-mx-4 space-y-4 overflow-auto p-4">
{allUploads.length === 0 ? (
<li className="py-6 text-center text-[var(--viewer-subtle-text)]">
- No uploads yet. Upload documents using the &quot;Add
- Document&quot; button.
+ {t("empty.noUploads", "No uploads yet. Upload documents using the \"Add Document\" button.")}
</li>
) : (
allUploads.map((pendingUpload) => (
@@ -1096,8 +1098,8 @@ export default function DataroomViewer({
filteredPendingUploads.length === 0 ? (
<div className="py-6 text-center text-[var(--viewer-subtle-text)]">
{searchQuery
- ? "No documents match your search."
- : "No items available."}
+ ? t("search.noMatches", "No documents match your search.")
+ : t("empty.noItems", "No items available.")}
</div>
) : (
segmentMixedItemsForGrid(mixedItems).map((run, runIdx) => (
@@ -1147,8 +1149,8 @@ export default function DataroomViewer({
filteredPendingUploads.length === 0 ? (
<li className="py-6 text-center text-[var(--viewer-subtle-text)]">
{searchQuery
- ? "No documents match your search."
- : "No items available."}
+ ? t("search.noMatches", "No documents match your search.")
+ : t("empty.noItems", "No items available.")}
</li>
) : (
mixedItems.map((item, idx) => (
@@ -1182,7 +1184,7 @@ export default function DataroomViewer({
rel="noopener noreferrer"
className="whitespace-nowrap transition-colors hover:text-[var(--viewer-text)]"
>
- Secured by{" "}
+ {t("shell.secureFooter", "Secured by")}{" "}
<span className="font-semibold tracking-tight">
Papermark
</span>
diff --git a/components/view/viewer/download-only-viewer.tsx b/components/view/viewer/download-only-viewer.tsx
index f19eaeff..13fe995d 100644
--- a/components/view/viewer/download-only-viewer.tsx
+++ b/components/view/viewer/download-only-viewer.tsx
@@ -3,6 +3,7 @@ import { useRouter } from "next/router";
import { useEffect, useRef } from "react";
import { Download } from "lucide-react";
+import { useTranslation } from "react-i18next";
import { toast } from "sonner";
import { useSafePageViewTracker } from "@/lib/tracking/safe-page-view-tracker";
@@ -29,6 +30,7 @@ export default function DownloadOnlyViewer({
navData: TNavData;
}) {
const router = useRouter();
+ const { t } = useTranslation("viewer");
const startTimeRef = useRef(Date.now());
const visibilityRef = useRef<boolean>(true);
@@ -194,7 +196,7 @@ export default function DownloadOnlyViewer({
const downloadFile = async () => {
if (isPreview) {
- toast.error("You cannot download documents in preview mode.");
+ toast.error(t("toasts.cannotDownloadPreview", "You cannot download documents in preview mode."));
return;
}
if (!allowDownload) return;
@@ -209,9 +211,9 @@ export default function DownloadOnlyViewer({
});
toast.promise(downloadPromise, {
- loading: "Preparing download...",
- success: "File downloaded successfully",
- error: (err) => err.message || "Failed to download file",
+ loading: t("toasts.preparingDownload", "Preparing download..."),
+ success: t("toasts.downloadSuccess", "File downloaded successfully"),
+ error: (err) => err.message || t("toasts.downloadFailed", "Failed to download file"),
});
};
@@ -227,15 +229,15 @@ export default function DownloadOnlyViewer({
<Download className="h-12 w-12 text-gray-600 dark:text-gray-300" />
</div>
<h2 className="text-xl font-medium text-gray-900 dark:text-gray-100">
- {documentName || "Download Document"}
+ {documentName || t("downloadOnly.title", "Download Document")}
</h2>
<p className="text-sm text-gray-500 dark:text-gray-400">
- This document is available for download only
+ {t("downloadOnly.description", "This document is available for download only")}
</p>
{allowDownload && (
<Button onClick={downloadFile} className="w-full space-x-2">
<Download className="h-4 w-4" />
- <span>Download Now</span>
+ <span>{t("downloadOnly.button", "Download Now")}</span>
</Button>
)}
</div>
diff --git a/lib/api/links/link-data.ts b/lib/api/links/link-data.ts
index 37a487e1..a59e4b5f 100644
--- a/lib/api/links/link-data.ts
+++ b/lib/api/links/link-data.ts
@@ -327,6 +327,7 @@ export async function fetchDataroomLinkData({
hideFolderIconsInMain: true,
ctaLabel: true,
ctaUrl: true,
+ defaultLanguage: true,
},
});
@@ -347,6 +348,7 @@ export async function fetchDataroomLinkData({
viewerLayoutPreset: true,
viewerHeaderStyle: true,
hideFolderIconsInMain: true,
+ defaultLanguage: true,
},
});
@@ -384,6 +386,12 @@ export async function fetchDataroomLinkData({
false,
ctaLabel: dataroomBrand?.ctaLabel ?? teamBrand?.ctaLabel ?? null,
ctaUrl: dataroomBrand?.ctaUrl ?? teamBrand?.ctaUrl ?? null,
+ // Viewer i18n: dataroom-level setting wins, else team-level, else en.
+ // Read by `buildViewerI18nPageProps` to pick the locale + bundles.
+ defaultLanguage:
+ (dataroomBrand as any)?.defaultLanguage ??
+ (teamBrand as any)?.defaultLanguage ??
+ "en",
};
// Extract access controls from either ViewerGroup or PermissionGroup
@@ -526,6 +534,7 @@ export async function fetchDataroomDocumentLinkData({
hideFolderIconsInMain: true,
ctaLabel: true,
ctaUrl: true,
+ defaultLanguage: true,
},
});
@@ -546,6 +555,7 @@ export async function fetchDataroomDocumentLinkData({
viewerLayoutPreset: true,
viewerHeaderStyle: true,
hideFolderIconsInMain: true,
+ defaultLanguage: true,
},
});
@@ -581,6 +591,10 @@ export async function fetchDataroomDocumentLinkData({
false,
ctaLabel: dataroomBrand?.ctaLabel ?? teamBrand?.ctaLabel ?? null,
ctaUrl: dataroomBrand?.ctaUrl ?? teamBrand?.ctaUrl ?? null,
+ defaultLanguage:
+ (dataroomBrand as any)?.defaultLanguage ??
+ (teamBrand as any)?.defaultLanguage ??
+ "en",
};
return { linkData, brand };
@@ -635,6 +649,7 @@ export async function fetchDocumentLinkData({
brandColor: true,
accentColor: true,
welcomeMessage: true,
+ defaultLanguage: true,
},
});
@@ -676,6 +691,7 @@ async function processLinkData(
logo: true,
brandColor: true,
accentColor: true,
+ defaultLanguage: true,
},
});
brand = teamBrand;
diff --git a/lib/billing/team-plan-custom-messaging.ts b/lib/billing/team-plan-custom-messaging.ts
index 548eaa3f..0b301264 100644
--- a/lib/billing/team-plan-custom-messaging.ts
+++ b/lib/billing/team-plan-custom-messaging.ts
@@ -52,6 +52,24 @@ export function teamPlanAllowsLayoutCustomization(
);
}
+/**
+ * Visitor language picker (dataroom branding → Language) is gated to the
+ * Data Rooms Plus tier and above (or any active dataroom trial). English is
+ * the always-free default and is enforced separately at the call site.
+ */
+export function teamPlanAllowsVisitorLanguage(
+ plan: string | null | undefined,
+): boolean {
+ if (!plan || plan === "free") return false;
+ if (plan.includes("drtrial")) return true;
+ const base = plan.split("+")[0];
+ return (
+ base === "datarooms-plus" ||
+ base === "datarooms-premium" ||
+ base === "datarooms-unlimited"
+ );
+}
+
/**
* Whether the Layouts UI should be rendered at all in the global branding /
* dataroom branding screens. Free plans have no exposure to it; Business and
diff --git a/lib/i18n/format.ts b/lib/i18n/format.ts
new file mode 100644
index 00000000..6953b380
--- /dev/null
+++ b/lib/i18n/format.ts
@@ -0,0 +1,82 @@
+/**
+ * Locale-aware replacements for the `en-US`-hardcoded helpers in `lib/utils.ts`.
+ *
+ * Only the viewer side uses these — admin pages keep the legacy helpers so
+ * the admin UI stays in a stable English format for analytics/exports.
+ */
+import { DEFAULT_LOCALE, type SupportedLocaleCode } from "./locales";
+
+/** "January 15, 2025" / "15. Januar 2025" / "15 janvier 2025". */
+export function formatDateLocalized(
+ dateString: string | Date | number,
+ locale: SupportedLocaleCode = DEFAULT_LOCALE,
+ options?: Intl.DateTimeFormatOptions,
+): string {
+ const date = new Date(dateString);
+ if (Number.isNaN(date.getTime())) return "";
+ return new Intl.DateTimeFormat(locale, {
+ day: "numeric",
+ month: "long",
+ year: "numeric",
+ timeZone: "UTC",
+ ...options,
+ }).format(date);
+}
+
+/**
+ * Relative time ("2 hours ago", "vor 2 Stunden") matching the existing
+ * `timeAgo` semantics (jumps to absolute date once we're more than ~23h out).
+ */
+export function timeAgoLocalized(
+ timestamp: Date | string | number | undefined,
+ locale: SupportedLocaleCode = DEFAULT_LOCALE,
+): string {
+ if (!timestamp) return relativeJustNow(locale);
+ const date = new Date(timestamp);
+ if (Number.isNaN(date.getTime())) return relativeJustNow(locale);
+
+ const diff = Date.now() - date.getTime();
+
+ if (diff < 60_000) return relativeJustNow(locale);
+
+ if (diff > 82_800_000) {
+ // More than ~23h: switch to short absolute date, omit year when current.
+ const sameYear = date.getFullYear() === new Date().getFullYear();
+ return new Intl.DateTimeFormat(locale, {
+ month: "short",
+ day: "numeric",
+ year: sameYear ? undefined : "numeric",
+ }).format(date);
+ }
+
+ // `ms()` gives us a friendly English distance like "5 minutes" — feed that
+ // into Intl.RelativeTimeFormat so we get locale-correct phrasing without
+ // shipping a relative-time table per language.
+ return relativeFromMs(diff, locale);
+}
+
+function relativeJustNow(locale: SupportedLocaleCode): string {
+ // RelativeTimeFormat doesn't have a "just now" — use the smallest unit
+ // (seconds) at value 0 so we get the locale's natural "now"/"adesso"/"maintenant"
+ // phrasing. Falls back gracefully on older runtimes.
+ try {
+ return new Intl.RelativeTimeFormat(locale, { numeric: "auto" }).format(
+ 0,
+ "second",
+ );
+ } catch {
+ return "Just now";
+ }
+}
+
+function relativeFromMs(diffMs: number, locale: SupportedLocaleCode): string {
+ const rtf = new Intl.RelativeTimeFormat(locale, { numeric: "always" });
+ const seconds = Math.round(diffMs / 1000);
+ const minutes = Math.round(seconds / 60);
+ const hours = Math.round(minutes / 60);
+
+ // `-N` because the event is in the past.
+ if (hours >= 1) return rtf.format(-hours, "hour");
+ if (minutes >= 1) return rtf.format(-minutes, "minute");
+ return rtf.format(-seconds, "second");
+}
diff --git a/lib/i18n/locales.ts b/lib/i18n/locales.ts
new file mode 100644
index 00000000..dc1c6cc5
--- /dev/null
+++ b/lib/i18n/locales.ts
@@ -0,0 +1,66 @@
+/**
+ * Single source of truth for which languages the viewer can render in.
+ *
+ * Adding a language is two steps:
+ * 1. Add an entry to `SUPPORTED_LOCALES` below.
+ * 2. Drop the matching `locales/<code>/*.json` files (translators only).
+ *
+ * No other code change is required. Components stay untouched.
+ *
+ * `code` is a BCP-47 tag we pass to `Intl.DateTimeFormat`, `Intl.RelativeTimeFormat`,
+ * and i18next. Keep it lowercase except for region (e.g. `pt-BR`, `zh-CN`).
+ *
+ * `nativeName` is the language label shown in the branding settings dropdown
+ * (admin picks one language for the whole dataroom — visitors can't switch).
+ */
+export type SupportedLocaleCode =
+ | "en"
+ | "de"
+ | "fr"
+ | "es"
+ | "it"
+ | "pt-BR"
+ | "ja";
+
+export type SupportedLocale = {
+ code: SupportedLocaleCode;
+ nativeName: string;
+ englishName: string;
+};
+
+export const SUPPORTED_LOCALES: readonly SupportedLocale[] = [
+ { code: "en", nativeName: "English", englishName: "English" },
+ { code: "de", nativeName: "Deutsch", englishName: "German" },
+ { code: "fr", nativeName: "Français", englishName: "French" },
+ { code: "es", nativeName: "Español", englishName: "Spanish" },
+ { code: "it", nativeName: "Italiano", englishName: "Italian" },
+ { code: "pt-BR", nativeName: "Português (Brasil)", englishName: "Portuguese (Brazil)" },
+ { code: "ja", nativeName: "日本語", englishName: "Japanese" },
+] as const;
+
+export const DEFAULT_LOCALE: SupportedLocaleCode = "en";
+
+export const SUPPORTED_LOCALE_CODES: readonly SupportedLocaleCode[] =
+ SUPPORTED_LOCALES.map((l) => l.code);
+
+/**
+ * Narrow an arbitrary string (e.g. from the DB) to a supported locale code,
+ * or return null when the value is missing/unknown.
+ */
+export function asSupportedLocale(
+ value: string | null | undefined,
+): SupportedLocaleCode | null {
+ if (!value) return null;
+ return (SUPPORTED_LOCALE_CODES as readonly string[]).includes(value)
+ ? (value as SupportedLocaleCode)
+ : null;
+}
+
+/** All translation namespaces shipped on the viewer. */
+export const VIEWER_NAMESPACES = [
+ "access-form",
+ "dataroom",
+ "viewer",
+] as const;
+
+export type ViewerNamespace = (typeof VIEWER_NAMESPACES)[number];
diff --git a/lib/i18n/viewer-i18n.ts b/lib/i18n/viewer-i18n.ts
new file mode 100644
index 00000000..9b4572ff
--- /dev/null
+++ b/lib/i18n/viewer-i18n.ts
@@ -0,0 +1,201 @@
+/**
+ * i18next instance(s) used by the viewer.
+ *
+ * Design choices:
+ * - One instance per locale, lazily created on the client (kept on a module
+ * cache). This avoids re-initializing on every page navigation between
+ * `/view/[linkId]` and `/view/[linkId]/d/[doc]`.
+ * - Translation resources are loaded statically via `import()`. That lets
+ * Next.js code-split each locale's JSON into its own chunk — the visitor
+ * only downloads the JSON for their resolved language.
+ * - Server rendering inlines the namespace resources via `getStaticProps`/
+ * `getServerSideProps` so the first paint is already translated and we
+ * don't ship an English flash before the JSON hydrates.
+ */
+import i18next, { type i18n as I18nInstance, type Resource } from "i18next";
+import { initReactI18next } from "react-i18next";
+
+import {
+ DEFAULT_LOCALE,
+ SUPPORTED_LOCALE_CODES,
+ VIEWER_NAMESPACES,
+ type SupportedLocaleCode,
+ type ViewerNamespace,
+} from "./locales";
+
+const clientInstances = new Map<SupportedLocaleCode, I18nInstance>();
+
+/**
+ * Get-or-create the i18next instance for `locale`, pre-populated with `resources`.
+ *
+ * Subsequent calls with the same locale return the cached instance and merge
+ * any extra namespaces into it — this lets a page that needs only `viewer`
+ * load that namespace cheaply, and a later page that needs `dataroom` add
+ * to the same instance.
+ */
+export function getOrCreateViewerI18n(
+ locale: SupportedLocaleCode,
+ resources: Partial<Record<ViewerNamespace, Record<string, unknown>>>,
+): I18nInstance {
+ const cached = clientInstances.get(locale);
+ if (cached) {
+ // Merge any newly-provided namespaces in case the page bundle ships more.
+ for (const [ns, bundle] of Object.entries(resources)) {
+ if (bundle) cached.addResourceBundle(locale, ns, bundle, true, true);
+ }
+ return cached;
+ }
+
+ const fresh = i18next.createInstance();
+ fresh.use(initReactI18next).init({
+ lng: locale,
+ fallbackLng: DEFAULT_LOCALE,
+ supportedLngs: [...SUPPORTED_LOCALE_CODES],
+ ns: [...VIEWER_NAMESPACES],
+ defaultNS: "viewer",
+ fallbackNS: "viewer",
+ interpolation: {
+ // React already escapes — letting i18next double-escape would break
+ // copy that includes `<`/`>` like "AT&T" or "<unknown>".
+ escapeValue: false,
+ },
+ react: {
+ useSuspense: false,
+ },
+ resources: buildResourceTree(locale, resources),
+ returnEmptyString: false,
+ // Saves ~10-15% per render — we never need plurals across languages we
+ // don't ship, so loading all is wasted memory.
+ load: "currentOnly",
+ });
+ clientInstances.set(locale, fresh);
+ return fresh;
+}
+
+/**
+ * Server-side resource loader. Returns a JSON-cloneable record so it can be
+ * passed through `getStaticProps`/`getServerSideProps` as page props and
+ * hydrated on the client without a refetch.
+ *
+ * Locales that don't yet have a translation for a key fall back to English
+ * via i18next's `fallbackLng`, but we always ship the requested locale's
+ * file so the rest of the page is not English-mixed.
+ */
+export async function loadViewerNamespaces(
+ locale: SupportedLocaleCode,
+ namespaces: readonly ViewerNamespace[] = VIEWER_NAMESPACES,
+): Promise<Partial<Record<ViewerNamespace, Record<string, unknown>>>> {
+ const entries = await Promise.all(
+ namespaces.map(async (ns) => {
+ const bundle = await loadNamespaceFile(locale, ns).catch(async () => {
+ // Missing locale file → fall back to English so the namespace is
+ // never undefined. The locale-tagged HTML still says `lang="de"` etc.
+ if (locale !== DEFAULT_LOCALE) {
+ return loadNamespaceFile(DEFAULT_LOCALE, ns);
+ }
+ return {};
+ });
+ return [ns, bundle] as const;
+ }),
+ );
+ return Object.fromEntries(entries);
+}
+
+/**
+ * Static dynamic import so Next.js can analyze it at build time and create a
+ * chunk per (locale, namespace). Using a switch instead of template literals
+ * because Webpack/Turbopack must see literal strings to split correctly.
+ */
+async function loadNamespaceFile(
+ locale: SupportedLocaleCode,
+ namespace: ViewerNamespace,
+): Promise<Record<string, unknown>> {
+ // Each `import(...)` call must be its own literal so the bundler can emit
+ // a separate chunk per locale+namespace pair.
+ // Keep this in lockstep with SUPPORTED_LOCALES and VIEWER_NAMESPACES.
+ switch (locale) {
+ case "en":
+ switch (namespace) {
+ case "access-form":
+ return (await import("../../locales/en/access-form.json")).default;
+ case "dataroom":
+ return (await import("../../locales/en/dataroom.json")).default;
+ case "viewer":
+ return (await import("../../locales/en/viewer.json")).default;
+ }
+ break;
+ case "de":
+ switch (namespace) {
+ case "access-form":
+ return (await import("../../locales/de/access-form.json")).default;
+ case "dataroom":
+ return (await import("../../locales/de/dataroom.json")).default;
+ case "viewer":
+ return (await import("../../locales/de/viewer.json")).default;
+ }
+ break;
+ case "fr":
+ switch (namespace) {
+ case "access-form":
+ return (await import("../../locales/fr/access-form.json")).default;
+ case "dataroom":
+ return (await import("../../locales/fr/dataroom.json")).default;
+ case "viewer":
+ return (await import("../../locales/fr/viewer.json")).default;
+ }
+ break;
+ case "es":
+ switch (namespace) {
+ case "access-form":
+ return (await import("../../locales/es/access-form.json")).default;
+ case "dataroom":
+ return (await import("../../locales/es/dataroom.json")).default;
+ case "viewer":
+ return (await import("../../locales/es/viewer.json")).default;
+ }
+ break;
+ case "it":
+ switch (namespace) {
+ case "access-form":
+ return (await import("../../locales/it/access-form.json")).default;
+ case "dataroom":
+ return (await import("../../locales/it/dataroom.json")).default;
+ case "viewer":
+ return (await import("../../locales/it/viewer.json")).default;
+ }
+ break;
+ case "pt-BR":
+ switch (namespace) {
+ case "access-form":
+ return (await import("../../locales/pt-BR/access-form.json")).default;
+ case "dataroom":
+ return (await import("../../locales/pt-BR/dataroom.json")).default;
+ case "viewer":
+ return (await import("../../locales/pt-BR/viewer.json")).default;
+ }
+ break;
+ case "ja":
+ switch (namespace) {
+ case "access-form":
+ return (await import("../../locales/ja/access-form.json")).default;
+ case "dataroom":
+ return (await import("../../locales/ja/dataroom.json")).default;
+ case "viewer":
+ return (await import("../../locales/ja/viewer.json")).default;
+ }
+ break;
+ }
+ return {};
+}
+
+function buildResourceTree(
+ locale: SupportedLocaleCode,
+ resources: Partial<Record<ViewerNamespace, Record<string, unknown>>>,
+): Resource {
+ const tree: Resource = {};
+ tree[locale] = {};
+ for (const [ns, bundle] of Object.entries(resources)) {
+ if (bundle) tree[locale][ns] = bundle;
+ }
+ return tree;
+}
diff --git a/lib/i18n/viewer-page-props.ts b/lib/i18n/viewer-page-props.ts
new file mode 100644
index 00000000..049b8bdf
--- /dev/null
+++ b/lib/i18n/viewer-page-props.ts
@@ -0,0 +1,38 @@
+/**
+ * Helper for viewer pages that load translation bundles at build/SSR time
+ * and forward them to `<ViewerI18nProvider>`.
+ *
+ * Use in `getStaticProps` / `getServerSideProps` for any page under
+ * `pages/view/**`. The helper:
+ * 1. Reads the brand's `defaultLanguage` (falls back to "en").
+ * 2. Pre-loads bundles for that single locale.
+ * 3. Returns ready-to-spread props for the page.
+ */
+import {
+ DEFAULT_LOCALE,
+ asSupportedLocale,
+ type SupportedLocaleCode,
+ type ViewerNamespace,
+} from "./locales";
+import { loadViewerNamespaces } from "./viewer-i18n";
+
+function getBrandLocale(
+ brand: { defaultLanguage?: string | null } | null | undefined,
+): SupportedLocaleCode {
+ return asSupportedLocale(brand?.defaultLanguage) ?? DEFAULT_LOCALE;
+}
+
+export type ViewerI18nPageProps = {
+ i18n: {
+ locale: SupportedLocaleCode;
+ resources: Partial<Record<ViewerNamespace, Record<string, unknown>>>;
+ };
+};
+
+export async function buildViewerI18nPageProps(
+ brand: { defaultLanguage?: string | null } | null | undefined,
+): Promise<ViewerI18nPageProps> {
+ const locale = getBrandLocale(brand);
+ const resources = await loadViewerNamespaces(locale);
+ return { i18n: { locale, resources } };
+}
diff --git a/locales/de/access-form.json b/locales/de/access-form.json
new file mode 100644
index 00000000..66add5f2
--- /dev/null
+++ b/locales/de/access-form.json
@@ -0,0 +1,55 @@
+{
+ "welcome": {
+ "fallback": "Ihre Aktion ist erforderlich, um fortzufahren"
+ },
+ "buttons": {
+ "continue": "Weiter",
+ "verifying": "Wird verifiziert ..."
+ },
+ "fields": {
+ "email": {
+ "label": "E-Mail-Adresse",
+ "placeholder": "E-Mail eingeben",
+ "errorInvalid": "Bitte geben Sie eine gültige E-Mail-Adresse ein",
+ "sharedWithSender": "Diese Angaben werden mit dem Absender geteilt.",
+ "sharedWithProvider": "Diese Angaben werden mit dem Anbieter der Inhalte geteilt."
+ },
+ "password": {
+ "label": "Zugangscode",
+ "placeholder": "Zugangscode eingeben"
+ },
+ "name": {
+ "label": "Name",
+ "placeholder": "Vollständigen Namen eingeben"
+ },
+ "url": {
+ "errorInvalid": "Bitte geben Sie eine gültige URL ein, die mit https:// beginnt"
+ },
+ "phone": {
+ "placeholderDefault": "+49 30 12345678"
+ }
+ },
+ "agreement": {
+ "fallbackPrefix": "Ich habe die Bedingungen geprüft und akzeptiere sie:"
+ },
+ "verification": {
+ "title": "E-Mail-Adresse bestätigen",
+ "description": "Geben Sie den sechsstelligen Bestätigungscode ein, der an <email>{{email}}</email> gesendet wurde",
+ "errorInvalid": "Ungültiger Code. Bitte versuchen Sie es erneut.",
+ "noEmail": "Keine E-Mail erhalten?",
+ "resending": "Code wird erneut gesendet ...",
+ "resendIn": "Code erneut senden ({{seconds}}s)",
+ "resend": "Code erneut senden"
+ },
+ "footer": {
+ "sharedSecurelyVia": "Dieses Dokument wird sicher mit Ihnen geteilt über",
+ "papermark": "Papermark",
+ "seeHowWeProtect": "Erfahren Sie, wie wir Ihre Daten schützen, in unserer",
+ "privacyPolicy": "Datenschutzerklärung"
+ },
+ "reauth": {
+ "title": "Bestätigen Sie, dass Sie es sind",
+ "description": "Diese Datei wurde von Ihnen hochgeladen. Um sie erneut zu öffnen, bestätigen Sie, dass Sie <email>{{email}}</email> verwalten.",
+ "otpDescription": "Wir haben einen 6-stelligen Code an <email>{{email}}</email> gesendet. Geben Sie ihn unten ein, um auf Ihre hochgeladene Datei zuzugreifen."
+ }
+}
diff --git a/locales/de/dataroom.json b/locales/de/dataroom.json
new file mode 100644
index 00000000..aa5f3748
--- /dev/null
+++ b/locales/de/dataroom.json
@@ -0,0 +1,172 @@
+{
+ "shell": {
+ "dataRoomEyebrow": "Datenraum",
+ "updatedOn": "Aktualisiert {{date}}",
+ "lastUpdated": "Zuletzt aktualisiert {{date}}",
+ "secureFooter": "Geschützt mit",
+ "papermark": "Papermark",
+ "copyright": "© {{year}}{{name}}"
+ },
+ "tabs": {
+ "documents": "Dokumente",
+ "myUploads": "Meine Uploads"
+ },
+ "search": {
+ "placeholder": "Suchen ...",
+ "results": "Suchergebnisse für „{{query}}“",
+ "resultCount_one": "({{count}} Ergebnis in allen Ordnern)",
+ "resultCount_other": "({{count}} Ergebnisse in allen Ordnern)",
+ "noMatches": "Keine Dokumente entsprechen Ihrer Suche."
+ },
+ "breadcrumb": {
+ "home": "Übersicht"
+ },
+ "empty": {
+ "noItems": "Keine Elemente verfügbar.",
+ "noUploads": "Noch keine Uploads. Laden Sie Dokumente über die Schaltfläche „Dokument hinzufügen“ hoch."
+ },
+ "cards": {
+ "updated": "Aktualisiert {{when}}",
+ "processing": "(Wird verarbeitet ...)",
+ "actionsLabel": "Aktionen",
+ "download": "Herunterladen",
+ "openMenu": "Menü öffnen",
+ "openDocument": "Dokument {{name}} öffnen",
+ "openFolder": "Ordner {{name}} öffnen",
+ "documents": "Dokumente",
+ "folder": "Ordner",
+ "folderBadge": "ORDNER"
+ },
+ "compactList": {
+ "name": "Name",
+ "updated": "Aktualisiert",
+ "settings": "Einstellungen"
+ },
+ "trailingActions": {
+ "viewQA": "F&A anzeigen",
+ "downloadDataroom": "Datenraum herunterladen",
+ "teamMemberTooltip": "Verifizierung übersprungen, da Sie Teammitglied sind; es werden keine Analysen erfasst"
+ },
+ "navToasts": {
+ "cannotDownloadPreview": "Im Vorschaumodus können Sie keine Datenräume herunterladen.",
+ "cannotDownloadDocPreview": "Im Vorschaumodus können Sie keine Datenraumdokumente herunterladen.",
+ "cannotDownloadFolderPreview": "Im Vorschaumodus können Sie keine Datenraumordner herunterladen.",
+ "foldersNotAllowed": "Das Herunterladen von Ordnern ist nicht erlaubt.",
+ "enterEmailFirst": "Geben Sie Ihre E-Mail im Datenraum ein, um herunterzuladen.",
+ "documentStillProcessing": "Dokument wird noch verarbeitet. Bitte warten Sie einen Moment und versuchen Sie es erneut.",
+ "downloadPreparing": "Download wird vorbereitet ...",
+ "downloadSuccess": "Datei erfolgreich heruntergeladen",
+ "downloadFailed": "Datei konnte nicht heruntergeladen werden"
+ },
+ "intro": {
+ "viewIntroduction": "Einführung anzeigen",
+ "title": "Willkommen bei {{name}}",
+ "defaultName": "Datenraum",
+ "continueButton": "Weiter zum Datenraum"
+ },
+ "upload": {
+ "trigger": "Dokument hinzufügen",
+ "title": "Dokument in den Datenraum hochladen",
+ "description": "Ihr Dokument erscheint sofort im Datenraum und wird im Hintergrund verarbeitet.",
+ "destinationLabel": "Zielordner",
+ "selectDestination": "Zielordner auswählen",
+ "uploadingTo": "Hochladen nach:",
+ "setByOwner": "(festgelegt vom Datenraum-Inhaber)",
+ "success": "Dokument erfolgreich hochgeladen!",
+ "successDescription": "Ihr Dokument ist jetzt im Datenraum sichtbar."
+ },
+ "download": {
+ "folderTitle": "Ordner herunterladen: {{name}}",
+ "dataroomTitle": "{{name}} herunterladen",
+ "defaultName": "Datenraum",
+ "chooseDescription": "Download starten. Optional erhalten Sie eine E-Mail, sobald er bereit ist.",
+ "otpDescription": "Bestätigen Sie Ihre E-Mail, um Download-Benachrichtigungen zu erhalten.",
+ "ready": "Ihre Dateien sind zum Download bereit.",
+ "preparing": "Ihre Dateien werden vorbereitet ...",
+ "notifyByEmail": "Benachrichtigen Sie mich per E-Mail, wenn der Download bereit ist",
+ "needsVerification": "Sie müssen Ihre E-Mail zuvor mit einem Einmalcode bestätigen.",
+ "starting": "Wird gestartet ...",
+ "start": "Download starten",
+ "cancel": "Abbrechen",
+ "viewDownloads": "Ihre Downloads anzeigen",
+ "openDownloads": "Downloads-Seite öffnen",
+ "preparingShort": "Wird vorbereitet ...",
+ "processingFiles": "{{processed}} von {{total}} Dateien werden verarbeitet ...",
+ "complete": "Ihr Download ist bereit!",
+ "failed": "Download fehlgeschlagen.",
+ "downloadZip": "ZIP herunterladen",
+ "downloadAll": "Alle herunterladen ({{count}} Teile)",
+ "downloadingProgress": "{{current}} von {{total}} wird heruntergeladen ...",
+ "part": "Teil {{index}}",
+ "expiresIn": "Läuft ab in {{time}}",
+ "expiresLessThanHour": "weniger als einer Stunde",
+ "expiresDays_one": "{{count}} Tag",
+ "expiresDays_other": "{{count}} Tagen",
+ "expiresHours_one": "{{count}} Stunde",
+ "expiresHours_other": "{{count}} Stunden",
+ "willEmailWhenReady": "Sie können dies schließen. Wir senden Ihnen eine E-Mail, wenn es bereit ist.",
+ "checkBackOnDownloads": "Sie können dies schließen. Schauen Sie auf der Downloads-Seite vorbei, wenn es bereit ist.",
+ "tryAgain": "Erneut versuchen",
+ "startFailed": "Download konnte nicht gestartet werden",
+ "statusFetchFailed": "Status konnte nicht abgerufen werden",
+ "expiresSoon": "in Kürze"
+ },
+ "downloadsPage": {
+ "title": "Ihre Downloads",
+ "description": "Laden Sie unten Ihre vorbereiteten Dateien herunter. Die Links laufen nach 3 Tagen ab.",
+ "emailHeading": "Ihre Downloads anzeigen",
+ "emailDescription": "Geben Sie die E-Mail-Adresse ein, mit der Sie auf diesen Datenraum zugegriffen haben.",
+ "emailPlaceholder": "[email protected]",
+ "sendingCode": "Code wird gesendet ...",
+ "continueButton": "Weiter",
+ "verifyEmailHeading": "E-Mail bestätigen",
+ "empty": "Sie haben noch keine Downloads. Starten Sie einen Download im Datenraum, um ihn hier zu sehen.",
+ "jobFolderPrefix": "Ordner:",
+ "jobFullDataroom": "Gesamter Datenraum",
+ "expired": "abgelaufen",
+ "expiresPrefix": "Läuft ab {{time}}",
+ "hideParts": "Teile ausblenden",
+ "showParts": "Teile anzeigen ({{count}})",
+ "orIndividual": "Oder einzeln herunterladen:",
+ "partOf": "Teil {{index}} von {{total}}",
+ "errors": {
+ "noAccess": "Für diese E-Mail wurde kein Zugang gefunden. Verwenden Sie die E-Mail, mit der Sie den Datenraum geöffnet haben.",
+ "rateLimit": "Zu viele Anfragen. Bitte versuchen Sie es später erneut.",
+ "generic": "Etwas ist schiefgelaufen."
+ }
+ },
+ "downloadOtp": {
+ "defaultDescription": "Wir haben einen 6-stelligen Code an <email>{{email}}</email> gesendet. Geben Sie ihn unten ein, um sich zu verifizieren und Download-Benachrichtigungen zu erhalten.",
+ "verify": "Bestätigen",
+ "verifying": "Wird bestätigt ...",
+ "noEmail": "Keine E-Mail erhalten?",
+ "resending": "Wird gesendet ...",
+ "resend": "Code erneut senden",
+ "resendIn": "Code erneut senden ({{seconds}} s)",
+ "sendFailed": "Code konnte nicht gesendet werden",
+ "invalidCode": "Ungültiger Code"
+ },
+ "downloadsPanel": {
+ "ready": "Bereit",
+ "failedFallback": "Fehlgeschlagen",
+ "creatingZip": "ZIP wird erstellt ...",
+ "filesCount": "{{processed}} / {{total}} Dateien",
+ "verifying": "Zugriff wird überprüft ...",
+ "buildingFileList": "Dateiliste wird erstellt ...",
+ "preparing": "Wird vorbereitet ..."
+ },
+ "folderPicker": {
+ "home": "Übersicht"
+ },
+ "indexFile": {
+ "trigger": "Indexdatei generieren",
+ "title": "Datenraum-Indexdatei generieren",
+ "description": "Wählen Sie ein Format, um die Indexdatei zu generieren.",
+ "selectFormat": "Format auswählen",
+ "generate": "Generieren",
+ "generating": "Wird generiert...",
+ "successToast": "Indexdatei erfolgreich generiert",
+ "errorToast": "Index konnte nicht generiert werden",
+ "genericError": "Etwas ist schiefgelaufen. Bitte versuchen Sie es erneut."
+ }
+}
diff --git a/locales/de/viewer.json b/locales/de/viewer.json
new file mode 100644
index 00000000..e9ff487b
--- /dev/null
+++ b/locales/de/viewer.json
@@ -0,0 +1,58 @@
+{
+ "nav": {
+ "home": "Übersicht",
+ "viewQA": "F&A anzeigen",
+ "linksOnPage": "Links auf der Seite",
+ "linksOnCurrentPage": "Links auf der aktuellen Seite",
+ "zoomIn": "Vergrößern",
+ "zoomOut": "Verkleinern",
+ "fullscreen": "Vollbild",
+ "downloadDocument": "Dokument herunterladen",
+ "teamMemberTooltip": "Verifizierung übersprungen, da Sie Teammitglied sind; es werden keine Analysen erfasst",
+ "changeLanguage": "Sprache ändern"
+ },
+ "toasts": {
+ "preparingDownload": "Download wird vorbereitet ...",
+ "preparingDownloadWatermark": "Download mit Wasserzeichen wird vorbereitet ...",
+ "downloadSuccess": "Datei erfolgreich heruntergeladen",
+ "downloadFailed": "Datei konnte nicht heruntergeladen werden",
+ "cannotDownloadPreview": "Im Vorschaumodus können Sie keine Dokumente herunterladen."
+ },
+ "downloadOnly": {
+ "title": "Dokument herunterladen",
+ "description": "Dieses Dokument steht nur zum Download zur Verfügung",
+ "button": "Jetzt herunterladen"
+ },
+ "awayPoster": {
+ "title": "Wir haben pausiert, um Ihre Sitzung zu schützen",
+ "description": "Sie waren seit {{duration}} inaktiv, daher haben wir die Dokumentvorschau pausiert, um die Sitzung sicher zu halten.",
+ "ariaTitle": "Benachrichtigung über automatisch pausierte Sitzung",
+ "ariaDescription": "Ihre Sitzung wurde aufgrund von Inaktivität pausiert. Klicken Sie auf Fortsetzen oder bewegen Sie die Maus, um fortzufahren.",
+ "badge": "Automatisch pausiert",
+ "idleFor": "{{duration}} inaktiv",
+ "minSec": "{{minutes}} Min. {{seconds}} Sek.",
+ "minOnly": "{{minutes}} Min.",
+ "secOnly": "{{seconds}} Sek.",
+ "resume": "Dort fortfahren, wo Sie aufgehört haben",
+ "moveHint": "Oder bewegen Sie einfach die Maus oder drücken Sie eine Taste, um fortzufahren"
+ },
+ "poweredBy": {
+ "shareDocsVia": "Dokumente teilen über"
+ },
+ "report": {
+ "trigger": "Missbrauch melden",
+ "title": "Problem melden",
+ "description": "Etwas Unangemessenes entdeckt? Wir prüfen den Vorfall und ergreifen gegebenenfalls Maßnahmen.",
+ "submit": "Meldung senden",
+ "successToast": "Meldung erfolgreich übermittelt",
+ "selectTypeError": "Bitte wählen Sie eine Missbrauchsart aus.",
+ "types": {
+ "spam": "Spam, Betrug oder Scam",
+ "malware": "Schadsoftware oder Virus",
+ "copyright": "Urheberrechtsverletzung",
+ "harmful": "Schädlicher Inhalt",
+ "notWorking": "Inhalt funktioniert nicht ordnungsgemäß",
+ "other": "Sonstiges"
+ }
+ }
+}
diff --git a/locales/en/access-form.json b/locales/en/access-form.json
new file mode 100644
index 00000000..d77bbc5b
--- /dev/null
+++ b/locales/en/access-form.json
@@ -0,0 +1,55 @@
+{
+ "welcome": {
+ "fallback": "Your action is requested to continue"
+ },
+ "buttons": {
+ "continue": "Continue",
+ "verifying": "Verifying..."
+ },
+ "fields": {
+ "email": {
+ "label": "Email address",
+ "placeholder": "Enter email",
+ "errorInvalid": "Please enter a valid email address",
+ "sharedWithSender": "This data will be shared with the sender.",
+ "sharedWithProvider": "This data will be shared with the content provider."
+ },
+ "password": {
+ "label": "Passcode",
+ "placeholder": "Enter passcode"
+ },
+ "name": {
+ "label": "Name",
+ "placeholder": "Enter your full name"
+ },
+ "url": {
+ "errorInvalid": "Please enter a valid URL starting with https://"
+ },
+ "phone": {
+ "placeholderDefault": "+1 123 456 7890"
+ }
+ },
+ "agreement": {
+ "fallbackPrefix": "I have reviewed and agree to the terms of this"
+ },
+ "verification": {
+ "title": "Verify your email address",
+ "description": "Enter the six digit verification code sent to <email>{{email}}</email>",
+ "errorInvalid": "Invalid code. Please try again.",
+ "noEmail": "Didn't receive the email?",
+ "resending": "Resending code...",
+ "resendIn": "Resend Code ({{seconds}}s)",
+ "resend": "Resend Code"
+ },
+ "footer": {
+ "sharedSecurelyVia": "This document is securely shared with you using",
+ "papermark": "Papermark",
+ "seeHowWeProtect": "See how we protect your data in our",
+ "privacyPolicy": "Privacy Policy"
+ },
+ "reauth": {
+ "title": "Verify it's you",
+ "description": "This file was uploaded by you. To reopen it, confirm you control <email>{{email}}</email>.",
+ "otpDescription": "We sent a 6-digit code to <email>{{email}}</email>. Enter it below to access your uploaded file."
+ }
+}
diff --git a/locales/en/dataroom.json b/locales/en/dataroom.json
new file mode 100644
index 00000000..0c4c70fc
--- /dev/null
+++ b/locales/en/dataroom.json
@@ -0,0 +1,172 @@
+{
+ "shell": {
+ "dataRoomEyebrow": "Data room",
+ "updatedOn": "Updated {{date}}",
+ "lastUpdated": "Last updated {{date}}",
+ "secureFooter": "Secured by",
+ "papermark": "Papermark",
+ "copyright": "© {{year}}{{name}}"
+ },
+ "tabs": {
+ "documents": "Documents",
+ "myUploads": "My Uploads"
+ },
+ "search": {
+ "placeholder": "Search...",
+ "results": "Search results for \"{{query}}\"",
+ "resultCount_one": "({{count}} result across all folders)",
+ "resultCount_other": "({{count}} results across all folders)",
+ "noMatches": "No documents match your search."
+ },
+ "breadcrumb": {
+ "home": "Home"
+ },
+ "empty": {
+ "noItems": "No items available.",
+ "noUploads": "No uploads yet. Upload documents using the \"Add Document\" button."
+ },
+ "cards": {
+ "updated": "Updated {{when}}",
+ "processing": "(Processing...)",
+ "actionsLabel": "Actions",
+ "download": "Download",
+ "openMenu": "Open menu",
+ "openDocument": "Open document {{name}}",
+ "openFolder": "Open folder {{name}}",
+ "documents": "Documents",
+ "folder": "Folder",
+ "folderBadge": "FOLDER"
+ },
+ "compactList": {
+ "name": "Name",
+ "updated": "Updated",
+ "settings": "Settings"
+ },
+ "trailingActions": {
+ "viewQA": "View Q&A",
+ "downloadDataroom": "Download Dataroom",
+ "teamMemberTooltip": "Skipped verification because you are a team member; no analytics will be collected"
+ },
+ "navToasts": {
+ "cannotDownloadPreview": "You cannot download datarooms in preview mode.",
+ "cannotDownloadDocPreview": "You cannot download dataroom document in preview mode.",
+ "cannotDownloadFolderPreview": "You cannot download dataroom folders in preview mode.",
+ "foldersNotAllowed": "Downloading folders is not allowed.",
+ "enterEmailFirst": "Enter your email in the dataroom to download.",
+ "documentStillProcessing": "Document is still processing. Please wait a moment and try again.",
+ "downloadPreparing": "Preparing download...",
+ "downloadSuccess": "File downloaded successfully",
+ "downloadFailed": "Failed to download file"
+ },
+ "intro": {
+ "viewIntroduction": "View introduction",
+ "title": "Welcome to {{name}}",
+ "defaultName": "Data Room",
+ "continueButton": "Continue to Data Room"
+ },
+ "upload": {
+ "trigger": "Add Document",
+ "title": "Upload Document to Dataroom",
+ "description": "Your document will appear immediately in the dataroom and will be processed in the background.",
+ "destinationLabel": "Destination folder",
+ "selectDestination": "Select destination folder",
+ "uploadingTo": "Uploading to:",
+ "setByOwner": "(set by the dataroom owner)",
+ "success": "Document uploaded successfully!",
+ "successDescription": "Your document is now visible in the dataroom."
+ },
+ "download": {
+ "folderTitle": "Download folder: {{name}}",
+ "dataroomTitle": "Download {{name}}",
+ "defaultName": "Dataroom",
+ "chooseDescription": "Start the download. You can optionally get an email when it's ready.",
+ "otpDescription": "Verify your email to receive download notifications.",
+ "ready": "Your files are ready to download.",
+ "preparing": "Preparing your files...",
+ "notifyByEmail": "Notify me by email when the download is ready",
+ "needsVerification": "You'll need to verify your email with a one-time code first.",
+ "starting": "Starting...",
+ "start": "Start download",
+ "cancel": "Cancel",
+ "viewDownloads": "View your downloads",
+ "openDownloads": "Open downloads page",
+ "preparingShort": "Preparing...",
+ "processingFiles": "Processing {{processed}} of {{total}} files...",
+ "complete": "Your download is ready!",
+ "failed": "Download failed.",
+ "downloadZip": "Download ZIP",
+ "downloadAll": "Download all ({{count}} parts)",
+ "downloadingProgress": "Downloading {{current}} of {{total}}...",
+ "part": "Part {{index}}",
+ "expiresIn": "Expires in {{time}}",
+ "expiresLessThanHour": "less than an hour",
+ "expiresDays_one": "{{count}} day",
+ "expiresDays_other": "{{count}} days",
+ "expiresHours_one": "{{count}} hour",
+ "expiresHours_other": "{{count}} hours",
+ "willEmailWhenReady": "You can close this. We'll email you when it's ready.",
+ "checkBackOnDownloads": "You can close this. Check back on the downloads page when it's ready.",
+ "tryAgain": "Try again",
+ "startFailed": "Failed to start download",
+ "statusFetchFailed": "Failed to fetch status",
+ "expiresSoon": "soon"
+ },
+ "downloadsPage": {
+ "title": "Your downloads",
+ "description": "Download your prepared files below. Links expire after 3 days.",
+ "emailHeading": "View your downloads",
+ "emailDescription": "Enter the email you used to access this dataroom.",
+ "emailPlaceholder": "[email protected]",
+ "sendingCode": "Sending code...",
+ "continueButton": "Continue",
+ "verifyEmailHeading": "Verify your email",
+ "empty": "You have no downloads yet. Start a download from the dataroom to see it here.",
+ "jobFolderPrefix": "Folder:",
+ "jobFullDataroom": "Full dataroom",
+ "expired": "expired",
+ "expiresPrefix": "Expires {{time}}",
+ "hideParts": "Hide parts",
+ "showParts": "Show parts ({{count}})",
+ "orIndividual": "Or download individually:",
+ "partOf": "Part {{index}} of {{total}}",
+ "errors": {
+ "noAccess": "No access found for this email. Use the email you used to open the dataroom.",
+ "rateLimit": "Too many requests. Please try again later.",
+ "generic": "Something went wrong."
+ }
+ },
+ "downloadOtp": {
+ "defaultDescription": "We sent a 6-digit code to <email>{{email}}</email>. Enter it below to verify and receive download notifications.",
+ "verify": "Verify",
+ "verifying": "Verifying...",
+ "noEmail": "Didn't receive the email?",
+ "resending": "Sending...",
+ "resend": "Resend code",
+ "resendIn": "Resend code ({{seconds}}s)",
+ "sendFailed": "Failed to send code",
+ "invalidCode": "Invalid code"
+ },
+ "downloadsPanel": {
+ "ready": "Ready",
+ "failedFallback": "Failed",
+ "creatingZip": "Creating ZIP...",
+ "filesCount": "{{processed}} / {{total}} files",
+ "verifying": "Verifying access...",
+ "buildingFileList": "Building file list...",
+ "preparing": "Preparing..."
+ },
+ "folderPicker": {
+ "home": "Home"
+ },
+ "indexFile": {
+ "trigger": "Generate Index File",
+ "title": "Generate Dataroom Index File",
+ "description": "Select a format to generate the index file.",
+ "selectFormat": "Select Format",
+ "generate": "Generate",
+ "generating": "Generating...",
+ "successToast": "Index file generated successfully",
+ "errorToast": "Failed to generate index",
+ "genericError": "Something went wrong. Please try again."
+ }
+}
diff --git a/locales/en/viewer.json b/locales/en/viewer.json
new file mode 100644
index 00000000..b50571cb
--- /dev/null
+++ b/locales/en/viewer.json
@@ -0,0 +1,58 @@
+{
+ "nav": {
+ "home": "Home",
+ "viewQA": "View Q&A",
+ "linksOnPage": "Links on Page",
+ "linksOnCurrentPage": "Links on current page",
+ "zoomIn": "Zoom in",
+ "zoomOut": "Zoom out",
+ "fullscreen": "Fullscreen",
+ "downloadDocument": "Download document",
+ "teamMemberTooltip": "Skipped verification because you are a team member; no analytics will be collected",
+ "changeLanguage": "Change language"
+ },
+ "toasts": {
+ "preparingDownload": "Preparing download...",
+ "preparingDownloadWatermark": "Preparing download with watermark...",
+ "downloadSuccess": "File downloaded successfully",
+ "downloadFailed": "Failed to download file",
+ "cannotDownloadPreview": "You cannot download documents in preview mode."
+ },
+ "downloadOnly": {
+ "title": "Download Document",
+ "description": "This document is available for download only",
+ "button": "Download Now"
+ },
+ "awayPoster": {
+ "title": "We paused to protect your session",
+ "description": "You were inactive since {{duration}}, so we paused the document preview to keep session safe.",
+ "ariaTitle": "Auto-paused session notification",
+ "ariaDescription": "Your session was paused due to inactivity. Click continue or move your mouse to resume.",
+ "badge": "Auto-paused",
+ "idleFor": "{{duration}} idle",
+ "minSec": "{{minutes}}min {{seconds}}sec",
+ "minOnly": "{{minutes}}min",
+ "secOnly": "{{seconds}}sec",
+ "resume": "Continue where you left off",
+ "moveHint": "Or just move your mouse or press any key to continue"
+ },
+ "poweredBy": {
+ "shareDocsVia": "Share docs via"
+ },
+ "report": {
+ "trigger": "Report abuse",
+ "title": "Report an issue",
+ "description": "See something inappropriate? We will take a look and, when appropriate, take action.",
+ "submit": "Submit Report",
+ "successToast": "Report submitted successfully",
+ "selectTypeError": "Please select an abuse type.",
+ "types": {
+ "spam": "Spam, Fraud, or Scam",
+ "malware": "Malware or virus",
+ "copyright": "Copyright violation",
+ "harmful": "Harmful content",
+ "notWorking": "Content is not working properly",
+ "other": "Other"
+ }
+ }
+}
diff --git a/locales/es/access-form.json b/locales/es/access-form.json
new file mode 100644
index 00000000..104c69de
--- /dev/null
+++ b/locales/es/access-form.json
@@ -0,0 +1,55 @@
+{
+ "welcome": {
+ "fallback": "Se requiere su acción para continuar"
+ },
+ "buttons": {
+ "continue": "Continuar",
+ "verifying": "Verificando..."
+ },
+ "fields": {
+ "email": {
+ "label": "Correo electrónico",
+ "placeholder": "Introduzca el correo electrónico",
+ "errorInvalid": "Introduzca una dirección de correo electrónico válida",
+ "sharedWithSender": "Estos datos se compartirán con el remitente.",
+ "sharedWithProvider": "Estos datos se compartirán con el proveedor del contenido."
+ },
+ "password": {
+ "label": "Código de acceso",
+ "placeholder": "Introduzca el código de acceso"
+ },
+ "name": {
+ "label": "Nombre",
+ "placeholder": "Introduzca su nombre completo"
+ },
+ "url": {
+ "errorInvalid": "Introduzca una URL válida que comience con https://"
+ },
+ "phone": {
+ "placeholderDefault": "+34 612 34 56 78"
+ }
+ },
+ "agreement": {
+ "fallbackPrefix": "He revisado y acepto los términos de este"
+ },
+ "verification": {
+ "title": "Verifique su correo electrónico",
+ "description": "Introduzca el código de verificación de seis dígitos enviado a <email>{{email}}</email>",
+ "errorInvalid": "Código no válido. Inténtelo de nuevo.",
+ "noEmail": "¿No ha recibido el correo electrónico?",
+ "resending": "Reenviando código...",
+ "resendIn": "Reenviar código ({{seconds}} s)",
+ "resend": "Reenviar código"
+ },
+ "footer": {
+ "sharedSecurelyVia": "Este documento se comparte con usted de forma segura mediante",
+ "papermark": "Papermark",
+ "seeHowWeProtect": "Vea cómo protegemos sus datos en nuestra",
+ "privacyPolicy": "Política de privacidad"
+ },
+ "reauth": {
+ "title": "Verifique que es usted",
+ "description": "Este archivo fue subido por usted. Para volver a abrirlo, confirme que controla <email>{{email}}</email>.",
+ "otpDescription": "Le hemos enviado un código de 6 dígitos a <email>{{email}}</email>. Introdúzcalo a continuación para acceder a su archivo."
+ }
+}
diff --git a/locales/es/dataroom.json b/locales/es/dataroom.json
new file mode 100644
index 00000000..b57e788a
--- /dev/null
+++ b/locales/es/dataroom.json
@@ -0,0 +1,172 @@
+{
+ "shell": {
+ "dataRoomEyebrow": "Sala de datos",
+ "updatedOn": "Actualizado el {{date}}",
+ "lastUpdated": "Última actualización: {{date}}",
+ "secureFooter": "Protegido por",
+ "papermark": "Papermark",
+ "copyright": "© {{year}}{{name}}"
+ },
+ "tabs": {
+ "documents": "Documentos",
+ "myUploads": "Mis subidas"
+ },
+ "search": {
+ "placeholder": "Buscar...",
+ "results": "Resultados de búsqueda de «{{query}}»",
+ "resultCount_one": "({{count}} resultado en todas las carpetas)",
+ "resultCount_other": "({{count}} resultados en todas las carpetas)",
+ "noMatches": "Ningún documento coincide con su búsqueda."
+ },
+ "breadcrumb": {
+ "home": "Inicio"
+ },
+ "empty": {
+ "noItems": "No hay elementos disponibles.",
+ "noUploads": "Aún no hay subidas. Suba documentos con el botón «Añadir documento»."
+ },
+ "cards": {
+ "updated": "Actualizado {{when}}",
+ "processing": "(Procesando...)",
+ "actionsLabel": "Acciones",
+ "download": "Descargar",
+ "openMenu": "Abrir menú",
+ "openDocument": "Abrir documento {{name}}",
+ "openFolder": "Abrir carpeta {{name}}",
+ "documents": "Documentos",
+ "folder": "Carpeta",
+ "folderBadge": "CARPETA"
+ },
+ "compactList": {
+ "name": "Nombre",
+ "updated": "Actualizado",
+ "settings": "Ajustes"
+ },
+ "trailingActions": {
+ "viewQA": "Ver preguntas y respuestas",
+ "downloadDataroom": "Descargar sala de datos",
+ "teamMemberTooltip": "Verificación omitida porque es miembro del equipo; no se recopilarán datos analíticos"
+ },
+ "navToasts": {
+ "cannotDownloadPreview": "No puede descargar salas de datos en modo vista previa.",
+ "cannotDownloadDocPreview": "No puede descargar documentos de la sala de datos en modo vista previa.",
+ "cannotDownloadFolderPreview": "No puede descargar carpetas de la sala de datos en modo vista previa.",
+ "foldersNotAllowed": "No se permite descargar carpetas.",
+ "enterEmailFirst": "Introduzca su correo electrónico en la sala de datos para descargar.",
+ "documentStillProcessing": "El documento aún se está procesando. Espere un momento e inténtelo de nuevo.",
+ "downloadPreparing": "Preparando la descarga...",
+ "downloadSuccess": "Archivo descargado correctamente",
+ "downloadFailed": "No se pudo descargar el archivo"
+ },
+ "intro": {
+ "viewIntroduction": "Ver introducción",
+ "title": "Bienvenido a {{name}}",
+ "defaultName": "Sala de datos",
+ "continueButton": "Continuar a la sala de datos"
+ },
+ "upload": {
+ "trigger": "Añadir documento",
+ "title": "Subir documento a la sala de datos",
+ "description": "Su documento aparecerá inmediatamente en la sala de datos y se procesará en segundo plano.",
+ "destinationLabel": "Carpeta de destino",
+ "selectDestination": "Seleccionar carpeta de destino",
+ "uploadingTo": "Subiendo a:",
+ "setByOwner": "(establecido por el propietario de la sala de datos)",
+ "success": "¡Documento subido correctamente!",
+ "successDescription": "Su documento ya está visible en la sala de datos."
+ },
+ "download": {
+ "folderTitle": "Descargar carpeta: {{name}}",
+ "dataroomTitle": "Descargar {{name}}",
+ "defaultName": "Sala de datos",
+ "chooseDescription": "Inicie la descarga. Opcionalmente puede recibir un correo electrónico cuando esté lista.",
+ "otpDescription": "Verifique su correo electrónico para recibir notificaciones de descarga.",
+ "ready": "Sus archivos están listos para descargar.",
+ "preparing": "Preparando sus archivos...",
+ "notifyByEmail": "Avisarme por correo electrónico cuando la descarga esté lista",
+ "needsVerification": "Primero deberá verificar su correo electrónico con un código de un solo uso.",
+ "starting": "Iniciando...",
+ "start": "Iniciar descarga",
+ "cancel": "Cancelar",
+ "viewDownloads": "Ver sus descargas",
+ "openDownloads": "Abrir página de descargas",
+ "preparingShort": "Preparando...",
+ "processingFiles": "Procesando {{processed}} de {{total}} archivos...",
+ "complete": "¡Su descarga está lista!",
+ "failed": "La descarga ha fallado.",
+ "downloadZip": "Descargar ZIP",
+ "downloadAll": "Descargar todo ({{count}} partes)",
+ "downloadingProgress": "Descargando {{current}} de {{total}}...",
+ "part": "Parte {{index}}",
+ "expiresIn": "Caduca en {{time}}",
+ "expiresLessThanHour": "menos de una hora",
+ "expiresDays_one": "{{count}} día",
+ "expiresDays_other": "{{count}} días",
+ "expiresHours_one": "{{count}} hora",
+ "expiresHours_other": "{{count}} horas",
+ "willEmailWhenReady": "Puede cerrar esta ventana. Le enviaremos un correo electrónico cuando esté listo.",
+ "checkBackOnDownloads": "Puede cerrar esta ventana. Vuelva a la página de descargas cuando esté listo.",
+ "tryAgain": "Reintentar",
+ "startFailed": "No se pudo iniciar la descarga",
+ "statusFetchFailed": "No se pudo obtener el estado",
+ "expiresSoon": "pronto"
+ },
+ "downloadsPage": {
+ "title": "Sus descargas",
+ "description": "Descargue sus archivos preparados a continuación. Los enlaces caducan después de 3 días.",
+ "emailHeading": "Ver sus descargas",
+ "emailDescription": "Introduzca el correo electrónico con el que accedió a esta sala de datos.",
+ "emailPlaceholder": "[email protected]",
+ "sendingCode": "Enviando código...",
+ "continueButton": "Continuar",
+ "verifyEmailHeading": "Verifique su correo electrónico",
+ "empty": "Aún no tiene descargas. Inicie una descarga desde la sala de datos para verla aquí.",
+ "jobFolderPrefix": "Carpeta:",
+ "jobFullDataroom": "Sala de datos completa",
+ "expired": "caducado",
+ "expiresPrefix": "Caduca en {{time}}",
+ "hideParts": "Ocultar partes",
+ "showParts": "Mostrar partes ({{count}})",
+ "orIndividual": "O descárguelo individualmente:",
+ "partOf": "Parte {{index}} de {{total}}",
+ "errors": {
+ "noAccess": "No se encontró acceso para este correo. Utilice el correo con el que abrió la sala de datos.",
+ "rateLimit": "Demasiadas solicitudes. Inténtelo de nuevo más tarde.",
+ "generic": "Algo salió mal."
+ }
+ },
+ "downloadOtp": {
+ "defaultDescription": "Le enviamos un código de 6 dígitos a <email>{{email}}</email>. Introdúzcalo a continuación para verificar su identidad y recibir notificaciones de descarga.",
+ "verify": "Verificar",
+ "verifying": "Verificando...",
+ "noEmail": "¿No recibió el correo?",
+ "resending": "Enviando...",
+ "resend": "Reenviar código",
+ "resendIn": "Podrá reenviar el código en {{seconds}} s",
+ "sendFailed": "No se pudo enviarle el código",
+ "invalidCode": "El código introducido no es válido"
+ },
+ "downloadsPanel": {
+ "ready": "Listo",
+ "failedFallback": "Fallido",
+ "creatingZip": "Creando ZIP...",
+ "filesCount": "{{processed}} / {{total}} archivos",
+ "verifying": "Verificando acceso...",
+ "buildingFileList": "Creando lista de archivos...",
+ "preparing": "Preparando..."
+ },
+ "folderPicker": {
+ "home": "Inicio"
+ },
+ "indexFile": {
+ "trigger": "Generar archivo de índice",
+ "title": "Generar archivo de índice de la sala de datos",
+ "description": "Seleccione un formato para generar el archivo de índice.",
+ "selectFormat": "Seleccione un formato",
+ "generate": "Generar",
+ "generating": "Generando...",
+ "successToast": "El archivo de índice se generó correctamente",
+ "errorToast": "No se pudo generar el archivo de índice",
+ "genericError": "Algo salió mal. Por favor, inténtelo de nuevo."
+ }
+}
diff --git a/locales/es/viewer.json b/locales/es/viewer.json
new file mode 100644
index 00000000..15aa5736
--- /dev/null
+++ b/locales/es/viewer.json
@@ -0,0 +1,58 @@
+{
+ "nav": {
+ "home": "Inicio",
+ "viewQA": "Ver preguntas y respuestas",
+ "linksOnPage": "Enlaces en la página",
+ "linksOnCurrentPage": "Enlaces en la página actual",
+ "zoomIn": "Acercar",
+ "zoomOut": "Alejar",
+ "fullscreen": "Pantalla completa",
+ "downloadDocument": "Descargar documento",
+ "teamMemberTooltip": "Verificación omitida porque es miembro del equipo; no se recopilarán datos analíticos",
+ "changeLanguage": "Cambiar idioma"
+ },
+ "toasts": {
+ "preparingDownload": "Preparando la descarga...",
+ "preparingDownloadWatermark": "Preparando la descarga con marca de agua...",
+ "downloadSuccess": "Archivo descargado correctamente",
+ "downloadFailed": "No se pudo descargar el archivo",
+ "cannotDownloadPreview": "No puede descargar documentos en modo vista previa."
+ },
+ "downloadOnly": {
+ "title": "Descargar documento",
+ "description": "Este documento solo está disponible para descarga",
+ "button": "Descargar ahora"
+ },
+ "awayPoster": {
+ "title": "Hemos pausado para proteger su sesión",
+ "description": "Ha estado inactivo durante {{duration}}, por lo que hemos pausado la vista previa del documento para mantener la sesión segura.",
+ "ariaTitle": "Notificación de sesión pausada automáticamente",
+ "ariaDescription": "Su sesión se ha pausado por inactividad. Haga clic en continuar o mueva el ratón para reanudar.",
+ "badge": "Pausado automáticamente",
+ "idleFor": "{{duration}} inactivo",
+ "minSec": "{{minutes}} min {{seconds}} s",
+ "minOnly": "{{minutes}} min",
+ "secOnly": "{{seconds}} s",
+ "resume": "Continuar donde lo dejó",
+ "moveHint": "O simplemente mueva el ratón o pulse cualquier tecla para continuar"
+ },
+ "poweredBy": {
+ "shareDocsVia": "Compartir documentos vía"
+ },
+ "report": {
+ "trigger": "Denunciar abuso",
+ "title": "Reportar un problema",
+ "description": "¿Ves algo inapropiado? Lo revisaremos y, si corresponde, tomaremos medidas.",
+ "submit": "Enviar reporte",
+ "successToast": "Reporte enviado correctamente",
+ "selectTypeError": "Por favor selecciona un tipo de abuso.",
+ "types": {
+ "spam": "Spam, fraude o estafa",
+ "malware": "Malware o virus",
+ "copyright": "Violación de derechos de autor",
+ "harmful": "Contenido dañino",
+ "notWorking": "El contenido no funciona correctamente",
+ "other": "Otro"
+ }
+ }
+}
diff --git a/locales/fr/access-form.json b/locales/fr/access-form.json
new file mode 100644
index 00000000..d11ae55f
--- /dev/null
+++ b/locales/fr/access-form.json
@@ -0,0 +1,55 @@
+{
+ "welcome": {
+ "fallback": "Votre action est requise pour continuer"
+ },
+ "buttons": {
+ "continue": "Continuer",
+ "verifying": "Vérification..."
+ },
+ "fields": {
+ "email": {
+ "label": "Adresse e-mail",
+ "placeholder": "Saisir l'e-mail",
+ "errorInvalid": "Veuillez saisir une adresse e-mail valide",
+ "sharedWithSender": "Ces informations seront partagées avec l'expéditeur.",
+ "sharedWithProvider": "Ces informations seront partagées avec le fournisseur du contenu."
+ },
+ "password": {
+ "label": "Code d'accès",
+ "placeholder": "Saisir le code d'accès"
+ },
+ "name": {
+ "label": "Nom",
+ "placeholder": "Saisir votre nom complet"
+ },
+ "url": {
+ "errorInvalid": "Veuillez saisir une URL valide commençant par https://"
+ },
+ "phone": {
+ "placeholderDefault": "+33 1 23 45 67 89"
+ }
+ },
+ "agreement": {
+ "fallbackPrefix": "J'ai pris connaissance et j'accepte les conditions de ce"
+ },
+ "verification": {
+ "title": "Vérifiez votre adresse e-mail",
+ "description": "Saisissez le code de vérification à six chiffres envoyé à <email>{{email}}</email>",
+ "errorInvalid": "Code invalide. Veuillez réessayer.",
+ "noEmail": "Vous n'avez pas reçu l'e-mail ?",
+ "resending": "Renvoi du code...",
+ "resendIn": "Renvoyer le code ({{seconds}} s)",
+ "resend": "Renvoyer le code"
+ },
+ "footer": {
+ "sharedSecurelyVia": "Ce document vous est partagé en toute sécurité via",
+ "papermark": "Papermark",
+ "seeHowWeProtect": "Découvrez comment nous protégeons vos données dans notre",
+ "privacyPolicy": "Politique de confidentialité"
+ },
+ "reauth": {
+ "title": "Vérifiez votre identité",
+ "description": "Ce fichier a été téléversé par vous. Pour le rouvrir, confirmez que vous contrôlez <email>{{email}}</email>.",
+ "otpDescription": "Nous avons envoyé un code à 6 chiffres à <email>{{email}}</email>. Saisissez-le ci-dessous pour accéder à votre fichier."
+ }
+}
diff --git a/locales/fr/dataroom.json b/locales/fr/dataroom.json
new file mode 100644
index 00000000..3e381d38
--- /dev/null
+++ b/locales/fr/dataroom.json
@@ -0,0 +1,172 @@
+{
+ "shell": {
+ "dataRoomEyebrow": "Salle de données",
+ "updatedOn": "Mis à jour le {{date}}",
+ "lastUpdated": "Dernière mise à jour {{date}}",
+ "secureFooter": "Sécurisé par",
+ "papermark": "Papermark",
+ "copyright": "© {{year}}{{name}}"
+ },
+ "tabs": {
+ "documents": "Documents",
+ "myUploads": "Mes envois"
+ },
+ "search": {
+ "placeholder": "Rechercher...",
+ "results": "Résultats de recherche pour « {{query}} »",
+ "resultCount_one": "({{count}} résultat dans tous les dossiers)",
+ "resultCount_other": "({{count}} résultats dans tous les dossiers)",
+ "noMatches": "Aucun document ne correspond à votre recherche."
+ },
+ "breadcrumb": {
+ "home": "Accueil"
+ },
+ "empty": {
+ "noItems": "Aucun élément disponible.",
+ "noUploads": "Aucun envoi pour le moment. Envoyez des documents avec le bouton « Ajouter un document »."
+ },
+ "cards": {
+ "updated": "Mis à jour {{when}}",
+ "processing": "(Traitement en cours...)",
+ "actionsLabel": "Actions",
+ "download": "Télécharger",
+ "openMenu": "Ouvrir le menu",
+ "openDocument": "Ouvrir le document {{name}}",
+ "openFolder": "Ouvrir le dossier {{name}}",
+ "documents": "Documents",
+ "folder": "Dossier",
+ "folderBadge": "DOSSIER"
+ },
+ "compactList": {
+ "name": "Nom",
+ "updated": "Mis à jour",
+ "settings": "Paramètres"
+ },
+ "trailingActions": {
+ "viewQA": "Voir les Q&R",
+ "downloadDataroom": "Télécharger la salle de données",
+ "teamMemberTooltip": "Vérification ignorée car vous êtes membre de l'équipe ; aucune analyse ne sera collectée"
+ },
+ "navToasts": {
+ "cannotDownloadPreview": "Vous ne pouvez pas télécharger de salles de données en mode aperçu.",
+ "cannotDownloadDocPreview": "Vous ne pouvez pas télécharger de documents de salle de données en mode aperçu.",
+ "cannotDownloadFolderPreview": "Vous ne pouvez pas télécharger de dossiers de salle de données en mode aperçu.",
+ "foldersNotAllowed": "Le téléchargement de dossiers n'est pas autorisé.",
+ "enterEmailFirst": "Saisissez votre e-mail dans la salle de données pour télécharger.",
+ "documentStillProcessing": "Le document est encore en cours de traitement. Veuillez patienter un instant et réessayer.",
+ "downloadPreparing": "Préparation du téléchargement...",
+ "downloadSuccess": "Fichier téléchargé avec succès",
+ "downloadFailed": "Échec du téléchargement du fichier"
+ },
+ "intro": {
+ "viewIntroduction": "Voir l'introduction",
+ "title": "Bienvenue dans {{name}}",
+ "defaultName": "Salle de données",
+ "continueButton": "Continuer vers la salle de données"
+ },
+ "upload": {
+ "trigger": "Ajouter un document",
+ "title": "Téléverser un document dans la salle de données",
+ "description": "Votre document apparaîtra immédiatement dans la salle de données et sera traité en arrière-plan.",
+ "destinationLabel": "Dossier de destination",
+ "selectDestination": "Sélectionner le dossier de destination",
+ "uploadingTo": "Envoi vers :",
+ "setByOwner": "(défini par le propriétaire de la salle de données)",
+ "success": "Document téléversé avec succès !",
+ "successDescription": "Votre document est désormais visible dans la salle de données."
+ },
+ "download": {
+ "folderTitle": "Télécharger le dossier : {{name}}",
+ "dataroomTitle": "Télécharger {{name}}",
+ "defaultName": "Salle de données",
+ "chooseDescription": "Démarrer le téléchargement. Vous pouvez recevoir un e-mail lorsque c'est prêt.",
+ "otpDescription": "Vérifiez votre e-mail pour recevoir des notifications de téléchargement.",
+ "ready": "Vos fichiers sont prêts à être téléchargés.",
+ "preparing": "Préparation de vos fichiers...",
+ "notifyByEmail": "M'avertir par e-mail lorsque le téléchargement est prêt",
+ "needsVerification": "Vous devrez d'abord vérifier votre e-mail avec un code à usage unique.",
+ "starting": "Démarrage...",
+ "start": "Démarrer le téléchargement",
+ "cancel": "Annuler",
+ "viewDownloads": "Voir vos téléchargements",
+ "openDownloads": "Ouvrir la page des téléchargements",
+ "preparingShort": "Préparation...",
+ "processingFiles": "Traitement de {{processed}} sur {{total}} fichiers...",
+ "complete": "Votre téléchargement est prêt !",
+ "failed": "Échec du téléchargement.",
+ "downloadZip": "Télécharger le ZIP",
+ "downloadAll": "Tout télécharger ({{count}} parties)",
+ "downloadingProgress": "Téléchargement de {{current}} sur {{total}}...",
+ "part": "Partie {{index}}",
+ "expiresIn": "Expire dans {{time}}",
+ "expiresLessThanHour": "moins d'une heure",
+ "expiresDays_one": "{{count}} jour",
+ "expiresDays_other": "{{count}} jours",
+ "expiresHours_one": "{{count}} heure",
+ "expiresHours_other": "{{count}} heures",
+ "willEmailWhenReady": "Vous pouvez fermer cette fenêtre. Nous vous enverrons un e-mail lorsque ce sera prêt.",
+ "checkBackOnDownloads": "Vous pouvez fermer cette fenêtre. Revenez sur la page des téléchargements lorsque ce sera prêt.",
+ "tryAgain": "Réessayer",
+ "startFailed": "Impossible de démarrer le téléchargement",
+ "statusFetchFailed": "Impossible de récupérer le statut",
+ "expiresSoon": "bientôt"
+ },
+ "downloadsPage": {
+ "title": "Vos téléchargements",
+ "description": "Téléchargez vos fichiers préparés ci-dessous. Les liens expirent après 3 jours.",
+ "emailHeading": "Voir vos téléchargements",
+ "emailDescription": "Saisissez l'e-mail utilisé pour accéder à cette salle de données.",
+ "emailPlaceholder": "[email protected]",
+ "sendingCode": "Envoi du code...",
+ "continueButton": "Continuer",
+ "verifyEmailHeading": "Vérifier votre e-mail",
+ "empty": "Vous n'avez pas encore de téléchargements. Démarrez un téléchargement depuis la salle de données pour le voir ici.",
+ "jobFolderPrefix": "Dossier :",
+ "jobFullDataroom": "Salle de données complète",
+ "expired": "expiré",
+ "expiresPrefix": "Expire {{time}}",
+ "hideParts": "Masquer les parties",
+ "showParts": "Afficher les parties ({{count}})",
+ "orIndividual": "Ou télécharger individuellement :",
+ "partOf": "Partie {{index}} sur {{total}}",
+ "errors": {
+ "noAccess": "Aucun accès trouvé pour cet e-mail. Utilisez l'e-mail avec lequel vous avez ouvert la salle de données.",
+ "rateLimit": "Trop de requêtes. Veuillez réessayer plus tard.",
+ "generic": "Une erreur s'est produite."
+ }
+ },
+ "downloadOtp": {
+ "defaultDescription": "Nous avons envoyé un code à 6 chiffres à <email>{{email}}</email>. Saisissez-le ci-dessous pour vous vérifier et recevoir des notifications de téléchargement.",
+ "verify": "Vérifier",
+ "verifying": "Vérification...",
+ "noEmail": "Vous n'avez pas reçu l'e-mail ?",
+ "resending": "Envoi...",
+ "resend": "Renvoyer le code",
+ "resendIn": "Renvoyer le code ({{seconds}} s)",
+ "sendFailed": "Échec de l'envoi du code",
+ "invalidCode": "Code invalide"
+ },
+ "downloadsPanel": {
+ "ready": "Prêt",
+ "failedFallback": "Échec",
+ "creatingZip": "Création du ZIP...",
+ "filesCount": "{{processed}} / {{total}} fichiers",
+ "verifying": "Vérification de l'accès...",
+ "buildingFileList": "Création de la liste des fichiers...",
+ "preparing": "Préparation..."
+ },
+ "folderPicker": {
+ "home": "Accueil"
+ },
+ "indexFile": {
+ "trigger": "Générer le fichier d'index",
+ "title": "Générer le fichier d'index du data room",
+ "description": "Sélectionnez un format pour générer le fichier d'index.",
+ "selectFormat": "Sélectionner le format",
+ "generate": "Générer",
+ "generating": "Génération...",
+ "successToast": "Fichier d'index généré avec succès",
+ "errorToast": "Échec de la génération de l'index",
+ "genericError": "Une erreur s'est produite. Veuillez réessayer."
+ }
+}
diff --git a/locales/fr/viewer.json b/locales/fr/viewer.json
new file mode 100644
index 00000000..a0f795c2
--- /dev/null
+++ b/locales/fr/viewer.json
@@ -0,0 +1,58 @@
+{
+ "nav": {
+ "home": "Accueil",
+ "viewQA": "Voir les Q&R",
+ "linksOnPage": "Liens sur la page",
+ "linksOnCurrentPage": "Liens sur la page actuelle",
+ "zoomIn": "Zoom avant",
+ "zoomOut": "Zoom arrière",
+ "fullscreen": "Plein écran",
+ "downloadDocument": "Télécharger le document",
+ "teamMemberTooltip": "Vérification ignorée car vous êtes membre de l'équipe ; aucune analyse ne sera collectée",
+ "changeLanguage": "Changer de langue"
+ },
+ "toasts": {
+ "preparingDownload": "Préparation du téléchargement...",
+ "preparingDownloadWatermark": "Préparation du téléchargement avec filigrane...",
+ "downloadSuccess": "Fichier téléchargé avec succès",
+ "downloadFailed": "Échec du téléchargement du fichier",
+ "cannotDownloadPreview": "Vous ne pouvez pas télécharger de documents en mode aperçu."
+ },
+ "downloadOnly": {
+ "title": "Télécharger le document",
+ "description": "Ce document est disponible uniquement en téléchargement",
+ "button": "Télécharger maintenant"
+ },
+ "awayPoster": {
+ "title": "Nous avons mis en pause pour protéger votre session",
+ "description": "Vous êtes inactif depuis {{duration}}, nous avons donc mis en pause l'aperçu du document pour sécuriser la session.",
+ "ariaTitle": "Notification de session mise en pause automatiquement",
+ "ariaDescription": "Votre session a été mise en pause en raison d'inactivité. Cliquez sur continuer ou déplacez votre souris pour reprendre.",
+ "badge": "Mis en pause automatiquement",
+ "idleFor": "{{duration}} d'inactivité",
+ "minSec": "{{minutes}} min {{seconds}} s",
+ "minOnly": "{{minutes}} min",
+ "secOnly": "{{seconds}} s",
+ "resume": "Reprendre où vous en étiez",
+ "moveHint": "Ou déplacez simplement votre souris ou appuyez sur une touche pour continuer"
+ },
+ "poweredBy": {
+ "shareDocsVia": "Partager les documents via"
+ },
+ "report": {
+ "trigger": "Signaler un abus",
+ "title": "Signaler un problème",
+ "description": "Vous voyez quelque chose d'inapproprié ? Nous l'examinerons et, le cas échéant, prendrons des mesures.",
+ "submit": "Envoyer le signalement",
+ "successToast": "Signalement envoyé avec succès",
+ "selectTypeError": "Veuillez sélectionner un type d'abus.",
+ "types": {
+ "spam": "Spam, fraude ou arnaque",
+ "malware": "Logiciel malveillant ou virus",
+ "copyright": "Violation de droits d'auteur",
+ "harmful": "Contenu nuisible",
+ "notWorking": "Le contenu ne fonctionne pas correctement",
+ "other": "Autre"
+ }
+ }
+}
diff --git a/locales/it/access-form.json b/locales/it/access-form.json
new file mode 100644
index 00000000..4d09f2c7
--- /dev/null
+++ b/locales/it/access-form.json
@@ -0,0 +1,55 @@
+{
+ "welcome": {
+ "fallback": "È richiesta la tua azione per continuare"
+ },
+ "buttons": {
+ "continue": "Continua",
+ "verifying": "Verifica in corso..."
+ },
+ "fields": {
+ "email": {
+ "label": "Indirizzo e-mail",
+ "placeholder": "Inserisci l'e-mail",
+ "errorInvalid": "Inserisci un indirizzo e-mail valido",
+ "sharedWithSender": "Questi dati saranno condivisi con il mittente.",
+ "sharedWithProvider": "Questi dati saranno condivisi con il fornitore del contenuto."
+ },
+ "password": {
+ "label": "Codice di accesso",
+ "placeholder": "Inserisci il codice di accesso"
+ },
+ "name": {
+ "label": "Nome",
+ "placeholder": "Inserisci il tuo nome completo"
+ },
+ "url": {
+ "errorInvalid": "Inserisci un URL valido che inizi con https://"
+ },
+ "phone": {
+ "placeholderDefault": "+39 02 1234 5678"
+ }
+ },
+ "agreement": {
+ "fallbackPrefix": "Ho letto e accetto i termini di questo"
+ },
+ "verification": {
+ "title": "Verifica il tuo indirizzo e-mail",
+ "description": "Inserisci il codice di verifica di sei cifre inviato a <email>{{email}}</email>",
+ "errorInvalid": "Codice non valido. Riprova.",
+ "noEmail": "Non hai ricevuto l'e-mail?",
+ "resending": "Invio nuovo codice...",
+ "resendIn": "Invia nuovo codice ({{seconds}} s)",
+ "resend": "Invia nuovo codice"
+ },
+ "footer": {
+ "sharedSecurelyVia": "Questo documento è condiviso con te in modo sicuro tramite",
+ "papermark": "Papermark",
+ "seeHowWeProtect": "Scopri come proteggiamo i tuoi dati nella nostra",
+ "privacyPolicy": "Informativa sulla privacy"
+ },
+ "reauth": {
+ "title": "Verifica che sei tu",
+ "description": "Questo file è stato caricato da te. Per riaprirlo, conferma di controllare <email>{{email}}</email>.",
+ "otpDescription": "Abbiamo inviato un codice di 6 cifre a <email>{{email}}</email>. Inseriscilo di seguito per accedere al tuo file."
+ }
+}
diff --git a/locales/it/dataroom.json b/locales/it/dataroom.json
new file mode 100644
index 00000000..1fca16e7
--- /dev/null
+++ b/locales/it/dataroom.json
@@ -0,0 +1,172 @@
+{
+ "shell": {
+ "dataRoomEyebrow": "Data room",
+ "updatedOn": "Aggiornato il {{date}}",
+ "lastUpdated": "Ultimo aggiornamento {{date}}",
+ "secureFooter": "Protetto da",
+ "papermark": "Papermark",
+ "copyright": "© {{year}}{{name}}"
+ },
+ "tabs": {
+ "documents": "Documenti",
+ "myUploads": "I miei caricamenti"
+ },
+ "search": {
+ "placeholder": "Cerca...",
+ "results": "Risultati della ricerca per «{{query}}»",
+ "resultCount_one": "({{count}} risultato in tutte le cartelle)",
+ "resultCount_other": "({{count}} risultati in tutte le cartelle)",
+ "noMatches": "Nessun documento corrisponde alla tua ricerca."
+ },
+ "breadcrumb": {
+ "home": "Home"
+ },
+ "empty": {
+ "noItems": "Nessun elemento disponibile.",
+ "noUploads": "Ancora nessun caricamento. Carica i documenti con il pulsante «Aggiungi documento»."
+ },
+ "cards": {
+ "updated": "Aggiornato {{when}}",
+ "processing": "(Elaborazione...)",
+ "actionsLabel": "Azioni",
+ "download": "Scarica",
+ "openMenu": "Apri menu",
+ "openDocument": "Apri documento {{name}}",
+ "openFolder": "Apri cartella {{name}}",
+ "documents": "Documenti",
+ "folder": "Cartella",
+ "folderBadge": "CARTELLA"
+ },
+ "compactList": {
+ "name": "Nome",
+ "updated": "Aggiornato",
+ "settings": "Impostazioni"
+ },
+ "trailingActions": {
+ "viewQA": "Visualizza Q&A",
+ "downloadDataroom": "Scarica data room",
+ "teamMemberTooltip": "Verifica saltata perché sei un membro del team; non verranno raccolti dati analitici"
+ },
+ "navToasts": {
+ "cannotDownloadPreview": "Non puoi scaricare le data room in modalità anteprima.",
+ "cannotDownloadDocPreview": "Non puoi scaricare i documenti della data room in modalità anteprima.",
+ "cannotDownloadFolderPreview": "Non puoi scaricare le cartelle della data room in modalità anteprima.",
+ "foldersNotAllowed": "Il download delle cartelle non è consentito.",
+ "enterEmailFirst": "Inserisci la tua e-mail nella data room per scaricare.",
+ "documentStillProcessing": "Il documento è ancora in elaborazione. Attendi un momento e riprova.",
+ "downloadPreparing": "Preparazione del download...",
+ "downloadSuccess": "File scaricato correttamente",
+ "downloadFailed": "Impossibile scaricare il file"
+ },
+ "intro": {
+ "viewIntroduction": "Visualizza introduzione",
+ "title": "Benvenuto in {{name}}",
+ "defaultName": "Data room",
+ "continueButton": "Continua nella data room"
+ },
+ "upload": {
+ "trigger": "Aggiungi documento",
+ "title": "Carica documento nella data room",
+ "description": "Il tuo documento apparirà immediatamente nella data room e sarà elaborato in background.",
+ "destinationLabel": "Cartella di destinazione",
+ "selectDestination": "Seleziona la cartella di destinazione",
+ "uploadingTo": "Caricamento in:",
+ "setByOwner": "(impostato dal proprietario della data room)",
+ "success": "Documento caricato correttamente!",
+ "successDescription": "Il tuo documento è ora visibile nella data room."
+ },
+ "download": {
+ "folderTitle": "Scarica cartella: {{name}}",
+ "dataroomTitle": "Scarica {{name}}",
+ "defaultName": "Data room",
+ "chooseDescription": "Avvia il download. Puoi opzionalmente ricevere un'e-mail quando è pronto.",
+ "otpDescription": "Verifica la tua e-mail per ricevere le notifiche di download.",
+ "ready": "I tuoi file sono pronti per il download.",
+ "preparing": "Preparazione dei tuoi file...",
+ "notifyByEmail": "Avvisami via e-mail quando il download è pronto",
+ "needsVerification": "Dovrai prima verificare la tua e-mail con un codice monouso.",
+ "starting": "Avvio in corso...",
+ "start": "Avvia download",
+ "cancel": "Annulla",
+ "viewDownloads": "Visualizza i tuoi download",
+ "openDownloads": "Apri la pagina dei download",
+ "preparingShort": "Preparazione...",
+ "processingFiles": "Elaborazione di {{processed}} su {{total}} file...",
+ "complete": "Il tuo download è pronto!",
+ "failed": "Download non riuscito.",
+ "downloadZip": "Scarica ZIP",
+ "downloadAll": "Scarica tutto ({{count}} parti)",
+ "downloadingProgress": "Download di {{current}} su {{total}}...",
+ "part": "Parte {{index}}",
+ "expiresIn": "Scade tra {{time}}",
+ "expiresLessThanHour": "meno di un'ora",
+ "expiresDays_one": "{{count}} giorno",
+ "expiresDays_other": "{{count}} giorni",
+ "expiresHours_one": "{{count}} ora",
+ "expiresHours_other": "{{count}} ore",
+ "willEmailWhenReady": "Puoi chiudere questa finestra. Ti invieremo un'e-mail quando sarà pronto.",
+ "checkBackOnDownloads": "Puoi chiudere questa finestra. Torna sulla pagina dei download quando sarà pronto.",
+ "tryAgain": "Riprova",
+ "startFailed": "Impossibile avviare il download",
+ "statusFetchFailed": "Impossibile recuperare lo stato",
+ "expiresSoon": "a breve"
+ },
+ "downloadsPage": {
+ "title": "I tuoi download",
+ "description": "Scarica i tuoi file pronti qui sotto. I link scadono dopo 3 giorni.",
+ "emailHeading": "Visualizza i tuoi download",
+ "emailDescription": "Inserisci l'e-mail con cui hai effettuato l'accesso a questo data room.",
+ "emailPlaceholder": "[email protected]",
+ "sendingCode": "Invio del codice...",
+ "continueButton": "Continua",
+ "verifyEmailHeading": "Verifica la tua e-mail",
+ "empty": "Non hai ancora download. Avvia un download dal data room per vederlo qui.",
+ "jobFolderPrefix": "Cartella:",
+ "jobFullDataroom": "Data room completo",
+ "expired": "scaduto",
+ "expiresPrefix": "Scade {{time}}",
+ "hideParts": "Nascondi parti",
+ "showParts": "Mostra parti ({{count}})",
+ "orIndividual": "Oppure scarica individualmente:",
+ "partOf": "Parte {{index}} di {{total}}",
+ "errors": {
+ "noAccess": "Nessun accesso trovato per questa e-mail. Usa l'e-mail con cui hai aperto il data room.",
+ "rateLimit": "Troppe richieste. Riprova più tardi.",
+ "generic": "Qualcosa è andato storto."
+ }
+ },
+ "downloadOtp": {
+ "defaultDescription": "Abbiamo inviato un codice a 6 cifre a <email>{{email}}</email>. Inseriscilo qui sotto per verificarti e ricevere le notifiche di download.",
+ "verify": "Verifica",
+ "verifying": "Verifica in corso...",
+ "noEmail": "Non hai ricevuto l'e-mail?",
+ "resending": "Invio...",
+ "resend": "Invia di nuovo il codice",
+ "resendIn": "Invia di nuovo il codice ({{seconds}} s)",
+ "sendFailed": "Impossibile inviare il codice",
+ "invalidCode": "Codice non valido"
+ },
+ "downloadsPanel": {
+ "ready": "Pronto",
+ "failedFallback": "Non riuscito",
+ "creatingZip": "Creazione ZIP...",
+ "filesCount": "{{processed}} / {{total}} file",
+ "verifying": "Verifica dell'accesso...",
+ "buildingFileList": "Creazione elenco file...",
+ "preparing": "Preparazione..."
+ },
+ "folderPicker": {
+ "home": "Home"
+ },
+ "indexFile": {
+ "trigger": "Genera file indice",
+ "title": "Genera file indice del data room",
+ "description": "Seleziona un formato per generare il file indice.",
+ "selectFormat": "Seleziona formato",
+ "generate": "Genera",
+ "generating": "Generazione...",
+ "successToast": "File indice generato con successo",
+ "errorToast": "Impossibile generare l'indice",
+ "genericError": "Qualcosa è andato storto. Riprova."
+ }
+}
diff --git a/locales/it/viewer.json b/locales/it/viewer.json
new file mode 100644
index 00000000..c6454c48
--- /dev/null
+++ b/locales/it/viewer.json
@@ -0,0 +1,58 @@
+{
+ "nav": {
+ "home": "Home",
+ "viewQA": "Visualizza Q&A",
+ "linksOnPage": "Link nella pagina",
+ "linksOnCurrentPage": "Link nella pagina corrente",
+ "zoomIn": "Ingrandisci",
+ "zoomOut": "Riduci",
+ "fullscreen": "Schermo intero",
+ "downloadDocument": "Scarica documento",
+ "teamMemberTooltip": "Verifica saltata perché sei un membro del team; non verranno raccolti dati analitici",
+ "changeLanguage": "Cambia lingua"
+ },
+ "toasts": {
+ "preparingDownload": "Preparazione del download...",
+ "preparingDownloadWatermark": "Preparazione del download con filigrana...",
+ "downloadSuccess": "File scaricato correttamente",
+ "downloadFailed": "Impossibile scaricare il file",
+ "cannotDownloadPreview": "Non puoi scaricare documenti in modalità anteprima."
+ },
+ "downloadOnly": {
+ "title": "Scarica documento",
+ "description": "Questo documento è disponibile solo per il download",
+ "button": "Scarica ora"
+ },
+ "awayPoster": {
+ "title": "Abbiamo messo in pausa per proteggere la tua sessione",
+ "description": "Sei stato inattivo per {{duration}}, quindi abbiamo messo in pausa l'anteprima del documento per mantenere la sessione sicura.",
+ "ariaTitle": "Notifica di sessione messa in pausa automaticamente",
+ "ariaDescription": "La tua sessione è stata messa in pausa per inattività. Fai clic su continua o muovi il mouse per riprendere.",
+ "badge": "In pausa automatica",
+ "idleFor": "{{duration}} di inattività",
+ "minSec": "{{minutes}} min {{seconds}} sec",
+ "minOnly": "{{minutes}} min",
+ "secOnly": "{{seconds}} sec",
+ "resume": "Riprendi da dove hai lasciato",
+ "moveHint": "Oppure muovi il mouse o premi un tasto per continuare"
+ },
+ "poweredBy": {
+ "shareDocsVia": "Condividi documenti tramite"
+ },
+ "report": {
+ "trigger": "Segnala abuso",
+ "title": "Segnala un problema",
+ "description": "Hai notato qualcosa di inappropriato? Daremo un'occhiata e, se necessario, interverremo.",
+ "submit": "Invia segnalazione",
+ "successToast": "Segnalazione inviata con successo",
+ "selectTypeError": "Seleziona un tipo di abuso.",
+ "types": {
+ "spam": "Spam, frode o truffa",
+ "malware": "Malware o virus",
+ "copyright": "Violazione del copyright",
+ "harmful": "Contenuto dannoso",
+ "notWorking": "Il contenuto non funziona correttamente",
+ "other": "Altro"
+ }
+ }
+}
diff --git a/locales/ja/access-form.json b/locales/ja/access-form.json
new file mode 100644
index 00000000..d9b46f10
--- /dev/null
+++ b/locales/ja/access-form.json
@@ -0,0 +1,55 @@
+{
+ "welcome": {
+ "fallback": "続行するには操作が必要です"
+ },
+ "buttons": {
+ "continue": "続ける",
+ "verifying": "確認中..."
+ },
+ "fields": {
+ "email": {
+ "label": "メールアドレス",
+ "placeholder": "メールアドレスを入力",
+ "errorInvalid": "有効なメールアドレスを入力してください",
+ "sharedWithSender": "この情報は送信者と共有されます。",
+ "sharedWithProvider": "この情報はコンテンツ提供者と共有されます。"
+ },
+ "password": {
+ "label": "パスコード",
+ "placeholder": "パスコードを入力"
+ },
+ "name": {
+ "label": "氏名",
+ "placeholder": "氏名を入力"
+ },
+ "url": {
+ "errorInvalid": "https:// で始まる有効な URL を入力してください"
+ },
+ "phone": {
+ "placeholderDefault": "+81 90 1234 5678"
+ }
+ },
+ "agreement": {
+ "fallbackPrefix": "内容を確認し、以下の条件に同意します"
+ },
+ "verification": {
+ "title": "メールアドレスを確認してください",
+ "description": "<email>{{email}}</email> に送信された 6 桁の確認コードを入力してください",
+ "errorInvalid": "コードが無効です。もう一度お試しください。",
+ "noEmail": "メールが届きませんでしたか?",
+ "resending": "コードを再送信中...",
+ "resendIn": "コードを再送信 ({{seconds}} 秒)",
+ "resend": "コードを再送信"
+ },
+ "footer": {
+ "sharedSecurelyVia": "この資料は安全に共有されています:",
+ "papermark": "Papermark",
+ "seeHowWeProtect": "データ保護の詳細はこちら:",
+ "privacyPolicy": "プライバシーポリシー"
+ },
+ "reauth": {
+ "title": "本人確認をしてください",
+ "description": "このファイルはあなたがアップロードしたものです。再度開くには、<email>{{email}}</email> を管理していることを確認してください。",
+ "otpDescription": "<email>{{email}}</email> に 6 桁のコードを送信しました。下に入力してアップロードしたファイルにアクセスしてください。"
+ }
+}
diff --git a/locales/ja/dataroom.json b/locales/ja/dataroom.json
new file mode 100644
index 00000000..cb700590
--- /dev/null
+++ b/locales/ja/dataroom.json
@@ -0,0 +1,172 @@
+{
+ "shell": {
+ "dataRoomEyebrow": "データルーム",
+ "updatedOn": "{{date}} に更新",
+ "lastUpdated": "最終更新 {{date}}",
+ "secureFooter": "セキュリティ提供:",
+ "papermark": "Papermark",
+ "copyright": "© {{year}}{{name}}"
+ },
+ "tabs": {
+ "documents": "資料",
+ "myUploads": "アップロード済み"
+ },
+ "search": {
+ "placeholder": "検索...",
+ "results": "「{{query}}」の検索結果",
+ "resultCount_one": "(全フォルダで {{count}} 件)",
+ "resultCount_other": "(全フォルダで {{count}} 件)",
+ "noMatches": "検索条件に一致する資料はありません。"
+ },
+ "breadcrumb": {
+ "home": "ホーム"
+ },
+ "empty": {
+ "noItems": "利用可能なアイテムはありません。",
+ "noUploads": "まだアップロードがありません。「資料を追加」ボタンから資料をアップロードしてください。"
+ },
+ "cards": {
+ "updated": "更新:{{when}}",
+ "processing": "(処理中...)",
+ "actionsLabel": "アクション",
+ "download": "ダウンロード",
+ "openMenu": "メニューを開く",
+ "openDocument": "資料「{{name}}」を開く",
+ "openFolder": "フォルダ「{{name}}」を開く",
+ "documents": "資料",
+ "folder": "フォルダ",
+ "folderBadge": "フォルダ"
+ },
+ "compactList": {
+ "name": "名前",
+ "updated": "更新",
+ "settings": "設定"
+ },
+ "trailingActions": {
+ "viewQA": "Q&A を表示",
+ "downloadDataroom": "データルームをダウンロード",
+ "teamMemberTooltip": "あなたはチームメンバーのため認証をスキップしました。分析データは収集されません"
+ },
+ "navToasts": {
+ "cannotDownloadPreview": "プレビュー モードではデータルームをダウンロードできません。",
+ "cannotDownloadDocPreview": "プレビュー モードではデータルームの資料をダウンロードできません。",
+ "cannotDownloadFolderPreview": "プレビュー モードではデータルームのフォルダをダウンロードできません。",
+ "foldersNotAllowed": "フォルダのダウンロードは許可されていません。",
+ "enterEmailFirst": "ダウンロードするには、データルームでメールアドレスを入力してください。",
+ "documentStillProcessing": "資料はまだ処理中です。しばらくしてから再度お試しください。",
+ "downloadPreparing": "ダウンロードを準備中...",
+ "downloadSuccess": "ファイルをダウンロードしました",
+ "downloadFailed": "ファイルのダウンロードに失敗しました"
+ },
+ "intro": {
+ "viewIntroduction": "イントロダクションを表示",
+ "title": "{{name}} へようこそ",
+ "defaultName": "データルーム",
+ "continueButton": "データルームへ進む"
+ },
+ "upload": {
+ "trigger": "資料を追加",
+ "title": "データルームに資料をアップロード",
+ "description": "資料はすぐにデータルームに表示され、バックグラウンドで処理されます。",
+ "destinationLabel": "保存先フォルダ",
+ "selectDestination": "保存先フォルダを選択",
+ "uploadingTo": "アップロード先:",
+ "setByOwner": "(データルームの所有者により設定)",
+ "success": "資料をアップロードしました!",
+ "successDescription": "資料がデータルームに表示されました。"
+ },
+ "download": {
+ "folderTitle": "フォルダをダウンロード:{{name}}",
+ "dataroomTitle": "{{name}} をダウンロード",
+ "defaultName": "データルーム",
+ "chooseDescription": "ダウンロードを開始します。準備ができたらメールでお知らせすることもできます。",
+ "otpDescription": "ダウンロード通知を受け取るには、メールアドレスを確認してください。",
+ "ready": "ファイルのダウンロードの準備ができました。",
+ "preparing": "ファイルを準備しています...",
+ "notifyByEmail": "ダウンロードの準備ができたらメールで通知する",
+ "needsVerification": "先にワンタイムコードでメールアドレスを確認する必要があります。",
+ "starting": "開始しています...",
+ "start": "ダウンロード開始",
+ "cancel": "キャンセル",
+ "viewDownloads": "ダウンロードを表示",
+ "openDownloads": "ダウンロード ページを開く",
+ "preparingShort": "準備中...",
+ "processingFiles": "{{total}} 件中 {{processed}} 件を処理中...",
+ "complete": "ダウンロードの準備ができました!",
+ "failed": "ダウンロードに失敗しました。",
+ "downloadZip": "ZIP をダウンロード",
+ "downloadAll": "すべてダウンロード({{count}} パート)",
+ "downloadingProgress": "{{total}} 件中 {{current}} 件をダウンロード中...",
+ "part": "パート {{index}}",
+ "expiresIn": "{{time}} で期限切れ",
+ "expiresLessThanHour": "1 時間以内",
+ "expiresDays_one": "{{count}} 日",
+ "expiresDays_other": "{{count}} 日",
+ "expiresHours_one": "{{count}} 時間",
+ "expiresHours_other": "{{count}} 時間",
+ "willEmailWhenReady": "閉じても構いません。準備ができ次第メールでお知らせします。",
+ "checkBackOnDownloads": "閉じても構いません。準備ができ次第、ダウンロード ページをご確認ください。",
+ "tryAgain": "もう一度試す",
+ "startFailed": "ダウンロードを開始できませんでした",
+ "statusFetchFailed": "ステータスを取得できませんでした",
+ "expiresSoon": "まもなく"
+ },
+ "downloadsPage": {
+ "title": "ダウンロード一覧",
+ "description": "準備されたファイルを以下からダウンロードしてください。リンクは 3 日後に期限切れになります。",
+ "emailHeading": "ダウンロードを表示",
+ "emailDescription": "このデータルームへのアクセスに使用したメールアドレスを入力してください。",
+ "emailPlaceholder": "[email protected]",
+ "sendingCode": "コードを送信中...",
+ "continueButton": "続行",
+ "verifyEmailHeading": "メールアドレスを確認",
+ "empty": "まだダウンロードはありません。データルームからダウンロードを開始するとここに表示されます。",
+ "jobFolderPrefix": "フォルダ:",
+ "jobFullDataroom": "データルーム全体",
+ "expired": "期限切れ",
+ "expiresPrefix": "あと {{time}} で期限切れ",
+ "hideParts": "パートを隠す",
+ "showParts": "パートを表示 ({{count}})",
+ "orIndividual": "または個別にダウンロード:",
+ "partOf": "{{total}} 個中 {{index}} パート目",
+ "errors": {
+ "noAccess": "このメールアドレスではアクセスが見つかりません。データルームを開いた際のメールアドレスをご使用ください。",
+ "rateLimit": "リクエストが多すぎます。しばらくしてからもう一度お試しください。",
+ "generic": "問題が発生しました。"
+ }
+ },
+ "downloadOtp": {
+ "defaultDescription": "<email>{{email}}</email> に 6 桁のコードを送信しました。下に入力して認証し、ダウンロード通知を受け取ってください。",
+ "verify": "確認",
+ "verifying": "確認中...",
+ "noEmail": "メールが届きませんでしたか?",
+ "resending": "送信中...",
+ "resend": "コードを再送",
+ "resendIn": "コードを再送 ({{seconds}} 秒)",
+ "sendFailed": "コードを送信できませんでした",
+ "invalidCode": "無効なコード"
+ },
+ "downloadsPanel": {
+ "ready": "準備完了",
+ "failedFallback": "失敗",
+ "creatingZip": "ZIP を作成中...",
+ "filesCount": "{{processed}} / {{total}} 件",
+ "verifying": "アクセスを確認中...",
+ "buildingFileList": "ファイル一覧を作成中...",
+ "preparing": "準備中..."
+ },
+ "folderPicker": {
+ "home": "ホーム"
+ },
+ "indexFile": {
+ "trigger": "インデックスファイルを生成",
+ "title": "データルームのインデックスファイルを生成",
+ "description": "インデックスファイルを生成する形式を選択してください。",
+ "selectFormat": "形式を選択",
+ "generate": "生成",
+ "generating": "生成中...",
+ "successToast": "インデックスファイルを生成しました",
+ "errorToast": "インデックスの生成に失敗しました",
+ "genericError": "問題が発生しました。もう一度お試しください。"
+ }
+}
diff --git a/locales/ja/viewer.json b/locales/ja/viewer.json
new file mode 100644
index 00000000..975ee8db
--- /dev/null
+++ b/locales/ja/viewer.json
@@ -0,0 +1,58 @@
+{
+ "nav": {
+ "home": "ホーム",
+ "viewQA": "Q&A を表示",
+ "linksOnPage": "ページ内のリンク",
+ "linksOnCurrentPage": "現在のページ内のリンク",
+ "zoomIn": "拡大",
+ "zoomOut": "縮小",
+ "fullscreen": "全画面表示",
+ "downloadDocument": "資料をダウンロード",
+ "teamMemberTooltip": "あなたはチームメンバーのため認証をスキップしました。分析データは収集されません",
+ "changeLanguage": "言語を変更"
+ },
+ "toasts": {
+ "preparingDownload": "ダウンロードを準備中...",
+ "preparingDownloadWatermark": "ウォーターマーク付きダウンロードを準備中...",
+ "downloadSuccess": "ファイルをダウンロードしました",
+ "downloadFailed": "ファイルのダウンロードに失敗しました",
+ "cannotDownloadPreview": "プレビュー モードでは資料をダウンロードできません。"
+ },
+ "downloadOnly": {
+ "title": "資料をダウンロード",
+ "description": "この資料はダウンロードのみ利用可能です",
+ "button": "今すぐダウンロード"
+ },
+ "awayPoster": {
+ "title": "セッションを保護するため一時停止しました",
+ "description": "{{duration}} 操作がなかったため、セッションを保護するために資料のプレビューを一時停止しました。",
+ "ariaTitle": "セッション自動一時停止の通知",
+ "ariaDescription": "操作がなかったためセッションが一時停止しました。続行をクリックするか、マウスを動かして再開してください。",
+ "badge": "自動一時停止中",
+ "idleFor": "{{duration}} 操作なし",
+ "minSec": "{{minutes}} 分 {{seconds}} 秒",
+ "minOnly": "{{minutes}} 分",
+ "secOnly": "{{seconds}} 秒",
+ "resume": "前回の続きから再開",
+ "moveHint": "またはマウスを動かす、もしくは任意のキーを押して続行してください"
+ },
+ "poweredBy": {
+ "shareDocsVia": "資料の共有はこちら"
+ },
+ "report": {
+ "trigger": "不正利用を報告",
+ "title": "問題を報告する",
+ "description": "不適切な内容が見つかりましたか?確認のうえ、必要に応じて対応します。",
+ "submit": "報告を送信",
+ "successToast": "報告を送信しました",
+ "selectTypeError": "不正利用の種類を選択してください。",
+ "types": {
+ "spam": "スパム・詐欺・不正行為",
+ "malware": "マルウェアまたはウイルス",
+ "copyright": "著作権侵害",
+ "harmful": "有害なコンテンツ",
+ "notWorking": "コンテンツが正しく動作しない",
+ "other": "その他"
+ }
+ }
+}
diff --git a/locales/pt-BR/access-form.json b/locales/pt-BR/access-form.json
new file mode 100644
index 00000000..708c1be8
--- /dev/null
+++ b/locales/pt-BR/access-form.json
@@ -0,0 +1,55 @@
+{
+ "welcome": {
+ "fallback": "Sua ação é necessária para continuar"
+ },
+ "buttons": {
+ "continue": "Continuar",
+ "verifying": "Verificando..."
+ },
+ "fields": {
+ "email": {
+ "label": "Endereço de e-mail",
+ "placeholder": "Digite o e-mail",
+ "errorInvalid": "Digite um endereço de e-mail válido",
+ "sharedWithSender": "Estes dados serão compartilhados com o remetente.",
+ "sharedWithProvider": "Estes dados serão compartilhados com o provedor do conteúdo."
+ },
+ "password": {
+ "label": "Código de acesso",
+ "placeholder": "Digite o código de acesso"
+ },
+ "name": {
+ "label": "Nome",
+ "placeholder": "Digite seu nome completo"
+ },
+ "url": {
+ "errorInvalid": "Digite uma URL válida começando com https://"
+ },
+ "phone": {
+ "placeholderDefault": "+55 11 91234 5678"
+ }
+ },
+ "agreement": {
+ "fallbackPrefix": "Li e concordo com os termos deste"
+ },
+ "verification": {
+ "title": "Verifique seu endereço de e-mail",
+ "description": "Digite o código de verificação de seis dígitos enviado para <email>{{email}}</email>",
+ "errorInvalid": "Código inválido. Tente novamente.",
+ "noEmail": "Não recebeu o e-mail?",
+ "resending": "Reenviando código...",
+ "resendIn": "Reenviar código ({{seconds}} s)",
+ "resend": "Reenviar código"
+ },
+ "footer": {
+ "sharedSecurelyVia": "Este documento é compartilhado com você de forma segura via",
+ "papermark": "Papermark",
+ "seeHowWeProtect": "Veja como protegemos seus dados em nossa",
+ "privacyPolicy": "Política de Privacidade"
+ },
+ "reauth": {
+ "title": "Verifique que é você",
+ "description": "Este arquivo foi enviado por você. Para reabri-lo, confirme que você controla <email>{{email}}</email>.",
+ "otpDescription": "Enviamos um código de 6 dígitos para <email>{{email}}</email>. Digite-o abaixo para acessar seu arquivo."
+ }
+}
diff --git a/locales/pt-BR/dataroom.json b/locales/pt-BR/dataroom.json
new file mode 100644
index 00000000..3e3fe373
--- /dev/null
+++ b/locales/pt-BR/dataroom.json
@@ -0,0 +1,172 @@
+{
+ "shell": {
+ "dataRoomEyebrow": "Sala de dados",
+ "updatedOn": "Atualizado em {{date}}",
+ "lastUpdated": "Última atualização: {{date}}",
+ "secureFooter": "Protegido por",
+ "papermark": "Papermark",
+ "copyright": "© {{year}}{{name}}"
+ },
+ "tabs": {
+ "documents": "Documentos",
+ "myUploads": "Meus envios"
+ },
+ "search": {
+ "placeholder": "Buscar...",
+ "results": "Resultados da busca por \"{{query}}\"",
+ "resultCount_one": "({{count}} resultado em todas as pastas)",
+ "resultCount_other": "({{count}} resultados em todas as pastas)",
+ "noMatches": "Nenhum documento corresponde à sua busca."
+ },
+ "breadcrumb": {
+ "home": "Início"
+ },
+ "empty": {
+ "noItems": "Nenhum item disponível.",
+ "noUploads": "Ainda não há envios. Envie documentos usando o botão \"Adicionar Documento\"."
+ },
+ "cards": {
+ "updated": "Atualizado {{when}}",
+ "processing": "(Processando...)",
+ "actionsLabel": "Ações",
+ "download": "Baixar",
+ "openMenu": "Abrir menu",
+ "openDocument": "Abrir documento {{name}}",
+ "openFolder": "Abrir pasta {{name}}",
+ "documents": "Documentos",
+ "folder": "Pasta",
+ "folderBadge": "PASTA"
+ },
+ "compactList": {
+ "name": "Nome",
+ "updated": "Atualizado",
+ "settings": "Configurações"
+ },
+ "trailingActions": {
+ "viewQA": "Ver Perguntas e Respostas",
+ "downloadDataroom": "Baixar sala de dados",
+ "teamMemberTooltip": "Verificação ignorada porque você é membro da equipe; nenhuma análise será coletada"
+ },
+ "navToasts": {
+ "cannotDownloadPreview": "Você não pode baixar salas de dados no modo de pré-visualização.",
+ "cannotDownloadDocPreview": "Você não pode baixar documentos da sala de dados no modo de pré-visualização.",
+ "cannotDownloadFolderPreview": "Você não pode baixar pastas da sala de dados no modo de pré-visualização.",
+ "foldersNotAllowed": "O download de pastas não é permitido.",
+ "enterEmailFirst": "Insira seu e-mail na sala de dados para baixar.",
+ "documentStillProcessing": "O documento ainda está sendo processado. Aguarde um momento e tente novamente.",
+ "downloadPreparing": "Preparando download...",
+ "downloadSuccess": "Arquivo baixado com sucesso",
+ "downloadFailed": "Falha ao baixar arquivo"
+ },
+ "intro": {
+ "viewIntroduction": "Ver introdução",
+ "title": "Bem-vindo(a) à {{name}}",
+ "defaultName": "Sala de Dados",
+ "continueButton": "Continuar para a Sala de Dados"
+ },
+ "upload": {
+ "trigger": "Adicionar Documento",
+ "title": "Enviar Documento para a Sala de Dados",
+ "description": "Seu documento aparecerá imediatamente na sala de dados e será processado em segundo plano.",
+ "destinationLabel": "Pasta de destino",
+ "selectDestination": "Selecionar pasta de destino",
+ "uploadingTo": "Enviando para:",
+ "setByOwner": "(definido pelo proprietário da sala de dados)",
+ "success": "Documento enviado com sucesso!",
+ "successDescription": "Seu documento agora está visível na sala de dados."
+ },
+ "download": {
+ "folderTitle": "Baixar pasta: {{name}}",
+ "dataroomTitle": "Baixar {{name}}",
+ "defaultName": "Sala de dados",
+ "chooseDescription": "Inicie o download. Opcionalmente, você pode receber um e-mail quando estiver pronto.",
+ "otpDescription": "Verifique seu e-mail para receber notificações de download.",
+ "ready": "Seus arquivos estão prontos para download.",
+ "preparing": "Preparando seus arquivos...",
+ "notifyByEmail": "Avise-me por e-mail quando o download estiver pronto",
+ "needsVerification": "Você precisará verificar seu e-mail primeiro com um código de uso único.",
+ "starting": "Iniciando...",
+ "start": "Iniciar download",
+ "cancel": "Cancelar",
+ "viewDownloads": "Ver seus downloads",
+ "openDownloads": "Abrir página de downloads",
+ "preparingShort": "Preparando...",
+ "processingFiles": "Processando {{processed}} de {{total}} arquivos...",
+ "complete": "Seu download está pronto!",
+ "failed": "O download falhou.",
+ "downloadZip": "Baixar ZIP",
+ "downloadAll": "Baixar tudo ({{count}} partes)",
+ "downloadingProgress": "Baixando {{current}} de {{total}}...",
+ "part": "Parte {{index}}",
+ "expiresIn": "Expira em {{time}}",
+ "expiresLessThanHour": "menos de uma hora",
+ "expiresDays_one": "{{count}} dia",
+ "expiresDays_other": "{{count}} dias",
+ "expiresHours_one": "{{count}} hora",
+ "expiresHours_other": "{{count}} horas",
+ "willEmailWhenReady": "Você pode fechar isto. Enviaremos um e-mail quando estiver pronto.",
+ "checkBackOnDownloads": "Você pode fechar isto. Volte à página de downloads quando estiver pronto.",
+ "tryAgain": "Tentar novamente",
+ "startFailed": "Falha ao iniciar o download",
+ "statusFetchFailed": "Falha ao obter o status",
+ "expiresSoon": "em breve"
+ },
+ "downloadsPage": {
+ "title": "Seus downloads",
+ "description": "Baixe seus arquivos preparados abaixo. Os links expiram após 3 dias.",
+ "emailHeading": "Ver seus downloads",
+ "emailDescription": "Insira o e-mail que você usou para acessar este data room.",
+ "emailPlaceholder": "[email protected]",
+ "sendingCode": "Enviando código...",
+ "continueButton": "Continuar",
+ "verifyEmailHeading": "Verifique seu e-mail",
+ "empty": "Você ainda não tem downloads. Inicie um download no data room para vê-lo aqui.",
+ "jobFolderPrefix": "Pasta:",
+ "jobFullDataroom": "Data room completo",
+ "expired": "expirado",
+ "expiresPrefix": "Expira em {{time}}",
+ "hideParts": "Ocultar partes",
+ "showParts": "Mostrar partes ({{count}})",
+ "orIndividual": "Ou baixar individualmente:",
+ "partOf": "Parte {{index}} de {{total}}",
+ "errors": {
+ "noAccess": "Nenhum acesso encontrado para este e-mail. Use o e-mail com o qual você abriu o data room.",
+ "rateLimit": "Muitas solicitações. Tente novamente mais tarde.",
+ "generic": "Algo deu errado."
+ }
+ },
+ "downloadOtp": {
+ "defaultDescription": "Enviamos um código de 6 dígitos para <email>{{email}}</email>. Insira abaixo para verificar e receber notificações de download.",
+ "verify": "Verificar",
+ "verifying": "Verificando...",
+ "noEmail": "Não recebeu o e-mail?",
+ "resending": "Enviando...",
+ "resend": "Reenviar código",
+ "resendIn": "Reenviar código ({{seconds}} s)",
+ "sendFailed": "Falha ao enviar o código",
+ "invalidCode": "Código inválido"
+ },
+ "downloadsPanel": {
+ "ready": "Pronto",
+ "failedFallback": "Falhou",
+ "creatingZip": "Criando ZIP...",
+ "filesCount": "{{processed}} / {{total}} arquivos",
+ "verifying": "Verificando acesso...",
+ "buildingFileList": "Criando lista de arquivos...",
+ "preparing": "Preparando..."
+ },
+ "folderPicker": {
+ "home": "Início"
+ },
+ "indexFile": {
+ "trigger": "Gerar arquivo de índice",
+ "title": "Gerar arquivo de índice do data room",
+ "description": "Selecione um formato para gerar o arquivo de índice.",
+ "selectFormat": "Selecionar formato",
+ "generate": "Gerar",
+ "generating": "Gerando...",
+ "successToast": "Arquivo de índice gerado com sucesso",
+ "errorToast": "Falha ao gerar o índice",
+ "genericError": "Algo deu errado. Por favor, tente novamente."
+ }
+}
diff --git a/locales/pt-BR/viewer.json b/locales/pt-BR/viewer.json
new file mode 100644
index 00000000..7e031340
--- /dev/null
+++ b/locales/pt-BR/viewer.json
@@ -0,0 +1,58 @@
+{
+ "nav": {
+ "home": "Início",
+ "viewQA": "Ver Perguntas e Respostas",
+ "linksOnPage": "Links na página",
+ "linksOnCurrentPage": "Links na página atual",
+ "zoomIn": "Aumentar zoom",
+ "zoomOut": "Diminuir zoom",
+ "fullscreen": "Tela cheia",
+ "downloadDocument": "Baixar documento",
+ "teamMemberTooltip": "Verificação ignorada porque você é membro da equipe; nenhuma análise será coletada",
+ "changeLanguage": "Alterar idioma"
+ },
+ "toasts": {
+ "preparingDownload": "Preparando download...",
+ "preparingDownloadWatermark": "Preparando download com marca d'água...",
+ "downloadSuccess": "Arquivo baixado com sucesso",
+ "downloadFailed": "Falha ao baixar arquivo",
+ "cannotDownloadPreview": "Você não pode baixar documentos no modo de pré-visualização."
+ },
+ "downloadOnly": {
+ "title": "Baixar documento",
+ "description": "Este documento está disponível apenas para download",
+ "button": "Baixar agora"
+ },
+ "awayPoster": {
+ "title": "Pausamos para proteger sua sessão",
+ "description": "Você ficou inativo por {{duration}}, então pausamos a pré-visualização do documento para manter a sessão segura.",
+ "ariaTitle": "Notificação de sessão pausada automaticamente",
+ "ariaDescription": "Sua sessão foi pausada por inatividade. Clique em continuar ou mova o mouse para retomar.",
+ "badge": "Pausado automaticamente",
+ "idleFor": "{{duration}} inativo",
+ "minSec": "{{minutes}} min {{seconds}} s",
+ "minOnly": "{{minutes}} min",
+ "secOnly": "{{seconds}} s",
+ "resume": "Continue de onde parou",
+ "moveHint": "Ou simplesmente mova o mouse ou pressione qualquer tecla para continuar"
+ },
+ "poweredBy": {
+ "shareDocsVia": "Compartilhar documentos via"
+ },
+ "report": {
+ "trigger": "Denunciar abuso",
+ "title": "Reportar um problema",
+ "description": "Viu algo inapropriado? Vamos analisar e, se necessário, tomar providências.",
+ "submit": "Enviar denúncia",
+ "successToast": "Denúncia enviada com sucesso",
+ "selectTypeError": "Selecione um tipo de abuso.",
+ "types": {
+ "spam": "Spam, fraude ou golpe",
+ "malware": "Malware ou vírus",
+ "copyright": "Violação de direitos autorais",
+ "harmful": "Conteúdo prejudicial",
+ "notWorking": "O conteúdo não está funcionando corretamente",
+ "other": "Outro"
+ }
+ }
+}
diff --git a/package-lock.json b/package-lock.json
index 8e59bbf1..385d86e8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -100,6 +100,7 @@
"exceljs": "^4.4.0",
"fluent-ffmpeg": "^2.1.3",
"html2canvas": "^1.4.1",
+ "i18next": "^26.3.0",
"input-otp": "^1.4.2",
"js-cookie": "^3.0.7",
"jsonwebtoken": "^9.0.3",
@@ -130,6 +131,7 @@
"react-email": "^6.3.2",
"react-hook-form": "^7.75.0",
"react-hotkeys-hook": "^5.3.2",
+ "react-i18next": "^17.0.8",
"react-intersection-observer": "^10.0.3",
"react-markdown": "^10.1.0",
"react-notion-x": "^7.10.0",
@@ -4623,7 +4625,9 @@
}
},
"node_modules/@ioredis/commands": {
- "version": "1.5.1",
+ "version": "1.10.0",
+ "resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.10.0.tgz",
+ "integrity": "sha512-UmeW7z4LfctwoQ5wkhVzgq8tXkreED2xZGpX+Bg+zA+WJFZCT6c062AfCK/Dfk81xZnnwdhJCUMkitihRaoC2Q==",
"license": "MIT",
"optional": true
},
@@ -15966,6 +15970,15 @@
"node": ">=16.9.0"
}
},
+ "node_modules/html-parse-stringify": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/html-parse-stringify/-/html-parse-stringify-3.0.1.tgz",
+ "integrity": "sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg==",
+ "license": "MIT",
+ "dependencies": {
+ "void-elements": "3.1.0"
+ }
+ },
"node_modules/html-to-text": {
"version": "9.0.5",
"license": "MIT",
@@ -16148,6 +16161,34 @@
"url": "https://github.com/sponsors/EvanHahn"
}
},
+ "node_modules/i18next": {
+ "version": "26.3.0",
+ "resolved": "https://registry.npmjs.org/i18next/-/i18next-26.3.0.tgz",
+ "integrity": "sha512-gHSgGpUXVmuqE2El1W61DmxeyeTlFfZgdJRWMo9jScAn5pu7TuTuiccb1zh3E2J9hEBVGJ23+96x0ieBhfuIHA==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://www.locize.com/i18next"
+ },
+ {
+ "type": "individual",
+ "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project"
+ },
+ {
+ "type": "individual",
+ "url": "https://www.locize.com"
+ }
+ ],
+ "license": "MIT",
+ "peerDependencies": {
+ "typescript": "^5 || ^6"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
"node_modules/iconv-lite": {
"version": "0.6.3",
"license": "MIT",
@@ -16287,19 +16328,19 @@
}
},
"node_modules/ioredis": {
- "version": "5.10.1",
+ "version": "5.11.1",
+ "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.11.1.tgz",
+ "integrity": "sha512-ehuGcf94bQXhfagULNXrJdfnWO38v070jxSx/qE87Kjzmu2fU7ro5EFAb+OPituLqgfyuQaym5DlrNydW2sJ9A==",
"license": "MIT",
"optional": true,
"dependencies": {
- "@ioredis/commands": "1.5.1",
- "cluster-key-slot": "^1.1.0",
- "debug": "^4.3.4",
- "denque": "^2.1.0",
- "lodash.defaults": "^4.2.0",
- "lodash.isarguments": "^3.1.0",
- "redis-errors": "^1.2.0",
- "redis-parser": "^3.0.0",
- "standard-as-callback": "^2.1.0"
+ "@ioredis/commands": "1.10.0",
+ "cluster-key-slot": "1.1.1",
+ "debug": "4.4.3",
+ "denque": "2.1.0",
+ "redis-errors": "1.2.0",
+ "redis-parser": "3.0.0",
+ "standard-as-callback": "2.1.0"
},
"engines": {
"node": ">=12.22.0"
@@ -16309,6 +16350,16 @@
"url": "https://opencollective.com/ioredis"
}
},
+ "node_modules/ioredis/node_modules/cluster-key-slot": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.1.tgz",
+ "integrity": "sha512-rwHwUfXL40Chm1r08yrhU3qpUvdVlgkKNeyeGPOxnW8/SyVDvgRaed/Uz54AqWNaTCAThlj6QAs3TZcKI0xDEw==",
+ "license": "Apache-2.0",
+ "optional": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/ip-address": {
"version": "10.2.0",
"resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.2.0.tgz",
@@ -17410,11 +17461,6 @@
"version": "4.3.0",
"license": "MIT"
},
- "node_modules/lodash.isarguments": {
- "version": "3.1.0",
- "license": "MIT",
- "optional": true
- },
"node_modules/lodash.isboolean": {
"version": "3.0.3",
"license": "MIT"
@@ -21425,6 +21471,33 @@
"react-dom": ">=16.8.0"
}
},
+ "node_modules/react-i18next": {
+ "version": "17.0.8",
+ "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-17.0.8.tgz",
+ "integrity": "sha512-0ooKbGLU8JXhe1zwpQUWIeXSgLPOfwJmgheWRIUpcoA0CpyabpGhayjdG+/eA5esC1AQ8h2jWpXjJfzQzeDOCw==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.29.2",
+ "html-parse-stringify": "^3.0.1",
+ "use-sync-external-store": "^1.6.0"
+ },
+ "peerDependencies": {
+ "i18next": ">= 26.2.0",
+ "react": ">= 16.8.0",
+ "typescript": "^5 || ^6"
+ },
+ "peerDependenciesMeta": {
+ "react-dom": {
+ "optional": true
+ },
+ "react-native": {
+ "optional": true
+ },
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
"node_modules/react-image": {
"version": "4.1.0",
"license": "MIT",
@@ -24813,6 +24886,15 @@
"d3-timer": "^3.0.1"
}
},
+ "node_modules/void-elements": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-3.1.0.tgz",
+ "integrity": "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/w3c-keyname": {
"version": "2.2.8",
"license": "MIT"
diff --git a/package.json b/package.json
index 26b142c2..92441604 100644
--- a/package.json
+++ b/package.json
@@ -112,6 +112,7 @@
"exceljs": "^4.4.0",
"fluent-ffmpeg": "^2.1.3",
"html2canvas": "^1.4.1",
+ "i18next": "^26.3.0",
"input-otp": "^1.4.2",
"js-cookie": "^3.0.7",
"jsonwebtoken": "^9.0.3",
@@ -142,6 +143,7 @@
"react-email": "^6.3.2",
"react-hook-form": "^7.75.0",
"react-hotkeys-hook": "^5.3.2",
+ "react-i18next": "^17.0.8",
"react-intersection-observer": "^10.0.3",
"react-markdown": "^10.1.0",
"react-notion-x": "^7.10.0",
diff --git a/pages/api/teams/[teamId]/datarooms/[id]/branding.ts b/pages/api/teams/[teamId]/datarooms/[id]/branding.ts
index 62ad6176..03f62068 100644
--- a/pages/api/teams/[teamId]/datarooms/[id]/branding.ts
+++ b/pages/api/teams/[teamId]/datarooms/[id]/branding.ts
@@ -15,9 +15,11 @@ import {
} from "@/ee/features/branding/lib/dataroom-viewer-layout";
import { validateRedirectUrl } from "@/lib/api/domains/validate-redirect-url";
import { enforceDataroomMemberScope } from "@/lib/api/rbac/guard";
+import { DEFAULT_LOCALE, SUPPORTED_LOCALE_CODES } from "@/lib/i18n/locales";
import {
teamPlanAllowsCustomWelcomeAndCta,
teamPlanAllowsLayoutCustomization,
+ teamPlanAllowsVisitorLanguage,
} from "@/lib/billing/team-plan-custom-messaging";
import { errorhandler } from "@/lib/errorHandler";
import prisma from "@/lib/prisma";
@@ -43,6 +45,12 @@ const updateDataroomBrandingSchema = z.object({
viewerLayoutPreset: DataroomViewerLayoutPresetSchema.optional(),
viewerHeaderStyle: DataroomViewerHeaderStyleSchema.optional(),
hideFolderIconsInMain: z.boolean().optional(),
+ // Admin-chosen viewer language. Constrained to the server's supported list
+ // so a hand-crafted request can't poison the DB with a code the viewer
+ // can't load translations for.
+ defaultLanguage: z
+ .enum(SUPPORTED_LOCALE_CODES as unknown as [string, ...string[]])
+ .optional(),
});
type LayoutFields = {
@@ -181,6 +189,7 @@ export default async function handle(
}
const messagingAllowed = teamPlanAllowsCustomWelcomeAndCta(teamAuth.plan);
const layoutAllowed = teamPlanAllowsLayoutCustomization(teamAuth.plan);
+ const languageAllowed = teamPlanAllowsVisitorLanguage(teamAuth.plan);
const parsed = updateDataroomBrandingSchema.safeParse(req.body);
if (!parsed.success) {
@@ -201,6 +210,15 @@ export default async function handle(
})
: {};
+ // English is free on every plan; non-English requires a Data Rooms tier.
+ // A hand-crafted request from a lower plan is silently dropped instead of
+ // erroring so the rest of the branding save still succeeds.
+ const languageData =
+ body.defaultLanguage &&
+ (languageAllowed || body.defaultLanguage === DEFAULT_LOCALE)
+ ? { defaultLanguage: body.defaultLanguage }
+ : {};
+
let validatedCtaUrl: string | null | undefined = body.ctaUrl;
if (messagingAllowed && typeof body.ctaUrl === "string") {
const ctaValidation = await validateRedirectUrl(body.ctaUrl, teamId);
@@ -241,6 +259,7 @@ export default async function handle(
? body.linkPreviewFavicon ?? undefined
: undefined,
...layoutData,
+ ...languageData,
dataroomId,
},
});
@@ -260,6 +279,7 @@ export default async function handle(
}
const messagingAllowed = teamPlanAllowsCustomWelcomeAndCta(teamAuth.plan);
const layoutAllowed = teamPlanAllowsLayoutCustomization(teamAuth.plan);
+ const languageAllowed = teamPlanAllowsVisitorLanguage(teamAuth.plan);
const parsed = updateDataroomBrandingSchema.safeParse(req.body);
if (!parsed.success) {
@@ -303,6 +323,15 @@ export default async function handle(
})
: {};
+ // English is free on every plan; non-English requires a Data Rooms tier.
+ // When a lower-plan request supplies a paid locale we omit the field so
+ // any existing saved value is preserved.
+ const languageData =
+ body.defaultLanguage &&
+ (languageAllowed || body.defaultLanguage === DEFAULT_LOCALE)
+ ? { defaultLanguage: body.defaultLanguage }
+ : {};
+
const brand = await prisma.dataroomBrand.update({
where: {
dataroomId,
@@ -336,6 +365,7 @@ export default async function handle(
? body.linkPreviewFavicon
: undefined,
...layoutData,
+ ...languageData,
},
});
diff --git a/pages/datarooms/[id]/branding/index.tsx b/pages/datarooms/[id]/branding/index.tsx
index ef8e13ca..c4e3e36d 100644
--- a/pages/datarooms/[id]/branding/index.tsx
+++ b/pages/datarooms/[id]/branding/index.tsx
@@ -34,6 +34,12 @@ import { CollapsibleBrandingSection } from "@/ee/features/branding/components/co
import { DataroomLayoutPresetCards } from "@/ee/features/branding/components/dataroom-layout-preset-cards";
import { BrandingLinkPreviewForm } from "@/ee/features/branding/components/branding-link-preview-form";
import { BrandingSocialPreviewReadonly } from "@/ee/features/branding/components/branding-social-preview-readonly";
+import { VisitorLanguageCard } from "@/ee/features/branding/components/visitor-language-card";
+import {
+ DEFAULT_LOCALE,
+ asSupportedLocale,
+ type SupportedLocaleCode,
+} from "@/lib/i18n/locales";
import { DataroomBannerMedia } from "@/components/view/dataroom/dataroom-banner-media";
import AppLayout from "@/components/layouts/app";
import { Button } from "@/components/ui/button";
@@ -61,6 +67,7 @@ export default function DataroomBrandPage() {
isDatarooms || isDataroomsPlus || isTrial;
const hasBusinessMessagingAccess =
isBusiness || isDatarooms || isTrial;
+ const hasVisitorLanguageAccess = isDataroomsPlus || isTrial;
const { dataroom } = useDataroom();
const { brand: dataroomBrand } = useDataroomBrand({
dataroomId: dataroom?.id,
@@ -100,6 +107,11 @@ export default function DataroomBrandPage() {
useState<boolean>(false);
const [ctaLabel, setCtaLabel] = useState<string>("");
const [ctaUrl, setCtaUrl] = useState<string>("");
+
+ // Visitor i18n: a single language the admin picks; visitors never switch.
+ const [defaultLanguage, setDefaultLanguage] = useState<SupportedLocaleCode>(
+ DEFAULT_LOCALE,
+ );
const [debouncedBrandColor] = useDebounce(brandColor, 300);
const [debouncedAccentColor] = useDebounce(accentColor, 300);
const [debouncedWelcomeMessage] = useDebounce(welcomeMessage, 500);
@@ -138,6 +150,8 @@ export default function DataroomBrandPage() {
hideFolderIconsInMain: boolean;
} | null>(null);
+ const initialLanguageRef = useRef<SupportedLocaleCode | null>(null);
+
const [upgradeLayoutsModalOpen, setUpgradeLayoutsModalOpen] =
useState<boolean>(false);
const [upgradeMessagingModalOpen, setUpgradeMessagingModalOpen] =
@@ -190,6 +204,19 @@ export default function DataroomBrandPage() {
const layoutBlocksSave =
!hasLayoutCustomizationAccess && layoutHasUnsavedChanges;
+ const languageHasUnsavedChanges =
+ initialLanguageRef.current !== null &&
+ initialLanguageRef.current !== defaultLanguage;
+
+ // English is the default locale and always free — only block when the
+ // user lands on a non-default language without an eligible plan.
+ const languageBlocksSave =
+ !hasVisitorLanguageAccess &&
+ languageHasUnsavedChanges &&
+ defaultLanguage !== DEFAULT_LOCALE;
+
+ const blocksSave = layoutBlocksSave || languageBlocksSave;
+
const applyLayoutPreset = (id: DataroomLayoutCardId) => {
const restoreBanner = () =>
lastVisibleBannerRef.current ??
@@ -439,6 +466,12 @@ export default function DataroomBrandPage() {
);
setLinkPreviewImage((dataroomBrand as any)?.linkPreviewImage ?? null);
setLinkPreviewFavicon((dataroomBrand as any)?.linkPreviewFavicon ?? null);
+ const initialLanguage =
+ asSupportedLocale((dataroomBrand as any)?.defaultLanguage) ??
+ asSupportedLocale((globalBrand as any)?.defaultLanguage) ??
+ DEFAULT_LOCALE;
+ setDefaultLanguage(initialLanguage);
+ initialLanguageRef.current = initialLanguage;
return;
}
@@ -510,6 +543,11 @@ export default function DataroomBrandPage() {
);
setLinkPreviewImage((globalBrand as any)?.linkPreviewImage ?? null);
setLinkPreviewFavicon((globalBrand as any)?.linkPreviewFavicon ?? null);
+ const inheritedLanguage =
+ asSupportedLocale((globalBrand as any)?.defaultLanguage) ??
+ DEFAULT_LOCALE;
+ setDefaultLanguage(inheritedLanguage);
+ initialLanguageRef.current = inheritedLanguage;
} else {
setBrandColor("#000000");
setAccentColor("#FFFFFF");
@@ -539,6 +577,8 @@ export default function DataroomBrandPage() {
setLinkPreviewDescription("");
setLinkPreviewImage(null);
setLinkPreviewFavicon(null);
+ setDefaultLanguage(DEFAULT_LOCALE);
+ initialLanguageRef.current = DEFAULT_LOCALE;
}
}, [dataroomBrand, globalBrand]);
@@ -562,10 +602,10 @@ export default function DataroomBrandPage() {
const saveBranding = async (e: any) => {
e.preventDefault();
- // Block save and prompt for upgrade if the user changed any layout settings
- // without an eligible plan. Branding-only changes (colors, banner, logo)
- // still flow through.
- if (layoutBlocksSave) {
+ // Block save and prompt for upgrade if the user changed any layout or
+ // language settings without an eligible plan. Branding-only changes
+ // (colors, banner, logo) still flow through.
+ if (blocksSave) {
setUpgradeLayoutsModalOpen(true);
return;
}
@@ -662,6 +702,7 @@ export default function DataroomBrandPage() {
: null,
linkPreviewImage: linkPreviewEnabled ? linkPreviewImageUrl : null,
linkPreviewFavicon: linkPreviewEnabled ? linkPreviewFaviconUrl : null,
+ defaultLanguage,
};
const res = await fetch(
@@ -680,6 +721,13 @@ export default function DataroomBrandPage() {
);
// Update the original banner state to the new saved value
setOriginalBanner(data.banner);
+ initialLanguageRef.current = defaultLanguage;
+ initialLayoutSnapshotRef.current = {
+ cardLayout,
+ showFolderTree,
+ viewerHeaderStyle,
+ hideFolderIconsInMain,
+ };
setIsLoading(false);
toast.success("Branding updated successfully");
}
@@ -768,6 +816,11 @@ export default function DataroomBrandPage() {
);
setLinkPreviewImage((globalBrand as any)?.linkPreviewImage ?? null);
setLinkPreviewFavicon((globalBrand as any)?.linkPreviewFavicon ?? null);
+ const resetLanguage =
+ asSupportedLocale((globalBrand as any)?.defaultLanguage) ??
+ DEFAULT_LOCALE;
+ setDefaultLanguage(resetLanguage);
+ initialLanguageRef.current = resetLanguage;
setIsLoading(false);
toast.success("Branding reset successfully");
} else {
@@ -1281,6 +1334,19 @@ export default function DataroomBrandPage() {
</CardContent>
</Card>
+ <CollapsibleBrandingSection
+ title="Language"
+ defaultOpen={false}
+ >
+ <div className="flex flex-col gap-6">
+ <VisitorLanguageCard
+ defaultLanguage={defaultLanguage}
+ onDefaultLanguageChange={setDefaultLanguage}
+ hasAccess={hasVisitorLanguageAccess}
+ />
+ </div>
+ </CollapsibleBrandingSection>
+
<CollapsibleBrandingSection
title="Advanced settings"
defaultOpen={false}
@@ -1681,12 +1747,23 @@ export default function DataroomBrandPage() {
{/* Action Buttons - Always Visible */}
<div className="flex items-center gap-4 border-t bg-background pt-4">
- {layoutBlocksSave ? (
+ {blocksSave ? (
<UpgradeButton
- text="Save changes"
- clickedPlan={PlanEnum.DataRooms}
- trigger="dataroom_branding_layouts_save"
- highlightItem={["dataroom-viewer-layouts"]}
+ text={languageBlocksSave ? "save changes" : "Save changes"}
+ clickedPlan={
+ languageBlocksSave
+ ? PlanEnum.DataRoomsPlus
+ : PlanEnum.DataRooms
+ }
+ trigger={
+ languageBlocksSave
+ ? "dataroom_branding_language_save"
+ : "dataroom_branding_layouts_save"
+ }
+ highlightItem={[
+ ...(layoutBlocksSave ? ["dataroom-viewer-layouts"] : []),
+ ...(languageBlocksSave ? ["dataroom-localisation"] : []),
+ ]}
hideItems={["datarooms"]}
/>
) : (
@@ -1710,9 +1787,20 @@ export default function DataroomBrandPage() {
</Button>
</div>
<UpgradePlanModal
- clickedPlan={PlanEnum.DataRooms}
- trigger="dataroom_branding_layouts_save"
- highlightItem={["dataroom-viewer-layouts"]}
+ clickedPlan={
+ languageBlocksSave
+ ? PlanEnum.DataRoomsPlus
+ : PlanEnum.DataRooms
+ }
+ trigger={
+ languageBlocksSave
+ ? "dataroom_branding_language_save"
+ : "dataroom_branding_layouts_save"
+ }
+ highlightItem={[
+ ...(layoutBlocksSave ? ["dataroom-viewer-layouts"] : []),
+ ...(languageBlocksSave ? ["dataroom-localisation"] : []),
+ ]}
hideItems={["datarooms"]}
open={upgradeLayoutsModalOpen}
setOpen={setUpgradeLayoutsModalOpen}
diff --git a/pages/view/[linkId]/d/[documentId].tsx b/pages/view/[linkId]/d/[documentId].tsx
index fecf75f9..ec0ff0e2 100644
--- a/pages/view/[linkId]/d/[documentId].tsx
+++ b/pages/view/[linkId]/d/[documentId].tsx
@@ -13,6 +13,10 @@ import z from "zod";
import { fetchLinkDataById } from "@/lib/api/links/link-data";
import { getFeatureFlags } from "@/lib/featureFlags";
+import {
+ buildViewerI18nPageProps,
+ type ViewerI18nPageProps,
+} from "@/lib/i18n/viewer-page-props";
import notion from "@/lib/notion";
import {
addSignedUrls,
@@ -24,6 +28,7 @@ import { CustomUser, LinkWithDataroomDocument, NotionTheme } from "@/lib/types";
import LoadingSpinner from "@/components/ui/loading-spinner";
import CustomMetaTag from "@/components/view/custom-metatag";
import DataroomDocumentView from "@/components/view/dataroom/dataroom-document-view";
+import { ViewerI18nProvider } from "@/components/view/viewer-i18n-provider";
type DataroomDocumentLinkData = {
linkType: "DATAROOM_LINK";
@@ -31,7 +36,7 @@ type DataroomDocumentLinkData = {
brand: DataroomBrand | null;
};
-type DataroomDocumentProps = {
+type DataroomDocumentProps = Partial<ViewerI18nPageProps> & {
linkData: DataroomDocumentLinkData;
notionData: {
rootNotionPageId: string | null;
@@ -56,7 +61,7 @@ type DataroomDocumentProps = {
error?: boolean;
};
-export default function DataroomDocumentViewPage({
+function DataroomDocumentViewPageInner({
frozen,
linkData,
notionData,
@@ -200,6 +205,19 @@ export default function DataroomDocumentViewPage({
);
}
+export default function DataroomDocumentViewPage(props: DataroomDocumentProps) {
+ const locale = props.i18n?.locale ?? "en";
+ const resources = props.i18n?.resources ?? {};
+ return (
+ <ViewerI18nProvider
+ locale={locale}
+ resources={resources}
+ >
+ <DataroomDocumentViewPageInner {...props} />
+ </ViewerI18nProvider>
+ );
+}
+
export async function getStaticProps(context: GetStaticPropsContext) {
const { linkId: linkIdParam, documentId: documentIdParam } =
context.params as {
@@ -274,6 +292,14 @@ export async function getStaticProps(context: GetStaticPropsContext) {
const featureFlags = await getFeatureFlags({ teamId: teamId || undefined });
const textSelectionEnabled = featureFlags.textSelection;
+ const defaultLanguage =
+ brand && "defaultLanguage" in brand ? brand.defaultLanguage : undefined;
+ const i18nProps = await buildViewerI18nPageProps(
+ typeof defaultLanguage === "string" || defaultLanguage === null
+ ? { defaultLanguage }
+ : null,
+ );
+
return {
props: {
linkData: {
@@ -315,6 +341,7 @@ export async function getStaticProps(context: GetStaticPropsContext) {
teamId === "cmk2hnmqh0000k304zcoezt6n",
logoOnAccessForm: teamId === "cm7nlkrhm0000qgh0nvyrrywr",
textSelectionEnabled,
+ ...i18nProps,
},
revalidate: brand || recordMap ? 10 : 60,
};
diff --git a/pages/view/[linkId]/downloads.tsx b/pages/view/[linkId]/downloads.tsx
index 61bfd635..0322525b 100644
--- a/pages/view/[linkId]/downloads.tsx
+++ b/pages/view/[linkId]/downloads.tsx
@@ -3,18 +3,49 @@ import { useRouter } from "next/router";
import { Loader2 } from "lucide-react";
+import {
+ buildViewerI18nPageProps,
+ type ViewerI18nPageProps,
+} from "@/lib/i18n/viewer-page-props";
+import prisma from "@/lib/prisma";
+
import { DownloadsPanel } from "@/components/view/dataroom/downloads-panel";
+import { ViewerI18nProvider } from "@/components/view/viewer-i18n-provider";
+
+type Props = Partial<ViewerI18nPageProps> & { linkId: string | null };
-export const getServerSideProps: GetServerSideProps = async (context) => {
+export const getServerSideProps: GetServerSideProps<Props> = async (context) => {
const linkId = context.params?.linkId as string;
- return { props: { linkId: linkId ?? null } };
+ let link: {
+ dataroom: { brand: { defaultLanguage: string | null } | null } | null;
+ } | null = null;
+
+ // Re-resolve the link's dataroom-brand default language so this page renders
+ // in the same locale as the dataroom it was opened from.
+ try {
+ if (linkId) {
+ link = await prisma.link.findUnique({
+ where: { id: linkId },
+ select: {
+ dataroom: { select: { brand: { select: { defaultLanguage: true } } } },
+ },
+ });
+ }
+ } catch {
+ link = null;
+ }
+
+ try {
+ const i18nProps = await buildViewerI18nPageProps(
+ link?.dataroom?.brand ?? null,
+ );
+ return { props: { linkId: linkId ?? null, ...i18nProps } };
+ } catch {
+ return { props: { linkId: linkId ?? null } };
+ }
};
-export default function ViewDownloadsPage({
- linkId: linkIdProp,
-}: {
- linkId: string | null;
-}) {
+function ViewDownloadsPageInner({ linkId: linkIdProp }: Props) {
const router = useRouter();
const linkId = (router.query.linkId as string) ?? linkIdProp ?? undefined;
@@ -28,3 +59,13 @@ export default function ViewDownloadsPage({
return <DownloadsPanel linkId={linkId} />;
}
+
+export default function ViewDownloadsPage(props: Props) {
+ const locale = props.i18n?.locale ?? "en";
+ const resources = props.i18n?.resources ?? {};
+ return (
+ <ViewerI18nProvider locale={locale} resources={resources}>
+ <ViewDownloadsPageInner {...props} />
+ </ViewerI18nProvider>
+ );
+}
diff --git a/pages/view/[linkId]/embed.tsx b/pages/view/[linkId]/embed.tsx
index 79cca5c9..9beb53ff 100644
--- a/pages/view/[linkId]/embed.tsx
+++ b/pages/view/[linkId]/embed.tsx
@@ -9,13 +9,14 @@ import { useAnalytics } from "@/lib/analytics";
import LoadingSpinner from "@/components/ui/loading-spinner";
import DataroomView from "@/components/view/dataroom/dataroom-view";
import DocumentView from "@/components/view/document-view";
+import { ViewerI18nProvider } from "@/components/view/viewer-i18n-provider";
import { ViewPageProps } from "./index";
// Reuse the same getStaticProps and getStaticPaths from the main view page
export { getStaticProps, getStaticPaths } from "./index";
-export default function EmbedPage(props: ViewPageProps) {
+function EmbedPageInner(props: ViewPageProps) {
const router = useRouter();
const [isEmbedded, setIsEmbedded] = useState<boolean | null>(null);
const analytics = useAnalytics();
@@ -179,3 +180,13 @@ export default function EmbedPage(props: ViewPageProps) {
);
}
}
+
+export default function EmbedPage(props: ViewPageProps) {
+ const locale = props.i18n?.locale ?? "en";
+ const resources = props.i18n?.resources ?? {};
+ return (
+ <ViewerI18nProvider locale={locale} resources={resources}>
+ <EmbedPageInner {...props} />
+ </ViewerI18nProvider>
+ );
+}
diff --git a/pages/view/[linkId]/index.tsx b/pages/view/[linkId]/index.tsx
index 0cb39ce0..a15af691 100644
--- a/pages/view/[linkId]/index.tsx
+++ b/pages/view/[linkId]/index.tsx
@@ -14,6 +14,10 @@ import z from "zod";
import { fetchLinkDataById } from "@/lib/api/links/link-data";
import { getFeatureFlags } from "@/lib/featureFlags";
+import {
+ buildViewerI18nPageProps,
+ type ViewerI18nPageProps,
+} from "@/lib/i18n/viewer-page-props";
import notion from "@/lib/notion";
import {
addSignedUrls,
@@ -31,6 +35,7 @@ import LoadingSpinner from "@/components/ui/loading-spinner";
import CustomMetaTag from "@/components/view/custom-metatag";
import DataroomView from "@/components/view/dataroom/dataroom-view";
import DocumentView from "@/components/view/document-view";
+import { ViewerI18nProvider } from "@/components/view/viewer-i18n-provider";
type DocumentLinkData = {
linkType: "DOCUMENT_LINK";
@@ -50,7 +55,7 @@ type WorkflowLinkData = {
brand: Brand | null;
};
-export interface ViewPageProps {
+export interface ViewPageProps extends Partial<ViewerI18nPageProps> {
frozen?: boolean;
linkData: DocumentLinkData | DataroomLinkData | WorkflowLinkData;
notionData: {
@@ -109,6 +114,11 @@ export const getStaticProps = async (context: GetStaticPropsContext) => {
};
}
+ // Pre-resolve viewer i18n props (default locale + bundles) so every
+ // return path below ships them. Brand may be null for workflow links —
+ // helper falls back to English in that case.
+ const i18nProps = await buildViewerI18nPageProps(brand as any);
+
// Handle workflow links - minimal props needed
if (linkType === "WORKFLOW_LINK") {
return {
@@ -136,6 +146,7 @@ export const getStaticProps = async (context: GetStaticPropsContext) => {
useAdvancedExcelViewer: false,
useCustomAccessForm: false,
logoOnAccessForm: false,
+ ...i18nProps,
},
revalidate: 60,
};
@@ -235,6 +246,7 @@ export const getStaticProps = async (context: GetStaticPropsContext) => {
teamId === "clup33by90000oewh4rfvp2eg",
annotationsEnabled,
textSelectionEnabled,
+ ...i18nProps,
},
revalidate: brand || recordMap ? 10 : 60,
};
@@ -322,6 +334,7 @@ export const getStaticProps = async (context: GetStaticPropsContext) => {
dataroomIndexEnabled,
annotationsEnabled,
textSelectionEnabled,
+ ...i18nProps,
},
revalidate: 10,
};
@@ -340,7 +353,7 @@ export async function getStaticPaths() {
};
}
-export default function ViewPage({
+function ViewPageInner({
frozen,
linkData,
notionData,
@@ -598,3 +611,17 @@ export default function ViewPage({
);
}
}
+
+export default function ViewPage(
+ props: ViewPageProps & { error?: boolean; notionError?: boolean },
+) {
+ // Fall back to English when `getStaticProps` hit an early-exit branch
+ // (frozen / error / notionError) and never produced i18n props.
+ const locale = props.i18n?.locale ?? "en";
+ const resources = props.i18n?.resources ?? {};
+ return (
+ <ViewerI18nProvider locale={locale} resources={resources}>
+ <ViewPageInner {...props} />
+ </ViewerI18nProvider>
+ );
+}
diff --git a/pages/view/domains/[domain]/[slug]/d/[documentId].tsx b/pages/view/domains/[domain]/[slug]/d/[documentId].tsx
index ef87609f..fd4f399b 100644
--- a/pages/view/domains/[domain]/[slug]/d/[documentId].tsx
+++ b/pages/view/domains/[domain]/[slug]/d/[documentId].tsx
@@ -13,6 +13,10 @@ import z from "zod";
import { fetchLinkDataByDomainSlug } from "@/lib/api/links/link-data";
import { getFeatureFlags } from "@/lib/featureFlags";
+import {
+ buildViewerI18nPageProps,
+ type ViewerI18nPageProps,
+} from "@/lib/i18n/viewer-page-props";
import notion from "@/lib/notion";
import {
addSignedUrls,
@@ -24,6 +28,7 @@ import { CustomUser, LinkWithDataroomDocument, NotionTheme } from "@/lib/types";
import LoadingSpinner from "@/components/ui/loading-spinner";
import CustomMetaTag from "@/components/view/custom-metatag";
import DataroomDocumentView from "@/components/view/dataroom/dataroom-document-view";
+import { ViewerI18nProvider } from "@/components/view/viewer-i18n-provider";
type DataroomDocumentLinkData = {
linkType: "DATAROOM_LINK";
@@ -31,7 +36,7 @@ type DataroomDocumentLinkData = {
brand: DataroomBrand | null;
};
-type DataroomDocumentProps = {
+type DataroomDocumentProps = Partial<ViewerI18nPageProps> & {
linkData: DataroomDocumentLinkData;
notionData: {
rootNotionPageId: string | null;
@@ -56,7 +61,7 @@ type DataroomDocumentProps = {
error?: boolean;
};
-export default function DataroomDocumentViewPage({
+function DataroomDocumentViewPageInner({
frozen,
linkData,
notionData,
@@ -201,6 +206,19 @@ export default function DataroomDocumentViewPage({
);
}
+export default function DataroomDocumentViewPage(props: DataroomDocumentProps) {
+ const locale = props.i18n?.locale ?? "en";
+ const resources = props.i18n?.resources ?? {};
+ return (
+ <ViewerI18nProvider
+ locale={locale}
+ resources={resources}
+ >
+ <DataroomDocumentViewPageInner {...props} />
+ </ViewerI18nProvider>
+ );
+}
+
export async function getStaticProps(context: GetStaticPropsContext) {
const {
domain: domainParam,
@@ -285,6 +303,8 @@ export async function getStaticProps(context: GetStaticPropsContext) {
const featureFlags = await getFeatureFlags({ teamId: teamId || undefined });
const textSelectionEnabled = featureFlags.textSelection;
+ const i18nProps = await buildViewerI18nPageProps(brand as any);
+
return {
props: {
linkData: {
@@ -326,6 +346,7 @@ export async function getStaticProps(context: GetStaticPropsContext) {
teamId === "cmk2hnmqh0000k304zcoezt6n",
logoOnAccessForm: teamId === "cm7nlkrhm0000qgh0nvyrrywr",
textSelectionEnabled,
+ ...i18nProps,
},
revalidate: brand || recordMap ? 10 : 60,
};
diff --git a/pages/view/domains/[domain]/[slug]/downloads.tsx b/pages/view/domains/[domain]/[slug]/downloads.tsx
index 63fb2257..719532e0 100644
--- a/pages/view/domains/[domain]/[slug]/downloads.tsx
+++ b/pages/view/domains/[domain]/[slug]/downloads.tsx
@@ -1,10 +1,17 @@
import { GetServerSideProps } from "next";
+import {
+ buildViewerI18nPageProps,
+ type ViewerI18nPageProps,
+} from "@/lib/i18n/viewer-page-props";
import prisma from "@/lib/prisma";
import { DownloadsPanel } from "@/components/view/dataroom/downloads-panel";
+import { ViewerI18nProvider } from "@/components/view/viewer-i18n-provider";
-export const getServerSideProps: GetServerSideProps = async (context) => {
+type Props = Partial<ViewerI18nPageProps> & { linkId: string };
+
+export const getServerSideProps: GetServerSideProps<Props> = async (context) => {
const domain = context.params?.domain as string;
const slug = context.params?.slug as string;
if (!domain || !slug) {
@@ -14,18 +21,26 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
where: {
domainSlug_slug: { slug, domainSlug: domain },
},
- select: { id: true },
+ select: {
+ id: true,
+ dataroom: { select: { brand: { select: { defaultLanguage: true } } } },
+ },
});
if (!link) {
return { notFound: true };
}
- return { props: { linkId: link.id } };
+ const i18nProps = await buildViewerI18nPageProps(
+ link.dataroom?.brand ?? null,
+ );
+ return { props: { linkId: link.id, ...i18nProps } };
};
-export default function DomainDownloadsPage({
- linkId,
-}: {
- linkId: string;
-}) {
- return <DownloadsPanel linkId={linkId} />;
+export default function DomainDownloadsPage(props: Props) {
+ const locale = props.i18n?.locale ?? "en";
+ const resources = props.i18n?.resources ?? {};
+ return (
+ <ViewerI18nProvider locale={locale} resources={resources}>
+ <DownloadsPanel linkId={props.linkId} />
+ </ViewerI18nProvider>
+ );
}
diff --git a/pages/view/domains/[domain]/[slug]/index.tsx b/pages/view/domains/[domain]/[slug]/index.tsx
index 42b3030a..fda13007 100644
--- a/pages/view/domains/[domain]/[slug]/index.tsx
+++ b/pages/view/domains/[domain]/[slug]/index.tsx
@@ -14,6 +14,10 @@ import z from "zod";
import { fetchLinkDataByDomainSlug } from "@/lib/api/links/link-data";
import { getFeatureFlags } from "@/lib/featureFlags";
+import {
+ buildViewerI18nPageProps,
+ type ViewerI18nPageProps,
+} from "@/lib/i18n/viewer-page-props";
import notion from "@/lib/notion";
import {
addSignedUrls,
@@ -31,6 +35,7 @@ import LoadingSpinner from "@/components/ui/loading-spinner";
import CustomMetaTag from "@/components/view/custom-metatag";
import DataroomView from "@/components/view/dataroom/dataroom-view";
import DocumentView from "@/components/view/document-view";
+import { ViewerI18nProvider } from "@/components/view/viewer-i18n-provider";
type DocumentLinkData = {
linkType: "DOCUMENT_LINK";
@@ -93,6 +98,8 @@ export const getStaticProps = async (context: GetStaticPropsContext) => {
};
}
+ const i18nProps = await buildViewerI18nPageProps(brand as any);
+
// Handle workflow links - minimal props needed
if (linkType === "WORKFLOW_LINK") {
return {
@@ -122,6 +129,7 @@ export const getStaticProps = async (context: GetStaticPropsContext) => {
useAdvancedExcelViewer: false,
useCustomAccessForm: false,
logoOnAccessForm: false,
+ ...i18nProps,
},
revalidate: 60,
};
@@ -209,6 +217,7 @@ export const getStaticProps = async (context: GetStaticPropsContext) => {
teamId === "cm7nlkrhm0000qgh0nvyrrywr" ||
teamId === "clup33by90000oewh4rfvp2eg",
textSelectionEnabled,
+ ...i18nProps,
},
revalidate: 10,
};
@@ -294,6 +303,7 @@ export const getStaticProps = async (context: GetStaticPropsContext) => {
teamId === "clup33by90000oewh4rfvp2eg",
dataroomIndexEnabled,
textSelectionEnabled,
+ ...i18nProps,
},
revalidate: 10,
};
@@ -312,19 +322,7 @@ export async function getStaticPaths() {
};
}
-export default function ViewPage({
- frozen,
- linkData,
- notionData,
- meta,
- showAccountCreationSlide,
- useAdvancedExcelViewer,
- useCustomAccessForm,
- logoOnAccessForm,
- dataroomIndexEnabled,
- textSelectionEnabled,
- error,
-}: {
+type DomainViewPageProps = Partial<ViewerI18nPageProps> & {
frozen?: boolean;
linkData: DocumentLinkData | DataroomLinkData | WorkflowLinkData;
notionData: {
@@ -347,7 +345,21 @@ export default function ViewPage({
dataroomIndexEnabled?: boolean;
textSelectionEnabled?: boolean;
error?: boolean;
-}) {
+};
+
+function ViewPageInner({
+ frozen,
+ linkData,
+ notionData,
+ meta,
+ showAccountCreationSlide,
+ useAdvancedExcelViewer,
+ useCustomAccessForm,
+ logoOnAccessForm,
+ dataroomIndexEnabled,
+ textSelectionEnabled,
+ error,
+}: DomainViewPageProps) {
const router = useRouter();
const { data: session, status } = useSession();
const [storedToken, setStoredToken] = useState<string | undefined>(undefined);
@@ -585,3 +597,16 @@ export default function ViewPage({
);
}
}
+
+export default function ViewPage(props: DomainViewPageProps) {
+ const locale = props.i18n?.locale ?? "en";
+ const resources = props.i18n?.resources ?? {};
+ return (
+ <ViewerI18nProvider
+ locale={locale}
+ resources={resources}
+ >
+ <ViewPageInner {...props} />
+ </ViewerI18nProvider>
+ );
+}
diff --git a/prisma/migrations/20260529000000_add_viewer_language_settings/migration.sql b/prisma/migrations/20260529000000_add_viewer_language_settings/migration.sql
new file mode 100644
index 00000000..4ede77b9
--- /dev/null
+++ b/prisma/migrations/20260529000000_add_viewer_language_settings/migration.sql
@@ -0,0 +1,5 @@
+-- AlterTable
+ALTER TABLE "Brand" ADD COLUMN "defaultLanguage" TEXT NOT NULL DEFAULT 'en';
+
+-- AlterTable
+ALTER TABLE "DataroomBrand" ADD COLUMN "defaultLanguage" TEXT NOT NULL DEFAULT 'en';
diff --git a/prisma/schema/dataroom.prisma b/prisma/schema/dataroom.prisma
index 606cf3c0..74940e59 100644
--- a/prisma/schema/dataroom.prisma
+++ b/prisma/schema/dataroom.prisma
@@ -278,6 +278,10 @@ model DataroomBrand {
linkPreviewImage String?
linkPreviewFavicon String?
+ // Visitor-side language (i18n) settings — these override the team-level
+ // Admin-chosen viewer language (BCP-47). See `lib/i18n/viewer-page-props.ts`.
+ defaultLanguage String @default("en") // BCP-47 tag from SUPPORTED_LOCALES; admin-chosen viewer language
+
dataroomId String @unique
dataroom Dataroom @relation(fields: [dataroomId], references: [id], onDelete: Cascade)
diff --git a/prisma/schema/schema.prisma b/prisma/schema/schema.prisma
index d0a26d9a..a42650c5 100644
--- a/prisma/schema/schema.prisma
+++ b/prisma/schema/schema.prisma
@@ -106,6 +106,10 @@ model Brand {
linkPreviewImage String?
linkPreviewFavicon String?
+ // Visitor-side language (i18n) settings — applies to the access form and
+ // document viewer chrome shown to people who open a shared link.
+ defaultLanguage String @default("en") // BCP-47 tag from SUPPORTED_LOCALES; admin-chosen viewer language
+
teamId String @unique
team Team @relation(fields: [teamId], references: [id], onDelete: Cascade)