Skip to content

Commit b8f4faf

Browse files
authored
Merge pull request #796 from trycompai/claudio/comp-181-deprecate-localization
[dev] [claudfuen] claudio/comp-181-deprecate-localization
2 parents 5fbea15 + 61d0e79 commit b8f4faf

File tree

396 files changed

+1016
-6503
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

396 files changed

+1016
-6503
lines changed

apps/app/languine.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

apps/app/languine.lock

Lines changed: 0 additions & 770 deletions
This file was deleted.

apps/app/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"apply-migrations": "cd ../../packages/db && bunx prisma migrate dev && cd ../../apps/app",
1212
"clean-react": "rm -rf node_modules/react; rm -rf node_modules/react-dom",
1313
"deploy:trigger-prod": "npx trigger.dev@latest deploy",
14-
"analyze-locale-usage": "bunx tsx src/locales/analyze-locale-usage.ts",
1514
"typecheck": "tsc --noEmit"
1615
},
1716
"dependencies": {
@@ -69,12 +68,9 @@
6968
"geist": "^1.3.1",
7069
"highlight.js": "^11.11.1",
7170
"immer": "^10.1.1",
72-
"languine": "^3.1.4",
7371
"marked": "^15.0.11",
7472
"motion": "^12.9.2",
7573
"next": "^15.4.0-canary.62",
76-
"next-international": "^1.3.1",
77-
"next-intl": "^3.26.5",
7874
"next-safe-action": "^7.10.6",
7975
"next-themes": "^0.4.6",
8076
"novel": "^1.0.2",

apps/app/src/actions/organization/add-frameworks-to-organization-action.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
"use server";
22

3+
import { addFrameworksSchema } from "@/actions/schema";
34
import { db } from "@comp/db";
45
import { Prisma } from "@comp/db/types";
56
import { revalidatePath } from "next/cache";
67
import { z } from "zod";
7-
import { addFrameworksSchema } from "@/actions/schema";
8-
import { _upsertOrgFrameworkStructureCore, UpsertOrgFrameworkStructureCoreInput } from "./lib/initialize-organization";
8+
import { _upsertOrgFrameworkStructureCore } from "./lib/initialize-organization";
99

1010
// Duplicating the InitializeOrganizationInput type for clarity, can be shared if preferred
1111
export type AddFrameworksInput = z.infer<typeof addFrameworksSchema>;
@@ -27,7 +27,7 @@ export const addFrameworksToOrganizationAction = async (
2727
const frameworksAndRequirements = await tx.frameworkEditorFramework.findMany({
2828
where: {
2929
id: { in: frameworkIds },
30-
visible: true,
30+
visible: true,
3131
},
3232
include: {
3333
requirements: true,
@@ -63,4 +63,4 @@ export const addFrameworksToOrganizationAction = async (
6363
}
6464
return { success: false, error: "An unexpected error occurred." };
6565
}
66-
};
66+
};

apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/components/OnboardingTracker.tsx renamed to apps/app/src/app/(app)/(dashboard)/[orgId]/components/OnboardingTracker.tsx

File renamed without changes.

apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/controls/[controlId]/actions/delete-control.ts renamed to apps/app/src/app/(app)/(dashboard)/[orgId]/controls/[controlId]/actions/delete-control.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { db } from "@comp/db";
44
import { revalidatePath, revalidateTag } from "next/cache";
55
import { z } from "zod";
6-
import { authActionClient } from "../../../../../../../../actions/safe-action";
6+
import { authActionClient } from "../../../../../../../actions/safe-action";
77

88
const deleteControlSchema = z.object({
99
id: z.string(),

apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/controls/[controlId]/components/ControlDeleteDialog.tsx renamed to apps/app/src/app/(app)/(dashboard)/[orgId]/controls/[controlId]/components/ControlDeleteDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client";
22

3-
import { deleteControlAction } from "@/app/[locale]/(app)/(dashboard)/[orgId]/controls/[controlId]/actions/delete-control";
3+
import { deleteControlAction } from "@/app/(app)/(dashboard)/[orgId]/controls/[controlId]/actions/delete-control";
44
import { Control } from "@comp/db/types";
55
import { Button } from "@comp/ui/button";
66
import {

apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/controls/[controlId]/components/PoliciesTable.tsx renamed to apps/app/src/app/(app)/(dashboard)/[orgId]/controls/[controlId]/components/PoliciesTable.tsx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { DataTableColumnHeader } from "@/components/data-table/data-table-column
55
import { DataTableSortList } from "@/components/data-table/data-table-sort-list";
66
import { StatusIndicator } from "@/components/status-indicator";
77
import { useDataTable } from "@/hooks/use-data-table";
8-
import { useI18n } from "@/locales/client";
98
import { Policy } from "@comp/db/types";
109
import { Card, CardContent, CardHeader, CardTitle } from "@comp/ui/card";
1110
import { Input } from "@comp/ui/input";
@@ -23,7 +22,6 @@ export function PoliciesTable({
2322
orgId,
2423
controlId,
2524
}: PoliciesTableProps) {
26-
const t = useI18n();
2725
const [searchTerm, setSearchTerm] = useState("");
2826

2927
const columns = useMemo<ColumnDef<Policy>[]>(
@@ -33,7 +31,7 @@ export function PoliciesTable({
3331
header: ({ column }) => (
3432
<DataTableColumnHeader
3533
column={column}
36-
title={t("frameworks.artifacts.table.name")}
34+
title={"Name"}
3735
/>
3836
),
3937
cell: ({ row }) => {
@@ -52,7 +50,7 @@ export function PoliciesTable({
5250
header: ({ column }) => (
5351
<DataTableColumnHeader
5452
column={column}
55-
title={t("frameworks.artifacts.table.created_at")}
53+
title={"Created At"}
5654
/>
5755
),
5856
cell: ({ row }) => (
@@ -72,7 +70,7 @@ export function PoliciesTable({
7270
header: ({ column }) => (
7371
<DataTableColumnHeader
7472
column={column}
75-
title={t("frameworks.artifacts.table.status")}
73+
title={"Status"}
7674
/>
7775
),
7876
cell: ({ row }) => {
@@ -81,7 +79,7 @@ export function PoliciesTable({
8179
},
8280
},
8381
],
84-
[t],
82+
[],
8583
);
8684

8785
const filteredPolicies = useMemo(() => {
@@ -111,15 +109,13 @@ export function PoliciesTable({
111109
<Card>
112110
<CardHeader>
113111
<CardTitle>
114-
{t("frameworks.artifacts.title")} ({filteredPolicies.length})
112+
{"Linked Policies"} ({filteredPolicies.length})
115113
</CardTitle>
116114
</CardHeader>
117115
<CardContent>
118116
<div className="flex items-center mb-4">
119117
<Input
120-
placeholder={t(
121-
"frameworks.artifacts.search.universal_placeholder",
122-
)}
118+
placeholder={"Search..."}
123119
value={searchTerm}
124120
onChange={(e) => setSearchTerm(e.target.value)}
125121
className="max-w-sm"

apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/controls/[controlId]/components/RequirementsTable.tsx renamed to apps/app/src/app/(app)/(dashboard)/[orgId]/controls/[controlId]/components/RequirementsTable.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { DataTable } from "@/components/data-table/data-table";
44
import { DataTableColumnHeader } from "@/components/data-table/data-table-column-header";
55
import { DataTableSortList } from "@/components/data-table/data-table-sort-list";
66
import { useDataTable } from "@/hooks/use-data-table";
7-
import { useI18n } from "@/locales/client";
87
import type {
98
FrameworkEditorFramework,
109
FrameworkEditorRequirement,
@@ -26,7 +25,6 @@ interface RequirementsTableProps {
2625
requirements,
2726
orgId,
2827
}: RequirementsTableProps) {
29-
const t = useI18n();
3028
const [searchTerm, setSearchTerm] = useState("");
3129

3230
// Define columns for requirements table
@@ -40,7 +38,7 @@ interface RequirementsTableProps {
4038
header: ({ column }) => (
4139
<DataTableColumnHeader
4240
column={column}
43-
title={t("frameworks.requirements.table.name")}
41+
title={"Name"}
4442
/>
4543
),
4644
cell: ({ row }) => {
@@ -64,7 +62,7 @@ interface RequirementsTableProps {
6462
header: ({ column }) => (
6563
<DataTableColumnHeader
6664
column={column}
67-
title={t("frameworks.requirements.table.description")}
65+
title={"Description"}
6866
/>
6967
),
7068
cell: ({ row }) => {
@@ -83,7 +81,7 @@ interface RequirementsTableProps {
8381
},
8482
},
8583
],
86-
[t],
84+
[],
8785
);
8886

8987
// Filter requirements data based on search term
@@ -120,16 +118,14 @@ interface RequirementsTableProps {
120118
<Card>
121119
<CardHeader>
122120
<CardTitle>
123-
{t("frameworks.requirements.title")} (
121+
{"Linked Requirements"} (
124122
{filteredRequirements.length})
125123
</CardTitle>
126124
</CardHeader>
127125
<CardContent>
128126
<div className="flex items-center mb-4">
129127
<Input
130-
placeholder={t(
131-
"frameworks.requirements.search.universal_placeholder",
132-
)}
128+
placeholder={"Search..."}
133129
value={searchTerm}
134130
onChange={(e) => setSearchTerm(e.target.value)}
135131
className="max-w-sm"

apps/app/src/app/[locale]/(app)/(dashboard)/[orgId]/controls/[controlId]/components/SingleControl.tsx renamed to apps/app/src/app/(app)/(dashboard)/[orgId]/controls/[controlId]/components/SingleControl.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"use client";
22

33
import { StatusIndicator } from "@/components/status-indicator";
4-
import { useI18n } from "@/locales/client";
54
import type {
65
Control,
76
FrameworkEditorFramework,
@@ -50,7 +49,6 @@ export function SingleControl({
5049
relatedPolicies,
5150
relatedTasks,
5251
}: SingleControlProps) {
53-
const t = useI18n();
5452
const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);
5553
const [dropdownOpen, setDropdownOpen] = useState(false);
5654
const params = useParams<{ orgId: string; controlId: string }>();

0 commit comments

Comments
 (0)