Skip to content

Commit

Permalink
♻️ refactor: refactor the DragUpload (#3263)
Browse files Browse the repository at this point in the history
* 🐛 fix: fix dayjs locale

* ♻️ refactor: refactor the DragUpload component

* 🌐 chore: update the locale
  • Loading branch information
arvinxx authored Jul 19, 2024
1 parent 7eb192e commit 19186eb
Show file tree
Hide file tree
Showing 56 changed files with 177 additions and 227 deletions.
6 changes: 1 addition & 5 deletions locales/ar/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@
"upload": {
"actionFiletip": "تحميل المستند",
"actionTooltip": "تحميل الصورة",
"disabled": "النموذج الحالي لا يدعم التعرف على الرؤية، يرجى تغيير النموذج المستخدم",
"dragDesc": "اسحب الملفات إلى هنا، يدعم تحميل عدة صور. اضغط على Shift لإرسال الصور مباشرة",
"dragFileDesc": "اسحب الصور والملفات هنا لدعم تحميل صور وملفات متعددة. اضغط باستمرار على Shift لإرسال صورة أو ملف مباشرة",
"dragFileTitle": "تحميل المستند",
"dragTitle": "تحميل الصورة"
"disabled": "النموذج الحالي لا يدعم التعرف على الرؤية، يرجى تغيير النموذج المستخدم"
}
}
6 changes: 6 additions & 0 deletions locales/ar/components.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"DragUpload": {
"dragDesc": "اسحب الملفات هنا، يدعم تحميل عدة صور.",
"dragFileDesc": "اسحب الصور والملفات هنا، يدعم تحميل عدة صور وملفات.",
"dragFileTitle": "تحميل الملفات",
"dragTitle": "تحميل الصور"
},
"ModelSelect": {
"featureTag": {
"custom": "نموذج مخصص، الإعداد الافتراضي يدعم الاستدعاء الوظيفي والتعرف البصري، يرجى التحقق من قدرة النموذج على القيام بذلك بناءً على الحالة الفعلية",
Expand Down
6 changes: 0 additions & 6 deletions locales/ar/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,6 @@
},
"model": {
"desc": "{{provider}} نموذج",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
"gpt-4": "GPT 4",
"gpt-4-32k": "GPT 4 (32K)"
},
"title": "النموذج"
},
"presencePenalty": {
Expand Down
6 changes: 1 addition & 5 deletions locales/bg-BG/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@
"upload": {
"actionFiletip": "Загрузите файл",
"actionTooltip": "Качи изображение",
"disabled": "Текущият модел не поддържа визуално разпознаване. Моля, превключи моделите, за да използваш тази функция.",
"dragDesc": "Плъзни и пусни файлове тук, поддържа се качване на няколко изображения. Задръж Shift, за да изпратиш изображения директно.",
"dragFileDesc": "Перетащите сюда изображения и файлы, чтобы можно было загрузить несколько изображений и файлов. Удерживайте нажатой клавишу Shift, чтобы отправить изображение или файл напрямую.",
"dragFileTitle": "Загрузите файл",
"dragTitle": "Качи изображение"
"disabled": "Текущият модел не поддържа визуално разпознаване. Моля, превключи моделите, за да използваш тази функция."
}
}
6 changes: 6 additions & 0 deletions locales/bg-BG/components.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"DragUpload": {
"dragDesc": "Плъзнете файлове тук, поддържа качване на множество изображения.",
"dragFileDesc": "Плъзнете изображения и файлове тук, поддържа качване на множество изображения и файлове.",
"dragFileTitle": "Качване на файл",
"dragTitle": "Качване на изображение"
},
"ModelSelect": {
"featureTag": {
"custom": "Потребителски модел, по подразбиране поддържа функционалност за функционални обаждания и визуално разпознаване, моля, потвърдете наличието на тези възможности спрямо реалните условия",
Expand Down
6 changes: 0 additions & 6 deletions locales/bg-BG/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,6 @@
},
"model": {
"desc": "{{provider}} модел",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
"gpt-4": "GPT 4",
"gpt-4-32k": "GPT 4 (32K)"
},
"title": "Модел"
},
"presencePenalty": {
Expand Down
6 changes: 1 addition & 5 deletions locales/de-DE/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@
"upload": {
"actionFiletip": "Laden Sie die Datei hoch",
"actionTooltip": "Bild hochladen",
"disabled": "Das aktuelle Modell unterstützt keine visuelle Erkennung. Bitte wechseln Sie das Modell, um es zu verwenden.",
"dragDesc": "Dateien hierher ziehen, um mehrere Bilder hochzuladen. Halte die Umschalttaste gedrückt, um Bilder direkt zu senden.",
"dragFileDesc": "Ziehen Sie Bilder und Dateien hierher, um das Hochladen mehrerer Bilder und Dateien zu unterstützen. Halten Sie die Umschalttaste gedrückt, um ein Bild oder eine Datei direkt zu senden.",
"dragFileTitle": "Laden Sie die Datei hoch",
"dragTitle": "Bild hochladen"
"disabled": "Das aktuelle Modell unterstützt keine visuelle Erkennung. Bitte wechseln Sie das Modell, um es zu verwenden."
}
}
6 changes: 6 additions & 0 deletions locales/de-DE/components.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"DragUpload": {
"dragDesc": "Ziehen Sie Dateien hierher, um mehrere Bilder hochzuladen.",
"dragFileDesc": "Ziehen Sie Bilder und Dateien hierher, um mehrere Bilder und Dateien hochzuladen.",
"dragFileTitle": "Dateien hochladen",
"dragTitle": "Bilder hochladen"
},
"ModelSelect": {
"featureTag": {
"custom": "Benutzerdefiniertes Modell, standardmäßig unterstützt es sowohl Funktionsaufrufe als auch visuelle Erkennung. Bitte überprüfen Sie die Verfügbarkeit dieser Fähigkeiten basierend auf den tatsächlichen Gegebenheiten.",
Expand Down
6 changes: 0 additions & 6 deletions locales/de-DE/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,6 @@
},
"model": {
"desc": "{{provider}} Modell",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
"gpt-4": "GPT 4",
"gpt-4-32k": "GPT 4 (32K)"
},
"title": "Modell"
},
"presencePenalty": {
Expand Down
6 changes: 1 addition & 5 deletions locales/en-US/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@
"upload": {
"actionFiletip": "Update File",
"actionTooltip": "Upload Image",
"disabled": "The current model does not support visual recognition. Please switch models to use this feature.",
"dragDesc": "Drag and drop files here, support uploading multiple images. Hold down Shift to send images directly.",
"dragFileDesc": "Drag pictures and files here to support uploading multiple pictures and files. Hold down Shift to send an image or file directly.",
"dragFileTitle": "Update File",
"dragTitle": "Upload Image"
"disabled": "The current model does not support visual recognition. Please switch models to use this feature."
}
}
6 changes: 6 additions & 0 deletions locales/en-US/components.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"DragUpload": {
"dragDesc": "Drag and drop files here to upload multiple images.",
"dragFileDesc": "Drag and drop images and files here to upload multiple images and files.",
"dragFileTitle": "Upload Files",
"dragTitle": "Upload Images"
},
"ModelSelect": {
"featureTag": {
"custom": "Custom model, by default, supports both function call and visual recognition. Please verify the availability of the above capabilities based on actual situations.",
Expand Down
6 changes: 0 additions & 6 deletions locales/en-US/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,6 @@
},
"model": {
"desc": "{{provider}} model",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
"gpt-4": "GPT 4",
"gpt-4-32k": "GPT 4 (32K)"
},
"title": "Model"
},
"presencePenalty": {
Expand Down
6 changes: 1 addition & 5 deletions locales/es-ES/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@
"upload": {
"actionFiletip": "Sube el archivo",
"actionTooltip": "Subir imagen",
"disabled": "El modelo actual no admite reconocimiento visual. Por favor, cambia de modelo para usar esta función",
"dragDesc": "Arrastra y suelta archivos aquí, admite la carga de varias imágenes. Mantén presionada la tecla Shift para enviar las imágenes directamente.",
"dragFileDesc": "Arrastre imágenes y archivos aquí para admitir la carga de varias imágenes y archivos. Mantenga presionada la tecla Mayús para enviar una imagen o un archivo directamente.",
"dragFileTitle": "Sube el archivo",
"dragTitle": "Subir imagen"
"disabled": "El modelo actual no admite reconocimiento visual. Por favor, cambia de modelo para usar esta función"
}
}
6 changes: 6 additions & 0 deletions locales/es-ES/components.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"DragUpload": {
"dragDesc": "Arrastra los archivos aquí, se admite la carga de múltiples imágenes.",
"dragFileDesc": "Arrastra imágenes y archivos aquí, se admite la carga de múltiples imágenes y archivos.",
"dragFileTitle": "Subir archivo",
"dragTitle": "Subir imagen"
},
"ModelSelect": {
"featureTag": {
"custom": "Modelo personalizado: admite llamadas de función y reconocimiento visual. Verifique la disponibilidad de estas capacidades según sea necesario.",
Expand Down
6 changes: 0 additions & 6 deletions locales/es-ES/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,6 @@
},
"model": {
"desc": "{{provider}} modelo",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
"gpt-4": "GPT 4",
"gpt-4-32k": "GPT 4 (32K)"
},
"title": "Modelo"
},
"presencePenalty": {
Expand Down
6 changes: 1 addition & 5 deletions locales/fr-FR/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@
"upload": {
"actionFiletip": "Télécharger le fichier",
"actionTooltip": "Télécharger une image",
"disabled": "Le modèle actuel ne prend pas en charge la reconnaissance visuelle. Veuillez changer de modèle pour utiliser cette fonctionnalité.",
"dragDesc": "Faites glisser les fichiers ici pour télécharger plusieurs images. Maintenez la touche Maj enfoncée pour envoyer directement les images.",
"dragFileDesc": "Faites glisser les images et les fichiers ici pour prendre en charge le téléchargement de plusieurs images et fichiers. Maintenez la touche Shift enfoncée pour envoyer directement une image ou un fichier.",
"dragFileTitle": "Télécharger le fichier",
"dragTitle": "Télécharger une image"
"disabled": "Le modèle actuel ne prend pas en charge la reconnaissance visuelle. Veuillez changer de modèle pour utiliser cette fonctionnalité."
}
}
6 changes: 6 additions & 0 deletions locales/fr-FR/components.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"DragUpload": {
"dragDesc": "Faites glisser des fichiers ici, plusieurs images peuvent être téléchargées.",
"dragFileDesc": "Faites glisser des images et des fichiers ici, plusieurs images et fichiers peuvent être téléchargés.",
"dragFileTitle": "Télécharger des fichiers",
"dragTitle": "Télécharger des images"
},
"ModelSelect": {
"featureTag": {
"custom": "Modèle personnalisé par défaut prenant en charge à la fois les appels de fonction et la reconnaissance visuelle. Veuillez vérifier la disponibilité de ces capacités en fonction de vos besoins réels.",
Expand Down
6 changes: 0 additions & 6 deletions locales/fr-FR/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,6 @@
},
"model": {
"desc": "Modèle {{provider}}",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
"gpt-4": "GPT 4",
"gpt-4-32k": "GPT 4 (32K)"
},
"title": "Modèle"
},
"presencePenalty": {
Expand Down
6 changes: 1 addition & 5 deletions locales/it-IT/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@
"upload": {
"actionFiletip": "Carica il file",
"actionTooltip": "Carica immagine",
"disabled": "Il modello attuale non supporta il riconoscimento visivo, si prega di cambiare modello prima di utilizzarlo",
"dragDesc": "Trascina i file qui, supporta il caricamento di più immagini. Tieni premuto Shift per inviare direttamente le immagini",
"dragFileDesc": "Trascina qui immagini e file per supportare il caricamento di più immagini e file. Tieni premuto Maiusc per inviare direttamente un'immagine o un file",
"dragFileTitle": "Carica il file",
"dragTitle": "Carica immagine"
"disabled": "Il modello attuale non supporta il riconoscimento visivo, si prega di cambiare modello prima di utilizzarlo"
}
}
6 changes: 6 additions & 0 deletions locales/it-IT/components.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"DragUpload": {
"dragDesc": "Trascina i file qui, supporta il caricamento di più immagini.",
"dragFileDesc": "Trascina immagini e file qui, supporta il caricamento di più immagini e file.",
"dragFileTitle": "Carica file",
"dragTitle": "Carica immagini"
},
"ModelSelect": {
"featureTag": {
"custom": "Modello personalizzato: di default supporta sia la chiamata di funzioni che il riconoscimento visivo. Verifica l'effettiva disponibilità di tali funzionalità.",
Expand Down
6 changes: 0 additions & 6 deletions locales/it-IT/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,6 @@
},
"model": {
"desc": "Modello {{provider}}",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
"gpt-4": "GPT 4",
"gpt-4-32k": "GPT 4 (32K)"
},
"title": "Modello"
},
"presencePenalty": {
Expand Down
6 changes: 1 addition & 5 deletions locales/ja-JP/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@
"upload": {
"actionFiletip": "ファイルをアップロードする",
"actionTooltip": "画像をアップロード",
"disabled": "現在のモデルはビジュアル認識をサポートしていません。モデルを切り替えて使用してください",
"dragDesc": "ファイルをここにドラッグしてください。複数の画像をアップロードできます。Shift キーを押しながら画像を直接送信することもできます。",
"dragFileDesc": "複数の写真やファイルのアップロードをサポートするには、ここに写真やファイルをドラッグします。 Shift キーを押しながら画像またはファイルを直接送信します。",
"dragFileTitle": "ファイルをアップロードする",
"dragTitle": "画像をアップロード"
"disabled": "現在のモデルはビジュアル認識をサポートしていません。モデルを切り替えて使用してください"
}
}
6 changes: 6 additions & 0 deletions locales/ja-JP/components.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"DragUpload": {
"dragDesc": "ここにファイルをドラッグ&ドロップしてください。複数の画像のアップロードがサポートされています。",
"dragFileDesc": "ここに画像やファイルをドラッグ&ドロップしてください。複数の画像やファイルのアップロードがサポートされています。",
"dragFileTitle": "ファイルをアップロード",
"dragTitle": "画像をアップロード"
},
"ModelSelect": {
"featureTag": {
"custom": "カスタムモデル、デフォルトでは関数呼び出しとビジョン認識の両方をサポートしています。上記機能の有効性を確認してください。",
Expand Down
6 changes: 0 additions & 6 deletions locales/ja-JP/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,6 @@
},
"model": {
"desc": "{{provider}}モデル",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
"gpt-4": "GPT 4",
"gpt-4-32k": "GPT 4 (32K)"
},
"title": "モデル"
},
"presencePenalty": {
Expand Down
6 changes: 1 addition & 5 deletions locales/ko-KR/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@
"upload": {
"actionFiletip": "파일 업로드",
"actionTooltip": "이미지 업로드",
"disabled": "현재 모델은 시각 인식을 지원하지 않습니다. 모델을 전환한 후 사용해주세요.",
"dragDesc": "여기로 파일을 끌어다 놓거나 여러 이미지를 업로드할 수 있습니다. Shift를 누른 채로 이미지를 직접 보내기",
"dragFileDesc": "여러 사진과 파일 업로드를 지원하려면 여기로 사진과 파일을 드래그하세요. 이미지나 파일을 직접 보내려면 Shift 키를 누르세요",
"dragFileTitle": "파일 업로드",
"dragTitle": "이미지 업로드"
"disabled": "현재 모델은 시각 인식을 지원하지 않습니다. 모델을 전환한 후 사용해주세요."
}
}
6 changes: 6 additions & 0 deletions locales/ko-KR/components.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"DragUpload": {
"dragDesc": "여기에 파일을 드래그하여 여러 이미지를 업로드할 수 있습니다.",
"dragFileDesc": "여기에 이미지와 파일을 드래그하여 여러 이미지와 파일을 업로드할 수 있습니다.",
"dragFileTitle": "파일 업로드",
"dragTitle": "이미지 업로드"
},
"ModelSelect": {
"featureTag": {
"custom": "사용자 정의 모델, 기본적으로 함수 호출 및 시각 인식을 모두 지원하며, 실제 기능을 확인하세요",
Expand Down
6 changes: 0 additions & 6 deletions locales/ko-KR/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,6 @@
},
"model": {
"desc": "{{provider}} 모델",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
"gpt-4": "GPT 4",
"gpt-4-32k": "GPT 4 (32K)"
},
"title": "모델"
},
"presencePenalty": {
Expand Down
6 changes: 1 addition & 5 deletions locales/nl-NL/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@
"upload": {
"actionFiletip": "Upload het bestand",
"actionTooltip": "Upload afbeelding",
"disabled": "Het huidige model ondersteunt geen visuele herkenning. Schakel over naar een ander model om dit te gebruiken.",
"dragDesc": "Sleep bestanden hierheen om meerdere afbeeldingen te uploaden. Houd Shift ingedrukt om afbeeldingen direct te verzenden",
"dragFileDesc": "Sleep afbeeldingen en bestanden hierheen om het uploaden van meerdere afbeeldingen en bestanden te ondersteunen. Houd Shift ingedrukt om een ​​afbeelding of bestand rechtstreeks te verzenden",
"dragFileTitle": "Upload het bestand",
"dragTitle": "Upload afbeelding"
"disabled": "Het huidige model ondersteunt geen visuele herkenning. Schakel over naar een ander model om dit te gebruiken."
}
}
6 changes: 6 additions & 0 deletions locales/nl-NL/components.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"DragUpload": {
"dragDesc": "Sleep bestanden hierheen om meerdere afbeeldingen te uploaden.",
"dragFileDesc": "Sleep afbeeldingen en bestanden hierheen om meerdere afbeeldingen en bestanden te uploaden.",
"dragFileTitle": "Bestanden uploaden",
"dragTitle": "Afbeeldingen uploaden"
},
"ModelSelect": {
"featureTag": {
"custom": "Custom model, by default, supports both function call and visual recognition. Please verify the availability of the above capabilities based on actual needs.",
Expand Down
6 changes: 0 additions & 6 deletions locales/nl-NL/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,6 @@
},
"model": {
"desc": "{{provider}} model",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
"gpt-4": "GPT 4",
"gpt-4-32k": "GPT 4 (32K)"
},
"title": "Model"
},
"presencePenalty": {
Expand Down
6 changes: 1 addition & 5 deletions locales/pl-PL/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@
"upload": {
"actionFiletip": "Prześlij plik",
"actionTooltip": "Prześlij obraz",
"disabled": "Obecny model nie obsługuje rozpoznawania wizyjnego. Proszę przełączyć model.",
"dragDesc": "Przeciągnij pliki tutaj, obsługiwane jest przesyłanie wielu obrazów. Naciśnij klawisz Shift, aby wysłać obraz bezpośrednio",
"dragFileDesc": "Przeciągnij zdjęcia i pliki tutaj, aby umożliwić przesyłanie wielu zdjęć i plików. Przytrzymaj klawisz Shift, aby bezpośrednio wysłać obraz lub plik",
"dragFileTitle": "Prześlij plik",
"dragTitle": "Prześlij obraz"
"disabled": "Obecny model nie obsługuje rozpoznawania wizyjnego. Proszę przełączyć model."
}
}
6 changes: 6 additions & 0 deletions locales/pl-PL/components.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"DragUpload": {
"dragDesc": "Przeciągnij pliki tutaj, aby przesłać wiele obrazów.",
"dragFileDesc": "Przeciągnij obrazy i pliki tutaj, aby przesłać wiele obrazów i plików.",
"dragFileTitle": "Prześlij plik",
"dragTitle": "Prześlij obraz"
},
"ModelSelect": {
"featureTag": {
"custom": "Niestandardowy model, domyślnie obsługujący zarówno wywołania funkcji, jak i rozpoznawanie wizualne. Proszę zweryfikować możliwość użycia tych funkcji w praktyce.",
Expand Down
6 changes: 0 additions & 6 deletions locales/pl-PL/setting.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,6 @@
},
"model": {
"desc": "{{provider}} model",
"list": {
"gpt-3.5-turbo": "GPT 3.5",
"gpt-3.5-turbo-16k": "GPT 3.5 (16K)",
"gpt-4": "GPT 4",
"gpt-4-32k": "GPT 4 (32K)"
},
"title": "Model"
},
"presencePenalty": {
Expand Down
Loading

0 comments on commit 19186eb

Please sign in to comment.