Skip to content

Commit

Permalink
Remove unnecessary string literal
Browse files Browse the repository at this point in the history
  • Loading branch information
vincode-io committed Sep 14, 2024
1 parent 52b47cb commit 419b761
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
1 change: 0 additions & 1 deletion Zavala/AppAssets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,6 @@ extension String {
static let shareControlLabel = String(localized: "Share", comment: "Control Label: Share")
static let shareEllipsisControlLabel = String(localized: "Share…", comment: "Control Label: Share…")
static let smallControlLabel = String(localized: "Small", comment: "Control Label: Small")
static let sortRowControlLabel = String(localized: "Sort Row", comment: "Control Label: Sort Row")
static let sortRowsControlLabel = String(localized: "Sort Rows", comment: "Control Label: Sort Rows")
static let splitRowControlLabel = String(localized: "Split Row", comment: "Control Label: Split Row")
static let statisticsControlLabel = String(localized: "Statistics", comment: "Control Label: Statistics")
Expand Down
9 changes: 1 addition & 8 deletions Zavala/Editor/EditorViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -672,12 +672,6 @@ class EditorViewController: UIViewController, DocumentsActivityItemsConfiguratio
} else {
command.title = .groupRowControlLabel
}
case .sortCurrentRows:
if currentRows?.count ?? 0 > 1 {
command.title = .sortRowsControlLabel
} else {
command.title = .sortRowControlLabel
}
case .deleteCurrentRows:
if currentRows?.count ?? 0 > 1 {
command.title = .deleteRowsControlLabel
Expand Down Expand Up @@ -2963,8 +2957,7 @@ private extension EditorViewController {
}

func sortAction(rows: [Row]) -> UIAction {
let title = rows.count == 1 ? String.sortRowControlLabel : String.sortRowsControlLabel
return UIAction(title: title, image: .sortRows) { [weak self] action in
return UIAction(title: .sortRowsControlLabel, image: .sortRows) { [weak self] action in
self?.sortCurrentRows(rows)
}
}
Expand Down
3 changes: 0 additions & 3 deletions Zavala/Resources/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -1038,9 +1038,6 @@
"Small" : {
"comment" : "Control Label: Small"
},
"Sort Row" : {
"comment" : "Control Label: Sort Row"
},
"Sort Rows" : {
"comment" : "Control Label: Sort Rows"
},
Expand Down

0 comments on commit 419b761

Please sign in to comment.