[feat] add system language support across desktop and mobile

This commit is contained in:
dijunkun
2026-10-27 12:35:47 +08:00
parent b4acf0b597
commit b07f457e76
105 changed files with 21711 additions and 1627 deletions
@@ -321,13 +321,13 @@ final class RemoteKeyboardInputBar: UIView {
heightConstraint.isActive = true
let computerButton = UIButton(type: .system)
computerButton.setTitle("电脑键盘", for: .normal)
computerButton.setTitle(NSLocalizedString("电脑键盘", comment: ""), for: .normal)
computerButton.titleLabel?.font = .systemFont(ofSize: 15, weight: .medium)
computerButton.accessibilityLabel = "切换到电脑键盘"
computerButton.accessibilityLabel = NSLocalizedString("切换到电脑键盘", comment: "")
computerButton.addTarget(self, action: #selector(switchToComputer), for: .touchUpInside)
let dismissButton = RemoteKeyboardDismissButton.makeButton()
dismissButton.accessibilityLabel = "收起系统键盘"
dismissButton.accessibilityLabel = NSLocalizedString("收起系统键盘", comment: "")
dismissButton.addTarget(self, action: #selector(hideKeyboard), for: .touchUpInside)
row.axis = .horizontal
@@ -64,8 +64,8 @@ private final class VirtualMouseKey: UIView {
isMultipleTouchEnabled = false
isAccessibilityElement = true
accessibilityTraits = kind == .wheel ? [.adjustable] : [.button]
accessibilityLabel = kind == .left ? "鼠标左键" : kind == .right ? "鼠标右键" : "鼠标滚轮"
accessibilityHint = kind == .wheel ? "上下滑动,可滑出按键范围" : "按住并拖动,可滑出按键范围,松开结束拖拽"
accessibilityLabel = kind == .left ? NSLocalizedString("鼠标左键", comment: "") : kind == .right ? NSLocalizedString("鼠标右键", comment: "") : NSLocalizedString("鼠标滚轮", comment: "")
accessibilityHint = kind == .wheel ? NSLocalizedString("上下滑动,可滑出按键范围", comment: "") : NSLocalizedString("按住并拖动,可滑出按键范围,松开结束拖拽", comment: "")
face.isUserInteractionEnabled = false
face.layer.mask = faceMask
addSubview(face)