Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 41 additions & 1 deletion packages/i18n/src/locales/en/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@
"project_id_is_required": "Project ID is required",
"select_network": "Select network",
"lead": "Lead",
"date_range": "Date range",
"private": "Private",
"public": "Public",
"accessible_only_by_invite": "Accessible only by invite",
Expand Down Expand Up @@ -307,6 +308,8 @@
"create_new_label": "Create new label",
"start_date": "Start date",
"due_date": "Due date",
"end_date": "End date",
"target_date": "Target date",
"cycle": "Cycle",
"estimate": "Estimate",
"change_parent_issue": "Change parent issue",
Expand All @@ -318,6 +321,8 @@
"optional": "Optional",
"Cancel": "Cancel",
"edit": "Edit",
"archive": "Archive",
"restor": "Restore",
"open_in_new_tab": "Open in new tab",
"delete": "Delete",
"deleting": "Deleting",
Expand All @@ -333,6 +338,13 @@
"show_all": "Show all",
"show_less": "Show less",
"no_data_yet": "No Data yet",
"add_link": "Add link",
"points": "Points",
"no_assignee": "No assignee",
"no_assignees_yet": "No assignees yet",
"no_labels_yet": "No labels yet",
"ideal": "Ideal",
"current": "Current",

"project_view": {
"sort_by": {
Expand Down Expand Up @@ -516,7 +528,11 @@
},
"comments": "Comments",
"updates": "Updates",
"clear_all": "Clear all"
"clear_all": "Clear all",
"no_links_added_yet": "No links added yet",
"add_link": "Add link",
"links": "Links",
"progress": "Progress"
},

"form": {
Expand Down Expand Up @@ -968,6 +984,12 @@
},

