fix: i18n slash menu — Suggest Charts, Living Block, Fréquents traduits
Some checks failed
CI / Deploy production (on server) (push) Has been cancelled
CI / Lint, Unit Tests & Build (push) Has been cancelled

Plus de texte en dur dans le slash menu. Tout passe par t().
Clés ajoutées dans FR/EN: slashCharts, slashLivingBlock, frequentCommands.
This commit is contained in:
Antigravity
2026-06-20 16:15:41 +00:00
parent 018db001b4
commit e07af2084b
3 changed files with 13 additions and 3 deletions

View File

@@ -1744,8 +1744,8 @@ function SlashCommandMenu({ editor, onInsertImage, onSuggestCharts }: { editor:
{ ...slashCommands[25], title: t('richTextEditor.slashSubscript'), description: t('richTextEditor.slashSubscriptDesc'), categoryId: 'text' }, { ...slashCommands[25], title: t('richTextEditor.slashSubscript'), description: t('richTextEditor.slashSubscriptDesc'), categoryId: 'text' },
{ ...slashCommands[26], title: t('richTextEditor.slashDiagram'), description: t('richTextEditor.slashDiagramDesc'), categoryId: 'ai' }, { ...slashCommands[26], title: t('richTextEditor.slashDiagram'), description: t('richTextEditor.slashDiagramDesc'), categoryId: 'ai' },
{ ...slashCommands[27], title: t('richTextEditor.slashSlides'), description: t('richTextEditor.slashSlidesDesc'), categoryId: 'ai' }, { ...slashCommands[27], title: t('richTextEditor.slashSlides'), description: t('richTextEditor.slashSlidesDesc'), categoryId: 'ai' },
{ ...slashCommands[28], title: 'Suggest Charts', description: 'AI suggère des graphiques basés sur votre contenu', categoryId: 'ai' }, { ...slashCommands[28], title: t('richTextEditor.slashCharts') || 'Graphiques IA', description: t('richTextEditor.slashChartsDesc') || 'IA suggère des graphiques', categoryId: 'ai' },
{ ...slashCommands[29], title: 'Living Block', description: 'Insérer un bloc vivant depuis une autre note', categoryId: 'embed' }, { ...slashCommands[29], title: t('richTextEditor.slashLivingBlock') || 'Bloc vivant', description: t('richTextEditor.slashLivingBlockDesc') || 'Insérer depuis une autre note', categoryId: 'embed' },
{ ...slashCommands[30], title: t('richTextEditor.slashDatabase'), description: t('richTextEditor.slashDatabaseDesc'), categoryId: 'data', slashKeywords: ['database', 'db', 'base', 'données', 'donnees', 'vue', 'tableau', 'structured', 'structuree', 'structurée'] }, { ...slashCommands[30], title: t('richTextEditor.slashDatabase'), description: t('richTextEditor.slashDatabaseDesc'), categoryId: 'data', slashKeywords: ['database', 'db', 'base', 'données', 'donnees', 'vue', 'tableau', 'structured', 'structuree', 'structurée'] },
{ ...slashCommands[31], title: t('richTextEditor.slashToggle'), description: t('richTextEditor.slashToggleDesc'), categoryId: 'text', slashKeywords: ['toggle', 'accordion', 'replier', 'deroulant', 'déroulant', 'section'] }, { ...slashCommands[31], title: t('richTextEditor.slashToggle'), description: t('richTextEditor.slashToggleDesc'), categoryId: 'text', slashKeywords: ['toggle', 'accordion', 'replier', 'deroulant', 'déroulant', 'section'] },
{ ...slashCommands[32], title: t('richTextEditor.slashCallout'), description: t('richTextEditor.slashCalloutDesc'), categoryId: 'text', slashKeywords: ['callout', 'encadre', 'encadré', 'info', 'alerte', 'astuce', 'tip', 'warning'] }, { ...slashCommands[32], title: t('richTextEditor.slashCallout'), description: t('richTextEditor.slashCalloutDesc'), categoryId: 'text', slashKeywords: ['callout', 'encadre', 'encadré', 'info', 'alerte', 'astuce', 'tip', 'warning'] },
@@ -2150,7 +2150,7 @@ function SlashCommandMenu({ editor, onInsertImage, onSuggestCharts }: { editor:
catId === ('frequent' as any) && 'text-amber-500 font-semibold' catId === ('frequent' as any) && 'text-amber-500 font-semibold'
)}> )}>
{catId === 'ai' && <Sparkles className="w-3 h-3 inline mr-1" />} {catId === 'ai' && <Sparkles className="w-3 h-3 inline mr-1" />}
{catId === ('frequent' as any) ? '★ Fréquents' : slashCategoryLabel(catId, t)} {catId === ('frequent' as any) ? (t('richTextEditor.frequentCommands') || '★ Fréquents') : slashCategoryLabel(catId, t)}
</div> </div>
{items.map((item) => { {items.map((item) => {
flatIndex++ flatIndex++

View File

@@ -2612,6 +2612,11 @@
"publishBlocked": "Publication refused", "publishBlocked": "Publication refused",
"slashSubPage": "Sub-page", "slashSubPage": "Sub-page",
"slashSubPageDesc": "Create a linked note inside this note", "slashSubPageDesc": "Create a linked note inside this note",
"slashCharts": "AI Charts",
"slashChartsDesc": "AI suggests charts",
"slashLivingBlock": "Living Block",
"slashLivingBlockDesc": "Insert from another note",
"frequentCommands": "★ Frequent",
"exercisesLoading": "Generating exercises...", "exercisesLoading": "Generating exercises...",
"exercisesGenerated": "exercises created!", "exercisesGenerated": "exercises created!",
"aiGenerateExercises": "Generate exercises", "aiGenerateExercises": "Generate exercises",

View File

@@ -2616,6 +2616,11 @@
"publishBlocked": "Publication refusée", "publishBlocked": "Publication refusée",
"slashSubPage": "Sous-page", "slashSubPage": "Sous-page",
"slashSubPageDesc": "Créer une note liée dans cette note", "slashSubPageDesc": "Créer une note liée dans cette note",
"slashCharts": "Graphiques IA",
"slashChartsDesc": "IA suggère des graphiques",
"slashLivingBlock": "Bloc vivant",
"slashLivingBlockDesc": "Insérer depuis une autre note",
"frequentCommands": "★ Fréquents",
"exercisesLoading": "Génération des exercices...", "exercisesLoading": "Génération des exercices...",
"exercisesGenerated": "exercices créés !", "exercisesGenerated": "exercices créés !",
"aiGenerateExercises": "Générer des exercices", "aiGenerateExercises": "Générer des exercices",