A full-featured CRM built with React, shadcn/ui, and Supabase.
Simplify Atomic CRM translation usage
Anibal Svarcasb06976a596dd
diff --git a/src/components/atomic-crm/activity/ActivityLog.tsx b/src/components/atomic-crm/activity/ActivityLog.tsxindex 5ca08019..0fcb2bfe 100644--- a/src/components/atomic-crm/activity/ActivityLog.tsx+++ b/src/components/atomic-crm/activity/ActivityLog.tsx@@ -59,7 +59,7 @@ export function ActivityLog({}}><RotateCcw />- {translate("crm.common.retry", { _: "Retry" })}+ {translate("crm.common.retry")}</Button></div></div>diff --git a/src/components/atomic-crm/activity/ActivityLogContactCreated.tsx b/src/components/atomic-crm/activity/ActivityLogContactCreated.tsxindex b54b1969..3dffe386 100644--- a/src/components/atomic-crm/activity/ActivityLogContactCreated.tsx+++ b/src/components/atomic-crm/activity/ActivityLogContactCreated.tsx@@ -42,7 +42,7 @@ export function ActivityLogContactCreated({{activity.company_id != null && (<>{" "}- {translate("crm.activity.to", { _: "to" })}{" "}+ {translate("crm.activity.to")}{" "}<ReferenceFieldsource="company_id"reference="companies"diff --git a/src/components/atomic-crm/activity/ActivityLogDealCreated.tsx b/src/components/atomic-crm/activity/ActivityLogDealCreated.tsxindex 24e44bdf..01fd044e 100644--- a/src/components/atomic-crm/activity/ActivityLogDealCreated.tsx+++ b/src/components/atomic-crm/activity/ActivityLogDealCreated.tsx@@ -42,7 +42,7 @@ export function ActivityLogDealCreated({)}{" "}{context !== "company" && (<>- {translate("crm.activity.to", { _: "to" })}{" "}+ {translate("crm.activity.to")}{" "}<ReferenceFieldsource="company_id"reference="companies"diff --git a/src/components/atomic-crm/activity/ActivityLogDealNoteCreated.tsx b/src/components/atomic-crm/activity/ActivityLogDealNoteCreated.tsxindex 3e23059d..658ad3b0 100644--- a/src/components/atomic-crm/activity/ActivityLogDealNoteCreated.tsx+++ b/src/components/atomic-crm/activity/ActivityLogDealNoteCreated.tsx@@ -60,7 +60,7 @@ export function ActivityLogDealNoteCreated({{context !== "company" && (<>{" "}- {translate("crm.common.at", { _: "at" })}{" "}+ {translate("crm.common.at")}{" "}<ReferenceFieldsource="deal_id"reference="deals"diff --git a/src/components/atomic-crm/activity/ActivityLogIterator.tsx b/src/components/atomic-crm/activity/ActivityLogIterator.tsxindex dc9f9cb8..441b0391 100644--- a/src/components/atomic-crm/activity/ActivityLogIterator.tsx+++ b/src/components/atomic-crm/activity/ActivityLogIterator.tsx@@ -50,7 +50,7 @@ export function ActivityLogIterator({}}className="flex w-full justify-center text-sm underline hover:no-underline">- {translate("crm.activity.load_more", { _: "Load more activity" })}+ {translate("crm.activity.load_more")}</a>)}</div>diff --git a/src/components/atomic-crm/companies/CompanyAside.tsx b/src/components/atomic-crm/companies/CompanyAside.tsxindex 7897c234..b8d6da22 100644--- a/src/components/atomic-crm/companies/CompanyAside.tsx+++ b/src/components/atomic-crm/companies/CompanyAside.tsx@@ -133,19 +133,18 @@ export const ContextInfo = ({ record }: { record: Company }) => {>{sectorLabel && (<span>- {translate("resources.companies.fields.sector", { _: "Sector" })}:{" "}- {sectorLabel}+ {translate("resources.companies.fields.sector")}: {sectorLabel}</span>)}{record.size && (<span>- {translate("resources.companies.fields.size", { _: "Size" })}:{" "}+ {translate("resources.companies.fields.size")}:{" "}<SelectField source="size" choices={translatedSizes} /></span>)}{record.revenue && (<span>- {translate("resources.companies.fields.revenue", { _: "Revenue" })}:{" "}+ {translate("resources.companies.fields.revenue")}:{" "}<TextField source="revenue" /></span>)}diff --git a/src/components/atomic-crm/companies/CompanyListFilter.tsx b/src/components/atomic-crm/companies/CompanyListFilter.tsxindex 901ff32c..0b471ec4 100644--- a/src/components/atomic-crm/companies/CompanyListFilter.tsx+++ b/src/components/atomic-crm/companies/CompanyListFilter.tsx@@ -56,7 +56,7 @@ export const CompanyListFilter = () => {><ToggleFilterButtonclassName="w-full justify-between"- label={translate("crm.common.me", { _: "Me" })}+ label={translate("crm.common.me")}value={{ sales_id: identity?.id }}/></FilterCategory>diff --git a/src/components/atomic-crm/companies/CompanyShow.tsx b/src/components/atomic-crm/companies/CompanyShow.tsxindex d6a2fd19..1105f0d4 100644--- a/src/components/atomic-crm/companies/CompanyShow.tsx+++ b/src/components/atomic-crm/companies/CompanyShow.tsx@@ -3,12 +3,12 @@ import { SortButton } from "@/components/admin/sort-button";import { Button } from "@/components/ui/button";import { Card, CardContent } from "@/components/ui/card";import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";-import { formatDistance } from "date-fns";import { UserPlus } from "lucide-react";import {RecordContextProvider,ShowBase,useListContext,+ useLocaleState,useRecordContext,useShowContext,useTranslate,@@ -27,6 +27,7 @@ import { Avatar } from "../contacts/Avatar";import { TagsList } from "../contacts/TagsList";import { findDealLabel } from "../deals/deal";import { MobileContent } from "../layout/MobileContent";+import { formatRelativeTime } from "../misc/formatRelativeTime";import MobileHeader from "../layout/MobileHeader";import { MobileBackButton } from "../misc/MobileBackButton";import { Status } from "../misc/Status";@@ -63,9 +64,7 @@ const CompanyShowContentMobile = () => {<div className="flex flex-1"><Link to="/"><h1 className="text-xl font-semibold">- {translate("resources.companies.forcedCaseName", {- _: "Company",- })}+ {translate("resources.companies.forcedCaseName")}</h1></Link></div>@@ -121,23 +120,19 @@ const CompanyShowContent = () => {<Tabs defaultValue={currentTab} onValueChange={handleTabChange}><TabsList className="grid w-full grid-cols-3"><TabsTrigger value="activity">- {translate("crm.common.activity", { _: "Activity" })}+ {translate("crm.common.activity")}</TabsTrigger><TabsTrigger value="contacts">{record.nb_contacts === 0- ? translate("resources.companies.no_contacts", {- _: "No Contacts",- })+ ? translate("resources.companies.no_contacts"): translate("resources.companies.nb_contacts", {smart_count: record.nb_contacts,- _: `${record.nb_contacts} Contacts`,})}</TabsTrigger>{record.nb_deals ? (<TabsTrigger value="deals">{translate("resources.companies.nb_deals", {smart_count: record.nb_deals,- _: `${record.nb_deals} deals`,})}</TabsTrigger>) : null}@@ -194,12 +189,12 @@ const CompanyShowContent = () => {const ContactsIterator = () => {const translate = useTranslate();+ const [locale = "en"] = useLocaleState();const location = useLocation();const { data: contacts, error, isPending } = useListContext<Contact>();if (isPending || error) return null;- const now = Date.now();return (<div className="pt-0">{contacts.map((contact) => (@@ -224,7 +219,6 @@ const ContactsIterator = () => {"crm.common.task_count",{smart_count: contact.nb_tasks,- _: contact.nb_tasks > 1 ? "tasks" : "task",},)}`: ""}@@ -235,11 +229,8 @@ const ContactsIterator = () => {{contact.last_seen && (<div className="text-right"><div className="text-sm text-muted-foreground">- {translate("crm.common.last_activity", {- _: "last activity",- })}{" "}- {formatDistance(contact.last_seen, now)}{" "}- {translate("crm.common.ago", { _: "ago" })}{" "}+ {translate("crm.common.last_activity")}{" "}+ {formatRelativeTime(contact.last_seen, locale)}{" "}<Status status={contact.status} /></div></div>@@ -263,7 +254,7 @@ const CreateRelatedContactButton = () => {className="flex items-center gap-2"><UserPlus className="h-4 w-4" />- {translate("resources.contacts.action.add", { _: "Add contact" })}+ {translate("resources.contacts.action.add")}</RouterLink></Button>);@@ -271,11 +262,10 @@ const CreateRelatedContactButton = () => {const DealsIterator = () => {const translate = useTranslate();+ const [locale = "en"] = useLocaleState();const { data: deals, error, isPending } = useListContext<Deal>();const { dealStages, dealCategories } = useConfigurationContext();if (isPending || error) return null;-- const now = Date.now();return (<div><div>@@ -303,11 +293,8 @@ const DealsIterator = () => {</div><div className="text-right"><div className="text-sm text-muted-foreground">- {translate("crm.common.last_activity", {- _: "last activity",- })}{" "}- {formatDistance(deal.updated_at, now)}{" "}- {translate("crm.common.ago", { _: "ago" })}{" "}+ {translate("crm.common.last_activity")}{" "}+ {formatRelativeTime(deal.updated_at, locale)}{" "}</div></div></RouterLink>diff --git a/src/components/atomic-crm/contacts/ContactAside.tsx b/src/components/atomic-crm/contacts/ContactAside.tsxindex 7357846e..59545250 100644--- a/src/components/atomic-crm/contacts/ContactAside.tsx+++ b/src/components/atomic-crm/contacts/ContactAside.tsx@@ -23,47 +23,32 @@ export const ContactAside = ({ link = "edit" }: { link?: "edit" | "show" }) => {<div className="hidden sm:block w-92 min-w-92 text-sm"><div className="mb-4 -ml-1">{link === "edit" ? (- <EditButton- label={translate("resources.contacts.action.edit", {- _: "Edit contact",- })}- />+ <EditButton label="resources.contacts.action.edit" />) : (- <ShowButton- label={translate("resources.contacts.action.show", {- _: "Show contact",- })}- />+ <ShowButton label="resources.contacts.action.show" />)}</div><AsideSection- title={translate("resources.contacts.inputs.personal_info", {- _: "Personal info",- })}+ title={translate("resources.contacts.field_categories.personal_info")}><ContactPersonalInfo /></AsideSection><AsideSection- title={translate("resources.contacts.inputs.background_info_short", {- _: "Background info",- })}+ title={translate("resources.contacts.field_categories.background_info")}><ContactBackgroundInfo /></AsideSection><AsideSection- title={translate("resources.tags.name", { smart_count: 2, _: "Tags" })}+ title={translate("resources.tags.name", { smart_count: 2 })}><TagsListEdit /></AsideSection><AsideSection- title={translate("resources.tasks.name", {- smart_count: 2,- _: "Tasks",- })}+ title={translate("resources.tasks.name", { smart_count: 2 })}><ReferenceManyFieldtarget="contact_id"diff --git a/src/components/atomic-crm/contacts/ContactCreateSheet.tsx b/src/components/atomic-crm/contacts/ContactCreateSheet.tsxindex 24ab7fcc..0c9eecae 100644--- a/src/components/atomic-crm/contacts/ContactCreateSheet.tsx+++ b/src/components/atomic-crm/contacts/ContactCreateSheet.tsx@@ -17,7 +17,7 @@ export const ContactCreateSheet = ({return (<CreateSheetresource="contacts"- title={translate("resources.contacts.action.new", { _: "New Contact" })}+ title={translate("resources.contacts.action.new")}defaultValues={{ sales_id: identity?.id }}transform={(data: Contact) => ({...data,diff --git a/src/components/atomic-crm/contacts/ContactEditSheet.tsx b/src/components/atomic-crm/contacts/ContactEditSheet.tsxindex db468bd6..2c7c67db 100644--- a/src/components/atomic-crm/contacts/ContactEditSheet.tsx+++ b/src/components/atomic-crm/contacts/ContactEditSheet.tsx@@ -20,8 +20,7 @@ export const ContactEditSheet = ({id={contactId}title={<h1 className="text-xl font-semibold truncate pr-10">- {translate("resources.contacts.action.edit", { _: "Edit contact" })}{" "}- <RecordRepresentation />+ {translate("resources.contacts.action.edit")} <RecordRepresentation /></h1>}open={open}diff --git a/src/components/atomic-crm/contacts/ContactEmpty.tsx b/src/components/atomic-crm/contacts/ContactEmpty.tsxindex 13fd8d37..d926cf8b 100644--- a/src/components/atomic-crm/contacts/ContactEmpty.tsx+++ b/src/components/atomic-crm/contacts/ContactEmpty.tsx@@ -25,20 +25,14 @@ export const ContactEmpty = () => {><imgsrc="./img/empty.svg"- alt={translate("resources.contacts.empty.title", {- _: "No contacts found",- })}+ alt={translate("resources.contacts.empty.title")}/><div className="flex flex-col gap-0 items-center"><h6 className="text-lg font-bold">- {translate("resources.contacts.empty.title", {- _: "No contacts found",- })}+ {translate("resources.contacts.empty.title")}</h6><p className="text-sm text-muted-foreground text-center mb-4">- {translate("resources.contacts.empty.description", {- _: "It seems your contact list is empty.",- })}+ {translate("resources.contacts.empty.description")}</p></div><div className="flex flex-row gap-2">@@ -49,7 +43,7 @@ export const ContactEmpty = () => {className="gap-2"><Plus className="h-4 w-4" />- {translate("resources.contacts.action.new", { _: "New Contact" })}+ {translate("resources.contacts.action.new")}</Button>) : (<>diff --git a/src/components/atomic-crm/contacts/ContactImportButton.tsx b/src/components/atomic-crm/contacts/ContactImportButton.tsxindex f7ed225f..224781d0 100644--- a/src/components/atomic-crm/contacts/ContactImportButton.tsx+++ b/src/components/atomic-crm/contacts/ContactImportButton.tsx@@ -39,8 +39,7 @@ export const ContactImportButton = () => {onClick={handleOpenModal}className="flex items-center gap-2 cursor-pointer">- <Upload />{" "}- {translate("resources.contacts.import.button", { _: "Import CSV" })}+ <Upload /> {translate("resources.contacts.import.button")}</Button><ContactImportDialog open={modalOpen} onClose={handleCloseModal} /></>@@ -100,9 +99,7 @@ export function ContactImportDialog({<DialogContent className="max-w-2xl"><Form className="flex flex-col gap-4"><DialogHeader>- <DialogTitle>- {translate("crm.import.action.import", { _: "Import" })}- </DialogTitle>+ <DialogTitle>{translate("crm.import.action.import")}</DialogTitle></DialogHeader><div className="flex flex-col space-y-2">@@ -128,9 +125,9 @@ export function ContactImportDialog({smart_count: 2,_: "contacts",})}- , {translate("crm.common.with", { _: "with" })}{" "}+ , {translate("crm.common.with")}{" "}<strong>{importer.errorCount}</strong>{" "}- {translate("crm.common.errors", { _: "errors" })}.+ {translate("crm.common.errors")}.{importer.remainingTime !== null && (<>{" "}@@ -217,7 +214,7 @@ export function ContactImportDialog({<FormToolbar>{importer.state === "idle" ? (<Button onClick={startImport} disabled={!file}>- {translate("crm.import.action.import", { _: "Import" })}+ {translate("crm.import.action.import")}</Button>) : (<Button@@ -225,7 +222,7 @@ export function ContactImportDialog({onClick={handleClose}disabled={importer.state === "running"}>- {translate("ra.action.close", { _: "Close" })}+ {translate("ra.action.close")}</Button>)}</FormToolbar>diff --git a/src/components/atomic-crm/contacts/ContactInputs.tsx b/src/components/atomic-crm/contacts/ContactInputs.tsxindex d40fd7de..2c8c7635 100644--- a/src/components/atomic-crm/contacts/ContactInputs.tsx+++ b/src/components/atomic-crm/contacts/ContactInputs.tsx@@ -49,7 +49,7 @@ const ContactIdentityInputs = () => {return (<div className="flex flex-col gap-4"><h6 className="text-lg font-semibold">- {translate("resources.contacts.inputs.identity", { _: "Identity" })}+ {translate("resources.contacts.field_categories.identity")}</h6><RadioButtonGroupInputlabel={false}@@ -75,7 +75,7 @@ const ContactPositionInputs = () => {return (<div className="flex flex-col gap-4"><h6 className="text-lg font-semibold">- {translate("resources.contacts.inputs.position", { _: "Position" })}+ {translate("resources.contacts.field_categories.position")}</h6><TextInput source="title" helperText={false} /><ReferenceInput source="company_id" reference="companies" perPage={10}>@@ -132,9 +132,7 @@ const ContactPersonalInformationInputs = () => {return (<div className="flex flex-col gap-4"><h6 className="text-lg font-semibold">- {translate("resources.contacts.inputs.personal_info", {- _: "Personal info",- })}+ {translate("resources.contacts.field_categories.personal_info")}</h6><ArrayInput source="email_jsonb" helperText={false}><SimpleFormIterator@@ -148,9 +146,7 @@ const ContactPersonalInformationInputs = () => {className="w-full"helperText={false}label={false}- placeholder={translate("resources.contacts.fields.email", {- _: "Email",- })}+ placeholder={translate("resources.contacts.fields.email")}validate={email()}onPaste={handleEmailPaste}onBlur={handleEmailBlur}@@ -178,9 +174,7 @@ const ContactPersonalInformationInputs = () => {className="w-full"helperText={false}label={false}- placeholder={translate("resources.contacts.fields.phone_number", {- _: "Phone number",- })}+ placeholder={translate("resources.contacts.fields.phone_number")}/><SelectInputsource="type"@@ -206,9 +200,7 @@ const ContactMiscInputs = () => {const translate = useTranslate();return (<div className="flex flex-col gap-4">- <h6 className="text-lg font-semibold">- {translate("crm.common.misc", { _: "Misc" })}- </h6>+ <h6 className="text-lg font-semibold">{translate("crm.common.misc")}</h6><TextInput source="background" multiline helperText={false} /><BooleanInput source="has_newsletter" helperText={false} /><ReferenceInputdiff --git a/src/components/atomic-crm/contacts/ContactListContent.tsx b/src/components/atomic-crm/contacts/ContactListContent.tsxindex c58b4775..95968819 100644--- a/src/components/atomic-crm/contacts/ContactListContent.tsx+++ b/src/components/atomic-crm/contacts/ContactListContent.tsx@@ -133,7 +133,7 @@ const ContactItemContent = ({{contact.title}{contact.title &&contact.company_id != null &&- ` ${translate("crm.common.at", { _: "at" })} `}+ ` ${translate("crm.common.at")} `}{contact.company_id != null && (<ReferenceFieldsource="company_id"@@ -146,7 +146,6 @@ const ContactItemContent = ({{contact.nb_tasks? ` - ${contact.nb_tasks} ${translate("crm.common.task_count", {smart_count: contact.nb_tasks,- _: contact.nb_tasks > 1 ? "tasks" : "task",})}`: ""} @@ -160,7 +159,7 @@ const ContactItemContent = ({className="text-sm text-muted-foreground"title={contact.last_seen}>- {`${translate("crm.common.last_activity", { _: "last activity" })} `}+ {`${translate("crm.common.last_activity")} `}<RelativeDate date={contact.last_seen} />{" "}<Status status={contact.status} /></div>@@ -209,9 +208,7 @@ export const ContactListContentMobile = () => {return (<div className="p-4"><div className="text-center text-muted-foreground mb-4">- {translate("resources.contacts.list.error_loading", {- _: "Error loading contacts",- })}+ {translate("resources.contacts.list.error_loading")}</div><div className="text-center mt-2"><Button@@ -220,7 +217,7 @@ export const ContactListContentMobile = () => {}}><RotateCcw />- {translate("crm.common.retry", { _: "Retry" })}+ {translate("crm.common.retry")}</Button></div></div>@@ -237,9 +234,7 @@ export const ContactListContentMobile = () => {{contacts.length === 0 && (<div className="p-4"><div className="text-muted-foreground">- {translate("resources.contacts.empty.title", {- _: "No contacts found",- })}+ {translate("resources.contacts.empty.title")}</div></div>)}@@ -269,7 +264,7 @@ const ContactItemContentMobile = ({ contact }: { contact: Contact }) => {{contact.title}{contact.title &&contact.company_id != null &&- ` ${translate("crm.common.at", { _: "at" })} `}+ ` ${translate("crm.common.at")} `}{contact.company_id != null && (<ReferenceFieldsource="company_id"@@ -285,7 +280,6 @@ const ContactItemContentMobile = ({ contact }: { contact: Contact }) => {{contact.nb_tasks}{" "}{translate("crm.common.task_count", {smart_count: contact.nb_tasks,- _: contact.nb_tasks > 1 ? "tasks" : "task",})}</span>) : null}diff --git a/src/components/atomic-crm/contacts/ContactListFilter.tsx b/src/components/atomic-crm/contacts/ContactListFilter.tsxindex d3fe13f9..ba7dbbe0 100644--- a/src/components/atomic-crm/contacts/ContactListFilter.tsx+++ b/src/components/atomic-crm/contacts/ContactListFilter.tsx@@ -29,20 +29,16 @@ export const ContactListFilter = () => {return (<ResponsiveFilterssearchInput={{- placeholder: translate("resources.contacts.filters.search", {- _: "Search name, company...",- }),+ placeholder: translate("resources.contacts.filters.search"),}}><FilterCategory- label={translate("resources.contacts.filters.last_activity", {- _: "Last activity",- })}+ label={translate("resources.contacts.fields.last_seen")}icon={<Clock />}><ToggleFilterButtonclassName="w-auto md:w-full justify-between h-10 md:h-8"- label={translate("resources.contacts.filters.today", { _: "Today" })}+ label={translate("resources.contacts.filters.today")}value={{"last_seen@gte": endOfYesterday().toISOString(),"last_seen@lte": undefined,@@ -51,9 +47,7 @@ export const ContactListFilter = () => {/><ToggleFilterButtonclassName="w-auto md:w-full justify-between h-10 md:h-8"- label={translate("resources.contacts.filters.this_week", {- _: "This week",- })}+ label={translate("resources.contacts.filters.this_week")}value={{"last_seen@gte": startOfWeek(new Date()).toISOString(),"last_seen@lte": undefined,@@ -62,9 +56,7 @@ export const ContactListFilter = () => {/><ToggleFilterButtonclassName="w-auto md:w-full justify-between h-10 md:h-8"- label={translate("resources.contacts.filters.before_this_week", {- _: "Before this week",- })}+ label={translate("resources.contacts.filters.before_this_week")}value={{"last_seen@gte": undefined,"last_seen@lte": startOfWeek(new Date()).toISOString(),@@ -73,9 +65,7 @@ export const ContactListFilter = () => {/><ToggleFilterButtonclassName="w-auto md:w-full justify-between h-10 md:h-8"- label={translate("resources.contacts.filters.before_this_month", {- _: "Before this month",- })}+ label={translate("resources.contacts.filters.before_this_month")}value={{"last_seen@gte": undefined,"last_seen@lte": startOfMonth(new Date()).toISOString(),@@ -84,9 +74,7 @@ export const ContactListFilter = () => {/><ToggleFilterButtonclassName="w-auto md:w-full justify-between h-10 md:h-8"- label={translate("resources.contacts.filters.before_last_month", {- _: "Before last month",- })}+ label={translate("resources.contacts.filters.before_last_month")}value={{"last_seen@gte": undefined,"last_seen@lte": subMonths(@@ -99,7 +87,7 @@ export const ContactListFilter = () => {</FilterCategory><FilterCategory- label={translate("resources.contacts.filters.status", { _: "Status" })}+ label={translate("resources.notes.fields.status")}icon={<TrendingUp />}>{noteStatuses.map((status) => (@@ -118,7 +106,7 @@ export const ContactListFilter = () => {</FilterCategory><FilterCategory- label={translate("resources.contacts.filters.tags", { _: "Tags" })}+ label={translate("resources.tags.name", { smart_count: 2 })}icon={<Tag />}>{data &&@@ -145,16 +133,11 @@ export const ContactListFilter = () => {<FilterCategoryicon={<CheckSquare />}- label={translate("resources.tasks.name", {- smart_count: 2,- _: "Tasks",- })}+ label={translate("resources.tasks.name", { smart_count: 2 })}><ToggleFilterButtonclassName="w-full justify-between h-10 md:h-8"- label={translate("resources.tasks.filters.with_pending", {- _: "With pending tasks",- })}+ label={translate("resources.tasks.filters.with_pending")}value={{ "nb_tasks@gt": 0 }}size={isMobile ? "lg" : undefined}/>@@ -166,7 +149,7 @@ export const ContactListFilter = () => {><ToggleFilterButtonclassName="w-full justify-between h-10 md:h-8"- label={translate("crm.common.me", { _: "Me" })}+ label={translate("crm.common.me")}value={{ sales_id: identity?.id }}size={isMobile ? "lg" : undefined}/>@@ -196,7 +179,7 @@ export const ContactListFilterSummary = () => {<div className="flex flex-wrap items-start mb-4 gap-1"><ActiveFilterButtonclassName="w-auto justify-between h-8"- label={translate("resources.contacts.filters.today", { _: "Today" })}+ label={translate("resources.contacts.filters.today")}value={{"last_seen@gte": endOfYesterday().toISOString(),"last_seen@lte": undefined,@@ -204,9 +187,7 @@ export const ContactListFilterSummary = () => {/><ActiveFilterButtonclassName="w-auto justify-between h-8"- label={translate("resources.contacts.filters.this_week", {- _: "This week",- })}+ label={translate("resources.contacts.filters.this_week")}value={{"last_seen@gte": startOfWeek(new Date()).toISOString(),"last_seen@lte": undefined,@@ -214,9 +195,7 @@ export const ContactListFilterSummary = () => {/><ActiveFilterButtonclassName="w-auto justify-between h-8"- label={translate("resources.contacts.filters.before_this_week", {- _: "Before this week",- })}+ label={translate("resources.contacts.filters.before_this_week")}value={{"last_seen@gte": undefined,"last_seen@lte": startOfWeek(new Date()).toISOString(),@@ -224,9 +203,7 @@ export const ContactListFilterSummary = () => {/><ActiveFilterButtonclassName="w-auto justify-between h-8"- label={translate("resources.contacts.filters.before_this_month", {- _: "Before this month",- })}+ label={translate("resources.contacts.filters.before_this_month")}value={{"last_seen@gte": undefined,"last_seen@lte": startOfMonth(new Date()).toISOString(),@@ -234,9 +211,7 @@ export const ContactListFilterSummary = () => {/><ActiveFilterButtonclassName="w-auto justify-between h-8"- label={translate("resources.contacts.filters.before_last_month", {- _: "Before last month",- })}+ label={translate("resources.contacts.filters.before_last_month")}value={{"last_seen@gte": undefined,"last_seen@lte": subMonths(startOfMonth(new Date()), 1).toISOString(),@@ -278,17 +253,13 @@ export const ContactListFilterSummary = () => {<ActiveFilterButtonclassName="w-auto justify-between h-8"- label={translate("resources.tasks.filters.with_pending", {- _: "With pending tasks",- })}+ label={translate("resources.tasks.filters.with_pending")}value={{ "nb_tasks@gt": 0 }}/><ActiveFilterButtonclassName="w-auto justify-between h-8"- label={translate("resources.contacts.filters.managed_by_me", {- _: "Managed by me",- })}+ label={translate("resources.contacts.filters.managed_by_me")}value={{ sales_id: identity?.id }}/></div>diff --git a/src/components/atomic-crm/contacts/ContactMergeButton.tsx b/src/components/atomic-crm/contacts/ContactMergeButton.tsxindex 235d6f3c..5efa9f85 100644--- a/src/components/atomic-crm/contacts/ContactMergeButton.tsx+++ b/src/components/atomic-crm/contacts/ContactMergeButton.tsx@@ -294,7 +294,7 @@ const ContactMergeDialog = ({ open, onClose }: ContactMergeDialogProps) => {<DialogFooter><Button variant="ghost" onClick={onClose} disabled={isMerging}><CircleX />- {translate("ra.action.cancel", { _: "Cancel" })}+ {translate("ra.action.cancel")}</Button><Button onClick={handleMerge} disabled={!winnerId || isMerging}><Merge />diff --git a/src/components/atomic-crm/contacts/ContactShow.tsx b/src/components/atomic-crm/contacts/ContactShow.tsxindex d31df592..69bb6995 100644--- a/src/components/atomic-crm/contacts/ContactShow.tsx+++ b/src/components/atomic-crm/contacts/ContactShow.tsx@@ -90,9 +90,7 @@ const ContactShowContentMobile = () => {onClick={() => setEditOpen(true)}><Pencil className="size-5" />- <span className="sr-only">- {translate("ra.action.edit", { _: "Edit record" })}- </span>+ <span className="sr-only">{translate("ra.action.edit")}</span></Button></MobileHeader><MobileContent>@@ -107,7 +105,7 @@ const ContactShowContentMobile = () => {{record.title}{record.title &&record.company_id != null &&- ` ${translate("crm.common.at", { _: "at" })} `}+ ` ${translate("crm.common.at")} `}{record.company_id != null && (<ReferenceFieldsource="company_id"@@ -135,10 +133,7 @@ const ContactShowContentMobile = () => {<Tabs defaultValue="notes" className="w-full"><TabsList className="grid w-full grid-cols-3 h-10"><TabsTrigger value="notes">- {translate("resources.notes.name", {- smart_count: 2,- _: "Notes",- })}+ {translate("resources.notes.name", { smart_count: 2 })}</TabsTrigger><TabsTrigger value="tasks"><ReferenceManyCount@@ -146,13 +141,10 @@ const ContactShowContentMobile = () => {reference="tasks"filter={{ "done_date@is": null }}/>{" "}- {translate("resources.tasks.name", {- smart_count: 2,- _: "Tasks",- })}+ {translate("resources.tasks.name", { smart_count: 2 })}</TabsTrigger><TabsTrigger value="details">- {translate("crm.common.details", { _: "Details" })}+ {translate("crm.common.details")}</TabsTrigger></TabsList>@@ -164,13 +156,13 @@ const ContactShowContentMobile = () => {empty={<div className="flex flex-col items-center justify-center py-8 text-center"><p className="text-muted-foreground mb-4">- {translate("resources.notes.empty", { _: "No notes yet" })}+ {translate("resources.notes.empty")}</p><Buttonvariant="outline"onClick={() => setNoteCreateOpen(true)}>- {translate("resources.notes.action.add", { _: "Add note" })}+ {translate("resources.notes.action.add")}</Button></div>}@@ -198,9 +190,9 @@ const ContactShowContentMobile = () => {<div className="space-y-6"><div><h3 className="text-lg font-semibold">- {translate("resources.contacts.inputs.personal_info", {- _: "Personal info",- })}+ {translate(+ "resources.contacts.field_categories.personal_info",+ )}</h3><Separator /><div className="mt-3">@@ -210,10 +202,7 @@ const ContactShowContentMobile = () => {<div><h3 className="text-lg font-semibold">{translate(- "resources.contacts.inputs.background_info_short",- {- _: "Background info",- },+ "resources.contacts.field_categories.background_info",)}</h3><Separator />@@ -223,10 +212,7 @@ const ContactShowContentMobile = () => {</div><div><h3 className="text-lg font-semibold">- {translate("resources.tags.name", {- smart_count: 2,- _: "Tags",- })}+ {translate("resources.tags.name", { smart_count: 2 })}</h3><Separator /><div className="mt-3">@@ -261,7 +247,7 @@ const ContactShowContent = () => {{record.title}{record.title &&record.company_id != null &&- ` ${translate("crm.common.at", { _: "at" })} `}+ ` ${translate("crm.common.at")} `}{record.company_id != null && (<ReferenceFieldsource="company_id"diff --git a/src/components/atomic-crm/contacts/ContactTasksList.tsx b/src/components/atomic-crm/contacts/ContactTasksList.tsxindex 09387a19..5d3915db 100644--- a/src/components/atomic-crm/contacts/ContactTasksList.tsx+++ b/src/components/atomic-crm/contacts/ContactTasksList.tsx@@ -26,10 +26,10 @@ export const ContactTasksList = () => {/><div className="flex flex-col items-center justify-center py-8 text-center"><p className="text-muted-foreground mb-4">- {translate("resources.tasks.empty", { _: "No tasks yet" })}+ {translate("resources.tasks.empty")}</p><Button variant="outline" onClick={() => setTaskCreateOpen(true)}>- {translate("resources.tasks.action.add", { _: "Add task" })}+ {translate("resources.tasks.action.add")}</Button></div></>diff --git a/src/components/atomic-crm/contacts/TagsListEdit.tsx b/src/components/atomic-crm/contacts/TagsListEdit.tsxindex 6c8833c8..0e8b4817 100644--- a/src/components/atomic-crm/contacts/TagsListEdit.tsx+++ b/src/components/atomic-crm/contacts/TagsListEdit.tsx@@ -119,7 +119,7 @@ export const TagsListEdit = () => {className="h-9 md:h-6 cursor-pointer"><Plus className="w-4 h-4 md:w-3 md:h-3 mr-1" />- {translate("resources.tags.action.add", { _: "Add tag" })}+ {translate("resources.tags.action.add")}</Button></DropdownMenuTrigger><DropdownMenuContent>diff --git a/src/components/atomic-crm/dashboard/DealsChart.tsx b/src/components/atomic-crm/dashboard/DealsChart.tsxindex b03355b5..22977cef 100644--- a/src/components/atomic-crm/dashboard/DealsChart.tsx+++ b/src/components/atomic-crm/dashboard/DealsChart.tsx@@ -180,7 +180,7 @@ export const DealsChart = memo(() => {value: 0,lineStyle: { strokeOpacity: 0 },textStyle: { fill: "#2ebca6" },- legend: translate("resources.deals.stage.won", { _: "Won" }),+ legend: translate("resources.deals.stage.won"),legendPosition: "top-left",legendOrientation: "vertical",},@@ -192,7 +192,7 @@ export const DealsChart = memo(() => {strokeWidth: 1,},textStyle: { fill: "#e25c3b" },- legend: translate("resources.deals.stage.lost", { _: "Lost" }),+ legend: translate("resources.deals.stage.lost"),legendPosition: "bottom-left",legendOrientation: "vertical",},diff --git a/src/components/atomic-crm/dashboard/DealsPipeline.tsx b/src/components/atomic-crm/dashboard/DealsPipeline.tsxindex 5fb80bb3..14fd1541 100644--- a/src/components/atomic-crm/dashboard/DealsPipeline.tsx+++ b/src/components/atomic-crm/dashboard/DealsPipeline.tsx@@ -53,7 +53,7 @@ export const DealsPipeline = () => {className="text-xl font-semibold text-muted-foreground hover:underline"to="/deals">- {translate("crm.dashboard.deals_pipeline", { _: "Deals Pipeline" })}+ {translate("crm.dashboard.deals_pipeline")}</Link></div><Card>diff --git a/src/components/atomic-crm/dashboard/HotContacts.tsx b/src/components/atomic-crm/dashboard/HotContacts.tsxindex 61dc7b01..adb31950 100644--- a/src/components/atomic-crm/dashboard/HotContacts.tsx+++ b/src/components/atomic-crm/dashboard/HotContacts.tsx@@ -38,7 +38,7 @@ export const HotContacts = () => {<Users className="text-muted-foreground w-6 h-6" /></div><h2 className="text-xl font-semibold text-muted-foreground">- {translate("resources.contacts.hot.title", { _: "Hot Contacts" })}+ {translate("resources.contacts.hot.title")}</h2><TooltipProvider><Tooltip>@@ -75,7 +75,7 @@ export const HotContacts = () => {}secondaryText={(contact) => (<>- {contact.title} {translate("crm.common.at", { _: "at" })}{" "}+ {contact.title} {translate("crm.common.at")}{" "}{contact.company_name}</>)}diff --git a/src/components/atomic-crm/dashboard/LatestNotes.tsx b/src/components/atomic-crm/dashboard/LatestNotes.tsxindex 4ec66412..d1993b92 100644--- a/src/components/atomic-crm/dashboard/LatestNotes.tsx+++ b/src/components/atomic-crm/dashboard/LatestNotes.tsx@@ -54,7 +54,7 @@ export const LatestNotes = () => {<FileText className="text-muted-foreground w-6 h-6" /></div><h2 className="text-xl font-semibold text-muted-foreground">- {translate("crm.dashboard.latest_notes", { _: "My Latest Notes" })}+ {translate("crm.dashboard.latest_notes")}</h2></div><Card>@@ -66,14 +66,14 @@ export const LatestNotes = () => {className="mb-8"><div className="text-sm text-muted-foreground">- {translate("crm.common.on", { _: "on" })}{" "}+ {translate("crm.common.on")}{" "}{note.type === "dealNote" ? (<Deal note={note} />) : (<Contact note={note} />)}{", "}- {translate("crm.common.added", { _: "added" })}{" "}+ {translate("crm.common.added")}{" "}{formatDistance(note.date, new Date(), {addSuffix: true,})}@@ -95,7 +95,7 @@ const Deal = ({ note }: any) => {const translate = useTranslate();return (<>- {translate("resources.deals.forcedCaseName", { _: "Deal" })}{" "}+ {translate("resources.deals.forcedCaseName")}{" "}<ReferenceFieldrecord={note}source="deal_id"@@ -112,7 +112,7 @@ const Contact = ({ note }: any) => {const translate = useTranslate();return (<>- {translate("resources.contacts.forcedCaseName", { _: "Contact" })}{" "}+ {translate("resources.contacts.forcedCaseName")}{" "}<ReferenceField<ContactNote, Contact>record={note}source="contact_id"diff --git a/src/components/atomic-crm/deals/ContactList.tsx b/src/components/atomic-crm/deals/ContactList.tsxindex 6168f323..be994a6a 100644--- a/src/components/atomic-crm/deals/ContactList.tsx+++ b/src/components/atomic-crm/deals/ContactList.tsx@@ -23,7 +23,7 @@ export const ContactList = () => {{contact.title}{contact.title &&contact.company_name &&- ` ${translate("crm.common.at", { _: "at" })} `}+ ` ${translate("crm.common.at")} `}{contact.company_name}</span></div>diff --git a/src/components/atomic-crm/deals/DealEmpty.tsx b/src/components/atomic-crm/deals/DealEmpty.tsxindex 4b357809..69dcd72b 100644--- a/src/components/atomic-crm/deals/DealEmpty.tsx+++ b/src/components/atomic-crm/deals/DealEmpty.tsx@@ -33,20 +33,16 @@ export const DealEmpty = ({ children }: { children?: ReactNode }) => {><imgsrc="./img/empty.svg"- alt={translate("resources.deals.empty.title", { _: "No deals found" })}+ alt={translate("resources.deals.empty.title")}/>{contacts && contacts.length > 0 ? (<><div className="flex flex-col items-center gap-0"><h3 className="text-lg font-bold">- {translate("resources.deals.empty.title", {- _: "No deals found",- })}+ {translate("resources.deals.empty.title")}</h3><p className="text-sm text-center text-muted-foreground mb-4">- {translate("resources.deals.empty.description", {- _: "It seems your deal list is empty.",- })}+ {translate("resources.deals.empty.description")}</p></div><div className="flex space-x-8">@@ -58,21 +54,15 @@ export const DealEmpty = ({ children }: { children?: ReactNode }) => {) : (<div className="flex flex-col items-center gap-0"><h3 className="text-lg font-bold">- {translate("resources.deals.empty.title", { _: "No deals found" })}+ {translate("resources.deals.empty.title")}</h3><p className="text-sm text-center text-muted-foreground mb-4">- {translate("resources.contacts.empty.description", {- _: "It seems your contact list is empty.",- })}+ {translate("resources.contacts.empty.description")}<br /><Link to="/contacts/create" className="hover:underline">- {translate("resources.contacts.action.add_first", {- _: "Add your first contact",- })}+ {translate("resources.contacts.action.add_first")}</Link>{" "}- {translate("resources.deals.empty.before_create", {- _: "before creating a deal.",- })}+ {translate("resources.deals.empty.before_create")}</p></div>)}diff --git a/src/components/atomic-crm/deals/DealInputs.tsx b/src/components/atomic-crm/deals/DealInputs.tsxindex 0c25ee71..76f6045d 100644--- a/src/components/atomic-crm/deals/DealInputs.tsx+++ b/src/components/atomic-crm/deals/DealInputs.tsx@@ -42,7 +42,7 @@ const DealLinkedToInputs = () => {return (<div className="flex flex-col gap-4 flex-1"><h3 className="text-base font-medium">- {translate("resources.deals.inputs.linked_to", { _: "Linked to" })}+ {translate("resources.deals.inputs.linked_to")}</h3><ReferenceInput source="company_id" reference="companies"><AutocompleteCompanyInput@@ -67,9 +67,7 @@ const DealMiscInputs = () => {const translate = useTranslate();return (<div className="flex flex-col gap-4 flex-1">- <h3 className="text-base font-medium">- {translate("crm.common.misc", { _: "Misc" })}- </h3>+ <h3 className="text-base font-medium">{translate("crm.common.misc")}</h3><SelectInputsource="category"diff --git a/src/components/atomic-crm/deals/DealList.tsx b/src/components/atomic-crm/deals/DealList.tsxindex b74c0823..4db09e5f 100644--- a/src/components/atomic-crm/deals/DealList.tsx+++ b/src/components/atomic-crm/deals/DealList.tsx@@ -32,23 +32,14 @@ const DealList = () => {<ReferenceInput source="company_id" reference="companies"><AutocompleteInputlabel={false}- placeholder={translate("resources.deals.filters.company", {- _: "Company",- })}+ placeholder={translate("resources.deals.fields.company_id")}/></ReferenceInput>,- <WrapperField- source="category"- label={translate("resources.deals.fields.category", {- _: "Category",- })}- >+ <WrapperField source="category" label="resources.deals.fields.category"><SelectInputsource="category"label={false}- emptyText={translate("resources.deals.fields.category", {- _: "Category",- })}+ emptyText="resources.deals.fields.category"choices={dealCategories}optionText="label"optionValue="value"diff --git a/src/components/atomic-crm/deals/DealShow.tsx b/src/components/atomic-crm/deals/DealShow.tsxindex 13ea5c3a..34232e04 100644--- a/src/components/atomic-crm/deals/DealShow.tsx+++ b/src/components/atomic-crm/deals/DealShow.tsx@@ -89,21 +89,17 @@ const DealShowContent = () => {<div className="flex gap-8 m-4"><div className="flex flex-col mr-10"><span className="text-xs text-muted-foreground tracking-wide">- {translate("resources.deals.fields.expected_closing_date", {- _: "Expected closing date",- })}+ {translate("resources.deals.fields.expected_closing_date")}</span><div className="flex items-center gap-2"><span className="text-sm">{isValid(new Date(record.expected_closing_date))? formatISODateString(record.expected_closing_date)- : translate("crm.common.invalid_date", {- _: "Invalid date",- })}+ : translate("crm.common.invalid_date")}</span>{new Date(record.expected_closing_date) < new Date() ? (<Badge variant="destructive">- {translate("crm.common.past", { _: "Past" })}+ {translate("crm.common.past")}</Badge>) : null}</div>@@ -111,7 +107,7 @@ const DealShowContent = () => {<div className="flex flex-col mr-10"><span className="text-xs text-muted-foreground tracking-wide">- {translate("resources.deals.fields.amount", { _: "Budget" })}+ {translate("resources.deals.fields.amount")}</span><span className="text-sm">{record.amount.toLocaleString("en-US", {@@ -127,9 +123,7 @@ const DealShowContent = () => {{record.category && (<div className="flex flex-col mr-10"><span className="text-xs text-muted-foreground tracking-wide">- {translate("resources.deals.fields.category", {- _: "Category",- })}+ {translate("resources.deals.fields.category")}</span><span className="text-sm">{dealCategories.find((c) => c.value === record.category)@@ -140,7 +134,7 @@ const DealShowContent = () => {<div className="flex flex-col mr-10"><span className="text-xs text-muted-foreground tracking-wide">- {translate("resources.deals.fields.stage", { _: "Stage" })}+ {translate("resources.deals.fields.stage")}</span><span className="text-sm">{findDealLabel(dealStages, record.stage, translate)}@@ -152,10 +146,7 @@ const DealShowContent = () => {<div className="m-4"><div className="flex flex-col min-h-12 mr-10"><span className="text-xs text-muted-foreground tracking-wide">- {translate("resources.deals.fields.contact_ids", {- smart_count: 2,- _: "Contacts",- })}+ {translate("resources.deals.fields.contact_ids")}</span><ReferenceArrayFieldsource="contact_ids"@@ -170,9 +161,7 @@ const DealShowContent = () => {{record.description && (<div className="m-4 whitespace-pre-line"><span className="text-xs text-muted-foreground tracking-wide">- {translate("resources.deals.fields.description", {- _: "Description",- })}+ {translate("resources.deals.fields.description")}</span><p className="text-sm leading-6">{record.description}</p></div>@@ -200,7 +189,7 @@ const ArchivedTitle = () => {return (<div className="bg-orange-500 px-6 py-4"><h3 className="text-lg font-bold text-white">- {translate("resources.deals.archived.title", { _: "Archived Deal" })}+ {translate("resources.deals.archived.title")}</h3></div>);@@ -248,7 +237,7 @@ const ArchiveButton = ({ record }: { record: Deal }) => {className="flex items-center gap-2 h-9"><Archive className="w-4 h-4" />- {translate("resources.deals.archived.action", { _: "Archive" })}+ {translate("resources.deals.archived.action")}</Button>);};@@ -291,9 +280,7 @@ const UnarchiveButton = ({ record }: { record: Deal }) => {className="flex items-center gap-2 h-9"><ArchiveRestore className="w-4 h-4" />- {translate("resources.deals.unarchived.action", {- _: "Send back to the board",- })}+ {translate("resources.deals.unarchived.action")}</Button>);};diff --git a/src/components/atomic-crm/layout/Header.tsx b/src/components/atomic-crm/layout/Header.tsxindex d551cc6d..0ccdff9e 100644--- a/src/components/atomic-crm/layout/Header.tsx+++ b/src/components/atomic-crm/layout/Header.tsx@@ -52,14 +52,13 @@ const Header = () => {<div><nav className="flex"><NavigationTab- label={translate("ra.page.dashboard", { _: "Dashboard" })}+ label={translate("ra.page.dashboard")}to="/"isActive={currentPath === "/"}/><NavigationTablabel={translate("resources.contacts.name", {smart_count: 2,- _: "Contacts",})}to="/contacts"isActive={currentPath === "/contacts"}@@ -67,7 +66,6 @@ const Header = () => {<NavigationTablabel={translate("resources.companies.name", {smart_count: 2,- _: "Companies",})}to="/companies"isActive={currentPath === "/companies"}@@ -75,7 +73,6 @@ const Header = () => {<NavigationTablabel={translate("resources.deals.name", {smart_count: 2,- _: "Deals",})}to="/deals"isActive={currentPath === "/deals"}@@ -135,7 +132,7 @@ const UsersMenu = () => {<DropdownMenuItem asChild onClick={userMenuContext.onClose}><Link to="/sales" className="flex items-center gap-2"><Users />- {translate("resources.sales.name", { smart_count: 2, _: "Users" })}+ {translate("resources.sales.name", { smart_count: 2 })}</Link></DropdownMenuItem>);@@ -151,7 +148,7 @@ const ProfileMenu = () => {<DropdownMenuItem asChild onClick={userMenuContext.onClose}><Link to="/profile" className="flex items-center gap-2"><User />- {translate("crm.profile.title", { _: "Profile" })}+ {translate("crm.profile.title")}</Link></DropdownMenuItem>);@@ -167,7 +164,7 @@ const SettingsMenu = () => {<DropdownMenuItem asChild onClick={userMenuContext.onClose}><Link to="/settings" className="flex items-center gap-2"><Settings />- {translate("crm.settings.title", { _: "Settings" })}+ {translate("crm.settings.title")}</Link></DropdownMenuItem>);@@ -183,7 +180,7 @@ const ImportFromJsonMenuItem = () => {<DropdownMenuItem asChild onClick={userMenuContext.onClose}><Link to={ImportPage.path} className="flex items-center gap-2"><Import />- {translate("crm.header.import_data", { _: "Import data" })}+ {translate("crm.header.import_data")}</Link></DropdownMenuItem>);diff --git a/src/components/atomic-crm/layout/MobileNavigation.tsx b/src/components/atomic-crm/layout/MobileNavigation.tsxindex 0c3c59fe..d683705b 100644--- a/src/components/atomic-crm/layout/MobileNavigation.tsx+++ b/src/components/atomic-crm/layout/MobileNavigation.tsx@@ -70,7 +70,7 @@ export const MobileNavigation = () => {return (<nav- aria-label={translate("crm.navigation.label", { _: "CRM navigation" })}+ aria-label={translate("crm.navigation.label")}className="fixed bottom-0 left-0 right-0 z-50 bg-secondary h-14"style={{// iOS bug: even though viewport is set correctly, the bottom safe area inset is not accounted for@@ -87,7 +87,7 @@ export const MobileNavigation = () => {<NavigationButtonhref="/"Icon={Home}- label={translate("ra.page.dashboard", { _: "Home" })}+ label={translate("ra.page.dashboard")}isActive={currentPath === "/"}/><NavigationButton@@ -95,7 +95,6 @@ export const MobileNavigation = () => {Icon={Users}label={translate("resources.contacts.name", {smart_count: 2,- _: "Contacts",})}isActive={currentPath === "/contacts"}/>@@ -103,10 +102,7 @@ export const MobileNavigation = () => {<NavigationButtonhref="/tasks"Icon={ListTodo}- label={translate("resources.tasks.name", {- smart_count: 2,- _: "Tasks",- })}+ label={translate("resources.tasks.name", { smart_count: 2 })}isActive={currentPath === "/tasks"}/><SettingsButton />@@ -171,7 +167,7 @@ const CreateButton = () => {variant="default"size="icon"className="h-16 w-16 rounded-full -mt-3"- aria-label={translate("ra.action.create", { _: "Create" })}+ aria-label={translate("ra.action.create")}><Plus className="size-10" /></Button>@@ -183,7 +179,7 @@ const CreateButton = () => {setContactCreateOpen(true);}}>- {translate("resources.contacts.forcedCaseName", { _: "Contact" })}+ {translate("resources.contacts.forcedCaseName")}</DropdownMenuItem><DropdownMenuItemclassName="h-12 px-4 text-base"@@ -191,7 +187,7 @@ const CreateButton = () => {setNoteCreateOpen(true);}}>- {translate("resources.notes.forcedCaseName", { _: "Note" })}+ {translate("resources.notes.forcedCaseName")}</DropdownMenuItem><DropdownMenuItemclassName="h-12 px-4 text-base"@@ -199,7 +195,7 @@ const CreateButton = () => {setTaskCreateOpen(true);}}>- {translate("resources.tasks.forcedCaseName", { _: "Task" })}+ {translate("resources.tasks.forcedCaseName")}</DropdownMenuItem></DropdownMenuContent></DropdownMenu>@@ -219,7 +215,7 @@ const LanguageMenu = () => {return (<div className="px-3 py-2"><p className="text-xs text-muted-foreground mb-1">- {translate("crm.language", { _: "Language" })}+ {translate("crm.language")}</p><Select value={locale} onValueChange={setLocale}><SelectTrigger className="w-full">@@ -252,7 +248,7 @@ const SettingsButton = () => {><Settings className="size-6" /><span className="text-[0.6rem] font-medium">- {translate("crm.settings.title", { _: "Settings" })}+ {translate("crm.settings.title")}</span></Button></DropdownMenuTrigger>@@ -271,7 +267,7 @@ const SettingsButton = () => {><Link to="/profile" className="flex items-center gap-2"><User />- {translate("crm.profile.title", { _: "Profile" })}+ {translate("crm.profile.title")}</Link></DropdownMenuItem><DropdownMenuSeparator />@@ -307,33 +303,27 @@ const ThemeMenu = () => {><ToggleGroupItemvalue="system"- aria-label={translate("crm.theme.system", { _: "System theme" })}+ aria-label={translate("crm.theme.system")}className="px-3"><Smartphone className="size-5 mx-2" />- <span className="sr-only">- {translate("crm.theme.system_short", { _: "System" })}- </span>+ <span className="sr-only">{translate("crm.theme.system_short")}</span></ToggleGroupItem><ToggleGroupItemvalue="light"- aria-label={translate("crm.theme.light", { _: "Light theme" })}+ aria-label={translate("crm.theme.light")}className="px-3"><Sun className="size-5 mx-2" />- <span className="sr-only">- {translate("crm.theme.light_short", { _: "Light" })}- </span>+ <span className="sr-only">{translate("crm.theme.light_short")}</span></ToggleGroupItem><ToggleGroupItemvalue="dark"- aria-label={translate("crm.theme.dark", { _: "Dark theme" })}+ aria-label={translate("crm.theme.dark")}className="px-3"><Moon className="size-5 mx-2" />- <span className="sr-only">- {translate("crm.theme.dark_short", { _: "Dark" })}- </span>+ <span className="sr-only">{translate("crm.theme.dark_short")}</span></ToggleGroupItem></ToggleGroup></div>diff --git a/src/components/atomic-crm/login/LoginPage.tsx b/src/components/atomic-crm/login/LoginPage.tsxindex ed55a9af..cdbec9e2 100644--- a/src/components/atomic-crm/login/LoginPage.tsx+++ b/src/components/atomic-crm/login/LoginPage.tsx@@ -103,7 +103,7 @@ export const LoginPage = (props: { redirectTo?: string }) => {<div className="w-full space-y-6 lg:mx-auto lg:w-[350px]"><div className="text-center"><h1 className="text-2xl font-semibold tracking-tight">- {translate("ra.auth.sign_in", { _: "Sign in" })}+ {translate("ra.auth.sign_in")}</h1></div>{disableEmailPasswordAuthentication ? null : (@@ -126,7 +126,7 @@ export const LoginPage = (props: { redirectTo?: string }) => {className="cursor-pointer"disabled={loading}>- {translate("ra.auth.sign_in", { _: "Sign in" })}+ {translate("ra.auth.sign_in")}</Button></div></Form>diff --git a/src/components/atomic-crm/login/SignupPage.tsx b/src/components/atomic-crm/login/SignupPage.tsxindex a4c880be..7bd66ddb 100644--- a/src/components/atomic-crm/login/SignupPage.tsx+++ b/src/components/atomic-crm/login/SignupPage.tsx@@ -124,7 +124,7 @@ export const SignupPage = () => {<form onSubmit={handleSubmit(onSubmit)} className="space-y-4"><div className="flex flex-col gap-2"><Label htmlFor="first_name">- {translate("ra.auth.first_name", { _: "First name" })}+ {translate("ra.auth.first_name")}</Label><Input{...register("first_name", { required: true })}@@ -135,7 +135,7 @@ export const SignupPage = () => {</div><div className="flex flex-col gap-2"><Label htmlFor="last_name">- {translate("ra.auth.last_name", { _: "Last name" })}+ {translate("ra.auth.last_name")}</Label><Input{...register("last_name", { required: true })}@@ -145,9 +145,7 @@ export const SignupPage = () => {/></div><div className="flex flex-col gap-2">- <Label htmlFor="email">- {translate("ra.auth.email", { _: "Email" })}- </Label>+ <Label htmlFor="email">{translate("ra.auth.email")}</Label><Input{...register("email", { required: true })}id="email"@@ -156,9 +154,7 @@ export const SignupPage = () => {/></div><div className="flex flex-col gap-2">- <Label htmlFor="password">- {translate("ra.auth.password", { _: "Password" })}- </Label>+ <Label htmlFor="password">{translate("ra.auth.password")}</Label><Input{...register("password", { required: true })}id="password"diff --git a/src/components/atomic-crm/misc/ContactOption.tsx b/src/components/atomic-crm/misc/ContactOption.tsxindex 3129f705..38f2a3d8 100644--- a/src/components/atomic-crm/misc/ContactOption.tsx+++ b/src/components/atomic-crm/misc/ContactOption.tsx@@ -19,7 +19,7 @@ const ContactOptionRender = () => {{record.title}{record.title &&record.company_name &&- ` ${translate("crm.common.at", { _: "at" })} `}+ ` ${translate("crm.common.at")} `}{record.company_name}</span></div>diff --git a/src/components/atomic-crm/misc/CreateSheet.tsx b/src/components/atomic-crm/misc/CreateSheet.tsxindex f63069c0..131dde73 100644--- a/src/components/atomic-crm/misc/CreateSheet.tsx+++ b/src/components/atomic-crm/misc/CreateSheet.tsx@@ -147,7 +147,7 @@ export const CreateSheet = ({<div className="flex w-full gap-4"><SheetClose asChild><Button variant="ghost" className="flex-1">- {translate("ra.action.close", { _: "Close" })}+ {translate("ra.action.close")}</Button></SheetClose><SaveButton className="flex-1" />diff --git a/src/components/atomic-crm/misc/ImageEditorField.tsx b/src/components/atomic-crm/misc/ImageEditorField.tsxindex 85ae6939..14cf58d3 100644--- a/src/components/atomic-crm/misc/ImageEditorField.tsx+++ b/src/components/atomic-crm/misc/ImageEditorField.tsx@@ -74,7 +74,7 @@ const ImageEditorField = (props: ImageEditorFieldProps) => {onClick={() => setIsDialogOpen(true)}className="text-xs underline hover:no-underline cursor-pointer text-center">- {translate("crm.image_editor.change", { _: "Change" })}+ {translate("crm.image_editor.change")}</button>)}</div>@@ -187,10 +187,10 @@ const ImageEditorDialog = (props: ImageEditorDialogProps) => {<DialogFooter className="flex justify-between w-full"><Button type="button" onClick={updateImage}>- {translate("crm.image_editor.update_image", { _: "Update Image" })}+ {translate("crm.image_editor.update_image")}</Button><Button type="button" variant="destructive" onClick={deleteImage}>- {translate("ra.action.delete", { _: "Delete" })}+ {translate("ra.action.delete")}</Button></DialogFooter></DialogContent>diff --git a/src/components/atomic-crm/misc/ImportPage.tsx b/src/components/atomic-crm/misc/ImportPage.tsxindex 2dbf8cf3..aebfcb22 100644--- a/src/components/atomic-crm/misc/ImportPage.tsx+++ b/src/components/atomic-crm/misc/ImportPage.tsx@@ -32,9 +32,7 @@ export const ImportPage = () => {<div className="max-w-2xl mx-auto mt-8"><Card><CardHeader>- <CardTitle>- {translate("crm.import.title", { _: "Import Data" })}- </CardTitle>+ <CardTitle>{translate("crm.import.title")}</CardTitle></CardHeader><CardContent>{importState.status === "idle" ? (@@ -137,9 +135,7 @@ const ImportFromJsonForm = ({<FileField source="src" title="title" /></FileInput><div className="flex justify-end mt-4">- <Button type="submit">- {translate("crm.import.action.import", { _: "Import" })}- </Button>+ <Button type="submit">{translate("crm.import.action.import")}</Button></div></Form>);@@ -173,7 +169,7 @@ const ImportFromJsonSuccess = ({}) => (<><p className="mb-4 text-sm">- {translate("crm.import.status.complete", { _: "Import complete." })}{" "}+ {translate("crm.import.status.complete")}{" "}{hasFailedImports(importState.failedImports) ? (<><span className="text-destructive">@@ -277,16 +273,16 @@ const ImportStats = ({return (<Table><TableCaption className="sr-only">- {translate("crm.import.status.table_caption", { _: "Import status" })}+ {translate("crm.import.status.table_caption")}</TableCaption><TableHeader><TableRow><TableHead className="w-25"></TableHead><TableHead className="text-right">- {translate("crm.import.status.imported", { _: "Imported" })}+ {translate("crm.import.status.imported")}</TableHead><TableHead className="text-right">- {translate("crm.import.status.failed", { _: "Failed" })}+ {translate("crm.import.status.failed")}</TableHead></TableRow></TableHeader>diff --git a/src/components/atomic-crm/misc/InfinitePagination.tsx b/src/components/atomic-crm/misc/InfinitePagination.tsxindex a67df0ed..c0b70080 100644--- a/src/components/atomic-crm/misc/InfinitePagination.tsx+++ b/src/components/atomic-crm/misc/InfinitePagination.tsx@@ -95,7 +95,7 @@ export const InfinitePagination = ({</ItemMedia><ItemContent><ItemTitle className="line-clamp-1">- {translate("crm.common.loading", { _: "Loading..." })}+ {translate("crm.common.loading")}</ItemTitle></ItemContent></Item>diff --git a/src/components/atomic-crm/misc/ResponsiveFilters.tsx b/src/components/atomic-crm/misc/ResponsiveFilters.tsxindex 766c7503..4971be23 100644--- a/src/components/atomic-crm/misc/ResponsiveFilters.tsx+++ b/src/components/atomic-crm/misc/ResponsiveFilters.tsx@@ -62,7 +62,7 @@ export const ResponsiveFilters = ({variant="ghost"size="icon"className="relative size-9"- aria-label={translate("ra.action.add_filter", { _: "Filter" })}+ aria-label={translate("ra.action.add_filter")}><Filter className="size-5" />{activeFiltersCount > 0 && (@@ -79,7 +79,7 @@ export const ResponsiveFilters = ({<SheetHeader className="-p-4"><SheetTitle><h1 className="text-xl font-semibold">- {translate("ra.action.add_filter", { _: "Filters" })}+ {translate("ra.action.add_filter")}</h1></SheetTitle></SheetHeader>@@ -103,7 +103,7 @@ export const ResponsiveFilters = ({</SheetClose><SheetClose asChild><Button className="flex-1">- {translate("ra.action.confirm", { _: "Apply" })}+ {translate("ra.action.confirm")}</Button></SheetClose></div>diff --git a/src/components/atomic-crm/notes/Note.tsx b/src/components/atomic-crm/notes/Note.tsxindex aa66e909..5b1eb9e3 100644--- a/src/components/atomic-crm/notes/Note.tsx+++ b/src/components/atomic-crm/notes/Note.tsx@@ -135,9 +135,7 @@ export const Note = ({</Button></TooltipTrigger><TooltipContent>- <p>- {translate("resources.notes.action.edit", { _: "Edit note" })}- </p>+ <p>{translate("resources.notes.action.edit")}</p></TooltipContent></Tooltip></TooltipProvider>@@ -154,11 +152,7 @@ export const Note = ({</Button></TooltipTrigger><TooltipContent>- <p>- {translate("resources.notes.action.delete", {- _: "Delete note",- })}- </p>+ <p>{translate("resources.notes.action.delete")}</p></TooltipContent></Tooltip></TooltipProvider>@@ -179,7 +173,7 @@ export const Note = ({className="cursor-pointer"><CircleX className="w-4 h-4" />- {translate("ra.action.cancel", { _: "Cancel" })}+ {translate("ra.action.cancel")}</Button><Buttontype="submit"@@ -187,7 +181,7 @@ export const Note = ({className="flex items-center gap-2 cursor-pointer"><Save className="w-4 h-4" />- {translate("resources.notes.action.update", { _: "Update note" })}+ {translate("resources.notes.action.update")}</Button></div></Form>@@ -215,8 +209,8 @@ export const Note = ({className="text-primary text-sm mt-1 underline hover:no-underline cursor-pointer">{isExpanded- ? translate("crm.common.show_less", { _: "Show less" })- : translate("crm.common.read_more", { _: "Read more" })}+ ? translate("crm.common.show_less")+ : translate("crm.common.read_more")}</button>)}diff --git a/src/components/atomic-crm/notes/NoteCreate.tsx b/src/components/atomic-crm/notes/NoteCreate.tsxindex f1b79cfd..6317a90f 100644--- a/src/components/atomic-crm/notes/NoteCreate.tsx+++ b/src/components/atomic-crm/notes/NoteCreate.tsx@@ -113,7 +113,7 @@ const NoteCreateButton = ({onSuccess: handleSuccess,}}>- {translate("resources.notes.action.add_this", { _: "Add this note" })}+ {translate("resources.notes.action.add_this")}</SaveButton></div>);diff --git a/src/components/atomic-crm/notes/NoteCreateSheet.tsx b/src/components/atomic-crm/notes/NoteCreateSheet.tsxindex 78b90a9a..6e861feb 100644--- a/src/components/atomic-crm/notes/NoteCreateSheet.tsx+++ b/src/components/atomic-crm/notes/NoteCreateSheet.tsx@@ -68,10 +68,8 @@ export const NoteCreateSheet = ({title={<h1 className="text-xl font-semibold truncate pr-10">{!selectContact- ? translate("resources.notes.sheet.create_for", {- _: "Create note for",- })- : translate("resources.notes.sheet.create", { _: "Create note" })}+ ? translate("resources.notes.sheet.create_for")+ : translate("resources.notes.sheet.create")}{!selectContact && (<>{" "}diff --git a/src/components/atomic-crm/notes/NoteEditSheet.tsx b/src/components/atomic-crm/notes/NoteEditSheet.tsxindex 203f2049..b87b7998 100644--- a/src/components/atomic-crm/notes/NoteEditSheet.tsx+++ b/src/components/atomic-crm/notes/NoteEditSheet.tsx@@ -43,16 +43,14 @@ export const NoteEditSheet = ({<h1 className="text-xl font-semibold truncate pr-10">{referenceRecord ? (<>- {translate("resources.notes.sheet.edit_for", {- _: "Edit note for",- })}{" "}+ {translate("resources.notes.sheet.edit_for")}{" "}<RecordRepresentationrecord={referenceRecord}resource="contacts"/></>) : (- translate("resources.notes.sheet.edit", { _: "Edit note" })+ translate("resources.notes.sheet.edit"))}</h1>)}diff --git a/src/components/atomic-crm/notes/NoteInputs.tsx b/src/components/atomic-crm/notes/NoteInputs.tsxindex b3093614..6443b480 100644--- a/src/components/atomic-crm/notes/NoteInputs.tsx+++ b/src/components/atomic-crm/notes/NoteInputs.tsx@@ -42,9 +42,7 @@ export const NoteInputs = ({label={false}multilinehelperText={false}- placeholder={translate("resources.notes.inputs.add_note", {- _: "Add a note",- })}+ placeholder={translate("resources.notes.inputs.add_note")}rows={6}/>@@ -80,14 +78,10 @@ export const NoteInputs = ({}}className="text-sm text-muted-foreground underline hover:no-underline p-0 h-auto cursor-pointer">- {translate("resources.notes.inputs.show_options", {- _: "Show options",- })}+ {translate("resources.notes.inputs.show_options")}</Button><span className="text-sm text-muted-foreground">- {translate("resources.notes.inputs.options_hint", {- _: "(attach files, or change details)",- })}+ {translate("resources.notes.inputs.options_hint")}</span></div>)}diff --git a/src/components/atomic-crm/notes/NoteShowPage.tsx b/src/components/atomic-crm/notes/NoteShowPage.tsxindex a5e47d38..1efffac2 100644--- a/src/components/atomic-crm/notes/NoteShowPage.tsx+++ b/src/components/atomic-crm/notes/NoteShowPage.tsx@@ -52,7 +52,7 @@ export const NoteShowPage = () => {<div className="flex flex-1 min-w-0"><Link to={`/contacts/${contactId}/show`} className="flex-1 min-w-0"><h1 className="truncate text-xl font-semibold">- {translate("resources.notes.note_for", { _: "Note for" })}{" "}+ {translate("resources.notes.note_for")}{" "}<ReferenceFieldrecord={note}resource="contact_notes"@@ -74,7 +74,7 @@ export const NoteShowPage = () => {><Pencil className="size-5" /><span className="sr-only">- {translate("resources.notes.action.edit", { _: "Edit note" })}+ {translate("resources.notes.action.edit")}</span></Button></MobileHeader>diff --git a/src/components/atomic-crm/notes/NotesIteratorMobile.tsx b/src/components/atomic-crm/notes/NotesIteratorMobile.tsxindex 2ee9da12..937d55f6 100644--- a/src/components/atomic-crm/notes/NotesIteratorMobile.tsx+++ b/src/components/atomic-crm/notes/NotesIteratorMobile.tsx@@ -62,7 +62,7 @@ export const NotesIteratorMobile = ({}}><RotateCcw />- {translate("crm.common.retry", { _: "Retry" })}+ {translate("crm.common.retry")}</Button></div></div>diff --git a/src/components/atomic-crm/root/englishCrmMessages.ts b/src/components/atomic-crm/root/englishCrmMessages.tsindex 4da26ae2..69270def 100644--- a/src/components/atomic-crm/root/englishCrmMessages.ts+++ b/src/components/atomic-crm/root/englishCrmMessages.ts@@ -58,6 +58,12 @@ export const englishCrmMessages = {contacts: {name: "Contact |||| Contacts",forcedCaseName: "Contact",+ field_categories: {+ background_info: "Background info",+ identity: "Identity",+ personal_info: "Personal info",+ position: "Position",+ },fields: {first_name: "First name",last_name: "Last name",@@ -107,20 +113,16 @@ export const englishCrmMessages = {contacts_label: "contact |||| contacts",},inputs: {- background_info_short: "Background info",genders: {male: "He/Him",female: "She/Her",nonbinary: "They/Them",},- identity: "Identity",- personal_info: "Personal info",personal_info_types: {work: "Work",home: "Home",other: "Other",},- position: "Position",},list: {error_loading: "Error loading contacts",@@ -204,9 +206,6 @@ export const englishCrmMessages = {description: "It seems your deal list is empty.",title: "No deals found",},- filters: {- company: "Company",- },stage: {lost: "Lost",won: "Won",@@ -356,7 +355,6 @@ export const englishCrmMessages = {common: {activity: "Activity",added: "added",- ago: "ago",details: "Details",errors: "errors",invalid_date: "Invalid date",diff --git a/src/components/atomic-crm/root/frenchCrmMessages.ts b/src/components/atomic-crm/root/frenchCrmMessages.tsindex 8b3244b4..fe5d3a4e 100644--- a/src/components/atomic-crm/root/frenchCrmMessages.ts+++ b/src/components/atomic-crm/root/frenchCrmMessages.ts@@ -61,6 +61,12 @@ export const frenchCrmMessages = {contacts: {name: "Contact |||| Contacts",forcedCaseName: "Contact",+ field_categories: {+ background_info: "Informations complémentaires",+ identity: "Identité",+ personal_info: "Informations personnelles",+ position: "Poste",+ },fields: {first_name: "Prénom",last_name: "Nom",@@ -111,20 +117,16 @@ export const frenchCrmMessages = {contacts_label: "contact |||| contacts",},inputs: {- background_info_short: "Informations complémentaires",genders: {male: "Monsieur",female: "Madame",nonbinary: "Indéterminé",},- identity: "Identité",- personal_info: "Informations personnelles",personal_info_types: {work: "Pro",home: "Perso",other: "Autre",},- position: "Poste",},list: {error_loading: "Erreur lors du chargement des contacts",@@ -208,9 +210,6 @@ export const frenchCrmMessages = {description: "Il semble que votre liste d'affaires soit vide.",title: "Aucune affaire trouvée",},- filters: {- company: "Entreprise",- },stage: {lost: "Perdu",won: "Gagné",@@ -361,7 +360,6 @@ export const frenchCrmMessages = {common: {activity: "Activité",added: "ajoutée",- ago: "il y a",details: "Détails",errors: "erreurs",invalid_date: "Date invalide",diff --git a/src/components/atomic-crm/sales/SalesList.tsx b/src/components/atomic-crm/sales/SalesList.tsxindex 87f1c8f8..102a6023 100644--- a/src/components/atomic-crm/sales/SalesList.tsx+++ b/src/components/atomic-crm/sales/SalesList.tsx@@ -13,9 +13,7 @@ const SalesListActions = () => {return (<TopToolbar><ExportButton />- <CreateButton- label={translate("resources.sales.action.new", { _: "New user" })}- />+ <CreateButton label="resources.sales.action.new" /></TopToolbar>);};@@ -33,7 +31,7 @@ const OptionsField = (_props: { label?: string | boolean }) => {variant="outline"className="border-blue-300 dark:border-blue-700">- {translate("resources.sales.fields.administrator", { _: "Admin" })}+ {translate("resources.sales.fields.administrator")}</Badge>)}{record.disabled && (@@ -41,7 +39,7 @@ const OptionsField = (_props: { label?: string | boolean }) => {variant="outline"className="border-orange-300 dark:border-orange-700">- {translate("resources.sales.fields.disabled", { _: "Disabled" })}+ {translate("resources.sales.fields.disabled")}</Badge>)}</div>@@ -52,7 +50,7 @@ export function SalesList() {const translate = useTranslate();return (<List- title={translate("resources.sales.name", { smart_count: 2, _: "Users" })}+ title={translate("resources.sales.name", { smart_count: 2 })}filters={filters}actions={<SalesListActions />}sort={{ field: "first_name", order: "ASC" }}diff --git a/src/components/atomic-crm/settings/ProfilePage.tsx b/src/components/atomic-crm/settings/ProfilePage.tsxindex c6ffbeec..1234df70 100644--- a/src/components/atomic-crm/settings/ProfilePage.tsx+++ b/src/components/atomic-crm/settings/ProfilePage.tsx@@ -177,7 +177,7 @@ const ProfileForm = ({<CardContent><div className="mb-4 flex flex-row justify-between"><h2 className="text-xl font-semibold text-muted-foreground">- {translate("crm.profile.title", { _: "Profile" })}+ {translate("crm.profile.title")}</h2></div>@@ -204,9 +204,7 @@ const ProfileForm = ({type="button"onClick={handleClickOpenPasswordChange}>- {translate("crm.profile.password.change", {- _: "Reset password",- })}+ {translate("crm.profile.password.change")}</Button></>)}@@ -219,14 +217,14 @@ const ProfileForm = ({>{isEditMode ? <CircleX /> : <Pencil />}{isEditMode- ? translate("ra.action.cancel", { _: "Cancel" })- : translate("ra.action.edit", { _: "Edit" })}+ ? translate("ra.action.cancel")+ : translate("ra.action.edit")}</Button>{isEditMode && (<Button type="submit" disabled={!isDirty} variant="outline"><Save />- {translate("ra.action.save", { _: "Save" })}+ {translate("ra.action.save")}</Button>)}</div>@@ -237,7 +235,7 @@ const ProfileForm = ({<CardContent><div className="space-y-4 justify-between"><h2 className="text-xl font-semibold text-muted-foreground">- {translate("crm.profile.inbound.title", { _: "Inbound email" })}+ {translate("crm.profile.inbound.title")}</h2><p className="text-sm text-muted-foreground">{translate("crm.profile.inbound.description_prefix", {@@ -269,7 +267,7 @@ const LanguageSelector = () => {return (<div className="space-y-2"><p className="text-xs text-muted-foreground">- {translate("crm.language", { _: "Language" })}+ {translate("crm.language")}</p><Select value={locale} onValueChange={setLocale}><SelectTrigger className="w-full">@@ -343,8 +341,8 @@ const CopyPaste = () => {<TooltipContent><p>{copied- ? translate("crm.common.copied", { _: "Copied!" })- : translate("crm.common.copy", { _: "Copy" })}+ ? translate("crm.common.copied")+ : translate("crm.common.copy")}</p></TooltipContent></Tooltip>diff --git a/src/components/atomic-crm/settings/SettingsPage.tsx b/src/components/atomic-crm/settings/SettingsPage.tsxindex f1ad3823..b3e4bcfc 100644--- a/src/components/atomic-crm/settings/SettingsPage.tsx+++ b/src/components/atomic-crm/settings/SettingsPage.tsx@@ -200,7 +200,7 @@ const SettingsFormFields = () => {<nav className="hidden md:block w-48 shrink-0"><div className="sticky top-4 space-y-1"><h1 className="text-2xl font-semibold px-3 mb-2">- {translate("crm.settings.title", { _: "Settings" })}+ {translate("crm.settings.title")}</h1>{SECTIONS.map((section) => (<button@@ -228,15 +228,13 @@ const SettingsFormFields = () => {<Card id="branding"><CardContent className="space-y-4"><h2 className="text-xl font-semibold text-muted-foreground">- {translate("crm.settings.sections.branding", { _: "Branding" })}+ {translate("crm.settings.sections.branding")}</h2><TextInput source="title" label="crm.settings.app_title" /><div className="flex gap-8"><div className="flex flex-col items-center gap-1"><p className="text-sm text-muted-foreground">- {translate("crm.settings.light_mode_logo", {- _: "Light Mode Logo",- })}+ {translate("crm.settings.light_mode_logo")}</p><ImageEditorFieldsource="lightModeLogo"@@ -248,9 +246,7 @@ const SettingsFormFields = () => {</div><div className="flex flex-col items-center gap-1"><p className="text-sm text-muted-foreground">- {translate("crm.settings.dark_mode_logo", {- _: "Dark Mode Logo",- })}+ {translate("crm.settings.dark_mode_logo")}</p><ImageEditorFieldsource="darkModeLogo"@@ -270,11 +266,10 @@ const SettingsFormFields = () => {<h2 className="text-xl font-semibold text-muted-foreground">{translate("resources.companies.name", {smart_count: 2,- _: "Companies",})}</h2><h3 className="text-lg font-medium text-muted-foreground">- {translate("crm.settings.companies.sectors", { _: "Sectors" })}+ {translate("crm.settings.companies.sectors")}</h3><ArrayInputsource="companySectors"@@ -294,11 +289,10 @@ const SettingsFormFields = () => {<h2 className="text-xl font-semibold text-muted-foreground">{translate("resources.deals.name", {smart_count: 2,- _: "Deals",})}</h2><h3 className="text-lg font-medium text-muted-foreground">- {translate("crm.settings.deals.stages", { _: "Stages" })}+ {translate("crm.settings.deals.stages")}</h3><ArrayInputsource="dealStages"@@ -359,7 +353,7 @@ const SettingsFormFields = () => {<Separator /><h3 className="text-lg font-medium text-muted-foreground">- {translate("crm.settings.deals.categories", { _: "Categories" })}+ {translate("crm.settings.deals.categories")}</h3><ArrayInputsource="dealCategories"@@ -380,11 +374,10 @@ const SettingsFormFields = () => {<h2 className="text-xl font-semibold text-muted-foreground">{translate("resources.notes.name", {smart_count: 2,- _: "Notes",})}</h2><h3 className="text-lg font-medium text-muted-foreground">- {translate("crm.settings.notes.statuses", { _: "Statuses" })}+ {translate("crm.settings.notes.statuses")}</h3><ArrayInput source="noteStatuses" label={false} helperText={false}><SimpleFormIterator inline disableReordering disableClear>@@ -401,11 +394,10 @@ const SettingsFormFields = () => {<h2 className="text-xl font-semibold text-muted-foreground">{translate("resources.tasks.name", {smart_count: 2,- _: "Tasks",})}</h2><h3 className="text-lg font-medium text-muted-foreground">- {translate("crm.settings.tasks.types", { _: "Types" })}+ {translate("crm.settings.tasks.types")}</h3><ArrayInput source="taskTypes" label={false} helperText={false}><SimpleFormIterator disableReordering disableClear>@@ -435,9 +427,7 @@ const SettingsFormFields = () => {}><RotateCcw className="h-4 w-4 mr-1" />- {translate("crm.settings.reset_defaults", {- _: "Reset to Defaults",- })}+ {translate("crm.settings.reset_defaults")}</Button><div className="flex gap-2"><Button@@ -445,13 +435,13 @@ const SettingsFormFields = () => {variant="outline"onClick={() => window.history.back()}>- {translate("ra.action.cancel", { _: "Cancel" })}+ {translate("ra.action.cancel")}</Button><Button type="submit" disabled={isSubmitting}><Save className="h-4 w-4 mr-1" />{isSubmitting- ? translate("crm.settings.saving", { _: "Saving..." })- : translate("ra.action.save", { _: "Save" })}+ ? translate("crm.settings.saving")+ : translate("ra.action.save")}</Button></div></div>diff --git a/src/components/atomic-crm/tags/TagCreateModal.tsx b/src/components/atomic-crm/tags/TagCreateModal.tsxindex 36f47c06..4cff9f5d 100644--- a/src/components/atomic-crm/tags/TagCreateModal.tsx+++ b/src/components/atomic-crm/tags/TagCreateModal.tsx@@ -32,9 +32,7 @@ export function TagCreateModal({return (<TagDialogopen={open}- title={translate("resources.tags.dialog.create_title", {- _: "Create a new tag",- })}+ title={translate("resources.tags.dialog.create_title")}onClose={onClose}onSubmit={handleCreateTag}/>diff --git a/src/components/atomic-crm/tags/TagDialog.tsx b/src/components/atomic-crm/tags/TagDialog.tsxindex 878308c4..71f045ca 100644--- a/src/components/atomic-crm/tags/TagDialog.tsx+++ b/src/components/atomic-crm/tags/TagDialog.tsx@@ -73,9 +73,7 @@ export function TagDialog({<div className="space-y-4 py-4"><div className="space-y-2"><Label htmlFor="tag-name">- {translate("resources.tags.dialog.name_label", {- _: "Tag name",- })}+ {translate("resources.tags.dialog.name_label")}</Label><Inputid="tag-name"@@ -84,17 +82,12 @@ export function TagDialog({onChange={handleNewTagNameChange}placeholder={translate("resources.tags.dialog.name_placeholder",- {- _: "Enter tag name",- },)}/></div><div className="space-y-2">- <Label>- {translate("resources.tags.dialog.color", { _: "Color" })}- </Label>+ <Label>{translate("resources.tags.dialog.color")}</Label><div className="flex flex-wrap">{colors.map((color) => (<RoundButton@@ -121,7 +114,7 @@ export function TagDialog({)}><SaveIcon />- {translate("ra.action.save", { _: "Save" })}+ {translate("ra.action.save")}</Button></div></form>diff --git a/src/components/atomic-crm/tags/TagEditModal.tsx b/src/components/atomic-crm/tags/TagEditModal.tsxindex ff4ae293..a62e4e6c 100644--- a/src/components/atomic-crm/tags/TagEditModal.tsx+++ b/src/components/atomic-crm/tags/TagEditModal.tsx@@ -34,7 +34,7 @@ export function TagEditModal({return (<TagDialogopen={open}- title={translate("resources.tags.dialog.edit_title", { _: "Edit tag" })}+ title={translate("resources.tags.dialog.edit_title")}onClose={onClose}onSubmit={handleEditTag}tag={tag}diff --git a/src/components/atomic-crm/tasks/AddTask.tsx b/src/components/atomic-crm/tasks/AddTask.tsxindex 5d187ac5..6f895e85 100644--- a/src/components/atomic-crm/tasks/AddTask.tsx+++ b/src/components/atomic-crm/tasks/AddTask.tsx@@ -83,7 +83,7 @@ export const AddTask = ({</Button></TooltipTrigger><TooltipContent>- {translate("resources.tasks.action.create", { _: "Create task" })}+ {translate("resources.tasks.action.create")}</TooltipContent></Tooltip></TooltipProvider>@@ -96,7 +96,7 @@ export const AddTask = ({size="sm"><Plus className="w-4 h-4" />- {translate("resources.tasks.action.add", { _: "Add task" })}+ {translate("resources.tasks.action.add")}</Button></div>)}@@ -117,12 +117,8 @@ export const AddTask = ({<DialogHeader><DialogTitle>{!selectContact- ? translate("resources.tasks.dialog.create_for", {- _: "Create task for",- })- : translate("resources.tasks.dialog.create", {- _: "Create task",- })}+ ? translate("resources.tasks.dialog.create_for")+ : translate("resources.tasks.dialog.create")}{!selectContact && (<>{" "}diff --git a/src/components/atomic-crm/tasks/MobileTasksList.tsx b/src/components/atomic-crm/tasks/MobileTasksList.tsxindex e2661f03..144b7b7e 100644--- a/src/components/atomic-crm/tasks/MobileTasksList.tsx+++ b/src/components/atomic-crm/tasks/MobileTasksList.tsx@@ -9,7 +9,7 @@ export const MobileTasksList = () => {<><MobileHeader><h1 className="text-xl font-semibold">- {translate("resources.tasks.name", { smart_count: 2, _: "Tasks" })}+ {translate("resources.tasks.name", { smart_count: 2 })}</h1></MobileHeader><MobileContent>diff --git a/src/components/atomic-crm/tasks/Task.tsx b/src/components/atomic-crm/tasks/Task.tsxindex 3b9310a4..8ea1c4a5 100644--- a/src/components/atomic-crm/tasks/Task.tsx+++ b/src/components/atomic-crm/tasks/Task.tsx@@ -123,7 +123,7 @@ export const Task = ({{task.text}</div><div className="text-sm text-muted-foreground">- {translate("resources.tasks.fields.due_short", { _: "due" })}+ {translate("resources.tasks.fields.due_short")} <DateField source="due_date" record={task} showDate showTime />{showContact && (@@ -138,7 +138,7 @@ export const Task = ({return (<>{" "}- ({translate("crm.common.regarding", { _: "Re:" })} + ({translate("crm.common.regarding")} {referenceRecord?.first_name}{" "}{referenceRecord?.last_name})</>@@ -156,9 +156,7 @@ export const Task = ({variant="ghost"size="icon"className="h-5 pr-0! size-8 cursor-pointer"- aria-label={translate("resources.tasks.actions.title", {- _: "task actions",- })}+ aria-label={translate("resources.tasks.actions.title")}><MoreVertical className="size-5 md:size-4" /></Button>@@ -178,9 +176,7 @@ export const Task = ({});}}>- {translate("resources.tasks.actions.postpone_tomorrow", {- _: "Postpone to tomorrow",- })}+ {translate("resources.tasks.actions.postpone_tomorrow")}</DropdownMenuItem><DropdownMenuItemclassName="cursor-pointer h-12 md:h-8 px-4 md:px-2 text-base md:text-sm"@@ -196,21 +192,19 @@ export const Task = ({});}}>- {translate("resources.tasks.actions.postpone_next_week", {- _: "Postpone to next week",- })}+ {translate("resources.tasks.actions.postpone_next_week")}</DropdownMenuItem><DropdownMenuItemclassName="cursor-pointer h-12 md:h-8 px-4 md:px-2 text-base md:text-sm"onClick={handleEdit}>- {translate("ra.action.edit", { _: "Edit" })}+ {translate("ra.action.edit")}</DropdownMenuItem><DropdownMenuItemclassName="cursor-pointer h-12 md:h-8 px-4 md:px-2 text-base md:text-sm"onClick={handleDelete}>- {translate("ra.action.delete", { _: "Delete" })}+ {translate("ra.action.delete")}</DropdownMenuItem></DropdownMenuContent></DropdownMenu>diff --git a/src/components/atomic-crm/tasks/TaskCreateSheet.tsx b/src/components/atomic-crm/tasks/TaskCreateSheet.tsxindex fd250f63..ab3d07d9 100644--- a/src/components/atomic-crm/tasks/TaskCreateSheet.tsx+++ b/src/components/atomic-crm/tasks/TaskCreateSheet.tsx@@ -63,10 +63,8 @@ export const TaskCreateSheet = ({title={<h1 className="text-xl font-semibold truncate pr-10">{!selectContact- ? translate("resources.tasks.dialog.create_for", {- _: "Create task for",- })- : translate("resources.tasks.dialog.create", { _: "Create task" })}+ ? translate("resources.tasks.dialog.create_for")+ : translate("resources.tasks.dialog.create")}{!selectContact && (<>{" "}diff --git a/src/components/atomic-crm/tasks/TaskEdit.tsx b/src/components/atomic-crm/tasks/TaskEdit.tsxindex 840e8fcf..ff4ce1b5 100644--- a/src/components/atomic-crm/tasks/TaskEdit.tsx+++ b/src/components/atomic-crm/tasks/TaskEdit.tsx@@ -53,7 +53,7 @@ export const TaskEdit = ({<Form className="flex flex-col gap-4"><DialogHeader><DialogTitle>- {translate("resources.tasks.action.edit", { _: "Edit task" })}+ {translate("resources.tasks.action.edit")}</DialogTitle></DialogHeader><TaskFormContent />diff --git a/src/components/atomic-crm/tasks/TaskEditSheet.tsx b/src/components/atomic-crm/tasks/TaskEditSheet.tsxindex f47b84f8..7ce9b836 100644--- a/src/components/atomic-crm/tasks/TaskEditSheet.tsx+++ b/src/components/atomic-crm/tasks/TaskEditSheet.tsx@@ -27,16 +27,14 @@ export const TaskEditSheet = ({<h1 className="text-xl font-semibold truncate pr-10">{referenceRecord ? (<>- {translate("resources.tasks.sheet.edit_for", {- _: "Edit task for",- })}{" "}+ {translate("resources.tasks.sheet.edit_for")}{" "}<RecordRepresentationrecord={referenceRecord}resource="contacts"/></>) : (- translate("resources.tasks.sheet.edit", { _: "Edit task" })+ translate("resources.tasks.sheet.edit"))}</h1>)}diff --git a/src/components/atomic-crm/tasks/TasksListByDueDate.tsx b/src/components/atomic-crm/tasks/TasksListByDueDate.tsxindex aeb745f5..9b1adec3 100644--- a/src/components/atomic-crm/tasks/TasksListByDueDate.tsx+++ b/src/components/atomic-crm/tasks/TasksListByDueDate.tsx@@ -103,35 +103,33 @@ export const TasksListByDueDate = ({<div className="flex flex-col gap-4"><TaskListFiltertasks={overdueTasks}- title={translate("resources.tasks.filters.overdue", { _: "Overdue" })}+ title={translate("resources.tasks.filters.overdue")}showContact={showContact}isMobile={isMobile}/><TaskListFiltertasks={dueTodayTasks}- title={translate("resources.tasks.filters.today", { _: "Today" })}+ title={translate("resources.tasks.filters.today")}showContact={showContact}isMobile={isMobile}/><TaskListFiltertasks={dueTomorrowTasks}- title={translate("resources.tasks.filters.tomorrow", { _: "Tomorrow" })}+ title={translate("resources.tasks.filters.tomorrow")}showContact={showContact}isMobile={isMobile}/>{(!filterByContact || (filterByContact && isBeforeFriday())) && (<TaskListFiltertasks={dueThisWeekTasks}- title={translate("resources.tasks.filters.this_week", {- _: "This week",- })}+ title={translate("resources.tasks.filters.this_week")}showContact={showContact}isMobile={isMobile}/>)}<TaskListFiltertasks={dueLaterTasks}- title={translate("resources.tasks.filters.later", { _: "Later" })}+ title={translate("resources.tasks.filters.later")}showContact={showContact}isMobile={isMobile}/>diff --git a/src/components/atomic-crm/tasks/TasksListFilter.tsx b/src/components/atomic-crm/tasks/TasksListFilter.tsxindex fcf01691..0b34a83b 100644--- a/src/components/atomic-crm/tasks/TasksListFilter.tsx+++ b/src/components/atomic-crm/tasks/TasksListFilter.tsx@@ -51,7 +51,7 @@ export const TaskListFilter = ({}}className="text-sm underline hover:no-underline">- {translate("crm.common.load_more", { _: "Load more" })}+ {translate("crm.common.load_more")}</a></div>)}