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
50 changes: 50 additions & 0 deletions Crisp/Resources/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,26 @@
}
}
},
", main display" : {
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : ",主显示器"
}
}
}
},
", selected" : {
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : ",已选中"
}
}
}
},
"%@, expanded" : {
"localizations" : {
"zh-Hans" : {
Expand Down Expand Up @@ -1312,6 +1332,36 @@
}
}
},
"DDC" : {
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "DDC"
}
}
}
},
"Show Volume Sliders" : {
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "显示音量滑块"
}
}
}
},
"Speaker volume" : {
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "扬声器音量"
}
}
}
},
"Switch failed, please try again" : {
"localizations" : {
"zh-Hans" : {
Expand Down
8 changes: 7 additions & 1 deletion Crisp/Views/BrightnessSliderView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,13 @@ struct BrightnessSliderView: View {
}
.padding(.horizontal, 12)
.padding(.top, 2)
.accessibilityLabel(display.isBuiltin ? "Brightness control mode: System" : "Brightness control mode: \(ddcStatus == true ? "DDC hardware" : "Software emulation")")
.accessibilityLabel(
display.isBuiltin
? "Brightness control mode: System"
: (ddcStatus == true
? "Brightness control mode: DDC hardware"
: "Brightness control mode: Software emulation")
)
}

HStack(spacing: 8) {
Expand Down
6 changes: 5 additions & 1 deletion Crisp/Views/DisplayModeListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,11 @@ struct CheckmarkRow: View {
action()
}
.onHover { isHovered = $0 }
.accessibilityLabel(isSelected ? "\(label), selected" : label)
.accessibilityLabel(
isSelected
? "\(NSLocalizedString(label, comment: "")), \(NSLocalizedString(", selected", comment: ""))"
: NSLocalizedString(label, comment: "")
)
.accessibilityAddTraits(.isButton)
}
}
Expand Down
2 changes: 1 addition & 1 deletion Crisp/Views/MenuBarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ struct DisplayRowView: View {
Label("Copy Display Name", systemImage: "doc.on.doc")
}
}
.accessibilityLabel("Display: \(display.name)\(display.isMain ? ", main display" : "")\(isExpanded ? ", expanded" : ", collapsed")")
.accessibilityLabel(Text(verbatim: "Display: \(display.name)\(display.isMain ? NSLocalizedString(", main display", comment: "") : "")\(isExpanded ? NSLocalizedString(", expanded", comment: "") : NSLocalizedString(", collapsed", comment: ""))"))
.accessibilityHint("Click to expand the control panel")
.accessibilityAddTraits(.isButton)
}
Expand Down
Loading