1313 * See LICENSE file for details or contact [email protected] 1414 */
1515
16+ import { Trans } from "@lingui/react/macro" ;
1617import { relaunch } from "@tauri-apps/plugin-process" ;
1718import { check } from "@tauri-apps/plugin-updater" ;
1819import {
@@ -45,7 +46,7 @@ import {
4546import { Separator } from "@/components/ui/separator" ;
4647
4748interface SettingItemProps {
48- title : string ;
49+ title : React . ReactNode ;
4950 description ?: string ;
5051 children : React . ReactNode ;
5152}
@@ -143,21 +144,21 @@ const UpdateItem = () => {
143144 ) ;
144145
145146 return (
146- < SettingItem title = "更新" >
147+ < SettingItem title = { < Trans > Update </ Trans > } >
147148 < div className = "flex items-center gap-3" >
148149 { isUpdating ? (
149150 < Badge variant = "secondary" className = "text-xs" >
150- 正在更新中
151+ < Trans > Updating </ Trans >
151152 < Loader2Icon className = "h-3 w-3 animate-spin" />
152153 </ Badge >
153154 ) : isLoading ? (
154155 < Badge variant = "secondary" className = "text-xs" >
155- 检查更新中
156+ < Trans > Checking for updates </ Trans >
156157 < Loader2Icon className = "h-3 w-3 animate-spin" />
157158 </ Badge >
158159 ) : update === null ? (
159160 < Badge variant = "secondary" className = "text-xs" >
160- 已是最新
161+ < Trans > Up to date </ Trans >
161162 </ Badge >
162163 ) : (
163164 < Button
@@ -167,7 +168,7 @@ const UpdateItem = () => {
167168 setIsUpdating ( true ) ;
168169 } }
169170 >
170- 立刻更新
171+ < Trans > Update Now </ Trans >
171172 </ Button >
172173 ) }
173174 </ div >
@@ -199,10 +200,10 @@ export default function SettingsPage() {
199200 { /* 通用设置 */ }
200201 < Card >
201202 < CardHeader className = "pb-4" >
202- < CardTitle className = "text-base font-medium" > 通用 </ CardTitle >
203+ < CardTitle className = "text-base font-medium" > < Trans > General </ Trans > </ CardTitle >
203204 </ CardHeader >
204205 < CardContent className = "space-y-6" >
205- < SettingItem title = "外观" >
206+ < SettingItem title = { < Trans > Appearance </ Trans > } >
206207 < div className = "flex items-center gap-1 rounded-lg border p-1" >
207208 < Button
208209 variant = { settings . theme === "system" ? "secondary" : "ghost" }
@@ -231,7 +232,7 @@ export default function SettingsPage() {
231232 </ div >
232233 </ SettingItem >
233234
234- < SettingItem title = "显示语言" >
235+ < SettingItem title = { < Trans > Display Language </ Trans > } >
235236 < Select
236237 value = { settings . language }
237238 onValueChange = { ( value ) => updateSetting ( "language" , value ) }
@@ -247,7 +248,7 @@ export default function SettingsPage() {
247248 </ Select >
248249 </ SettingItem >
249250
250- < SettingItem title = "缩放" >
251+ < SettingItem title = { < Trans > Zoom </ Trans > } >
251252 < div className = "flex items-center gap-2" >
252253 < Button
253254 variant = "outline"
@@ -395,7 +396,7 @@ export default function SettingsPage() {
395396 { /* 关于 */ }
396397 < Card >
397398 < CardHeader className = "pb-4" >
398- < CardTitle className = "text-base font-medium" > 关于 </ CardTitle >
399+ < CardTitle className = "text-base font-medium" > < Trans > About </ Trans > </ CardTitle >
399400 </ CardHeader >
400401 < CardContent className = "space-y-6" >
401402 < UpdateItem />
@@ -415,7 +416,7 @@ export default function SettingsPage() {
415416 className = "flex items-center gap-1 hover:text-foreground transition-colors"
416417 >
417418 < DownloadIcon className = "h-3.5 w-3.5" />
418- 更新记录
419+ < Trans > Change Log </ Trans >
419420 </ button >
420421 < button
421422 type = "button"
@@ -428,7 +429,7 @@ export default function SettingsPage() {
428429 className = "flex items-center gap-1 hover:text-foreground transition-colors"
429430 >
430431 < InfoIcon className = "h-3.5 w-3.5" />
431- 错误报告和功能请求
432+ < Trans > Bug Reports and Feature Requests </ Trans >
432433 </ button >
433434 { /* <button
434435 type="button"
@@ -444,7 +445,7 @@ export default function SettingsPage() {
444445
445446 < div className = "flex items-center justify-between text-sm text-muted-foreground" >
446447 < div className = "flex items-center gap-6" >
447- < span > 关注 DevUtility</ span >
448+ < span > < Trans > Follow DevUtility</ Trans > </ span >
448449 { /* <span>隐私政策</span> */ }
449450 </ div >
450451 < div className = "flex items-center gap-4" >
0 commit comments