Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"devUrl": "http://localhost:3001"
},
"bundle": {
"longDescription": "Compress any video/image file to a tiny size.",
"shortDescription": "Compress any video/image to a tiny size",
"longDescription": "压缩任何视频/图片文件到极小体积。",
"shortDescription": "压缩任何视频/图片到极小体积",
"active": true,
"category": "Video",
"copyright": "Code For Real",
Expand Down
6 changes: 3 additions & 3 deletions src/components/ThemeSwitcher/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ export const ThemeSwitcher = ({
onPress={handleThemeToggle}
>
<Tooltip
content="Toggle theme"
aria-label="Toggle theme"
content="切换主题"
aria-label="切换主题"
placement="right"
>
<Icon name={theme === 'light' ? 'moon' : 'sun'} />
</Tooltip>
<span className="sr-only">Toggle theme</span>
<span className="sr-only">切换主题</span>
</Button>
)
}
14 changes: 7 additions & 7 deletions src/routes/(root)/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function Root() {
})

if (mediaPaths.length === 0) {
toast.error('No valid media files found.')
toast.error('未找到有效的媒体文件。')
return
}

Expand Down Expand Up @@ -208,7 +208,7 @@ function Root() {
appProxy.state.isLoadingMediaFiles = false
if (corruptedFilesCount > 0) {
toast.error(
`${mediaPaths.length > 1 ? 'Some files seem' : 'File seems'} to be corrupted/invalid ${mediaPaths.length > 1 ? 'and are filtered out' : ''}.`,
`${mediaPaths.length > 1 ? '部分文件' : '文件'}似乎已损坏或无效${mediaPaths.length > 1 ? ',已被过滤' : ''}。`,
)
if (corruptedFilesCount === mediaPaths.length) {
resetProxy()
Expand All @@ -223,7 +223,7 @@ function Root() {
const filePath = await open({
directory: false,
multiple: true,
title: `Select images/videos to compress.`,
title: '选择要压缩的图片/视频。',
filters: [
{ name: 'video', extensions: Object.keys(extensions?.video) },
{ name: 'image', extensions: Object.keys(extensions?.image) },
Expand All @@ -237,7 +237,7 @@ function Root() {
}
handleMediaSelection(filePath)
} catch (error: any) {
toast.error(error?.message ?? 'Could not select media.')
toast.error(error?.message ?? '无法选择媒体文件。')
}
}, [handleMediaSelection])

Expand Down Expand Up @@ -280,9 +280,9 @@ function Root() {
<div className="flex flex-col justify-center items-center py-16 px-20 border-2 border-dashed border-zinc-200 dark:border-zinc-800 rounded-3xl">
<Icon name="addMedia" className="text-primary" size={60} />
<p className="text-sm mt-4 text-gray-600 dark:text-gray-400 text-center">
Drag & Drop
<span className="block text-xs">Or</span>
Click to select media
拖放文件
<span className="block text-xs">或</span>
点击选择媒体文件
</p>
</div>
</motion.div>
Expand Down
8 changes: 4 additions & 4 deletions src/routes/(root)/ui/CancelCompression.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function CancelCompression() {
appProxy.timeTravel('beforeCompressionStarted')
}
} catch {
toast.error('Cannot cancel compression at this point.')
toast.error('此时无法取消压缩。')
}
setConfirmCancellation(false)
}
Expand All @@ -78,10 +78,10 @@ function CancelCompression() {
<AnimatePresence mode="wait">
<motion.div layout="preserve-aspect">
{confirmCancellation && !isCancelling
? 'Confirm Cancel'
? '确认取消'
: isCancelling
? 'Cancelling...'
: 'Cancel'}
? '取消中...'
: '取消'}
</motion.div>
</AnimatePresence>
</Button>
Expand Down
12 changes: 6 additions & 6 deletions src/routes/(root)/ui/CompressionActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function CompressionActions() {
<>
<div className="w-fit flex justify-center items-center z-[10]">
{isProcessCompleted ? (
<Tooltip content="Reconfigure" aria-label="Reset">
<Tooltip content="重新配置" aria-label="重置">
<Button
size="sm"
onPress={handleReconfigure}
Expand All @@ -71,7 +71,7 @@ function CompressionActions() {
</Button>
</Tooltip>
) : null}
<Tooltip content="Exit" aria-label="Exit">
<Tooltip content="退出" aria-label="退出">
<Button
size="sm"
onPress={handleCancelCompression}
Expand All @@ -86,17 +86,17 @@ function CompressionActions() {
</Tooltip>
</div>
<AlertDialog
title={`Media not saved`}
title={'媒体未保存'}
disclosure={alertDisclosure}
description={`Your compressed media${media.length > 1 ? 'are' : ' is'} not yet saved. Are you sure you want to discard it?`}
description={`您压缩后的媒体尚未保存。确定要丢弃吗?`}
renderFooter={({ closeModal }) => (
<>
<AlertDialogButton onPress={closeModal}>Go Back</AlertDialogButton>
<AlertDialogButton onPress={closeModal}>返回</AlertDialogButton>
<AlertDialogButton
color="danger"
onPress={() => handleDiscard({ closeModal })}
>
Yes
是
</AlertDialogButton>
</>
)}
Expand Down
6 changes: 3 additions & 3 deletions src/routes/(root)/ui/CustomizeMediaOnBatchActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function CustomizeMediaOnBatchActions() {
variant="flat"
radius="md"
>
Close
关闭
</Button>
) : (
<>
Expand All @@ -122,15 +122,15 @@ function CustomizeMediaOnBatchActions() {
variant="flat"
radius="md"
>
Reset
重置
</Button>
<Button
size="sm"
variant="flat"
radius="md"
onPress={handleApplyVideoConfig}
>
Apply
应用
</Button>
</>
)}
Expand Down
4 changes: 2 additions & 2 deletions src/routes/(root)/ui/DragAndDropFiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function DragAndDropFiles({
if (Array.isArray(files)) {
onFile?.(files)
} else {
toast.error('Invalid files/folders')
toast.error('无效的文件/文件夹')
}
}
})
Expand Down Expand Up @@ -103,7 +103,7 @@ function DragAndDropFiles({
>
<Icon name="dragAndDrop" className="text-primary" size={50} />
<p className="my-2 text-gray-600 dark:text-gray-400 text-sm">
Drop anywhere...
拖放到此处...
</p>
</motion.div>
</div>
Expand Down
Loading