From bc752b3b74b1ef94caf5fe7734e35eeef23e083d Mon Sep 17 00:00:00 2001 From: Daniel Luiz Alves Date: Mon, 2 Jun 2025 17:05:01 -0300 Subject: [PATCH] feat: enhance file selector with improved localization and functionality - Updated localization files for multiple languages to include new strings related to file sharing and management. - Enhanced the FileSelector component to support additional features such as file descriptions, search functionality, and improved user feedback. - Refactored action button titles and placeholder texts to utilize localized strings for better user experience. - Improved the display of file counts and selection statuses in the file selector interface. --- apps/web/messages/ar-SA.json | 23 ++++++++-- apps/web/messages/de-DE.json | 21 ++++++++-- apps/web/messages/en-US.json | 15 +++++++ apps/web/messages/es-ES.json | 25 ++++++++--- apps/web/messages/fr-FR.json | 19 ++++++++- apps/web/messages/hi-IN.json | 23 ++++++++-- apps/web/messages/it-IT.json | 17 +++++++- apps/web/messages/ja-JP.json | 19 ++++++++- apps/web/messages/ko-KR.json | 21 ++++++++-- apps/web/messages/nl-NL.json | 23 ++++++++-- apps/web/messages/pt-BR.json | 17 +++++++- apps/web/messages/ru-RU.json | 25 ++++++++--- apps/web/messages/tr-TR.json | 25 ++++++++--- apps/web/messages/zh-CN.json | 17 +++++++- .../src/components/general/file-selector.tsx | 42 +++++++------------ 15 files changed, 266 insertions(+), 66 deletions(-) diff --git a/apps/web/messages/ar-SA.json b/apps/web/messages/ar-SA.json index 8e433ae..5d3ffb6 100644 --- a/apps/web/messages/ar-SA.json +++ b/apps/web/messages/ar-SA.json @@ -84,12 +84,27 @@ }, "fileSelector": { "availableFiles": "الملفات المتاحة ({count})", - "shareFiles": "مشاركة الملفات ({count})", - "searchPlaceholder": "ابحث عن الملفات...", + "shareFiles": "الملفات المشتركة ({count})", + "shareFilesDescription": "الملفات الموجودة حالياً في المشاركة", + "availableFilesDescription": "اختر الملفات لإضافتها إلى المشاركة", + "searchPlaceholder": "البحث في الملفات...", + "searchSelectedFiles": "البحث في الملفات المحددة...", "noMatchingFiles": "لا توجد ملفات مطابقة", "noAvailableFiles": "لا توجد ملفات متاحة", - "noFilesInShare": "لا توجد ملفات للمشاركة", - "saveChanges": "احفظ التغييرات" + "noFilesInShare": "لا توجد ملفات في المشاركة", + "noFilesFound": "لم يتم العثور على ملفات", + "noFilesFoundWith": "لم يتم العثور على ملفات تحتوي على \"{query}\"", + "addFilesFromList": "أضف ملفات من القائمة أدناه", + "tryDifferentSearch": "جرب مصطلحات بحث مختلفة", + "allFilesInShare": "جميع الملفات موجودة بالفعل في المشاركة", + "uploadNewFiles": "ارفع ملفات جديدة لإضافتها", + "fileCount": "{count, plural, =1 {ملف} other {ملفات}}", + "filesSelected": "{count, plural, =0 {لا توجد ملفات محددة} =1 {ملف واحد محدد} other {# ملفات محددة}}", + "editFile": "تعديل الملف", + "previewFile": "معاينة الملف", + "addToShare": "إضافة إلى المشاركة", + "removeFromShare": "إزالة من المشاركة", + "saveChanges": "حفظ التغييرات" }, "files": { "title": "جميع الملفات", diff --git a/apps/web/messages/de-DE.json b/apps/web/messages/de-DE.json index fd34a52..3d0c7f4 100644 --- a/apps/web/messages/de-DE.json +++ b/apps/web/messages/de-DE.json @@ -84,12 +84,27 @@ }, "fileSelector": { "availableFiles": "Verfügbare Dateien ({count})", - "shareFiles": "Dateien teilen ({count})", + "shareFiles": "Geteilte Dateien ({count})", + "shareFilesDescription": "Dateien derzeit in der Freigabe", + "availableFilesDescription": "Wählen Sie Dateien aus, um sie zur Freigabe hinzuzufügen", "searchPlaceholder": "Dateien suchen...", - "noMatchingFiles": "Keine übereinstimmenden Dateien", + "searchSelectedFiles": "In ausgewählten Dateien suchen...", + "noMatchingFiles": "Keine passenden Dateien", "noAvailableFiles": "Keine Dateien verfügbar", "noFilesInShare": "Keine Dateien in der Freigabe", - "saveChanges": "Änderungen speichern" + "noFilesFound": "Keine Dateien gefunden", + "noFilesFoundWith": "Keine Dateien gefunden mit \"{query}\"", + "addFilesFromList": "Fügen Sie Dateien aus der unten stehenden Liste hinzu", + "tryDifferentSearch": "Versuchen Sie andere Suchbegriffe", + "allFilesInShare": "Alle Dateien sind bereits in der Freigabe", + "uploadNewFiles": "Laden Sie neue Dateien hoch, um sie hinzuzufügen", + "fileCount": "{count, plural, =1 {Datei} other {Dateien}}", + "filesSelected": "{count, plural, =0 {Keine Dateien ausgewählt} =1 {1 Datei ausgewählt} other {# Dateien ausgewählt}}", + "editFile": "Datei bearbeiten", + "previewFile": "Datei-Vorschau", + "addToShare": "Zur Freigabe hinzufügen", + "removeFromShare": "Aus Freigabe entfernen", + "saveChanges": "Änderungen Speichern" }, "files": { "title": "Alle Dateien", diff --git a/apps/web/messages/en-US.json b/apps/web/messages/en-US.json index effbf9a..2197718 100644 --- a/apps/web/messages/en-US.json +++ b/apps/web/messages/en-US.json @@ -85,10 +85,25 @@ "fileSelector": { "availableFiles": "Available Files ({count})", "shareFiles": "Share Files ({count})", + "shareFilesDescription": "Files currently in the share", + "availableFilesDescription": "Select files to add to the share", "searchPlaceholder": "Search files...", + "searchSelectedFiles": "Search selected files...", "noMatchingFiles": "No matching files", "noAvailableFiles": "No files available", "noFilesInShare": "No files in share", + "noFilesFound": "No files found", + "noFilesFoundWith": "No files found with \"{query}\"", + "addFilesFromList": "Add files from the list below", + "tryDifferentSearch": "Try different search terms", + "allFilesInShare": "All files are already in the share", + "uploadNewFiles": "Upload new files to add them", + "fileCount": "{count, plural, =1 {file} other {files}}", + "filesSelected": "{count, plural, =0 {No files selected} =1 {1 file selected} other {# files selected}}", + "editFile": "Edit file", + "previewFile": "Preview file", + "addToShare": "Add to share", + "removeFromShare": "Remove from share", "saveChanges": "Save Changes" }, "files": { diff --git a/apps/web/messages/es-ES.json b/apps/web/messages/es-ES.json index c639f58..7426011 100644 --- a/apps/web/messages/es-ES.json +++ b/apps/web/messages/es-ES.json @@ -83,13 +83,28 @@ "loadingAudio": "Cargando audio..." }, "fileSelector": { - "availableFiles": "Archivos disponibles ({count})", - "shareFiles": "Compartir archivos ({count})", + "availableFiles": "Archivos Disponibles ({count})", + "shareFiles": "Archivos Compartidos ({count})", + "shareFilesDescription": "Archivos actualmente en la compartición", + "availableFilesDescription": "Selecciona archivos para agregar a la compartición", "searchPlaceholder": "Buscar archivos...", - "noMatchingFiles": "No hay archivos que coincidan", + "searchSelectedFiles": "Buscar en archivos seleccionados...", + "noMatchingFiles": "No se encontraron archivos coincidentes", "noAvailableFiles": "No hay archivos disponibles", - "noFilesInShare": "No hay archivos compartidos", - "saveChanges": "Guardar cambios" + "noFilesInShare": "No hay archivos en la compartición", + "noFilesFound": "No se encontraron archivos", + "noFilesFoundWith": "No se encontraron archivos con \"{query}\"", + "addFilesFromList": "Agrega archivos de la lista a continuación", + "tryDifferentSearch": "Intenta con otros términos de búsqueda", + "allFilesInShare": "Todos los archivos ya están en la compartición", + "uploadNewFiles": "Sube nuevos archivos para agregarlos", + "fileCount": "{count, plural, =1 {archivo} other {archivos}}", + "filesSelected": "{count, plural, =0 {Ningún archivo seleccionado} =1 {1 archivo seleccionado} other {# archivos seleccionados}}", + "editFile": "Editar archivo", + "previewFile": "Vista previa del archivo", + "addToShare": "Agregar a compartición", + "removeFromShare": "Quitar de compartición", + "saveChanges": "Guardar Cambios" }, "files": { "title": "Todos los Archivos", diff --git a/apps/web/messages/fr-FR.json b/apps/web/messages/fr-FR.json index 85e49f0..fcf5c14 100644 --- a/apps/web/messages/fr-FR.json +++ b/apps/web/messages/fr-FR.json @@ -85,11 +85,26 @@ "fileSelector": { "availableFiles": "Fichiers Disponibles ({count})", "shareFiles": "Fichiers Partagés ({count})", + "shareFilesDescription": "Fichiers actuellement dans le partage", + "availableFilesDescription": "Sélectionnez des fichiers à ajouter au partage", "searchPlaceholder": "Rechercher des fichiers...", + "searchSelectedFiles": "Rechercher dans les fichiers sélectionnés...", "noMatchingFiles": "Aucun fichier correspondant", "noAvailableFiles": "Aucun fichier disponible", - "noFilesInShare": "Aucun fichier partagé", - "saveChanges": "Enregistrer les Modifications" + "noFilesInShare": "Aucun fichier dans le partage", + "noFilesFound": "Aucun fichier trouvé", + "noFilesFoundWith": "Aucun fichier trouvé avec \"{query}\"", + "addFilesFromList": "Ajoutez des fichiers de la liste ci-dessous", + "tryDifferentSearch": "Essayez d'autres termes de recherche", + "allFilesInShare": "Tous les fichiers sont déjà dans le partage", + "uploadNewFiles": "Téléchargez de nouveaux fichiers pour les ajouter", + "fileCount": "{count, plural, =1 {fichier} other {fichiers}}", + "filesSelected": "{count, plural, =0 {Aucun fichier sélectionné} =1 {1 fichier sélectionné} other {# fichiers sélectionnés}}", + "editFile": "Modifier le fichier", + "previewFile": "Aperçu du fichier", + "addToShare": "Ajouter au partage", + "removeFromShare": "Retirer du partage", + "saveChanges": "Sauvegarder les Modifications" }, "files": { "title": "Tous les Fichiers", diff --git a/apps/web/messages/hi-IN.json b/apps/web/messages/hi-IN.json index 6018cc6..a4fbbba 100644 --- a/apps/web/messages/hi-IN.json +++ b/apps/web/messages/hi-IN.json @@ -84,11 +84,26 @@ }, "fileSelector": { "availableFiles": "उपलब्ध फाइलें ({count})", - "shareFiles": "फाइलें साझा करें ({count})", - "searchPlaceholder": "फाइलें खोजें...", - "noMatchingFiles": "कोई मेल खाने वाली फाइलें नहीं", - "noAvailableFiles": "कोई फाइल उपलब्ध नहीं", + "shareFiles": "साझा फाइलें ({count})", + "shareFilesDescription": "वर्तमान में साझाकरण में फाइलें", + "availableFilesDescription": "साझाकरण में जोड़ने के लिए फाइलें चुनें", + "searchPlaceholder": "फाइलों की खोज करें...", + "searchSelectedFiles": "चयनित फाइलों में खोजें...", + "noMatchingFiles": "कोई मिलती जुलती फाइलें नहीं", + "noAvailableFiles": "कोई उपलब्ध फाइलें नहीं", "noFilesInShare": "साझाकरण में कोई फाइलें नहीं", + "noFilesFound": "कोई फाइलें नहीं मिलीं", + "noFilesFoundWith": "\"{query}\" वाली कोई फाइलें नहीं मिलीं", + "addFilesFromList": "नीचे की सूची से फाइलें जोड़ें", + "tryDifferentSearch": "अलग खोज शब्दों का प्रयास करें", + "allFilesInShare": "सभी फाइलें पहले से साझाकरण में हैं", + "uploadNewFiles": "जोड़ने के लिए नई फाइलें अपलोड करें", + "fileCount": "{count} फाइलें", + "filesSelected": "{count, plural, =0 {कोई फाइल चयनित नहीं} =1 {1 फाइल चयनित} other {# फाइलें चयनित}}", + "editFile": "फाइल संपादित करें", + "previewFile": "फाइल पूर्वावलोकन", + "addToShare": "साझाकरण में जोड़ें", + "removeFromShare": "साझाकरण से हटाएं", "saveChanges": "परिवर्तन सहेजें" }, "files": { diff --git a/apps/web/messages/it-IT.json b/apps/web/messages/it-IT.json index 83dbe7e..b4ee5f9 100644 --- a/apps/web/messages/it-IT.json +++ b/apps/web/messages/it-IT.json @@ -84,11 +84,26 @@ }, "fileSelector": { "availableFiles": "File Disponibili ({count})", - "shareFiles": "Condividi File ({count})", + "shareFiles": "File Condivisi ({count})", + "shareFilesDescription": "File attualmente nella condivisione", + "availableFilesDescription": "Seleziona i file da aggiungere alla condivisione", "searchPlaceholder": "Cerca file...", + "searchSelectedFiles": "Cerca nei file selezionati...", "noMatchingFiles": "Nessun file corrispondente", "noAvailableFiles": "Nessun file disponibile", "noFilesInShare": "Nessun file nella condivisione", + "noFilesFound": "Nessun file trovato", + "noFilesFoundWith": "Nessun file trovato con \"{query}\"", + "addFilesFromList": "Aggiungi file dalla lista sottostante", + "tryDifferentSearch": "Prova termini di ricerca diversi", + "allFilesInShare": "Tutti i file sono già nella condivisione", + "uploadNewFiles": "Carica nuovi file per aggiungerli", + "fileCount": "{count, plural, =1 {file} other {file}}", + "filesSelected": "{count, plural, =0 {Nessun file selezionato} =1 {1 file selezionato} other {# file selezionati}}", + "editFile": "Modifica file", + "previewFile": "Anteprima file", + "addToShare": "Aggiungi alla condivisione", + "removeFromShare": "Rimuovi dalla condivisione", "saveChanges": "Salva Modifiche" }, "files": { diff --git a/apps/web/messages/ja-JP.json b/apps/web/messages/ja-JP.json index f549b5f..47aefb8 100644 --- a/apps/web/messages/ja-JP.json +++ b/apps/web/messages/ja-JP.json @@ -84,11 +84,26 @@ }, "fileSelector": { "availableFiles": "利用可能なファイル ({count})", - "shareFiles": "ファイルを共有 ({count})", + "shareFiles": "共有ファイル ({count})", + "shareFilesDescription": "現在共有されているファイル", + "availableFilesDescription": "共有に追加するファイルを選択", "searchPlaceholder": "ファイルを検索...", + "searchSelectedFiles": "選択されたファイルを検索...", "noMatchingFiles": "一致するファイルがありません", "noAvailableFiles": "利用可能なファイルがありません", - "noFilesInShare": "共有ファイルがありません", + "noFilesInShare": "共有にファイルがありません", + "noFilesFound": "ファイルが見つかりませんでした", + "noFilesFoundWith": "\"{query}\"に一致するファイルが見つかりません", + "addFilesFromList": "下のリストからファイルを追加", + "tryDifferentSearch": "別の検索用語を試してください", + "allFilesInShare": "すべてのファイルが既に共有されています", + "uploadNewFiles": "新しいファイルをアップロードして追加", + "fileCount": "{count}ファイル", + "filesSelected": "{count, plural, =0 {ファイルが選択されていません} other {#ファイルが選択されています}}", + "editFile": "ファイルを編集", + "previewFile": "ファイルをプレビュー", + "addToShare": "共有に追加", + "removeFromShare": "共有から削除", "saveChanges": "変更を保存" }, "files": { diff --git a/apps/web/messages/ko-KR.json b/apps/web/messages/ko-KR.json index a49ff36..3a4365f 100644 --- a/apps/web/messages/ko-KR.json +++ b/apps/web/messages/ko-KR.json @@ -84,12 +84,27 @@ }, "fileSelector": { "availableFiles": "사용 가능한 파일 ({count})", - "shareFiles": "파일 공유 ({count})", + "shareFiles": "공유 파일 ({count})", + "shareFilesDescription": "현재 공유 중인 파일", + "availableFilesDescription": "공유에 추가할 파일을 선택하세요", "searchPlaceholder": "파일 검색...", + "searchSelectedFiles": "선택된 파일에서 검색...", "noMatchingFiles": "일치하는 파일이 없습니다", "noAvailableFiles": "사용 가능한 파일이 없습니다", - "noFilesInShare": "공유된 파일이 없습니다", - "saveChanges": "변경 사항 저장" + "noFilesInShare": "공유에 파일이 없습니다", + "noFilesFound": "파일을 찾을 수 없습니다", + "noFilesFoundWith": "\"{query}\"와 일치하는 파일을 찾을 수 없습니다", + "addFilesFromList": "아래 목록에서 파일을 추가하세요", + "tryDifferentSearch": "다른 검색어를 시도해보세요", + "allFilesInShare": "모든 파일이 이미 공유되었습니다", + "uploadNewFiles": "새 파일을 업로드하여 추가하세요", + "fileCount": "{count}파일", + "filesSelected": "{count, plural, =0 {선택된 파일 없음} other {#파일 선택됨}}", + "editFile": "파일 편집", + "previewFile": "파일 미리보기", + "addToShare": "공유에 추가", + "removeFromShare": "공유에서 제거", + "saveChanges": "변경사항 저장" }, "files": { "title": "모든 파일", diff --git a/apps/web/messages/nl-NL.json b/apps/web/messages/nl-NL.json index bfbc163..6c8be1e 100644 --- a/apps/web/messages/nl-NL.json +++ b/apps/web/messages/nl-NL.json @@ -84,11 +84,26 @@ }, "fileSelector": { "availableFiles": "Beschikbare Bestanden ({count})", - "shareFiles": "Bestanden Delen ({count})", - "searchPlaceholder": "Bestanden zoeken...", + "shareFiles": "Gedeelde Bestanden ({count})", + "shareFilesDescription": "Bestanden momenteel in de share", + "availableFilesDescription": "Selecteer bestanden om toe te voegen aan de share", + "searchPlaceholder": "Zoek bestanden...", + "searchSelectedFiles": "Zoek in geselecteerde bestanden...", "noMatchingFiles": "Geen overeenkomende bestanden", - "noAvailableFiles": "Geen beschikbare bestanden", - "noFilesInShare": "Geen bestanden in delen", + "noAvailableFiles": "Geen bestanden beschikbaar", + "noFilesInShare": "Geen bestanden in share", + "noFilesFound": "Geen bestanden gevonden", + "noFilesFoundWith": "Geen bestanden gevonden met \"{query}\"", + "addFilesFromList": "Voeg bestanden toe uit de onderstaande lijst", + "tryDifferentSearch": "Probeer andere zoektermen", + "allFilesInShare": "Alle bestanden zijn al in de share", + "uploadNewFiles": "Upload nieuwe bestanden om ze toe te voegen", + "fileCount": "{count, plural, =1 {bestand} other {bestanden}}", + "filesSelected": "{count, plural, =0 {Geen bestanden geselecteerd} =1 {1 bestand geselecteerd} other {# bestanden geselecteerd}}", + "editFile": "Bestand bewerken", + "previewFile": "Bestand bekijken", + "addToShare": "Toevoegen aan share", + "removeFromShare": "Verwijderen uit share", "saveChanges": "Wijzigingen Opslaan" }, "files": { diff --git a/apps/web/messages/pt-BR.json b/apps/web/messages/pt-BR.json index 4cf4afe..7a8be00 100644 --- a/apps/web/messages/pt-BR.json +++ b/apps/web/messages/pt-BR.json @@ -85,10 +85,25 @@ "fileSelector": { "availableFiles": "Arquivos Disponíveis ({count})", "shareFiles": "Arquivos Compartilhados ({count})", + "shareFilesDescription": "Arquivos atualmente no compartilhamento", + "availableFilesDescription": "Selecione arquivos para adicionar ao compartilhamento", "searchPlaceholder": "Buscar arquivos...", + "searchSelectedFiles": "Buscar nos arquivos selecionados...", "noMatchingFiles": "Nenhum arquivo encontrado", "noAvailableFiles": "Nenhum arquivo disponível", - "noFilesInShare": "Nenhum arquivo compartilhado", + "noFilesInShare": "Nenhum arquivo no compartilhamento", + "noFilesFound": "Nenhum arquivo encontrado", + "noFilesFoundWith": "Nenhum arquivo encontrado com \"{query}\"", + "addFilesFromList": "Adicione arquivos da lista abaixo", + "tryDifferentSearch": "Tente usar outros termos de busca", + "allFilesInShare": "Todos os arquivos já estão no compartilhamento", + "uploadNewFiles": "Faça upload de novos arquivos para adicioná-los", + "fileCount": "{count, plural, =1 {arquivo} other {arquivos}}", + "filesSelected": "{count, plural, =0 {Nenhum arquivo selecionado} =1 {1 arquivo selecionado} other {# arquivos selecionados}}", + "editFile": "Editar arquivo", + "previewFile": "Visualizar arquivo", + "addToShare": "Adicionar ao compartilhamento", + "removeFromShare": "Remover do compartilhamento", "saveChanges": "Salvar Alterações" }, "files": { diff --git a/apps/web/messages/ru-RU.json b/apps/web/messages/ru-RU.json index b054bc8..8980f69 100644 --- a/apps/web/messages/ru-RU.json +++ b/apps/web/messages/ru-RU.json @@ -83,13 +83,28 @@ "loadingAudio": "Загрузка аудио..." }, "fileSelector": { - "availableFiles": "Доступные файлы ({count})", - "shareFiles": "Поделиться файлами ({count})", + "availableFiles": "Доступные Файлы ({count})", + "shareFiles": "Общие Файлы ({count})", + "shareFilesDescription": "Файлы в текущем общем доступе", + "availableFilesDescription": "Выберите файлы для добавления в общий доступ", "searchPlaceholder": "Поиск файлов...", - "noMatchingFiles": "Нет файлов, соответствующих запросу", + "searchSelectedFiles": "Поиск в выбранных файлах...", + "noMatchingFiles": "Нет подходящих файлов", "noAvailableFiles": "Нет доступных файлов", - "noFilesInShare": "Нет файлов для совместного использования", - "saveChanges": "Сохранить изменения" + "noFilesInShare": "Нет файлов в общем доступе", + "noFilesFound": "Файлы не найдены", + "noFilesFoundWith": "Файлы не найдены по запросу \"{query}\"", + "addFilesFromList": "Добавьте файлы из списка ниже", + "tryDifferentSearch": "Попробуйте другие поисковые термины", + "allFilesInShare": "Все файлы уже в общем доступе", + "uploadNewFiles": "Загрузите новые файлы для добавления", + "fileCount": "{count, plural, =1 {файл} =2 {файла} =3 {файла} =4 {файла} other {файлов}}", + "filesSelected": "{count, plural, =0 {Файлы не выбраны} =1 {Выбран 1 файл} other {Выбрано # файлов}}", + "editFile": "Редактировать файл", + "previewFile": "Предпросмотр файла", + "addToShare": "Добавить в общий доступ", + "removeFromShare": "Удалить из общего доступа", + "saveChanges": "Сохранить Изменения" }, "files": { "title": "Все файлы", diff --git a/apps/web/messages/tr-TR.json b/apps/web/messages/tr-TR.json index 9332a22..f53b59a 100644 --- a/apps/web/messages/tr-TR.json +++ b/apps/web/messages/tr-TR.json @@ -83,12 +83,27 @@ "loadingAudio": "Ses yükleniyor..." }, "fileSelector": { - "availableFiles": "Kullanılabilir Dosyalar ({count})", - "shareFiles": "Dosyaları Paylaş ({count})", - "searchPlaceholder": "Dosya ara...", - "noMatchingFiles": "Eşleşen dosya bulunamadı", - "noAvailableFiles": "Kullanılabilir dosya yok", + "availableFiles": "Mevcut Dosyalar ({count})", + "shareFiles": "Paylaşılan Dosyalar ({count})", + "shareFilesDescription": "Şu anda paylaşımda olan dosyalar", + "availableFilesDescription": "Paylaşıma eklemek için dosyaları seçin", + "searchPlaceholder": "Dosyaları ara...", + "searchSelectedFiles": "Seçilen dosyalarda ara...", + "noMatchingFiles": "Eşleşen dosya yok", + "noAvailableFiles": "Mevcut dosya yok", "noFilesInShare": "Paylaşımda dosya yok", + "noFilesFound": "Dosya bulunamadı", + "noFilesFoundWith": "\"{query}\" içeren dosya bulunamadı", + "addFilesFromList": "Aşağıdaki listeden dosyalar ekleyin", + "tryDifferentSearch": "Farklı arama terimleri deneyin", + "allFilesInShare": "Tüm dosyalar zaten paylaşımda", + "uploadNewFiles": "Eklemek için yeni dosyalar yükleyin", + "fileCount": "{count} dosya", + "filesSelected": "{count, plural, =0 {Seçilen dosya yok} =1 {1 dosya seçildi} other {# dosya seçildi}}", + "editFile": "Dosyayı düzenle", + "previewFile": "Dosyayı önizle", + "addToShare": "Paylaşıma ekle", + "removeFromShare": "Paylaşımdan kaldır", "saveChanges": "Değişiklikleri Kaydet" }, "files": { diff --git a/apps/web/messages/zh-CN.json b/apps/web/messages/zh-CN.json index 7a288cf..0b95ea4 100644 --- a/apps/web/messages/zh-CN.json +++ b/apps/web/messages/zh-CN.json @@ -85,10 +85,25 @@ "fileSelector": { "availableFiles": "可用文件 ({count})", "shareFiles": "共享文件 ({count})", + "shareFilesDescription": "当前共享中的文件", + "availableFilesDescription": "选择要添加到共享的文件", "searchPlaceholder": "搜索文件...", + "searchSelectedFiles": "在已选文件中搜索...", "noMatchingFiles": "没有匹配的文件", - "noAvailableFiles": "没有可用的文件", + "noAvailableFiles": "没有可用文件", "noFilesInShare": "共享中没有文件", + "noFilesFound": "未找到文件", + "noFilesFoundWith": "未找到包含\"{query}\"的文件", + "addFilesFromList": "从下面的列表中添加文件", + "tryDifferentSearch": "尝试其他搜索词", + "allFilesInShare": "所有文件都已在共享中", + "uploadNewFiles": "上传新文件以添加", + "fileCount": "{count}个文件", + "filesSelected": "{count, plural, =0 {未选择文件} other {已选择#个文件}}", + "editFile": "编辑文件", + "previewFile": "预览文件", + "addToShare": "添加到共享", + "removeFromShare": "从共享中移除", "saveChanges": "保存更改" }, "files": { diff --git a/apps/web/src/components/general/file-selector.tsx b/apps/web/src/components/general/file-selector.tsx index 7c1927f..a450a4e 100644 --- a/apps/web/src/components/general/file-selector.tsx +++ b/apps/web/src/components/general/file-selector.tsx @@ -130,7 +130,6 @@ export function FileSelector({ shareId, selectedFiles, onSave, onEditFile }: Fil
{formatFileSize(file.size)}
- {/* Botões de ações secundárias */}
{onEditFile && ( @@ -148,20 +147,19 @@ export function FileSelector({ shareId, selectedFiles, onSave, onEditFile }: Fil variant="ghost" className="h-7 w-7 hover:bg-muted transition-colors" onClick={() => setPreviewFile(file)} - title="Visualizar arquivo" + title={t("fileSelector.previewFile")} >
- {/* Botão de ação principal destacado */}
@@ -174,24 +172,22 @@ export function FileSelector({ shareId, selectedFiles, onSave, onEditFile }: Fil return ( <>
- {/* Current Files in Share */}

{t("fileSelector.shareFiles", { count: shareFiles.length })}

-

Arquivos atualmente no compartilhamento

+

{t("fileSelector.shareFilesDescription")}

- {shareFiles.length} {shareFiles.length === 1 ? "arquivo" : "arquivos"} + {shareFiles.length} {t("fileSelector.fileCount", { count: shareFiles.length })}
- {/* Search for selected files - only show if there are files */} {shareFiles.length > 0 && (
setShareSearchFilter(e.target.value)} className="pl-10" @@ -206,31 +202,29 @@ export function FileSelector({ shareId, selectedFiles, onSave, onEditFile }: Fil ))} {filteredShareFiles.length === 0 && shareSearchFilter && (
-

Nenhum arquivo encontrado com "{shareSearchFilter}"

+

{t("fileSelector.noFilesFoundWith", { query: shareSearchFilter })}

)}
) : (
📁
-

Nenhum arquivo no compartilhamento

-

Adicione arquivos da lista abaixo

+

{t("fileSelector.noFilesInShare")}

+

{t("fileSelector.addFilesFromList")}

)}
- {/* Available Files to Add */}

{t("fileSelector.availableFiles", { count: filteredAvailableFiles.length })}

-

Selecione arquivos para adicionar ao compartilhamento

+

{t("fileSelector.availableFilesDescription")}

- {/* Search */}
- {/* Available Files Grid */} {filteredAvailableFiles.length > 0 ? (
{filteredAvailableFiles.map((file) => ( @@ -251,28 +244,27 @@ export function FileSelector({ shareId, selectedFiles, onSave, onEditFile }: Fil ) : searchFilter ? (
🔍
-

Nenhum arquivo encontrado

-

Tente usar outros termos de busca

+

{t("fileSelector.noFilesFound")}

+

{t("fileSelector.tryDifferentSearch")}

) : (
📄
-

Todos os arquivos já estão no compartilhamento

-

Faça upload de novos arquivos para adicioná-los

+

{t("fileSelector.allFilesInShare")}

+

{t("fileSelector.uploadNewFiles")}

)}
- {/* Actions */}
- {shareFiles.length} {shareFiles.length === 1 ? "arquivo" : "arquivos"} selecionado(s) + {t("fileSelector.filesSelected", { count: shareFiles.length })}
- {/* File Preview Dialog */} setPreviewFile(null)} file={previewFile || { name: "", objectName: "" }} /> - {/* File Edit Dialog */}