translation added

This commit is contained in:
Samandar Turgunboyev
2025-11-06 10:38:52 +05:00
parent b3401085c7
commit 08ed9f7f19
8 changed files with 122 additions and 24 deletions

38
package-lock.json generated
View File

@@ -71,6 +71,7 @@
"husky": "^9.1.7",
"lint-staged": "^16.2.1",
"prettier": "^3.6.2",
"tailwind-scrollbar": "^4.0.2",
"tw-animate-css": "^1.4.0",
"typescript": "~5.9.2",
"typescript-eslint": "^8.44.1",
@@ -3056,6 +3057,13 @@
"integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==",
"license": "MIT"
},
"node_modules/@types/prismjs": {
"version": "1.26.5",
"resolved": "https://registry.npmjs.org/@types/prismjs/-/prismjs-1.26.5.tgz",
"integrity": "sha512-AUZTa7hQ2KY5L7AmtSiqxlhWxb4ina0yd8hNbl4TWuqnv/pFP0nDMb3YrfSBf4hJVGLh2YEIBfKaBW/9UEl6IQ==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/prop-types": {
"version": "15.7.15",
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz",
@@ -5642,6 +5650,20 @@
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"node_modules/prism-react-renderer": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/prism-react-renderer/-/prism-react-renderer-2.4.1.tgz",
"integrity": "sha512-ey8Ls/+Di31eqzUxC46h8MksNuGx/n0AAC8uKpwFau4RPDYLuE3EXTp8N8G2vX2N7UC/+IXeNUnlWBGGcAG+Ig==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/prismjs": "^1.26.0",
"clsx": "^2.0.0"
},
"peerDependencies": {
"react": ">=16.0.0"
}
},
"node_modules/prop-types": {
"version": "15.8.1",
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
@@ -6308,6 +6330,22 @@
"url": "https://github.com/sponsors/dcastil"
}
},
"node_modules/tailwind-scrollbar": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/tailwind-scrollbar/-/tailwind-scrollbar-4.0.2.tgz",
"integrity": "sha512-wAQiIxAPqk0MNTPptVe/xoyWi27y+NRGnTwvn4PQnbvB9kp8QUBiGl/wsfoVBHnQxTmhXJSNt9NHTmcz9EivFA==",
"dev": true,
"license": "MIT",
"dependencies": {
"prism-react-renderer": "^2.4.1"
},
"engines": {
"node": ">=12.13.0"
},
"peerDependencies": {
"tailwindcss": "4.x"
}
},
"node_modules/tailwindcss": {
"version": "4.1.13",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.13.tgz",

View File

@@ -75,6 +75,7 @@
"husky": "^9.1.7",
"lint-staged": "^16.2.1",
"prettier": "^3.6.2",
"tailwind-scrollbar": "^4.0.2",
"tw-animate-css": "^1.4.0",
"typescript": "~5.9.2",
"typescript-eslint": "^8.44.1",

View File

@@ -1,5 +1,5 @@
@import 'tailwindcss';
@import 'tw-animate-css';
@import "tailwindcss";
@import "tw-animate-css";
@custom-variant dark (&:is(.dark *));
@@ -118,3 +118,27 @@
@apply bg-background text-foreground;
}
}
/* ==== Custom Sidebar Scrollbar ==== */
.sidebar-scroll {
scrollbar-width: thin; /* Firefox uchun */
scrollbar-color: #4b5563 #1f2937; /* Thumb va track rangi */
}
/* Chrome, Edge, Safari uchun */
.sidebar-scroll::-webkit-scrollbar {
width: 6px; /* juda nozik scroll */
}
.sidebar-scroll::-webkit-scrollbar-track {
background: #1f2937; /* fon (track) */
}
.sidebar-scroll::-webkit-scrollbar-thumb {
background-color: #4b5563; /* thumb rangi */
border-radius: 9999px; /* yumaloq scroll */
}
.sidebar-scroll::-webkit-scrollbar-thumb:hover {
background-color: #6b7280; /* hover effekti */
}

View File

