From 8328ae476440eb3d9bba23ee635e5e35ed770110 Mon Sep 17 00:00:00 2001 From: Claudio Fuentes Date: Fri, 21 Mar 2025 15:16:32 -0400 Subject: [PATCH 1/3] fix: update metadata titles for various pages and enhance localization - Updated page titles in the metadata for employee details, policy overview, policy editing, risk comments, risk registration, team members, and vendor overview to reflect new localization keys. - Added new localization keys for improved clarity and consistency across the application. --- .../[orgId]/people/[employeeId]/page.tsx | 2 +- .../policies/all/[policyId]/editor/page.tsx | 2 +- .../[orgId]/policies/all/[policyId]/page.tsx | 2 +- .../[orgId]/risk/[riskId]/comments/page.tsx | 2 +- .../[orgId]/risk/register/page.tsx | 2 +- .../[orgId]/settings/members/page.tsx | 2 +- .../[orgId]/vendors/[vendorId]/page.tsx | 4 ++-- apps/app/src/locales/core/common.ts | 1 + apps/app/src/locales/features/people.ts | 1 + apps/app/src/locales/features/risk.ts | 21 +++++++++++++++++++ apps/app/src/locales/features/tests.ts | 1 + apps/app/src/locales/features/vendors.ts | 1 + 12 files changed, 33 insertions(+), 8 deletions(-) diff --git a/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/people/[employeeId]/page.tsx b/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/people/[employeeId]/page.tsx index 283bc78a61..12054f453a 100644 --- a/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/people/[employeeId]/page.tsx +++ b/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/people/[employeeId]/page.tsx @@ -34,6 +34,6 @@ export async function generateMetadata({ const t = await getI18n(); return { - title: t("people.employee_details"), + title: t("people.details.title"), }; } diff --git a/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/policies/all/[policyId]/editor/page.tsx b/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/policies/all/[policyId]/editor/page.tsx index 22f82df83b..ede811316c 100644 --- a/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/policies/all/[policyId]/editor/page.tsx +++ b/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/policies/all/[policyId]/editor/page.tsx @@ -25,6 +25,6 @@ export async function generateMetadata({ const t = await getI18n(); return { - title: t("policies.policy_details"), + title: t("policies.dashboard.sub_pages.edit_policy"), }; } diff --git a/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/policies/all/[policyId]/page.tsx b/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/policies/all/[policyId]/page.tsx index 0f0b740df0..2bec9de335 100644 --- a/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/policies/all/[policyId]/page.tsx +++ b/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/policies/all/[policyId]/page.tsx @@ -40,7 +40,7 @@ export async function generateMetadata({ const t = await getI18n(); return { - title: t("policies.policy_details"), + title: t("policies.overview.title"), }; } diff --git a/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/risk/[riskId]/comments/page.tsx b/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/risk/[riskId]/comments/page.tsx index 844b73b236..3c2a124060 100644 --- a/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/risk/[riskId]/comments/page.tsx +++ b/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/risk/[riskId]/comments/page.tsx @@ -74,6 +74,6 @@ export async function generateMetadata({ const t = await getI18n(); return { - title: t("risk.risk_comments"), + title: t("risk.comments"), }; } diff --git a/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/risk/register/page.tsx b/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/risk/register/page.tsx index 56fee7d27f..5b814a65a7 100644 --- a/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/risk/register/page.tsx +++ b/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/risk/register/page.tsx @@ -17,6 +17,6 @@ export async function generateMetadata({ const t = await getI18n(); return { - title: t("risk.register"), + title: t("risk.register.title"), }; } diff --git a/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/settings/members/page.tsx b/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/settings/members/page.tsx index ce5cfe33b6..9da4cc0cd5 100644 --- a/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/settings/members/page.tsx +++ b/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/settings/members/page.tsx @@ -28,6 +28,6 @@ export async function generateMetadata({ const t = await getI18n(); return { - title: t("settings.members"), + title: t("settings.team.members.title"), }; } diff --git a/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/vendors/[vendorId]/page.tsx b/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/vendors/[vendorId]/page.tsx index 53da904752..896a10e3cb 100644 --- a/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/vendors/[vendorId]/page.tsx +++ b/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/vendors/[vendorId]/page.tsx @@ -143,7 +143,7 @@ export default async function VendorPage({ searchParams, params }: PageProps) {
- {t("vendor.tasks.title")} + {t("vendors.tasks.title")}
@@ -182,6 +182,6 @@ export async function generateMetadata({ const t = await getI18n(); return { - title: t("vendors.vendor_overview"), + title: t("vendors.title"), }; } diff --git a/apps/app/src/locales/core/common.ts b/apps/app/src/locales/core/common.ts index 2b651ad7d5..3de1863278 100644 --- a/apps/app/src/locales/core/common.ts +++ b/apps/app/src/locales/core/common.ts @@ -39,6 +39,7 @@ export const common = { needs_review: "Needs Review", draft: "Draft", not_assessed: "Not Assessed", + assessed: "Assessed", title: "Status", }, filters: { diff --git a/apps/app/src/locales/features/people.ts b/apps/app/src/locales/features/people.ts index 4c09a24fb2..bc2acb081e 100644 --- a/apps/app/src/locales/features/people.ts +++ b/apps/app/src/locales/features/people.ts @@ -1,6 +1,7 @@ export const people = { title: "People", details: { + title: "Employee Details", tasks: "Tasks", }, description: "Manage your team members and their roles.", diff --git a/apps/app/src/locales/features/risk.ts b/apps/app/src/locales/features/risk.ts index 92a43ff921..073b690809 100644 --- a/apps/app/src/locales/features/risk.ts +++ b/apps/app/src/locales/features/risk.ts @@ -2,6 +2,27 @@ export const risk = { risks: "risks", overview: "Overview", create: "Create New Risk", + comments: "Risk Comments", + risk_overview: "Risk Overview", + register: { + title: "Risk Register", + table: { + risk: "Risk" + } + }, + dashboard: { + by_department: "Risks by Department", + status: "Risks by Status", + risks_by_assignee: "Risks by Assignee" + }, + metrics: { + probability: "Probability", + impact: "Impact" + }, + tasks: { + title: "Tasks", + task_overview: "Task Overview" + }, vendor: { title: "Vendor Management", dashboard: { diff --git a/apps/app/src/locales/features/tests.ts b/apps/app/src/locales/features/tests.ts index 5a2e5ab54a..ea671ae51c 100644 --- a/apps/app/src/locales/features/tests.ts +++ b/apps/app/src/locales/features/tests.ts @@ -7,6 +7,7 @@ export const tests = { failed: "Failed", severity_distribution: "Test Severity Distribution", }, + test_details: "Test Details", severity: { info: "Info", low: "Low", diff --git a/apps/app/src/locales/features/vendors.ts b/apps/app/src/locales/features/vendors.ts index d1906583c4..59b371ebe8 100644 --- a/apps/app/src/locales/features/vendors.ts +++ b/apps/app/src/locales/features/vendors.ts @@ -10,6 +10,7 @@ export const vendors = { create_new: "Create Vendor", }, create: "Create Vendor", + vendor_comments: "Vendor Comments", form: { vendor_details: "Vendor Details", vendor_name: "Name", From e7b5665a0bbda0fbda4272922a3c5c2f3b27bddf Mon Sep 17 00:00:00 2001 From: Claudio Fuentes Date: Fri, 21 Mar 2025 15:22:09 -0400 Subject: [PATCH 2/3] fix: update localization keys for task and policy forms - Updated toast messages in the task overview form to reflect new localization keys for success and error notifications. - Changed form labels and placeholders in the policy overview and update policy forms to use updated localization keys for consistency. - Added new localization keys for task and policy descriptions, statuses, and placeholders to enhance clarity across the application. --- .../task/update-task-overview-form.tsx | 4 +-- .../forms/policies/policy-overview.tsx | 4 +-- .../forms/policies/update-policy-form.tsx | 2 +- apps/app/src/locales/core/common.ts | 2 +- apps/app/src/locales/features/policies.ts | 4 +++ apps/app/src/locales/features/risk.ts | 35 ++++++++++++++++++- apps/app/src/locales/settings/settings.ts | 5 +++ 7 files changed, 49 insertions(+), 7 deletions(-) diff --git a/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/vendors/components/task/update-task-overview-form.tsx b/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/vendors/components/task/update-task-overview-form.tsx index d0b01477a7..e4994d6820 100644 --- a/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/vendors/components/task/update-task-overview-form.tsx +++ b/apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/vendors/components/task/update-task-overview-form.tsx @@ -33,11 +33,11 @@ export function UpdateTaskOverviewForm({ const updateTask = useAction(updateTaskAction, { onSuccess: () => { - toast.success(t("risk.form.update_risk_success")); + toast.success(t("risk.tasks.form.update_success")); setOpen(null); }, onError: () => { - toast.error(t("risk.form.update_risk_error")); + toast.error(t("risk.tasks.form.update_error")); }, }); diff --git a/apps/app/src/components/forms/policies/policy-overview.tsx b/apps/app/src/components/forms/policies/policy-overview.tsx index 3dbf9207a6..31f9dd2f0f 100644 --- a/apps/app/src/components/forms/policies/policy-overview.tsx +++ b/apps/app/src/components/forms/policies/policy-overview.tsx @@ -144,12 +144,12 @@ export function UpdatePolicyOverview({ name="status" render={({ field }) => ( - {t("risk.form.risk_status")} + {t("policies.overview.form.status")}