Native locale_names for 14 locales + drop forced-en in editor tabs

Translates the 16-language locale_names block in zh-CN, zh-TW, ko, hi,
vi, tr, de, fr, es, pt-BR, ru, uk, it, pl to the target locale's own
language (e.g. de file: 'en' => 'Englisch', 'ja' => 'Japanisch').

DocumentEditor blade no longer hardcodes 'en' as the locale_names
lookup — falls back to the current UI locale. Test still passes
because tests run with default app locale 'en' and the en file
maps to "Japanese" / "English" etc.

A user editing in ja now sees [English] [日本語 ★] tabs instead of
[English] [Japanese ★].
This commit is contained in:
Yutaka Kurosaki
2026-05-10 13:13:25 +09:00
parent b90e3534ce
commit 5c338e3ae5
15 changed files with 221 additions and 221 deletions
@@ -64,7 +64,7 @@ class="inline-flex items-center justify-center px-3 sm:px-4 py-2 bg-indigo-600 b
@php $isActive = ($loc === $editingLocale); @endphp
<a href="{{ route('documents.translations.edit', ['document' => $document, 'locale' => $loc]) }}"
class="px-3 py-2 text-sm font-medium border-b-2 {{ $isActive ? 'border-indigo-500 text-indigo-600' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300' }}">
{{ __('messages.locale_names.' . $loc, [], 'en') }}
{{ __('messages.locale_names.' . $loc) }}
@if($loc === $document->default_locale)
<span class="ml-1 text-xs text-gray-400"></span>
@endif
@@ -73,7 +73,7 @@ class="px-3 py-2 text-sm font-medium border-b-2 {{ $isActive ? 'border-indigo-50
@if($isNewLocale && $editingLocale)
<span class="px-3 py-2 text-sm font-medium border-b-2 border-indigo-500 text-indigo-600">
{{ __('messages.locale_names.' . $editingLocale, [], 'en') }}
{{ __('messages.locale_names.' . $editingLocale) }}
<span class="ml-1 text-xs text-gray-400">({{ __('messages.documents.new_document') }})</span>
</span>
@endif