@@ -216,7 +216,7 @@ const StepTwo = ({
name="desc"
render={({ field }) => (
<FormItem>
<Label>{t("Qisqacha ta'rif (UZ)")}</Label>
<Label>{t("Qisqacha ta'rif")}</Label>
<FormControl>
<Textarea {...field} placeholder={t("Qisqacha ta'rif")} />
</FormControl>
@@ -231,11 +231,11 @@ const StepTwo = ({
name="desc_ru"
render={({ field }) => (
<FormItem>
<Label>{t("Qisqacha ta'rif (RU)")}</Label>
<Label>{t("Qisqacha ta'rif")} (ru)</Label>
<FormControl>
<Textarea
{...field}
placeholder={t("Qisqacha ta'rif (rus tilida)")}
placeholder={t("Qisqacha ta'rif") + " (ru)"}
/>
</FormControl>
<FormMessage />
@@ -254,7 +254,7 @@ const StepTwo = ({
render={({ field }) => (
<FormItem>
<FormControl>
<Input {...field} placeholder={t("Teg (UZ)")} />
<Input {...field} placeholder={t("Teg")} />
</FormControl>
<FormMessage />
</FormItem>
@@ -266,7 +266,7 @@ const StepTwo = ({
render={({ field }) => (
<FormItem>
<FormControl>
<Input {...field} placeholder={t("Teg (RU)")} />
<Input {...field} placeholder={t("Teg") + " (ru)"} />
</FormControl>
<FormMessage />
</FormItem>
@@ -301,7 +301,7 @@ const StepTwo = ({
>
<div className="flex justify-between items-center">
<p className="text-sm text-gray-300">
{t("Bolim")} #{index + 1}
{t(" ")} #{index + 1}
</p>
<button
type="button"
@@ -364,7 +364,7 @@ const StepTwo = ({
name={`sections.${index}.text`}
render={({ field }) => (
<FormItem>
<Label>{t("Matn (UZ)")}</Label>
<Label>{t("Matn")}</Label>
<FormControl>
<Textarea {...field} placeholder={t("Matn kiriting")} />
</FormControl>
@@ -378,9 +378,9 @@ const StepTwo = ({
name={`sections.${index}.text_ru`}
render={({ field }) => (
<FormItem>
<Label>{t("Matn (RU)")}</Label>
<Label>{t("Matn") + " (ru)"}</Label>
<FormControl>
<Textarea {...field} placeholder={t("Matn (rus tilida)")} />
<Textarea {...field} placeholder={t("Matn") + " (ru)"} />
</FormControl>
</FormItem>
)}

View File

@@ -1455,13 +1455,13 @@ const StepOne = ({
<div className="flex gap-3 items-end flex-wrap">
<Input
id="extra_service_name"
placeholder={t("Xizmat nomi (UZ)")}
placeholder={t("Xizmat nomi")}
className="h-12 !text-md flex-1 min-w-[200px]"
/>
<Input
id="extra_service_name_ru"
placeholder={t("Xizmat nomi (RU)")}
placeholder={t("Xizmat nomi") + " (ru)"}
className="h-12 !text-md flex-1 min-w-[200px]"
/>
@@ -1518,7 +1518,7 @@ const StepOne = ({
>
<span>
{item.name} {" "}
<strong>{formatPrice(item.price)} som</strong>
<strong>{formatPrice(item.price, true)}</strong>
</span>
<button
type="button"
@@ -1542,17 +1542,16 @@ const StepOne = ({
<div className="flex gap-3 items-end flex-wrap">
<Input
id="paid_service_name"
placeholder={t("Xizmat nomi (UZ)")}
placeholder={t("Xizmat nomi")}
className="h-12 !text-md flex-1 min-w-[200px]"
/>
<Input
id="paid_service_name_ru"
placeholder={t("Xizmat nomi (RU)")}
placeholder={t("Xizmat nomi") + " (ru)"}
className="h-12 !text-md flex-1 min-w-[200px]"
/>
{/* Narx maydoni */}
<Input
id="paid_service_price"
type="text"

View File

@@ -533,5 +533,23 @@
"Sizga tizimga kirishga ruxsat berilmagan": "Вам не разрешен доступ к системе.",
"Оmmaviy": "Публичный",
"Shaxsiy": "Личный",
"Status o'zgartirildi": "Статус изменён"
"Status o'zgartirildi": "Статус изменён",
"Chiqish": "Выход",
"Savollar ro'yxati": "Список вопросов",
"Pul olish so'rovlari": "Запросы на получение средств",
"Bepul xizmatlar": "Бесплатные услуги",
"Qulaylik tanlang": "Выберите удобство",
"Mavjud qulayliklar": "Доступные удобства",
"Avval xususiyat tanlang": "Сначала выберите свойство",
"Avval mehmonxona xususiyatini tanlang": "Сначала выберите свойство отеля.",
"Yangilik bolimlari": "Новостные разделы",
"Qisqacha ta'rif": "Краткое описание",
"Teglar": "Теги",
"Teg": "Тег",
"Teg qo'shish": "Добавить тег",
"Bolim": "Отдел",
"Rasm tanlash": "Выбрать изображение",
"Matn": "Текст",
"Matn kiriting": "Введите текст",
"Bolim qoshish": "Добавить раздел"
}

View File

@@ -534,5 +534,23 @@
"Sizga tizimga kirishga ruxsat berilmagan": "Sizga tizimga kirishga ruxsat berilmagan",
"Оmmaviy": "Ommaviy",
"Shaxsiy": "Shaxsiy",
"Status o'zgartirildi": "Status o'zgartirildi"
"Status o'zgartirildi": "Status o'zgartirildi",
"Chiqish": "Chiqish",
"Savollar ro'yxati": "Savollar ro'yxati",
"Pul olish so'rovlari": "Pul olish so'rovlari",
"Bepul xizmatlar": "Bepul xizmatlar",
"Qulaylik tanlang": "Qulaylik tanlang",
"Mavjud qulayliklar": "Mavjud qulayliklar",
"Avval xususiyat tanlang": "Avval xususiyat tanlang",
"Avval mehmonxona xususiyatini tanlang": "Avval mehmonxona xususiyatini tanlang",
"Yangilik bolimlari": "Yangilik bolimlari",
"Qisqacha ta'rif": "Qisqacha ta'rif",
"Teglar": "Teglar",
"Teg": "Teg",
"Teg qo'shish": "Teg qo'shish",
"Bolim": "Bolim",
"Rasm tanlash": "Rasm tanlash",
"Matn": "Matn",
"Matn kiriting": "Matn kiriting",
"Bolim qoshish": "Bolim qoshish"
}

View File

@@ -106,7 +106,7 @@ const MENU_ITEMS = [
path: "/faq",
roles: ["moderator", "admin", "superuser"],
children: [
{ label: "Savollar royxati", path: "/faq" },
{ label: "Savollar ro'yxati", path: "/faq" },
{ label: "Savollar kategoriyasi", path: "/faq/categories" },
],
},
@@ -149,7 +149,7 @@ const MENU_ITEMS = [
],
},
{
label: "Pul olish sorovlari",
label: "Pul olish so'rovlari",
icon: Wallet,
path: "/withdraw/list",
roles: ["buxgalter", "moderator", "tour_admin"],
@@ -204,8 +204,8 @@ export function Sidebar({ role }: SidebarProps) {
};
const MenuList = (
<div className="flex flex-col h-full justify-between">
<ul className="p-2 space-y-1 flex-1 overflow-y-auto">
<div className="flex flex-col h-full">
<ul className="p-2 space-y-1 flex-1 overflow-y-auto scrollbar-thin scrollbar-thumb-gray-600 scrollbar-track-gray-800 hover:scrollbar-thumb-gray-500">
{visibleMenu.map(({ label, icon: Icon, path, children }) => {
const isActive = active.startsWith(path);
const isOpen = openMenus.includes(label);
@@ -281,7 +281,7 @@ export function Sidebar({ role }: SidebarProps) {
);
return (
<div className="lg:border fixed max-lg:sticky">
<div className="lg:border fixed max-lg:sticky overflow-y-auto sidebar-scroll">
{/* Mobil versiya */}
<div className="lg:hidden flex items-center justify-end bg-gray-900 p-4 sticky top-0 z-50">
<Sheet open={isSheetOpen} onOpenChange={setIsSheetOpen}>