From 490a73dde8f8a4836221ba6a78cff7850b9d5db4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96ZT=C3=9CRK?= <76204082+iamsedatozturk@users.noreply.github.com> Date: Tue, 3 Mar 2026 09:39:00 +0300 Subject: [PATCH] Crudendpoint ve DynamicService translate --- .../Seeds/LanguagesData.json | 493 +++++++++++++++++- .../developerKit/CrudEndpointManager.tsx | 58 +-- .../developerKit/DynamicServiceEditor.tsx | 54 +- .../developerKit/DynamicServiceManager.tsx | 38 +- 4 files changed, 562 insertions(+), 81 deletions(-) diff --git a/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json b/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json index c353f98..aa77342 100644 --- a/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json +++ b/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json @@ -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:" } ] } diff --git a/ui/src/views/developerKit/CrudEndpointManager.tsx b/ui/src/views/developerKit/CrudEndpointManager.tsx index 05cf77f..e281254 100644 --- a/ui/src/views/developerKit/CrudEndpointManager.tsx +++ b/ui/src/views/developerKit/CrudEndpointManager.tsx @@ -328,7 +328,7 @@ const CrudEndpointManager: React.FC = () => {
-

Toplam Tablo

+

{translate('::App.DeveloperKit.CrudEndpoints.TotalTables')}

{dbTables.length}

@@ -339,7 +339,7 @@ const CrudEndpointManager: React.FC = () => {
-

Endpoint Kurulu

+

{translate('::App.DeveloperKit.CrudEndpoints.EndpointInstalled')}

{tablesWithEndpoints}

@@ -350,7 +350,7 @@ const CrudEndpointManager: React.FC = () => {
-

Aktif Endpoint

+

{translate('::App.DeveloperKit.CrudEndpoints.ActiveEndpoint')}

{totalActiveEndpoints}

@@ -361,7 +361,7 @@ const CrudEndpointManager: React.FC = () => {
-

Veri Kaynagi

+

{translate('::App.DeveloperKit.CrudEndpoints.DataSource')}

{dataSources.length}

@@ -387,7 +387,7 @@ const CrudEndpointManager: React.FC = () => { {ds.code} ))} - {dataSources.length === 0 && } + {dataSources.length === 0 && }
@@ -397,7 +397,7 @@ const CrudEndpointManager: React.FC = () => { 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 = () => {
{(['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 ? (
- Yukleniyor... + {translate('::App.DeveloperKit.CrudEndpoints.Loading')}
) : filteredTables.length === 0 ? (
- {selectedDataSource ? 'Tablo bulunamadi' : 'Veri kaynagi secin'} + {selectedDataSource ? translate('::App.DeveloperKit.CrudEndpoints.NoTablesFound') : translate('::App.DeveloperKit.CrudEndpoints.SelectDataSource')}
) : ( Object.entries(tablesBySchema).map(([schema, tables]) => ( @@ -498,9 +498,9 @@ const CrudEndpointManager: React.FC = () => { {!selectedTable ? (
-

Soldan bir tablo secin

+

{translate('::App.DeveloperKit.CrudEndpoints.SelectTablePrompt')}

- Secilen tablo icin CRUD endpointlerini yonetebilirsiniz + {translate('::App.DeveloperKit.CrudEndpoints.SelectTableDescription')}

) : ( @@ -527,7 +527,7 @@ const CrudEndpointManager: React.FC = () => { ) : ( )} - Tumunu Sil + {translate('::App.DeveloperKit.CrudEndpoints.DeleteAll')} )}
@@ -552,9 +552,9 @@ const CrudEndpointManager: React.FC = () => { {selectedTableEndpoints.length === 0 ? (
-

Henuz endpoint yok

+

{translate('::App.DeveloperKit.CrudEndpoints.NoEndpointsYet')}

- "CRUD Endpoint Olustur" butonuna tiklayin + {translate('::App.DeveloperKit.CrudEndpoints.ClickToCreate')}

) : ( @@ -573,7 +573,7 @@ const CrudEndpointManager: React.FC = () => {