Skip to content

Commit fa3aa76

Browse files
committed
Merge branch 'feat-language-support' of https://github.com/makeplane/plane into feat-intake-ln
2 parents a3ebdf0 + 586bd64 commit fa3aa76

File tree

33 files changed

+445
-271
lines changed

33 files changed

+445
-271
lines changed

packages/constants/src/analytics.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
import { TXAxisValues, TYAxisValues } from "@plane/types";
33

44
export const ANALYTICS_TABS = [
5-
{ key: "scope_and_demand", title: "Scope and Demand" },
6-
{ key: "custom", title: "Custom Analytics" },
5+
{
6+
key: "scope_and_demand",
7+
i18n_title: "workspace_analytics.tabs.scope_and_demand",
8+
},
9+
{ key: "custom", i18n_title: "workspace_analytics.tabs.custom" },
710
];
811

912
export const ANALYTICS_X_AXIS_VALUES: { value: TXAxisValues; label: string }[] =

packages/constants/src/error.ts

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

packages/i18n/src/locales/en/translations.json

Lines changed: 83 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@
199199
"project_id_is_required": "Project ID is required",
200200
"select_network": "Select network",
201201
"lead": "Lead",
202+
"date_range": "Date range",
202203
"private": "Private",
203204
"public": "Public",
204205
"accessible_only_by_invite": "Accessible only by invite",
@@ -307,6 +308,8 @@
307308
"create_new_label": "Create new label",
308309
"start_date": "Start date",
309310
"due_date": "Due date",
311+
"end_date": "End date",
312+
"target_date": "Target date",
310313
"cycle": "Cycle",
311314
"estimate": "Estimate",
312315
"change_parent_issue": "Change parent issue",
@@ -318,14 +321,13 @@
318321
"optional": "Optional",
319322
"Cancel": "Cancel",
320323
"edit": "Edit",
324+
"archive": "Archive",
325+
"restor": "Restore",
321326
"open_in_new_tab": "Open in new tab",
322327
"delete": "Delete",
323328
"deleting": "Deleting",
324329
"make_a_copy": "Make a copy",
325330
"move_to_project": "Move to project",
326-
"deleting": "Deleting",
327-
"make_a_copy": "Make a copy",
328-
"move_to_project": "Move to project",
329331
"good": "Good",
330332
"morning": "morning",
331333
"afternoon": "afternoon",
@@ -341,6 +343,15 @@
341343
"declining": "Declining",
342344
"declined": "Declined",
343345
"decline": "Decline",
346+
"unassigned": "Unassigned",
347+
"work_items": "Work items",
348+
"add_link": "Add link",
349+
"points": "Points",
350+
"no_assignee": "No assignee",
351+
"no_assignees_yet": "No assignees yet",
352+
"no_labels_yet": "No labels yet",
353+
"ideal": "Ideal",
354+
"current": "Current",
344355

345356
"project_view": {
346357
"sort_by": {
@@ -527,7 +538,11 @@
527538
"clear_all": "Clear all",
528539
"link_copied": "Link copied",
529540
"copied_to_clipboard": "Work item link copied to clipboard",
530-
"is_copied_to_clipboard": "Work item is copied to clipboard"
541+
"is_copied_to_clipboard": "Work item is copied to clipboard",
542+
"no_links_added_yet": "No links added yet",
543+
"add_link": "Add link",
544+
"links": "Links",
545+
"progress": "Progress"
531546
},
532547

533548
"form": {
@@ -612,10 +627,6 @@
612627
}
613628
},
614629

