Crudendpoint ve DynamicService translate

This commit is contained in:
Sedat ÖZTÜRK 2026-03-03 09:39:00 +03:00
parent 963dfb56f0
commit 490a73dde8
4 changed files with 562 additions and 81 deletions

View file

@ -648,12 +648,6 @@
"en": "Dynamic Services",
"tr": "Dinamik Servisler"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Description",
"en": "Create and publish dynamic AppServices by writing C# code",
"tr": "C# kod yazarak dinamik AppService'ler oluşturun ve yayınlayın"
},
{
"resourceName": "Platform",
"key": "App.Forum",
@ -16837,6 +16831,493 @@
"key": "App.SqlQueryManager.TableDeployFailed",
"en": "Table could not be deployed.",
"tr": "Tablo deploy edilemedi."
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.TotalTables",
"en": "Total Tables",
"tr": "Toplam Tablo"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.EndpointInstalled",
"en": "Endpoint Installed",
"tr": "Endpoint Kurulu"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.ActiveEndpoint",
"en": "Active Endpoint",
"tr": "Aktif Endpoint"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.DataSource",
"en": "Data Source",
"tr": "Veri Kaynağı"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.Loading",
"en": "Loading...",
"tr": "Yükleniyor..."
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.SearchTable",
"en": "Search table...",
"tr": "Tablo ara..."
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.FilterAll",
"en": "All",
"tr": "Tümü"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.FilterWith",
"en": "WITH",
"tr": "VAR"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.FilterWithout",
"en": "WITHOUT",
"tr": "YOK"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.NoTablesFound",
"en": "No tables found",
"tr": "Tablo bulunamadı"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.SelectDataSource",
"en": "Select a data source",
"tr": "Veri kaynağı seçin"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.SelectTablePrompt",
"en": "Select a table from the left",
"tr": "Soldan bir tablo seçin"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.SelectTableDescription",
"en": "You can manage CRUD endpoints for the selected table",
"tr": "Seçilen tablo için CRUD endpointlerini yönetebilirsiniz"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.DeleteAll",
"en": "Delete All",
"tr": "Tümünü Sil"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.Regenerate",
"en": "Regenerate",
"tr": "Yeniden Oluştur"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.CreateCrudEndpoint",
"en": "Create CRUD Endpoint",
"tr": "CRUD Endpoint Oluştur"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.NoEndpointsYet",
"en": "No endpoints yet",
"tr": "Henüz endpoint yok"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.ClickToCreate",
"en": "Click the \"Create CRUD Endpoint\" button",
"tr": "\"CRUD Endpoint Oluştur\" butonuna tıklayın"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.Disable",
"en": "Disable",
"tr": "Devre Dışı Bırak"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.Enable",
"en": "Enable",
"tr": "Etkinleştir"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.TestDetails",
"en": "Test / Details",
"tr": "Test et / Detaylar"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.Parameters",
"en": "Parameters",
"tr": "Parametreler"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.RequestBody",
"en": "Request Body (JSON)",
"tr": "Request Body (JSON)"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.Sending",
"en": "Sending...",
"tr": "Gönderiliyor..."
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.Test",
"en": "Test",
"tr": "Test Et"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.Clear",
"en": "Clear",
"tr": "Temizle"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.CsharpCode",
"en": "C# Code",
"tr": "C# Kodu"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.Copy",
"en": "Copy",
"tr": "Kopyala"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.ActiveCount",
"en": "active",
"tr": "aktif"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.InactiveCount",
"en": "inactive",
"tr": "devre dışı"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.CrudEndpoints.EndpointSummary",
"en": "5 endpoints: GetList, GetById, Create, Update, Delete",
"tr": "5 endpoint: GetList, GetById, Create, Update, Delete"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Total",
"en": "Total",
"tr": "Toplam"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Successful",
"en": "Successful",
"tr": "Başarılı"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Failed",
"en": "Failed",
"tr": "Başarısız"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Active",
"en": "Active",
"tr": "Aktif"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Passive",
"en": "Passive",
"tr": "Pasif"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.SearchPlaceholder",
"en": "Search service...",
"tr": "Servis ara..."
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.FilterAll",
"en": "All",
"tr": "Tümü"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.FilterPending",
"en": "Pending",
"tr": "Bekliyor"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.NewService",
"en": "New Service",
"tr": "Yeni Servis"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.NoResults",
"en": "No results found",
"tr": "Sonuç bulunamadı"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.NoServicesYet",
"en": "No services yet",
"tr": "Henüz servis yok"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.TryChangingFilter",
"en": "Try changing filter or search criteria.",
"tr": "Filtre veya arama kriterlerini değiştirmeyi deneyin."
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.GetStarted",
"en": "Start by creating your first dynamic service.",
"tr": "İlk dinamik servisinizi oluşturmak için başlayın."
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.CreateNewService",
"en": "Create New Service",
"tr": "Yeni Servis Oluştur"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.DeleteConfirm",
"en": "Are you sure you want to delete this service?",
"tr": "Bu servisi silmek istediğinizden emin misiniz?"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.DeleteError",
"en": "An error occurred while deleting the service",
"tr": "Servis silinirken hata oluştu"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.EditTooltip",
"en": "Edit",
"tr": "Düzenle"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.DeleteTooltip",
"en": "Delete",
"tr": "Sil"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.EditTitle",
"en": "Edit Service",
"tr": "Servis Düzenle"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.NewTitle",
"en": "New Service",
"tr": "Yeni Servis"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.EditSubtitle",
"en": "Edit the existing service",
"tr": "Mevcut servisi düzenleyin"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.NewSubtitle",
"en": "Create a new dynamic service",
"tr": "Yeni bir dynamic servis oluşturun"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.BackToServices",
"en": "Back to Services",
"tr": "Servislere Dön"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.CopyCode",
"en": "Copy Code",
"tr": "Kodu Kopyala"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.CodeCopied",
"en": "Code copied to clipboard",
"tr": "Kod panoya kopyalandı"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.PleaseEnterCode",
"en": "Please enter code",
"tr": "Lütfen kod girin"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.Compiling",
"en": "Compiling...",
"tr": "Derleniyor..."
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.TestCompile",
"en": "Test Compile",
"tr": "Derlemeyi Test Et"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.Publishing",
"en": "Publishing...",
"tr": "Yayınlanıyor..."
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.Publish",
"en": "Publish",
"tr": "Yayınla"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.CompileSuccess",
"en": "Compilation Successful",
"tr": "Derleme Başarılı"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.CompileFailed",
"en": "Compilation Failed",
"tr": "Derleme Başarısız"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.Line",
"en": "Line",
"tr": "Satır"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.PublishFailed",
"en": "Publish Failed",
"tr": "Yayınlama Başarısız"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.ServiceSettings",
"en": "Service Settings",
"tr": "Servis Ayarları"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.ServiceName",
"en": "Service Name",
"tr": "Servis Adı"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.ServiceNamePlaceholder",
"en": "e.g. DynamicCustomerAppService",
"tr": "ör: DynamicCustomerAppService"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.ServiceNameRequired",
"en": "Service name is required",
"tr": "Servis adı zorunludur"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.DisplayName",
"en": "Display Name",
"tr": "Görünen Ad"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.DisplayNamePlaceholder",
"en": "e.g. Customer Management",
"tr": "ör: Müşteri Yönetimi"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.Description",
"en": "Description",
"tr": "Açıklama"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.DescriptionPlaceholder",
"en": "Short description of this service",
"tr": "Bu servisin kısa açıklaması"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.PrimaryEntityType",
"en": "Primary Entity Type",
"tr": "Ana Entity Türü"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.PrimaryEntityTypePlaceholder",
"en": "e.g. Customer",
"tr": "ör: Customer"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.IsActive",
"en": "Active",
"tr": "Aktif"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.CodeEditor",
"en": "C# Code Editor",
"tr": "C# Kod Editörü"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.LineCount",
"en": "Line:",
"tr": "Satır:"
},
{
"resourceName": "Platform",
"key": "App.DeveloperKit.DynamicServices.Editor.CharCount",
"en": "Char:",
"tr": "Karakter:"
}
]
}

