diff --git a/src/locales/en.json b/src/locales/en.json index db00eb4..2d17ee2 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -42,5 +42,6 @@ "Select Project": "Select Project", "(no project)": "(no project)", "Export All Limit": "Export All Limit", - "Export All Limit Description": "Set the maximum number of conversations to load in the 'Export All' dialog." + "Export All Limit Description": "Set the maximum number of conversations to load in the 'Export All' dialog.", + "Select a source to load conversations": "Select a project above to load conversations." } diff --git a/src/locales/es.json b/src/locales/es.json index 850cdba..9c6da04 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -42,5 +42,6 @@ "Select Project": "Seleccionar proyecto", "(no project)": "(sin proyecto)", "Export All Limit": "Límite de Exportar Todos", - "Export All Limit Description": "Establece el número máximo de conversaciones a cargar en el diálogo 'Exportar Todos'." + "Export All Limit Description": "Establece el número máximo de conversaciones a cargar en el diálogo 'Exportar Todos'.", + "Select a source to load conversations": "Selecciona un proyecto arriba para cargar conversaciones." } diff --git a/src/locales/fr.json b/src/locales/fr.json index 66c8811..3363339 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -42,5 +42,6 @@ "Select Project": "Sélectionner un projet", "(no project)": "(aucun projet)", "Export All Limit": "Limite d'Exportation Multiple", - "Export All Limit Description": "Définit le nombre maximal de conversations à charger dans la boîte de dialogue 'Tout exporter'." + "Export All Limit Description": "Définit le nombre maximal de conversations à charger dans la boîte de dialogue 'Tout exporter'.", + "Select a source to load conversations": "Sélectionnez un projet ci-dessus pour charger les conversations." } diff --git a/src/locales/id.json b/src/locales/id.json index 15103ea..daf0251 100644 --- a/src/locales/id.json +++ b/src/locales/id.json @@ -42,5 +42,6 @@ "Select Project": "Pilih Proyek", "(no project)": "(tidak ada proyek)", "Export All Limit": "Batas Ekspor Semua", - "Export All Limit Description": "Atur jumlah maksimum percakapan yang akan dimuat dalam dialog 'Ekspor Semua'." + "Export All Limit Description": "Atur jumlah maksimum percakapan yang akan dimuat dalam dialog 'Ekspor Semua'.", + "Select a source to load conversations": "Pilih proyek di atas untuk memuat percakapan." } diff --git a/src/locales/jp.json b/src/locales/jp.json index 0bf8fe6..e9f3199 100644 --- a/src/locales/jp.json +++ b/src/locales/jp.json @@ -42,5 +42,6 @@ "Select Project": "プロジェクトを選択", "(no project)": "(プロジェクトなし)", "Export All Limit": "すべてエクスポートの上限", - "Export All Limit Description": "「すべてエクスポート」ダイアログで読み込む会話の最大数を設定します。" + "Export All Limit Description": "「すべてエクスポート」ダイアログで読み込む会話の最大数を設定します。", + "Select a source to load conversations": "上からプロジェクトを選択して会話を読み込んでください。" } diff --git a/src/locales/ru.json b/src/locales/ru.json index 5ae3b1b..fefc517 100644 --- a/src/locales/ru.json +++ b/src/locales/ru.json @@ -42,5 +42,6 @@ "Select Project": "Выберите проект", "(no project)": "(нет проекта)", "Export All Limit": "Лимит экспорта всех", - "Export All Limit Description": "Установите максимальное количество бесед для загрузки в диалоге 'Экспортировать все'." + "Export All Limit Description": "Установите максимальное количество бесед для загрузки в диалоге 'Экспортировать все'.", + "Select a source to load conversations": "Выберите проект выше, чтобы загрузить беседы." } diff --git a/src/locales/tr.json b/src/locales/tr.json index 1055118..7ff79d3 100644 --- a/src/locales/tr.json +++ b/src/locales/tr.json @@ -42,5 +42,6 @@ "Select Project": "Proje Seç", "(no project)": "(proje yok)", "Export All Limit": "Tümünü Dışa Aktarma Limiti", - "Export All Limit Description": "'Tümünü Dışa Aktar' iletişim kutusunda yüklenecek maksimum konuşma sayısını ayarlayın." + "Export All Limit Description": "'Tümünü Dışa Aktar' iletişim kutusunda yüklenecek maksimum konuşma sayısını ayarlayın.", + "Select a source to load conversations": "Konuşmaları yüklemek için yukarıdan bir proje seçin." } diff --git a/src/locales/zh-Hans.json b/src/locales/zh-Hans.json index 178d073..1940e5a 100644 --- a/src/locales/zh-Hans.json +++ b/src/locales/zh-Hans.json @@ -42,5 +42,6 @@ "Select Project": "选择项目", "(no project)": "(无项目)", "Export All Limit": "批量导出上限", - "Export All Limit Description": "设置“批量导出”对话框中加载的最大对话数量。" + "Export All Limit Description": "设置“批量导出”对话框中加载的最大对话数量。", + "Select a source to load conversations": "请在上方选择一个项目以加载对话。" } diff --git a/src/locales/zh-Hant.json b/src/locales/zh-Hant.json index 1b3c884..2cf87f9 100644 --- a/src/locales/zh-Hant.json +++ b/src/locales/zh-Hant.json @@ -42,5 +42,6 @@ "Select Project": "選擇專案", "(no project)": "(無專案)", "Export All Limit": "批量匯出上限", - "Export All Limit Description": "設定「批量匯出」對話方塊中載入的最大對話數量。" + "Export All Limit Description": "設定「批量匯出」對話方塊中載入的最大對話數量。", + "Select a source to load conversations": "請在上方選擇一個專案以載入對話。" } diff --git a/src/ui/ExportDialog.tsx b/src/ui/ExportDialog.tsx index 5eaecd2..dcbc890 100644 --- a/src/ui/ExportDialog.tsx +++ b/src/ui/ExportDialog.tsx @@ -7,7 +7,7 @@ import { exportAllToJson, exportAllToOfficialJson } from '../exporter/json' import { exportAllToMarkdown } from '../exporter/markdown' import { RequestQueue } from '../utils/queue' import { CheckBox } from './CheckBox' -import { IconCross, IconUpload } from './Icons' +import { IconCross, IconLoading, IconUpload } from './Icons' import { useSettingContext } from './SettingContext' import type { ApiConversationItem, ApiConversationWithId, ApiProjectInfo } from '../api' import type { FC } from '../type' @@ -15,7 +15,7 @@ import type { ChangeEvent } from 'preact/compat' interface ProjectSelectProps { projects: ApiProjectInfo[] - selected: ApiProjectInfo | null + selected: ApiProjectInfo | null | undefined setSelected: (selected: ApiProjectInfo | null) => void disabled: boolean } @@ -23,19 +23,24 @@ interface ProjectSelectProps { const ProjectSelect: FC = ({ projects, selected, setSelected, disabled }) => { const { t } = useTranslation() + const value = selected === undefined ? '__unselected__' : (selected?.id || '') + return (
{t('Select Project')} setExportType(e.currentTarget.value)}> {exportAllOptions.map(({ label }) => (