"project_module": {
"add_module": "Add Module",
"update_module": "Update Module",
"create_module": "Create Module",
"archive_module": "Archive Module",
"restore_module": "Restore Module",
"delete_module": "Delete module",
"empty_state": {
"general": {
"title": "Map your project milestones to Modules and track aggregated work easily.",
Expand All @@ -993,6 +1015,24 @@
"archived": {
"title": "No archived Modules yet",
"description": "To tidy up your project, archive completed or cancelled modules. Find them here once archived."
},
"sidebar": {
"in_active": "This module isn't active yet.",
"invalid_date": "Invalid date. Please enter valid date."
}
},
"quick_actions": {
"archive_module": "Archive module",
"archive_module_description": "Only completed or canceled\nmodule can be archived.",
"delete_module": "Delete module"
},
"toast": {
"copy": {
"success": "Module link copied to clipboard"
},
"delete": {
"success": "Module deleted successfully",
"error": "Failed to delete module"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"use client";

import { observer } from "mobx-react";
// plane imports
import { useTranslation } from "@plane/i18n";
// ui
import { Breadcrumbs, Button, DiceIcon, Header } from "@plane/ui";
// components
Expand All @@ -22,7 +24,9 @@ export const ModulesListHeader: React.FC = observer(() => {
const { setTrackElement } = useEventTracker();
const { allowPermissions } = useUserPermissions();

const { loader } = useProject();
const { loader } = useProject();

const { t } = useTranslation();

// auth
const canUserCreateModule = allowPermissions(
Expand All @@ -35,10 +39,12 @@ export const ModulesListHeader: React.FC = observer(() => {
<Header.LeftItem>
<div>
<Breadcrumbs onBack={router.back} isLoading={loader}>
<ProjectBreadcrumb />
<ProjectBreadcrumb />
<Breadcrumbs.BreadcrumbItem
type="text"
link={<BreadcrumbLink label="Modules" icon={<DiceIcon className="h-4 w-4 text-custom-text-300" />} />}
link={
<BreadcrumbLink label={t("modules")} icon={<DiceIcon className="h-4 w-4 text-custom-text-300" />} />
}
/>
</Breadcrumbs>
</div>
Expand All @@ -54,7 +60,8 @@ export const ModulesListHeader: React.FC = observer(() => {
toggleCreateModuleModal(true);
}}
>
<div className="hidden sm:block">Add</div> Module
<div className="sm:hidden block">{t("add")}</div>
<div className="hidden sm:block">{t("project_module.add_module")}</div>
</Button>
) : (
<></>
Expand Down
23 changes: 14 additions & 9 deletions web/core/components/modules/analytics-sidebar/issue-progress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { useSearchParams } from "next/navigation";
import { AlertCircle, ChevronUp, ChevronDown } from "lucide-react";
import { Disclosure, Transition } from "@headlessui/react";
import { EIssueFilterType, EIssuesStoreType } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
import { IIssueFilterOptions, TModulePlotType } from "@plane/types";
import { CustomSelect, Spinner } from "@plane/ui";
// components
Expand All @@ -27,8 +28,8 @@ type TModuleAnalyticsProgress = {
};

const moduleBurnDownChartOptions = [
{ value: "burndown", label: "Issues" },
{ value: "points", label: "Points" },
{ value: "burndown", i18n_label: "issues" },
{ value: "points", i18n_label: "points" },
];

export const ModuleAnalyticsProgress: FC<TModuleAnalyticsProgress> = observer((props) => {
Expand All @@ -47,6 +48,8 @@ export const ModuleAnalyticsProgress: FC<TModuleAnalyticsProgress> = observer((p
// state
const [loader, setLoader] = useState(false);

const { t } = useTranslation();

// derived values
const moduleDetails = getModuleById(moduleId);
const plotType: TModulePlotType = getPlotTypeByModuleId(moduleId);
Expand Down Expand Up @@ -154,7 +157,7 @@ export const ModuleAnalyticsProgress: FC<TModuleAnalyticsProgress> = observer((p
{isModuleDateValid ? (
<div className="relative w-full flex justify-between items-center gap-2">
<Disclosure.Button className="relative flex items-center gap-2 w-full">
<div className="font-medium text-custom-text-200 text-sm">Progress</div>
<div className="font-medium text-custom-text-200 text-sm">{t("progress")}</div>
{progressHeaderPercentage > 0 && (
<div className="flex h-5 w-9 items-center justify-center rounded bg-amber-500/20 text-xs font-medium text-amber-500">{`${progressHeaderPercentage}%`}</div>
)}
Expand All @@ -165,14 +168,16 @@ export const ModuleAnalyticsProgress: FC<TModuleAnalyticsProgress> = observer((p
<CustomSelect
value={plotType}
label={
<span>{moduleBurnDownChartOptions.find((v) => v.value === plotType)?.label ?? "None"}</span>
<span>
{t(moduleBurnDownChartOptions.find((v) => v.value === plotType)?.i18n_label || "none")}
</span>
}
onChange={onChange}
maxHeight="lg"
>
{moduleBurnDownChartOptions.map((item) => (
<CustomSelect.Option key={item.value} value={item.value}>
{item.label}
{t(item.i18n_label)}
</CustomSelect.Option>
))}
</CustomSelect>
Expand All @@ -195,8 +200,8 @@ export const ModuleAnalyticsProgress: FC<TModuleAnalyticsProgress> = observer((p
<AlertCircle height={14} width={14} className="text-custom-text-200" />
<span className="text-xs italic text-custom-text-200">
{moduleDetails?.start_date && moduleDetails?.target_date
? "This module isn't active yet."
: "Invalid date. Please enter valid date."}
? t("project_module.empty_state.sidebar.in_active")
: t("project_module.empty_state.sidebar.invalid_date")}
</span>
</div>
</div>
Expand All @@ -209,11 +214,11 @@ export const ModuleAnalyticsProgress: FC<TModuleAnalyticsProgress> = observer((p
<div className="relative flex items-center gap-2">
<div className="flex items-center justify-center gap-1 text-xs">
<span className="h-2.5 w-2.5 rounded-full bg-[#A9BBD0]" />
<span>Ideal</span>
<span>{t("ideal")}</span>
</div>
<div className="flex items-center justify-center gap-1 text-xs">
<span className="h-2.5 w-2.5 rounded-full bg-[#4C8FFF]" />
<span>Current</span>
<span>{t("current")}</span>
</div>
</div>
{moduleStartDate && moduleEndDate && completionChartDistributionData && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { FC } from "react";
import { observer } from "mobx-react";
import Image from "next/image";
import { Tab } from "@headlessui/react";
import { useTranslation } from "@plane/i18n";
import {
IIssueFilterOptions,
IIssueFilters,
Expand Down Expand Up @@ -73,6 +74,7 @@ type TStateStatComponent = {

export const AssigneeStatComponent = observer((props: TAssigneeStatComponent) => {
const { distribution, isEditable, filters, handleFiltersUpdate } = props;
const { t } = useTranslation();
return (
<div>
{distribution && distribution.length > 0 ? (
Expand Down Expand Up @@ -104,7 +106,7 @@ export const AssigneeStatComponent = observer((props: TAssigneeStatComponent) =>
<div className="h-4 w-4 rounded-full border-2 border-custom-border-200 bg-custom-background-80">
<img src="/user.png" height="100%" width="100%" className="rounded-full" alt="User" />
</div>
<span>No assignee</span>
<span>{t("no_assignee")}</span>
</div>
}
completed={assignee?.completed ?? 0}
Expand All @@ -117,7 +119,7 @@ export const AssigneeStatComponent = observer((props: TAssigneeStatComponent) =>
<div className="flex h-20 w-20 items-center justify-center rounded-full bg-custom-background-80">
<Image src={emptyMembers} className="h-12 w-12" alt="empty members" />
</div>
<h6 className="text-base text-custom-text-300">No assignees yet</h6>
<h6 className="text-base text-custom-text-300">{t("no_assignees_yet")}</h6>
</div>
)}
</div>
Expand Down
Loading
Loading