Skip to content

Commit 84fc9df

Browse files
committed
fix: Title case and Sentence case
Many strings don't follow the Apple "Human Interface Guidelines"
1 parent e5432ce commit 84fc9df

File tree

10 files changed

+19
-19
lines changed

10 files changed

+19
-19
lines changed

Sources/App/AppUpdater.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
return
2323
}
2424
let checkForUpdatesItem = NSMenuItem(
25-
title: "Check for Updates…",
25+
title: NSLocalizedString("Check for Updates…", comment: ""),
2626
action: #selector(SPUStandardUpdaterController.checkForUpdates(_:)),
2727
keyEquivalent: ""
2828
)

Sources/Features/FilesCompare/Controller/FilesWindowController+Menu.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ extension FilesWindowController {
9191
let actionsMenu = NSMenu(title: NSLocalizedString("Actions", comment: ""))
9292

9393
let left = NSMenuItem(
94-
title: NSLocalizedString("Copy Lines To Left", comment: ""),
94+
title: NSLocalizedString("Copy Lines to Left", comment: ""),
9595
action: #selector(copyLinesToLeft),
9696
keyEquivalent: KeyEquivalent.leftArrow
9797
)
@@ -100,7 +100,7 @@ extension FilesWindowController {
100100
actionsMenu.addItem(left)
101101

102102
let right = NSMenuItem(
103-
title: NSLocalizedString("Copy Lines To Right", comment: ""),
103+
title: NSLocalizedString("Copy Lines to Right", comment: ""),
104104
action: #selector(copyLinesToRight),
105105
keyEquivalent: KeyEquivalent.rightArrow
106106
)
@@ -140,12 +140,12 @@ extension FilesWindowController {
140140
let viewMenu = NSMenu(title: NSLocalizedString("View", comment: ""))
141141

142142
viewMenu.addItem(
143-
withTitle: NSLocalizedString("Set Left ReadOnly", comment: ""),
143+
withTitle: NSLocalizedString("Set Left Read-Only", comment: ""),
144144
action: #selector(setLeftReadOnly),
145145
keyEquivalent: ""
146146
)
147147
viewMenu.addItem(
148-
withTitle: NSLocalizedString("Set Right ReadOnly", comment: ""),
148+
withTitle: NSLocalizedString("Set Right Read-Only", comment: ""),
149149
action: #selector(setRightReadOnly),
150150
keyEquivalent: ""
151151
)

Sources/Features/FilesCompare/Controller/FilesWindowController+NSToolbarDelegate.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ extension FilesWindowController: NSToolbarDelegate, NSToolbarItemValidation {
8181
return NSToolbarItem(
8282
identifier: itemIdentifier,
8383
label: NSLocalizedString("Prev Difference", comment: ""),
84-
tooltip: NSLocalizedString("Go to Previous Difference", comment: ""),
84+
tooltip: NSLocalizedString("Go to previous difference", comment: ""),
8585
image: NSImage(named: VDImageNamePrev),
8686
target: self,
8787
action: #selector(previousDifference)
@@ -90,7 +90,7 @@ extension FilesWindowController: NSToolbarDelegate, NSToolbarItemValidation {
9090
return NSToolbarItem(
9191
identifier: itemIdentifier,
9292
label: NSLocalizedString("Next Difference", comment: ""),
93-
tooltip: NSLocalizedString("Go to Next Difference", comment: ""),
93+
tooltip: NSLocalizedString("Go to next difference", comment: ""),
9494
image: NSImage(named: VDImageNameNext),
9595
target: self,
9696
action: #selector(nextDifference)
@@ -99,7 +99,7 @@ extension FilesWindowController: NSToolbarDelegate, NSToolbarItemValidation {
9999
return NSToolbarItem(
100100
identifier: itemIdentifier,
101101
label: NSLocalizedString("Previous File", comment: ""),
102-
tooltip: NSLocalizedString("Go to Previous File With Differences", comment: ""),
102+
tooltip: NSLocalizedString("Go to previous file with differences", comment: ""),
103103
image: NSImage(named: VDImageNamePrevFile),
104104
target: self,
105105
action: #selector(previousDifferenceFiles)
@@ -108,7 +108,7 @@ extension FilesWindowController: NSToolbarDelegate, NSToolbarItemValidation {
108108
return NSToolbarItem(
109109
identifier: itemIdentifier,
110110
label: NSLocalizedString("Next File", comment: ""),
111-
tooltip: NSLocalizedString("Go to Next File With Differences", comment: ""),
111+
tooltip: NSLocalizedString("Go to next file with differences", comment: ""),
112112
image: NSImage(named: VDImageNameNextFile),
113113
target: self,
114114
action: #selector(nextDifferenceFiles)

Sources/Features/FoldersCompare/Controller/FoldersWindowController+Menu.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,12 @@ extension FoldersWindowController {
279279
let menu = NSMenu(title: NSLocalizedString("View", comment: ""))
280280

281281
menu.addItem(
282-
withTitle: NSLocalizedString("Set Left ReadOnly", comment: ""),
282+
withTitle: NSLocalizedString("Set Left Read-Only", comment: ""),
283283
action: #selector(setLeftReadOnly),
284284
keyEquivalent: ""
285285
)
286286
menu.addItem(
287-
withTitle: NSLocalizedString("Set Right ReadOnly", comment: ""),
287+
withTitle: NSLocalizedString("Set Right Read-Only", comment: ""),
288288
action: #selector(setRightReadOnly),
289289
keyEquivalent: ""
290290
)

Sources/Features/FoldersCompare/Controller/FoldersWindowController+NSToolbarDelegate.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ extension FoldersWindowController: NSToolbarDelegate, NSToolbarItemValidation {
220220
return NSToolbarItem(
221221
identifier: itemIdentifier,
222222
label: NSLocalizedString("Next Difference", comment: ""),
223-
tooltip: NSLocalizedString("Go to Next Difference", comment: ""),
223+
tooltip: NSLocalizedString("Go to next difference", comment: ""),
224224
image: NSImage(named: VDImageNameNext),
225225
target: self,
226226
action: #selector(nextDifference)
@@ -229,7 +229,7 @@ extension FoldersWindowController: NSToolbarDelegate, NSToolbarItemValidation {
229229
return NSToolbarItem(
230230
identifier: itemIdentifier,
231231
label: NSLocalizedString("Prev Difference", comment: ""),
232-
tooltip: NSLocalizedString("Go to Previous Difference", comment: ""),
232+
tooltip: NSLocalizedString("Go to previous difference", comment: ""),
233233
image: NSImage(named: VDImageNamePrev),
234234
target: self,
235235
action: #selector(previousDifference)

Sources/Features/Preferences/Session/Panels/Filters/FiltersPredicateEditor.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class FiltersPredicateEditor: NSPredicateEditor {
3535

3636
// File Name Ignore Case
3737
TitlePredicateEditorRowTemplate(
38-
keyPathDisplayNames: ["fileName": NSLocalizedString("Name Ignore Case", comment: "")],
38+
keyPathDisplayNames: ["fileName": NSLocalizedString("Name (Ignore Case)", comment: "")],
3939
leftKeyPath: "fileName",
4040
rightExpressionAttributeType: .stringAttributeType,
4141
caseInsensitive: true,
@@ -67,7 +67,7 @@ class FiltersPredicateEditor: NSPredicateEditor {
6767

6868
// Path Ignore Case
6969
TitlePredicateEditorRowTemplate(
70-
keyPathDisplayNames: ["pathRelativeToRoot": NSLocalizedString("Path Ignore Case", comment: "")],
70+
keyPathDisplayNames: ["pathRelativeToRoot": NSLocalizedString("Path (Ignore Case)", comment: "")],
7171
leftKeyPath: "pathRelativeToRoot",
7272
rightExpressionAttributeType: .stringAttributeType,
7373
caseInsensitive: true,

Sources/Features/Preferences/Session/Panels/Filters/SessionPreferencesFiltersBox.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class SessionPreferencesFiltersBox: PreferencesBox, NSMenuItemValidation {
153153
} catch {
154154
let alert = NSAlert()
155155

156-
alert.messageText = NSLocalizedString("File filter expression contains errors", comment: "")
156+
alert.messageText = NSLocalizedString("The file filter expression contains errors", comment: "")
157157
alert.alertStyle = .critical
158158
alert.informativeText = error.localizedDescription
159159

Sources/Features/Preferences/Session/Panels/Filters/SessionPreferencesFiltersPanel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class SessionPreferencesFiltersPanel: NSView, PreferencesPanelDataSource {
1717

1818
override init(frame frameRect: NSRect) {
1919
filterBox = SessionPreferencesFiltersBox(
20-
title: NSLocalizedString("Do not show files matching criteria shown below", comment: "")
20+
title: NSLocalizedString("Do not show files matching the criteria below", comment: "")
2121
)
2222

2323
super.init(frame: frameRect)

Sources/SharedKit/Utilities/OpenEditor/OpenEditorError.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ extension OpenEditorError: LocalizedError {
1616
var errorDescription: String? {
1717
switch self {
1818
case let .applicationNotFound(url):
19-
let message = NSLocalizedString("Application not found '%@'", comment: "")
19+
let message = NSLocalizedString("Application '%@' not found", comment: "")
2020
return String.localizedStringWithFormat(message, url.osPath)
2121
case let .missingExecutePermission(url):
22-
let message = NSLocalizedString("The unix task '%@' must have the execute flag set (eg chmod +x)", comment: "")
22+
let message = NSLocalizedString("The Unix task '%@' must have the executable flag set (e.g., chmod +x)", comment: "")
2323
return String.localizedStringWithFormat(message, url.osPath)
2424
}
2525
}

en.lproj/Localizable.strings

59.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)