Compare commits

...

6 Commits

Author SHA1 Message Date
c9fe1f6ed0 Reorder language dropdown for better UX
New order:
1. Primary: English, Japanese
2. Chinese: Simplified, Traditional
3. Korean
4. Other Asian: Hindi, Vietnamese, Turkish
5. European: German, French, Spanish, Portuguese, Russian,
   Ukrainian, Italian, Polish

This prioritizes the most commonly used languages in the target
market while maintaining a logical regional grouping.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 13:02:05 +09:00
01c92aeb7c Add translation files for 8 new languages
Created complete message translation files for:
- pt-BR: Portuguese (Brazil) - 250M+ speakers
- ru: Russian - 260M+ speakers
- uk: Ukrainian - 40M+ speakers
- it: Italian - 67M speakers
- hi: Hindi - 600M+ speakers
- vi: Vietnamese - 95M speakers
- tr: Turkish - 80M speakers
- pl: Polish - 45M speakers

All translation files include complete translations for:
- Navigation, documents, quick switcher
- Admin panel, settings, common terms
- Authentication, errors, profile management

Total supported languages: 16 (LTR only)
These translations provide native language support for
1.5+ billion additional speakers worldwide.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 13:01:12 +09:00
211867e2eb Add 8 major languages (LTR only)
Added languages:
- pt-BR: Português (Brasil) - 250M+ speakers
- ru: Русский - 260M+ speakers
- uk: Українська - 40M+ speakers
- it: Italiano - 67M speakers
- hi: हिन्दी - 600M+ speakers
- vi: Tiếng Việt - 95M speakers
- tr: Türkçe - 80M speakers
- pl: Polski - 45M speakers

Total supported languages: 16
RTL languages (Arabic, Hebrew, etc.) excluded for now,
as they require additional layout implementation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 12:54:14 +09:00
f57d235651 Remove language setting from profile page
Since language switching is now available in the header for all users,
the separate language setting section in the profile page is redundant.

Changes:
- Remove update-locale-form include from profile/edit.blade.php
- Delete profile/partials/update-locale-form.blade.php

Users can now change language using the header dropdown instead.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 12:36:53 +09:00
b419991940 Store guest user language preference in long-lived cookie
Changes:
- LocaleController: Set 1-year cookie when language is changed
- SetLocale middleware: Check cookie after session, before default
  Priority: User DB > Session > Cookie > Default

This allows guest users to retain their language preference
even after closing the browser (persists for 1 year).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 12:32:01 +09:00
61d42d79f1 Enable language switching for guest users
Changes:
- Move locale.update route outside auth middleware
- Update LocaleController to support both authenticated and guest users
  - Guest users: Save locale preference to session only
  - Authenticated users: Save to both session and database
- Add language switcher dropdown to header for all users
  - Display current language with globe icon
  - Show all 8 supported languages in dropdown
  - Highlight currently selected language with checkmark

This allows non-logged-in users to change the interface language,
improving accessibility for international visitors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 12:30:35 +09:00
15 changed files with 1374 additions and 64 deletions

View File

@@ -12,6 +12,20 @@ Markdown対応のナレッジベースアプリケーションです。Wiki風
- 👥 **ユーザー管理** - 管理者によるユーザーのCRUD操作 - 👥 **ユーザー管理** - 管理者によるユーザーのCRUD操作
- 🔒 **認証** - Laravel Breezeによるログイン/登録機能 - 🔒 **認証** - Laravel Breezeによるログイン/登録機能
- 🎨 **シンタックスハイライト** - コードブロックの自動ハイライト - 🎨 **シンタックスハイライト** - コードブロックの自動ハイライト
- 🌐 **多言語対応** - 8言語サポートユーザーごとに言語設定可能
## 対応言語
| 言語 | コード |
|------|--------|
| English | en |
| 日本語 | ja |
| Deutsch | de |
| Français | fr |
| Español | es |
| 简体中文 | zh-CN |
| 繁體中文 | zh-TW |
| 한국어 | ko |
## 技術スタック ## 技術スタック
@@ -49,6 +63,7 @@ Markdown対応のナレッジベースアプリケーションです。Wiki風
│ │ ├── Livewire/ # Livewireコンポーネント │ │ ├── Livewire/ # Livewireコンポーネント
│ │ ├── Models/ # Eloquentモデル │ │ ├── Models/ # Eloquentモデル
│ │ └── Services/ # ビジネスロジック │ │ └── Services/ # ビジネスロジック
│ ├── lang/ # 言語ファイルi18n
│ ├── resources/views/ │ ├── resources/views/
│ │ ├── layouts/ # レイアウト │ │ ├── layouts/ # レイアウト
│ │ ├── livewire/ # Livewireビュー │ │ ├── livewire/ # Livewireビュー
@@ -165,6 +180,62 @@ DocumentSeederを実行すると以下のドキュメントが作成されます
※ 既存のドキュメントがある場合、DocumentSeederはスキップされます。 ※ 既存のドキュメントがある場合、DocumentSeederはスキップされます。
## 本番環境へのデプロイ
### ⚠️ 重要: サブドメインを使用してください
このアプリケーションは **サブドメイン** でのデプロイを推奨します。
```
✅ 推奨: kb.example.com
❌ 非推奨: example.com/kb (サブディレクトリ)
```
**理由**: Livewire 3はサブディレクトリデプロイに完全対応していません。`/livewire/update` エンドポイントがサブディレクトリを考慮しないため、AJAX通信が失敗します。
### デプロイ手順
1. **サブドメインのDNS設定**
```
kb.example.com → サーバーIPアドレス
```
2. **Webサーバー設定**nginx例
```nginx
server {
listen 80;
server_name kb.example.com;
root /var/www/knowledge-base/src/public;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
}
```
3. **環境変数の設定**
```env
APP_URL=https://kb.example.com
APP_ENV=production
APP_DEBUG=false
```
4. **本番用の最適化**
```bash
php artisan config:cache
php artisan route:cache
php artisan view:cache
php artisan optimize
```
## よく使うコマンド ## よく使うコマンド
```bash ```bash
@@ -181,6 +252,12 @@ docker exec kb_php npm [command]
# コンテナに入る # コンテナに入る
docker exec -it kb_php bash docker exec -it kb_php bash
# キャッシュクリア
docker exec kb_php php artisan config:clear
docker exec kb_php php artisan route:clear
docker exec kb_php php artisan view:clear
docker exec kb_php php artisan cache:clear
``` ```
## 管理者機能 ## 管理者機能
@@ -219,6 +296,15 @@ docker exec -it kb_php bash
[[Laravel/Livewire/Components]] も確認してください。 [[Laravel/Livewire/Components]] も確認してください。
``` ```
## 言語設定
ユーザーは「プロフィール」ページから使用言語を変更できます。
1. 右上のユーザー名をクリック
2. 「プロフィール」を選択
3. 「言語設定」セクションで言語を選択
4. 「保存」をクリック
## トラブルシューティング ## トラブルシューティング
### パーミッションエラー ### パーミッションエラー
@@ -243,6 +329,17 @@ docker compose up -d
`src/.env` の `DB_HOST` が `kb_mysql` になっているか確認してください。 `src/.env` の `DB_HOST` が `kb_mysql` になっているか確認してください。
### Livewireのエラー本番環境
「404 /livewire/update」エラーが出る場合は、サブディレクトリではなくサブドメインでデプロイしてください。
```bash
# キャッシュをクリア
php artisan config:clear
php artisan route:clear
php artisan cache:clear
```
## ライセンス ## ライセンス
MIT License MIT License

View File

@@ -10,6 +10,7 @@ class LocaleController extends Controller
{ {
/** /**
* Update the user's locale preference. * Update the user's locale preference.
* Works for both authenticated and guest users.
*/ */
public function update(Request $request) public function update(Request $request)
{ {
@@ -19,12 +20,17 @@ public function update(Request $request)
$locale = $validated['locale']; $locale = $validated['locale'];
// Save to user record // Save to session for immediate effect
Auth::user()->update(['locale' => $locale]);
// Also save to session for immediate effect
$request->session()->put('locale', $locale); $request->session()->put('locale', $locale);
return redirect()->route('profile.edit')->with('success', __('messages.settings.language_updated')); // If authenticated, also save to user record for persistence
if (Auth::check()) {
Auth::user()->update(['locale' => $locale]);
}
// Set long-lived cookie (1 year) for guest users
cookie()->queue('locale', $locale, 525600); // 525600 minutes = 1 year
return redirect()->back()->with('success', __('messages.settings.language_updated'));
} }
} }