View file

@ -328,7 +328,7 @@ const CrudEndpointManager: React.FC = () => {
<div className="bg-white rounded-lg border border-slate-200 p-6">
<div className="flex items-center justify-between">
<div>
<p className="text-sm font-medium text-slate-600 mb-1">Toplam Tablo</p>
<p className="text-sm font-medium text-slate-600 mb-1">{translate('::App.DeveloperKit.CrudEndpoints.TotalTables')}</p>
<p className="text-3xl font-bold text-slate-900">{dbTables.length}</p>
</div>
<div className="p-3 rounded-lg bg-blue-100">
@ -339,7 +339,7 @@ const CrudEndpointManager: React.FC = () => {
<div className="bg-white rounded-lg border border-slate-200 p-6">
<div className="flex items-center justify-between">
<div>
<p className="text-sm font-medium text-slate-600 mb-1">Endpoint Kurulu</p>
<p className="text-sm font-medium text-slate-600 mb-1">{translate('::App.DeveloperKit.CrudEndpoints.EndpointInstalled')}</p>
<p className="text-3xl font-bold text-slate-900">{tablesWithEndpoints}</p>
</div>
<div className="p-3 rounded-lg bg-green-100">
@ -350,7 +350,7 @@ const CrudEndpointManager: React.FC = () => {
<div className="bg-white rounded-lg border border-slate-200 p-6">
<div className="flex items-center justify-between">
<div>
<p className="text-sm font-medium text-slate-600 mb-1">Aktif Endpoint</p>
<p className="text-sm font-medium text-slate-600 mb-1">{translate('::App.DeveloperKit.CrudEndpoints.ActiveEndpoint')}</p>
<p className="text-3xl font-bold text-slate-900">{totalActiveEndpoints}</p>
</div>
<div className="p-3 rounded-lg bg-emerald-100">
@ -361,7 +361,7 @@ const CrudEndpointManager: React.FC = () => {
<div className="bg-white rounded-lg border border-slate-200 p-6">
<div className="flex items-center justify-between">
<div>
<p className="text-sm font-medium text-slate-600 mb-1">Veri Kaynagi</p>
<p className="text-sm font-medium text-slate-600 mb-1">{translate('::App.DeveloperKit.CrudEndpoints.DataSource')}</p>
<p className="text-3xl font-bold text-slate-900">{dataSources.length}</p>
</div>
<div className="p-3 rounded-lg bg-purple-100">
@ -387,7 +387,7 @@ const CrudEndpointManager: React.FC = () => {
{ds.code}
</option>
))}
{dataSources.length === 0 && <option value="">Yukleniyor...</option>}
{dataSources.length === 0 && <option value="">{translate('::App.DeveloperKit.CrudEndpoints.Loading')}</option>}
</select>
</div>
@ -397,7 +397,7 @@ const CrudEndpointManager: React.FC = () => {
<FaSearch className="absolute left-2.5 top-1/2 -translate-y-1/2 text-slate-400 text-xs" />
<input
type="text"
placeholder="Tablo ara..."
placeholder={translate('::App.DeveloperKit.CrudEndpoints.SearchTable')}
value={tableSearch}
onChange={(e) => setTableSearch(e.target.value)}
className="w-full pl-7 pr-3 py-1.5 text-sm border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"
@ -406,9 +406,9 @@ const CrudEndpointManager: React.FC = () => {
<div className="flex rounded-lg border border-slate-200 overflow-hidden text-xs font-medium">
{(['all', 'with', 'without'] as const).map((f) => {
const labels = {
all: `Tümü (${dbTables.length})`,
with: `VAR (${dbTables.filter((t) => allEndpointCount(t.tableName) > 0).length})`,
without: `YOK (${dbTables.filter((t) => allEndpointCount(t.tableName) === 0).length})`,
all: `${translate('::App.DeveloperKit.CrudEndpoints.FilterAll')} (${dbTables.length})`,
with: `${translate('::App.DeveloperKit.CrudEndpoints.FilterWith')} (${dbTables.filter((t) => allEndpointCount(t.tableName) > 0).length})`,
without: `${translate('::App.DeveloperKit.CrudEndpoints.FilterWithout')} (${dbTables.filter((t) => allEndpointCount(t.tableName) === 0).length})`,
}
const active = crudFilter === f
return (
@ -437,11 +437,11 @@ const CrudEndpointManager: React.FC = () => {
{loadingTables ? (
<div className="flex items-center justify-center p-8 text-slate-400">
<FaSyncAlt className="animate-spin mr-2" />
<span className="text-sm">Yukleniyor...</span>
<span className="text-sm">{translate('::App.DeveloperKit.CrudEndpoints.Loading')}</span>
</div>
) : filteredTables.length === 0 ? (
<div className="p-6 text-center text-slate-400 text-sm">
{selectedDataSource ? 'Tablo bulunamadi' : 'Veri kaynagi secin'}
{selectedDataSource ? translate('::App.DeveloperKit.CrudEndpoints.NoTablesFound') : translate('::App.DeveloperKit.CrudEndpoints.SelectDataSource')}
</div>
) : (
Object.entries(tablesBySchema).map(([schema, tables]) => (
@ -498,9 +498,9 @@ const CrudEndpointManager: React.FC = () => {
{!selectedTable ? (
<div className="flex-1 flex flex-col items-center justify-center text-slate-400 p-8">
<FaDatabase className="text-4xl mb-3 text-slate-200" />
<p className="text-base font-medium">Soldan bir tablo secin</p>
<p className="text-base font-medium">{translate('::App.DeveloperKit.CrudEndpoints.SelectTablePrompt')}</p>
<p className="text-sm mt-1">
Secilen tablo icin CRUD endpointlerini yonetebilirsiniz
{translate('::App.DeveloperKit.CrudEndpoints.SelectTableDescription')}
</p>
</div>
) : (
@ -527,7 +527,7 @@ const CrudEndpointManager: React.FC = () => {
) : (
<FaTrash />
)}
Tumunu Sil
{translate('::App.DeveloperKit.CrudEndpoints.DeleteAll')}
</button>
)}
<button
@ -541,8 +541,8 @@ const CrudEndpointManager: React.FC = () => {
<FaBolt />
)}
{selectedTableEndpoints.length > 0
? 'Yeniden Olustur'
: 'CRUD Endpoint Olustur'}
? translate('::App.DeveloperKit.CrudEndpoints.Regenerate')
: translate('::App.DeveloperKit.CrudEndpoints.CreateCrudEndpoint')}
</button>
</div>
</div>
@ -552,9 +552,9 @@ const CrudEndpointManager: React.FC = () => {
{selectedTableEndpoints.length === 0 ? (
<div className="flex flex-col items-center justify-center py-16 text-slate-400">
<FaBolt className="text-3xl mb-3 text-slate-200" />
<p className="font-medium">Henuz endpoint yok</p>
<p className="font-medium">{translate('::App.DeveloperKit.CrudEndpoints.NoEndpointsYet')}</p>
<p className="text-sm mt-1">
"CRUD Endpoint Olustur" butonuna tiklayin
{translate('::App.DeveloperKit.CrudEndpoints.ClickToCreate')}
</p>
</div>
) : (
@ -573,7 +573,7 @@ const CrudEndpointManager: React.FC = () => {
<button
onClick={() => handleToggle(ep.id)}
disabled={togglingId === ep.id}
title={ep.isActive ? 'Devre disi birak' : 'Etkinlestir'}
title={ep.isActive ? translate('::App.DeveloperKit.CrudEndpoints.Disable') : translate('::App.DeveloperKit.CrudEndpoints.Enable')}
className={`flex-shrink-0 text-xl transition-colors ${
ep.isActive
? 'text-green-500 hover:text-green-700'
@ -613,7 +613,7 @@ const CrudEndpointManager: React.FC = () => {
<button
onClick={() => setExpandedEndpoint(isExpanded ? null : ep.id)}
className="p-1.5 text-slate-400 hover:text-slate-700 transition-colors"
title="Test et / detaylar"
title={translate('::App.DeveloperKit.CrudEndpoints.TestDetails')}
>
{isExpanded ? (
<FaChevronDown className="text-xs" />
@ -630,7 +630,7 @@ const CrudEndpointManager: React.FC = () => {
{getEndpointParameters(ep).length > 0 && (
<div>
<p className="text-xs font-semibold text-slate-600 mb-2">
Parametreler
{translate('::App.DeveloperKit.CrudEndpoints.Parameters')}
</p>
<div className="space-y-2">
{getEndpointParameters(ep).map((param) => (
@ -670,7 +670,7 @@ const CrudEndpointManager: React.FC = () => {
{needsBody(ep) && (
<div>
<p className="text-xs font-semibold text-slate-600 mb-2">
Request Body (JSON)
{translate('::App.DeveloperKit.CrudEndpoints.RequestBody')}
</p>
<textarea
value={getRequestBody(ep)}
@ -698,7 +698,7 @@ const CrudEndpointManager: React.FC = () => {
) : (
<FaPaperPlane />
)}
{loadingEndpoints.has(ep.id) ? 'Gonderiliyor...' : 'Test Et'}
{loadingEndpoints.has(ep.id) ? translate('::App.DeveloperKit.CrudEndpoints.Sending') : translate('::App.DeveloperKit.CrudEndpoints.Test')}
</button>
{testResult && (
<button
@ -711,7 +711,7 @@ const CrudEndpointManager: React.FC = () => {
}
className="text-xs text-slate-500 hover:text-slate-700 px-2 py-1.5"
>
Temizle
{translate('::App.DeveloperKit.CrudEndpoints.Clear')}
</button>
)}
</div>
@ -768,12 +768,12 @@ const CrudEndpointManager: React.FC = () => {
{ep.csharpCode && (
<div>
<div className="flex items-center justify-between mb-1">
<p className="text-xs font-semibold text-slate-600">C# Kodu</p>
<p className="text-xs font-semibold text-slate-600">{translate('::App.DeveloperKit.CrudEndpoints.CsharpCode')}</p>
<button
onClick={() => navigator.clipboard.writeText(ep.csharpCode)}
className="text-xs text-slate-400 hover:text-slate-700 flex items-center gap-1"
>
<FaCopy /> Kopyala
<FaCopy /> {translate('::App.DeveloperKit.CrudEndpoints.Copy')}
</button>
</div>
<pre className="text-xs bg-slate-800 text-green-300 rounded-lg p-3 overflow-x-auto max-h-48 font-mono">
@ -795,11 +795,11 @@ const CrudEndpointManager: React.FC = () => {
<div className="border-t border-slate-200 px-2 py-1 bg-slate-50 flex items-center gap-4 text-xs text-slate-500">
<span className="flex items-center gap-1">
<FaCheckCircle className="text-green-400" />
{selectedTableEndpoints.filter((e) => e.isActive).length} aktif
{selectedTableEndpoints.filter((e) => e.isActive).length} {translate('::App.DeveloperKit.CrudEndpoints.ActiveCount')}
</span>
<span>{selectedTableEndpoints.filter((e) => !e.isActive).length} devre disi</span>
<span>{selectedTableEndpoints.filter((e) => !e.isActive).length} {translate('::App.DeveloperKit.CrudEndpoints.InactiveCount')}</span>
<span className="ml-auto">
5 endpoint: GetList, GetById, Create, Update, Delete
{translate('::App.DeveloperKit.CrudEndpoints.EndpointSummary')}
</span>
</div>
)}

View file

@ -110,7 +110,7 @@ const DynamicServiceEditor: React.FC = () => {
const handleTestCompile = async () => {
if (!code.trim()) {
alert('Lütfen kod girin')
alert(translate('::App.DeveloperKit.DynamicServices.Editor.PleaseEnterCode'))
return
}
try {
@ -121,7 +121,7 @@ const DynamicServiceEditor: React.FC = () => {
} catch (error: any) {
setCompileResult({
success: false,
errorMessage: error.response?.data?.message || 'Derleme sırasında hata oluştu',
errorMessage: error.response?.data?.message || translate('::App.DeveloperKit.DynamicServices.Editor.CompileError'),
compilationTimeMs: 0,
hasWarnings: false,
errors: [],
@ -163,7 +163,7 @@ const DynamicServiceEditor: React.FC = () => {
} catch (error: any) {
setPublishResult({
success: false,
errorMessage: error.response?.data?.message || 'Yayınlama sırasında hata oluştu',
errorMessage: error.response?.data?.message || translate('::App.DeveloperKit.DynamicServices.Editor.PublishError'),
})
} finally {
setIsPublishing(false)
@ -172,10 +172,10 @@ const DynamicServiceEditor: React.FC = () => {
const copyCode = () => {
navigator.clipboard.writeText(code)
alert('Kod panoya kopyalandı')
alert(translate('::App.DeveloperKit.DynamicServices.Editor.CodeCopied'))
}
const pageTitle = id ? `Servis Düzenle` : `Yeni Servis`
const pageTitle = id ? translate('::App.DeveloperKit.DynamicServices.Editor.EditTitle') : translate('::App.DeveloperKit.DynamicServices.Editor.NewTitle')
if (isLoading) {
return (
@ -201,7 +201,7 @@ const DynamicServiceEditor: React.FC = () => {
className="flex items-center gap-2 text-slate-600 text-black px-4 py-2 rounded-lg hover:text-slate-700 transition-colors"
>
<FaArrowLeft className="w-3.5 h-3.5" />
Servislere Dön
{translate('::App.DeveloperKit.DynamicServices.Editor.BackToServices')}
</Link>
<div className="h-6 w-px bg-slate-300"></div>
<div className="flex items-center justify-center w-9 h-9 rounded-lg bg-gradient-to-r from-blue-500 to-purple-600 text-white shrink-0">
@ -210,7 +210,7 @@ const DynamicServiceEditor: React.FC = () => {
<div>
<h1 className="font-semibold text-slate-800 text-sm leading-tight">{pageTitle}</h1>
<p className="text-xs text-slate-500 leading-tight">
{id ? 'Mevcut servisi düzenleyin' : 'Yeni bir dynamic servis oluşturun'}
{id ? translate('::App.DeveloperKit.DynamicServices.Editor.EditSubtitle') : translate('::App.DeveloperKit.DynamicServices.Editor.NewSubtitle')}
</p>
</div>
</div>
@ -222,7 +222,7 @@ const DynamicServiceEditor: React.FC = () => {
className="flex items-center gap-2 px-4 py-2 border border-slate-300 rounded-lg text-slate-600 hover:bg-slate-50 transition-colors"
>
<FaCopy className="w-3.5 h-3.5" />
Kodu Kopyala
{translate('::App.DeveloperKit.DynamicServices.Editor.CopyCode')}
</button>
<button
@ -235,7 +235,7 @@ const DynamicServiceEditor: React.FC = () => {
) : (
<FaPlay className="w-3.5 h-3.5" />
)}
{isCompiling ? 'Derleniyor...' : 'Test Compile'}
{isCompiling ? translate('::App.DeveloperKit.DynamicServices.Editor.Compiling') : translate('::App.DeveloperKit.DynamicServices.Editor.TestCompile')}
</button>
<button
@ -248,7 +248,7 @@ const DynamicServiceEditor: React.FC = () => {
) : (
<FaSave className="w-3.5 h-3.5" />
)}
{isPublishing ? 'Yayınlanıyor...' : 'Yayınla'}
{isPublishing ? translate('::App.DeveloperKit.DynamicServices.Editor.Publishing') : translate('::App.DeveloperKit.DynamicServices.Editor.Publish')}
</button>
</div>
</div>
@ -270,13 +270,13 @@ const DynamicServiceEditor: React.FC = () => {
)}
<div className="flex-1">
<span className="font-medium">
Derleme {compileResult.success ? 'Başarılı' : 'Başarısız'}
{compileResult.success ? translate('::App.DeveloperKit.DynamicServices.Editor.CompileSuccess') : translate('::App.DeveloperKit.DynamicServices.Editor.CompileFailed')}
</span>
{!compileResult.success && compileResult.errors && compileResult.errors.length > 0 && (
<ul className="mt-1 space-y-0.5">
{compileResult.errors.map((e, i) => (
<li key={i} className="text-xs font-mono">
[{e.code}] Satır {e.line}: {e.message}
[{e.code}] {translate('::App.DeveloperKit.DynamicServices.Editor.Line')} {e.line}: {e.message}
</li>
))}
</ul>
@ -292,7 +292,7 @@ const DynamicServiceEditor: React.FC = () => {
<div className="flex items-start gap-3 rounded-lg border bg-red-50 border-red-200 text-red-800 px-4 py-3 text-sm">
<FaExclamationCircle className="w-4 h-4 mt-0.5 shrink-0 text-red-600" />
<div>
<span className="font-medium">Yayınlama Başarısız</span>
<span className="font-medium">{translate('::App.DeveloperKit.DynamicServices.Editor.PublishFailed')}</span>
{publishResult.errorMessage && (
<p className="text-xs mt-0.5">{publishResult.errorMessage}</p>
)}
@ -307,12 +307,12 @@ const DynamicServiceEditor: React.FC = () => {
{/* Panel header */}
<div className="flex items-center gap-2 pb-3 border-b border-slate-100">
<FaCog className="w-4 h-4 text-blue-500" />
<h2 className="font-semibold text-slate-700 text-sm">Servis Ayarları</h2>
<h2 className="font-semibold text-slate-700 text-sm">{translate('::App.DeveloperKit.DynamicServices.Editor.ServiceSettings')}</h2>
</div>
{/* Servis Adı */}
<div>
<label className="block text-sm font-medium text-slate-700 mb-1">Servis Adı</label>
<label className="block text-sm font-medium text-slate-700 mb-1">{translate('::App.DeveloperKit.DynamicServices.Editor.ServiceName')}</label>
<input
type="text"
value={serviceName}
@ -320,53 +320,53 @@ const DynamicServiceEditor: React.FC = () => {
setServiceName(e.target.value)
setSubmitted(false)
}}
placeholder="ör: DynamicCustomerAppService"
placeholder={translate('::App.DeveloperKit.DynamicServices.Editor.ServiceNamePlaceholder')}
className={`w-full px-3 py-2 border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors ${
serviceNameError ? 'border-red-500 bg-red-50' : 'border-slate-300'
}`}
/>
{serviceNameError && <p className="text-red-500 text-xs mt-1">Servis adı zorunludur</p>}
{serviceNameError && <p className="text-red-500 text-xs mt-1">{translate('::App.DeveloperKit.DynamicServices.Editor.ServiceNameRequired')}</p>}
</div>
{/* Görünen Ad */}
<div>
<label className="block text-sm font-medium text-slate-700 mb-1">Görünen Ad</label>
<label className="block text-sm font-medium text-slate-700 mb-1">{translate('::App.DeveloperKit.DynamicServices.Editor.DisplayName')}</label>
<input
type="text"
value={displayName}
onChange={(e) => setDisplayName(e.target.value)}
placeholder="ör: Müşteri Yönetimi"
placeholder={translate('::App.DeveloperKit.DynamicServices.Editor.DisplayNamePlaceholder')}
className="w-full px-3 py-2 border border-slate-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
/>
</div>
{/* Açıklama */}
<div>
<label className="block text-sm font-medium text-slate-700 mb-1">ıklama</label>
<label className="block text-sm font-medium text-slate-700 mb-1">{translate('::App.DeveloperKit.DynamicServices.Editor.Description')}</label>
<input
type="text"
value={description}
onChange={(e) => setDescription(e.target.value)}
placeholder="Bu servisin kısa açıklaması"
placeholder={translate('::App.DeveloperKit.DynamicServices.Editor.DescriptionPlaceholder')}
className="w-full px-3 py-2 border border-slate-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
/>
</div>
{/* Ana Entity Türü */}
<div>
<label className="block text-sm font-medium text-slate-700 mb-1">Ana Entity Türü</label>
<label className="block text-sm font-medium text-slate-700 mb-1">{translate('::App.DeveloperKit.DynamicServices.Editor.PrimaryEntityType')}</label>
<input
type="text"
value={primaryEntityType}
onChange={(e) => setPrimaryEntityType(e.target.value)}
placeholder="ör: Customer"
placeholder={translate('::App.DeveloperKit.DynamicServices.Editor.PrimaryEntityTypePlaceholder')}
className="w-full px-3 py-2 border border-slate-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"
/>
</div>
{/* Aktif */}
<div>
<label className="block text-sm font-medium text-slate-700 mb-1">Aktif</label>
<label className="block text-sm font-medium text-slate-700 mb-1">{translate('::App.DeveloperKit.DynamicServices.Editor.IsActive')}</label>
<input
type="checkbox"
checked={isActive}
@ -383,12 +383,12 @@ const DynamicServiceEditor: React.FC = () => {
<div className="px-5 py-3 bg-slate-50 border-b border-slate-200 flex items-center justify-between">
<div className="flex items-center gap-2">
<FaCode className="w-4 h-4 text-slate-500" />
<h3 className="font-medium text-slate-700 text-sm">C# Kod Editörü</h3>
<h3 className="font-medium text-slate-700 text-sm">{translate('::App.DeveloperKit.DynamicServices.Editor.CodeEditor')}</h3>
</div>
<div className="flex items-center gap-2 text-xs text-slate-500">
<span>Satır: {code.split('\n').length}</span>
<span>{translate('::App.DeveloperKit.DynamicServices.Editor.LineCount')} {code.split('\n').length}</span>
<span className="text-slate-300">|</span>
<span>Karakter: {code.length}</span>
<span>{translate('::App.DeveloperKit.DynamicServices.Editor.CharCount')} {code.length}</span>
</div>
</div>
<div style={{ height: '560px' }}>

View file

@ -45,13 +45,13 @@ const DynamicServiceManager: React.FC = () => {
}
const deleteService = async (serviceId: string) => {
if (!confirm('Bu servisi silmek istediğinizden emin misiniz?')) return
if (!confirm(translate('::App.DeveloperKit.DynamicServices.DeleteConfirm'))) return
try {
await dynamicServiceService.delete(serviceId)
await loadServices()
} catch (error) {
console.error('Servis silinirken hata:', error)
alert('Servis silinirken hata oluştu')
alert(translate('::App.DeveloperKit.DynamicServices.DeleteError'))
}
}
@ -63,35 +63,35 @@ const DynamicServiceManager: React.FC = () => {
const stats = [
{
name: 'Toplam',
name: translate('::App.DeveloperKit.DynamicServices.Total'),
value: totalServices,
icon: FaCode,
color: 'text-purple-600',
bgColor: 'bg-purple-100',
},
{
name: 'Başarılı',
name: translate('::App.DeveloperKit.DynamicServices.Successful'),
value: successServices,
icon: FaCheckCircle,
color: 'text-emerald-600',
bgColor: 'bg-emerald-100',
},
{
name: 'Başarısız',
name: translate('::App.DeveloperKit.DynamicServices.Failed'),
value: failedServices,
icon: FaTimesCircle,
color: 'text-red-600',
bgColor: 'bg-red-100',
},
{
name: 'Aktif',
name: translate('::App.DeveloperKit.DynamicServices.Active'),
value: activeServices,
icon: FaArrowUp,
color: 'text-emerald-600',
bgColor: 'bg-blue-300',
},
{
name: 'Pasif',
name: translate('::App.DeveloperKit.DynamicServices.Passive'),
value: inactiveServices,
icon: FaArrowDown,
color: 'text-emerald-600',
@ -148,7 +148,7 @@ const DynamicServiceManager: React.FC = () => {
<FaSearch className="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400" />
<input
type="text"
placeholder="Servis ara..."
placeholder={translate('::App.DeveloperKit.DynamicServices.SearchPlaceholder')}
value={searchTerm}
onChange={(e) => setSearchTerm(e.target.value)}
className="w-full pl-10 pr-4 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"
@ -163,10 +163,10 @@ const DynamicServiceManager: React.FC = () => {
}
className="px-3 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"
>
<option value="all">Tümü</option>
<option value="Success">Başarılı</option>
<option value="Failed">Başarısız</option>
<option value="Pending">Bekliyor</option>
<option value="all">{translate('::App.DeveloperKit.DynamicServices.FilterAll')}</option>
<option value="Success">{translate('::App.DeveloperKit.DynamicServices.Successful')}</option>
<option value="Failed">{translate('::App.DeveloperKit.DynamicServices.Failed')}</option>
<option value="Pending">{translate('::App.DeveloperKit.DynamicServices.FilterPending')}</option>
</select>
</div>
<div>
@ -175,7 +175,7 @@ const DynamicServiceManager: React.FC = () => {
className="flex items-center gap-2 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors"
>
<FaPlus className="w-4 h-4" />
Yeni Servis
{translate('::App.DeveloperKit.DynamicServices.NewService')}
</Link>
</div>
<div>
@ -244,14 +244,14 @@ const DynamicServiceManager: React.FC = () => {
service.id,
)}
className="p-2 text-slate-500 hover:text-blue-600 hover:bg-blue-50 rounded transition-colors"
title="Düzenle"
title={translate('::App.DeveloperKit.DynamicServices.EditTooltip')}
>
<FaRegEdit className="w-4 h-4" />
</Link>
<button
onClick={() => deleteService(service.id)}
className="p-2 text-slate-500 hover:text-red-600 hover:bg-red-50 rounded transition-colors"
title="Sil"
title={translate('::App.DeveloperKit.DynamicServices.DeleteTooltip')}
>
<FaTrashAlt className="w-4 h-4" />
</button>
@ -266,12 +266,12 @@ const DynamicServiceManager: React.FC = () => {
<FaCode className="w-8 h-8 text-slate-400" />
</div>
<h3 className="text-lg font-medium text-slate-900 mb-2">
{searchTerm || filterStatus !== 'all' ? 'Sonuç bulunamadı' : 'Henüz servis yok'}
{searchTerm || filterStatus !== 'all' ? translate('::App.DeveloperKit.DynamicServices.NoResults') : translate('::App.DeveloperKit.DynamicServices.NoServicesYet')}
</h3>
<p className="text-slate-500 mb-6">
{searchTerm || filterStatus !== 'all'
? 'Filtre veya arama kriterlerini değiştirmeyi deneyin.'
: 'İlk dinamik servisinizi oluşturmak için başlayın.'}
? translate('::App.DeveloperKit.DynamicServices.TryChangingFilter')
: translate('::App.DeveloperKit.DynamicServices.GetStarted')}
</p>
{!searchTerm && filterStatus === 'all' && (
<Link
@ -279,7 +279,7 @@ const DynamicServiceManager: React.FC = () => {
className="inline-flex items-center gap-2 bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors"
>
<FaPlus className="w-4 h-4" />
Yeni Servis Oluştur
{translate('::App.DeveloperKit.DynamicServices.CreateNewService')}
</Link>
)}
</div>