@extends("admin.layouts.app") @section("title", __("admin.config.translations.title", ["name" => $language->name])) @section("content") {{-- Translate with AI: the page asks for one batch at a time and shows each one as it lands, so the run can be watched and stopped. --}} @if($locale !== 'en')
{{ __('admin.config.translations.ai_title') }} @if($aiConfigured) {{ __('admin.config.translations.ai_model', ['model' => $aiModel]) }} @endif
@if(! $aiConfigured)

{{ __('admin.config.translations.ai_not_configured') }} {{ __('admin.config.translations.ai_open_settings') }}

@else

{{ __('admin.config.translations.ai_hint') }}

@endif
@endif {{-- Filters --}}
@if(request()->hasAny(['search', 'group'])) {{ __('common.actions.reset') }} @endif
{{-- Translation Table --}}
@csrf
@foreach($englishKeys as $i => $enKey) @php $fullKey = $enKey->group . '.' . $enKey->key; $targetValue = $targetTranslations[$fullKey] ?? ''; $isAutoTranslated = isset($autoTranslated[$fullKey]); @endphp @endforeach
{{ __('admin.config.translations.group') }} {{ __('admin.config.translations.key') }} {{ __('admin.config.translations.source') }} {{ __('admin.config.translations.target', ['name' => $language->name]) }} {{ __('admin.config.translations.ai') }}
{{ $enKey->group }} {{ $enKey->key }} {{ $enKey->value }} @if($targetValue && $isAutoTranslated) @elseif($targetValue) @else @endif
{{ $englishKeys->withQueryString()->links() }} @if($locale !== 'en') @endif
@if($locale !== 'en' && $aiConfigured) @push('scripts') @endpush @endif @endsection