mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-29 23:12:38 +08:00
fix: standardize import quotes and improve localization files
- Updated import statements in use-mobile.ts and motionVariants.ts to use single quotes for consistency. - Added new localization entries for the "discover" section in multiple language files, including English, Japanese, Russian, Traditional Chinese, Greek, Spanish, French, and Portuguese.
This commit is contained in:
parent
0cf284eb32
commit
168cac9948
@ -142,7 +142,7 @@ const MermaidPreview: React.FC<BasicPreviewProps> = ({ children, setTools }) =>
|
||||
<Spin spinning={isLoading} indicator={<SvgSpinners180Ring color="var(--color-text-2)" />}>
|
||||
<Flex vertical style={{ minHeight: isLoading ? '2rem' : 'auto' }}>
|
||||
{(mermaidError || error) && <PreviewError>{mermaidError || error}</PreviewError>}
|
||||
<StyledMermaid ref={mermaidRef} className="mermaid special-preview" />
|
||||
<StyledMermaid ref={mermaidRef} className="mermaid special-preview" />
|
||||
</Flex>
|
||||
</Spin>
|
||||
)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import * as React from "react"
|
||||
import * as React from 'react'
|
||||
|
||||
const MOBILE_BREAKPOINT = 768
|
||||
|
||||
@ -10,9 +10,9 @@ export function useIsMobile() {
|
||||
const onChange = () => {
|
||||
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
|
||||
}
|
||||
mql.addEventListener("change", onChange)
|
||||
mql.addEventListener('change', onChange)
|
||||
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
|
||||
return () => mql.removeEventListener("change", onChange)
|
||||
return () => mql.removeEventListener('change', onChange)
|
||||
}, [])
|
||||
|
||||
return !!isMobile
|
||||
|
||||
@ -729,6 +729,13 @@
|
||||
"warning": "Warning",
|
||||
"you": "You"
|
||||
},
|
||||
"discover": {
|
||||
"install": "[to be translated]:安装",
|
||||
"title": "[to be translated]:发现",
|
||||
"uninstall": "[to be translated]:卸载",
|
||||
"update": "[to be translated]:更新",
|
||||
"update_all": "[to be translated]:全部更新"
|
||||
},
|
||||
"docs": {
|
||||
"title": "Docs"
|
||||
},
|
||||
|
||||
@ -729,6 +729,13 @@
|
||||
"warning": "警告",
|
||||
"you": "あなた"
|
||||
},
|
||||
"discover": {
|
||||
"install": "[to be translated]:安装",
|
||||
"title": "[to be translated]:发现",
|
||||
"uninstall": "[to be translated]:卸载",
|
||||
"update": "[to be translated]:更新",
|
||||
"update_all": "[to be translated]:全部更新"
|
||||
},
|
||||
"docs": {
|
||||
"title": "ドキュメント"
|
||||
},
|
||||
|
||||
@ -729,6 +729,13 @@
|
||||
"warning": "Предупреждение",
|
||||
"you": "Вы"
|
||||
},
|
||||
"discover": {
|
||||
"install": "[to be translated]:安装",
|
||||
"title": "[to be translated]:发现",
|
||||
"uninstall": "[to be translated]:卸载",
|
||||
"update": "[to be translated]:更新",
|
||||
"update_all": "[to be translated]:全部更新"
|
||||
},
|
||||
"docs": {
|
||||
"title": "Документация"
|
||||
},
|
||||
|
||||
@ -729,6 +729,13 @@
|
||||
"warning": "警告",
|
||||
"you": "您"
|
||||
},
|
||||
"discover": {
|
||||
"install": "[to be translated]:安装",
|
||||
"title": "[to be translated]:发现",
|
||||
"uninstall": "[to be translated]:卸载",
|
||||
"update": "[to be translated]:更新",
|
||||
"update_all": "[to be translated]:全部更新"
|
||||
},
|
||||
"docs": {
|
||||
"title": "說明文件"
|
||||
},
|
||||
|
||||
@ -83,25 +83,28 @@
|
||||
"restart": {
|
||||
"button": "Επανεκκίνηση",
|
||||
"tooltip": "Επανεκκίνηση Διακομιστή"
|
||||
}
|
||||
},
|
||||
"start": "[to be translated]:启动",
|
||||
"stop": "[to be translated]:停止"
|
||||
},
|
||||
"authHeader": {
|
||||
"title": "[to be translated]:授权标头"
|
||||
},
|
||||
"authHeaderText": "Χρήση στην κεφαλίδα εξουσιοδότησης:",
|
||||
"configuration": "Διαμόρφωση",
|
||||
"description": "Εκθέτει τις δυνατότητες AI του Cherry Studio μέσω API HTTP συμβατών με OpenAI",
|
||||
"documentation": {
|
||||
"title": "Τεκμηρίωση API",
|
||||
"unavailable": {
|
||||
"description": "Ξεκινήστε τον διακομιστή API για να δείτε την διαδραστική τεκμηρίωση",
|
||||
"title": "Τεκμηρίωση API Μη Διαθέσιμη"
|
||||
}
|
||||
"title": "Τεκμηρίωση API"
|
||||
},
|
||||
"fields": {
|
||||
"apiKey": {
|
||||
"copyTooltip": "Αντιγραφή Κλειδιού API",
|
||||
"description": "[to be translated]:用于 API 访问的安全认证令牌",
|
||||
"label": "Κλειδί API",
|
||||
"placeholder": "Το κλειδί API θα δημιουργηθεί αυτόματα"
|
||||
},
|
||||
"port": {
|
||||
"description": "[to be translated]:HTTP 服务器的 TCP 端口号 (1000-65535)",
|
||||
"helpText": "Σταματήστε τον διακομιστή για να αλλάξετε τη θύρα",
|
||||
"label": "Θύρα"
|
||||
},
|
||||
@ -726,6 +729,13 @@
|
||||
"warning": "Προσοχή",
|
||||
"you": "Εσείς"
|
||||
},
|
||||
"discover": {
|
||||
"install": "[to be translated]:安装",
|
||||
"title": "[to be translated]:发现",
|
||||
"uninstall": "[to be translated]:卸载",
|
||||
"update": "[to be translated]:更新",
|
||||
"update_all": "[to be translated]:全部更新"
|
||||
},
|
||||
"docs": {
|
||||
"title": "Βοήθεια"
|
||||
},
|
||||
@ -1647,6 +1657,7 @@
|
||||
"aihubmix": "AiHubMix",
|
||||
"alayanew": "Alaya NeW",
|
||||
"anthropic": "Anthropic",
|
||||
"aws-bedrock": "[to be translated]:AWS Bedrock",
|
||||
"azure-openai": "Azure OpenAI",
|
||||
"baichuan": "Παράκειμαι",
|
||||
"baidu-cloud": "Baidu Cloud Qianfan",
|
||||
@ -3088,6 +3099,16 @@
|
||||
"tip": "Χωριστά με κόμμα περισσότερα κλειδιά API"
|
||||
},
|
||||
"api_version": "Έκδοση API",
|
||||
"aws-bedrock": {
|
||||
"access_key_id": "[to be translated]:AWS 访问密钥 ID",
|
||||
"access_key_id_help": "[to be translated]:您的 AWS 访问密钥 ID,用于访问 AWS Bedrock 服务",
|
||||
"description": "[to be translated]:AWS Bedrock 是亚马逊提供的全托管基础模型服务,支持多种先进的大语言模型",
|
||||
"region": "[to be translated]:AWS 区域",
|
||||
"region_help": "[to be translated]:您的 AWS 服务区域,例如 us-east-1",
|
||||
"secret_access_key": "[to be translated]:AWS 访问密钥",
|
||||
"secret_access_key_help": "[to be translated]:您的 AWS 访问密钥,请妥善保管",
|
||||
"title": "[to be translated]:AWS Bedrock 配置"
|
||||
},
|
||||
"azure": {
|
||||
"apiversion": {
|
||||
"tip": "Η έκδοση του API για Azure OpenAI. Αν θέλετε να χρησιμοποιήσετε το Response API, εισάγετε μια προεπισκόπηση έκδοσης"
|
||||
|
||||
@ -83,25 +83,28 @@
|
||||
"restart": {
|
||||
"button": "Reiniciar",
|
||||
"tooltip": "Reiniciar Servidor"
|
||||
}
|
||||
},
|
||||
"start": "[to be translated]:启动",
|
||||
"stop": "[to be translated]:停止"
|
||||
},
|
||||
"authHeader": {
|
||||
"title": "[to be translated]:授权标头"
|
||||
},
|
||||
"authHeaderText": "Usar en el encabezado de autorización:",
|
||||
"configuration": "Configuración",
|
||||
"description": "Expone las capacidades de IA de Cherry Studio a través de APIs HTTP compatibles con OpenAI",
|
||||
"documentation": {
|
||||
"title": "Documentación API",
|
||||
"unavailable": {
|
||||
"description": "Inicia el servidor API para ver la documentación interactiva",
|
||||
"title": "Documentación API No Disponible"
|
||||
}
|
||||
"title": "Documentación API"
|
||||
},
|
||||
"fields": {
|
||||
"apiKey": {
|
||||
"copyTooltip": "Copiar Clave API",
|
||||
"description": "[to be translated]:用于 API 访问的安全认证令牌",
|
||||
"label": "Clave API",
|
||||
"placeholder": "La clave API se generará automáticamente"
|
||||
},
|
||||
"port": {
|
||||
"description": "[to be translated]:HTTP 服务器的 TCP 端口号 (1000-65535)",
|
||||
"helpText": "Detén el servidor para cambiar el puerto",
|
||||
"label": "Puerto"
|
||||
},
|
||||
@ -726,6 +729,13 @@
|
||||
"warning": "Advertencia",
|
||||
"you": "Usuario"
|
||||
},
|
||||
"discover": {
|
||||
"install": "[to be translated]:安装",
|
||||
"title": "[to be translated]:发现",
|
||||
"uninstall": "[to be translated]:卸载",
|
||||
"update": "[to be translated]:更新",
|
||||
"update_all": "[to be translated]:全部更新"
|
||||
},
|
||||
"docs": {
|
||||
"title": "Documentación de Ayuda"
|
||||
},
|
||||
@ -1647,6 +1657,7 @@
|
||||
"aihubmix": "AiHubMix",
|
||||
"alayanew": "Alaya NeW",
|
||||
"anthropic": "Antropológico",
|
||||
"aws-bedrock": "[to be translated]:AWS Bedrock",
|
||||
"azure-openai": "Azure OpenAI",
|
||||
"baichuan": "BaiChuan",
|
||||
"baidu-cloud": "Baidu Nube Qiánfān",
|
||||
@ -3088,6 +3099,16 @@
|
||||
"tip": "Separar múltiples claves con comas"
|
||||
},
|
||||
"api_version": "Versión API",
|
||||
"aws-bedrock": {
|
||||
"access_key_id": "[to be translated]:AWS 访问密钥 ID",
|
||||
"access_key_id_help": "[to be translated]:您的 AWS 访问密钥 ID,用于访问 AWS Bedrock 服务",
|
||||
"description": "[to be translated]:AWS Bedrock 是亚马逊提供的全托管基础模型服务,支持多种先进的大语言模型",
|
||||
"region": "[to be translated]:AWS 区域",
|
||||
"region_help": "[to be translated]:您的 AWS 服务区域,例如 us-east-1",
|
||||
"secret_access_key": "[to be translated]:AWS 访问密钥",
|
||||
"secret_access_key_help": "[to be translated]:您的 AWS 访问密钥,请妥善保管",
|
||||
"title": "[to be translated]:AWS Bedrock 配置"
|
||||
},
|
||||
"azure": {
|
||||
"apiversion": {
|
||||
"tip": "Versión de la API de Azure OpenAI; si desea usar la API de respuesta, ingrese una versión de vista previa"
|
||||
|
||||
@ -83,25 +83,28 @@
|
||||
"restart": {
|
||||
"button": "Redémarrer",
|
||||
"tooltip": "Redémarrer le Serveur"
|
||||
}
|
||||
},
|
||||
"start": "[to be translated]:启动",
|
||||
"stop": "[to be translated]:停止"
|
||||
},
|
||||
"authHeader": {
|
||||
"title": "[to be translated]:授权标头"
|
||||
},
|
||||
"authHeaderText": "Utiliser dans l'en-tête d'autorisation :",
|
||||
"configuration": "Configuration",
|
||||
"description": "Expose les capacités IA de Cherry Studio via des APIs HTTP compatibles OpenAI",
|
||||
"documentation": {
|
||||
"title": "Documentation API",
|
||||
"unavailable": {
|
||||
"description": "Démarrez le serveur API pour voir la documentation interactive",
|
||||
"title": "Documentation API Indisponible"
|
||||
}
|
||||
"title": "Documentation API"
|
||||
},
|
||||
"fields": {
|
||||
"apiKey": {
|
||||
"copyTooltip": "Copier la Clé API",
|
||||
"description": "[to be translated]:用于 API 访问的安全认证令牌",
|
||||
"label": "Clé API",
|
||||
"placeholder": "La clé API sera générée automatiquement"
|
||||
},
|
||||
"port": {
|
||||
"description": "[to be translated]:HTTP 服务器的 TCP 端口号 (1000-65535)",
|
||||
"helpText": "Arrêtez le serveur pour changer le port",
|
||||
"label": "Port"
|
||||
},
|
||||
@ -726,6 +729,13 @@
|
||||
"warning": "Avertissement",
|
||||
"you": "Vous"
|
||||
},
|
||||
"discover": {
|
||||
"install": "[to be translated]:安装",
|
||||
"title": "[to be translated]:发现",
|
||||
"uninstall": "[to be translated]:卸载",
|
||||
"update": "[to be translated]:更新",
|
||||
"update_all": "[to be translated]:全部更新"
|
||||
},
|
||||
"docs": {
|
||||
"title": "Documentation d'aide"
|
||||
},
|
||||
@ -1647,6 +1657,7 @@
|
||||
"aihubmix": "AiHubMix",
|
||||
"alayanew": "Alaya NeW",
|
||||
"anthropic": "Anthropic",
|
||||
"aws-bedrock": "[to be translated]:AWS Bedrock",
|
||||
"azure-openai": "Azure OpenAI",
|
||||
"baichuan": "BaiChuan",
|
||||
"baidu-cloud": "Baidu Cloud Qianfan",
|
||||
@ -3088,6 +3099,16 @@
|
||||
"tip": "Séparer les clés multiples par des virgules"
|
||||
},
|
||||
"api_version": "Version API",
|
||||
"aws-bedrock": {
|
||||
"access_key_id": "[to be translated]:AWS 访问密钥 ID",
|
||||
"access_key_id_help": "[to be translated]:您的 AWS 访问密钥 ID,用于访问 AWS Bedrock 服务",
|
||||
"description": "[to be translated]:AWS Bedrock 是亚马逊提供的全托管基础模型服务,支持多种先进的大语言模型",
|
||||
"region": "[to be translated]:AWS 区域",
|
||||
"region_help": "[to be translated]:您的 AWS 服务区域,例如 us-east-1",
|
||||
"secret_access_key": "[to be translated]:AWS 访问密钥",
|
||||
"secret_access_key_help": "[to be translated]:您的 AWS 访问密钥,请妥善保管",
|
||||
"title": "[to be translated]:AWS Bedrock 配置"
|
||||
},
|
||||
"azure": {
|
||||
"apiversion": {
|
||||
"tip": "Version de l'API Azure OpenAI, veuillez saisir une version preview si vous souhaitez utiliser l'API de réponse"
|
||||
|
||||
@ -83,25 +83,28 @@
|
||||
"restart": {
|
||||
"button": "Reiniciar",
|
||||
"tooltip": "Reiniciar Servidor"
|
||||
}
|
||||
},
|
||||
"start": "[to be translated]:启动",
|
||||
"stop": "[to be translated]:停止"
|
||||
},
|
||||
"authHeader": {
|
||||
"title": "[to be translated]:授权标头"
|
||||
},
|
||||
"authHeaderText": "Usar no cabeçalho de autorização:",
|
||||
"configuration": "Configuração",
|
||||
"description": "Expõe as capacidades de IA do Cherry Studio através de APIs HTTP compatíveis com OpenAI",
|
||||
"documentation": {
|
||||
"title": "Documentação API",
|
||||
"unavailable": {
|
||||
"description": "Inicie o servidor API para ver a documentação interativa",
|
||||
"title": "Documentação API Indisponível"
|
||||
}
|
||||
"title": "Documentação API"
|
||||
},
|
||||
"fields": {
|
||||
"apiKey": {
|
||||
"copyTooltip": "Copiar Chave API",
|
||||
"description": "[to be translated]:用于 API 访问的安全认证令牌",
|
||||
"label": "Chave API",
|
||||
"placeholder": "A chave API será gerada automaticamente"
|
||||
},
|
||||
"port": {
|
||||
"description": "[to be translated]:HTTP 服务器的 TCP 端口号 (1000-65535)",
|
||||
"helpText": "Pare o servidor para alterar a porta",
|
||||
"label": "Porta"
|
||||
},
|
||||
@ -726,6 +729,13 @@
|
||||
"warning": "Aviso",
|
||||
"you": "Você"
|
||||
},
|
||||
"discover": {
|
||||
"install": "[to be translated]:安装",
|
||||
"title": "[to be translated]:发现",
|
||||
"uninstall": "[to be translated]:卸载",
|
||||
"update": "[to be translated]:更新",
|
||||
"update_all": "[to be translated]:全部更新"
|
||||
},
|
||||
"docs": {
|
||||
"title": "Documentação de Ajuda"
|
||||
},
|
||||
@ -1647,6 +1657,7 @@
|
||||
"aihubmix": "AiHubMix",
|
||||
"alayanew": "Alaya NeW",
|
||||
"anthropic": "Antropológico",
|
||||
"aws-bedrock": "[to be translated]:AWS Bedrock",
|
||||
"azure-openai": "Azure OpenAI",
|
||||
"baichuan": "BaiChuan",
|
||||
"baidu-cloud": "Nuvem Baidu",
|
||||
@ -3088,6 +3099,16 @@
|
||||
"tip": "Use vírgula para separar várias chaves"
|
||||
},
|
||||
"api_version": "Versão da API",
|
||||
"aws-bedrock": {
|
||||
"access_key_id": "[to be translated]:AWS 访问密钥 ID",
|
||||
"access_key_id_help": "[to be translated]:您的 AWS 访问密钥 ID,用于访问 AWS Bedrock 服务",
|
||||
"description": "[to be translated]:AWS Bedrock 是亚马逊提供的全托管基础模型服务,支持多种先进的大语言模型",
|
||||
"region": "[to be translated]:AWS 区域",
|
||||
"region_help": "[to be translated]:您的 AWS 服务区域,例如 us-east-1",
|
||||
"secret_access_key": "[to be translated]:AWS 访问密钥",
|
||||
"secret_access_key_help": "[to be translated]:您的 AWS 访问密钥,请妥善保管",
|
||||
"title": "[to be translated]:AWS Bedrock 配置"
|
||||
},
|
||||
"azure": {
|
||||
"apiversion": {
|
||||
"tip": "Versão da API do Azure OpenAI. Se desejar usar a API de Resposta, insira a versão de visualização"
|
||||
|
||||
@ -3,7 +3,7 @@ import type { RootState } from '@renderer/store'
|
||||
import { messageBlocksSelectors } from '@renderer/store/messageBlock'
|
||||
import type { ImageMessageBlock, MainTextMessageBlock, Message, MessageBlock } from '@renderer/types/newMessage'
|
||||
import { MessageBlockStatus, MessageBlockType } from '@renderer/types/newMessage'
|
||||
import { AnimatePresence, motion } from 'motion/react'
|
||||
import { AnimatePresence, motion, type Variants } from 'motion/react'
|
||||
import React, { useMemo } from 'react'
|
||||
import { useSelector } from 'react-redux'
|
||||
import styled from 'styled-components'
|
||||
@ -25,7 +25,7 @@ interface AnimatedBlockWrapperProps {
|
||||
enableAnimation: boolean
|
||||
}
|
||||
|
||||
const blockWrapperVariants = {
|
||||
const blockWrapperVariants: Variants = {
|
||||
visible: {
|
||||
opacity: 1,
|
||||
x: 0,
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
export const lightbulbVariants = {
|
||||
import type { Variants } from 'motion/react'
|
||||
|
||||
export const lightbulbVariants: Variants = {
|
||||
active: {
|
||||
opacity: [1, 0.2, 1],
|
||||
transition: {
|
||||
@ -17,7 +19,7 @@ export const lightbulbVariants = {
|
||||
}
|
||||
}
|
||||
|
||||
export const lightbulbSoftVariants = {
|
||||
export const lightbulbSoftVariants: Variants = {
|
||||
active: {
|
||||
opacity: [1, 0.5, 1],
|
||||
transition: {
|
||||
|
||||
@ -150,7 +150,7 @@ const WindowFooter: FC<FooterProps> = ({
|
||||
<Pause size={14} className="btn-icon loading-icon" style={{ position: 'absolute', left: 1, top: 1 }} />
|
||||
<LoadingOutlined
|
||||
style={{ fontSize: 16, position: 'absolute', left: 0, top: 0 }}
|
||||
className="btn-icon loading-icon"
|
||||
className="btn-icon loading-icon"
|
||||
spin
|
||||
/>
|
||||
</LoadingIconWrapper>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user