- You have reached your document limit.
+ {t('you-have-reached-your-document-limit')}
- You can upload up to {quota.documents} documents per month on your current plan.
+ {t('you-can-upload-up-to', { count: quota.documents })}
- Upgrade your account to upload more documents.
+ {t('upgrade-your-account-to-upload-more-documents')}
diff --git a/packages/lib/i18n/locales/en/web.json b/packages/lib/i18n/locales/en/web.json
index ee45a470b6..e537c95499 100644
--- a/packages/lib/i18n/locales/en/web.json
+++ b/packages/lib/i18n/locales/en/web.json
@@ -4,6 +4,7 @@
"actions": "Actions",
"all": "All",
"an-error-occurred-while-downloading-your-document": "An error occurred while downloading your document.",
+ "an-error-occurred-while-uploading-your-document": "An error occurred while uploading your document.",
"approve": "Approve",
"are-you-sure-you-want-to-delete": "Are you sure you want to delete {{documentTitle}}? ",
"cancel": "Cancel",
@@ -11,11 +12,16 @@
"delete": "Delete",
"document-deleted": "Document deleted",
"document-duplicated": "Document Duplicated",
+ "document-upload-disabled-due-to-unpaid-invoices": "Document upload disabled due to unpaid invoices",
+ "document-uploaded": "Document uploaded",
"documents": "Documents",
+ "documents-remaining-this-month": "{{remaining}} of {{total}} documents remaining this month.",
"documenttitle-has-been-successfully-deleted": "\"{{documentTitle}}\" has been successfully deleted",
"download": "Download",
"duplicate": "Duplicate",
"edit": "Edit",
+ "error": "Error",
+ "file-cannot-be-larger-than_upload_size_limit-mb": "File cannot be larger than {{size}}MB",
"go-back": "Go Back",
"last-updated": "Last updated",
"loading-document": "Loading Document...",
@@ -40,8 +46,14 @@
"this-document-could-not-be-duplicated": "This document could not be duplicated at this time. Please try again.",
"title": "Title",
"type-delete-to-confirm": "Type 'delete' to confirm",
+ "upgrade-your-account-to-upload-more-documents": "Upgrade your account to upload more documents.",
"users": "Users",
+ "verify-your-email-to-upload-documents": "Verify your email to upload documents.",
"view": "View",
"void": "Void",
- "your-document-has-been-successfully-duplicated": "Your document has been successfully duplicated."
+ "you-can-upload-up-to": "You can upload up to {{count}} documents per month on your current plan.",
+ "you-have-reached-your-document-limit": "You have reached your document limit.",
+ "your-document-failed-to-upload": "Your document failed to upload.",
+ "your-document-has-been-successfully-duplicated": "Your document has been successfully duplicated.",
+ "your-document-has-been-uploaded-successfully": "Your document has been uploaded successfully."
}
diff --git a/packages/lib/i18n/locales/fr/web.json b/packages/lib/i18n/locales/fr/web.json
index 3f6fb4d897..ca0a1793b7 100644
--- a/packages/lib/i18n/locales/fr/web.json
+++ b/packages/lib/i18n/locales/fr/web.json
@@ -4,6 +4,7 @@
"actions": "",
"all": "",
"an-error-occurred-while-downloading-your-document": "",
+ "an-error-occurred-while-uploading-your-document": "",
"approve": "",
"are-you-sure-you-want-to-delete": "",
"cancel": "",
@@ -11,11 +12,16 @@
"delete": "",
"document-deleted": "",
"document-duplicated": "",
+ "document-upload-disabled-due-to-unpaid-invoices": "",
+ "document-uploaded": "",
"documents": "",
+ "documents-remaining-this-month": "",
"documenttitle-has-been-successfully-deleted": "",
"download": "",
"duplicate": "",
"edit": "",
+ "error": "",
+ "file-cannot-be-larger-than_upload_size_limit-mb": "",
"go-back": "",
"last-updated": "",
"loading-document": "",
@@ -40,8 +46,14 @@
"this-document-could-not-be-duplicated": "",
"title": "",
"type-delete-to-confirm": "",
+ "upgrade-your-account-to-upload-more-documents": "",
"users": "",
+ "verify-your-email-to-upload-documents": "",
"view": "",
"void": "",
- "your-document-has-been-successfully-duplicated": ""
+ "you-can-upload-up-to": "",
+ "you-have-reached-your-document-limit": "",
+ "your-document-failed-to-upload": "",
+ "your-document-has-been-successfully-duplicated": "",
+ "your-document-has-been-uploaded-successfully": ""
}
From 9330c463852d60517aefd377709110fb44d40405 Mon Sep 17 00:00:00 2001
From: serge
Date: Thu, 22 Feb 2024 14:24:20 +0000
Subject: [PATCH 05/11] refactor(empty-state.tsx): update text content in
EmptyDocumentState component to use translated strings for better
internationalization feat(i18n): add English translations for new strings
related to empty document states and drafts in web app feat(i18n): add French
translations for new strings related to empty document states and drafts in
web app
---
.../app/(dashboard)/documents/empty-state.tsx | 20 ++++++++-----------
packages/lib/i18n/locales/en/web.json | 7 +++++++
packages/lib/i18n/locales/fr/web.json | 7 +++++++
3 files changed, 22 insertions(+), 12 deletions(-)
diff --git a/apps/web/src/app/(dashboard)/documents/empty-state.tsx b/apps/web/src/app/(dashboard)/documents/empty-state.tsx
index b6d2f74e2c..638acddbdb 100644
--- a/apps/web/src/app/(dashboard)/documents/empty-state.tsx
+++ b/apps/web/src/app/(dashboard)/documents/empty-state.tsx
@@ -12,27 +12,23 @@ export const EmptyDocumentState = ({ status }: EmptyDocumentProps) => {
icon: Icon,
} = match(status)
.with(ExtendedDocumentStatus.COMPLETED, () => ({
- title: 'Nothing to do',
- message:
- 'There are no completed documents yet. Documents that you have created or received will appear here once completed.',
+ title: t('nothing-to-do'),
+ message: t('there-are-no-completed-documents'),
icon: CheckCircle2,
}))
.with(ExtendedDocumentStatus.DRAFT, () => ({
- title: 'No active drafts',
- message:
- 'There are no active drafts at the current moment. You can upload a document to start drafting.',
+ title: t('no-active-drafts'),
+ message: t('there-are-no-active-drafts'),
icon: CheckCircle2,
}))
.with(ExtendedDocumentStatus.ALL, () => ({
- title: "We're all empty",
- message:
- 'You have not yet created or received any documents. To create a document please upload one.',
+ title: t('were-all-empty'),
+ message: t('you-have-not-yet-created-or-received'),
icon: Bird,
}))
.otherwise(() => ({
- title: 'Nothing to do',
- message:
- 'All documents have been processed. Any new documents that are sent or received will show here.',
+ title: t('nothing-to-do'),
+ message: t('all-documents-have-been-processed'),
icon: CheckCircle2,
}));
diff --git a/packages/lib/i18n/locales/en/web.json b/packages/lib/i18n/locales/en/web.json
index e537c95499..f6ee574c11 100644
--- a/packages/lib/i18n/locales/en/web.json
+++ b/packages/lib/i18n/locales/en/web.json
@@ -3,6 +3,7 @@
"action": "Action",
"actions": "Actions",
"all": "All",
+ "all-documents-have-been-processed": "All documents have been processed. Any new documents that are sent or received will show here.",
"an-error-occurred-while-downloading-your-document": "An error occurred while downloading your document.",
"an-error-occurred-while-uploading-your-document": "An error occurred while uploading your document.",
"approve": "Approve",
@@ -26,7 +27,9 @@
"last-updated": "Last updated",
"loading-document": "Loading Document...",
"manage-documents": "Manage documents",
+ "no-active-drafts": "No active drafts",
"no-document-available": "No document available",
+ "nothing-to-do": "Nothing to do",
"oops-something-went-wrong": "Oops! Something went wrong.",
"owner": "Owner",
"please-note-that-this-action": "Please note that this action is irreversible. Once confirmed, your document will be permanently deleted.",
@@ -42,6 +45,8 @@
"status": "Status",
"subscriptions": "Subscriptions",
"the-page-you-are-looking": "The page you are looking for was moved, removed, renamed or might never have existed.",
+ "there-are-no-active-drafts": "There are no active drafts at the current moment. You can upload a document to start drafting.",
+ "there-are-no-completed-documents": "There are no completed documents yet. Documents that you have created or received will appear here once completed.",
"this-document-could-not-be-deleted-at-this-time-please-try-again": "This document could not be deleted at this time. Please try again.",
"this-document-could-not-be-duplicated": "This document could not be duplicated at this time. Please try again.",
"title": "Title",
@@ -51,7 +56,9 @@
"verify-your-email-to-upload-documents": "Verify your email to upload documents.",
"view": "View",
"void": "Void",
+ "were-all-empty": "We're all empty",
"you-can-upload-up-to": "You can upload up to {{count}} documents per month on your current plan.",
+ "you-have-not-yet-created-or-received": "You have not yet created or received any documents. To create a document please upload one.",
"you-have-reached-your-document-limit": "You have reached your document limit.",
"your-document-failed-to-upload": "Your document failed to upload.",
"your-document-has-been-successfully-duplicated": "Your document has been successfully duplicated.",
diff --git a/packages/lib/i18n/locales/fr/web.json b/packages/lib/i18n/locales/fr/web.json
index ca0a1793b7..8b281bc58d 100644
--- a/packages/lib/i18n/locales/fr/web.json
+++ b/packages/lib/i18n/locales/fr/web.json
@@ -3,6 +3,7 @@
"action": "",
"actions": "",
"all": "",
+ "all-documents-have-been-processed": "",
"an-error-occurred-while-downloading-your-document": "",
"an-error-occurred-while-uploading-your-document": "",
"approve": "",
@@ -26,7 +27,9 @@
"last-updated": "",
"loading-document": "",
"manage-documents": "",
+ "no-active-drafts": "",
"no-document-available": "",
+ "nothing-to-do": "",
"oops-something-went-wrong": "",
"owner": "",
"please-note-that-this-action": "",
@@ -42,6 +45,8 @@
"status": "",
"subscriptions": "",
"the-page-you-are-looking": "",
+ "there-are-no-active-drafts": "",
+ "there-are-no-completed-documents": "",
"this-document-could-not-be-deleted-at-this-time-please-try-again": "",
"this-document-could-not-be-duplicated": "",
"title": "",
@@ -51,7 +56,9 @@
"verify-your-email-to-upload-documents": "",
"view": "",
"void": "",
+ "were-all-empty": "",
"you-can-upload-up-to": "",
+ "you-have-not-yet-created-or-received": "",
"you-have-reached-your-document-limit": "",
"your-document-failed-to-upload": "",
"your-document-has-been-successfully-duplicated": "",
From 5c39245f7385367dda71290335c7573aaa53563f Mon Sep 17 00:00:00 2001
From: serge
Date: Thu, 22 Feb 2024 14:26:56 +0000
Subject: [PATCH 06/11] fix(web): update text in DashboardSettingsLayout to use
translation key for 'settings' fix(web): update text in ProfileSettingsPage
to use translation keys for 'profile' and
'here-you-can-edit-your-personal-details' feat(i18n): add translation keys
for 'profile' and 'settings' in English and French locales
---
apps/web/src/app/(dashboard)/settings/layout.tsx | 2 +-
apps/web/src/app/(dashboard)/settings/profile/page.tsx | 5 ++++-
packages/lib/i18n/locales/en/web.json | 3 +++
packages/lib/i18n/locales/fr/web.json | 3 +++
4 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/apps/web/src/app/(dashboard)/settings/layout.tsx b/apps/web/src/app/(dashboard)/settings/layout.tsx
index f682de2423..dfd82b9d77 100644
--- a/apps/web/src/app/(dashboard)/settings/layout.tsx
+++ b/apps/web/src/app/(dashboard)/settings/layout.tsx
@@ -10,7 +10,7 @@ export type DashboardSettingsLayoutProps = {
export default function DashboardSettingsLayout({ children }: DashboardSettingsLayoutProps) {
return (
- Two factor authentication
+ {t('two-factor-authentication')}
-
- Create one-time passwords that serve as a secondary authentication method for
- confirming your identity when requested during the sign-in process.
-
+ {t('create-one-time-passwords')}
- Recovery codes
+ {t('recovery-codes')}
- Two factor authentication recovery codes are used to access your account in the
- event that you lose access to your authenticator app.
+ {t('two-factor-authentication-recovery')}
@@ -68,13 +64,14 @@ export default async function SecuritySettingsPage() {
) : (
- Your account is managed by {IDENTITY_PROVIDER_NAME[user.identityProvider]}
+ {t('your-account-is-managed-by')} {IDENTITY_PROVIDER_NAME[user.identityProvider]}
- To update your password, enable two-factor authentication, and manage other security
- settings, please go to your {IDENTITY_PROVIDER_NAME[user.identityProvider]} account
- settings.
+ {
+ (t('to-update-your-password'),
+ { provider: IDENTITY_PROVIDER_NAME[user.identityProvider] })
+ }
)}
@@ -84,15 +81,15 @@ export default async function SecuritySettingsPage() {
variant="neutral"
>
- Recent activity
+ {t('recent-activity')}
- View all recent security activity related to your account.
+ {t('view-all-recent-security-activity-related-to-your-account')}
diff --git a/packages/lib/i18n/locales/en/web.json b/packages/lib/i18n/locales/en/web.json
index 64d9801faa..80e9d03192 100644
--- a/packages/lib/i18n/locales/en/web.json
+++ b/packages/lib/i18n/locales/en/web.json
@@ -9,6 +9,7 @@
"approve": "Approve",
"are-you-sure-you-want-to-delete": "Are you sure you want to delete {{documentTitle}}? ",
"cancel": "Cancel",
+ "create-one-time-passwords": "Create one-time passwords that serve as a secondary authentication method for confirming your identity when requested during the sign-in process.",
"created": "Created",
"delete": "Delete",
"document-deleted": "Document deleted",
@@ -25,6 +26,7 @@
"file-cannot-be-larger-than_upload_size_limit-mb": "File cannot be larger than {{size}}MB",
"go-back": "Go Back",
"here-you-can-edit-your-personal-details": "Here you can edit your personal details.",
+ "here-you-can-manage-your-password-and-security-settings": "Here you can manage your password and security settings.",
"last-updated": "Last updated",
"loading-document": "Loading Document...",
"manage-documents": "Manage documents",
@@ -35,8 +37,11 @@
"owner": "Owner",
"please-note-that-this-action": "Please note that this action is irreversible. Once confirmed, your document will be permanently deleted.",
"profile": "Profile",
+ "recent-activity": "Recent activity",
"recipient": "Recipient",
+ "recovery-codes": "Recovery codes",
"search": "Search",
+ "security": "Security",
"sender": "Sender",
"senderlabel": "Sender:",
"settings": "Settings",
@@ -53,16 +58,22 @@
"this-document-could-not-be-deleted-at-this-time-please-try-again": "This document could not be deleted at this time. Please try again.",
"this-document-could-not-be-duplicated": "This document could not be duplicated at this time. Please try again.",
"title": "Title",
+ "to-update-your-password": "To update your password, enable two-factor authentication, and manage other security settings, please go to your {{provider}} account settings.",
+ "two-factor-authentication": "Two factor authentication",
+ "two-factor-authentication-recovery": "Two factor authentication recovery codes are used to access your account in the event that you lose access to your authenticator app.",
"type-delete-to-confirm": "Type 'delete' to confirm",
"upgrade-your-account-to-upload-more-documents": "Upgrade your account to upload more documents.",
"users": "Users",
"verify-your-email-to-upload-documents": "Verify your email to upload documents.",
"view": "View",
+ "view-activity": "View activity",
+ "view-all-recent-security-activity-related-to-your-account": "View all recent security activity related to your account.",
"void": "Void",
"were-all-empty": "We're all empty",
"you-can-upload-up-to": "You can upload up to {{count}} documents per month on your current plan.",
"you-have-not-yet-created-or-received": "You have not yet created or received any documents. To create a document please upload one.",
"you-have-reached-your-document-limit": "You have reached your document limit.",
+ "your-account-is-managed-by": "Your account is managed by",
"your-document-failed-to-upload": "Your document failed to upload.",
"your-document-has-been-successfully-duplicated": "Your document has been successfully duplicated.",
"your-document-has-been-uploaded-successfully": "Your document has been uploaded successfully."
diff --git a/packages/lib/i18n/locales/fr/web.json b/packages/lib/i18n/locales/fr/web.json
index 844c3b1551..1e04717dc3 100644
--- a/packages/lib/i18n/locales/fr/web.json
+++ b/packages/lib/i18n/locales/fr/web.json
@@ -9,6 +9,7 @@
"approve": "",
"are-you-sure-you-want-to-delete": "",
"cancel": "",
+ "create-one-time-passwords": "",
"created": "",
"delete": "",
"document-deleted": "",
@@ -25,6 +26,7 @@
"file-cannot-be-larger-than_upload_size_limit-mb": "",
"go-back": "",
"here-you-can-edit-your-personal-details": "",
+ "here-you-can-manage-your-password-and-security-settings": "",
"last-updated": "",
"loading-document": "",
"manage-documents": "",
@@ -35,8 +37,11 @@
"owner": "",
"please-note-that-this-action": "",
"profile": "",
+ "recent-activity": "",
"recipient": "",
+ "recovery-codes": "",
"search": "",
+ "security": "",
"sender": "",
"senderlabel": "",
"settings": "",
@@ -53,16 +58,22 @@
"this-document-could-not-be-deleted-at-this-time-please-try-again": "",
"this-document-could-not-be-duplicated": "",
"title": "",
+ "to-update-your-password": "",
+ "two-factor-authentication": "",
+ "two-factor-authentication-recovery": "",
"type-delete-to-confirm": "",
"upgrade-your-account-to-upload-more-documents": "",
"users": "",
"verify-your-email-to-upload-documents": "",
"view": "",
+ "view-activity": "",
+ "view-all-recent-security-activity-related-to-your-account": "",
"void": "",
"were-all-empty": "",
"you-can-upload-up-to": "",
"you-have-not-yet-created-or-received": "",
"you-have-reached-your-document-limit": "",
+ "your-account-is-managed-by": "",
"your-document-failed-to-upload": "",
"your-document-has-been-successfully-duplicated": "",
"your-document-has-been-uploaded-successfully": ""
From d8c53413b12705a52438cd3eb5bed12ba4e400be Mon Sep 17 00:00:00 2001
From: serge
Date: Thu, 22 Feb 2024 14:51:59 +0000
Subject: [PATCH 08/11] refactor(security): update text in security activity
page and data table to use i18n keys for better localization support
feat(i18n): add translations for 'date', 'device', 'browser', 'ip-address',
and 'action' in English and French feat(security): introduce i18n key
'security-activity' for the security activity title in English and French
---
.../(dashboard)/settings/security/activity/page.tsx | 4 ++--
.../activity/user-security-activity-data-table.tsx | 10 +++++-----
packages/lib/i18n/locales/en/web.json | 5 +++++
packages/lib/i18n/locales/fr/web.json | 5 +++++
4 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/apps/web/src/app/(dashboard)/settings/security/activity/page.tsx b/apps/web/src/app/(dashboard)/settings/security/activity/page.tsx
index 6e183b0c72..415145eb88 100644
--- a/apps/web/src/app/(dashboard)/settings/security/activity/page.tsx
+++ b/apps/web/src/app/(dashboard)/settings/security/activity/page.tsx
@@ -9,10 +9,10 @@ export const metadata: Metadata = {
export default function SettingsSecurityActivityPage() {
return (
-
Security activity
+
{t('security-activity')}
- View all recent security activity related to your account.
+ {t('view-all-recent-security-activity-related-to-your-account')}
- Your email is currently being used by team{' '}
+ {t('your-email-is-currently-being-used-by-team')}{' '}
{teamEmail.team.name} ({teamEmail.team.url}
).