Skip to content

Commit 2b475aa

Browse files
authored
chore: update text
1 parent c4c9fa2 commit 2b475aa

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

Sources/AppLibrary/AppMetaData.swift

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,22 @@ public extension AppMetaData {
3434
}
3535
}
3636

37+
private func isChinese() -> Bool {
38+
guard let languageCode = Locale.current.languageCode else {
39+
return false
40+
}
41+
return languageCode.hasPrefix("zh")
42+
}
43+
3744
func title() -> String {
45+
let isZh = isChinese()
3846
switch self {
3947
case .starorder:
4048
return "Star Order"
4149
case .fasting:
4250
return "Fasting"
4351
case .newworld:
44-
return "新词"
52+
return isZh ? "新词" : "NewWord"
4553
case .wallpaper:
4654
return "简明壁纸"
4755
case .orbitring:
@@ -52,19 +60,20 @@ public extension AppMetaData {
5260
}
5361

5462
func subtitle() -> String {
63+
let isZh = isChinese()
5564
switch self {
5665
case .starorder:
57-
return "Best GitHub star manager."
66+
return isZh ? "最佳 GitHub 星标管理工具。" : "Best GitHub star manager."
5867
case .fasting:
59-
return "Live a healty life."
68+
return isZh ? "使用间歇性禁食,保持健康生活。" : "Live a healty life."
6069
case .newworld:
61-
return "Your personal vocabulary book."
70+
return isZh ? "支持 30 + 语言的 AI 单词学习助手。" : "Your personal vocabulary book."
6271
case .wallpaper:
63-
return "Neat AICG wallpaper for you."
72+
return isZh ? "为您精选的 AI 生成壁纸。" : "Neat AICG wallpaper for you."
6473
case .orbitring:
65-
return "Powerful macOS ring launcher."
74+
return isZh ? "像 FPS 游戏一样切换 Mac 应用。" : "Powerful macOS ring launcher."
6675
case .orbitread:
67-
return "A smarter Read-It-Later assistant, powered by AI."
76+
return isZh ? "带 AI 总结的稍后阅读助手。" : "A smarter \"Read-It-Later\" assistant, powered by AI."
6877
}
6978
}
7079

0 commit comments

Comments
 (0)