Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Spelling #121

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
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
12 changes: 6 additions & 6 deletions Data Sources/IdentitiesDataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ enum IdentitiesSection: Hashable {

enum IdentitiesItem: Hashable {
case add
case identitiy(Identity)
case identity(Identity)
}

final class IdentitiesDataSource: UITableViewDiffableDataSource<IdentitiesSection, IdentitiesItem> {
Expand Down Expand Up @@ -39,7 +39,7 @@ final class IdentitiesDataSource: UITableViewDiffableDataSource<IdentitiesSectio
configuration.text = NSLocalizedString("add", comment: "")
configuration.image = UIImage(systemName: "plus.circle.fill")
cell.contentConfiguration = configuration
case let .identitiy(identity):
case let .identity(identity):
let viewModel = viewModelProvider(identity)

(cell as? IdentityTableViewCell)?.viewModel = viewModel
Expand Down Expand Up @@ -83,11 +83,11 @@ private extension IdentitiesDataSource {
var newSnapshot = NSDiffableDataSourceSnapshot<IdentitiesSection, IdentitiesItem>()
let sections = [
(section: IdentitiesSection.identities(NSLocalizedString("identities.accounts", comment: "")),
identities: identities.filter { $0.authenticated && !$0.pending }.map(IdentitiesItem.identitiy)),
identities: identities.filter { $0.authenticated && !$0.pending }.map(IdentitiesItem.identity)),
(section: IdentitiesSection.identities(NSLocalizedString("identities.browsing", comment: "")),
identities: identities.filter { !$0.authenticated && !$0.pending }.map(IdentitiesItem.identitiy)),
identities: identities.filter { !$0.authenticated && !$0.pending }.map(IdentitiesItem.identity)),
(section: IdentitiesSection.identities(NSLocalizedString("identities.pending", comment: "")),
identities: identities.filter { $0.pending }.map(IdentitiesItem.identitiy))
identities: identities.filter { $0.pending }.map(IdentitiesItem.identity))
]
.filter { !$0.identities.isEmpty }

