Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

Change namespace for resource fields

François Zaninotto421b979c5fbf
diff --git a/src/components/atomic-crm/deals/DealInputs.tsx b/src/components/atomic-crm/deals/DealInputs.tsx
index 9d53ed6a..b01e9b4b 100644
--- a/src/components/atomic-crm/deals/DealInputs.tsx
+++ b/src/components/atomic-crm/deals/DealInputs.tsx
@@ -31,12 +31,7 @@ export const DealInputs = () => {
const DealInfoInputs = () => {
return (
<div className="flex flex-col gap-4 flex-1">
- <TextInput
- source="name"
- label="crm.deals.inputs.name"
- validate={required()}
- helperText={false}
- />
+ <TextInput source="name" validate={required()} helperText={false} />
<TextInput source="description" multiline rows={3} helperText={false} />
</div>
);
@@ -50,12 +45,15 @@ const DealLinkedToInputs = () => {
{translate("crm.deals.inputs.linked_to", { _: "Linked to" })}
</h3>
<ReferenceInput source="company_id" reference="companies">
- <AutocompleteCompanyInput validate={required()} />
+ <AutocompleteCompanyInput
+ label="resources.deals.fields.company_id"
+ validate={required()}
+ />
</ReferenceInput>
<ReferenceArrayInput source="contact_ids" reference="contacts_summary">
<AutocompleteArrayInput
- label="crm.deals.inputs.contacts"
+ label="resources.deals.fields.contact_ids"
optionText={contactOptionText}
helperText={false}
/>
@@ -75,7 +73,6 @@ const DealMiscInputs = () => {
<SelectInput
source="category"
- label="crm.deals.inputs.category"
choices={dealCategories}
optionText="label"
optionValue="value"
@@ -83,7 +80,6 @@ const DealMiscInputs = () => {
/>
<NumberInput
source="amount"
- label="crm.deals.fields.budget"
defaultValue={0}
helperText={false}
validate={required()}
@@ -91,13 +87,11 @@ const DealMiscInputs = () => {
<DateInput
validate={required()}
source="expected_closing_date"
- label="crm.deals.fields.expected_closing_date"
helperText={false}
defaultValue={new Date().toISOString().split("T")[0]}
/>
<SelectInput
source="stage"
- label="crm.deals.fields.stage"
choices={dealStages}
optionText="label"
optionValue="value"
diff --git a/src/components/atomic-crm/deals/DealShow.tsx b/src/components/atomic-crm/deals/DealShow.tsx
index e9c2e782..457c4425 100644
--- a/src/components/atomic-crm/deals/DealShow.tsx
+++ b/src/components/atomic-crm/deals/DealShow.tsx
@@ -89,7 +89,7 @@ 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("crm.deals.fields.expected_closing_date", {
+ {translate("resources.deals.fields.expected_closing_date", {
_: "Expected closing date",
})}
</span>
@@ -111,7 +111,7 @@ const DealShowContent = () => {
<div className="flex flex-col mr-10">
<span className="text-xs text-muted-foreground tracking-wide">
- {translate("crm.deals.fields.budget", { _: "Budget" })}
+ {translate("resources.deals.fields.amount", { _: "Budget" })}
</span>
<span className="text-sm">
{record.amount.toLocaleString("en-US", {
@@ -127,7 +127,9 @@ const DealShowContent = () => {
{record.category && (
<div className="flex flex-col mr-10">
<span className="text-xs text-muted-foreground tracking-wide">
- {translate("crm.deals.fields.category", { _: "Category" })}
+ {translate("resources.deals.fields.category", {
+ _: "Category",
+ })}
</span>
<span className="text-sm">
{dealCategories.find((c) => c.value === record.category)
@@ -138,7 +140,7 @@ const DealShowContent = () => {
<div className="flex flex-col mr-10">
<span className="text-xs text-muted-foreground tracking-wide">
- {translate("crm.deals.fields.stage", { _: "Stage" })}
+ {translate("resources.deals.fields.stage", { _: "Stage" })}
</span>
<span className="text-sm">
{findDealLabel(dealStages, record.stage, translate)}
@@ -150,7 +152,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("crm.contacts.name", {
+ {translate("resources.deals.fields.contact_ids", {
smart_count: 2,
_: "Contacts",
})}
@@ -168,7 +170,7 @@ const DealShowContent = () => {
{record.description && (
<div className="m-4 whitespace-pre-line">
<span className="text-xs text-muted-foreground tracking-wide">
- {translate("crm.deals.fields.description", {
+ {translate("resources.deals.fields.description", {
_: "Description",
})}
</span>
diff --git a/src/components/atomic-crm/root/frenchCrmMessages.ts b/src/components/atomic-crm/root/frenchCrmMessages.ts
index 9c6043b5..4a5380cc 100644
--- a/src/components/atomic-crm/root/frenchCrmMessages.ts
+++ b/src/components/atomic-crm/root/frenchCrmMessages.ts
@@ -1,6 +1,21 @@
import type { CrmMessages } from "./englishCrmMessages";
export const frenchCrmMessages = {
+ resources: {
+ deals: {
+ name: "Affaire |||| Affaires",
+ fields: {
+ name: "Nom",
+ description: "Description",
+ company_id: "Entreprise",
+ contact_ids: "Contacts",
+ category: "Catégorie",
+ amount: "Budget",
+ expected_closing_date: "Date de clôture prévue",
+ stage: "Étape",
+ }
+ }
+ },
crm: {
auth: {
confirmation_required:
@@ -93,7 +108,7 @@ export const frenchCrmMessages = {
fields: {
name: "Nom de l'entreprise",
website: "Site web",
- linkedin_url: "URL LinkedIn",
+ linkedin_url: "LinkedIn",
phone_number: "Numéro de téléphone",
created_at: "Date de création",
nb_contacts: "Nombre de contacts",
@@ -107,7 +122,7 @@ export const frenchCrmMessages = {
state_abbr: "État",
country: "Pays",
description: "Description",
- context_links: "Liens de contexte",
+ context_links: "URLs de contexte",
},
filters: {
only_mine: "Seulement les entreprises que je gère",
@@ -170,20 +185,20 @@ export const frenchCrmMessages = {
identity: "Identité",
personal_info: "Informations personnelles",
phone_number: "Numéro de téléphone",
- position: "Position",
+ position: "Poste",
title: "Titre",
company: "Entreprise",
email_addresses: "Adresses e-mail",
phone_numbers: "Numéros de téléphone",
linkedin_url: "URL LinkedIn",
background_info:
- "Informations complémentaires (bio, comment vous vous êtes rencontrés, etc.)",
+ "(bio, comment vous vous êtes rencontrés, etc.)",
has_newsletter: "Abonné à la newsletter",
subscribed_newsletter: "Abonné à la newsletter",
genders: {
- male: "Il/Lui",
- female: "Elle",
- nonbinary: "Iel",
+ male: "Monsieur",
+ female: "Madame",
+ nonbinary: "Indéterminé",
},
personal_info_types: {
work: "Pro",
@@ -239,7 +254,7 @@ export const frenchCrmMessages = {
},
},
dashboard: {
- deals_chart: "Revenus des deals à venir",
+ deals_chart: "Revenus des affaires à venir",
deals_pipeline: "Pipeline des affaires",
latest_activity: "Dernière activité",
latest_activity_error:
@@ -279,18 +294,8 @@ export const frenchCrmMessages = {
edit: {
title: "Modifier l'affaire %{name}",
},
- fields: {
- budget: "Budget",
- category: "Catégorie",
- expected_closing_date: "Date de clôture prévue",
- stage: "Étape",
- description: "Description",
- },
inputs: {
linked_to: "Lié à",
- name: "Nom de l'affaire",
- contacts: "Contacts",
- category: "Catégorie",
},
unarchived: {
action: "Renvoyer au tableau",