Genel Translate Problemleri

This commit is contained in:
Sedat ÖZTÜRK 2025-05-28 16:47:54 +03:00
parent 2858089c52
commit 9671116426
15 changed files with 378 additions and 165 deletions

View file

@ -582,6 +582,12 @@
"en": "Delete", "en": "Delete",
"tr": "Sil" "tr": "Sil"
}, },
{
"resourceName": "Platform",
"key": "DeleteConfirmation",
"en": "Silmek istediğinize emin misiniz?",
"tr": "Silmek istediğinize emin misiniz?"
},
{ {
"resourceName": "Platform", "resourceName": "Platform",
"key": "Get", "key": "Get",
@ -600,6 +606,18 @@
"en": "Administration", "en": "Administration",
"tr": "Yönetim" "tr": "Yönetim"
}, },
{
"resourceName": "Platform",
"key": "AccessDenied",
"en": "Access denied!",
"tr": "Erişim reddedildi!"
},
{
"resourceName": "Platform",
"key": "AccessDeniedMessage",
"en": "You have no permission to visit this page",
"tr": "Bu sayfayı ziyaret etme izniniz yok"
},
{ {
"resourceName": "Platform", "resourceName": "Platform",
"key": "AbpTenantManagement", "key": "AbpTenantManagement",
@ -609,8 +627,8 @@
{ {
"resourceName": "Platform", "resourceName": "Platform",
"key": "AbpTenantManagement.Tenants", "key": "AbpTenantManagement.Tenants",
"en": "Tenants", "en": "Companies",
"tr": "Tenantlar" "tr": "Şirketler"
}, },
{ {
"resourceName": "Platform", "resourceName": "Platform",
@ -748,7 +766,13 @@
"resourceName": "Platform", "resourceName": "Platform",
"key": "Abp.Identity.OrganizationUnit.NewUnit", "key": "Abp.Identity.OrganizationUnit.NewUnit",
"en": "New Unit", "en": "New Unit",
"tr": "Üye Birim" "tr": "Yeni Birim"
},
{
"resourceName": "Platform",
"key": "Abp.Identity.OrganizationUnit.AddUnit",
"en": "Add Unit",
"tr": "Birim Ekle"
}, },
{ {
"resourceName": "Platform", "resourceName": "Platform",
@ -780,6 +804,12 @@
"en": "Delete", "en": "Delete",
"tr": "Sil" "tr": "Sil"
}, },
{
"resourceName": "Platform",
"key": "Abp.Identity.OrganizationUnit.Rename",
"en": "Rename",
"tr": "Değiştir"
},
{ {
"resourceName": "Platform", "resourceName": "Platform",
"key": "Abp.Identity.OrganizationUnit.AddRootUnit", "key": "Abp.Identity.OrganizationUnit.AddRootUnit",
@ -792,6 +822,42 @@
"en": "Add Sub Unit", "en": "Add Sub Unit",
"tr": "Alt Birim Ekle" "tr": "Alt Birim Ekle"
}, },
{
"resourceName": "Platform",
"key": "Abp.Identity.OrganizationUnit.Users.Description",
"en": "Select an organization unit to see members",
"tr": "Üyeleri görmek için bir organizasyon birimi seçin"
},
{
"resourceName": "Platform",
"key": "Abp.Identity.OrganizationUnit.Roles.Description",
"en": "Select an organization unit to see roles",
"tr": "Rolleri görmek için bir organizasyon birimi seçin"
},
{
"resourceName": "Platform",
"key": "Abp.Identity.OrganizationUnit.Parent",
"en": "Parent",
"tr": "Ebeveyn"
},
{
"resourceName": "Platform",
"key": "Abp.Identity.OrganizationUnit.DisplayName",
"en": "DisplayName",
"tr": "Görünür Adı"
},
{
"resourceName": "Platform",
"key": "Abp.Identity.OrganizationUnit.SelectMembers",
"en": "Select Members",
"tr": "Üyeleri Seçin"
},
{
"resourceName": "Platform",
"key": "Abp.Identity.OrganizationUnit.SelectRoles",
"en": "Select Roles",
"tr": "Rolleri Seçin"
},
{ {
"resourceName": "Platform", "resourceName": "Platform",
"key": "App.Languages", "key": "App.Languages",
@ -1704,6 +1770,18 @@
"en": "Password Change Time", "en": "Password Change Time",
"tr": "Parola Değiştirme Zamanı" "tr": "Parola Değiştirme Zamanı"
}, },
{
"resourceName": "Platform",
"key": "Abp.Identity.User.UserInformation.CreateTime",
"en": "Create Time",
"tr": "Tanımlama Tarihi"
},
{
"resourceName": "Platform",
"key": "Abp.Identity.User.UserInformation.UpdateTime",
"en": "Update Time",
"tr": "Güncelleme Tarihi"
},
{ {
"resourceName": "Platform", "resourceName": "Platform",
"key": "Abp.Identity.User.LockoutManagement", "key": "Abp.Identity.User.LockoutManagement",
@ -1712,9 +1790,9 @@
}, },
{ {
"resourceName": "Platform", "resourceName": "Platform",
"key": "Abp.Identity.User.LockoutManagement.Active", "key": "Abp.Identity.User.LockoutManagement.Status",
"en": "IsActive", "en": "Status",
"tr": "Aktif/Pasif" "tr": "Durum"
}, },
{ {
"resourceName": "Platform", "resourceName": "Platform",
@ -1722,12 +1800,30 @@
"en": "Admin Verification", "en": "Admin Verification",
"tr": "Yönetici Doğrulaması" "tr": "Yönetici Doğrulaması"
}, },
{
"resourceName": "Platform",
"key": "Abp.Identity.User.LockoutManagement.EmailConfirmed",
"en": "Email Confirmed",
"tr": "Email Adresi Onayı"
},
{
"resourceName": "Platform",
"key": "Abp.Identity.User.LockoutManagement.PhoneNumberConfirmed",
"en": "Phone Number Confirmed",
"tr": "Telefon Numarası Onayı"
},
{ {
"resourceName": "Platform", "resourceName": "Platform",
"key": "Abp.Identity.User.LockoutManagement.TwoFactorEnabled", "key": "Abp.Identity.User.LockoutManagement.TwoFactorEnabled",
"en": "Two Factor Enabled", "en": "Two Factor Enabled",
"tr": "İki Faktör Ektinleştirme" "tr": "İki Faktör Ektinleştirme"
}, },
{
"resourceName": "Platform",
"key": "Abp.Identity.User.LockoutManagement.LoginEndDate",
"en": "Login End Date",
"tr": "Login Bitiş Tarihi"
},
{ {
"resourceName": "Platform", "resourceName": "Platform",
"key": "Abp.Identity.User.LockoutManagement.AccountEndDate", "key": "Abp.Identity.User.LockoutManagement.AccountEndDate",
@ -1752,6 +1848,18 @@
"en": "Account Lock Date", "en": "Account Lock Date",
"tr": "Hesap Kilitlenme Tarihi" "tr": "Hesap Kilitlenme Tarihi"
}, },
{
"resourceName": "Platform",
"key": "Abp.Identity.User.LockoutManagement.ShouldChangePwOnNextLogin",
"en": "Should Change Password On Next Login?",
"tr": "Bir Sonraki Girişte Şifre Değiştirilsin mi?"
},
{
"resourceName": "Platform",
"key": "Abp.Identity.User.LockoutManagement.AccessFailedCount",
"en": "Access Failed Count",
"tr": "Başarısız Erişim Sayısı"
},
{ {
"resourceName": "Platform", "resourceName": "Platform",
"key": "Abp.Identity.Profile", "key": "Abp.Identity.Profile",
@ -1890,6 +1998,18 @@
"en": "Internal Error", "en": "Internal Error",
"tr": "Dahili Hata" "tr": "Dahili Hata"
}, },
{
"resourceName": "Platform",
"key": "Error:0006",
"en": "No records!",
"tr": "Kayıt Yok!"
},
{
"resourceName": "Platform",
"key": "App.BackgroundWorkers.Message",
"en": "Background Workers are being renewed.",
"tr": "Arka Plan Çalışanları yenileniyor."
},
{ {
"resourceName": "Platform", "resourceName": "Platform",
"key": "LoginEndDate", "key": "LoginEndDate",
@ -4050,6 +4170,138 @@
"key": "ListForms.ListFormFieldEdit.PivotSettingWordWrapEnabled", "key": "ListForms.ListFormFieldEdit.PivotSettingWordWrapEnabled",
"en": "WordWrap Enabled", "en": "WordWrap Enabled",
"tr": "WordWrap Enabled" "tr": "WordWrap Enabled"
},
{
"resourceName": "Platform",
"key": "SidePanel.Title",
"en": "Configuration",
"tr": "Yapılandırma"
},
{
"resourceName": "Platform",
"key": "SidePanel.Mode",
"en": "Mode",
"tr": "Mod"
},
{
"resourceName": "Platform",
"key": "SidePanel.Mode.Description",
"en": "Switch theme to dark mode",
"tr": "Switch theme to dark mode"
},
{
"resourceName": "Platform",
"key": "SidePanel.Direction",
"en": "Direction",
"tr": "Yön"
},
{
"resourceName": "Platform",
"key": "SidePanel.Direction.Description",
"en": "Select a direction",
"tr": "Bir yön seçin"
},
{
"resourceName": "Platform",
"key": "SidePanel.NavMode",
"en": "Nav Mode",
"tr": "Nav Mod"
},
{
"resourceName": "Platform",
"key": "SidePanel.Themed",
"en": "Theme",
"tr": "Tema"
},
{
"resourceName": "Platform",
"key": "SidePanel.Layout",
"en": "Layout",
"tr": "Düzen"
},
{
"resourceName": "Platform",
"key": "SidePanel.Layout.Classic",
"en": "Classic",
"tr": "Klasik"
},
{
"resourceName": "Platform",
"key": "SidePanel.Layout.Modern",
"en": "Modern",
"tr": "Modern"
},
{
"resourceName": "Platform",
"key": "SidePanel.Layout.Stacked Side",
"en": "Stacked Side",
"tr": "Yığılmış Yan"
},
{
"resourceName": "Platform",
"key": "SidePanel.Layout.Simple",
"en": "Simple",
"tr": "Basit"
},
{
"resourceName": "Platform",
"key": "SidePanel.Layout.Decked",
"en": "Decked",
"tr": "Döşeli"
},
{
"resourceName": "Platform",
"key": "SidePanel.Layout.Blank",
"en": "Blank",
"tr": "Boş"
},
{
"resourceName": "Platform",
"key": "AI.Welcome",
"en": "Welcome!",
"tr": "Hoş Geldiniz!"
},
{
"resourceName": "Platform",
"key": "AI.Name",
"en": "Course AI",
"tr": "Kurs AI"
},
{
"resourceName": "Platform",
"key": "AI.WaitAnswer",
"en": "Waiting for response...",
"tr": "Yanıt bekleniyor..."
},
{
"resourceName": "Platform",
"key": "AI.Asking",
"en": "Ask anything",
"tr": "Herhangi bir şey sor"
},
{
"resourceName": "Platform",
"key": "AI.SelectModel",
"en": "Select Model",
"tr": "Model Seç"
},
{
"resourceName": "Platform",
"key": "AI.SohbetAnswer",
"en": "Chat",
"tr": "Sohbet"
},
{
"resourceName": "Platform",
"key": "AI.DatabaseAnswer",
"en": "Database Query",
"tr": "Veritabanı Sorgusu"
},
{
"resourceName": "Platform",
"key": "AI.AnalizAnswer",
"en": "Analysis and Evaluation",
"tr": "Analiz & Değerlendirme"
} }
], ],
"DataSources": [ "DataSources": [

View file

@ -1,35 +0,0 @@
import React from 'react';
const CaseStudies: React.FC = () => {
return (
<section className="py-16 bg-gray-50">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="text-center">
<h2 className="text-3xl font-bold text-gray-900 sm:text-4xl">
Case Studies
</h2>
<p className="mt-4 text-lg text-gray-600">
See how we've helped businesses achieve their goals
</p>
</div>
<div className="mt-12 grid gap-8 md:grid-cols-2 lg:grid-cols-3">
{/* Placeholder for case study cards */}
<div className="bg-white rounded-lg shadow-md p-6">
<h3 className="text-xl font-semibold text-gray-900">Case Study 1</h3>
<p className="mt-2 text-gray-600">Coming soon...</p>
</div>
<div className="bg-white rounded-lg shadow-md p-6">
<h3 className="text-xl font-semibold text-gray-900">Case Study 2</h3>
<p className="mt-2 text-gray-600">Coming soon...</p>
</div>
<div className="bg-white rounded-lg shadow-md p-6">
<h3 className="text-xl font-semibold text-gray-900">Case Study 3</h3>
<p className="mt-2 text-gray-600">Coming soon...</p>
</div>
</div>
</div>
</section>
);
};
export default CaseStudies;

View file

@ -1,44 +0,0 @@
import React from 'react';
import Slider from 'react-slick';
import 'slick-carousel/slick/slick.css';
import 'slick-carousel/slick/slick-theme.css';
import { useLanguage } from '../../context/LanguageContext';
import { testimonials } from '../../locales/testimonials';
const Testimonials: React.FC = () => {
const { t, language } = useLanguage();
const testimonialsData = testimonials[language];
const settings = {
dots: true,
infinite: true,
speed: 500,
slidesToShow: 3,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 5000,
cssEase: "linear"
};
return (
<section className="py-16 bg-gray-50">
<div className="container mx-auto px-4">
<h2 className="text-3xl font-bold text-center mb-12">{t('testimonials.title')}</h2>
<Slider {...settings}>
{testimonialsData.map((testimonial, index) => (
<div key={index} className="px-2">
<div className="bg-white p-6 rounded-lg shadow-md">
<p className="text-gray-600 mb-4">"{testimonial.quote}"</p>
<div className="font-semibold">{testimonial.author}</div>
<div className="text-sm text-gray-500">{testimonial.title}</div>
</div>
</div>
))}
</Slider>
</div>
</section>
);
};
export default Testimonials;

View file

@ -356,6 +356,10 @@ const translations = {
// Testimonials Section // Testimonials Section
"testimonials.title": "Müşteri Yorumları", "testimonials.title": "Müşteri Yorumları",
// NotFound
"notFound.message": "Üzgünüz, aradığınız sayfa bulunamadı. Lütfen URL'yi kontrol edin veya ana sayfaya dönün.",
"notFound.button": "Ana Sayfaya Dön",
// Common // Common
"common.learnMore": "Detaylı Bilgi", "common.learnMore": "Detaylı Bilgi",
"common.contact": "common.contact":
@ -742,6 +746,10 @@ const translations = {
// Testimonials Section // Testimonials Section
"testimonials.title": "Testimonials", "testimonials.title": "Testimonials",
// NotFound
"notFound.message": "Sorry, the page you are looking for was not found. Please check the URL or return to the homepage.",
"notFound.button": "Return to Homepage",
// Common // Common
"common.learnMore": "Learn More", "common.learnMore": "Learn More",
"common.contact": "common.contact":

View file

@ -1,16 +1,20 @@
import React from 'react'; import React from 'react';
import { Frown } from 'lucide-react'; // Lucide-react kütüphanesinden Frown ikonunu import et import { Frown } from 'lucide-react'; // Lucide-react kütüphanesinden Frown ikonunu import et
import { useLanguage } from '../context/LanguageContext';
const NotFound: React.FC = () => { const NotFound: React.FC = () => {
const { t, language } = useLanguage();
return ( return (
<div className="flex flex-col items-center justify-center min-h-screen bg-white text-gray-700 p-4"> {/* Arka plan ve metin rengi güncellendi, padding eklendi */} <div className="flex flex-col items-center justify-center min-h-screen bg-white text-gray-700 p-4"> {/* Arka plan ve metin rengi güncellendi, padding eklendi */}
<Frown size={128} className="text-blue-600 mb-6" /> {/* İkon boyutu ve rengi güncellendi */} <Frown size={128} className="text-blue-600 mb-6" /> {/* İkon boyutu ve rengi güncellendi */}
<h1 className="text-7xl font-bold text-gray-900 mb-4">404</h1> {/* Başlık boyutu ve rengi güncellendi */} <h1 className="text-7xl font-bold text-gray-900 mb-4">404</h1> {/* Başlık boyutu ve rengi güncellendi */}
<p className="text-xl text-gray-600 mb-8 text-center max-w-md"> {/* Metin rengi, margin ve max-width güncellendi */} <p className="text-xl text-gray-600 mb-8 text-center max-w-md"> {/* Metin rengi, margin ve max-width güncellendi */}
Üzgünüz, aradığınız sayfa bulunamadı. Lütfen URL'yi kontrol edin veya ana sayfaya dönün. {t('notFound.message')}
</p> </p>
<a href="/" className="px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition duration-300 text-lg font-semibold"> {/* Buton stili güncellendi */} <a href="/" className="px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition duration-300 text-lg font-semibold"> {/* Buton stili güncellendi */}
Ana Sayfaya Dön {t('notFound.button')}
</a> </a>
</div> </div>
); );

View file

@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict';
"revision": "3ca0b8505b4bec776b69afdba2768812" "revision": "3ca0b8505b4bec776b69afdba2768812"
}, { }, {
"url": "index.html", "url": "index.html",
"revision": "0.ndk83qv1fe" "revision": "0.i5lc19up29o"
}], {}); }], {});
workbox.cleanupOutdatedCaches(); workbox.cleanupOutdatedCaches();
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), { workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {

View file

@ -5,12 +5,15 @@ import SidePanelContent, { SidePanelContentProps } from './SidePanelContent'
import withHeaderItem from '@/utils/hoc/withHeaderItem' import withHeaderItem from '@/utils/hoc/withHeaderItem'
import { useStoreState, useStoreActions } from '@/store' import { useStoreState, useStoreActions } from '@/store'
import type { CommonProps } from '@/@types/common' import type { CommonProps } from '@/@types/common'
import { useLocalization } from '@/utils/hooks/useLocalization'
type SidePanelProps = SidePanelContentProps & CommonProps type SidePanelProps = SidePanelContentProps & CommonProps
const _SidePanel = (props: SidePanelProps) => { const _SidePanel = (props: SidePanelProps) => {
const { setPanelExpand } = useStoreActions((actions) => actions.theme) const { setPanelExpand } = useStoreActions((actions) => actions.theme)
const {translate } = useLocalization()
const { className, ...rest } = props const { className, ...rest } = props
const panelExpand = useStoreState((state) => state.theme.panelExpand) const panelExpand = useStoreState((state) => state.theme.panelExpand)
@ -35,7 +38,7 @@ const _SidePanel = (props: SidePanelProps) => {
<HiOutlineCog /> <HiOutlineCog />
</div> </div>
<Drawer <Drawer
title="Side Panel" title={translate('::SidePanel.Title')}
isOpen={panelExpand} isOpen={panelExpand}
placement={direction === 'rtl' ? 'left' : 'right'} placement={direction === 'rtl' ? 'left' : 'right'}
width={375} width={375}

View file

@ -14,6 +14,7 @@ import {
LAYOUT_TYPE_BLANK, LAYOUT_TYPE_BLANK,
} from '@/constants/theme.constant' } from '@/constants/theme.constant'
import type { LayoutType } from '@/@types/theme' import type { LayoutType } from '@/@types/theme'
import { useLocalization } from '@/utils/hooks/useLocalization'
const layouts = [ const layouts = [
{ {
@ -64,6 +65,8 @@ const LayoutSwitcher = () => {
const { textTheme } = useThemeClass() const { textTheme } = useThemeClass()
const { translate } = useLocalization()
return ( return (
<div> <div>
<Segment <Segment
@ -98,7 +101,7 @@ const LayoutSwitcher = () => {
/> />
</SegmentItemOption> </SegmentItemOption>
<div className={classNames(active && textTheme, 'mt-2 font-semibold')}> <div className={classNames(active && textTheme, 'mt-2 font-semibold')}>
{layout.label} {translate('::SidePanel.Layout.' + layout.label)}
</div> </div>
</div> </div>
) )

View file

@ -4,39 +4,42 @@ import ThemeSwitcher from './ThemeSwitcher'
import DirectionSwitcher from './DirectionSwitcher' import DirectionSwitcher from './DirectionSwitcher'
import NavModeSwitcher from './NavModeSwitcher' import NavModeSwitcher from './NavModeSwitcher'
import CopyButton from './CopyButton' import CopyButton from './CopyButton'
import { useLocalization } from '@/utils/hooks/useLocalization'
export type ThemeConfiguratorProps = { export type ThemeConfiguratorProps = {
callBackClose?: () => void callBackClose?: () => void
} }
const ThemeConfigurator = ({ callBackClose }: ThemeConfiguratorProps) => { const ThemeConfigurator = ({ callBackClose }: ThemeConfiguratorProps) => {
const { translate } = useLocalization()
return ( return (
<div className="flex flex-col h-full justify-between"> <div className="flex flex-col h-full justify-between">
<div className="flex flex-col gap-y-10 mb-6"> <div className="flex flex-col gap-y-10 mb-6">
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<div> <div>
<h6>Dark Mode</h6> <h6>{translate('::SidePanel.Mode')}</h6>
<span>Switch theme to dark mode</span> <span>{translate('::SidePanel.Mode.Description')}</span>
</div> </div>
<ModeSwitcher /> <ModeSwitcher />
</div> </div>
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<div> <div>
<h6>Direction</h6> <h6>{translate('::SidePanel.Direction')}</h6>
<span>Select a direction</span> <span>{translate('::SidePanel.Direction.Description')}</span>
</div> </div>
<DirectionSwitcher callBackClose={callBackClose} /> <DirectionSwitcher callBackClose={callBackClose} />
</div> </div>
<div> <div>
<h6 className="mb-3">Nav Mode</h6> <h6 className="mb-3">{translate('::SidePanel.NavMode')}</h6>
<NavModeSwitcher /> <NavModeSwitcher />
</div> </div>
<div> <div>
<h6 className="mb-3">Theme</h6> <h6 className="mb-3">{translate('::SidePanel.Themed')}</h6>
<ThemeSwitcher /> <ThemeSwitcher />
</div> </div>
<div> <div>
<h6 className="mb-3">Layout</h6> <h6 className="mb-3">{translate('::SidePanel.Layout')}</h6>
<LayoutSwitcher /> <LayoutSwitcher />
</div> </div>
</div> </div>

View file

@ -1,5 +1,6 @@
import { Notification, toast } from '@/components/ui' import { Notification, toast } from '@/components/ui'
import { generateBackgroundWorkers } from '@/proxy/background-worker/background-worker.service' import { generateBackgroundWorkers } from '@/proxy/background-worker/background-worker.service'
import { useLocalization } from '@/utils/hooks/useLocalization'
export abstract class UiEvalService { export abstract class UiEvalService {
static Init = () => { static Init = () => {
@ -7,6 +8,8 @@ export abstract class UiEvalService {
} }
static ApiGenerateBackgroundWorkers = () => { static ApiGenerateBackgroundWorkers = () => {
const { translate } = useLocalization()
const asyncCall = async () => { const asyncCall = async () => {
await generateBackgroundWorkers() await generateBackgroundWorkers()
} }
@ -15,7 +18,7 @@ export abstract class UiEvalService {
toast.push( toast.push(
<Notification type="success" duration={2000}> <Notification type="success" duration={2000}>
{'Background Workers are being renewed.'} {translate('::App.BackgroundWorkers.Message')}
</Notification>, </Notification>,
{ {
placement: 'top-center', placement: 'top-center',

View file

@ -1,11 +1,13 @@
import Container from '@/components/shared/Container' import Container from '@/components/shared/Container'
import DoubleSidedImage from '@/components/shared/DoubleSidedImage' import DoubleSidedImage from '@/components/shared/DoubleSidedImage'
import { Button } from '@/components/ui' import { Button } from '@/components/ui'
import { useLocalization } from '@/utils/hooks/useLocalization'
import { MdArrowBack } from 'react-icons/md' import { MdArrowBack } from 'react-icons/md'
import { useNavigate } from 'react-router-dom' import { useNavigate } from 'react-router-dom'
const AccessDenied = () => { const AccessDenied = () => {
const navigate = useNavigate() const navigate = useNavigate()
const { translate } = useLocalization()
return ( return (
<Container className="h-full"> <Container className="h-full">
@ -13,11 +15,11 @@ const AccessDenied = () => {
<DoubleSidedImage <DoubleSidedImage
src="/img/others/img-2.png" src="/img/others/img-2.png"
darkModeSrc="/img/others/img-2-dark.png" darkModeSrc="/img/others/img-2-dark.png"
alt="Access Denied!" alt={ translate('::AccessDenied')}
/> />
<div className="mt-6 text-center"> <div className="mt-6 text-center">
<h3 className="mb-2">Access Denied!</h3> <h3 className="mb-2">{ translate('::AccessDenied')}</h3>
<p className="text-base">You have no permission to visit this page</p> <p className="text-base">{ translate('::AccessDeniedMessage')}</p>
</div> </div>
<Button size="xs" className="mt-2" variant="default" onClick={() => navigate(-2)}> <Button size="xs" className="mt-2" variant="default" onClick={() => navigate(-2)}>
<MdArrowBack /> <MdArrowBack />

View file

@ -49,10 +49,10 @@ function UserDetails() {
<Tabs defaultValue="user"> <Tabs defaultValue="user">
<TabList> <TabList>
<TabNav value="user" icon={<HiOutlineUser />}> <TabNav value="user" icon={<HiOutlineUser />}>
User Information { translate('::Abp.Identity.User.UserInformation') }
</TabNav> </TabNav>
<TabNav value="lockout" icon={<HiOutlineLockOpen />}> <TabNav value="lockout" icon={<HiOutlineLockOpen />}>
Lockout Management { translate('::Abp.Identity.User.LockoutManagement') }
</TabNav> </TabNav>
</TabList> </TabList>
<TabContent value="user"> <TabContent value="user">
@ -65,7 +65,7 @@ function UserDetails() {
toast.push( toast.push(
<Notification type="success" duration={2000}> <Notification type="success" duration={2000}>
{'User bilgileri kaydedildi.'} {translate('Kaydet')}
</Notification>, </Notification>,
{ {
placement: 'top-center', placement: 'top-center',
@ -84,7 +84,7 @@ function UserDetails() {
<Form> <Form>
<FormContainer size="sm"> <FormContainer size="sm">
<div className="w-1/2"> <div className="w-1/2">
<div className="form-label mb-2">Role Management</div> <div className="form-label mb-2">{translate('::Abp.Identity.User.UserInformation.RoleManagement')}</div>
<div className="border-2 rounded-lg"> <div className="border-2 rounded-lg">
<FieldArray name="roles"> <FieldArray name="roles">
{({ form, remove, push }) => ( {({ form, remove, push }) => (
@ -117,7 +117,7 @@ function UserDetails() {
<FormItem <FormItem
labelClass="!justify-start" labelClass="!justify-start"
labelWidth="40%" labelWidth="40%"
label="Email Address" label={translate('::Abp.Identity.User.UserInformation.EmailAddress')}
> >
<Field <Field
type="text" type="text"
@ -128,11 +128,15 @@ function UserDetails() {
/> />
</FormItem> </FormItem>
<FormItem labelClass="!justify-start" labelWidth="40%" label="Name"> <FormItem labelClass="!justify-start" labelWidth="40%"
label={translate('::Abp.Identity.User.UserInformation.Name')}
>
<Field type="text" name="name" placeholder="Name" component={Input} /> <Field type="text" name="name" placeholder="Name" component={Input} />
</FormItem> </FormItem>
<FormItem labelClass="!justify-start" labelWidth="40%" label="Surname"> <FormItem labelClass="!justify-start" labelWidth="40%"
label={translate('::Abp.Identity.User.UserInformation.Surname')}
>
<Field <Field
type="text" type="text"
name="surname" name="surname"
@ -141,7 +145,9 @@ function UserDetails() {
/> />
</FormItem> </FormItem>
<FormItem labelClass="!justify-start" labelWidth="40%" label="Phone Number"> <FormItem labelClass="!justify-start" labelWidth="40%"
label={translate('::Abp.Identity.User.UserInformation.PhoneNumber')}
>
<Field <Field
type="text" type="text"
name="phoneNumber" name="phoneNumber"
@ -153,7 +159,7 @@ function UserDetails() {
<FormItem <FormItem
labelClass="!justify-start" labelClass="!justify-start"
labelWidth="40%" labelWidth="40%"
label="Password change time" label={translate('::Abp.Identity.User.UserInformation.PasswordChangeTime')}
> >
<Field name="lastPasswordChangeTime"> <Field name="lastPasswordChangeTime">
{({ field, form }: FieldProps) => ( {({ field, form }: FieldProps) => (
@ -176,17 +182,19 @@ function UserDetails() {
<FormItem <FormItem
labelClass="!justify-start" labelClass="!justify-start"
labelWidth="40%" labelWidth="40%"
label="Rocket Username" label={translate('::RocketUsername')}
> >
<Field <Field
type="text" type="text"
name="rocketUsername" name="rocketUsername"
placeholder="Rocket Username" placeholder={translate('::RocketUsername')}
component={Input} component={Input}
/> />
</FormItem> </FormItem>
<FormItem labelClass="!justify-start" labelWidth="40%" label="Create Time"> <FormItem labelClass="!justify-start" labelWidth="40%"
label={translate('::Abp.Identity.User.UserInformation.CreateTime')}
>
<Field name="creationTime"> <Field name="creationTime">
{({ field, form }: FieldProps) => ( {({ field, form }: FieldProps) => (
<Input <Input
@ -198,7 +206,9 @@ function UserDetails() {
)} )}
</Field> </Field>
</FormItem> </FormItem>
<FormItem labelClass="!justify-start" labelWidth="40%" label="Update Time"> <FormItem labelClass="!justify-start" labelWidth="40%"
label={translate('::Abp.Identity.User.UserInformation.UpdateTime')}
>
<Field name="lastModificationTime"> <Field name="lastModificationTime">
{({ field, form }: FieldProps) => ( {({ field, form }: FieldProps) => (
<Input <Input
@ -257,9 +267,9 @@ function UserDetails() {
layout="horizontal" layout="horizontal"
labelClass="!justify-start" labelClass="!justify-start"
labelWidth="50%" labelWidth="50%"
label="Status" label={translate('::Abp.Identity.User.LockoutManagement.Status')}
> >
<Field name="isActive" placeholder="Status" component={Checkbox} /> <Field name="isActive" placeholder={translate('::Abp.Identity.User.LockoutManagement.Status')} component={Checkbox} />
</FormItem> </FormItem>
<hr className="mb-3" /> <hr className="mb-3" />
@ -268,11 +278,11 @@ function UserDetails() {
layout="horizontal" layout="horizontal"
labelClass="!justify-start" labelClass="!justify-start"
labelWidth="50%" labelWidth="50%"
label="Admin Verification" label={translate('::Abp.Identity.User.LockoutManagement.AdminVerification')}
> >
<Field <Field
name="isVerified" name="isVerified"
placeholder="Admin Verification" placeholder={translate('::Abp.Identity.User.LockoutManagement.AdminVerification')}
component={Checkbox} component={Checkbox}
/> />
</FormItem> </FormItem>
@ -283,11 +293,11 @@ function UserDetails() {
layout="horizontal" layout="horizontal"
labelClass="!justify-start" labelClass="!justify-start"
labelWidth="50%" labelWidth="50%"
label="Email Confirmed" label={translate('::Abp.Identity.User.LockoutManagement.EmailConfirmed')}
> >
<Field <Field
name="emailConfirmed" name="emailConfirmed"
placeholder="Email Confirmed" placeholder={translate('::Abp.Identity.User.LockoutManagement.EmailConfirmed')}
component={Checkbox} component={Checkbox}
/> />
</FormItem> </FormItem>
@ -296,11 +306,11 @@ function UserDetails() {
layout="horizontal" layout="horizontal"
labelClass="!justify-start" labelClass="!justify-start"
labelWidth="50%" labelWidth="50%"
label="Phone Number Confirmed" label={translate('::Abp.Identity.User.LockoutManagement.PhoneNumberConfirmed')}
> >
<Field <Field
name="phoneNumberConfirmed" name="phoneNumberConfirmed"
placeholder="Phone Number Confirmed" placeholder={translate('::Abp.Identity.User.LockoutManagement.PhoneNumberConfirmed')}
component={Checkbox} component={Checkbox}
/> />
</FormItem> </FormItem>
@ -311,11 +321,11 @@ function UserDetails() {
layout="horizontal" layout="horizontal"
labelClass="!justify-start" labelClass="!justify-start"
labelWidth="50%" labelWidth="50%"
label="Two Factor Enabled" label={translate('::Abp.Identity.User.LockoutManagement.TwoFactorEnabled')}
> >
<Field <Field
name="twoFactorEnabled" name="twoFactorEnabled"
placeholder="Two Factor Enabled" placeholder={translate('::Abp.Identity.User.LockoutManagement.TwoFactorEnabled')}
component={Checkbox} component={Checkbox}
/> />
</FormItem> </FormItem>
@ -326,7 +336,7 @@ function UserDetails() {
layout="horizontal" layout="horizontal"
labelClass="!justify-start" labelClass="!justify-start"
labelWidth="50%" labelWidth="50%"
label="Login End Date" label={translate('::Abp.Identity.User.LockoutManagement.LoginEndDate')}
> >
<Field name="loginEndDate"> <Field name="loginEndDate">
{({ field, form }: FieldProps) => ( {({ field, form }: FieldProps) => (
@ -334,7 +344,7 @@ function UserDetails() {
field={field} field={field}
form={form} form={form}
value={field.value ? dayjs(field.value).toDate() : null} value={field.value ? dayjs(field.value).toDate() : null}
placeholder="Select Date" placeholder={translate('::Abp.Identity.User.LockoutManagement.LoginEndDate')}
onChange={(date) => { onChange={(date) => {
form.setFieldValue( form.setFieldValue(
field.name, field.name,
@ -352,11 +362,11 @@ function UserDetails() {
layout="horizontal" layout="horizontal"
labelClass="!justify-start" labelClass="!justify-start"
labelWidth="50%" labelWidth="50%"
label="Account Lockout Enabled" label={translate('::Abp.Identity.User.LockoutManagement.AccountLockoutEnabled')}
> >
<Field <Field
name="lockoutEnabled" name="lockoutEnabled"
placeholder="Account Lockout Enabled" placeholder={translate('::Abp.Identity.User.LockoutManagement.AccountLockoutEnabled')}
component={Checkbox} component={Checkbox}
/> />
</FormItem> </FormItem>
@ -365,11 +375,11 @@ function UserDetails() {
layout="horizontal" layout="horizontal"
labelClass="!justify-start" labelClass="!justify-start"
labelWidth="50%" labelWidth="50%"
label="Account Locked" label={translate('::Abp.Identity.User.LockoutManagement.AccountLocked')}
> >
<Field <Field
name="lockUser" name="lockUser"
placeholder="Account Locked" placeholder={translate('::Abp.Identity.User.LockoutManagement.AccountLocked')}
component={Checkbox} component={Checkbox}
/> />
</FormItem> </FormItem>
@ -378,7 +388,7 @@ function UserDetails() {
layout="horizontal" layout="horizontal"
labelClass="!justify-start" labelClass="!justify-start"
labelWidth="50%" labelWidth="50%"
label="Lockout End Date" label={translate('::Abp.Identity.User.LockoutManagement.AccountEndDate')}
> >
<Field name="lockoutEnd"> <Field name="lockoutEnd">
{({ field, form }: FieldProps) => ( {({ field, form }: FieldProps) => (
@ -386,7 +396,7 @@ function UserDetails() {
field={field} field={field}
form={form} form={form}
value={field.value ? dayjs(field.value).toDate() : null} value={field.value ? dayjs(field.value).toDate() : null}
placeholder="Select Date" placeholder={translate('::Abp.Identity.User.LockoutManagement.AccountEndDate')}
onChange={(date) => { onChange={(date) => {
form.setFieldValue( form.setFieldValue(
field.name, field.name,
@ -404,11 +414,11 @@ function UserDetails() {
layout="horizontal" layout="horizontal"
labelClass="!justify-start" labelClass="!justify-start"
labelWidth="50%" labelWidth="50%"
label="Should Change Pw On Next Login" label={translate('::Abp.Identity.User.LockoutManagement.ShouldChangePwOnNextLogin')}
> >
<Field <Field
name="shouldChangePasswordOnNextLogin" name="shouldChangePasswordOnNextLogin"
placeholder="Should Change Pw On Next Login" placeholder={translate('::Abp.Identity.User.LockoutManagement.ShouldChangePwOnNextLogin')}
component={Checkbox} component={Checkbox}
/> />
</FormItem> </FormItem>
@ -417,7 +427,7 @@ function UserDetails() {
layout="horizontal" layout="horizontal"
labelClass="!justify-start" labelClass="!justify-start"
labelWidth="50%" labelWidth="50%"
label="Access Failed Count" label={translate('::Abp.Identity.User.LockoutManagement.AccessFailedCount')}
> >
<Field type="number" name="accessFailedCount" component={Input} /> <Field type="number" name="accessFailedCount" component={Input} />
</FormItem> </FormItem>

View file

@ -424,15 +424,15 @@ const OrganizationUnits = () => {
<div className="file-actions"> <div className="file-actions">
<div className="flex gap-1 folderFileActions"> <div className="flex gap-1 folderFileActions">
<button onClick={() => setIsMoveAllUsersOpen(true)} title="Move All Users"> <button onClick={() => setIsMoveAllUsersOpen(true)} title={ translate('::Abp.Identity.OrganizationUnit.MoveAllUsers')}>
<MdSupervisedUserCircle size="20" color="#2d6da3" /> <MdSupervisedUserCircle size="20" color="#2d6da3" />
</button> </button>
<button onClick={() => node.edit()} title="Rename"> <button onClick={() => node.edit()} title={ translate('::Abp.Identity.OrganizationUnit.Rename')}>
<MdEdit size="20" className="text-teal-900" /> <MdEdit size="20" className="text-teal-900" />
</button> </button>
<button <button
onClick={() => setDeleteRow({ id: node.data.id, name: 'Organization Unit' })} onClick={() => setDeleteRow({ id: node.data.id, name: 'Organization Unit' })}
title="Delete" title={ translate('::Delete')}
> >
<MdDelete size="20" className="text-red-500" /> <MdDelete size="20" className="text-red-500" />
</button> </button>
@ -461,7 +461,7 @@ const OrganizationUnits = () => {
<Button <Button
variant="solid" variant="solid"
size="xs" size="xs"
title="Add Unit" title={translate('::Abp.Identity.OrganizationUnit.AddUnit')}
onClick={(e) => { onClick={(e) => {
e.preventDefault() e.preventDefault()
setDialogItem({ setDialogItem({
@ -476,7 +476,7 @@ const OrganizationUnits = () => {
<Button <Button
variant="solid" variant="solid"
size="xs" size="xs"
title="Move All Users" title={translate('::Abp.Identity.OrganizationUnit.MoveAllUsers')}
onClick={(e) => { onClick={(e) => {
e.preventDefault() e.preventDefault()
setIsMoveAllUsersOpen(true) setIsMoveAllUsersOpen(true)
@ -490,7 +490,7 @@ const OrganizationUnits = () => {
<Input <Input
className="h-8" className="h-8"
type="text" type="text"
placeholder="Search..." placeholder={translate('::App.Search')}
value={treeSearch} value={treeSearch}
onChange={(e) => { onChange={(e) => {
setTreeSearch(e.target.value) setTreeSearch(e.target.value)
@ -523,10 +523,10 @@ const OrganizationUnits = () => {
<Tabs defaultValue="users"> <Tabs defaultValue="users">
<TabList> <TabList>
<TabNav value="users" icon={<HiUser />}> <TabNav value="users" icon={<HiUser />}>
Users {translate('::AbpIdentity.Users')}
</TabNav> </TabNav>
<TabNav value="roles" icon={<HiBadgeCheck />}> <TabNav value="roles" icon={<HiBadgeCheck />}>
Roles {translate('::AbpIdentity.Roles')}
</TabNav> </TabNav>
</TabList> </TabList>
<TabContent value="users"> <TabContent value="users">
@ -594,7 +594,7 @@ const OrganizationUnits = () => {
</Table> </Table>
</AdaptableCard> </AdaptableCard>
) : ( ) : (
<div className="p-3">Select an organization unit to see members </div> <div className="p-3">{ translate('::Abp.Identity.OrganizationUnit.Users.Description')}</div>
)} )}
</TabContent> </TabContent>
<TabContent value="roles"> <TabContent value="roles">
@ -650,7 +650,7 @@ const OrganizationUnits = () => {
</Table> </Table>
</AdaptableCard> </AdaptableCard>
) : ( ) : (
<div className="p-3">Select an organization unit to see roles </div> <div className="p-3">{ translate('::Abp.Identity.OrganizationUnit.Roles.Description')}</div>
)} )}
</TabContent> </TabContent>
</Tabs> </Tabs>
@ -674,7 +674,7 @@ const OrganizationUnits = () => {
<Form> <Form>
<FormContainer size="sm"> <FormContainer size="sm">
<FormItem <FormItem
label="Parent" label={translate('::Abp.Identity.OrganizationUnit.Parent')}
invalid={errors.parentId && touched.parentId} invalid={errors.parentId && touched.parentId}
errorMessage={errors.parentId} errorMessage={errors.parentId}
> >
@ -689,7 +689,7 @@ const OrganizationUnits = () => {
</FormItem> </FormItem>
<FormItem <FormItem
label="Display Name" label={translate('::Abp.Identity.OrganizationUnit.DisplayName')}
invalid={errors.displayName && touched.displayName} invalid={errors.displayName && touched.displayName}
errorMessage={errors.displayName} errorMessage={errors.displayName}
> >
@ -724,7 +724,7 @@ const OrganizationUnits = () => {
onClose={() => setUserSelectionList([])} onClose={() => setUserSelectionList([])}
onRequestClose={() => setUserSelectionList([])} onRequestClose={() => setUserSelectionList([])}
> >
<h5 className="mb-4">Select Members</h5> <h5 className="mb-4">{ translate('::Abp.Identity.OrganizationUnit.SelectMembers')}</h5>
<DataTable<IdentityUserDto> <DataTable<IdentityUserDto>
selectable selectable
@ -795,7 +795,7 @@ const OrganizationUnits = () => {
onClose={() => setRoleSelectionList([])} onClose={() => setRoleSelectionList([])}
onRequestClose={() => setRoleSelectionList([])} onRequestClose={() => setRoleSelectionList([])}
> >
<h5 className="mb-4">Select Roles</h5> <h5 className="mb-4">{ translate('::Abp.Identity.OrganizationUnit.SelectRoles')}</h5>
<DataTable<IdentityRoleDto> <DataTable<IdentityRoleDto>
selectable selectable
@ -866,9 +866,9 @@ const OrganizationUnits = () => {
onClose={() => setDeleteRow(null)} onClose={() => setDeleteRow(null)}
onRequestClose={() => setDeleteRow(null)} onRequestClose={() => setDeleteRow(null)}
> >
<h5 className="mb-4">Delete</h5> <h5 className="mb-4">{ translate('::Delete')}</h5>
<p>Silmek istediğinize emin misiniz?</p> <p>{ translate('::DeleteConfirmation')}</p>
<div className="text-right mt-6"> <div className="text-right mt-6">
<Button <Button
@ -878,7 +878,7 @@ const OrganizationUnits = () => {
setDeleteRow(null) setDeleteRow(null)
}} }}
> >
Cancel { translate('::Cancel')}
</Button> </Button>
<Button <Button
variant="solid" variant="solid"
@ -933,7 +933,7 @@ const OrganizationUnits = () => {
} }
}} }}
> >
Delete { translate('::Delete')}
</Button> </Button>
</div> </div>
</Dialog> </Dialog>
@ -944,7 +944,7 @@ const OrganizationUnits = () => {
onClose={() => setIsMoveAllUsersOpen(false)} onClose={() => setIsMoveAllUsersOpen(false)}
onRequestClose={() => setIsMoveAllUsersOpen(false)} onRequestClose={() => setIsMoveAllUsersOpen(false)}
> >
<h5 className="mb-4">Move All Users</h5> <h5 className="mb-4">{translate('::Abp.Identity.OrganizationUnit.MoveAllUsers')}</h5>
<Formik <Formik
initialValues={{ id: activeOu, newId: '' }} initialValues={{ id: activeOu, newId: '' }}

View file

@ -1,9 +1,10 @@
import React, { useState, useRef, useEffect, SyntheticEvent } from 'react' import React, { useState, useRef, useEffect, SyntheticEvent } from 'react'
import { Send, Bot } from 'lucide-react' import { Bot } from 'lucide-react'
import { useStoreActions, useStoreState } from '@/store' import { useStoreActions, useStoreState } from '@/store'
import { Avatar, Dropdown } from '@/components/ui' import { Avatar, Dropdown } from '@/components/ui'
import { AiDto, getAi } from '@/proxy/ai' import { AiDto, getAi } from '@/proxy/ai'
import LoadAiPostsFromLocalStorage from './LoadAiPostsFromLocalStorage' import LoadAiPostsFromLocalStorage from './LoadAiPostsFromLocalStorage'
import { useLocalization } from '@/utils/hooks/useLocalization'
// Types // Types
type ChatType = 'chat' | 'query' | 'analyze' type ChatType = 'chat' | 'query' | 'analyze'
@ -42,6 +43,7 @@ const Assistant = () => {
const bottomRef = useRef<HTMLDivElement | null>(null) const bottomRef = useRef<HTMLDivElement | null>(null)
const { VITE_AI_URL } = import.meta.env const { VITE_AI_URL } = import.meta.env
const { translate } = useLocalization()
const aiPosts = useStoreState((state) => state.base.messages.aiPosts) const aiPosts = useStoreState((state) => state.base.messages.aiPosts)
@ -152,9 +154,9 @@ const Assistant = () => {
} }
const typeLabels: Record<string, string> = { const typeLabels: Record<string, string> = {
chat: '🗨️ Sohbet', chat: '🗨️ ' + translate('::AI.SohbetAnswer'),
query: '📊 Veritabanı Sorgusu', query: '📊 ' + translate('::AI.DatabaseAnswer'),
analyze: '📈 Analiz & Değerlendirme', analyze: '📈 ' + translate('::AI.AnalizAnswer'),
} }
const cleanedSql = (() => { const cleanedSql = (() => {
@ -263,8 +265,8 @@ const Assistant = () => {
{messages.length === 0 && ( {messages.length === 0 && (
<div className="text-center text-gray-500 mt-8"> <div className="text-center text-gray-500 mt-8">
<Bot className="w-12 h-12 mx-auto mb-4 text-gray-400" /> <Bot className="w-12 h-12 mx-auto mb-4 text-gray-400" />
<p className="mt-2">Hoş Geldiniz!</p> <p className="mt-2">{translate('::AI.Welcome')}</p>
<p className="text-lg font-medium">Kurs AI</p> <p className="text-lg font-medium">{translate('::AI.Name')}</p>
</div> </div>
)} )}
@ -293,7 +295,7 @@ const Assistant = () => {
{loading && ( {loading && (
<div className="flex items-center justify-center gap-2 text-gray-500"> <div className="flex items-center justify-center gap-2 text-gray-500">
<div className="animate-spin rounded-full h-4 w-4 border-2 border-gray-500 border-t-transparent" /> <div className="animate-spin rounded-full h-4 w-4 border-2 border-gray-500 border-t-transparent" />
Yanıt bekleniyor... {translate('::AI.WaitAnswer')}
</div> </div>
)} )}
@ -312,7 +314,7 @@ const Assistant = () => {
handleSubmit(e) handleSubmit(e)
} }
}} }}
placeholder="Ask anything" placeholder={translate('::AI.Asking')}
rows={2} rows={2}
className="w-full resize-none bg-transparent border-none outline-none text-base placeholder-gray-400" className="w-full resize-none bg-transparent border-none outline-none text-base placeholder-gray-400"
/> />
@ -320,7 +322,7 @@ const Assistant = () => {
<div className="absolute bottom-1 left-2 flex items-center gap-2 text-sm"> <div className="absolute bottom-1 left-2 flex items-center gap-2 text-sm">
<Dropdown <Dropdown
placement="top-start" placement="top-start"
title={bot.find((item) => item.key === selectedBot)?.name || 'Bot Seç'} title={bot.find((item) => item.key === selectedBot)?.name || translate('::AI.SelectModel') }
> >
{bot.map((item) => ( {bot.map((item) => (
<Dropdown.Item key={item.key} eventKey={item.key} onSelect={onBotItemClick}> <Dropdown.Item key={item.key} eventKey={item.key} onSelect={onBotItemClick}>

View file

@ -1,6 +1,7 @@
import type { CommonProps } from '@/@types/common' import type { CommonProps } from '@/@types/common'
import Td from '@/components/ui/Table/Td' import Td from '@/components/ui/Table/Td'
import Tr from '@/components/ui/Table/Tr' import Tr from '@/components/ui/Table/Tr'
import { useLocalization } from '@/utils/hooks/useLocalization'
import useThemeClass from '@/utils/hooks/useThemeClass' import useThemeClass from '@/utils/hooks/useThemeClass'
import classNames from 'classnames' import classNames from 'classnames'
@ -12,6 +13,7 @@ const TableNoRecords = (props: TableNoRecordsProps): JSX.Element => {
const { show, children, className, ...rest } = props const { show, children, className, ...rest } = props
const { textTheme } = useThemeClass() const { textTheme } = useThemeClass()
const { translate } = useLocalization()
const classNameProps = { const classNameProps = {
className: classNames(textTheme, 'hover:underline', className), className: classNames(textTheme, 'hover:underline', className),
@ -20,7 +22,7 @@ const TableNoRecords = (props: TableNoRecordsProps): JSX.Element => {
return show ? ( return show ? (
<Tr> <Tr>
<Td colSpan={100} {...classNameProps} {...rest} className="text-center italic"> <Td colSpan={100} {...classNameProps} {...rest} className="text-center italic">
No records! { translate('::Error:0006')}
{children} {children}
</Td> </Td>
</Tr> </Tr>