Skip to content

Commit ab7a3bd

Browse files
authored
Merge pull request #3643 from rex4539/typos
Fix typos
2 parents f08ccb8 + 1dfbcfe commit ab7a3bd

File tree

109 files changed

+166
-166
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+166
-166
lines changed

iina/AutoFileMatcher.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -253,16 +253,16 @@ class AutoFileMatcher {
253253
.components(separatedBy: ",")
254254
.map { $0.trimmingCharacters(in: .whitespacesAndNewlines) }
255255
.filter { !$0.isEmpty }
256-
// find the min occurance count first
257-
var minOccurances = Int.max
256+
// find the min occurrence count first
257+
var minOccurrences = Int.max
258258
matchedSubs.forEach { sub in
259-
sub.priorityStringOccurances = stringList.reduce(0, { $0 + sub.filename.countOccurances(of: $1, in: nil) })
260-
if sub.priorityStringOccurances < minOccurances {
261-
minOccurances = sub.priorityStringOccurances
259+
sub.priorityStringOccurrences = stringList.reduce(0, { $0 + sub.filename.countOccurrences(of: $1, in: nil) })
260+
if sub.priorityStringOccurrences < minOccurrences {
261+
minOccurrences = sub.priorityStringOccurrences
262262
}
263263
}
264264
try matchedSubs
265-
.filter { $0.priorityStringOccurances > minOccurances } // eliminate false positives in filenames
265+
.filter { $0.priorityStringOccurrences > minOccurrences } // eliminate false positives in filenames
266266
.compactMap { player.info.matchedSubs[video.path]!.firstIndex(of: $0.url) } // get index
267267
.forEach { // move the sub with index to first
268268
try checkTicket()

iina/Base.lproj/Localizable.strings

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
"alert.error_open" = "Cannot open file or stream!";
151151
"alert.error_finding_file" = "Cannot find %@ file!";
152152
"alert.error_loading_script" = "Cannot load script %@!";
153-
"alert.error_saving_file" = "Error occured when saving %@: %@";
153+
"alert.error_saving_file" = "Error occurred when saving %@: %@";
154154
"alert.error_deleting_file" = "Cannot delete the file.";
155155

156156
"alert.config.new.title" = "New Input Configuration";
@@ -164,7 +164,7 @@
164164
"alert.config.cannot_create" = "Cannot create config file!\n%@";
165165
"alert.config.cannot_write" = "Cannot write to config file!";
166166

167-
"alert.filter.incorrect" = "Error occured when setting filters. Please check your parameter format.";
167+
"alert.filter.incorrect" = "Error occurred when setting filters. Please check your parameter format.";
168168
"alert.add_filter.title" = "New Filter";
169169
"alert.add_filter.message" = "Please enter a filter string in format of mpv's vf or af command.";
170170

iina/Base.lproj/PrefGeneralViewController.xib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@
484484
</button>
485485
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="YDQ-cu-7vE">
486486
<rect key="frame" x="118" y="31" width="370" height="18"/>
487-
<buttonCell key="cell" type="check" title="Show artist and track name for audio files when avaliable" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="kBI-Th-bBV">
487+
<buttonCell key="cell" type="check" title="Show artist and track name for audio files when available" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="kBI-Th-bBV">
488488
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
489489
<font key="font" metaFont="system"/>
490490
</buttonCell>

iina/CollapseView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ class CollapseView: NSStackView {
3434
}
3535

3636
// try to get the state of the control
37-
if let buttton = trigger as? NSButton {
38-
folded = buttton.state != .on
37+
if let button = trigger as? NSButton {
38+
folded = button.state != .on
3939
}
4040
updateContentView(animated: false)
4141

iina/DraggingDetect.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ extension PlayerCore {
9494
}
9595

9696
/**
97-
Checks whether a URL is BD folder by checking the existance of "MovieObject.bdmv" and "index.bdmv".
97+
Checks whether a URL is BD folder by checking the existence of "MovieObject.bdmv" and "index.bdmv".
9898

9999
- Parameters:
100100
- url: The URL.

iina/Extensions.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import Cocoa
1010

1111
extension NSSlider {
12-
/** Returns the positon of knob center by point */
12+
/** Returns the position of knob center by point */
1313
func knobPointPosition() -> CGFloat {
1414
let sliderOrigin = frame.origin.x + knobThickness / 2
1515
let sliderWidth = frame.width - knobThickness
@@ -420,10 +420,10 @@ extension String {
420420
removeLast(Swift.min(num, count))
421421
}
422422

423-
func countOccurances(of str: String, in range: Range<Index>?) -> Int {
423+
func countOccurrences(of str: String, in range: Range<Index>?) -> Int {
424424
if let firstRange = self.range(of: str, options: [], range: range, locale: nil) {
425425
let nextRange = firstRange.upperBound..<self.endIndex
426-
return 1 + countOccurances(of: str, in: nextRange)
426+
return 1 + countOccurrences(of: str, in: nextRange)
427427
} else {
428428
return 0
429429
}

iina/FileGroup.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class FileInfo: Hashable {
2121
var dist: [FileInfo: UInt] = [:]
2222
var minDist: [FileInfo] = []
2323
var relatedSubs: [FileInfo] = []
24-
var priorityStringOccurances = 0
24+
var priorityStringOccurrences = 0
2525
var isMatched = false
2626

2727
var prefix: String { // prefix detected by FileGroup

iina/FilterPresets.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Foundation
1111
fileprivate typealias PM = FilterParameter
1212

1313
/**
14-
A filter preset or tamplate, which contains the filter name and definitions of all parameters.
14+
A filter preset or template, which contains the filter name and definitions of all parameters.
1515
*/
1616
class FilterPreset {
1717
typealias Transformer = (FilterPresetInstance) -> MPVFilter

iina/FilterWindowController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ class FilterWindowController: NSWindowController, NSWindowDelegate {
176176
let savedFilter = savedFilters[row]
177177
let pc = PlayerCore.active
178178

179-
// choose approriate add/remove functions for .af/.vf
179+
// choose appropriate add/remove functions for .af/.vf
180180
var addFilterFunction: (MPVFilter) -> Bool
181181
var removeFilterFunction: (MPVFilter) -> Bool
182182
if filterType == MPVProperty.vf {

iina/KeyMapping.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class KeyMapping: NSObject {
120120
isIINACommand = true
121121
line = String(line[line.index(line.startIndex, offsetBy: "#@iina".count)...])
122122
} else if line.hasPrefix("#") {
123-
// igore comment
123+
// ignore comment
124124
continue
125125
}
126126
// remove inline comment

0 commit comments

Comments
 (0)