Expand All @@ -107,7 +107,7 @@ private extension IdentitiesItem {
switch self {
case .add:
return String(describing: UITableViewCell.self)
case .identitiy:
case .identity:
return String(describing: IdentityTableViewCell.self)
}
}
Expand Down
4 changes: 2 additions & 2 deletions Extensions/SystemEmoji+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ extension SystemEmoji.Group {
return "emoji.system-group.food-and-drink"
case .travelAndPlaces:
return "emoji.system-group.travel-and-places"
case .activites:
return "emoji.system-group.activites"
case .activities:
return "emoji.system-group.activities"
case .objects:
return "emoji.system-group.objects"
case .symbols:
Expand Down
10 changes: 5 additions & 5 deletions Localizations/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
"compose.emoji-button" = "Emoji picker";
"compose.mark-media-sensitive" = "Mark media as sensitive";
"compose.photo-library" = "Photo Library";
"compose.poll.accessibility.multiple-choices-allowed" = "Mutliple choices allowed";
"compose.poll.accessibility.multiple-choices-allowed" = "Multiple choices allowed";
"compose.poll.add-choice" = "Add a choice";
"compose.poll.allow-multiple-choices" = "Allow multiple choices";
"compose.poll-button.accessibility-label" = "Add a poll";
Expand All @@ -139,7 +139,7 @@
"emoji.system-group.animals-and-nature" = "Animals & Nature";
"emoji.system-group.food-and-drink" = "Food & Drink";
"emoji.system-group.travel-and-places" = "Travel & Places";
"emoji.system-group.activites" = "Activities";
"emoji.system-group.activities" = "Activities";
"emoji.system-group.objects" = "Objects";
"emoji.system-group.symbols" = "Symbols";
"emoji.system-group.flags" = "Flags";
Expand Down Expand Up @@ -217,7 +217,7 @@
"preferences.media.autoplay.wifi" = "On Wi-Fi";
"preferences.media.autoplay.never" = "Never";
"preferences.use-preferences-from-server" = "Use preferences from server";
"preferences.posting-default-visiblility" = "Default visibility";
"preferences.posting-default-visibility" = "Default visibility";
"preferences.posting-default-sensitive" = "Mark content sensitive by default";
"preferences.reading-expand-media" = "Expand media";
"preferences.expand-media.default" = "Hide sensitive";
Expand Down Expand Up @@ -327,9 +327,9 @@
"status.favorite-button.accessibility-label" = "Favorite";
"status.favorite-button.undo.accessibility-label" = "Unfavorite";
"status.show-more" = "Show More";
"status.show-more-all-button.accessibilty-label" = "Show more for all";
"status.show-more-all-button.accessibility-label" = "Show more for all";
"status.show-less" = "Show Less";
"status.show-less-all-button.accessibilty-label" = "Show less for all";
"status.show-less-all-button.accessibility-label" = "Show less for all";
"status.show-thread" = "Show thread";
"status.spoiler-text-placeholder" = "Write your warning here";
"status.unbookmark" = "Unbookmark";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public extension SystemEmoji {
case animalsAndNature
case foodAndDrink
case travelAndPlaces
case activites
case activities
case objects
case symbols
case flags
Expand Down
8 changes: 4 additions & 4 deletions Transitions/ZoomDismissalInteractionController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ final class ZoomDismissalInteractionController: NSObject {
let totalAvailableAlpha = startingAlpha - finalAlpha

let maximumDelta = view.bounds.height / 4.0
let deltaAsPercentageOfMaximun = min(abs(verticalDelta) / maximumDelta, 1.0)
let deltaAsPercentageOfMaximum = min(abs(verticalDelta) / maximumDelta, 1.0)

return startingAlpha - (deltaAsPercentageOfMaximun * totalAvailableAlpha)
return startingAlpha - (deltaAsPercentageOfMaximum * totalAvailableAlpha)
}

func scaleFor(view: UIView, withPanningVerticalDelta verticalDelta: CGFloat) -> CGFloat {
Expand All @@ -118,9 +118,9 @@ final class ZoomDismissalInteractionController: NSObject {
let totalAvailableScale = startingScale - finalScale

let maximumDelta = view.bounds.height / 2.0
let deltaAsPercentageOfMaximun = min(abs(verticalDelta) / maximumDelta, 1.0)
let deltaAsPercentageOfMaximum = min(abs(verticalDelta) / maximumDelta, 1.0)

return startingScale - (deltaAsPercentageOfMaximun * totalAvailableScale)
return startingScale - (deltaAsPercentageOfMaximum * totalAvailableScale)
}
}

Expand Down
6 changes: 3 additions & 3 deletions View Controllers/IdentitiesViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ final class IdentitiesViewController: UITableViewController {
}

override func tableView(_ tableView: UITableView, shouldHighlightRowAt indexPath: IndexPath) -> Bool {
if case let .identitiy(identityViewModel) = dataSource.itemIdentifier(for: indexPath) {
if case let .identity(identityViewModel) = dataSource.itemIdentifier(for: indexPath) {
return identityViewModel.id != viewModel.identityContext.identity.id
}

Expand All @@ -55,7 +55,7 @@ final class IdentitiesViewController: UITableViewController {
let addIdentityViewController = UIHostingController(rootView: addIdentityView)

show(addIdentityViewController, sender: self)
case let .identitiy(identityViewModel):
case let .identity(identityViewModel):
rootViewModel.identitySelected(id: identityViewModel.id)
}
}
Expand All @@ -68,7 +68,7 @@ final class IdentitiesViewController: UITableViewController {
let logOutAction = UIContextualAction(
style: .destructive,
title: NSLocalizedString("identities.log-out", comment: "")) { [weak self] _, _, completionHandler in
guard let self = self, case let .identitiy(identity) = self.dataSource.itemIdentifier(for: indexPath) else {
guard let self = self, case let .identity(identity) = self.dataSource.itemIdentifier(for: indexPath) else {
completionHandler(false)

return
Expand Down
4 changes: 2 additions & 2 deletions View Controllers/TableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,12 @@ class TableViewController: UITableViewController {
navigationItem.rightBarButtonItem = nil
case .expand:
navigationItem.rightBarButtonItem = UIBarButtonItem(
title: NSLocalizedString("status.show-more-all-button.accessibilty-label", comment: ""),
title: NSLocalizedString("status.show-more-all-button.accessibility-label", comment: ""),
image: UIImage(systemName: "eye"),
primaryAction: UIAction { [weak self] _ in self?.viewModel.toggleExpandAll() })
case .collapse:
navigationItem.rightBarButtonItem = UIBarButtonItem(
title: NSLocalizedString("status.show-less-all-button.accessibilty-label", comment: ""),
title: NSLocalizedString("status.show-less-all-button.accessibility-label", comment: ""),
image: UIImage(systemName: "eye.slash"),
primaryAction: UIAction { [weak self] _ in self?.viewModel.toggleExpandAll() })
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ extension Date {
if
let oneWeekAgo = calendar.date(byAdding: DateComponents(weekOfMonth: -1), to: now),
oneWeekAgo < self {
return Self.realtiveTimeFormatter.localizedString(for: self, relativeTo: Date())
return Self.relativeTimeFormatter.localizedString(for: self, relativeTo: Date())
}

return Self.accessibilityFullDateComponentsFormatter.string(from: self)
Expand Down Expand Up @@ -92,7 +92,7 @@ private extension Date {
return dateFormatter
}()

private static let realtiveTimeFormatter: RelativeDateTimeFormatter = {
private static let relativeTimeFormatter: RelativeDateTimeFormatter = {
let dateFormatter = RelativeDateTimeFormatter()

dateFormatter.unitsStyle = .full
Expand Down
2 changes: 1 addition & 1 deletion Views/SwiftUI/PreferencesView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct PreferencesView: View {
Toggle("preferences.use-preferences-from-server",
isOn: $viewModel.preferences.useServerPostingReadingPreferences)
Group {
Picker("preferences.posting-default-visiblility",
Picker("preferences.posting-default-visibility",
selection: $viewModel.preferences.postingDefaultVisibility) {
Text("status.visibility.public").tag(Status.Visibility.public)
Text("status.visibility.unlisted").tag(Status.Visibility.unlisted)
Expand Down