diff --git a/frontend/src/app/(dashboard)/advanced/components/RebuildEmbeddings.tsx b/frontend/src/app/(dashboard)/advanced/components/RebuildEmbeddings.tsx index 729d870..6a04596 100644 --- a/frontend/src/app/(dashboard)/advanced/components/RebuildEmbeddings.tsx +++ b/frontend/src/app/(dashboard)/advanced/components/RebuildEmbeddings.tsx @@ -123,10 +123,10 @@ export function RebuildEmbeddings() { - {t.advanced.rebuildEmbeddings} + {t('advanced.rebuildEmbeddings')} - {t.advanced.rebuildEmbeddingsDesc} + {t('advanced.rebuildEmbeddingsDesc')} @@ -134,25 +134,25 @@ export function RebuildEmbeddings() { {!isRebuildActive && (
- +

{mode === 'existing' - ? t.advanced.rebuild.existingDesc - : t.advanced.rebuild.allDesc} + ? t('advanced.rebuild.existingDesc') + : t('advanced.rebuild.allDesc')}

- {t.advanced.rebuild.include} + {t('advanced.rebuild.include')}
setIncludeSources(checked === true)} />
@@ -171,7 +171,7 @@ export function RebuildEmbeddings() { onCheckedChange={(checked) => setIncludeNotes(checked === true)} />
@@ -181,7 +181,7 @@ export function RebuildEmbeddings() { onCheckedChange={(checked) => setIncludeInsights(checked === true)} />
@@ -189,7 +189,7 @@ export function RebuildEmbeddings() { - {t.advanced.rebuild.selectOneError} + {t('advanced.rebuild.selectOneError')} )} @@ -203,10 +203,10 @@ export function RebuildEmbeddings() { {rebuildMutation.isPending ? ( <> - {t.advanced.rebuild.starting} + {t('advanced.rebuild.starting')} ) : ( - t.advanced.rebuild.startBtn + t('advanced.rebuild.startBtn') )} @@ -214,7 +214,7 @@ export function RebuildEmbeddings() { - {t.advanced.rebuild.failed}: {(rebuildMutation.error as Error)?.message || t.common.error} + {t('advanced.rebuild.failed')}: {(rebuildMutation.error as Error)?.message || t('common.error')} )} @@ -232,21 +232,21 @@ export function RebuildEmbeddings() { {status.status === 'failed' && }
- {status.status === 'queued' && t.advanced.rebuild.queued} - {status.status === 'running' && t.advanced.rebuild.running} - {status.status === 'completed' && t.advanced.rebuild.completed} - {status.status === 'failed' && t.advanced.rebuild.failed} + {status.status === 'queued' && t('advanced.rebuild.queued')} + {status.status === 'running' && t('advanced.rebuild.running')} + {status.status === 'completed' && t('advanced.rebuild.completed')} + {status.status === 'failed' && t('advanced.rebuild.failed')} {status.status === 'running' && ( - {t.advanced.rebuild.leavePageHint} + {t('advanced.rebuild.leavePageHint')} )}
{(status.status === 'completed' || status.status === 'failed') && ( )}
@@ -254,9 +254,9 @@ export function RebuildEmbeddings() { {progressData && (
- {t.common.progress} + {t('common.progress')} - {t.advanced.rebuild.itemsProcessed + {t('advanced.rebuild.itemsProcessed') .replace('{processed}', processedItems.toString()) .replace('{total}', totalItems.toString()) .replace('{percent}', progressPercent.toFixed(1))} @@ -265,7 +265,7 @@ export function RebuildEmbeddings() { {failedItems > 0 && (

- ⚠️ {t.advanced.rebuild.failedItems.replace('{count}', failedItems.toString())} + ⚠️ {t('advanced.rebuild.failedItems').replace('{count}', failedItems.toString())}

)}
@@ -274,19 +274,19 @@ export function RebuildEmbeddings() { {stats && (
-

{t.navigation.sources}

+

{t('navigation.sources')}

{sourcesProcessed}

-

{t.common.notes}

+

{t('common.notes')}

{notesProcessed}

-

{t.common.insights}

+

{t('common.insights')}

{insightsProcessed}

-

{t.advanced.rebuild.time}

+

{t('advanced.rebuild.time')}

{processingTimeSeconds !== undefined ? `${processingTimeSeconds.toFixed(1)}s` : '—'}

@@ -303,9 +303,9 @@ export function RebuildEmbeddings() { {status.started_at && (
-

{t.common.created.replace('{time}', new Date(status.started_at).toLocaleString())}

+

{t('common.created').replace('{time}', new Date(status.started_at).toLocaleString())}

{status.completed_at && ( -

{t.notebooks.updated}: {new Date(status.completed_at).toLocaleString()}

+

{t('notebooks.updated')}: {new Date(status.completed_at).toLocaleString()}

)}
)} @@ -315,23 +315,23 @@ export function RebuildEmbeddings() { {/* Help Section */} - {t.advanced.rebuild.whenToRebuild} + {t('advanced.rebuild.whenToRebuild')} -

{t.advanced.rebuild.whenToRebuildAns}

+

{t('advanced.rebuild.whenToRebuildAns')}

- {t.advanced.rebuild.howLong} + {t('advanced.rebuild.howLong')} -

{t.advanced.rebuild.howLongAns}

+

{t('advanced.rebuild.howLongAns')}

- {t.advanced.rebuild.isSafe} + {t('advanced.rebuild.isSafe')} -

{t.advanced.rebuild.isSafeAns}

+

{t('advanced.rebuild.isSafeAns')}

diff --git a/frontend/src/app/(dashboard)/advanced/components/SystemInfo.tsx b/frontend/src/app/(dashboard)/advanced/components/SystemInfo.tsx index 2b411d4..1390822 100644 --- a/frontend/src/app/(dashboard)/advanced/components/SystemInfo.tsx +++ b/frontend/src/app/(dashboard)/advanced/components/SystemInfo.tsx @@ -34,8 +34,8 @@ export function SystemInfo() { return (
-

{t.advanced.systemInfo}

-
{t.common.loading}
+

{t('advanced.systemInfo')}

+
{t('common.loading')}
) @@ -44,37 +44,37 @@ export function SystemInfo() { return (
-

{t.advanced.systemInfo}

+

{t('advanced.systemInfo')}

{/* Current Version */}
- {t.advanced.currentVersion} - {config?.version || t.advanced.unknown} + {t('advanced.currentVersion')} + {config?.version || t('advanced.unknown')}
{/* Latest Version */} {config?.latestVersion && (
- {t.advanced.latestVersion} + {t('advanced.latestVersion')} {config.latestVersion}
)} {/* Update Status */}
- {t.advanced.status} + {t('advanced.status')} {config?.hasUpdate ? ( - {t.advanced.updateAvailable.replace('{version}', config.latestVersion || '')} + {t('advanced.updateAvailable').replace('{version}', config.latestVersion || '')} ) : config?.latestVersion ? ( - {t.advanced.upToDate} + {t('advanced.upToDate')} ) : ( - {t.advanced.unknown} + {t('advanced.unknown')} )}
@@ -88,7 +88,7 @@ export function SystemInfo() { rel="noopener noreferrer" className="text-sm text-primary hover:underline inline-flex items-center gap-1" > - {t.advanced.viewOnGithub} + {t('advanced.viewOnGithub')} - {t.advanced.updateCheckFailed} + {t('advanced.updateCheckFailed')}
)}
diff --git a/frontend/src/app/(dashboard)/advanced/page.tsx b/frontend/src/app/(dashboard)/advanced/page.tsx index d20331d..7eb14b2 100644 --- a/frontend/src/app/(dashboard)/advanced/page.tsx +++ b/frontend/src/app/(dashboard)/advanced/page.tsx @@ -13,9 +13,9 @@ export default function AdvancedPage() {
-

{t.advanced.title}

+

{t('advanced.title')}

- {t.advanced.desc} + {t('advanced.desc')}

diff --git a/frontend/src/app/(dashboard)/notebooks/[id]/page.tsx b/frontend/src/app/(dashboard)/notebooks/[id]/page.tsx index 16792a2..09085fe 100644 --- a/frontend/src/app/(dashboard)/notebooks/[id]/page.tsx +++ b/frontend/src/app/(dashboard)/notebooks/[id]/page.tsx @@ -119,8 +119,8 @@ export default function NotebookPage() { return (
-

{t.notebooks.notFound}

-

{t.notebooks.notFoundDesc}

+

{t('notebooks.notFound')}

+

{t('notebooks.notFoundDesc')}

) @@ -142,15 +142,15 @@ export default function NotebookPage() { - {t.navigation.sources} + {t('navigation.sources')} - {t.common.notes} + {t('common.notes')} - {t.common.chat} + {t('common.chat')} diff --git a/frontend/src/app/(dashboard)/notebooks/components/ChatColumn.tsx b/frontend/src/app/(dashboard)/notebooks/components/ChatColumn.tsx index 181e630..befc6f9 100644 --- a/frontend/src/app/(dashboard)/notebooks/components/ChatColumn.tsx +++ b/frontend/src/app/(dashboard)/notebooks/components/ChatColumn.tsx @@ -83,8 +83,8 @@ export function ChatColumn({ notebookId, contextSelections, sources, sourcesLoad
-

{t.chat.unableToLoadChat}

-

{t.common.refreshPage || 'Please try refreshing the page'}

+

{t('chat.unableToLoadChat')}

+

{t('common.refreshPage') || 'Please try refreshing the page'}

@@ -93,7 +93,7 @@ export function ChatColumn({ notebookId, contextSelections, sources, sourcesLoad return ( - {isEditing ? t.sources.editNote : t.sources.createNote} + {isEditing ? t('sources.editNote') : t('sources.createNote')}
{isEditing && noteLoading ? (
- {t.common.loading} + {t('common.loading')}
) : ( <> @@ -139,8 +139,8 @@ export function NoteEditorDialog({ open, onOpenChange, notebookId, note }: NoteE name="title" value={watchTitle ?? ''} onSave={(value) => setValue('title', value || '')} - placeholder={t.sources.addTitle} - emptyText={t.sources.untitledNote} + placeholder={t('sources.addTitle')} + emptyText={t('sources.untitledNote')} className="text-xl font-semibold" inputClassName="text-xl font-semibold" /> @@ -160,7 +160,7 @@ export function NoteEditorDialog({ open, onOpenChange, notebookId, note }: NoteE value={field.value} onChange={field.onChange} height={420} - placeholder={t.sources.writeNotePlaceholder} + placeholder={t('sources.writeNotePlaceholder')} className={cn( "w-full h-full min-h-[420px] max-h-[500px] overflow-hidden [&_.w-md-editor]:!static [&_.w-md-editor]:!w-full [&_.w-md-editor]:!h-full [&_.w-md-editor-content]:overflow-y-auto", !isEditorFullscreen && "rounded-md border" @@ -177,17 +177,17 @@ export function NoteEditorDialog({ open, onOpenChange, notebookId, note }: NoteE
diff --git a/frontend/src/app/(dashboard)/notebooks/components/NotebookCard.tsx b/frontend/src/app/(dashboard)/notebooks/components/NotebookCard.tsx index aa25e2c..a8937ae 100644 --- a/frontend/src/app/(dashboard)/notebooks/components/NotebookCard.tsx +++ b/frontend/src/app/(dashboard)/notebooks/components/NotebookCard.tsx @@ -55,7 +55,7 @@ export function NotebookCard({ notebook }: NotebookCardProps) { {notebook.archived && ( - {t.notebooks.archived} + {t('notebooks.archived')} )}
@@ -76,12 +76,12 @@ export function NotebookCard({ notebook }: NotebookCardProps) { {notebook.archived ? ( <> - {t.notebooks.unarchive} + {t('notebooks.unarchive')} ) : ( <> - {t.notebooks.archive} + {t('notebooks.archive')} )} @@ -93,7 +93,7 @@ export function NotebookCard({ notebook }: NotebookCardProps) { className="text-red-600" > - {t.common.delete} + {t('common.delete')} @@ -102,11 +102,11 @@ export function NotebookCard({ notebook }: NotebookCardProps) { - {notebook.description || t.chat.noDescription} + {notebook.description || t('chat.noDescription')}
- {t.common.updated.replace('{time}', formatDistanceToNow(new Date(notebook.updated), { + {t('common.updated').replace('{time}', formatDistanceToNow(new Date(notebook.updated), { addSuffix: true, locale: getDateLocale(language) }))} diff --git a/frontend/src/app/(dashboard)/notebooks/components/NotebookDeleteDialog.tsx b/frontend/src/app/(dashboard)/notebooks/components/NotebookDeleteDialog.tsx index 202f7ed..c99ca36 100644 --- a/frontend/src/app/(dashboard)/notebooks/components/NotebookDeleteDialog.tsx +++ b/frontend/src/app/(dashboard)/notebooks/components/NotebookDeleteDialog.tsx @@ -69,9 +69,9 @@ export function NotebookDeleteDialog({ - {t.notebooks.deleteNotebook} + {t('notebooks.deleteNotebook')} - {t.notebooks.deleteNotebookDesc.replace('{name}', notebookName)} + {t('notebooks.deleteNotebookDesc').replace('{name}', notebookName)} @@ -79,11 +79,11 @@ export function NotebookDeleteDialog({ {isLoadingPreview ? (
- {t.notebooks.deleteNotebookLoading} + {t('notebooks.deleteNotebookLoading')}
) : previewError ? (
- {t.common.error}: {previewError.message || 'Failed to load preview'} + {t('common.error')}: {previewError.message || 'Failed to load preview'}
) : preview ? ( <> @@ -91,13 +91,13 @@ export function NotebookDeleteDialog({
{preview.note_count > 0 ? (

- {t.notebooks.deleteNotebookNotes.replace( + {t('notebooks.deleteNotebookNotes').replace( '{count}', String(preview.note_count) )}

) : ( -

{t.notebooks.deleteNotebookNoNotes}

+

{t('notebooks.deleteNotebookNoNotes')}

)}
@@ -105,7 +105,7 @@ export function NotebookDeleteDialog({ {preview.shared_source_count > 0 && (

- {t.notebooks.deleteNotebookSharedSources.replace( + {t('notebooks.deleteNotebookSharedSources').replace( '{count}', String(preview.shared_source_count) )} @@ -116,7 +116,7 @@ export function NotebookDeleteDialog({ {/* No sources message */} {preview.exclusive_source_count === 0 && preview.shared_source_count === 0 && (

-

{t.notebooks.deleteNotebookNoSources}

+

{t('notebooks.deleteNotebookNoSources')}

)} @@ -124,7 +124,7 @@ export function NotebookDeleteDialog({ {preview.exclusive_source_count > 0 && (

- {t.notebooks.deleteNotebookExclusiveSources.replace( + {t('notebooks.deleteNotebookExclusiveSources').replace( '{count}', String(preview.exclusive_source_count) )} @@ -137,13 +137,13 @@ export function NotebookDeleteDialog({

@@ -154,7 +154,7 @@ export function NotebookDeleteDialog({
- {t.common.cancel} + {t('common.cancel')} - {t.common.deleting} + {t('common.deleting')} ) : ( - t.common.delete + t('common.delete') )} diff --git a/frontend/src/app/(dashboard)/notebooks/components/NotebookHeader.tsx b/frontend/src/app/(dashboard)/notebooks/components/NotebookHeader.tsx index 76e36e6..43d452c 100644 --- a/frontend/src/app/(dashboard)/notebooks/components/NotebookHeader.tsx +++ b/frontend/src/app/(dashboard)/notebooks/components/NotebookHeader.tsx @@ -61,10 +61,10 @@ export function NotebookHeader({ notebook }: NotebookHeaderProps) { onSave={handleUpdateName} className="text-2xl font-bold" inputClassName="text-2xl font-bold" - placeholder={t.notebooks.namePlaceholder} + placeholder={t('notebooks.namePlaceholder')} /> {notebook.archived && ( - {t.notebooks.archived} + {t('notebooks.archived')} )}
@@ -76,12 +76,12 @@ export function NotebookHeader({ notebook }: NotebookHeaderProps) { {notebook.archived ? ( <> - {t.notebooks.unarchive} + {t('notebooks.unarchive')} ) : ( <> - {t.notebooks.archive} + {t('notebooks.archive')} )} @@ -92,7 +92,7 @@ export function NotebookHeader({ notebook }: NotebookHeaderProps) { className="text-red-600 hover:text-red-700" > - {t.common.delete} + {t('common.delete')}
@@ -104,14 +104,14 @@ export function NotebookHeader({ notebook }: NotebookHeaderProps) { onSave={handleUpdateDescription} className="text-muted-foreground" inputClassName="text-muted-foreground" - placeholder={t.notebooks.addDescription} + placeholder={t('notebooks.addDescription')} multiline - emptyText={t.notebooks.addDescription} + emptyText={t('notebooks.addDescription')} />
- {t.common.created.replace('{time}', formatDistanceToNow(new Date(notebook.created), { addSuffix: true, locale: dfLocale }))} • - {t.common.updated.replace('{time}', formatDistanceToNow(new Date(notebook.updated), { addSuffix: true, locale: dfLocale }))} + {t('common.created').replace('{time}', formatDistanceToNow(new Date(notebook.created), { addSuffix: true, locale: dfLocale }))} • + {t('common.updated').replace('{time}', formatDistanceToNow(new Date(notebook.updated), { addSuffix: true, locale: dfLocale }))}
diff --git a/frontend/src/app/(dashboard)/notebooks/components/NotebookList.tsx b/frontend/src/app/(dashboard)/notebooks/components/NotebookList.tsx index a09efa8..c51ba4e 100644 --- a/frontend/src/app/(dashboard)/notebooks/components/NotebookList.tsx +++ b/frontend/src/app/(dashboard)/notebooks/components/NotebookList.tsx @@ -45,8 +45,8 @@ export function NotebookList({ return ( diff --git a/frontend/src/app/(dashboard)/notebooks/components/NotesColumn.tsx b/frontend/src/app/(dashboard)/notebooks/components/NotesColumn.tsx index bb915f2..cda02b3 100644 --- a/frontend/src/app/(dashboard)/notebooks/components/NotesColumn.tsx +++ b/frontend/src/app/(dashboard)/notebooks/components/NotesColumn.tsx @@ -51,8 +51,8 @@ export function NotesColumn({ // Collapsible column state const { notesCollapsed, toggleNotes } = useNotebookColumnsStore() const collapseButton = useMemo( - () => createCollapseButton(toggleNotes, t.common.notes), - [toggleNotes, t.common.notes] + () => createCollapseButton(toggleNotes, t('common.notes')), + [toggleNotes, t('common.notes')] ) const handleDeleteClick = (noteId: string) => { @@ -78,12 +78,12 @@ export function NotesColumn({ isCollapsed={notesCollapsed} onToggle={toggleNotes} collapsedIcon={StickyNote} - collapsedLabel={t.common.notes} + collapsedLabel={t('common.notes')} >
- {t.common.notes} + {t('common.notes')}
{collapseButton}
@@ -108,8 +108,8 @@ export function NotesColumn({ ) : !notes || notes.length === 0 ? ( ) : (
@@ -127,7 +127,7 @@ export function NotesColumn({ )} - {note.note_type === 'ai' ? t.common.aiGenerated : t.common.human} + {note.note_type === 'ai' ? t('common.aiGenerated') : t('common.human')}
@@ -171,7 +171,7 @@ export function NotesColumn({ className="text-red-600 focus:text-red-600" > - {t.notebooks.deleteNote} + {t('notebooks.deleteNote')} @@ -212,9 +212,9 @@ export function NotesColumn({ createCollapseButton(toggleSources, t.navigation.sources), - [toggleSources, t.navigation.sources] + () => createCollapseButton(toggleSources, t('navigation.sources')), + [toggleSources, t('navigation.sources')] ) // Scroll container ref for infinite scroll @@ -151,29 +151,29 @@ export function SourcesColumn({ isCollapsed={sourcesCollapsed} onToggle={toggleSources} collapsedIcon={FileText} - collapsedLabel={t.navigation.sources} + collapsedLabel={t('navigation.sources')} >
- {t.navigation.sources} + {t('navigation.sources')}
{ setDropdownOpen(false); setAddDialogOpen(true); }}> - {t.sources.addSource} + {t('sources.addSource')} { setDropdownOpen(false); setAddExistingDialogOpen(true); }}> - {t.sources.addExistingTitle} + {t('sources.addExistingTitle')} @@ -190,8 +190,8 @@ export function SourcesColumn({ ) : !sources || sources.length === 0 ? ( ) : (
@@ -240,9 +240,9 @@ export function SourcesColumn({
-

{t.notebooks.title}

+

{t('notebooks.title')}

@@ -64,14 +64,14 @@ export default function NotebooksPage() { name="notebook-search" value={searchTerm} onChange={(event) => setSearchTerm(event.target.value)} - placeholder={t.notebooks.searchPlaceholder} + placeholder={t('notebooks.searchPlaceholder')} autoComplete="off" - aria-label={t.common.accessibility?.searchNotebooks || "Search notebooks"} + aria-label={t('common.accessibility.searchNotebooks') || "Search notebooks"} className="w-full sm:w-64" />
@@ -80,21 +80,21 @@ export default function NotebooksPage() { setCreateDialogOpen(true) : undefined} - actionLabel={!isSearching ? t.notebooks.newNotebook : undefined} + actionLabel={!isSearching ? t('notebooks.newNotebook') : undefined} /> {hasArchived && ( )}
diff --git a/frontend/src/app/(dashboard)/podcasts/page.tsx b/frontend/src/app/(dashboard)/podcasts/page.tsx index 8616464..2dddabc 100644 --- a/frontend/src/app/(dashboard)/podcasts/page.tsx +++ b/frontend/src/app/(dashboard)/podcasts/page.tsx @@ -29,18 +29,18 @@ export default function PodcastsPage() {
-

{t.podcasts.listTitle}

+

{t('podcasts.listTitle')}

- {t.podcasts.listDesc} + {t('podcasts.listDesc')}

{hasUnconfiguredProfiles ? ( - {t.podcasts.setupRequired} + {t('podcasts.setupRequired')} - {t.podcasts.setupRequiredDesc} + {t('podcasts.setupRequiredDesc')} ) : null} @@ -51,15 +51,15 @@ export default function PodcastsPage() { className="space-y-6" >
-

{t.podcasts.chooseAView}

- +

{t('podcasts.chooseAView')}

+ - {t.podcasts.episodesTab} + {t('podcasts.episodesTab')} - {t.podcasts.templatesTab} + {t('podcasts.templatesTab')}
diff --git a/frontend/src/app/(dashboard)/search/page.tsx b/frontend/src/app/(dashboard)/search/page.tsx index ffd3fd3..8c86429 100644 --- a/frontend/src/app/(dashboard)/search/page.tsx +++ b/frontend/src/app/(dashboard)/search/page.tsx @@ -72,7 +72,7 @@ export default function SearchPage() { }, [availableModels]) const resolveModelName = (id?: string | null) => { - if (!id) return t.searchPage.notSet + if (!id) return t('searchPage.notSet') return modelNameById.get(id) ?? id } @@ -159,19 +159,19 @@ export default function SearchPage() { return (
-

{t.searchPage.askAndSearch}

+

{t('searchPage.askAndSearch')}

setActiveTab(v as 'ask' | 'search')} className="w-full space-y-6">
-

{t.searchPage.chooseAMode}

- +

{t('searchPage.chooseAMode')}

+ - {t.searchPage.askBeta} + {t('searchPage.askBeta')} - {t.searchPage.search} + {t('searchPage.search')}
@@ -179,19 +179,19 @@ export default function SearchPage() { - {t.searchPage.askYourKb} + {t('searchPage.askYourKb')}

- {t.searchPage.askYourKbDesc} + {t('searchPage.askYourKbDesc')}

{/* Question Input */}
- +