From 8cb4012bba8c00967e12dd6d124a68a1e23f1618 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?BITARD=20Micha=C3=ABl?= <michael.bitard@beta.gouv.fr>
Date: Wed, 29 Jan 2025 08:26:44 +0000
Subject: [PATCH] =?UTF-8?q?bug(fiscalit=C3=A9):=20ann=C3=A9e=202025=20en?=
 =?UTF-8?q?=20erreur=20(pub/pnm-public/camino!1634)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 packages/api/src/business/fiscalite.ts        | 60 ++++++++-----------
 packages/ui/src/components/_ui/alert.tsx      |  9 +--
 ...agination.stories_snapshots_WithError.html |  2 +-
 ...tats-full.stories_snapshots_WithError.html | 12 ++--
 ...dashboard.stories_snapshots_WithError.html |  4 +-
 ...gtm-stats.stories_snapshots_WithError.html |  6 +-
 ...dashboard.stories_snapshots_WithError.html |  2 +-
 ...fiscalite.stories_snapshots_WithError.html |  8 +--
 .../entreprise/entreprise-fiscalite.tsx       |  2 +-
 .../journaux.stories_snapshots_WithError.html |  2 +-
 ...ts-marins.stories_snapshots_WithError.html | 36 +++++------
 .../guyane.stories_snapshots_WithError.html   | 22 +++----
 ...metropole.stories_snapshots_WithError.html | 20 +++----
 ...re.stories_snapshots_BonEspoirTravaux.html |  4 +-
 ...tres-link.stories_snapshots_WithError.html |  2 +-
 15 files changed, 91 insertions(+), 100 deletions(-)

diff --git a/packages/api/src/business/fiscalite.ts b/packages/api/src/business/fiscalite.ts
index 6004ea98b..b5a0606a5 100644
--- a/packages/api/src/business/fiscalite.ts
+++ b/packages/api/src/business/fiscalite.ts
@@ -1,12 +1,11 @@
 import { CaminoAnnee } from 'camino-common/src/date'
 import { SubstanceFiscaleId, SUBSTANCES_FISCALES_IDS } from 'camino-common/src/static/substancesFiscales'
-import { RecordPartial } from 'camino-common/src/typescript-tools'
+import { isNullOrUndefined, RecordPartial } from 'camino-common/src/typescript-tools'
 import Decimal from 'decimal.js'
 import { z } from 'zod'
 
 const anneeData = ['2017', '2018', '2019', '2020', '2021', '2022', '2023', '2024'] as const
