fix: comprehensive i18n — replace hardcoded French/English strings with t() calls
Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 1m7s

Replaced ~100+ hardcoded French and English text strings across 30+ components
with proper i18n t() calls. Added 57 new translation keys to all 15 locale files
(ar, de, en, es, fa, fr, hi, it, ja, ko, nl, pl, pt, ru, zh).

Key changes:
- contextual-ai-chat.tsx: 30 French strings → t() (actions, toasts, labels, placeholders)
- ai-chat.tsx: 15 French/English strings → t() (header, tabs, welcome, insights, history)
- note-inline-editor.tsx: 20 French fallbacks removed (toolbar, save status, checklist)
- lab-skeleton.tsx: French loading text → t()
- admin-header.tsx, header.tsx, editor-connections-section.tsx: French fallbacks removed
- New AI chat component, agent cards, sidebar, settings panel i18n cleanup

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-26 21:14:45 +02:00
parent e358171c45
commit 153c921960
60 changed files with 4125 additions and 1677 deletions

View File

@@ -17,13 +17,16 @@ model User {
role String @default("USER")
image String?
theme String @default("light")
cardSizeMode String @default("variable")
resetToken String? @unique
resetTokenExpiry DateTime?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
cardSizeMode String @default("variable")
accounts Account[]
agents Agent[]
aiFeedback AiFeedback[]
canvases Canvas[]
conversations Conversation[]
labels Label[]
memoryEchoInsights MemoryEchoInsight[]
notes Note[]
@@ -32,10 +35,7 @@ model User {
notebooks Notebook[]
sessions Session[]
aiSettings UserAISettings?
agents Agent[]
workflows Workflow[]
conversations Conversation[]
canvases Canvas[]
}
model Account {
@@ -75,20 +75,20 @@ model VerificationToken {
}
model Notebook {
id String @id @default(cuid())
name String
icon String?
color String?
order Int
userId String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
labels Label[]
notes Note[]
agents Agent[]
workflows Workflow[]
id String @id @default(cuid())
name String
icon String?
color String?
order Int
userId String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
agents Agent[]
conversations Conversation[]
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
labels Label[]
notes Note[]
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
workflows Workflow[]
@@index([userId, order])
@@index([userId])
@@ -102,8 +102,8 @@ model Label {
userId String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
notebook Notebook? @relation(fields: [notebookId], references: [id], onDelete: Cascade)
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
notes Note[] @relation("LabelToNote")
@@unique([notebookId, name])
@@ -112,46 +112,46 @@ model Label {
}
model Note {
id String @id @default(cuid())
title String?
content String
color String @default("default")
isPinned Boolean @default(false)
isArchived Boolean @default(false)
trashedAt DateTime?
type String @default("text")
id String @id @default(cuid())
title String?
content String
color String @default("default")
isPinned Boolean @default(false)
isArchived Boolean @default(false)
type String @default("text")
dismissedFromRecent Boolean @default(false)
checkItems String?
labels String?
images String?
links String?
reminder DateTime?
isReminderDone Boolean @default(false)
reminderRecurrence String?
reminderLocation String?
isMarkdown Boolean @default(false)
size String @default("small")
sharedWith String?
userId String?
order Int @default(0)
notebookId String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
contentUpdatedAt DateTime @default(now())
autoGenerated Boolean?
aiProvider String?
aiConfidence Int?
language String?
languageConfidence Float?
lastAiAnalysis DateTime?
aiFeedback AiFeedback[]
memoryEchoAsNote2 MemoryEchoInsight[] @relation("EchoNote2")
memoryEchoAsNote1 MemoryEchoInsight[] @relation("EchoNote1")
notebook Notebook? @relation(fields: [notebookId], references: [id])
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
shares NoteShare[]
labelRelations Label[] @relation("LabelToNote")
noteEmbedding NoteEmbedding?
checkItems String?
labels String?
images String?
links String?
reminder DateTime?
isReminderDone Boolean @default(false)
reminderRecurrence String?
reminderLocation String?
isMarkdown Boolean @default(false)
size String @default("small")
sharedWith String?
userId String?
order Int @default(0)
notebookId String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
contentUpdatedAt DateTime @default(now())
autoGenerated Boolean?
aiProvider String?
aiConfidence Int?
language String?
languageConfidence Float?
lastAiAnalysis DateTime?
trashedAt DateTime?
aiFeedback AiFeedback[]
memoryEchoAsNote1 MemoryEchoInsight[] @relation("EchoNote1")
memoryEchoAsNote2 MemoryEchoInsight[] @relation("EchoNote2")
notebook Notebook? @relation(fields: [notebookId], references: [id])
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
noteEmbedding NoteEmbedding?
shares NoteShare[]
labelRelations Label[] @relation("LabelToNote")
@@index([isPinned])
@@index([isArchived])
@@ -173,9 +173,9 @@ model NoteShare {
respondedAt DateTime?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
note Note @relation(fields: [noteId], references: [id], onDelete: Cascade)
sharer User @relation("SentShares", fields: [sharedBy], references: [id], onDelete: Cascade)
user User @relation("ReceivedShares", fields: [userId], references: [id], onDelete: Cascade)
note Note @relation(fields: [noteId], references: [id], onDelete: Cascade)
@@unique([noteId, userId])
@@index([userId])
@@ -198,8 +198,8 @@ model AiFeedback {
correctedContent String?
metadata String?
createdAt DateTime @default(now())
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
note Note @relation(fields: [noteId], references: [id], onDelete: Cascade)
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
@@index([noteId])
@@index([userId])
@@ -217,9 +217,9 @@ model MemoryEchoInsight {
viewed Boolean @default(false)
feedback String?
dismissed Boolean @default(false)
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
note2 Note @relation("EchoNote2", fields: [note2Id], references: [id], onDelete: Cascade)
note1 Note @relation("EchoNote1", fields: [note1Id], references: [id], onDelete: Cascade)
note2 Note @relation("EchoNote2", fields: [note2Id], references: [id], onDelete: Cascade)
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
@@unique([userId, insightDate])
@@index([userId, insightDate])
@@ -227,23 +227,25 @@ model MemoryEchoInsight {
}
model UserAISettings {
userId String @id
titleSuggestions Boolean @default(true)
semanticSearch Boolean @default(true)
paragraphRefactor Boolean @default(true)
memoryEcho Boolean @default(true)
memoryEchoFrequency String @default("daily")
aiProvider String @default("auto")
preferredLanguage String @default("auto")
fontSize String @default("medium")
demoMode Boolean @default(false)
showRecentNotes Boolean @default(true)
userId String @id
titleSuggestions Boolean @default(true)
semanticSearch Boolean @default(true)
paragraphRefactor Boolean @default(true)
memoryEcho Boolean @default(true)
memoryEchoFrequency String @default("daily")
aiProvider String @default("auto")
preferredLanguage String @default("auto")
fontSize String @default("medium")
demoMode Boolean @default(false)
showRecentNotes Boolean @default(true)
/// "masonry" = grille cartes Muuri ; "tabs" = onglets + panneau (type OneNote). Ancienne valeur "list" migrée vers "tabs" en lecture.
notesViewMode String @default("masonry")
emailNotifications Boolean @default(false)
desktopNotifications Boolean @default(false)
anonymousAnalytics Boolean @default(false)
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
notesViewMode String @default("masonry")
emailNotifications Boolean @default(false)
desktopNotifications Boolean @default(false)
anonymousAnalytics Boolean @default(false)
autoLabeling Boolean @default(true)
languageDetection Boolean @default(true)
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@index([memoryEcho])
@@index([aiProvider])
@@ -261,35 +263,31 @@ model NoteEmbedding {
@@index([noteId])
}
// ============================================================================
// NEW MODELS FOR AGENTIC SYSTEM & LAB
// ============================================================================
model Agent {
id String @id @default(cuid())
name String
description String?
type String? @default("scraper") // scraper, researcher, monitor, custom
role String // System prompt / Persona
sourceUrls String? // JSON list of URLs to scrape
frequency String @default("manual") // manual, hourly, daily, weekly, monthly
type String? @default("scraper")
role String
sourceUrls String?
frequency String @default("manual")
lastRun DateTime?
nextRun DateTime?
scheduledTime String? @default("08:00") // HH:mm in user's local time
scheduledDay Int? // 0-6 for weekly (Mon=0), 1-31 for monthly
timezone String? // IANA timezone, e.g. "Europe/Paris"
isEnabled Boolean @default(true)
targetNotebookId String?
sourceNotebookId String? // For monitor type: notebook to watch
tools String? @default("[]") // JSON array: ["web_search", "note_search", ...]
maxSteps Int @default(10) // Max tool-use iterations
notifyEmail Boolean @default(false) // Send email notification after execution
includeImages Boolean @default(false) // Extract images from scraped pages
sourceNotebookId String?
tools String? @default("[]")
maxSteps Int @default(10)
notifyEmail Boolean @default(false)
includeImages Boolean @default(false)
userId String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
scheduledTime String? @default("08:00")
scheduledDay Int?
timezone String?
notebook Notebook? @relation(fields: [targetNotebookId], references: [id])
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
actions AgentAction[]
@@index([userId])
@@ -299,12 +297,12 @@ model Agent {
model AgentAction {
id String @id @default(cuid())
agentId String
status String @default("pending") // pending, running, success, failure
result String? // ID of the created note or summary message
log String? // Error message or execution log
input String? // JSON: prompt initial + config
toolLog String? // JSON: trace [{step, toolCalls, toolResults}]
tokensUsed Int? // Token consumption
status String @default("pending")
result String?
log String?
input String?
toolLog String?
tokensUsed Int?
createdAt DateTime @default(now())
agent Agent @relation(fields: [agentId], references: [id], onDelete: Cascade)
@@ -315,12 +313,12 @@ model Conversation {
id String @id @default(cuid())
title String?
userId String
notebookId String? // Optional context
notebookId String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
notebook Notebook? @relation(fields: [notebookId], references: [id])
messages ChatMessage[]
notebook Notebook? @relation(fields: [notebookId], references: [id])
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@index([userId])
@@index([notebookId])
@@ -329,7 +327,7 @@ model Conversation {
model ChatMessage {
id String @id @default(cuid())
conversationId String
role String // user, assistant, system
role String
content String
createdAt DateTime @default(now())
conversation Conversation @relation(fields: [conversationId], references: [id], onDelete: Cascade)
@@ -340,7 +338,7 @@ model ChatMessage {
model Canvas {
id String @id @default(cuid())
name String
data String // Large JSON blob for tldraw state
data String
userId String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@ -349,22 +347,18 @@ model Canvas {
@@index([userId])
}
// ============================================================================
// VISUAL WORKFLOW BUILDER
// ============================================================================
model Workflow {
id String @id @default(cuid())
name String
description String?
graph String @default("{\"nodes\":[],\"edges\":[]}") // JSON: React Flow nodes[] + edges[]
graph String @default("{\"nodes\":[],\"edges\":[]}")
isEnabled Boolean @default(true)
userId String
notebookId String? // default target notebook for Create Note nodes
notebookId String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
notebook Notebook? @relation(fields: [notebookId], references: [id])
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
runs WorkflowRun[]
@@index([userId])
@@ -374,8 +368,8 @@ model Workflow {
model WorkflowRun {
id String @id @default(cuid())
workflowId String
status String @default("running") // running, success, failure
log String? // JSON: per-node status + timing
status String @default("running")
log String?
createdAt DateTime @default(now())
workflow Workflow @relation(fields: [workflowId], references: [id], onDelete: Cascade)