mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 18:50:56 +08:00
fix: correct translation keys and remove unused code
- Fix incorrect translation key paths in MessageVideo component - Remove commented-out code for unused OCR options in PreprocessProviderSettings - Simplify success toast message in NotesSidebar by removing count parameter
This commit is contained in:
parent
5f02822ef2
commit
6b3828f189
@ -27,7 +27,7 @@ const MessageVideo: FC<Props> = ({ block }) => {
|
||||
const renderLocalVideo = () => {
|
||||
if (!block.filePath) {
|
||||
logger.warn('Local video was requested but block.filePath is missing.')
|
||||
return <div>{t('message.video.error.local_file_missing')}</div>
|
||||
return <div>{t('message.message.video.error.local_file_missing')}</div>
|
||||
}
|
||||
|
||||
const videoSrc = `file://${block.metadata?.video.path}`
|
||||
@ -67,7 +67,7 @@ const MessageVideo: FC<Props> = ({ block }) => {
|
||||
}
|
||||
|
||||
logger.warn(`Unsupported video type: ${block.metadata?.type} or missing necessary data.`)
|
||||
return <div>{t('message.video.error.unsupported_type')}</div>
|
||||
return <div>{t('message.message.video.error.unsupported_type')}</div>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -490,7 +490,7 @@ const NotesSidebar: FC<NotesSidebarProps> = ({
|
||||
const result = await SaveToKnowledgePopup.showForNote(note)
|
||||
|
||||
if (result?.success) {
|
||||
window.toast.success(t('notes.export_success', { count: result.savedCount }))
|
||||
window.toast.success(t('notes.export_success'))
|
||||
}
|
||||
} catch (error) {
|
||||
window.toast.error(t('notes.export_failed'))
|
||||
|
||||
@ -139,41 +139,6 @@ const PreprocessProviderSettings: FC<Props> = ({ provider: _provider }) => {
|
||||
</Flex>
|
||||
</>
|
||||
)}
|
||||
|
||||
{/* 这部分看起来暂时用不上了 */}
|
||||
{/* {hasObjectKey(preprocessProvider, 'options') && preprocessProvider.id === 'system' && (
|
||||
<>
|
||||
<SettingDivider style={{ marginTop: 15, marginBottom: 12 }} />
|
||||
<SettingRow>
|
||||
<SettingRowTitle>{t('settings.tool.preprocess.mac_system_ocr_options.mode.title')}</SettingRowTitle>
|
||||
<Segmented
|
||||
options={[
|
||||
{
|
||||
label: t('settings.tool.preprocess.mac_system_ocr_options.mode.accurate'),
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
label: t('settings.tool.preprocess.mac_system_ocr_options.mode.fast'),
|
||||
value: 0
|
||||
}
|
||||
]}
|
||||
value={options.recognitionLevel}
|
||||
onChange={(value) => onUpdateOptions('recognitionLevel', value)}
|
||||
/>
|
||||
</SettingRow>
|
||||
<SettingDivider style={{ marginTop: 15, marginBottom: 12 }} />
|
||||
<SettingRow>
|
||||
<SettingRowTitle>{t('settings.tool.preprocess.mac_system_ocr_options.min_confidence')}</SettingRowTitle>
|
||||
<InputNumber
|
||||
value={options.minConfidence}
|
||||
onChange={(value) => onUpdateOptions('minConfidence', value)}
|
||||
min={0}
|
||||
max={1}
|
||||
step={0.1}
|
||||
/>
|
||||
</SettingRow>
|
||||
</>
|
||||
)} */}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user