Skip to content

The Open Source DocuSign Alternative.

fix(i18n): mark span strings for translation (#2494)

Konradca199e788505
diff --git a/apps/remix/app/components/embed/embed-client-loading.tsx b/apps/remix/app/components/embed/embed-client-loading.tsx
index 0d4c2340b..02275efae 100644
--- a/apps/remix/app/components/embed/embed-client-loading.tsx
+++ b/apps/remix/app/components/embed/embed-client-loading.tsx
@@ -1,3 +1,4 @@
+import { Trans } from '@lingui/react/macro';
import { Loader } from 'lucide-react';
export const EmbedClientLoading = () => {
@@ -5,7 +6,9 @@ export const EmbedClientLoading = () => {
<div className="bg-background fixed left-0 top-0 z-[9999] flex h-full w-full items-center justify-center">
<Loader className="mr-2 h-4 w-4 animate-spin" />
- <span>Loading...</span>
+ <span>
+ <Trans>Loading...</Trans>
+ </span>
</div>
);
};
diff --git a/apps/remix/app/components/embed/embed-direct-template-client-page.tsx b/apps/remix/app/components/embed/embed-direct-template-client-page.tsx
index 1671c0dc6..fc143e163 100644
--- a/apps/remix/app/components/embed/embed-direct-template-client-page.tsx
+++ b/apps/remix/app/components/embed/embed-direct-template-client-page.tsx
@@ -499,7 +499,9 @@ export const EmbedDirectTemplateClientPage = ({
{!hidePoweredBy && (
<div className="fixed bottom-0 left-0 z-40 rounded-tr bg-primary px-2 py-1 text-xs font-medium text-primary-foreground opacity-60 hover:opacity-100">
- <span>Powered by</span>
+ <span>
+ <Trans>Powered by</Trans>
+ </span>
<BrandingLogo className="ml-2 inline-block h-[14px]" />
</div>
)}
diff --git a/apps/remix/app/components/embed/embed-document-signing-page-v1.tsx b/apps/remix/app/components/embed/embed-document-signing-page-v1.tsx
index 35af66e60..ecb642d49 100644
--- a/apps/remix/app/components/embed/embed-document-signing-page-v1.tsx
+++ b/apps/remix/app/components/embed/embed-document-signing-page-v1.tsx
@@ -510,7 +510,9 @@ export const EmbedSignDocumentV1ClientPage = ({
{!hidePoweredBy && (
<div className="fixed bottom-0 left-0 z-40 rounded-tr bg-primary px-2 py-1 text-xs font-medium text-primary-foreground opacity-60 hover:opacity-100">
- <span>Powered by</span>
+ <span>
+ <Trans>Powered by</Trans>
+ </span>
<BrandingLogo className="ml-2 inline-block h-[14px]" />
</div>
)}
diff --git a/apps/remix/app/components/general/document-signing/document-signing-mobile-widget.tsx b/apps/remix/app/components/general/document-signing/document-signing-mobile-widget.tsx
index 40eb9dc92..21636532f 100644
--- a/apps/remix/app/components/general/document-signing/document-signing-mobile-widget.tsx
+++ b/apps/remix/app/components/general/document-signing/document-signing-mobile-widget.tsx
@@ -122,7 +122,9 @@ export const DocumentSigningMobileWidget = () => {
{!hidePoweredBy && (
<div className="mt-2 inline-block rounded bg-primary px-2 py-1 text-xs font-medium text-primary-foreground opacity-60 hover:opacity-100 lg:hidden">
- <span>Powered by</span>
+ <span>
+ <Trans>Powered by</Trans>
+ </span>
<BrandingLogo className="ml-2 inline-block h-[14px]" />
</div>
)}
diff --git a/apps/remix/app/components/general/document-signing/document-signing-page-view-v2.tsx b/apps/remix/app/components/general/document-signing/document-signing-page-view-v2.tsx
index a4cb4a59c..d4dbb72bd 100644
--- a/apps/remix/app/components/general/document-signing/document-signing-page-view-v2.tsx
+++ b/apps/remix/app/components/general/document-signing/document-signing-page-view-v2.tsx
@@ -252,7 +252,9 @@ export const DocumentSigningPageViewV2 = () => {
target="_blank"
className="fixed bottom-0 right-0 z-40 hidden cursor-pointer rounded-tl bg-primary px-2 py-1 text-xs font-medium text-primary-foreground opacity-60 hover:opacity-100 lg:block"
>
- <span>Powered by</span>
+ <span>
+ <Trans>Powered by</Trans>
+ </span>
<BrandingLogo className="ml-2 inline-block h-[14px]" />
</a>
)}
diff --git a/apps/remix/app/components/general/envelope-editor/envelope-editor-fields-page.tsx b/apps/remix/app/components/general/envelope-editor/envelope-editor-fields-page.tsx
index 548ec7420..8eba4eb8a 100644
--- a/apps/remix/app/components/general/envelope-editor/envelope-editor-fields-page.tsx
+++ b/apps/remix/app/components/general/envelope-editor/envelope-editor-fields-page.tsx
@@ -296,19 +296,31 @@ export const EnvelopeEditorFieldsPage = () => {
<div className="space-y-2 rounded-md border border-border bg-muted/50 p-3 text-sm text-foreground">
<p>
- <span className="min-w-12 text-muted-foreground">Pos X:&nbsp;</span>
+ <span className="min-w-12 text-muted-foreground">
+ <Trans>Pos X:</Trans>
+ </span>
+ &nbsp;
{selectedField.positionX.toFixed(2)}
</p>
<p>
- <span className="min-w-12 text-muted-foreground">Pos Y:&nbsp;</span>
+ <span className="min-w-12 text-muted-foreground">
+ <Trans>Pos Y:</Trans>
+ </span>
+ &nbsp;
{selectedField.positionY.toFixed(2)}
</p>
<p>
- <span className="min-w-12 text-muted-foreground">Width:&nbsp;</span>
+ <span className="min-w-12 text-muted-foreground">
+ <Trans>Width:</Trans>
+ </span>
+ &nbsp;
{selectedField.width.toFixed(2)}
</p>
<p>
- <span className="min-w-12 text-muted-foreground">Height:&nbsp;</span>
+ <span className="min-w-12 text-muted-foreground">
+ <Trans>Height:</Trans>
+ </span>
+ &nbsp;
{selectedField.height.toFixed(2)}
</p>
</div>
diff --git a/apps/remix/app/routes/_authenticated+/admin+/organisations.$id.tsx b/apps/remix/app/routes/_authenticated+/admin+/organisations.$id.tsx
index 89b0b1fb6..c0f6e8ea7 100644
--- a/apps/remix/app/routes/_authenticated+/admin+/organisations.$id.tsx
+++ b/apps/remix/app/routes/_authenticated+/admin+/organisations.$id.tsx
@@ -212,7 +212,9 @@ export default function OrganisationGroupSettingsPage({
{SUBSCRIPTION_STATUS_MAP[organisation.subscription.status]} subscription found
</span>
) : (
- <span>No subscription found</span>
+ <span>
+ <Trans>No subscription found</Trans>
+ </span>
)}
</AlertDescription>
</div>
diff --git a/apps/remix/app/routes/_authenticated+/t.$teamUrl+/documents.folders._index.tsx b/apps/remix/app/routes/_authenticated+/t.$teamUrl+/documents.folders._index.tsx
index ca18849ce..6b5220d15 100644
--- a/apps/remix/app/routes/_authenticated+/t.$teamUrl+/documents.folders._index.tsx
+++ b/apps/remix/app/routes/_authenticated+/t.$teamUrl+/documents.folders._index.tsx
@@ -66,7 +66,9 @@ export default function DocumentsFoldersPage() {
onClick={() => navigateToFolder(null)}
>
<HomeIcon className="h-4 w-4" />
- <span>Home</span>
+ <span>
+ <Trans>Home</Trans>
+ </span>
</Button>
</div>
diff --git a/apps/remix/app/routes/_authenticated+/t.$teamUrl+/templates.folders._index.tsx b/apps/remix/app/routes/_authenticated+/t.$teamUrl+/templates.folders._index.tsx
index f23d18b42..e273753a5 100644
--- a/apps/remix/app/routes/_authenticated+/t.$teamUrl+/templates.folders._index.tsx
+++ b/apps/remix/app/routes/_authenticated+/t.$teamUrl+/templates.folders._index.tsx
@@ -66,7 +66,9 @@ export default function TemplatesFoldersPage() {
onClick={() => navigateToFolder(null)}
>
<HomeIcon className="h-4 w-4" />
- <span>Home</span>
+ <span>
+ <Trans>Home</Trans>
+ </span>
</Button>
</div>
diff --git a/apps/remix/app/routes/embed+/v1+/multisign+/_index.tsx b/apps/remix/app/routes/embed+/v1+/multisign+/_index.tsx
index be53d68ee..647eec63d 100644
--- a/apps/remix/app/routes/embed+/v1+/multisign+/_index.tsx
+++ b/apps/remix/app/routes/embed+/v1+/multisign+/_index.tsx
@@ -1,5 +1,6 @@
import { useEffect, useLayoutEffect, useState } from 'react';
+import { Trans } from '@lingui/react/macro';
import { SigningStatus } from '@prisma/client';
import { useRevalidator } from 'react-router';
@@ -283,7 +284,9 @@ export default function MultisignPage() {
{!hidePoweredBy && (
<div className="bg-primary text-primary-foreground fixed bottom-0 left-0 z-40 rounded-tr px-2 py-1 text-xs font-medium opacity-60 hover:opacity-100">
- <span>Powered by</span>
+ <span>
+ <Trans>Powered by</Trans>
+ </span>
<BrandingLogo className="ml-2 inline-block h-[14px]" />
</div>
)}
@@ -298,7 +301,9 @@ export default function MultisignPage() {
{!hidePoweredBy && (
<div className="bg-primary text-primary-foreground fixed bottom-0 left-0 z-40 rounded-tr px-2 py-1 text-xs font-medium opacity-60 hover:opacity-100">
- <span>Powered by</span>
+ <span>
+ <Trans>Powered by</Trans>
+ </span>
<BrandingLogo className="ml-2 inline-block h-[14px]" />
</div>
)}
diff --git a/packages/ui/components/document/envelope-recipient-field-tooltip.tsx b/packages/ui/components/document/envelope-recipient-field-tooltip.tsx
index 194c3c8f6..ec4266ba3 100644
--- a/packages/ui/components/document/envelope-recipient-field-tooltip.tsx
+++ b/packages/ui/components/document/envelope-recipient-field-tooltip.tsx
@@ -186,7 +186,9 @@ export function EnvelopeRecipientFieldTooltip({
)}
<p className="text-center font-semibold">
- <span>{t(FRIENDLY_FIELD_TYPE[field.type])} field</span>
+ <span>
+ <Trans>{t(FRIENDLY_FIELD_TYPE[field.type])} field</Trans>
+ </span>
</p>
<p className="text-muted-foreground mt-1 text-center text-xs">
diff --git a/packages/ui/primitives/document-flow/field-item.tsx b/packages/ui/primitives/document-flow/field-item.tsx
index 7d4b28111..0cb271ae9 100644
--- a/packages/ui/primitives/document-flow/field-item.tsx
+++ b/packages/ui/primitives/document-flow/field-item.tsx
@@ -2,6 +2,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { msg } from '@lingui/core/macro';
import { useLingui } from '@lingui/react';
+import { Trans } from '@lingui/react/macro';
import { FieldType } from '@prisma/client';
import { CopyPlus, Settings2, SquareStack, Trash } from 'lucide-react';
import { createPortal } from 'react-dom';
@@ -324,19 +325,31 @@ export const FieldItem = ({
<div className="absolute -top-20 left-1/2 z-50 -translate-x-1/2 rounded-md border border-border bg-background/95 px-2 py-1 shadow-sm backdrop-blur-sm">
<div className="flex flex-col gap-0.5 text-[9px]">
<span>
- <span className="text-muted-foreground">Pos X:&nbsp;</span>
+ <span className="text-muted-foreground">
+ <Trans>Pos X:</Trans>
+ </span>
+ &nbsp;
<span className="font-mono text-foreground">{field.pageX.toFixed(2)}</span>
</span>
<span>
- <span className="text-muted-foreground">Pos Y:&nbsp;</span>
+ <span className="text-muted-foreground">
+ <Trans>Pos Y:</Trans>
+ </span>
+ &nbsp;
<span className="font-mono text-foreground">{field.pageY.toFixed(2)}</span>
</span>
<span>
- <span className="text-muted-foreground">Width:&nbsp;</span>
+ <span className="text-muted-foreground">
+ <Trans>Width:</Trans>
+ </span>
+ &nbsp;
<span className="font-mono text-foreground">{field.pageWidth.toFixed(2)}</span>
</span>
<span>
- <span className="text-muted-foreground">Height:&nbsp;</span>
+ <span className="text-muted-foreground">
+ <Trans>Height:</Trans>
+ </span>
+ &nbsp;
<span className="font-mono text-foreground">{field.pageHeight.toFixed(2)}</span>
</span>
</div>