View File

@@ -11,36 +11,64 @@
class SetLocale class SetLocale
{ {
/** /**
* Supported locales * Supported locales (LTR languages only)
* Order: English, Japanese, Chinese, Korean, Other Asian, European
*/ */
public const SUPPORTED_LOCALES = [ public const SUPPORTED_LOCALES = [
// Primary languages
'en' => 'English', 'en' => 'English',
'ja' => '日本語', 'ja' => '日本語',
// Chinese variants
'zh-CN' => '简体中文',
'zh-TW' => '繁體中文',
// Korean
'ko' => '한국어',
// Other Asian languages
'hi' => 'हिन्दी',
'vi' => 'Tiếng Việt',
'tr' => 'Türkçe',
// European languages
'de' => 'Deutsch', 'de' => 'Deutsch',
'fr' => 'Français', 'fr' => 'Français',
'es' => 'Español', 'es' => 'Español',
'zh-CN' => '简体中文', 'pt-BR' => 'Português (Brasil)',
'zh-TW' => '繁體中文', 'ru' => 'Русский',
'ko' => '한국어', 'uk' => 'Українська',
'it' => 'Italiano',
'pl' => 'Polski',
]; ];
/** /**
* Handle an incoming request. * Handle an incoming request.
* *
* Priority order:
* 1. Authenticated user's database preference
* 2. Session (for immediate effect after changing)
* 3. Cookie (long-term storage for guest users)
* 4. Default locale from config
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next * @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
*/ */
public function handle(Request $request, Closure $next): Response public function handle(Request $request, Closure $next): Response
{ {
$locale = config('app.locale', 'en'); $locale = config('app.locale', 'en');
// Check authenticated user's preference // Priority 1: Check authenticated user's preference
if (Auth::check() && Auth::user()->locale) { if (Auth::check() && Auth::user()->locale) {
$locale = Auth::user()->locale; $locale = Auth::user()->locale;
} }
// Check session (for immediate effect after changing) // Priority 2: Check session (for immediate effect after changing)
elseif ($request->session()->has('locale')) { elseif ($request->session()->has('locale')) {
$locale = $request->session()->get('locale'); $locale = $request->session()->get('locale');
} }
// Priority 3: Check cookie (long-term storage for guest users)
elseif ($request->cookie('locale')) {
$locale = $request->cookie('locale');
}
// Validate locale // Validate locale
if (!array_key_exists($locale, self::SUPPORTED_LOCALES)) { if (!array_key_exists($locale, self::SUPPORTED_LOCALES)) {

148
src/lang/hi/messages.php Normal file
View File

@@ -0,0 +1,148 @@
<?php
return [
// Navigation
'nav' => [
'dashboard' => 'डैशबोर्ड',
'knowledge_base' => 'ज्ञान आधार',
'profile' => 'प्रोफ़ाइल',
'user_management' => 'उपयोगकर्ता प्रबंधन',
'logout' => 'लॉग आउट',
'login' => 'लॉगिन',
'register' => 'रजिस्टर',
],
// Documents
'documents' => [
'title' => 'दस्तावेज़',
'new_document' => 'नया दस्तावेज़',
'edit_document' => 'दस्तावेज़ संपादित करें',
'edit' => 'संपादित करें',
'delete' => 'हटाएं',
'save' => 'सहेजें',
'cancel' => 'रद्द करें',
'created_by' => 'द्वारा बनाया गया',
'modified_by' => 'द्वारा',
'updated' => 'अपडेट किया गया',
'path' => 'पथ',
'last_modified' => 'अंतिम संशोधन',
'no_documents' => 'कोई दस्तावेज़ नहीं मिला',
'search_placeholder' => 'दस्तावेज़ खोजें...',
'create_success' => 'दस्तावेज़ सफलतापूर्वक बनाया गया!',
'update_success' => 'दस्तावेज़ सफलतापूर्वक अपडेट किया गया!',
'delete_success' => 'दस्तावेज़ सफलतापूर्वक हटाया गया!',
'delete_confirm' => 'क्या आप वाकई इस दस्तावेज़ को हटाना चाहते हैं?',
'linked_references' => 'लिंक किए गए संदर्भ',
'title_label' => 'शीर्षक',
'title_placeholder' => 'दस्तावेज़ शीर्षक (फ़ोल्डर के लिए / का उपयोग करें, जैसे Laravel/Livewire/Components)',
'title_hint' => 'सुझाव: दस्तावेज़ों को स्वचालित रूप से फ़ोल्डर में व्यवस्थित करने के लिए शीर्षक में स्लैश (/) का उपयोग करें',
'content_label' => 'सामग्री',
'content_placeholder' => 'यहां अपना मार्कडाउन लिखें...',
'saving' => 'सहेजा जा रहा है...',
],
// Quick Switcher
'quick_switcher' => [
'title' => 'त्वरित स्विच',
'placeholder' => 'दस्तावेज़ खोजें...',
'no_results' => 'कोई दस्तावेज़ नहीं मिला',
'navigate' => 'नेविगेट करने के लिए',
'select' => 'चुनने के लिए',
'close' => 'बंद करने के लिए',
],
// Admin
'admin' => [
'user_management' => 'उपयोगकर्ता प्रबंधन',
'new_user' => 'नया उपयोगकर्ता',
'edit_user' => 'उपयोगकर्ता संपादित करें',
'create_user' => 'उपयोगकर्ता बनाएं',
'users' => 'उपयोगकर्ता',
'name' => 'नाम',
'email' => 'ईमेल',
'password' => 'पासवर्ड',
'password_confirmation' => 'पासवर्ड की पुष्टि करें',
'password_hint' => 'वर्तमान पासवर्ड रखने के लिए खाली छोड़ दें।',
'role' => 'भूमिका',
'admin' => 'प्रशासक',
'user' => 'उपयोगकर्ता',
'grant_admin' => 'प्रशासक विशेषाधिकार प्रदान करें',
'created_at' => 'बनाया गया',
'actions' => 'क्रियाएं',
'edit' => 'संपादित करें',
'delete' => 'हटाएं',
'no_users' => 'कोई उपयोगकर्ता नहीं मिला।',
'create_success' => 'उपयोगकर्ता सफलतापूर्वक बनाया गया।',
'update_success' => 'उपयोगकर्ता सफलतापूर्वक अपडेट किया गया।',
'delete_success' => 'उपयोगकर्ता सफलतापूर्वक हटाया गया।',
'cannot_delete_self' => 'आप स्वयं को हटा नहीं सकते।',
'self_admin_warning' => 'अपने स्वयं के प्रशासक विशेषाधिकारों को हटाने से आपका प्रशासन पैनल तक पहुंच अवरुद्ध हो जाएगी।',
],
// Settings
'settings' => [
'language' => 'भाषा',
'select_language' => 'भाषा चुनें',
'language_updated' => 'भाषा सफलतापूर्वक अपडेट की गई।',
'change_language' => 'भाषा बदलें',
],
// Common
'common' => [
'save' => 'सहेजें',
'cancel' => 'रद्द करें',
'delete' => 'हटाएं',
'edit' => 'संपादित करें',
'create' => 'बनाएं',
'update' => 'अपडेट करें',
'back' => 'वापस',
'confirm' => 'पुष्टि करें',
'yes' => 'हां',
'no' => 'नहीं',
'loading' => 'लोड हो रहा है...',
'error' => 'त्रुटि',
'success' => 'सफलता',
],
// Auth
'auth' => [
'login' => 'लॉगिन',
'register' => 'रजिस्टर',
'email' => 'ईमेल',
'password' => 'पासवर्ड',
'remember_me' => 'मुझे याद रखें',
'forgot_password' => 'पासवर्ड भूल गए?',
'confirm_password' => 'पासवर्ड की पुष्टि करें',
'already_registered' => 'पहले से रजिस्टर्ड?',
],
// Errors
'errors' => [
'404_title' => 'पेज नहीं मिला',
'page_not_found' => 'पेज नहीं मिला',
'page_not_found_description' => 'आप जिस पेज की तलाश कर रहे हैं वह नहीं मिला।',
'back_to_home' => 'होम पर वापस जाएं',
],
// Profile
'profile' => [
'title' => 'प्रोफ़ाइल',
'information' => 'प्रोफ़ाइल जानकारी',
'information_description' => 'अपने खाते की प्रोफ़ाइल जानकारी और ईमेल पता अपडेट करें।',
'name' => 'नाम',
'email' => 'ईमेल',
'email_unverified' => 'आपका ईमेल पता सत्यापित नहीं है।',
'resend_verification' => 'सत्यापन ईमेल फिर से भेजने के लिए यहां क्लिक करें।',
'verification_sent' => 'आपके ईमेल पते पर एक नया सत्यापन लिंक भेजा गया है।',
'saved' => 'सहेजा गया।',
'update_password' => 'पासवर्ड अपडेट करें',
'update_password_description' => 'सुनिश्चित करें कि आपका खाता सुरक्षित रहने के लिए लंबे, यादृच्छिक पासवर्ड का उपयोग कर रहा है।',
'current_password' => 'वर्तमान पासवर्ड',
'new_password' => 'नया पासवर्ड',
'confirm_password' => 'पासवर्ड की पुष्टि करें',
'delete_account' => 'खाता हटाएं',
'delete_account_description' => 'एक बार आपका खाता हटा दिए जाने के बाद, इसके सभी संसाधन और डेटा स्थायी रूप से हटा दिए जाएंगे। अपना खाता हटाने से पहले, कृपया कोई भी डेटा या जानकारी डाउनलोड करें जिसे आप बनाए रखना चाहते हैं।',
'delete_account_confirm' => 'क्या आप वाकई अपना खाता हटाना चाहते हैं?',
'delete_account_confirm_description' => 'एक बार आपका खाता हटा दिए जाने के बाद, इसके सभी संसाधन और डेटा स्थायी रूप से हटा दिए जाएंगे। कृपया पुष्टि करने के लिए अपना पासवर्ड दर्ज करें कि आप स्थायी रूप से अपना खाता हटाना चाहते हैं।',
],
];

148
src/lang/it/messages.php Normal file
View File

@@ -0,0 +1,148 @@
<?php
return [
// Navigation
'nav' => [
'dashboard' => 'Pannello',
'knowledge_base' => 'Base di Conoscenza',
'profile' => 'Profilo',
'user_management' => 'Gestione Utenti',
'logout' => 'Esci',
'login' => 'Accedi',
'register' => 'Registrati',
],
// Documents
'documents' => [
'title' => 'Documenti',
'new_document' => 'Nuovo Documento',
'edit_document' => 'Modifica Documento',
'edit' => 'Modifica',
'delete' => 'Elimina',
'save' => 'Salva',
'cancel' => 'Annulla',
'created_by' => 'Creato da',
'modified_by' => 'da',
'updated' => 'Aggiornato',
'path' => 'Percorso',
'last_modified' => 'Ultima modifica',
'no_documents' => 'Nessun documento trovato',
'search_placeholder' => 'Cerca documenti...',
'create_success' => 'Documento creato con successo!',
'update_success' => 'Documento aggiornato con successo!',
'delete_success' => 'Documento eliminato con successo!',
'delete_confirm' => 'Sei sicuro di voler eliminare questo documento?',
'linked_references' => 'Riferimenti Collegati',
'title_label' => 'Titolo',
'title_placeholder' => 'Titolo del Documento (usa / per le cartelle, es: Laravel/Livewire/Components)',
'title_hint' => 'Suggerimento: Usa le barre (/) nel titolo per organizzare automaticamente i documenti in cartelle',
'content_label' => 'Contenuto',
'content_placeholder' => 'Scrivi il tuo markdown qui...',
'saving' => 'Salvataggio...',
],
// Quick Switcher
'quick_switcher' => [
'title' => 'Cambio Rapido',
'placeholder' => 'Cerca documenti...',
'no_results' => 'Nessun documento trovato',
'navigate' => 'per navigare',
'select' => 'per selezionare',
'close' => 'per chiudere',
],
// Admin
'admin' => [
'user_management' => 'Gestione Utenti',
'new_user' => 'Nuovo Utente',
'edit_user' => 'Modifica Utente',
'create_user' => 'Crea Utente',
'users' => 'Utenti',
'name' => 'Nome',
'email' => 'Email',
'password' => 'Password',
'password_confirmation' => 'Conferma Password',
'password_hint' => 'Lascia vuoto per mantenere la password attuale.',
'role' => 'Ruolo',
'admin' => 'Amministratore',
'user' => 'Utente',
'grant_admin' => 'Concedi privilegi di amministratore',
'created_at' => 'Creato',
'actions' => 'Azioni',
'edit' => 'Modifica',
'delete' => 'Elimina',
'no_users' => 'Nessun utente trovato.',
'create_success' => 'Utente creato con successo.',
'update_success' => 'Utente aggiornato con successo.',
'delete_success' => 'Utente eliminato con successo.',
'cannot_delete_self' => 'Non puoi eliminare te stesso.',
'self_admin_warning' => 'Rimuovere i propri privilegi di amministratore bloccherà il tuo accesso al pannello di amministrazione.',
],
// Settings
'settings' => [
'language' => 'Lingua',
'select_language' => 'Seleziona Lingua',
'language_updated' => 'Lingua aggiornata con successo.',
'change_language' => 'Cambia lingua',
],
// Common
'common' => [
'save' => 'Salva',
'cancel' => 'Annulla',
'delete' => 'Elimina',
'edit' => 'Modifica',
'create' => 'Crea',
'update' => 'Aggiorna',
'back' => 'Indietro',
'confirm' => 'Conferma',
'yes' => 'Sì',
'no' => 'No',
'loading' => 'Caricamento...',
'error' => 'Errore',
'success' => 'Successo',
],
// Auth
'auth' => [
'login' => 'Accedi',
'register' => 'Registrati',
'email' => 'Email',
'password' => 'Password',
'remember_me' => 'Ricordami',
'forgot_password' => 'Password dimenticata?',
'confirm_password' => 'Conferma Password',
'already_registered' => 'Già registrato?',
],
// Errors
'errors' => [
'404_title' => 'Pagina Non Trovata',
'page_not_found' => 'Pagina Non Trovata',
'page_not_found_description' => 'La pagina che stai cercando non è stata trovata.',
'back_to_home' => 'Torna alla Home',
],
// Profile
'profile' => [
'title' => 'Profilo',
'information' => 'Informazioni Profilo',
'information_description' => 'Aggiorna le informazioni del profilo e l\'indirizzo email del tuo account.',
'name' => 'Nome',
'email' => 'Email',
'email_unverified' => 'Il tuo indirizzo email non è verificato.',
'resend_verification' => 'Clicca qui per inviare nuovamente l\'email di verifica.',
'verification_sent' => 'Un nuovo link di verifica è stato inviato al tuo indirizzo email.',
'saved' => 'Salvato.',
'update_password' => 'Aggiorna Password',
'update_password_description' => 'Assicurati che il tuo account utilizzi una password lunga e casuale per rimanere sicuro.',
'current_password' => 'Password Attuale',
'new_password' => 'Nuova Password',
'confirm_password' => 'Conferma Password',
'delete_account' => 'Elimina Account',
'delete_account_description' => 'Una volta eliminato il tuo account, tutte le sue risorse e dati saranno cancellati permanentemente. Prima di eliminare il tuo account, scarica eventuali dati o informazioni che desideri conservare.',
'delete_account_confirm' => 'Sei sicuro di voler eliminare il tuo account?',
'delete_account_confirm_description' => 'Una volta eliminato il tuo account, tutte le sue risorse e dati saranno cancellati permanentemente. Inserisci la tua password per confermare che desideri eliminare permanentemente il tuo account.',
],
];

148
src/lang/pl/messages.php Normal file
View File

@@ -0,0 +1,148 @@
<?php
return [
// Navigation
'nav' => [
'dashboard' => 'Panel',
'knowledge_base' => 'Baza wiedzy',
'profile' => 'Profil',
'user_management' => 'Zarządzanie użytkownikami',
'logout' => 'Wyloguj',
'login' => 'Zaloguj',
'register' => 'Zarejestruj',
],
// Documents
'documents' => [
'title' => 'Dokumenty',
'new_document' => 'Nowy dokument',
'edit_document' => 'Edytuj dokument',
'edit' => 'Edytuj',
'delete' => 'Usuń',
'save' => 'Zapisz',
'cancel' => 'Anuluj',
'created_by' => 'Utworzony przez',
'modified_by' => 'przez',
'updated' => 'Zaktualizowano',
'path' => 'Ścieżka',
'last_modified' => 'Ostatnia modyfikacja',
'no_documents' => 'Nie znaleziono dokumentów',
'search_placeholder' => 'Szukaj dokumentów...',
'create_success' => 'Dokument został utworzony!',
'update_success' => 'Dokument został zaktualizowany!',
'delete_success' => 'Dokument został usunięty!',
'delete_confirm' => 'Czy na pewno chcesz usunąć ten dokument?',
'linked_references' => 'Powiązane odniesienia',
'title_label' => 'Tytuł',
'title_placeholder' => 'Tytuł dokumentu (użyj / dla folderów, np. Laravel/Livewire/Components)',
'title_hint' => 'Wskazówka: Użyj ukośników (/) w tytule, aby automatycznie organizować dokumenty w foldery',
'content_label' => 'Treść',
'content_placeholder' => 'Napisz swój markdown tutaj...',
'saving' => 'Zapisywanie...',
],
// Quick Switcher
'quick_switcher' => [
'title' => 'Szybkie przełączanie',
'placeholder' => 'Szukaj dokumentów...',
'no_results' => 'Nie znaleziono dokumentów',
'navigate' => 'aby nawigować',
'select' => 'aby wybrać',
'close' => 'aby zamknąć',
],
// Admin
'admin' => [
'user_management' => 'Zarządzanie użytkownikami',
'new_user' => 'Nowy użytkownik',
'edit_user' => 'Edytuj użytkownika',
'create_user' => 'Utwórz użytkownika',
'users' => 'Użytkownicy',
'name' => 'Nazwa',
'email' => 'E-mail',
'password' => 'Hasło',
'password_confirmation' => 'Potwierdź hasło',
'password_hint' => 'Pozostaw puste, aby zachować obecne hasło.',
'role' => 'Rola',
'admin' => 'Administrator',
'user' => 'Użytkownik',
'grant_admin' => 'Przyznaj uprawnienia administratora',
'created_at' => 'Utworzono',
'actions' => 'Działania',
'edit' => 'Edytuj',
'delete' => 'Usuń',
'no_users' => 'Nie znaleziono użytkowników.',
'create_success' => 'Użytkownik został utworzony.',
'update_success' => 'Użytkownik został zaktualizowany.',
'delete_success' => 'Użytkownik został usunięty.',
'cannot_delete_self' => 'Nie możesz usunąć samego siebie.',
'self_admin_warning' => 'Usunięcie własnych uprawnień administratora zablokuje Twój dostęp do panelu administratora.',
],
// Settings
'settings' => [
'language' => 'Język',
'select_language' => 'Wybierz język',
'language_updated' => 'Język został zaktualizowany.',
'change_language' => 'Zmień język',
],
// Common
'common' => [
'save' => 'Zapisz',
'cancel' => 'Anuluj',
'delete' => 'Usuń',
'edit' => 'Edytuj',
'create' => 'Utwórz',
'update' => 'Aktualizuj',
'back' => 'Wstecz',
'confirm' => 'Potwierdź',
'yes' => 'Tak',
'no' => 'Nie',
'loading' => 'Ładowanie...',
'error' => 'Błąd',
'success' => 'Sukces',
],
// Auth
'auth' => [
'login' => 'Zaloguj',
'register' => 'Zarejestruj',
'email' => 'E-mail',
'password' => 'Hasło',
'remember_me' => 'Zapamiętaj mnie',
'forgot_password' => 'Zapomniałeś hasła?',
'confirm_password' => 'Potwierdź hasło',
'already_registered' => 'Już zarejestrowany?',
],
// Errors
'errors' => [
'404_title' => 'Strona nie znaleziona',
'page_not_found' => 'Strona nie znaleziona',
'page_not_found_description' => 'Strona, której szukasz, nie została znaleziona.',
'back_to_home' => 'Wróć do strony głównej',
],
// Profile
'profile' => [
'title' => 'Profil',
'information' => 'Informacje o profilu',
'information_description' => 'Zaktualizuj informacje o profilu i adres e-mail swojego konta.',
'name' => 'Nazwa',
'email' => 'E-mail',
'email_unverified' => 'Twój adres e-mail nie został zweryfikowany.',
'resend_verification' => 'Kliknij tutaj, aby ponownie wysłać e-mail weryfikacyjny.',
'verification_sent' => 'Nowy link weryfikacyjny został wysłany na Twój adres e-mail.',
'saved' => 'Zapisano.',
'update_password' => 'Zaktualizuj hasło',
'update_password_description' => 'Upewnij się, że Twoje konto używa długiego, losowego hasła, aby pozostać bezpiecznym.',
'current_password' => 'Obecne hasło',
'new_password' => 'Nowe hasło',
'confirm_password' => 'Potwierdź hasło',
'delete_account' => 'Usuń konto',
'delete_account_description' => 'Po usunięciu konta wszystkie jego zasoby i dane zostaną trwale usunięte. Przed usunięciem konta pobierz wszelkie dane lub informacje, które chcesz zachować.',
'delete_account_confirm' => 'Czy na pewno chcesz usunąć swoje konto?',
'delete_account_confirm_description' => 'Po usunięciu konta wszystkie jego zasoby i dane zostaną trwale usunięte. Wprowadź swoje hasło, aby potwierdzić, że chcesz trwale usunąć swoje konto.',
],
];

148
src/lang/pt-BR/messages.php Normal file
View File

@@ -0,0 +1,148 @@
<?php
return [
// Navigation
'nav' => [
'dashboard' => 'Painel',
'knowledge_base' => 'Base de Conhecimento',
'profile' => 'Perfil',
'user_management' => 'Gerenciamento de Usuários',
'logout' => 'Sair',
'login' => 'Entrar',
'register' => 'Registrar',
],
// Documents
'documents' => [
'title' => 'Documentos',
'new_document' => 'Novo Documento',
'edit_document' => 'Editar Documento',
'edit' => 'Editar',
'delete' => 'Excluir',
'save' => 'Salvar',
'cancel' => 'Cancelar',
'created_by' => 'Criado por',
'modified_by' => 'por',
'updated' => 'Atualizado',
'path' => 'Caminho',
'last_modified' => 'Última modificação',
'no_documents' => 'Nenhum documento encontrado',
'search_placeholder' => 'Pesquisar documentos...',
'create_success' => 'Documento criado com sucesso!',
'update_success' => 'Documento atualizado com sucesso!',
'delete_success' => 'Documento excluído com sucesso!',
'delete_confirm' => 'Tem certeza de que deseja excluir este documento?',
'linked_references' => 'Referências Vinculadas',
'title_label' => 'Título',
'title_placeholder' => 'Título do Documento (use / para pastas, ex: Laravel/Livewire/Components)',
'title_hint' => 'Dica: Use barras (/) no título para organizar documentos em pastas automaticamente',
'content_label' => 'Conteúdo',
'content_placeholder' => 'Escreva seu markdown aqui...',
'saving' => 'Salvando...',
],
// Quick Switcher
'quick_switcher' => [
'title' => 'Troca Rápida',
'placeholder' => 'Pesquisar documentos...',
'no_results' => 'Nenhum documento encontrado',
'navigate' => 'para navegar',
'select' => 'para selecionar',
'close' => 'para fechar',
],
// Admin
'admin' => [
'user_management' => 'Gerenciamento de Usuários',
'new_user' => 'Novo Usuário',
'edit_user' => 'Editar Usuário',
'create_user' => 'Criar Usuário',
'users' => 'Usuários',
'name' => 'Nome',
'email' => 'E-mail',
'password' => 'Senha',
'password_confirmation' => 'Confirmar Senha',
'password_hint' => 'Deixe em branco para manter a senha atual.',
'role' => 'Função',
'admin' => 'Administrador',
'user' => 'Usuário',
'grant_admin' => 'Conceder privilégios de administrador',
'created_at' => 'Criado',
'actions' => 'Ações',
'edit' => 'Editar',
'delete' => 'Excluir',
'no_users' => 'Nenhum usuário encontrado.',
'create_success' => 'Usuário criado com sucesso.',
'update_success' => 'Usuário atualizado com sucesso.',
'delete_success' => 'Usuário excluído com sucesso.',
'cannot_delete_self' => 'Você não pode excluir a si mesmo.',
'self_admin_warning' => 'Remover seus próprios privilégios de administrador bloqueará seu acesso ao painel de administração.',
],
// Settings
'settings' => [
'language' => 'Idioma',
'select_language' => 'Selecionar Idioma',
'language_updated' => 'Idioma atualizado com sucesso.',
'change_language' => 'Alterar idioma',
],
// Common
'common' => [
'save' => 'Salvar',
'cancel' => 'Cancelar',
'delete' => 'Excluir',
'edit' => 'Editar',
'create' => 'Criar',
'update' => 'Atualizar',
'back' => 'Voltar',
'confirm' => 'Confirmar',
'yes' => 'Sim',
'no' => 'Não',
'loading' => 'Carregando...',
'error' => 'Erro',
'success' => 'Sucesso',
],
// Auth
'auth' => [
'login' => 'Entrar',
'register' => 'Registrar',
'email' => 'E-mail',
'password' => 'Senha',
'remember_me' => 'Lembrar-me',
'forgot_password' => 'Esqueceu sua senha?',
'confirm_password' => 'Confirmar Senha',
'already_registered' => 'Já registrado?',
],
// Errors
'errors' => [
'404_title' => 'Página Não Encontrada',
'page_not_found' => 'Página Não Encontrada',
'page_not_found_description' => 'A página que você está procurando não pôde ser encontrada.',
'back_to_home' => 'Voltar para Início',
],
// Profile
'profile' => [
'title' => 'Perfil',
'information' => 'Informações do Perfil',
'information_description' => 'Atualize as informações do perfil e endereço de e-mail da sua conta.',
'name' => 'Nome',
'email' => 'E-mail',
'email_unverified' => 'Seu endereço de e-mail não está verificado.',
'resend_verification' => 'Clique aqui para reenviar o e-mail de verificação.',
'verification_sent' => 'Um novo link de verificação foi enviado para seu endereço de e-mail.',
'saved' => 'Salvo.',
'update_password' => 'Atualizar Senha',
'update_password_description' => 'Certifique-se de que sua conta esteja usando uma senha longa e aleatória para se manter segura.',
'current_password' => 'Senha Atual',
'new_password' => 'Nova Senha',
'confirm_password' => 'Confirmar Senha',
'delete_account' => 'Excluir Conta',
'delete_account_description' => 'Uma vez que sua conta seja excluída, todos os seus recursos e dados serão permanentemente excluídos. Antes de excluir sua conta, faça o download de quaisquer dados ou informações que deseja reter.',
'delete_account_confirm' => 'Tem certeza de que deseja excluir sua conta?',
'delete_account_confirm_description' => 'Uma vez que sua conta seja excluída, todos os seus recursos e dados serão permanentemente excluídos. Por favor, insira sua senha para confirmar que deseja excluir permanentemente sua conta.',
],
];

148
src/lang/ru/messages.php Normal file
View File

@@ -0,0 +1,148 @@
<?php
return [
// Navigation
'nav' => [
'dashboard' => 'Панель управления',
'knowledge_base' => 'База знаний',
'profile' => 'Профиль',
'user_management' => 'Управление пользователями',
'logout' => 'Выйти',
'login' => 'Войти',
'register' => 'Регистрация',
],
// Documents
'documents' => [
'title' => 'Документы',
'new_document' => 'Новый документ',
'edit_document' => 'Редактировать документ',
'edit' => 'Редактировать',
'delete' => 'Удалить',
'save' => 'Сохранить',
'cancel' => 'Отмена',
'created_by' => 'Создано',
'modified_by' => '',
'updated' => 'Обновлено',
'path' => 'Путь',
'last_modified' => 'Последнее изменение',
'no_documents' => 'Документы не найдены',
'search_placeholder' => 'Поиск документов...',
'create_success' => 'Документ успешно создан!',
'update_success' => 'Документ успешно обновлён!',
'delete_success' => 'Документ успешно удалён!',
'delete_confirm' => 'Вы уверены, что хотите удалить этот документ?',
'linked_references' => 'Связанные ссылки',
'title_label' => 'Название',
'title_placeholder' => 'Название документа (используйте / для папок, например Laravel/Livewire/Components)',
'title_hint' => 'Совет: Используйте слэши (/) в названии для автоматической организации документов в папки',
'content_label' => 'Содержимое',
'content_placeholder' => 'Напишите здесь ваш markdown...',
'saving' => 'Сохранение...',
],
// Quick Switcher
'quick_switcher' => [
'title' => 'Быстрый переход',
'placeholder' => 'Поиск документов...',
'no_results' => 'Документы не найдены',
'navigate' => 'для навигации',
'select' => 'для выбора',
'close' => 'для закрытия',
],
// Admin
'admin' => [
'user_management' => 'Управление пользователями',
'new_user' => 'Новый пользователь',
'edit_user' => 'Редактировать пользователя',
'create_user' => 'Создать пользователя',
'users' => 'Пользователи',
'name' => 'Имя',
'email' => 'Email',
'password' => 'Пароль',
'password_confirmation' => 'Подтверждение пароля',
'password_hint' => 'Оставьте пустым, чтобы сохранить текущий пароль.',
'role' => 'Роль',
'admin' => 'Администратор',
'user' => 'Пользователь',
'grant_admin' => 'Предоставить права администратора',
'created_at' => 'Создан',
'actions' => 'Действия',
'edit' => 'Редактировать',
'delete' => 'Удалить',
'no_users' => 'Пользователи не найдены.',
'create_success' => 'Пользователь успешно создан.',
'update_success' => 'Пользователь успешно обновлён.',
'delete_success' => 'Пользователь успешно удалён.',
'cannot_delete_self' => 'Вы не можете удалить себя.',
'self_admin_warning' => 'Снятие собственных прав администратора заблокирует вам доступ к панели администратора.',
],
// Settings
'settings' => [
'language' => 'Язык',
'select_language' => 'Выбрать язык',
'language_updated' => 'Язык успешно обновлён.',
'change_language' => 'Изменить язык',
],
// Common
'common' => [
'save' => 'Сохранить',
'cancel' => 'Отмена',
'delete' => 'Удалить',
'edit' => 'Редактировать',
'create' => 'Создать',
'update' => 'Обновить',
'back' => 'Назад',
'confirm' => 'Подтвердить',
'yes' => 'Да',
'no' => 'Нет',
'loading' => 'Загрузка...',
'error' => 'Ошибка',
'success' => 'Успех',
],
// Auth
'auth' => [
'login' => 'Войти',
'register' => 'Регистрация',
'email' => 'Email',
'password' => 'Пароль',
'remember_me' => 'Запомнить меня',
'forgot_password' => 'Забыли пароль?',
'confirm_password' => 'Подтверждение пароля',
'already_registered' => 'Уже зарегистрированы?',
],
// Errors
'errors' => [
'404_title' => 'Страница не найдена',
'page_not_found' => 'Страница не найдена',
'page_not_found_description' => 'Страница, которую вы ищете, не найдена.',
'back_to_home' => 'Вернуться на главную',
],
// Profile
'profile' => [
'title' => 'Профиль',
'information' => 'Информация профиля',
'information_description' => 'Обновите информацию профиля и адрес электронной почты вашей учётной записи.',
'name' => 'Имя',
'email' => 'Email',
'email_unverified' => 'Ваш адрес электронной почты не подтверждён.',
'resend_verification' => 'Нажмите здесь, чтобы отправить письмо с подтверждением повторно.',
'verification_sent' => 'Новая ссылка для подтверждения отправлена на ваш адрес электронной почты.',
'saved' => 'Сохранено.',
'update_password' => 'Обновить пароль',
'update_password_description' => 'Убедитесь, что ваша учётная запись использует длинный случайный пароль для обеспечения безопасности.',
'current_password' => 'Текущий пароль',
'new_password' => 'Новый пароль',
'confirm_password' => 'Подтверждение пароля',
'delete_account' => 'Удалить учётную запись',
'delete_account_description' => 'После удаления вашей учётной записи все её ресурсы и данные будут удалены безвозвратно. Перед удалением учётной записи загрузите любые данные или информацию, которые вы хотите сохранить.',
'delete_account_confirm' => 'Вы уверены, что хотите удалить свою учётную запись?',
'delete_account_confirm_description' => 'После удаления вашей учётной записи все её ресурсы и данные будут удалены безвозвратно. Пожалуйста, введите свой пароль, чтобы подтвердить, что вы хотите навсегда удалить свою учётную запись.',
],
];

148
src/lang/tr/messages.php Normal file
View File

@@ -0,0 +1,148 @@
<?php
return [
// Navigation
'nav' => [
'dashboard' => 'Panel',
'knowledge_base' => 'Bilgi Tabanı',
'profile' => 'Profil',
'user_management' => 'Kullanıcı Yönetimi',
'logout' => ıkış',
'login' => 'Giriş',
'register' => 'Kayıt',
],
// Documents
'documents' => [
'title' => 'Belgeler',
'new_document' => 'Yeni Belge',
'edit_document' => 'Belgeyi Düzenle',
'edit' => 'Düzenle',
'delete' => 'Sil',
'save' => 'Kaydet',
'cancel' => 'İptal',
'created_by' => 'Oluşturan',
'modified_by' => 'tarafından',
'updated' => 'Güncellendi',
'path' => 'Yol',
'last_modified' => 'Son değişiklik',
'no_documents' => 'Belge bulunamadı',
'search_placeholder' => 'Belge ara...',
'create_success' => 'Belge başarıyla oluşturuldu!',
'update_success' => 'Belge başarıyla güncellendi!',
'delete_success' => 'Belge başarıyla silindi!',
'delete_confirm' => 'Bu belgeyi silmek istediğinizden emin misiniz?',
'linked_references' => 'Bağlantılı Referanslar',
'title_label' => 'Başlık',
'title_placeholder' => 'Belge Başlığı (klasörler için / kullanın, örn: Laravel/Livewire/Components)',
'title_hint' => 'İpucu: Belgeleri otomatik olarak klasörlere düzenlemek için başlıkta eğik çizgi (/) kullanın',
'content_label' => 'İçerik',
'content_placeholder' => 'Markdown\'ınızı buraya yazın...',
'saving' => 'Kaydediliyor...',
],
// Quick Switcher
'quick_switcher' => [
'title' => 'Hızlı Geçiş',
'placeholder' => 'Belge ara...',
'no_results' => 'Belge bulunamadı',
'navigate' => 'gezinmek için',
'select' => 'seçmek için',
'close' => 'kapatmak için',
],
// Admin
'admin' => [
'user_management' => 'Kullanıcı Yönetimi',
'new_user' => 'Yeni Kullanıcı',
'edit_user' => 'Kullanıcıyı Düzenle',
'create_user' => 'Kullanıcı Oluştur',
'users' => 'Kullanıcılar',
'name' => 'Ad',
'email' => 'E-posta',
'password' => 'Şifre',
'password_confirmation' => 'Şifre Onayı',
'password_hint' => 'Mevcut şifreyi korumak için boş bırakın.',
'role' => 'Rol',
'admin' => 'Yönetici',
'user' => 'Kullanıcı',
'grant_admin' => 'Yönetici ayrıcalıkları ver',
'created_at' => 'Oluşturuldu',
'actions' => 'İşlemler',
'edit' => 'Düzenle',
'delete' => 'Sil',
'no_users' => 'Kullanıcı bulunamadı.',
'create_success' => 'Kullanıcı başarıyla oluşturuldu.',
'update_success' => 'Kullanıcı başarıyla güncellendi.',
'delete_success' => 'Kullanıcı başarıyla silindi.',
'cannot_delete_self' => 'Kendinizi silemezsiniz.',
'self_admin_warning' => 'Kendi yönetici ayrıcalıklarınızı kaldırmak yönetici paneline erişiminizi engelleyecektir.',
],
// Settings
'settings' => [
'language' => 'Dil',
'select_language' => 'Dil Seç',
'language_updated' => 'Dil başarıyla güncellendi.',
'change_language' => 'Dili değiştir',
],
// Common
'common' => [
'save' => 'Kaydet',
'cancel' => 'İptal',
'delete' => 'Sil',
'edit' => 'Düzenle',
'create' => 'Oluştur',
'update' => 'Güncelle',
'back' => 'Geri',
'confirm' => 'Onayla',
'yes' => 'Evet',
'no' => 'Hayır',
'loading' => 'Yükleniyor...',
'error' => 'Hata',
'success' => 'Başarılı',
],
// Auth
'auth' => [
'login' => 'Giriş',
'register' => 'Kayıt',
'email' => 'E-posta',
'password' => 'Şifre',
'remember_me' => 'Beni hatırla',
'forgot_password' => 'Şifrenizi mi unuttunuz?',
'confirm_password' => 'Şifre Onayı',
'already_registered' => 'Zaten kayıtlı mısınız?',
],
// Errors
'errors' => [
'404_title' => 'Sayfa Bulunamadı',
'page_not_found' => 'Sayfa Bulunamadı',
'page_not_found_description' => 'Aradığınız sayfa bulunamadı.',
'back_to_home' => 'Ana Sayfaya Dön',
],
// Profile
'profile' => [
'title' => 'Profil',
'information' => 'Profil Bilgileri',
'information_description' => 'Hesabınızın profil bilgilerini ve e-posta adresini güncelleyin.',
'name' => 'Ad',
'email' => 'E-posta',
'email_unverified' => 'E-posta adresiniz doğrulanmamış.',
'resend_verification' => 'Doğrulama e-postasını yeniden göndermek için buraya tıklayın.',
'verification_sent' => 'E-posta adresinize yeni bir doğrulama bağlantısı gönderildi.',
'saved' => 'Kaydedildi.',
'update_password' => 'Şifreyi Güncelle',
'update_password_description' => 'Hesabınızın güvende kalması için uzun, rastgele bir şifre kullandığından emin olun.',
'current_password' => 'Mevcut Şifre',
'new_password' => 'Yeni Şifre',
'confirm_password' => 'Şifre Onayı',
'delete_account' => 'Hesabı Sil',
'delete_account_description' => 'Hesabınız silindikten sonra, tüm kaynakları ve verileri kalıcı olarak silinecektir. Hesabınızı silmeden önce, saklamak istediğiniz tüm verileri veya bilgileri indirin.',
'delete_account_confirm' => 'Hesabınızı silmek istediğinizden emin misiniz?',
'delete_account_confirm_description' => 'Hesabınız silindikten sonra, tüm kaynakları ve verileri kalıcı olarak silinecektir. Hesabınızı kalıcı olarak silmek istediğinizi onaylamak için lütfen şifrenizi girin.',
],
];

148
src/lang/uk/messages.php Normal file
View File

@@ -0,0 +1,148 @@
<?php
return [
// Navigation
'nav' => [
'dashboard' => 'Панель керування',
'knowledge_base' => 'База знань',
'profile' => 'Профіль',
'user_management' => 'Управління користувачами',
'logout' => 'Вийти',
'login' => 'Увійти',
'register' => 'Реєстрація',
],
// Documents
'documents' => [
'title' => 'Документи',
'new_document' => 'Новий документ',
'edit_document' => 'Редагувати документ',
'edit' => 'Редагувати',
'delete' => 'Видалити',
'save' => 'Зберегти',
'cancel' => 'Скасувати',
'created_by' => 'Створено',
'modified_by' => '',
'updated' => 'Оновлено',
'path' => 'Шлях',
'last_modified' => 'Остання зміна',
'no_documents' => 'Документи не знайдено',
'search_placeholder' => 'Пошук документів...',
'create_success' => 'Документ успішно створено!',
'update_success' => 'Документ успішно оновлено!',
'delete_success' => 'Документ успішно видалено!',
'delete_confirm' => 'Ви впевнені, що хочете видалити цей документ?',
'linked_references' => "Пов'язані посилання",
'title_label' => 'Назва',
'title_placeholder' => 'Назва документа (використовуйте / для папок, наприклад Laravel/Livewire/Components)',
'title_hint' => 'Порада: Використовуйте слеші (/) у назві для автоматичної організації документів у папки',
'content_label' => 'Вміст',
'content_placeholder' => 'Напишіть тут ваш markdown...',
'saving' => 'Збереження...',
],
// Quick Switcher
'quick_switcher' => [
'title' => 'Швидкий перехід',
'placeholder' => 'Пошук документів...',
'no_results' => 'Документи не знайдено',
'navigate' => 'для навігації',
'select' => 'для вибору',
'close' => 'для закриття',
],
// Admin
'admin' => [
'user_management' => 'Управління користувачами',
'new_user' => 'Новий користувач',
'edit_user' => 'Редагувати користувача',
'create_user' => 'Створити користувача',
'users' => 'Користувачі',
'name' => "Ім'я",
'email' => 'Email',
'password' => 'Пароль',
'password_confirmation' => 'Підтвердження пароля',
'password_hint' => 'Залиште порожнім, щоб зберегти поточний пароль.',
'role' => 'Роль',
'admin' => 'Адміністратор',
'user' => 'Користувач',
'grant_admin' => 'Надати права адміністратора',
'created_at' => 'Створено',
'actions' => 'Дії',
'edit' => 'Редагувати',
'delete' => 'Видалити',
'no_users' => 'Користувачі не знайдені.',
'create_success' => 'Користувача успішно створено.',
'update_success' => 'Користувача успішно оновлено.',
'delete_success' => 'Користувача успішно видалено.',
'cannot_delete_self' => 'Ви не можете видалити себе.',
'self_admin_warning' => 'Зняття власних прав адміністратора заблокує вам доступ до панелі адміністратора.',
],
// Settings
'settings' => [
'language' => 'Мова',
'select_language' => 'Вибрати мову',
'language_updated' => 'Мову успішно оновлено.',
'change_language' => 'Змінити мову',
],
// Common
'common' => [
'save' => 'Зберегти',
'cancel' => 'Скасувати',
'delete' => 'Видалити',
'edit' => 'Редагувати',
'create' => 'Створити',
'update' => 'Оновити',
'back' => 'Назад',
'confirm' => 'Підтвердити',
'yes' => 'Так',
'no' => 'Ні',
'loading' => 'Завантаження...',
'error' => 'Помилка',
'success' => 'Успіх',
],
// Auth
'auth' => [
'login' => 'Увійти',
'register' => 'Реєстрація',
'email' => 'Email',
'password' => 'Пароль',
'remember_me' => "Запам'ятати мене",
'forgot_password' => 'Забули пароль?',
'confirm_password' => 'Підтвердження пароля',
'already_registered' => 'Вже зареєстровані?',
],
// Errors
'errors' => [
'404_title' => 'Сторінка не знайдена',
'page_not_found' => 'Сторінка не знайдена',
'page_not_found_description' => 'Сторінку, яку ви шукаєте, не знайдено.',
'back_to_home' => 'Повернутися на головну',
],
// Profile
'profile' => [
'title' => 'Профіль',
'information' => 'Інформація профілю',
'information_description' => 'Оновіть інформацію профілю та адресу електронної пошти вашого облікового запису.',
'name' => "Ім'я",
'email' => 'Email',
'email_unverified' => 'Ваша адреса електронної пошти не підтверджена.',
'resend_verification' => 'Натисніть тут, щоб повторно відправити лист з підтвердженням.',
'verification_sent' => 'Нове посилання для підтвердження відправлено на вашу адресу електронної пошти.',
'saved' => 'Збережено.',
'update_password' => 'Оновити пароль',
'update_password_description' => 'Переконайтеся, що ваш обліковий запис використовує довгий випадковий пароль для забезпечення безпеки.',
'current_password' => 'Поточний пароль',
'new_password' => 'Новий пароль',
'confirm_password' => 'Підтвердження пароля',
'delete_account' => 'Видалити обліковий запис',
'delete_account_description' => 'Після видалення вашого облікового запису всі його ресурси та дані будуть видалені назавжди. Перед видаленням облікового запису завантажте будь-які дані або інформацію, які ви хочете зберегти.',
'delete_account_confirm' => 'Ви впевнені, що хочете видалити свій обліковий запис?',
'delete_account_confirm_description' => 'Після видалення вашого облікового запису всі його ресурси та дані будуть видалені назавжди. Будь ласка, введіть свій пароль, щоб підтвердити, що ви хочете назавжди видалити свій обліковий запис.',
],
];

148
src/lang/vi/messages.php Normal file
View File

@@ -0,0 +1,148 @@
<?php
return [
// Navigation
'nav' => [
'dashboard' => 'Bảng điều khiển',
'knowledge_base' => 'Cơ sở tri thức',
'profile' => 'Hồ sơ',
'user_management' => 'Quản lý người dùng',
'logout' => 'Đăng xuất',
'login' => 'Đăng nhập',
'register' => 'Đăng ký',
],
// Documents
'documents' => [
'title' => 'Tài liệu',
'new_document' => 'Tài liệu mới',
'edit_document' => 'Chỉnh sửa tài liệu',
'edit' => 'Chỉnh sửa',
'delete' => 'Xóa',
'save' => 'Lưu',
'cancel' => 'Hủy',
'created_by' => 'Được tạo bởi',
'modified_by' => 'bởi',
'updated' => 'Đã cập nhật',
'path' => 'Đường dẫn',
'last_modified' => 'Sửa đổi lần cuối',
'no_documents' => 'Không tìm thấy tài liệu',
'search_placeholder' => 'Tìm kiếm tài liệu...',
'create_success' => 'Tạo tài liệu thành công!',
'update_success' => 'Cập nhật tài liệu thành công!',
'delete_success' => 'Xóa tài liệu thành công!',
'delete_confirm' => 'Bạn có chắc chắn muốn xóa tài liệu này?',
'linked_references' => 'Tham chiếu liên kết',
'title_label' => 'Tiêu đề',
'title_placeholder' => 'Tiêu đề tài liệu (sử dụng / cho thư mục, ví dụ: Laravel/Livewire/Components)',
'title_hint' => 'Mẹo: Sử dụng dấu gạch chéo (/) trong tiêu đề để tự động sắp xếp tài liệu vào các thư mục',
'content_label' => 'Nội dung',
'content_placeholder' => 'Viết markdown của bạn ở đây...',
'saving' => 'Đang lưu...',
],
// Quick Switcher
'quick_switcher' => [
'title' => 'Chuyển đổi nhanh',
'placeholder' => 'Tìm kiếm tài liệu...',
'no_results' => 'Không tìm thấy tài liệu',
'navigate' => 'để điều hướng',
'select' => 'để chọn',
'close' => 'để đóng',
],
// Admin
'admin' => [
'user_management' => 'Quản lý người dùng',
'new_user' => 'Người dùng mới',
'edit_user' => 'Chỉnh sửa người dùng',
'create_user' => 'Tạo người dùng',
'users' => 'Người dùng',
'name' => 'Tên',
'email' => 'Email',
'password' => 'Mật khẩu',
'password_confirmation' => 'Xác nhận mật khẩu',
'password_hint' => 'Để trống để giữ mật khẩu hiện tại.',
'role' => 'Vai trò',
'admin' => 'Quản trị viên',
'user' => 'Người dùng',
'grant_admin' => 'Cấp quyền quản trị viên',
'created_at' => 'Đã tạo',
'actions' => 'Hành động',
'edit' => 'Chỉnh sửa',
'delete' => 'Xóa',
'no_users' => 'Không tìm thấy người dùng.',
'create_success' => 'Tạo người dùng thành công.',
'update_success' => 'Cập nhật người dùng thành công.',
'delete_success' => 'Xóa người dùng thành công.',
'cannot_delete_self' => 'Bạn không thể xóa chính mình.',
'self_admin_warning' => 'Xóa quyền quản trị viên của chính bạn sẽ khóa quyền truy cập của bạn vào bảng quản trị.',
],
// Settings
'settings' => [
'language' => 'Ngôn ngữ',
'select_language' => 'Chọn ngôn ngữ',
'language_updated' => 'Cập nhật ngôn ngữ thành công.',
'change_language' => 'Thay đổi ngôn ngữ',
],
// Common
'common' => [
'save' => 'Lưu',
'cancel' => 'Hủy',
'delete' => 'Xóa',
'edit' => 'Chỉnh sửa',
'create' => 'Tạo',
'update' => 'Cập nhật',
'back' => 'Quay lại',
'confirm' => 'Xác nhận',
'yes' => 'Có',
'no' => 'Không',
'loading' => 'Đang tải...',
'error' => 'Lỗi',
'success' => 'Thành công',
],
// Auth
'auth' => [
'login' => 'Đăng nhập',
'register' => 'Đăng ký',
'email' => 'Email',
'password' => 'Mật khẩu',
'remember_me' => 'Ghi nhớ tôi',
'forgot_password' => 'Quên mật khẩu?',
'confirm_password' => 'Xác nhận mật khẩu',
'already_registered' => 'Đã đăng ký?',
],
// Errors
'errors' => [
'404_title' => 'Không tìm thấy trang',
'page_not_found' => 'Không tìm thấy trang',
'page_not_found_description' => 'Trang bạn đang tìm kiếm không thể tìm thấy.',
'back_to_home' => 'Quay lại trang chủ',
],
// Profile
'profile' => [
'title' => 'Hồ sơ',
'information' => 'Thông tin hồ sơ',
'information_description' => 'Cập nhật thông tin hồ sơ và địa chỉ email của tài khoản của bạn.',
'name' => 'Tên',
'email' => 'Email',
'email_unverified' => 'Địa chỉ email của bạn chưa được xác minh.',
'resend_verification' => 'Nhấp vào đây để gửi lại email xác minh.',
'verification_sent' => 'Một liên kết xác minh mới đã được gửi đến địa chỉ email của bạn.',
'saved' => 'Đã lưu.',
'update_password' => 'Cập nhật mật khẩu',
'update_password_description' => 'Đảm bảo tài khoản của bạn đang sử dụng mật khẩu dài, ngẫu nhiên để luôn an toàn.',
'current_password' => 'Mật khẩu hiện tại',
'new_password' => 'Mật khẩu mới',
'confirm_password' => 'Xác nhận mật khẩu',
'delete_account' => 'Xóa tài khoản',
'delete_account_description' => 'Sau khi tài khoản của bạn bị xóa, tất cả tài nguyên và dữ liệu của nó sẽ bị xóa vĩnh viễn. Trước khi xóa tài khoản của bạn, vui lòng tải xuống bất kỳ dữ liệu hoặc thông tin nào mà bạn muốn giữ lại.',
'delete_account_confirm' => 'Bạn có chắc chắn muốn xóa tài khoản của mình?',
'delete_account_confirm_description' => 'Sau khi tài khoản của bạn bị xóa, tất cả tài nguyên và dữ liệu của nó sẽ bị xóa vĩnh viễn. Vui lòng nhập mật khẩu của bạn để xác nhận rằng bạn muốn xóa vĩnh viễn tài khoản của mình.',
],
];

View File

@@ -59,6 +59,51 @@ class="inline-flex items-center px-3 py-2 border border-gray-300 shadow-sm text-
</kbd> </kbd>
</button> </button>
<!-- Language Switcher (for all users) -->
<div x-data="{ open: false }" @click.away="open = false" class="relative">
<button
@click="open = !open"
class="flex items-center px-3 py-2 text-sm font-medium text-gray-700 hover:text-gray-900 focus:outline-none"
title="{{ __('messages.settings.change_language') }}"
>
<svg class="w-5 h-5 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129"></path>
</svg>
@php
$currentLocale = app()->getLocale();
$locales = \App\Http\Middleware\SetLocale::SUPPORTED_LOCALES;
@endphp
<span class="hidden sm:inline">{{ $locales[$currentLocale] ?? 'English' }}</span>
<svg class="ml-1 h-4 w-4" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path>
</svg>
</button>
<div
x-show="open"
x-transition
class="absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg py-1 ring-1 ring-black ring-opacity-5 max-h-96 overflow-y-auto"
>
@foreach($locales as $code => $name)
<form method="POST" action="{{ route('locale.update') }}" class="inline-block w-full">
@csrf
<input type="hidden" name="locale" value="{{ $code }}">
<button
type="submit"
class="w-full text-left px-4 py-2 text-sm hover:bg-gray-100 {{ $currentLocale === $code ? 'bg-indigo-50 text-indigo-700 font-semibold' : 'text-gray-700' }}"
>
{{ $name }}
@if($currentLocale === $code)
<svg class="inline-block w-4 h-4 ml-2" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"></path>
</svg>
@endif
</button>
</form>
@endforeach
</div>
</div>
@auth @auth
<!-- User Dropdown --> <!-- User Dropdown -->
<div x-data="{ open: false }" @click.away="open = false" class="relative"> <div x-data="{ open: false }" @click.away="open = false" class="relative">

View File

@@ -13,12 +13,6 @@
</div> </div>
</div> </div>
<div class="p-4 sm:p-8 bg-white shadow sm:rounded-lg">
<div class="max-w-xl">
@include('profile.partials.update-locale-form')
</div>
</div>
<div class="p-4 sm:p-8 bg-white shadow sm:rounded-lg"> <div class="p-4 sm:p-8 bg-white shadow sm:rounded-lg">
<div class="max-w-xl"> <div class="max-w-xl">
@include('profile.partials.update-password-form') @include('profile.partials.update-password-form')

View File

@@ -1,46 +0,0 @@
<section>
<header>
<h2 class="text-lg font-medium text-gray-900">
{{ __('messages.settings.language') }}
</h2>
<p class="mt-1 text-sm text-gray-600">
{{ __('messages.settings.select_language') }}
</p>
</header>
<form method="post" action="{{ route('locale.update') }}" class="mt-6 space-y-6">
@csrf
<div>
<x-input-label for="locale" :value="__('messages.settings.language')" />
<select
id="locale"
name="locale"
class="mt-1 block w-full border-gray-300 focus:border-indigo-500 focus:ring-indigo-500 rounded-md shadow-sm"
>
@foreach(\App\Http\Middleware\SetLocale::SUPPORTED_LOCALES as $code => $name)
<option value="{{ $code }}" {{ (auth()->user()->locale ?? 'en') === $code ? 'selected' : '' }}>
{{ $name }}
</option>
@endforeach
</select>
<x-input-error class="mt-2" :messages="$errors->get('locale')" />
</div>
<div class="flex items-center gap-4">
<x-primary-button>{{ __('messages.common.save') }}</x-primary-button>
@if (session('success'))
<p
x-data="{ show: true }"
x-show="show"
x-transition
x-init="setTimeout(() => show = false, 2000)"
class="text-sm text-gray-600"
>{{ session('success') }}</p>
@endif
</div>
</form>
</section>

View File

@@ -22,11 +22,13 @@
return view('dashboard'); return view('dashboard');
})->middleware(['auth', 'verified'])->name('dashboard'); })->middleware(['auth', 'verified'])->name('dashboard');
// Locale switcher - available for all users (both authenticated and guest)
Route::post('/locale', [LocaleController::class, 'update'])->name('locale.update');
Route::middleware('auth')->group(function () { Route::middleware('auth')->group(function () {
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit'); Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update'); Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy'); Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
Route::post('/locale', [LocaleController::class, 'update'])->name('locale.update');
}); });
// Admin routes // Admin routes