Fix typos

This commit is contained in:
Dimitris Apostolou
2024-12-06 18:06:27 +02:00
parent e619105942
commit ccd76a5354
22 changed files with 57 additions and 57 deletions

View File

@@ -19,7 +19,7 @@ final class FeedlyAccountDelegate: AccountDelegate {
/// Feedly has a sandbox API and a production API.
/// This property is referred to when clients need to know which environment it should be pointing to.
/// The value of this proptery must match any `OAuthAuthorizationClient` used.
/// The value of this property must match any `OAuthAuthorizationClient` used.
/// Currently this is always returning the cloud API, but we are leaving it stubbed out for now.
static var environment: FeedlyAPICaller.API {
return .cloud

View File

@@ -12,10 +12,10 @@ to openTabInSafari(theUrl)
if (my safariWindow is missing value) then
-- first time through, make a new window with the given url in the only tab
set newdoc to make new document at front with properties {URL:theUrl}
-- because we created the doucument "at front", we know it is window 1
-- because we created the document "at front", we know it is window 1
set safariWindow to window 1
else
-- after the first time, make a new tab in the wndow we created the first tim
-- after the first time, make a new tab in the window we created the first tim
tell safariWindow
make new tab with properties {URL:theUrl}
end tell

View File

@@ -136,7 +136,7 @@ struct AppAssets {
let image = NSImage(systemSymbolName: "folder", accessibilityDescription: nil)!
let preferredColor = NSColor(named: "AccentColor")!
let coloredImage = image.tinted(with: preferredColor)
return IconImage(coloredImage, isSymbol: true, isBackgroundSupressed: true, preferredColor: preferredColor.cgColor)
return IconImage(coloredImage, isSymbol: true, isBackgroundSuppressed: true, preferredColor: preferredColor.cgColor)
}
static var markAllAsReadImage: RSImage = {
@@ -180,7 +180,7 @@ struct AppAssets {
}()
static var searchFeedImage: IconImage = {
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!, isSymbol: true, isBackgroundSupressed: true)
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!, isSymbol: true, isBackgroundSuppressed: true)
}()
static var shareImage: RSImage = {
@@ -203,7 +203,7 @@ struct AppAssets {
let image = NSImage(systemSymbolName: "star.fill", accessibilityDescription: nil)!
let preferredColor = NSColor(named: "StarColor")!
let coloredImage = image.tinted(with: preferredColor)
return IconImage(coloredImage, isSymbol: true, isBackgroundSupressed: true, preferredColor: preferredColor.cgColor)
return IconImage(coloredImage, isSymbol: true, isBackgroundSuppressed: true, preferredColor: preferredColor.cgColor)
}()
static var timelineSeparatorColor: NSColor = {
@@ -222,14 +222,14 @@ struct AppAssets {
let image = NSImage(systemSymbolName: "sun.max.fill", accessibilityDescription: nil)!
let preferredColor = NSColor.orange
let coloredImage = image.tinted(with: preferredColor)
return IconImage(coloredImage, isSymbol: true, isBackgroundSupressed: true, preferredColor: preferredColor.cgColor)
return IconImage(coloredImage, isSymbol: true, isBackgroundSuppressed: true, preferredColor: preferredColor.cgColor)
}()
static var unreadFeedImage: IconImage = {
let image = NSImage(systemSymbolName: "largecircle.fill.circle", accessibilityDescription: nil)!
let preferredColor = NSColor(named: "AccentColor")!
let coloredImage = image.tinted(with: preferredColor)
return IconImage(coloredImage, isSymbol: true, isBackgroundSupressed: true, preferredColor: preferredColor.cgColor)
return IconImage(coloredImage, isSymbol: true, isBackgroundSuppressed: true, preferredColor: preferredColor.cgColor)
}()
static var swipeMarkReadImage: RSImage = {

View File

@@ -84,7 +84,7 @@ final class IconView: NSView {
}
override func draw(_ dirtyRect: NSRect) {
guard !(iconImage?.isBackgroundSupressed ?? false) else { return }
guard !(iconImage?.isBackgroundSuppressed ?? false) else { return }
guard hasExposedVerticalBackground || !isDiscernable else { return }
let color = NSApplication.shared.effectiveAppearance.isDarkMode ? IconView.darkBackgroundColor : IconView.lightBackgroundColor

View File

@@ -112,7 +112,7 @@ class SidebarCell : NSTableCellView {
override func accessibilityLabel() -> String? {
if unreadCount > 0 {
let unreadLabel = NSLocalizedString("unread", comment: "Unread label for accessiblity")
let unreadLabel = NSLocalizedString("unread", comment: "Unread label for accessibility")
return "\(name) \(unreadCount) \(unreadLabel)"
} else {
return name
@@ -145,14 +145,14 @@ private extension SidebarCell {
if let iconImage = iconImage, iconImage.isSymbol {
if backgroundStyle != .normal {
let image = iconImage.image.tinted(with: .white)
updatedIconImage = IconImage(image, isSymbol: iconImage.isSymbol, isBackgroundSupressed: iconImage.isBackgroundSupressed)
updatedIconImage = IconImage(image, isSymbol: iconImage.isSymbol, isBackgroundSuppressed: iconImage.isBackgroundSuppressed)
} else {
if let preferredColor = iconImage.preferredColor {
let image = iconImage.image.tinted(with: NSColor(cgColor: preferredColor)!)
updatedIconImage = IconImage(image, isSymbol: iconImage.isSymbol, isBackgroundSupressed: iconImage.isBackgroundSupressed)
updatedIconImage = IconImage(image, isSymbol: iconImage.isSymbol, isBackgroundSuppressed: iconImage.isBackgroundSuppressed)
} else {
let image = iconImage.image.tinted(with: .controlAccentColor)
updatedIconImage = IconImage(image, isSymbol: iconImage.isSymbol, isBackgroundSupressed: iconImage.isBackgroundSupressed)
updatedIconImage = IconImage(image, isSymbol: iconImage.isSymbol, isBackgroundSuppressed: iconImage.isBackgroundSuppressed)
}
}
}

View File

@@ -103,16 +103,16 @@ protocol SidebarDelegate: AnyObject {
func restoreState(from state: [AnyHashable : Any]) {
if let containerExpandedWindowState = state[UserInfoKey.containerExpandedWindowState] as? [[AnyHashable: AnyHashable]] {
let containerIdentifers = containerExpandedWindowState.compactMap( { ContainerIdentifier(userInfo: $0) })
expandedTable = Set(containerIdentifers)
let containerIdentifiers = containerExpandedWindowState.compactMap( { ContainerIdentifier(userInfo: $0) })
expandedTable = Set(containerIdentifiers)
}
guard let selectedFeedsState = state[UserInfoKey.selectedFeedsState] as? [[AnyHashable: AnyHashable]] else {
return
}
let selectedFeedIdentifers = Set(selectedFeedsState.compactMap( { SidebarItemIdentifier(userInfo: $0) }))
for feedIdentifier in selectedFeedIdentifers {
let selectedFeedIdentifiers = Set(selectedFeedsState.compactMap( { SidebarItemIdentifier(userInfo: $0) }))
for feedIdentifier in selectedFeedIdentifiers {
treeControllerDelegate.addFilterException(feedIdentifier)
}
@@ -122,7 +122,7 @@ protocol SidebarDelegate: AnyObject {
func selectFeedsVisitor(node: Node) {
if let feedID = (node.representedObject as? SidebarItemIdentifiable)?.sidebarItemID {
if selectedFeedIdentifers.contains(feedID) {
if selectedFeedIdentifiers.contains(feedID) {
selectIndexes.insert(outlineView.row(forItem: node) )
}
}
@@ -532,11 +532,11 @@ private extension SidebarViewController {
func addAllSelectedToFilterExceptions() {
for feed in selectedFeeds {
addToFilterExeptionsIfNecessary(feed)
addToFilterExceptionsIfNecessary(feed)
}
}
func addToFilterExeptionsIfNecessary(_ feed: SidebarItem?) {
func addToFilterExceptionsIfNecessary(_ feed: SidebarItem?) {
if isReadFiltered, let feedID = feed?.sidebarItemID {
if feed is PseudoFeed {
treeControllerDelegate.addFilterException(feedID)

View File

@@ -25,7 +25,7 @@ public extension NSWindow {
func setPointAndSizeAdjustingForScreen(point: NSPoint, size: NSSize, minimumSize: NSSize) {
// point.y specifices from the *top* of the screen, even though screen coordinates work from the bottom up. This is for convenience.
// point.y specifies from the *top* of the screen, even though screen coordinates work from the bottom up. This is for convenience.
// The eventual size may be smaller than requested, since the screen may be small, but not smaller than minimumSize.
guard let screenFrame = screen?.visibleFrame else {

View File

@@ -42,7 +42,7 @@ public extension String {
self.data(using: .utf8)!.md5Hash
}
/// A hexadecimal representaion of an MD5 hash of the string's UTF-8 representation.
/// A hexadecimal representation of an MD5 hash of the string's UTF-8 representation.
var md5String: String {
self.md5Hash.hexadecimalString!
}
@@ -299,7 +299,7 @@ public extension String {
///
/// - Parameter string: The string to search for.
///
/// - Returns: `true` if the string contains `string`; `false` otherswise.
/// - Returns: `true` if the string contains `string`; `false` otherwise.
func caseInsensitiveContains(_ string: String) -> Bool {
return self.range(of: string, options: .caseInsensitive) != nil
}

View File

@@ -28,8 +28,8 @@ class MacroProcessorTests: XCTestCase {
result = try! MacroProcessor.renderedText(withTemplate: template, substitutions: substitutions)
XCTAssertEqual(result, expected)
// Nonexistant key
template = "foo [[nonexistant]] bar"
// Nonexistent key
template = "foo [[nonexistent]] bar"
expected = template
result = try! MacroProcessor.renderedText(withTemplate: template, substitutions: substitutions)
XCTAssertEqual(result, expected)

View File

@@ -267,7 +267,7 @@ static int FMDBDatabaseBusyHandler(void *f, int count) {
// we no longer make busyRetryTimeout public
// but for folks who don't bother noticing that the interface to FMDatabase changed,
// we'll still implement the method so they don't get suprise crashes
// we'll still implement the method so they don't get surprise crashes
- (int)busyRetryTimeout {
NSLog(@"%s:%d", __FUNCTION__, __LINE__);
NSLog(@"FMDB: busyRetryTimeout no longer works, please use maxBusyRetryTimeInterval");

View File

@@ -74,23 +74,23 @@ return ret;
}
/*
get table with list of tables: result colums: type[STRING], name[STRING],tbl_name[STRING],rootpage[INTEGER],sql[STRING]
get table with list of tables: result columns: type[STRING], name[STRING],tbl_name[STRING],rootpage[INTEGER],sql[STRING]
check if table exist in database (patch from OZLB)
*/
- (FMResultSet*)getSchema {
//result colums: type[STRING], name[STRING],tbl_name[STRING],rootpage[INTEGER],sql[STRING]
//result columns: type[STRING], name[STRING],tbl_name[STRING],rootpage[INTEGER],sql[STRING]
FMResultSet *rs = [self executeQuery:@"SELECT type, name, tbl_name, rootpage, sql FROM (SELECT * FROM sqlite_master UNION ALL SELECT * FROM sqlite_temp_master) WHERE type != 'meta' AND name NOT LIKE 'sqlite_%' ORDER BY tbl_name, type DESC, name"];
return rs;
}
/*
get table schema: result colums: cid[INTEGER], name,type [STRING], notnull[INTEGER], dflt_value[],pk[INTEGER]
get table schema: result columns: cid[INTEGER], name,type [STRING], notnull[INTEGER], dflt_value[],pk[INTEGER]
*/
- (FMResultSet*)getTableSchema:(NSString*)tableName {
//result colums: cid[INTEGER], name,type [STRING], notnull[INTEGER], dflt_value[],pk[INTEGER]
//result columns: cid[INTEGER], name,type [STRING], notnull[INTEGER], dflt_value[],pk[INTEGER]
FMResultSet *rs = [self executeQuery:[NSString stringWithFormat: @"pragma table_info('%@')", tableName]];
return rs;

View File

@@ -39,10 +39,10 @@ class ArticleExtractor {
let clientURL = "https://extract.feedbin.com/parser"
let username = SecretsManager.provider.mercuryClientId
let signiture = articleLink.hmacUsingSHA1(key: SecretsManager.provider.mercuryClientSecret)
let signature = articleLink.hmacUsingSHA1(key: SecretsManager.provider.mercuryClientSecret)
if let base64URL = articleLink.data(using: .utf8)?.base64EncodedString() {
let fullURL = "\(clientURL)/\(username)/\(signiture)?base64_url=\(base64URL)"
let fullURL = "\(clientURL)/\(username)/\(signature)?base64_url=\(base64URL)"
if let url = URL(string: fullURL) {
self.url = url
return

View File

@@ -26,14 +26,14 @@ final class IconImage {
let image: RSImage
let isSymbol: Bool
let isBackgroundSupressed: Bool
let isBackgroundSuppressed: Bool
let preferredColor: CGColor?
init(_ image: RSImage, isSymbol: Bool = false, isBackgroundSupressed: Bool = false, preferredColor: CGColor? = nil) {
init(_ image: RSImage, isSymbol: Bool = false, isBackgroundSuppressed: Bool = false, preferredColor: CGColor? = nil) {
self.image = image
self.isSymbol = isSymbol
self.preferredColor = preferredColor
self.isBackgroundSupressed = isBackgroundSupressed
self.isBackgroundSuppressed = isBackgroundSuppressed
}
}

View File

@@ -22,11 +22,11 @@ final class FaviconGenerator {
let colorHash = ColorHash(feed.url)
if let favicon = AppAssets.faviconTemplateImage.maskWithColor(color: colorHash.color.cgColor) {
let iconImage = IconImage(favicon, isBackgroundSupressed: true)
let iconImage = IconImage(favicon, isBackgroundSuppressed: true)
FaviconGenerator.faviconGeneratorCache[feed.url] = iconImage
return iconImage
} else {
return IconImage(AppAssets.faviconTemplateImage, isBackgroundSupressed: true)
return IconImage(AppAssets.faviconTemplateImage, isBackgroundSuppressed: true)
}
}

View File

@@ -36,8 +36,8 @@ class ReaderAPIAccountViewController: UITableViewController {
usernameTextField.delegate = self
passwordTextField.delegate = self
if let unwrappedAcount = account,
let credentials = try? retrieveCredentialsForAccount(for: unwrappedAcount) {
if let unwrappedAccount = account,
let credentials = try? retrieveCredentialsForAccount(for: unwrappedAccount) {
actionButton.setTitle(NSLocalizedString("Update Credentials", comment: "Update Credentials"), for: .normal)
actionButton.isEnabled = true
usernameTextField.text = credentials.username
@@ -180,7 +180,7 @@ class ReaderAPIAccountViewController: UITableViewController {
case .success:
break
case .failure(let error):
self.showError(NSLocalizedString(error.localizedDescription, comment: "Accoount Refresh Error"))
self.showError(NSLocalizedString(error.localizedDescription, comment: "Account Refresh Error"))
}
}

View File

@@ -146,7 +146,7 @@ struct AppAssets {
}()
static var folderImage: IconImage = {
return IconImage(UIImage(systemName: "folder.fill")!, isSymbol: true, isBackgroundSupressed: true, preferredColor: AppAssets.secondaryAccentColor.cgColor)
return IconImage(UIImage(systemName: "folder.fill")!, isSymbol: true, isBackgroundSuppressed: true, preferredColor: AppAssets.secondaryAccentColor.cgColor)
}()
static var moreImage: UIImage = {
@@ -215,7 +215,7 @@ struct AppAssets {
static var starredFeedImage: IconImage {
let image = UIImage(systemName: "star.fill")!
return IconImage(image, isSymbol: true, isBackgroundSupressed: true, preferredColor: AppAssets.starColor.cgColor)
return IconImage(image, isSymbol: true, isBackgroundSuppressed: true, preferredColor: AppAssets.starColor.cgColor)
}
static var tickMarkColor: UIColor = {
@@ -229,7 +229,7 @@ struct AppAssets {
static var todayFeedImage: IconImage {
let image = UIImage(systemName: "sun.max.fill")!
return IconImage(image, isSymbol: true, isBackgroundSupressed: true, preferredColor: UIColor.systemOrange.cgColor)
return IconImage(image, isSymbol: true, isBackgroundSuppressed: true, preferredColor: UIColor.systemOrange.cgColor)
}
static var trashImage: UIImage = {
@@ -238,7 +238,7 @@ struct AppAssets {
static var unreadFeedImage: IconImage {
let image = UIImage(systemName: "largecircle.fill.circle")!
return IconImage(image, isSymbol: true, isBackgroundSupressed: true, preferredColor: AppAssets.secondaryAccentColor.cgColor)
return IconImage(image, isSymbol: true, isBackgroundSuppressed: true, preferredColor: AppAssets.secondaryAccentColor.cgColor)
}
static var vibrantTextColor: UIColor = {

View File

@@ -23,7 +23,7 @@ class FeedTableViewCell : VibrantTableViewCell {
set {}
get {
if unreadCount > 0 {
let unreadLabel = NSLocalizedString("unread", comment: "Unread label for accessiblity")
let unreadLabel = NSLocalizedString("unread", comment: "Unread label for accessibility")
return "\(name) \(unreadCount) \(unreadLabel)"
} else {
return name

View File

@@ -20,7 +20,7 @@ class FeedTableViewSectionHeader: UITableViewHeaderFooterView {
set {}
get {
if unreadCount > 0 {
let unreadLabel = NSLocalizedString("unread", comment: "Unread label for accessiblity")
let unreadLabel = NSLocalizedString("unread", comment: "Unread label for accessibility")
return "\(name) \(unreadCount) \(unreadLabel) \(expandedStateMessage) "
} else {
return "\(name) \(expandedStateMessage) "

View File

@@ -47,7 +47,7 @@ final class IconView: UIView {
}
private var isBackgroundSuppressed: Bool {
return iconImage?.isBackgroundSupressed ?? false
return iconImage?.isBackgroundSuppressed ?? false
}
override init(frame: CGRect) {

View File

@@ -280,7 +280,7 @@ class SceneCoordinator: NSObject, UndoableCommandRunner {
private var articleDictionaryNeedsUpdate = true
private var _idToArticleDictionary = [String: Article]()
private var idToAticleDictionary: [String: Article] {
private var idToArticleDictionary: [String: Article] {
if articleDictionaryNeedsUpdate {
rebuildArticleDictionaries()
}
@@ -357,8 +357,8 @@ class SceneCoordinator: NSObject, UndoableCommandRunner {
if let activity = activity, let windowState = activity.userInfo?[UserInfoKey.windowState] as? [AnyHashable: Any] {
if let containerExpandedWindowState = windowState[UserInfoKey.containerExpandedWindowState] as? [[AnyHashable: AnyHashable]] {
let containerIdentifers = containerExpandedWindowState.compactMap( { ContainerIdentifier(userInfo: $0) })
expandedTable = Set(containerIdentifers)
let containerIdentifiers = containerExpandedWindowState.compactMap( { ContainerIdentifier(userInfo: $0) })
expandedTable = Set(containerIdentifiers)
}
if let readArticlesFilterState = windowState[UserInfoKey.readArticlesFilterState] as? [[AnyHashable: AnyHashable]: Bool] {
@@ -676,7 +676,7 @@ class SceneCoordinator: NSObject, UndoableCommandRunner {
}
func articleFor(_ articleID: String) -> Article? {
return idToAticleDictionary[articleID]
return idToArticleDictionary[articleID]
}
func cappedIndexPath(_ indexPath: IndexPath) -> IndexPath {
@@ -991,7 +991,7 @@ class SceneCoordinator: NSObject, UndoableCommandRunner {
func selectPrevUnread() {
// This should never happen, but I don't want to risk throwing us
// into an infinate loop searching for an unread that isn't there.
// into an infinite loop searching for an unread that isn't there.
if appDelegate.unreadCount < 1 {
return
}
@@ -1007,7 +1007,7 @@ class SceneCoordinator: NSObject, UndoableCommandRunner {
func selectNextUnread() {
// This should never happen, but I don't want to risk throwing us
// into an infinate loop searching for an unread that isn't there.
// into an infinite loop searching for an unread that isn't there.
if appDelegate.unreadCount < 1 {
return
}
@@ -1459,7 +1459,7 @@ private extension SceneCoordinator {
}
func ensureFeedIsAvailableToSelect(_ feed: SidebarItem, completion: @escaping () -> Void) {
addToFilterExeptionsIfNecessary(feed)
addToFilterExceptionsIfNecessary(feed)
addShadowTableToFilterExceptions()
rebuildBackingStores(completion: {
@@ -1515,7 +1515,7 @@ private extension SceneCoordinator {
func rebuildBackingStores(initialLoad: Bool = false, updateExpandedNodes: (() -> Void)? = nil, completion: (() -> Void)? = nil) {
if !BatchUpdate.shared.isPerforming {
addToFilterExeptionsIfNecessary(timelineFeed)
addToFilterExceptionsIfNecessary(timelineFeed)
treeController.rebuild()
treeControllerDelegate.resetFilterExceptions()

View File

@@ -22,7 +22,7 @@ class TimelineTitleView: UIView {
set { }
get {
if let name = label.text {
let unreadLabel = NSLocalizedString("unread", comment: "Unread label for accessiblity")
let unreadLabel = NSLocalizedString("unread", comment: "Unread label for accessibility")
return "\(name) \(unreadCountView.unreadCount) \(unreadLabel)"
}
else {

View File

@@ -11,7 +11,7 @@ import Foundation
/// Used to select which animations should be performed
public struct Animations: OptionSet {
/// Select and deslections will be animated.
/// Selections and deselections will be animated.
public static let select = Animations(rawValue: 1)
/// Scrolling will be animated