mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
fix: fixed some typo (#1373)
This commit is contained in:
@@ -165,8 +165,8 @@ public class BarChart: WidgetWrapper {
|
||||
var y = offset
|
||||
for a in 0..<self.value[i].count {
|
||||
let partitionValue = self.value[i][a]
|
||||
let partitonHeight = maxPartitionHeight * CGFloat(partitionValue.value)
|
||||
let partition = NSBezierPath(rect: NSRect(x: x, y: y, width: partitionWidth, height: partitonHeight))
|
||||
let partitionHeight = maxPartitionHeight * CGFloat(partitionValue.value)
|
||||
let partition = NSBezierPath(rect: NSRect(x: x, y: y, width: partitionWidth, height: partitionHeight))
|
||||
|
||||
if partitionValue.color == nil {
|
||||
switch self.colorState {
|
||||
@@ -189,7 +189,7 @@ public class BarChart: WidgetWrapper {
|
||||
partition.fill()
|
||||
partition.close()
|
||||
|
||||
y += partitonHeight
|
||||
y += partitionHeight
|
||||
}
|
||||
|
||||
x += partitionWidth + partitionMargin
|
||||
|
||||
@@ -531,7 +531,7 @@ public class MenuBarView: NSView {
|
||||
if let view = self.subviews.first(where: { $0.identifier == NSUserInterfaceItemIdentifier(type.rawValue) }) {
|
||||
view.removeFromSuperview()
|
||||
} else {
|
||||
error("\(type) cound not be removed from the one view bacause not found!")
|
||||
error("\(type) could not be removed from the one view because not found!")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -216,17 +216,17 @@ public class Updater {
|
||||
var toPath = to
|
||||
let fileName = (URL(fileURLWithPath: to.absoluteString)).lastPathComponent
|
||||
let fileExt = (URL(fileURLWithPath: to.absoluteString)).pathExtension
|
||||
var fileNameWithotSuffix: String!
|
||||
var fileNameWithoutSuffix: String!
|
||||
var newFileName: String!
|
||||
var counter = 0
|
||||
|
||||
if fileName.hasSuffix(fileExt) {
|
||||
fileNameWithotSuffix = String(fileName.prefix(fileName.count - (fileExt.count+1)))
|
||||
fileNameWithoutSuffix = String(fileName.prefix(fileName.count - (fileExt.count+1)))
|
||||
}
|
||||
|
||||
while toPath.checkFileExist() {
|
||||
counter += 1
|
||||
newFileName = "\(fileNameWithotSuffix!)-\(counter).\(fileExt)"
|
||||
newFileName = "\(fileNameWithoutSuffix!)-\(counter).\(fileExt)"
|
||||
toPath = to.deletingLastPathComponent().appendingPathComponent(newFileName)
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ import platform
|
||||
|
||||
class UsageException (Exception):
|
||||
"""
|
||||
Raised when the progam detects a usage issue; the top-level code catches this
|
||||
Raised when the program detects a usage issue; the top-level code catches this
|
||||
and prints a usage message.
|
||||
"""
|
||||
pass
|
||||
|
||||
@@ -32,7 +32,7 @@ internal class Popup: PopupWrapper {
|
||||
|
||||
private var localIPField: ValueField? = nil
|
||||
private var interfaceField: ValueField? = nil
|
||||
private var macAdressField: ValueField? = nil
|
||||
private var macAddressField: ValueField? = nil
|
||||
private var totalUploadField: ValueField? = nil
|
||||
private var totalDownloadField: ValueField? = nil
|
||||
private var statusField: ValueField? = nil
|
||||
@@ -215,11 +215,11 @@ internal class Popup: PopupWrapper {
|
||||
self.channelField = popupRow(container, n: 0, title: "\(localizedString("Channel")):", value: localizedString("Unknown")).1
|
||||
|
||||
self.interfaceField = popupRow(container, n: 0, title: "\(localizedString("Interface")):", value: localizedString("Unknown")).1
|
||||
self.macAdressField = popupRow(container, n: 0, title: "\(localizedString("Physical address")):", value: localizedString("Unknown")).1
|
||||
self.macAddressField = popupRow(container, n: 0, title: "\(localizedString("Physical address")):", value: localizedString("Unknown")).1
|
||||
self.localIPField = popupRow(container, n: 0, title: "\(localizedString("Local IP")):", value: localizedString("Unknown")).1
|
||||
|
||||
self.localIPField?.isSelectable = true
|
||||
self.macAdressField?.isSelectable = true
|
||||
self.macAddressField?.isSelectable = true
|
||||
|
||||
view.addSubview(container)
|
||||
|
||||
@@ -329,10 +329,10 @@ internal class Popup: PopupWrapper {
|
||||
|
||||
if let interface = value.interface {
|
||||
self.interfaceField?.stringValue = "\(interface.displayName) (\(interface.BSDName))"
|
||||
self.macAdressField?.stringValue = interface.address
|
||||
self.macAddressField?.stringValue = interface.address
|
||||
} else {
|
||||
self.interfaceField?.stringValue = localizedString("Unknown")
|
||||
self.macAdressField?.stringValue = localizedString("Unknown")
|
||||
self.macAddressField?.stringValue = localizedString("Unknown")
|
||||
}
|
||||
|
||||
if value.connectionType == .wifi {
|
||||
|
||||
@@ -18,7 +18,7 @@ extension AppDelegate {
|
||||
let args = CommandLine.arguments
|
||||
|
||||
if args.contains("--reset") {
|
||||
debug("Receive --reset argument. Reseting store (UserDefaults)...")
|
||||
debug("Receive --reset argument. Resetting store (UserDefaults)...")
|
||||
Store.shared.reset()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user