chore: i18n

This commit is contained in:
zhom
2026-04-28 23:50:56 +04:00
parent 97d01e4b54
commit f8ce56481f
62 changed files with 6520 additions and 1322 deletions
+9 -4
View File
@@ -2,6 +2,7 @@
import { Command as CommandPrimitive } from "cmdk";
import type * as React from "react";
import { useTranslation } from "react-i18next";
import { LuSearch } from "react-icons/lu";
import {
@@ -30,19 +31,23 @@ function Command({
}
function CommandDialog({
title = "Command Palette",
description = "Search for a command to run...",
title,
description,
children,
...props
}: React.ComponentProps<typeof Dialog> & {
title?: string;
description?: string;
}) {
const { t } = useTranslation();
const resolvedTitle = title ?? t("common.commandPalette.title");
const resolvedDescription =
description ?? t("common.commandPalette.description");
return (
<Dialog {...props}>
<DialogHeader className="sr-only">
<DialogTitle>{title}</DialogTitle>
<DialogDescription>{description}</DialogDescription>
<DialogTitle>{resolvedTitle}</DialogTitle>
<DialogDescription>{resolvedDescription}</DialogDescription>
</DialogHeader>
<DialogContent className="overflow-hidden p-0">
<Command className="[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">