[dyad] Adding internationalization with next-intl - wrote 19 file(s), renamed 5 file(s), added next-intl package(s)

This commit is contained in:
[dyad]
2026-01-18 16:26:22 +01:00
parent d33dceb08c
commit 918e2334f7
19 changed files with 656 additions and 93 deletions

View File

@@ -4,12 +4,14 @@ import { Button } from "@/components/ui/button";
import { Check, RotateCcw } from "lucide-react";
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
import { toast } from "sonner";
import { useTranslations } from "next-intl";
interface ActionButtonsProps {
onReset: () => void;
}
export function ActionButtons({ onReset }: ActionButtonsProps) {
const t = useTranslations("ActionButtons");
const handleApply = () => {
toast.info("Settings updated and will be used for all downloads.");
};
@@ -20,18 +22,18 @@ export function ActionButtons({ onReset }: ActionButtonsProps) {
<Tooltip>
<TooltipTrigger asChild>
<Button onClick={onReset} className="w-full" variant="outline">
<RotateCcw className="mr-2 h-4 w-4" /> Reset
<RotateCcw className="mr-2 h-4 w-4" /> {t('reset')}
</Button>
</TooltipTrigger>
<TooltipContent><p>Reset all settings to their default values.</p></TooltipContent>
<TooltipContent><p>{t('resetTooltip')}</p></TooltipContent>
</Tooltip>
<Tooltip>
<TooltipTrigger asChild>
<Button onClick={handleApply} className="w-full">
<Check className="mr-2 h-4 w-4" /> Apply
<Check className="mr-2 h-4 w-4" /> {t('apply')}
</Button>
</TooltipTrigger>
<TooltipContent><p>Confirm and apply all the settings above. This does not download the images.</p></TooltipContent>
<TooltipContent><p>{t('applyTooltip')}</p></TooltipContent>
</Tooltip>
</div>
</TooltipProvider>