fix: Modal-Titel in HelpTooltip übersetzt

- Modal-Titel verwendet jetzt Übersetzung (Hilfe/Help)
- Browser-Tooltip entfernt (nur noch custom Tooltip)
- useTranslations in HelpTooltip-Komponente integriert
This commit is contained in:
Hördle Bot
2025-12-04 01:09:48 +01:00
parent 65425ac15c
commit 4074cdfe00
3 changed files with 5 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
'use client';
import { useState, useRef, useEffect } from 'react';
import { useTranslations } from 'next-intl';
interface HelpTooltipProps {
shortText: string; // Text für Hover
@@ -9,6 +10,7 @@ interface HelpTooltipProps {
}
export default function HelpTooltip({ shortText, longText, position = 'top' }: HelpTooltipProps) {
const t = useTranslations('CuratorHelp');
const [showHover, setShowHover] = useState(false);
const [showModal, setShowModal] = useState(false);
const tooltipRef = useRef<HTMLDivElement>(null);
@@ -143,7 +145,7 @@ export default function HelpTooltip({ shortText, longText, position = 'top' }: H
onClick={(e) => e.stopPropagation()}
>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'start', marginBottom: '1rem' }}>
<h3 style={{ margin: 0, fontSize: '1.25rem', fontWeight: 'bold' }}>Hilfe</h3>
<h3 style={{ margin: 0, fontSize: '1.25rem', fontWeight: 'bold' }}>{t('modalTitle')}</h3>
<button
type="button"
onClick={() => setShowModal(false)}