mirror of
https://github.com/makeplane/plane.git
synced 2025-12-16 11:57:56 +01:00
chore: empty state translation refactor
This commit is contained in:
@@ -98,11 +98,11 @@ const ProjectCyclesPage = observer(() => {
|
||||
<div className="h-full place-items-center">
|
||||
<EmptyStateDetailed
|
||||
assetKey="cycle"
|
||||
title={t("project.cycles.title")}
|
||||
description={t("project.cycles.description")}
|
||||
title={t("project_empty_state.cycles.title")}
|
||||
description={t("project_empty_state.cycles.description")}
|
||||
actions={[
|
||||
{
|
||||
label: t("project.cycles.cta_primary"),
|
||||
label: t("project_empty_state.cycles.cta_primary"),
|
||||
onClick: () => setCreateModal(true),
|
||||
variant: "primary",
|
||||
disabled: !hasMemberLevelPermission,
|
||||
|
||||
@@ -90,11 +90,11 @@ const WebhooksListPage = observer(() => {
|
||||
<div className="h-full w-full flex items-center justify-center">
|
||||
<EmptyStateCompact
|
||||
assetKey="webhook"
|
||||
title={t("settings.webhooks.title")}
|
||||
description={t("settings.webhooks.description")}
|
||||
title={t("settings_empty_state.webhooks.title")}
|
||||
description={t("settings_empty_state.webhooks.description")}
|
||||
actions={[
|
||||
{
|
||||
label: t("settings.webhooks.cta_primary"),
|
||||
label: t("settings_empty_state.webhooks.cta_primary"),
|
||||
onClick: () => {
|
||||
captureClick({
|
||||
elementName: WORKSPACE_SETTINGS_TRACKER_ELEMENTS.EMPTY_STATE_ADD_WEBHOOK_BUTTON,
|
||||
|
||||
@@ -85,11 +85,11 @@ const ApiTokensPage = observer(() => {
|
||||
<EmptyStateCompact
|
||||
assetKey="token"
|
||||
assetClassName="size-20"
|
||||
title={t("settings.tokens.title")}
|
||||
description={t("settings.tokens.description")}
|
||||
title={t("settings_empty_state.tokens.title")}
|
||||
description={t("settings_empty_state.tokens.description")}
|
||||
actions={[
|
||||
{
|
||||
label: t("settings.tokens.cta_primary"),
|
||||
label: t("settings_empty_state.tokens.cta_primary"),
|
||||
onClick: () => {
|
||||
captureClick({
|
||||
elementName: PROFILE_SETTINGS_TRACKER_ELEMENTS.EMPTY_STATE_ADD_PAT_BUTTON,
|
||||
|
||||
@@ -157,7 +157,7 @@ export function DataTable<TData, TValue>({ columns, data, searchPlaceholder, act
|
||||
assetKey="unknown"
|
||||
assetClassName="size-20"
|
||||
rootClassName="border border-custom-border-100 px-5 py-10 md:py-20 md:px-20"
|
||||
title={t("workspace.analytics_work_items.title")}
|
||||
title={t("workspace_empty_state.analytics_work_items.title")}
|
||||
/>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
|
||||
@@ -58,7 +58,7 @@ const ProjectInsights = observer(() => {
|
||||
assetKey="unknown"
|
||||
assetClassName="size-20"
|
||||
rootClassName="border border-custom-border-100 px-5 py-10 md:py-20 md:px-20"
|
||||
title={t("workspace.analytics_work_items.title")}
|
||||
title={t("workspace_empty_state.analytics_work_items.title")}
|
||||
/>
|
||||
) : (
|
||||
<div className="gap-8 lg:flex">
|
||||
|
||||
@@ -123,7 +123,7 @@ const CreatedVsResolved = observer(() => {
|
||||
assetKey="unknown"
|
||||
assetClassName="size-20"
|
||||
rootClassName="border border-custom-border-100 px-5 py-10 md:py-20 md:px-20"
|
||||
title={t("workspace.analytics_work_items.title")}
|
||||
title={t("workspace_empty_state.analytics_work_items.title")}
|
||||
/>
|
||||
)}
|
||||
</AnalyticsSectionWrapper>
|
||||
|
||||
@@ -234,7 +234,7 @@ const PriorityChart = observer((props: Props) => {
|
||||
assetKey="unknown"
|
||||
assetClassName="size-20"
|
||||
rootClassName="border border-custom-border-100 px-5 py-10 md:py-20 md:px-20"
|
||||
title={t("workspace.analytics_work_items.title")}
|
||||
title={t("workspace_empty_state.analytics_work_items.title")}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -69,8 +69,8 @@ export const ArchivedCycleLayoutRoot: React.FC = observer(() => {
|
||||
<div className="h-full place-items-center">
|
||||
<EmptyStateDetailed
|
||||
assetKey="archived-cycle"
|
||||
title={t("workspace.archive_cycles.title")}
|
||||
description={t("workspace.archive_cycles.description")}
|
||||
title={t("workspace_empty_state.archive_cycles.title")}
|
||||
description={t("workspace_empty_state.archive_cycles.description")}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
|
||||
@@ -79,11 +79,11 @@ export const EstimateRoot: FC<TEstimateRoot> = observer((props) => {
|
||||
<EmptyStateCompact
|
||||
assetKey="estimate"
|
||||
assetClassName="size-20"
|
||||
title={t("settings.estimates.title")}
|
||||
description={t("settings.estimates.description")}
|
||||
title={t("settings_empty_state.estimates.title")}
|
||||
description={t("settings_empty_state.estimates.description")}
|
||||
actions={[
|
||||
{
|
||||
label: t("settings.estimates.cta_primary"),
|
||||
label: t("settings_empty_state.estimates.cta_primary"),
|
||||
onClick: () => setIsEstimateCreateModalOpen(true),
|
||||
},
|
||||
]}
|
||||
|
||||
@@ -124,8 +124,8 @@ export const PrevExports = observer((props: Props) => {
|
||||
<div className="flex h-full w-full items-center justify-center">
|
||||
<EmptyStateCompact
|
||||
assetKey="export"
|
||||
title={t("settings.exports.title")}
|
||||
description={t("settings.exports.description")}
|
||||
title={t("settings_empty_state.exports.title")}
|
||||
description={t("settings_empty_state.exports.description")}
|
||||
align="start"
|
||||
rootClassName="py-20"
|
||||
/>
|
||||
|
||||
@@ -8,7 +8,7 @@ export const LinksEmptyState = () => {
|
||||
<EmptyStateCompact
|
||||
assetKey="link"
|
||||
assetClassName="w-20 h-20"
|
||||
title={t("workspace.home_widget_quick_links.title")}
|
||||
title={t("workspace_empty_state.home_widget_quick_links.title")}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -101,7 +101,7 @@ export const InboxIssueRoot: FC<TInboxIssueRoot> = observer((props) => {
|
||||
inboxIssueId={inboxIssueId.toString()}
|
||||
/>
|
||||
) : (
|
||||
<EmptyStateCompact assetKey="intake" title={t("project.intake_main.title")} assetClassName="size-20" />
|
||||
<EmptyStateCompact assetKey="intake" title={t("project_empty_state.intake_main.title")} assetClassName="size-20" />
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
|
||||
@@ -144,12 +144,12 @@ export const InboxSidebar: FC<IInboxSidebarProps> = observer((props) => {
|
||||
) : currentTab === EInboxIssueCurrentTab.OPEN ? (
|
||||
<EmptyStateDetailed
|
||||
assetKey="inbox"
|
||||
title={t("project.intake_sidebar.title")}
|
||||
description={t("project.intake_sidebar.description")}
|
||||
title={t("project_empty_state.intake_sidebar.title")}
|
||||
description={t("project_empty_state.intake_sidebar.description")}
|
||||
assetClassName="size-20"
|
||||
actions={[
|
||||
{
|
||||
label: t("project.intake_sidebar.cta_primary"),
|
||||
label: t("project_empty_state.intake_sidebar.cta_primary"),
|
||||
onClick: () => router.push(`/${workspaceSlug}/projects/${projectId}/intake`),
|
||||
variant: "primary",
|
||||
},
|
||||
|
||||
@@ -48,11 +48,11 @@ export const ProjectArchivedEmptyState: React.FC = observer(() => {
|
||||
) : (
|
||||
<EmptyStateDetailed
|
||||
assetKey="archived-work-item"
|
||||
title={t("workspace.archive_work_items.title")}
|
||||
description={t("workspace.archive_work_items.description")}
|
||||
title={t("workspace_empty_state.archive_work_items.title")}
|
||||
description={t("workspace_empty_state.archive_work_items.description")}
|
||||
actions={[
|
||||
{
|
||||
label: t("workspace.archive_work_items.cta_primary"),
|
||||
label: t("workspace_empty_state.archive_work_items.cta_primary"),
|
||||
onClick: () => router.push(`/${workspaceSlug}/settings/projects/${projectId}/automations`),
|
||||
disabled: !canPerformEmptyStateActions,
|
||||
variant: "primary",
|
||||
|
||||
@@ -103,11 +103,11 @@ export const CycleEmptyState: React.FC = observer(() => {
|
||||
) : (
|
||||
<EmptyStateDetailed
|
||||
assetKey="work-item"
|
||||
title={t("project.cycle_work_items.title")}
|
||||
description={t("project.cycle_work_items.description")}
|
||||
title={t("project_empty_state.cycle_work_items.title")}
|
||||
description={t("project_empty_state.cycle_work_items.description")}
|
||||
actions={[
|
||||
{
|
||||
label: t("project.cycle_work_items.cta_primary"),
|
||||
label: t("project_empty_state.cycle_work_items.cta_primary"),
|
||||
onClick: () => {
|
||||
captureClick({ elementName: WORK_ITEM_TRACKER_ELEMENTS.EMPTY_STATE_ADD_BUTTON.CYCLE });
|
||||
toggleCreateIssueModal(true, EIssuesStoreType.CYCLE);
|
||||
@@ -117,7 +117,7 @@ export const CycleEmptyState: React.FC = observer(() => {
|
||||
"data-ph-element": WORK_ITEM_TRACKER_ELEMENTS.EMPTY_STATE_ADD_BUTTON.CYCLE,
|
||||
},
|
||||
{
|
||||
label: t("project.cycle_work_items.cta_secondary"),
|
||||
label: t("project_empty_state.cycle_work_items.cta_secondary"),
|
||||
onClick: () => setCycleIssuesListModal(true),
|
||||
disabled: !canPerformEmptyStateActions,
|
||||
variant: "outline-primary",
|
||||
|
||||
@@ -90,11 +90,11 @@ export const ModuleEmptyState: React.FC = observer(() => {
|
||||
) : (
|
||||
<EmptyStateDetailed
|
||||
assetKey="work-item"
|
||||
title={t("project.module_work_items.title")}
|
||||
description={t("project.module_work_items.description")}
|
||||
title={t("project_empty_state.module_work_items.title")}
|
||||
description={t("project_empty_state.module_work_items.description")}
|
||||
actions={[
|
||||
{
|
||||
label: t("project.module_work_items.cta_primary"),
|
||||
label: t("project_empty_state.module_work_items.cta_primary"),
|
||||
onClick: () => {
|
||||
captureClick({ elementName: WORK_ITEM_TRACKER_ELEMENTS.EMPTY_STATE_ADD_BUTTON.MODULE });
|
||||
toggleCreateIssueModal(true, EIssuesStoreType.MODULE);
|
||||
@@ -103,7 +103,7 @@ export const ModuleEmptyState: React.FC = observer(() => {
|
||||
variant: "primary",
|
||||
},
|
||||
{
|
||||
label: t("project.module_work_items.cta_secondary"),
|
||||
label: t("project_empty_state.module_work_items.cta_secondary"),
|
||||
onClick: () => setModuleIssuesListModal(true),
|
||||
disabled: !canPerformEmptyStateActions,
|
||||
variant: "outline-primary",
|
||||
|
||||
@@ -48,11 +48,11 @@ export const ProjectEmptyState: React.FC = observer(() => {
|
||||
) : (
|
||||
<EmptyStateDetailed
|
||||
assetKey="work-item"
|
||||
title={t("project.work_items.title")}
|
||||
description={t("project.work_items.description")}
|
||||
title={t("project_empty_state.work_items.title")}
|
||||
description={t("project_empty_state.work_items.description")}
|
||||
actions={[
|
||||
{
|
||||
label: t("project.work_items.cta_primary"),
|
||||
label: t("project_empty_state.work_items.cta_primary"),
|
||||
onClick: () => {
|
||||
captureClick({ elementName: WORK_ITEM_TRACKER_ELEMENTS.EMPTY_STATE_ADD_BUTTON.WORK_ITEMS });
|
||||
toggleCreateIssueModal(true, EIssuesStoreType.PROJECT);
|
||||
|
||||
@@ -34,13 +34,13 @@ export const WorkspaceDraftEmptyState: FC = observer(() => {
|
||||
/>
|
||||
<div className="relative h-full w-full overflow-y-auto">
|
||||
<EmptyStateDetailed
|
||||
title={t("workspace.drafts.title")}
|
||||
description={t("workspace.drafts.description")}
|
||||
title={t("workspace_empty_state.drafts.title")}
|
||||
description={t("workspace_empty_state.drafts.description")}
|
||||
assetKey="draft"
|
||||
assetClassName="size-20"
|
||||
actions={[
|
||||
{
|
||||
label: t("workspace.drafts.cta_primary"),
|
||||
label: t("workspace_empty_state.drafts.cta_primary"),
|
||||
onClick: () => {
|
||||
setIsDraftIssueModalOpen(true);
|
||||
},
|
||||
|
||||
@@ -112,11 +112,11 @@ export const ProjectSettingsLabelList: React.FC = observer(() => {
|
||||
<EmptyStateCompact
|
||||
assetKey="label"
|
||||
assetClassName="size-20"
|
||||
title={t("settings.labels.title")}
|
||||
description={t("settings.labels.description")}
|
||||
title={t("settings_empty_state.labels.title")}
|
||||
description={t("settings_empty_state.labels.description")}
|
||||
actions={[
|
||||
{
|
||||
label: t("settings.labels.cta_primary"),
|
||||
label: t("settings_empty_state.labels.cta_primary"),
|
||||
onClick: () => {
|
||||
newLabel();
|
||||
captureClick({
|
||||
|
||||
@@ -72,8 +72,8 @@ export const ArchivedModuleLayoutRoot: React.FC = observer(() => {
|
||||
<div className="h-full place-items-center">
|
||||
<EmptyStateDetailed
|
||||
assetKey="archived-module"
|
||||
title={t("workspace.archive_modules.title")}
|
||||
description={t("workspace.archive_modules.description")}
|
||||
title={t("workspace_empty_state.archive_modules.title")}
|
||||
description={t("workspace_empty_state.archive_modules.description")}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
|
||||
@@ -50,11 +50,11 @@ export const ModulesListView: React.FC = observer(() => {
|
||||
return (
|
||||
<EmptyStateDetailed
|
||||
assetKey="module"
|
||||
title={t("project.modules.title")}
|
||||
description={t("project.modules.description")}
|
||||
title={t("project_empty_state.modules.title")}
|
||||
description={t("project_empty_state.modules.description")}
|
||||
actions={[
|
||||
{
|
||||
label: t("project.modules.cta_primary"),
|
||||
label: t("project_empty_state.modules.cta_primary"),
|
||||
onClick: () => toggleCreateModuleModal(true),
|
||||
disabled: !canPerformEmptyStateActions,
|
||||
variant: "primary",
|
||||
|
||||
@@ -94,11 +94,11 @@ export const PagesListMainContent: React.FC<Props> = observer((props) => {
|
||||
return (
|
||||
<EmptyStateDetailed
|
||||
assetKey="page"
|
||||
title={t("project.pages.title")}
|
||||
description={t("project.pages.description")}
|
||||
title={t("project_empty_state.pages.title")}
|
||||
description={t("project_empty_state.pages.description")}
|
||||
actions={[
|
||||
{
|
||||
label: t("project.pages.cta_primary"),
|
||||
label: t("project_empty_state.pages.cta_primary"),
|
||||
onClick: () => {
|
||||
handleCreatePage();
|
||||
captureClick({ elementName: PROJECT_PAGE_TRACKER_ELEMENTS.EMPTY_STATE_CREATE_BUTTON });
|
||||
@@ -114,11 +114,11 @@ export const PagesListMainContent: React.FC<Props> = observer((props) => {
|
||||
return (
|
||||
<EmptyStateDetailed
|
||||
assetKey="page"
|
||||
title={t("project.pages.title")}
|
||||
description={t("project.pages.description")}
|
||||
title={t("project_empty_state.pages.title")}
|
||||
description={t("project_empty_state.pages.description")}
|
||||
actions={[
|
||||
{
|
||||
label: t("project.pages.cta_primary"),
|
||||
label: t("project_empty_state.pages.cta_primary"),
|
||||
onClick: () => {
|
||||
handleCreatePage();
|
||||
captureClick({ elementName: PROJECT_PAGE_TRACKER_ELEMENTS.EMPTY_STATE_CREATE_BUTTON });
|
||||
@@ -133,11 +133,11 @@ export const PagesListMainContent: React.FC<Props> = observer((props) => {
|
||||
return (
|
||||
<EmptyStateDetailed
|
||||
assetKey="page"
|
||||
title={t("project.pages.title")}
|
||||
description={t("project.pages.description")}
|
||||
title={t("project_empty_state.pages.title")}
|
||||
description={t("project_empty_state.pages.description")}
|
||||
actions={[
|
||||
{
|
||||
label: t("project.pages.cta_primary"),
|
||||
label: t("project_empty_state.pages.cta_primary"),
|
||||
onClick: () => {
|
||||
handleCreatePage();
|
||||
captureClick({ elementName: PROJECT_PAGE_TRACKER_ELEMENTS.EMPTY_STATE_CREATE_BUTTON });
|
||||
@@ -152,8 +152,8 @@ export const PagesListMainContent: React.FC<Props> = observer((props) => {
|
||||
return (
|
||||
<EmptyStateDetailed
|
||||
assetKey="page"
|
||||
title={t("project.archive_pages.title")}
|
||||
description={t("project.archive_pages.description")}
|
||||
title={t("project_empty_state.archive_pages.title")}
|
||||
description={t("project_empty_state.archive_pages.description")}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ export const ProfilePriorityDistribution: React.FC<Props> = ({ userProfile }) =>
|
||||
<EmptyStateCompact
|
||||
assetKey="priority"
|
||||
assetClassName="size-20"
|
||||
title={t("workspace.your_work_by_priority.title")}
|
||||
title={t("workspace_empty_state.your_work_by_priority.title")}
|
||||
/>
|
||||
)}
|
||||
</Card>
|
||||
|
||||
@@ -74,7 +74,7 @@ export const ProfileStateDistribution: React.FC<Props> = ({ stateDistribution, u
|
||||
<EmptyStateCompact
|
||||
assetKey="priority"
|
||||
assetClassName="size-20"
|
||||
title={t("workspace.your_work_by_priority.title")}
|
||||
title={t("workspace_empty_state.your_work_by_priority.title")}
|
||||
/>
|
||||
)}
|
||||
</Card>
|
||||
|
||||
@@ -77,13 +77,13 @@ export const ProjectCardList = observer((props: TProjectCardListProps) => {
|
||||
title={
|
||||
currentWorkspaceDisplayFilters?.archived_projects &&
|
||||
calculateTotalFilters(currentWorkspaceFilters ?? {}) === 0
|
||||
? t("workspace.projects_archived.title")
|
||||
? t("workspace_empty_state.projects_archived.title")
|
||||
: t("common_empty_state.search.title")
|
||||
}
|
||||
description={
|
||||
currentWorkspaceDisplayFilters?.archived_projects &&
|
||||
calculateTotalFilters(currentWorkspaceFilters ?? {}) === 0
|
||||
? t("workspace.projects_archived.description")
|
||||
? t("workspace_empty_state.projects_archived.description")
|
||||
: t("common_empty_state.search.description")
|
||||
}
|
||||
assetKey={
|
||||
|
||||
@@ -58,11 +58,11 @@ export const ProjectViewsList = observer(() => {
|
||||
) : (
|
||||
<EmptyStateDetailed
|
||||
assetKey="view"
|
||||
title={t("project.views.title")}
|
||||
description={t("project.views.description")}
|
||||
title={t("project_empty_state.views.title")}
|
||||
description={t("project_empty_state.views.description")}
|
||||
actions={[
|
||||
{
|
||||
label: t("project.views.cta_primary"),
|
||||
label: t("project_empty_state.views.cta_primary"),
|
||||
onClick: () => toggleCreateViewModal(true),
|
||||
disabled: !canPerformEmptyStateActions,
|
||||
variant: "primary",
|
||||
|
||||
Reference in New Issue
Block a user