fix: i18n complet — mobile, backlinks, undo/redo, content-area
- mobile-action-sheet.tsx: 15 chaînes → t() - wikilinks-backlinks-panel.tsx: 3 chaînes → t() + import useLanguage - note-content-area.tsx: 'Cliquez pour éditer' → t() - undo-redo-feedback-extension.ts: strings → options configurables - i18n FR/EN: 11 nouvelles clés (mobile.*, editor.*) - SlashPreview et SlashCommand: déjà OK (i18n via localCommands)
This commit is contained in:
@@ -5,6 +5,7 @@ import { Link2, ChevronRight, Loader2 } from 'lucide-react'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { motion, AnimatePresence } from 'motion/react'
|
||||
import { useRouter } from 'next/navigation'
|
||||
import { useLanguage } from '@/lib/i18n'
|
||||
|
||||
interface BacklinkNote {
|
||||
id: string
|
||||
@@ -26,6 +27,7 @@ interface WikilinksBacklinksPanelProps {
|
||||
}
|
||||
|
||||
export function WikilinksBacklinksPanel({ noteId, className }: WikilinksBacklinksPanelProps) {
|
||||
const { t } = useLanguage()
|
||||
const [backlinks, setBacklinks] = useState<Backlink[]>([])
|
||||
const [loading, setLoading] = useState(true)
|
||||
const [open, setOpen] = useState(true)
|
||||
@@ -54,7 +56,7 @@ export function WikilinksBacklinksPanel({ noteId, className }: WikilinksBacklink
|
||||
>
|
||||
<Link2 size={14} className="text-concrete shrink-0" />
|
||||
<span className="text-[10px] uppercase tracking-[0.25em] font-bold text-concrete group-hover:text-ink transition-colors">
|
||||
Liens entrants
|
||||
{t('editor.backlinks') || 'Liens entrants'}
|
||||
</span>
|
||||
<span className="text-[9px] bg-brand-accent/10 text-brand-accent px-1.5 py-0.5 rounded-full font-bold">
|
||||
{backlinks.length}
|
||||
@@ -78,7 +80,7 @@ export function WikilinksBacklinksPanel({ noteId, className }: WikilinksBacklink
|
||||
{loading && (
|
||||
<div className="flex items-center gap-2 py-2">
|
||||
<Loader2 size={12} className="animate-spin text-concrete" />
|
||||
<span className="text-[10px] text-concrete">Chargement…</span>
|
||||
<span className="text-[10px] text-concrete">{t('common.loading') || 'Chargement…'}</span>
|
||||
</div>
|
||||
)}
|
||||
{backlinks.map(bl => (
|
||||
@@ -92,7 +94,7 @@ export function WikilinksBacklinksPanel({ noteId, className }: WikilinksBacklink
|
||||
<Link2 size={10} className="text-brand-accent/60 mt-0.5 shrink-0" />
|
||||
<div className="min-w-0 flex-1">
|
||||
<p className="text-[11px] font-semibold text-ink truncate group-hover/bl:text-brand-accent transition-colors">
|
||||
{bl.sourceNote.title || '(Sans titre)'}
|
||||
{bl.sourceNote.title || (t('notes.untitled') || '(Sans titre)')}
|
||||
</p>
|
||||
{bl.contextSnippet && (
|
||||
<p className="text-[9px] text-concrete/70 mt-0.5 line-clamp-2 leading-relaxed">
|
||||
|
||||
Reference in New Issue
Block a user