From d27d750bc5fec5270469a5d27370e73fd9298c70 Mon Sep 17 00:00:00 2001 From: kangfenmao Date: Sun, 4 Jan 2026 19:17:54 +0800 Subject: [PATCH] feat(i18n): add "open" label for app data directory in multiple languages --- src/renderer/src/i18n/locales/en-us.json | 1 + src/renderer/src/i18n/locales/zh-cn.json | 1 + src/renderer/src/i18n/locales/zh-tw.json | 1 + src/renderer/src/i18n/translate/de-de.json | 1 + src/renderer/src/i18n/translate/el-gr.json | 1 + src/renderer/src/i18n/translate/es-es.json | 1 + src/renderer/src/i18n/translate/fr-fr.json | 1 + src/renderer/src/i18n/translate/ja-jp.json | 1 + src/renderer/src/i18n/translate/pt-pt.json | 1 + src/renderer/src/i18n/translate/ro-ro.json | 1 + src/renderer/src/i18n/translate/ru-ru.json | 1 + .../src/pages/settings/AboutSettings.tsx | 4 +-- .../settings/DataSettings/DataSettings.tsx | 32 ++++++------------- 13 files changed, 21 insertions(+), 26 deletions(-) diff --git a/src/renderer/src/i18n/locales/en-us.json b/src/renderer/src/i18n/locales/en-us.json index 9e60f31f00..41d5933311 100644 --- a/src/renderer/src/i18n/locales/en-us.json +++ b/src/renderer/src/i18n/locales/en-us.json @@ -3165,6 +3165,7 @@ "label": "App Data", "migration_title": "Data Migration", "new_path": "New Path", + "open": "Open Directory", "original_path": "Original Path", "path_change_failed": "Failed to change data directory", "path_changed_without_copy": "Path changed successfully", diff --git a/src/renderer/src/i18n/locales/zh-cn.json b/src/renderer/src/i18n/locales/zh-cn.json index b9b07a596c..252758d6e5 100644 --- a/src/renderer/src/i18n/locales/zh-cn.json +++ b/src/renderer/src/i18n/locales/zh-cn.json @@ -3165,6 +3165,7 @@ "label": "应用数据", "migration_title": "数据迁移", "new_path": "新路径", + "open": "打开目录", "original_path": "原始路径", "path_change_failed": "数据目录更改失败", "path_changed_without_copy": "路径已更改成功", diff --git a/src/renderer/src/i18n/locales/zh-tw.json b/src/renderer/src/i18n/locales/zh-tw.json index 3d613f00f4..e1bc20d092 100644 --- a/src/renderer/src/i18n/locales/zh-tw.json +++ b/src/renderer/src/i18n/locales/zh-tw.json @@ -3165,6 +3165,7 @@ "label": "應用程式資料", "migration_title": "資料移轉", "new_path": "新路徑", + "open": "開啟目錄", "original_path": "原始路徑", "path_change_failed": "資料目錄變更失敗", "path_changed_without_copy": "路徑已變更成功", diff --git a/src/renderer/src/i18n/translate/de-de.json b/src/renderer/src/i18n/translate/de-de.json index 402437f1e8..d5445961e5 100644 --- a/src/renderer/src/i18n/translate/de-de.json +++ b/src/renderer/src/i18n/translate/de-de.json @@ -3165,6 +3165,7 @@ "label": "Anwendungsdaten", "migration_title": "Datenmigration", "new_path": "Neuer Pfad", + "open": "Offenes Verzeichnis", "original_path": "Ursprünglicher Pfad", "path_change_failed": "Datenverzeichnisänderung fehlgeschlagen", "path_changed_without_copy": "Pfad erfolgreich geändert", diff --git a/src/renderer/src/i18n/translate/el-gr.json b/src/renderer/src/i18n/translate/el-gr.json index 1fb0b08abb..d0cfe0579c 100644 --- a/src/renderer/src/i18n/translate/el-gr.json +++ b/src/renderer/src/i18n/translate/el-gr.json @@ -3165,6 +3165,7 @@ "label": "Δεδομένα εφαρμογής", "migration_title": "Μεταφορά δεδομένων", "new_path": "Νέα διαδρομή", + "open": "Ανοιχτός Κατάλογος", "original_path": "Αρχική διαδρομή", "path_change_failed": "Η αλλαγή του καταλόγου δεδομένων απέτυχε", "path_changed_without_copy": "Η διαδρομή άλλαξε επιτυχώς", diff --git a/src/renderer/src/i18n/translate/es-es.json b/src/renderer/src/i18n/translate/es-es.json index 1aa78e82dd..039a289e7a 100644 --- a/src/renderer/src/i18n/translate/es-es.json +++ b/src/renderer/src/i18n/translate/es-es.json @@ -3165,6 +3165,7 @@ "label": "Datos de la aplicación", "migration_title": "Migración de datos", "new_path": "Nueva ruta", + "open": "Directorio abierto", "original_path": "Ruta original", "path_change_failed": "Error al cambiar el directorio de datos", "path_changed_without_copy": "La ruta se ha cambiado correctamente", diff --git a/src/renderer/src/i18n/translate/fr-fr.json b/src/renderer/src/i18n/translate/fr-fr.json index 4906109228..352678c4ad 100644 --- a/src/renderer/src/i18n/translate/fr-fr.json +++ b/src/renderer/src/i18n/translate/fr-fr.json @@ -3165,6 +3165,7 @@ "label": "Données de l'application", "migration_title": "Migration des données", "new_path": "Nouveau chemin", + "open": "Répertoire ouvert", "original_path": "Chemin d'origine", "path_change_failed": "Échec de la modification du répertoire de données", "path_changed_without_copy": "Le chemin a été modifié avec succès", diff --git a/src/renderer/src/i18n/translate/ja-jp.json b/src/renderer/src/i18n/translate/ja-jp.json index 950fef7130..b58fe588f6 100644 --- a/src/renderer/src/i18n/translate/ja-jp.json +++ b/src/renderer/src/i18n/translate/ja-jp.json @@ -3165,6 +3165,7 @@ "label": "アプリデータ", "migration_title": "データ移行", "new_path": "新しいパス", + "open": "オープンディレクトリ", "original_path": "元のパス", "path_change_failed": "データディレクトリの変更に失敗しました", "path_changed_without_copy": "パスが変更されました。", diff --git a/src/renderer/src/i18n/translate/pt-pt.json b/src/renderer/src/i18n/translate/pt-pt.json index 73c8e28e4d..24a38261ca 100644 --- a/src/renderer/src/i18n/translate/pt-pt.json +++ b/src/renderer/src/i18n/translate/pt-pt.json @@ -3165,6 +3165,7 @@ "label": "Dados do aplicativo", "migration_title": "Migração de Dados", "new_path": "Novo Caminho", + "open": "Diretório Aberto", "original_path": "Caminho Original", "path_change_failed": "Falha ao alterar o diretório de dados", "path_changed_without_copy": "O caminho foi alterado com sucesso", diff --git a/src/renderer/src/i18n/translate/ro-ro.json b/src/renderer/src/i18n/translate/ro-ro.json index 6002365814..d18b952baf 100644 --- a/src/renderer/src/i18n/translate/ro-ro.json +++ b/src/renderer/src/i18n/translate/ro-ro.json @@ -3165,6 +3165,7 @@ "label": "Date aplicație", "migration_title": "Migrare date", "new_path": "Cale nouă", + "open": "Director Deschis", "original_path": "Cale originală", "path_change_failed": "Schimbarea directorului de date a eșuat", "path_changed_without_copy": "Calea a fost schimbată cu succes", diff --git a/src/renderer/src/i18n/translate/ru-ru.json b/src/renderer/src/i18n/translate/ru-ru.json index 200b03e6c1..74ce3df5fb 100644 --- a/src/renderer/src/i18n/translate/ru-ru.json +++ b/src/renderer/src/i18n/translate/ru-ru.json @@ -3165,6 +3165,7 @@ "label": "Данные приложения", "migration_title": "Миграция данных", "new_path": "Новый путь", + "open": "Открыть каталог", "original_path": "Исходный путь", "path_change_failed": "Сбой изменения каталога данных", "path_changed_without_copy": "Путь изменен успешно", diff --git a/src/renderer/src/pages/settings/AboutSettings.tsx b/src/renderer/src/pages/settings/AboutSettings.tsx index b7309a0a0a..1765f1fbda 100644 --- a/src/renderer/src/pages/settings/AboutSettings.tsx +++ b/src/renderer/src/pages/settings/AboutSettings.tsx @@ -169,9 +169,7 @@ const AboutSettings: FC = () => { const onOpenDocs = () => { const isChinese = i18n.language.startsWith('zh') - window.api.openWebsite( - isChinese ? 'https://docs.cherry-ai.com/' : 'https://docs.cherry-ai.com/docs/en-us' - ) + window.api.openWebsite(isChinese ? 'https://docs.cherry-ai.com/' : 'https://docs.cherry-ai.com/docs/en-us') } return ( diff --git a/src/renderer/src/pages/settings/DataSettings/DataSettings.tsx b/src/renderer/src/pages/settings/DataSettings/DataSettings.tsx index 6c111fcdaf..20441bd12c 100644 --- a/src/renderer/src/pages/settings/DataSettings/DataSettings.tsx +++ b/src/renderer/src/pages/settings/DataSettings/DataSettings.tsx @@ -1,11 +1,4 @@ -import { - CloudServerOutlined, - CloudSyncOutlined, - FileSearchOutlined, - LoadingOutlined, - WifiOutlined, - YuqueOutlined -} from '@ant-design/icons' +import { CloudServerOutlined, CloudSyncOutlined, LoadingOutlined, WifiOutlined, YuqueOutlined } from '@ant-design/icons' import DividerWithText from '@renderer/components/DividerWithText' import { NutstoreIcon } from '@renderer/components/Icons/NutstoreIcons' import { HStack } from '@renderer/components/Layout' @@ -23,8 +16,8 @@ import { setSkipBackupFile as _setSkipBackupFile } from '@renderer/store/setting import type { AppInfo } from '@renderer/types' import { formatFileSize } from '@renderer/utils' import { occupiedDirs } from '@shared/config/constant' -import { Button, Progress, Switch, Typography } from 'antd' -import { FileText, FolderCog, FolderInput, FolderOpen, SaveIcon } from 'lucide-react' +import { Button, Progress, Switch, Tooltip, Typography } from 'antd' +import { FileText, FolderCog, FolderInput, FolderOpen, FolderOutput, SaveIcon } from 'lucide-react' import type { FC } from 'react' import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' @@ -646,9 +639,13 @@ const DataSettings: FC = () => { onClick={() => handleOpenPath(appInfo?.appDataPath)}> {appInfo?.appDataPath} - handleOpenPath(appInfo?.appDataPath)} style={{ flexShrink: 0 }} /> + + + - + @@ -659,7 +656,6 @@ const DataSettings: FC = () => { handleOpenPath(appInfo?.logsPath)}> {appInfo?.logsPath} - handleOpenPath(appInfo?.logsPath)} style={{ flexShrink: 0 }} />