@extends('admin.layouts.app') @section('content')

{{ __('admin/settings.translations_title') }}

{{ __('admin/settings.actions.back') }}
@foreach($locales as $locale)
{{ strtoupper($locale) }}
{{ strtoupper($locale) }} @if($locale === config('translatable.fallback_locale')) {{ __('admin/settings.translations.stats.default') }} @endif
{{ $translationStats[$locale]['files_count'] }} {{ __('admin/settings.translations.stats.files') }} {{ $translationStats[$locale]['keys_count'] }} {{ __('admin/settings.translations.stats.keys') }}
@if(!$translationStats[$locale]['path_exists']) {{ __('admin/settings.translations.stats.folder_not_created') }} @endif
@if($locale !== config('translatable.fallback_locale'))
@endif
@endforeach
@if(count($locales) > 1)
{{ __('admin/settings.translations.sync.title') }}
@csrf
@endif
@foreach($locales as $index => $locale)
@if(isset($translationFiles[$locale]) && count($translationFiles[$locale]) > 0)
@foreach($translationFiles[$locale] as $filename => $fileData) @php // Créer un ID sûr pour l'accordéon $safeId = 'file_' . $locale . '_' . str_replace(['/', '.', '-'], ['_', '_', '_'], $filename); @endphp

{{ $filename }}.php
{{ __('admin/settings.translations.file_actions.keys_count', ['count' => $fileData['keys_count']]) }}
@csrf
@if(count($fileData['flattened']) > 0) @foreach($fileData['flattened'] as $key => $value)
@if(is_array($value))
{{ __('admin/settings.translations.array_complex_warning') }}
{{ json_encode($value, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }}
@else @endif
@endforeach @else
{{ __('admin/settings.translations.empty_states.no_keys') }}
@endif
@if(count($fileData['flattened']) > 0)
@endif
@endforeach
@else
{{ __('admin/settings.translations.empty_states.no_files', ['locale' => strtoupper($locale)]) }}

{{ __('admin/settings.translations.empty_states.no_files_description') }}

@endif
@endforeach
@endsection @push('script') @endpush