widget picker view ui string update

This commit is contained in:
True Zhuanjia
2026-04-29 10:48:11 +08:00
parent 8f5d58a25c
commit 5bf8eeb873
2 changed files with 30 additions and 30 deletions
+21 -21
View File
@@ -5247,71 +5247,71 @@
}
}
},
"Functional button widgets cannot be combined with other functional buttons" : {
"Functional Widgets" : {
"extractionState" : "manual",
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "功能按键控件不能与其他功能按键组合"
"value" : "功能型控件"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "功能按鍵控制項不能與其他功能按鍵組合"
"value" : "功能控制項"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "功能按鍵控制項不能與其他功能按鍵組合"
"value" : "功能控制項"
}
}
}
},
"Functional button widgets cannot be combined with touchpad controls" : {
"Functional widgets cannot be combined with other functional widgets" : {
"extractionState" : "manual",
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "功能按键控件不能与触摸板控件组合"
"value" : "功能型控件不能与其他功能型控件组合"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "功能按鍵控制項不能與觸控板控制項組合"
"value" : "功能控制項不能與其他功能控制項組合"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "功能按鍵控制項不能與觸控板控制項組合"
"value" : "功能控制項不能與其他功能控制項組合"
}
}
}
},
"Functional Buttons" : {
"Functional widgets cannot be combined with touchpad controls" : {
"extractionState" : "manual",
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "功能按键"
"value" : "功能型控件不能与触摸板控件组合"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "功能按鍵"
"value" : "功能控制項不能與觸控板控制項組合"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "功能按鍵"
"value" : "功能控制項不能與觸控板控制項組合"
}
}
}
@@ -12029,48 +12029,48 @@
}
}
},
"This functional button cannot be combined with gamepad buttons" : {
"This functional widget cannot be combined with gamepad buttons" : {
"extractionState" : "manual",
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "此功能按键不能与手柄按键组合"
"value" : "此功能型控件不能与手柄按键组合"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "此功能按鍵不能與手把按鍵組合"
"value" : "此功能控制項不能與手把按鍵組合"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "此功能按鍵不能與手把按鍵組合"
"value" : "此功能控制項不能與手把按鍵組合"
}
}
}
},
"This functional button cannot be combined with keyboard or mouse buttons" : {
"This functional widget cannot be combined with keyboard or mouse buttons" : {
"extractionState" : "manual",
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "此功能按键不能与键盘或鼠标按键组合"
"value" : "此功能型控件不能与键盘或鼠标按键组合"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "此功能按鍵不能與鍵盤或滑鼠按鍵組合"
"value" : "此功能控制項不能與鍵盤或滑鼠按鍵組合"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "此功能按鍵不能與鍵盤或滑鼠按鍵組合"
"value" : "此功能控制項不能與鍵盤或滑鼠按鍵組合"
}
}
}
@@ -12368,7 +12368,7 @@
},
"zh-Hans" : {
"stringUnit" : {
"state" : "needs_review",
"state" : "translated",
"value" : "- 触控板: 拖移方式与Windows笔记本电脑触控板相同, 快速双击的第2下开始进入拖动状态.\n\n- 多点触控: 不支持macOS.\n\n- 单点鼠标: 可为macOS提供类触屏体验."
}
},
+9 -9
View File
@@ -40,7 +40,7 @@ enum WidgetPickerTab: String, CaseIterable, Identifiable, Equatable {
case .keyboard:
return SwiftLocalizationHelper.localizedString(forKey: "Keyboard / Mouse")
case .functional:
return SwiftLocalizationHelper.localizedString(forKey: "Functional Buttons")
return SwiftLocalizationHelper.localizedString(forKey: "Functional Widgets")
}
}
@@ -1541,50 +1541,50 @@ struct WidgetPickerView: View {
}
if poolItems.contains(where: isPad) {
setTipMessage(SwiftLocalizationHelper.localizedString(forKey: "Functional button widgets cannot be combined with touchpad controls"), type: .error)
setTipMessage(SwiftLocalizationHelper.localizedString(forKey: "Functional widgets cannot be combined with touchpad controls"), type: .error)
return false
}
if poolItems.contains(where: { $0.source == .functional }) {
setTipMessage(SwiftLocalizationHelper.localizedString(forKey: "Functional button widgets cannot be combined with other functional buttons"), type: .error)
setTipMessage(SwiftLocalizationHelper.localizedString(forKey: "Functional widgets cannot be combined with other functional widgets"), type: .error)
return false
}
if !option.allowsKeyboardCombination,
poolItems.contains(where: { $0.source == .keyboard && !isPad($0) }) {
setTipMessage(SwiftLocalizationHelper.localizedString(forKey: "This functional button cannot be combined with keyboard or mouse buttons"), type: .error)
setTipMessage(SwiftLocalizationHelper.localizedString(forKey: "This functional widget cannot be combined with keyboard or mouse buttons"), type: .error)
return false
}
if !option.allowsGamepadCombination,
poolItems.contains(where: { $0.source == .gamepad && !isPad($0) }) {
setTipMessage(SwiftLocalizationHelper.localizedString(forKey: "This functional button cannot be combined with gamepad buttons"), type: .error)
setTipMessage(SwiftLocalizationHelper.localizedString(forKey: "This functional widget cannot be combined with gamepad buttons"), type: .error)
return false
}
}
if source == .keyboard || source == .gamepad {
if poolItems.contains(where: isPad) && poolItems.contains(where: { $0.source == .functional && !gyroCommands.contains($0.cmd) }) {
setTipMessage(SwiftLocalizationHelper.localizedString(forKey: "Functional button widgets cannot be combined with touchpad controls"), type: .error)
setTipMessage(SwiftLocalizationHelper.localizedString(forKey: "Functional widgets cannot be combined with touchpad controls"), type: .error)
return false
}
if let existingFunctionalItem = poolItems.first(where: { $0.source == .functional && !gyroCommands.contains($0.cmd) }),
let option = functionalButtonOption(for: existingFunctionalItem.cmd) {
if source == .keyboard && !option.allowsKeyboardCombination {
setTipMessage(SwiftLocalizationHelper.localizedString(forKey: "This functional button cannot be combined with keyboard or mouse buttons"), type: .error)
setTipMessage(SwiftLocalizationHelper.localizedString(forKey: "This functional widget cannot be combined with keyboard or mouse buttons"), type: .error)
return false
}
if source == .gamepad && !option.allowsGamepadCombination {
setTipMessage(SwiftLocalizationHelper.localizedString(forKey: "This functional button cannot be combined with gamepad buttons"), type: .error)
setTipMessage(SwiftLocalizationHelper.localizedString(forKey: "This functional widget cannot be combined with gamepad buttons"), type: .error)
return false
}
}
if isPad(candidate),
poolItems.contains(where: { $0.source == .functional && !gyroCommands.contains($0.cmd) }) {
setTipMessage(SwiftLocalizationHelper.localizedString(forKey: "Functional button widgets cannot be combined with touchpad controls"), type: .error)
setTipMessage(SwiftLocalizationHelper.localizedString(forKey: "Functional widgets cannot be combined with touchpad controls"), type: .error)
return false
}
}