From 128aa842f1a27e71a3d30ccc30564f9517438e5c Mon Sep 17 00:00:00 2001 From: Antigravity Date: Sat, 20 Jun 2026 16:41:53 +0000 Subject: [PATCH] fix: SlashPreview i18n + Note type isPublic/publicSlug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - SlashPreview: 30+ chaînes FR → t() avec fallback - SlashPreview accepte t en prop - Note type: ajout isPublic/publicSlug/publishedAt (élimine les erreurs TS) - NoteType: richtext déjà présent (confirmé) --- memento-note/components/rich-text-editor.tsx | 45 ++++++++++---------- memento-note/lib/types.ts | 3 ++ 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/memento-note/components/rich-text-editor.tsx b/memento-note/components/rich-text-editor.tsx index 4316ad5..eff5cf4 100644 --- a/memento-note/components/rich-text-editor.tsx +++ b/memento-note/components/rich-text-editor.tsx @@ -1587,13 +1587,13 @@ function BubbleToolbar({ editor, onSuggestCharts }: { editor: Editor | null; onS ) } -function SlashPreview({ itemTitle }: { itemTitle: string }) { +function SlashPreview({ itemTitle, t }: { itemTitle: string; t: (k: string) => string }) { switch (itemTitle) { case 'Table': case 'Tableau': return (
-
Tableau
+
{t('richTextEditor.slashTable') || 'Tableau'}
@@ -1605,82 +1605,83 @@ function SlashPreview({ itemTitle }: { itemTitle: string }) {
-

Organisez vos données en lignes et colonnes.

+

{t('richTextEditor.previewTableTip') || 'Organisez vos données en lignes et colonnes.'}

) case 'Database': case 'Base de données': return (
-
Base de Données
+
{t('richTextEditor.slashDatabase') || 'Base de Données'}
- Nom - Statut + {t('structuredViews.propertyName') || 'Nom'} + {t('structuredViews.propertyStatus') || 'Statut'}
- Tâche A - À faire + {t('wizard.taskA') || 'Tâche A'} + {t('structuredViews.filterTodo') || 'À faire'}
- Tâche B - Fait + {t('wizard.taskB') || 'Tâche B'} + {t('structuredViews.filterDone') || 'Fait'}
-

Ajoutez des colonnes et des vues Kanban structurées.

+

{t('richTextEditor.previewDatabaseTip') || 'Ajoutez des colonnes et des vues Kanban structurées.'}

) case 'Suggest Charts': case 'Suggest Chart': + case 'Graphiques IA': return (
-
Graphique IA
+
{t('richTextEditor.slashCharts') || 'Graphique IA'}
-

Générez un graphique interactif à partir de votre texte.

+

{t('richTextEditor.previewChartsTip') || 'Générez un graphique interactif à partir de votre texte.'}

) case 'Living Block': case 'Bloc vivant': return (
-
Bloc Vivant (Transclusion)
+
{t('richTextEditor.slashLivingBlock') || 'Bloc Vivant'}
Note A
Note B
-

Synchronisez du contenu en temps réel entre plusieurs notes.

+

{t('richTextEditor.previewLivingBlockTip') || 'Synchronisez du contenu entre plusieurs notes.'}

) case 'Diagramme': case 'Diagram': return (
-
Diagramme Excalidraw
+
{t('richTextEditor.slashDiagram') || 'Diagramme'}
-

Esquissez des concepts ou générez des diagrammes via IA.

+

{t('richTextEditor.previewDiagramTip') || 'Esquissez des concepts ou générez des diagrammes via IA.'}

) case 'Présentation': case 'Presentation': return (
-
Présentation Slides
+
{t('richTextEditor.slashSlides') || 'Présentation'}
-

Créez des présentations interactives exportables.

+

{t('richTextEditor.previewSlidesTip') || 'Créez des présentations interactives exportables.'}

) case 'Code Block': @@ -1688,7 +1689,7 @@ function SlashPreview({ itemTitle }: { itemTitle: string }) { case 'Bloc de code': return (
-
Bloc de Code
+
{t('richTextEditor.slashCode') || 'Bloc de Code'}
@@ -1698,7 +1699,7 @@ function SlashPreview({ itemTitle }: { itemTitle: string }) {
-

Ajoutez du code avec coloration syntaxique automatique.

+

{t('richTextEditor.previewCodeTip') || 'Ajoutez du code avec coloration syntaxique.'}

) default: @@ -2203,7 +2204,7 @@ function SlashCommandMenu({ editor, onInsertImage, onSuggestCharts }: { editor: className="notion-slash-preview" style={{ top: previewCoords.top, left: previewCoords.left }} > - +
)} , diff --git a/memento-note/lib/types.ts b/memento-note/lib/types.ts index 8da40f7..af22279 100644 --- a/memento-note/lib/types.ts +++ b/memento-note/lib/types.ts @@ -86,6 +86,9 @@ export interface Note { sourceUrl?: string | null; matchType?: 'exact' | 'related' | null; searchScore?: number | null; + isPublic?: boolean; + publicSlug?: string | null; + publishedAt?: Date | null; } export interface NoteHistoryEntry {