-const anneeDataValidator = z.enum(anneeData)
-type AnneeData = z.infer<typeof anneeDataValidator>
+type AnneeData = (typeof anneeData)[number]
 const redevanceCommunale = {
   '2017': {
     auru: new Decimal(141.2),
@@ -666,8 +665,7 @@ export const sipIdValidator = z.enum(SIP_IDS)
 export type Sip = z.infer<typeof sipIdValidator>
 export const isSip = (value: string): value is Sip => sipIdValidator.safeParse(value).success
 export const getSips = (annee: CaminoAnnee): RecordPartial<Sip, { nom: string; communes: string[] }> => {
-  const anneeData = anneeDataValidator.parse(annee)
-  if (anneeData < '2024') {
+  if (annee < '2024') {
     return oldSips
   } else {
     return newSips
@@ -749,56 +747,48 @@ const newSips = {
 } as const satisfies RecordPartial<Sip, { nom: string; communes: string[] }>
 
 export const getRedevanceCommunale = (annee: CaminoAnnee, substanceId: SubstanceFiscaleId): Decimal => {
-  const { success, data } = anneeDataValidator.safeParse(annee)
-  if (!success) {
-    if (annee <= anneeData[0]) {
-      throw new Error('Impossible de calculer la redevance pour cette année (données absentes)')
-    }
-
+  if (annee < anneeData[0]) {
+    throw new Error('Impossible de calculer la redevance pour cette année (données absentes)')
+  }
+  const anneeFound = anneeData.find(value => value === annee)
+  if (isNullOrUndefined(anneeFound)) {
     return redevanceCommunale[anneeData[anneeData.length - 1]][substanceId]
   } else {
-    return redevanceCommunale[data][substanceId]
+    return redevanceCommunale[anneeFound][substanceId]
   }
 }
 
 export const getRedevanceDepartementale = (annee: CaminoAnnee, substanceId: SubstanceFiscaleId): Decimal => {
-  const { success, data } = anneeDataValidator.safeParse(annee)
-  if (!success) {
-    if (annee <= anneeData[0]) {
-      throw new Error('Impossible de calculer la redevance pour cette année (données absentes)')
-    }
-
+  if (annee < anneeData[0]) {
+    throw new Error('Impossible de calculer la redevance pour cette année (données absentes)')
+  }
+  const anneeFound = anneeData.find(value => value === annee)
+  if (isNullOrUndefined(anneeFound)) {
     return redevanceDepartementale[anneeData[anneeData.length - 1]][substanceId]
   } else {
-    return redevanceDepartementale[data][substanceId]
+    return redevanceDepartementale[anneeFound][substanceId]
   }
 }
 
 export const getCategoriesForTaxeAurifereGuyane = (annee: CaminoAnnee, category: EntrepriseCategory): Decimal => {
-  const { success, data } = anneeDataValidator.safeParse(annee)
-  if (!success) {
-    if (annee <= anneeData[0]) {
-      throw new Error('Impossible de calculer la redevance pour cette année (données absentes)')
-    }
+  if (annee < anneeData[0]) {
+    throw new Error('Impossible de calculer la redevance pour cette année (données absentes)')
+  }
 
+  const anneeFound = anneeData.find(value => value === annee)
+  if (isNullOrUndefined(anneeFound)) {
     return categoriesForTaxeAurifereGuyane[category][anneeData[anneeData.length - 1]].value
   } else {
-    return categoriesForTaxeAurifereGuyane[category][data].value
+    return categoriesForTaxeAurifereGuyane[category][anneeFound].value
   }
 }
 
 type TarifsBySubstances = Record<SubstanceFiscaleId, { tarifDepartemental: Decimal; tarifCommunal: Decimal }>
 export const getAllTarifsBySubstances = (annee: CaminoAnnee): TarifsBySubstances => {
-  const anneeParsed = anneeDataValidator.safeParse(annee)
-  let data: AnneeData | null = null
-  if (!anneeParsed.success) {
-    if (annee <= anneeData[0]) {
-      throw new Error('Impossible de calculer la redevance pour cette année (données absentes)')
-    }
-
-    data = anneeData[anneeData.length - 1]
-  } else {
-    data = anneeParsed.data
+  const anneeFound = anneeData.find(value => value === annee)
+  const data: AnneeData = isNullOrUndefined(anneeFound) ? anneeData[anneeData.length - 1] : anneeFound
+  if (annee < anneeData[0]) {
+    throw new Error('Impossible de calculer la redevance pour cette année (données absentes)')
   }
 
   return {
diff --git a/packages/ui/src/components/_ui/alert.tsx b/packages/ui/src/components/_ui/alert.tsx
index 32eeb9f8a..861d54329 100644
--- a/packages/ui/src/components/_ui/alert.tsx
+++ b/packages/ui/src/components/_ui/alert.tsx
@@ -1,3 +1,4 @@
+import { capitalize } from 'camino-common/src/strings'
 import type { CaminoError } from 'camino-common/src/zod-tools'
 import type { FunctionalComponent, HTMLAttributes } from 'vue'
 import type { JSX } from 'vue/jsx-runtime'
@@ -17,7 +18,7 @@ export const Alert: FunctionalComponent<Props> = props => {
   if ('small' in props) {
     return (
       <div class={['fr-alert', `fr-alert--${props.type}`, 'fr-alert--sm']}>
-        <p>{props.title}</p>
+        <p>{typeof props.title === 'string' ? capitalize(props.title) : props.title}</p>
       </div>
     )
   } else {
@@ -38,7 +39,7 @@ export const CaminoApiAlert: FunctionalComponent<{ caminoApiError: CaminoError<s
     return (
       <Alert
         type="error"
-        title={props.caminoApiError.message}
+        title={capitalize(props.caminoApiError.message)}
         description={
           <div style={{ display: 'flex', flexDirection: 'column' }}>
             <div>{props.caminoApiError.detail}</div>
@@ -51,9 +52,9 @@ export const CaminoApiAlert: FunctionalComponent<{ caminoApiError: CaminoError<s
       />
     )
   } else if ('zodErrorReadableMessage' in props.caminoApiError) {
-    return <Alert type="error" title={props.caminoApiError.message} description={props.caminoApiError.zodErrorReadableMessage} />
+    return <Alert type="error" title={capitalize(props.caminoApiError.message)} description={props.caminoApiError.zodErrorReadableMessage} />
   } else {
-    return <Alert type="error" title={props.caminoApiError.message} description={props.caminoApiError.detail} />
+    return <Alert type="error" title={capitalize(props.caminoApiError.message)} description={props.caminoApiError.detail} />
   }
 }
 
diff --git a/packages/ui/src/components/_ui/table-pagination.stories_snapshots_WithError.html b/packages/ui/src/components/_ui/table-pagination.stories_snapshots_WithError.html
index eee9c7d84..173cd2289 100644
--- a/packages/ui/src/components/_ui/table-pagination.stories_snapshots_WithError.html
+++ b/packages/ui/src/components/_ui/table-pagination.stories_snapshots_WithError.html
@@ -89,7 +89,7 @@
   </div>
   <div class=" undefined" style="display: flex; justify-content: center;">
     <div class="fr-alert fr-alert--error fr-alert--sm">
-      <p>une erreur</p>
+      <p>Une erreur</p>
     </div>
     <!---->
     <!---->
diff --git a/packages/ui/src/components/dashboard/dgtm-stats-full.stories_snapshots_WithError.html b/packages/ui/src/components/dashboard/dgtm-stats-full.stories_snapshots_WithError.html
index 59301529e..2001e296d 100644
--- a/packages/ui/src/components/dashboard/dgtm-stats-full.stories_snapshots_WithError.html
+++ b/packages/ui/src/components/dashboard/dgtm-stats-full.stories_snapshots_WithError.html
@@ -2,42 +2,42 @@
   <div style="display: grid; grid-template-columns: 1fr 1fr 1fr;">
     <div class=" undefined" style="display: flex; justify-content: center;">
       <div class="fr-alert fr-alert--error fr-alert--sm">
-        <p>because reasons</p>
+        <p>Because reasons</p>
       </div>
       <!---->
       <!---->
     </div>
     <div class=" undefined" style="display: flex; justify-content: center;">
       <div class="fr-alert fr-alert--error fr-alert--sm">
-        <p>because reasons</p>
+        <p>Because reasons</p>
       </div>
       <!---->
       <!---->
     </div>
     <div class=" undefined" style="display: flex; justify-content: center;">
       <div class="fr-alert fr-alert--error fr-alert--sm">
-        <p>because reasons</p>
+        <p>Because reasons</p>
       </div>
       <!---->
       <!---->
     </div>
     <div class=" undefined" style="display: flex; justify-content: center;">
       <div class="fr-alert fr-alert--error fr-alert--sm">
-        <p>because reasons</p>
+        <p>Because reasons</p>
       </div>
       <!---->
       <!---->
     </div>
     <div class=" undefined" style="display: flex; justify-content: center;">
       <div class="fr-alert fr-alert--error fr-alert--sm">
-        <p>because reasons</p>
+        <p>Because reasons</p>
       </div>
       <!---->
       <!---->
     </div>
     <div class=" undefined" style="display: flex; justify-content: center;">
       <div class="fr-alert fr-alert--error fr-alert--sm">
-        <p>because reasons</p>
+        <p>Because reasons</p>
       </div>
       <!---->
       <!---->
diff --git a/packages/ui/src/components/dashboard/pure-administration-dashboard.stories_snapshots_WithError.html b/packages/ui/src/components/dashboard/pure-administration-dashboard.stories_snapshots_WithError.html
index 78e8b535c..10ddd490c 100644
--- a/packages/ui/src/components/dashboard/pure-administration-dashboard.stories_snapshots_WithError.html
+++ b/packages/ui/src/components/dashboard/pure-administration-dashboard.stories_snapshots_WithError.html
@@ -11,14 +11,14 @@
   <!---->
   <div class=" undefined" style="display: flex; justify-content: center;">
     <div class="fr-alert fr-alert--error fr-alert--sm">
-      <p>because reasons</p>
+      <p>Because reasons</p>
     </div>
     <!---->
     <!---->
   </div>
   <div class=" undefined" style="display: flex; justify-content: center;">
     <div class="fr-alert fr-alert--error fr-alert--sm">
-      <p>because reasons</p>
+      <p>Because reasons</p>
     </div>
     <!---->
     <!---->
diff --git a/packages/ui/src/components/dashboard/pure-dgtm-stats.stories_snapshots_WithError.html b/packages/ui/src/components/dashboard/pure-dgtm-stats.stories_snapshots_WithError.html
index 3fb20204b..c3a2b6c7f 100644
--- a/packages/ui/src/components/dashboard/pure-dgtm-stats.stories_snapshots_WithError.html
+++ b/packages/ui/src/components/dashboard/pure-dgtm-stats.stories_snapshots_WithError.html
@@ -1,21 +1,21 @@
 <div style="display: grid; grid-template-columns: 1fr 1fr 1fr;">
   <div class=" undefined" style="display: flex; justify-content: center;">
     <div class="fr-alert fr-alert--error fr-alert--sm">
-      <p>because reasons</p>
+      <p>Because reasons</p>
     </div>
     <!---->
     <!---->
   </div>
   <div class=" undefined" style="display: flex; justify-content: center;">
     <div class="fr-alert fr-alert--error fr-alert--sm">
-      <p>because reasons</p>
+      <p>Because reasons</p>
     </div>
     <!---->
     <!---->
   </div>
   <div class=" undefined" style="display: flex; justify-content: center;">
     <div class="fr-alert fr-alert--error fr-alert--sm">
-      <p>because reasons</p>
+      <p>Because reasons</p>
     </div>
     <!---->
     <!---->
diff --git a/packages/ui/src/components/dashboard/pure-entreprise-dashboard.stories_snapshots_WithError.html b/packages/ui/src/components/dashboard/pure-entreprise-dashboard.stories_snapshots_WithError.html
index ee708b6e1..a777c6238 100644
--- a/packages/ui/src/components/dashboard/pure-entreprise-dashboard.stories_snapshots_WithError.html
+++ b/packages/ui/src/components/dashboard/pure-entreprise-dashboard.stories_snapshots_WithError.html
@@ -10,7 +10,7 @@
   </div>
   <div class=" undefined" style="display: flex; justify-content: center;">
     <div class="fr-alert fr-alert--error fr-alert--sm">
-      <p>because reasons</p>
+      <p>Because reasons</p>
     </div>
     <!---->
     <!---->
diff --git a/packages/ui/src/components/entreprise/entreprise-fiscalite.stories_snapshots_WithError.html b/packages/ui/src/components/entreprise/entreprise-fiscalite.stories_snapshots_WithError.html
index 39b669cf1..65964dde9 100644
--- a/packages/ui/src/components/entreprise/entreprise-fiscalite.stories_snapshots_WithError.html
+++ b/packages/ui/src/components/entreprise/entreprise-fiscalite.stories_snapshots_WithError.html
@@ -11,7 +11,7 @@
           <div>a. Redevance communale</div>
           <div class=" _fiscalite-value_16f3a1" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
@@ -19,7 +19,7 @@
           <div>b. Redevance départementale</div>
           <div class=" _fiscalite-value_16f3a1" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
@@ -28,7 +28,7 @@
           <div>f. Frais de gestion de fiscalité directe locale (a+b)X 8%</div>
           <div class=" _fiscalite-value_16f3a1" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
@@ -36,7 +36,7 @@
           <div>Somme à payer auprès du comptable (2)</div>
           <div class=" _fiscalite-value_16f3a1" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
diff --git a/packages/ui/src/components/entreprise/entreprise-fiscalite.tsx b/packages/ui/src/components/entreprise/entreprise-fiscalite.tsx
index fe6461c65..850f2c1a4 100644
--- a/packages/ui/src/components/entreprise/entreprise-fiscalite.tsx
+++ b/packages/ui/src/components/entreprise/entreprise-fiscalite.tsx
@@ -89,7 +89,7 @@ const FiscaliteByAnnee: FunctionalComponent<FiscaliteProps> = props => {
   return (
     <>
       {props.annees[props.annees.length - 1] === props.tabId ? (
-        <Alert small={true} type="info" title={`Estimation effectuée sur la base des tarifs et des productions déclarées pour l'année ${Number.parseInt(props.tabId) - 1}`} class="fr-mb-1w" />
+        <Alert small={true} type="info" title={`estimation effectuée sur la base des tarifs et des productions déclarées pour l'année ${Number.parseInt(props.tabId) - 1}`} class="fr-mb-1w" />
       ) : null}
       <strong>Cotisations</strong>
       <div class={styles['fiscalite-table']}>
diff --git a/packages/ui/src/components/journaux.stories_snapshots_WithError.html b/packages/ui/src/components/journaux.stories_snapshots_WithError.html
index 3e9c708c0..2cb58d606 100644
--- a/packages/ui/src/components/journaux.stories_snapshots_WithError.html
+++ b/packages/ui/src/components/journaux.stories_snapshots_WithError.html
@@ -136,7 +136,7 @@
         </div>
         <div class=" undefined" style="display: flex; justify-content: center;">
           <div class="fr-alert fr-alert--error fr-alert--sm">
-            <p>erreur</p>
+            <p>Erreur</p>
           </div>
           <!---->
           <!---->
diff --git a/packages/ui/src/components/statistiques/granulats-marins.stories_snapshots_WithError.html b/packages/ui/src/components/statistiques/granulats-marins.stories_snapshots_WithError.html
index 3e7a45af1..cb8999567 100644
--- a/packages/ui/src/components/statistiques/granulats-marins.stories_snapshots_WithError.html
+++ b/packages/ui/src/components/statistiques/granulats-marins.stories_snapshots_WithError.html
@@ -11,7 +11,7 @@
           <p class="fr-display--xs _donnee-importante_65867c">
           <div class=" undefined" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
@@ -19,7 +19,7 @@
           </p>
           <div class=" undefined" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
@@ -30,7 +30,7 @@
           <p class="fr-display--xs _donnee-importante_65867c">
           <div class=" undefined" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
@@ -43,7 +43,7 @@
           <p class="fr-display--xs _donnee-importante_65867c">
           <div class=" undefined" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
@@ -61,7 +61,7 @@
           <p class="fr-display--xs _donnee-importante_65867c">
           <div class=" undefined" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
@@ -69,7 +69,7 @@
           </p>
           <div class=" undefined" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
@@ -80,7 +80,7 @@
           <p class="fr-display--xs _donnee-importante_65867c">
           <div class=" undefined" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
@@ -88,7 +88,7 @@
           </p>
           <div class=" undefined" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
@@ -99,7 +99,7 @@
           <p class="fr-display--xs _donnee-importante_65867c">
           <div class=" undefined" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
@@ -116,7 +116,7 @@
   <div class="fr-pt-1w fr-pb-1w">
     <div class=" undefined" style="display: flex; justify-content: center;">
       <div class="fr-alert fr-alert--error fr-alert--sm">
-        <p>because reasons</p>
+        <p>Because reasons</p>
       </div>
       <!---->
       <!---->
@@ -125,7 +125,7 @@
   <div class="fr-mb-3w fr-mt-3w" style="height: 1px; width: 100%;"></div>
   <div class=" undefined" style="display: flex; justify-content: center;">
     <div class="fr-alert fr-alert--error fr-alert--sm">
-      <p>because reasons</p>
+      <p>Because reasons</p>
     </div>
     <!---->
     <!---->
@@ -141,7 +141,7 @@
         <p class="fr-display--xs _donnee-importante_65867c">
         <div class=" undefined" style="display: flex; justify-content: center;">
           <div class="fr-alert fr-alert--error fr-alert--sm">
-            <p>because reasons</p>
+            <p>Because reasons</p>
           </div>
           <!---->
           <!---->
@@ -152,7 +152,7 @@
       <div class="fr-col-12 fr-col-md-9 relative fr-mb-3w">
         <div class=" undefined" style="display: flex; justify-content: center;">
           <div class="fr-alert fr-alert--error fr-alert--sm">
-            <p>because reasons</p>
+            <p>Because reasons</p>
           </div>
           <!---->
           <!---->
@@ -161,7 +161,7 @@
     </div>
     <div class=" undefined" style="display: flex; justify-content: center;">
       <div class="fr-alert fr-alert--error fr-alert--sm">
-        <p>because reasons</p>
+        <p>Because reasons</p>
       </div>
       <!---->
       <!---->
@@ -173,7 +173,7 @@
         <p class="fr-display--xs _donnee-importante_65867c">
         <div class=" undefined" style="display: flex; justify-content: center;">
           <div class="fr-alert fr-alert--error fr-alert--sm">
-            <p>because reasons</p>
+            <p>Because reasons</p>
           </div>
           <!---->
           <!---->
@@ -184,7 +184,7 @@
       <div class="fr-col-12 fr-col-md-9 relative fr-mb-3w">
         <div class=" undefined" style="display: flex; justify-content: center;">
           <div class="fr-alert fr-alert--error fr-alert--sm">
-            <p>because reasons</p>
+            <p>Because reasons</p>
           </div>
           <!---->
           <!---->
@@ -198,7 +198,7 @@
         <p class="fr-display--xs _donnee-importante_65867c">
         <div class=" undefined" style="display: flex; justify-content: center;">
           <div class="fr-alert fr-alert--error fr-alert--sm">
-            <p>because reasons</p>
+            <p>Because reasons</p>
           </div>
           <!---->
           <!---->
@@ -209,7 +209,7 @@
       <div class="fr-col-12 fr-col-md-9 relative fr-mb-3w">
         <div class=" undefined" style="display: flex; justify-content: center;">
           <div class="fr-alert fr-alert--error fr-alert--sm">
-            <p>because reasons</p>
+            <p>Because reasons</p>
           </div>
           <!---->
           <!---->
diff --git a/packages/ui/src/components/statistiques/guyane.stories_snapshots_WithError.html b/packages/ui/src/components/statistiques/guyane.stories_snapshots_WithError.html
index 2f2604781..5d0bbf73e 100644
--- a/packages/ui/src/components/statistiques/guyane.stories_snapshots_WithError.html
+++ b/packages/ui/src/components/statistiques/guyane.stories_snapshots_WithError.html
@@ -11,7 +11,7 @@
           <p class="fr-display--xs _donnee-importante_65867c">
           <div class=" undefined" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
@@ -24,7 +24,7 @@
           <p class="fr-display--xs _donnee-importante_65867c">
           <div class=" undefined" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
@@ -37,7 +37,7 @@
           <p class="fr-display--xs _donnee-importante_65867c">
           <div class=" undefined" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
@@ -55,7 +55,7 @@
           <p class="fr-display--xs _donnee-importante_65867c">
           <div class=" undefined" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
@@ -68,7 +68,7 @@
           <p class="fr-display--xs _donnee-importante_65867c">
           <div class=" undefined" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
@@ -81,7 +81,7 @@
           <p class="fr-display--xs _donnee-importante_65867c">
           <div class=" undefined" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
@@ -96,7 +96,7 @@
   <p class="fr-mb-3w">Les données affichées ici sont celles contenues dans la base de donnée Camino. Elles sont stabilisées pour l’année n-2 mais sont susceptibles d’évoluer jusqu’à la cloture de la collecte des déclarations règlementaires de l’année précédente et l'année en cours. Ces données concernent exclusivement le territoire guyanais.</p>
   <div class=" undefined" style="display: flex; justify-content: center;">
     <div class="fr-alert fr-alert--error fr-alert--sm">
-      <p>because reasons</p>
+      <p>Because reasons</p>
     </div>
     <!---->
     <!---->
@@ -109,7 +109,7 @@
       <hr>
       <div class=" undefined" style="display: flex; justify-content: center;">
         <div class="fr-alert fr-alert--error fr-alert--sm">
-          <p>because reasons</p>
+          <p>Because reasons</p>
         </div>
         <!---->
         <!---->
@@ -120,7 +120,7 @@
       <hr>
       <div class=" undefined" style="display: flex; justify-content: center;">
         <div class="fr-alert fr-alert--error fr-alert--sm">
-          <p>because reasons</p>
+          <p>Because reasons</p>
         </div>
         <!---->
         <!---->
@@ -131,7 +131,7 @@
       <hr>
       <div class=" undefined" style="display: flex; justify-content: center;">
         <div class="fr-alert fr-alert--error fr-alert--sm">
-          <p>because reasons</p>
+          <p>Because reasons</p>
         </div>
         <!---->
         <!---->
@@ -142,7 +142,7 @@
       <hr>
       <div class=" undefined" style="display: flex; justify-content: center;">
         <div class="fr-alert fr-alert--error fr-alert--sm">
-          <p>because reasons</p>
+          <p>Because reasons</p>
         </div>
         <!---->
         <!---->
diff --git a/packages/ui/src/components/statistiques/mineraux-metaux-metropole.stories_snapshots_WithError.html b/packages/ui/src/components/statistiques/mineraux-metaux-metropole.stories_snapshots_WithError.html
index 9e7a36b5b..cbc50854f 100644
--- a/packages/ui/src/components/statistiques/mineraux-metaux-metropole.stories_snapshots_WithError.html
+++ b/packages/ui/src/components/statistiques/mineraux-metaux-metropole.stories_snapshots_WithError.html
@@ -11,7 +11,7 @@
           <p class="fr-display--xs _donnee-importante_65867c">
           <div class=" undefined" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
@@ -26,7 +26,7 @@
           <p class="fr-display--xs _donnee-importante_65867c">
           <div class=" undefined" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
@@ -39,7 +39,7 @@
           <p class="fr-display--xs _donnee-importante_65867c">
           <div class=" undefined" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
@@ -57,7 +57,7 @@
           <p class="fr-display--xs _donnee-importante_65867c">
           <div class=" undefined" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
@@ -72,7 +72,7 @@
           <p class="fr-display--xs _donnee-importante_65867c">
           <div class=" undefined" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
@@ -87,7 +87,7 @@
           <p class="fr-display--xs _donnee-importante_65867c">
           <div class=" undefined" style="display: flex; justify-content: center;">
             <div class="fr-alert fr-alert--error fr-alert--sm">
-              <p>because reasons</p>
+              <p>Because reasons</p>
             </div>
             <!---->
             <!---->
@@ -107,7 +107,7 @@
       <h3>Bauxite</h3>
       <div class=" undefined" style="display: flex; justify-content: center;">
         <div class="fr-alert fr-alert--error fr-alert--sm">
-          <p>because reasons</p>
+          <p>Because reasons</p>
         </div>
         <!---->
         <!---->
@@ -117,7 +117,7 @@
       <h3>Sels (sel de sodium, sel de potassium, sel gemme…)</h3>
       <div class=" undefined" style="display: flex; justify-content: center;">
         <div class="fr-alert fr-alert--error fr-alert--sm">
-          <p>because reasons</p>
+          <p>Because reasons</p>
         </div>
         <!---->
         <!---->
@@ -137,7 +137,7 @@
     <hr>
     <div class=" undefined" style="display: flex; justify-content: center;">
       <div class="fr-alert fr-alert--error fr-alert--sm">
-        <p>because reasons</p>
+        <p>Because reasons</p>
       </div>
       <!---->
       <!---->
@@ -148,7 +148,7 @@
     <hr>
     <div class=" undefined" style="display: flex; justify-content: center;">
       <div class="fr-alert fr-alert--error fr-alert--sm">
-        <p>because reasons</p>
+        <p>Because reasons</p>
       </div>
       <!---->
       <!---->
diff --git a/packages/ui/src/components/titre.stories_snapshots_BonEspoirTravaux.html b/packages/ui/src/components/titre.stories_snapshots_BonEspoirTravaux.html
index 909552469..d7fa310de 100644
--- a/packages/ui/src/components/titre.stories_snapshots_BonEspoirTravaux.html
+++ b/packages/ui/src/components/titre.stories_snapshots_BonEspoirTravaux.html
@@ -113,7 +113,7 @@
             </div>
             <!---->
             <div class="fr-alert fr-alert--warning fr-alert--sm" style="grid-column: 1 / -1;">
-              <p>note importante</p>
+              <p>Note importante</p>
             </div>
           </div>
         </div>
@@ -196,7 +196,7 @@
               <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); align-content: flex-start; column-gap: 16px; row-gap: 8px;">
                 <!---->
                 <div class="fr-alert fr-alert--warning fr-alert--sm" style="grid-column: 1 / -1;">
-                  <p>note importante</p>
+                  <p>Note importante</p>
                 </div>
               </div>
               <!---->
diff --git a/packages/ui/src/components/titre/titres-link.stories_snapshots_WithError.html b/packages/ui/src/components/titre/titres-link.stories_snapshots_WithError.html
index 9f6c1a9de..7fe9b71c5 100644
--- a/packages/ui/src/components/titre/titres-link.stories_snapshots_WithError.html
+++ b/packages/ui/src/components/titre/titres-link.stories_snapshots_WithError.html
@@ -1,6 +1,6 @@
 <div class=" undefined" style="display: flex; justify-content: center;">
   <div class="fr-alert fr-alert--error fr-alert--sm">
-    <p>because reasons</p>
+    <p>Because reasons</p>
   </div>
   <!---->
   <!---->
-- 
GitLab