615-
"project": {
616-
"label": "{count, plural, one {Project} other {Projects}}"
617-
},
618-
619630
"view": {
620631
"label": "{count, plural, one {View} other {Views}}",
621632
"create": {
@@ -729,6 +740,35 @@
729740
},
730741

731742
"workspace_analytics": {
743+
"label": "Analytics",
744+
"page_label": "{workspace} - Analytics",
745+
"open_tasks": "Total open tasks",
746+
"error": "There was some error in fetching the data.",
747+
"work_items_closed_in": "Work items closed in",
748+
"selected_projects": "Selected projects",
749+
"total_members": "Total members",
750+
"total_cycles": "Total cycles",
751+
"total_modules": "Total modules",
752+
"pending_work_items":{
753+
"title": "Pending work items",
754+
"empty_state": "Analysis of pending work items by co-workers appears here."
755+
},
756+
"work_items_closed_in_a_year": {
757+
"title": "Work items closed in a year",
758+
"empty_state": "Close work items to view analysis of the same in the form of a graph."
759+
},
760+
"most_work_items_created":{
761+
"title": "Most work items created",
762+
"empty_state": "Co-workers and the number of work items created by them appears here."
763+
},
764+
"most_work_items_closed":{
765+
"title": "Most work items closed",
766+
"empty_state": "Co-workers and the number of work items closed by them appears here."
767+
},
768+
"tabs": {
769+
"scope_and_demand": "Scope and Demand",
770+
"custom": "Custom Analytics"
771+
},
732772
"empty_state": {
733773
"general": {
734774
"title": "Track progress, workloads, and allocations. Spot trends, remove blockers, and move work faster",
@@ -745,6 +785,10 @@
745785
},
746786

747787
"workspace_projects": {
788+
"label": "{count, plural, one {Project} other {Projects}}",
789+
"create": {
790+
"label": "Add Project"
791+
},
748792
"network": {
749793
"private": {
750794
"title": "Private",
@@ -807,11 +851,15 @@
807851
"filter": {
808852
"title": "No matching projects",
809853
"description": "No projects detected with the matching criteria. \n Create a new project instead."
854+
},
855+
"search": {
856+
"description": "No projects detected with the matching criteria.\nCreate a new project instead"
810857
}
811858
}
812859
},
813860

814-
"workspace_issues": {
861+
"workspace_views": {
862+
"add_view": "Add view",
815863
"empty_state": {
816864
"all-issues": {
817865
"title": "No issues in the project",
@@ -1032,6 +1080,12 @@
10321080
},
10331081

10341082
"project_module": {
1083+
"add_module": "Add Module",
1084+
"update_module": "Update Module",
1085+
"create_module": "Create Module",
1086+
"archive_module": "Archive Module",
1087+
"restore_module": "Restore Module",
1088+
"delete_module": "Delete module",
10351089
"empty_state": {
10361090
"general": {
10371091
"title": "Map your project milestones to Modules and track aggregated work easily.",
@@ -1057,6 +1111,24 @@
10571111
"archived": {
10581112
"title": "No archived Modules yet",
10591113
"description": "To tidy up your project, archive completed or cancelled modules. Find them here once archived."
1114+
},
1115+
"sidebar": {
1116+
"in_active": "This module isn't active yet.",
1117+
"invalid_date": "Invalid date. Please enter valid date."
1118+
}
1119+
},
1120+
"quick_actions": {
1121+
"archive_module": "Archive module",
1122+
"archive_module_description": "Only completed or canceled\nmodule can be archived.",
1123+
"delete_module": "Delete module"
1124+
},
1125+
"toast": {
1126+
"copy": {
1127+
"success": "Module link copied to clipboard"
1128+
},
1129+
"delete": {
1130+
"success": "Module deleted successfully",
1131+
"error": "Failed to delete module"
10601132
}
10611133
}
10621134
},
@@ -1379,7 +1451,8 @@
13791451
"exporter": {
13801452
"csv": {
13811453
"title": "CSV",
1382-
"description": "Export issues to a CSV file."
1454+
"description": "Export issues to a CSV file.",
1455+
"short_description": "Export as csv"
13831456
},
13841457
"xlsx": {
13851458
"title": "Excel",

packages/types/src/workspace.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type {
55
IUserLite,
66
IWorkspaceViewProps,
77
} from "@plane/types";
8+
import { EUserWorkspaceRoles } from "@plane/constants"; // TODO: check if importing this over here causes circular dependency
89
import { TUserPermissions } from "./enums";
910

1011
export interface IWorkspace {
@@ -87,7 +88,7 @@ export interface IWorkspaceMemberMe {
8788
default_props: IWorkspaceViewProps;
8889
id: string;
8990
member: string;
90-
role: TUserPermissions;
91+
role: TUserPermissions | EUserWorkspaceRoles;
9192
updated_at: Date;
9293
updated_by: string;
9394
view_props: IWorkspaceViewProps;

web/app/[workspaceSlug]/(projects)/analytics/header.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,12 @@ export const WorkspaceAnalyticsHeader = observer(() => {
4141
<Breadcrumbs>
4242
<Breadcrumbs.BreadcrumbItem
4343
type="text"
44-
link={<BreadcrumbLink label={t("analytics")} icon={<BarChart2 className="h-4 w-4 text-custom-text-300" />} />}
44+
link={
45+
<BreadcrumbLink
46+
label={t("workspace_analytics.label")}
47+
icon={<BarChart2 className="h-4 w-4 text-custom-text-300" />}
48+
/>
49+
}
4550
/>
4651
</Breadcrumbs>
4752
{analytics_tab === "custom" ? (

web/app/[workspaceSlug]/(projects)/analytics/page.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ const AnalyticsPage = observer(() => {
3232
// helper hooks
3333
const resolvedPath = useResolvedAssetPath({ basePath: "/empty-state/onboarding/analytics" });
3434
// derived values
35-
const pageTitle = currentWorkspace?.name ? `${currentWorkspace?.name} - Analytics` : undefined;
35+
const pageTitle = currentWorkspace?.name
36+
? t(`workspace_analytics.page_label`, { workspace: currentWorkspace?.name })
37+
: undefined;
3638

3739
// permissions
3840
const canPerformEmptyStateActions = allowPermissions(
@@ -59,7 +61,7 @@ const AnalyticsPage = observer(() => {
5961
selected ? "text-custom-primary-100 " : "hover:text-custom-text-200"
6062
}`}
6163
>
62-
{tab.title}
64+
{t(tab.i18n_title)}
6365
<div
6466
className={`border absolute bottom-0 right-0 left-0 rounded-t-md ${selected ? "border-custom-primary-100" : "border-transparent group-hover:border-custom-border-200"}`}
6567
/>

web/app/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/modules/(list)/header.tsx

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

33
import { observer } from "mobx-react";
4+
// plane imports
5+
import { useTranslation } from "@plane/i18n";
46
// ui
57
import { Breadcrumbs, Button, DiceIcon, Header } from "@plane/ui";
68
// components
@@ -22,7 +24,9 @@ export const ModulesListHeader: React.FC = observer(() => {
2224
const { setTrackElement } = useEventTracker();
2325
const { allowPermissions } = useUserPermissions();
2426

25-
const { loader } = useProject();
27+
const { loader } = useProject();
28+
29+
const { t } = useTranslation();
2630

2731
// auth
2832
const canUserCreateModule = allowPermissions(
@@ -35,10 +39,12 @@ export const ModulesListHeader: React.FC = observer(() => {
3539
<Header.LeftItem>
3640
<div>
3741
<Breadcrumbs onBack={router.back} isLoading={loader}>
38-
<ProjectBreadcrumb />
42+
<ProjectBreadcrumb />
3943
<Breadcrumbs.BreadcrumbItem
4044
type="text"
41-
link={<BreadcrumbLink label="Modules" icon={<DiceIcon className="h-4 w-4 text-custom-text-300" />} />}
45+
link={
46+
<BreadcrumbLink label={t("modules")} icon={<DiceIcon className="h-4 w-4 text-custom-text-300" />} />
47+
}
4248
/>
4349
</Breadcrumbs>
4450
</div>
@@ -54,7 +60,8 @@ export const ModulesListHeader: React.FC = observer(() => {
5460
toggleCreateModuleModal(true);
5561
}}
5662
>
57-
<div className="hidden sm:block">Add</div> Module
63+
<div className="sm:hidden block">{t("add")}</div>
64+
<div className="hidden sm:block">{t("project_module.add_module")}</div>
5865
</Button>
5966
) : (
6067
<></>

web/app/[workspaceSlug]/(projects)/workspace-views/header.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { useParams } from "next/navigation";
66
import { Layers } from "lucide-react";
77
// plane constants
88
import { EIssueFilterType, EIssuesStoreType, ISSUE_DISPLAY_FILTERS_BY_PAGE } from "@plane/constants";
9+
import { useTranslation } from "@plane/i18n";
910
// types
1011
import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions } from "@plane/types";
1112
// ui
@@ -33,6 +34,7 @@ export const GlobalIssuesHeader = observer(() => {
3334
const {
3435
workspace: { workspaceMemberIds },
3536
} = useMember();
37+
const { t } = useTranslation();
3638

3739
const issueFilters = globalViewId ? filters[globalViewId.toString()] : undefined;
3840

@@ -103,7 +105,7 @@ export const GlobalIssuesHeader = observer(() => {
103105
<Breadcrumbs>
104106
<Breadcrumbs.BreadcrumbItem
105107
type="text"
106-
link={<BreadcrumbLink label={`Views`} icon={<Layers className="h-4 w-4 text-custom-text-300" />} />}
108+
link={<BreadcrumbLink label={t("views")} icon={<Layers className="h-4 w-4 text-custom-text-300" />} />}
107109
/>
108110
</Breadcrumbs>
109111
</Header.LeftItem>
@@ -141,7 +143,7 @@ export const GlobalIssuesHeader = observer(() => {
141143
)}
142144

143145
<Button variant="primary" size="sm" onClick={() => setCreateViewModal(true)}>
144-
Add view
146+
{t("workspace_views.add_view")}
145147
</Button>
146148
</Header.RightItem>
147149
</Header>

web/ce/components/projects/mobile-header.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { observer } from "mobx-react";
44
import { useParams } from "next/navigation";
55
// icons
66
import { ChevronDown, ListFilter } from "lucide-react";
7+
// i18n
8+
import { useTranslation } from "@plane/i18n";
79
// types
810
import { TProjectFilters } from "@plane/types";
911
// hooks
@@ -15,6 +17,8 @@ import { calculateTotalFilters } from "@/helpers/filter.helper";
1517
import { useMember, useProjectFilter } from "@/hooks/store";
1618

1719
export const ProjectsListMobileHeader = observer(() => {
20+
// i18n
21+
const { t } = useTranslation();
1822
// router
1923
const { workspaceSlug } = useParams();
2024
const {
@@ -63,12 +67,12 @@ export const ProjectsListMobileHeader = observer(() => {
6367
<div className="border-l border-custom-border-200 flex justify-around w-full">
6468
<FiltersDropdown
6569
icon={<ListFilter className="h-3 w-3" />}
66-
title="Filters"
70+
title={t("common.filters")}
6771
placement="bottom-end"
6872
menuButton={
6973
<div className="flex text-sm items-center gap-2 neutral-primary text-custom-text-200">
7074
<ListFilter className="h-3 w-3" />
71-
Filters
75+
{t("common.filters")}
7276
<ChevronDown className="h-3 w-3" strokeWidth={2} />
7377
</div>
7478
}

0 commit comments

Comments
 (0)