Преглед изворни кода

Merge pull request #2236 from FlyingCaiChong/dev-fix

fix some typo
Wei Wang пре 1 година
родитељ
комит
20aa5f2d29

+ 1 - 1
Sources/Cache/DiskStorage.swift

@@ -467,7 +467,7 @@ extension DiskStorage {
 
 
         /// Default is `false`
         /// Default is `false`
         /// If set to `true`, image extension will be extracted from original file name and append to
         /// If set to `true`, image extension will be extracted from original file name and append to
-        /// the hased file name and used as the cache key on disk.
+        /// the hashed file name and used as the cache key on disk.
         public var autoExtAfterHashedFileName = false
         public var autoExtAfterHashedFileName = false
         
         
         /// Closure that takes in initial directory path and generates
         /// Closure that takes in initial directory path and generates

+ 2 - 2
Sources/Cache/ImageCache.swift

@@ -548,7 +548,7 @@ open class ImageCache {
     ///                        will be sent to this closure as result. Otherwise, a `KingfisherError` result
     ///                        will be sent to this closure as result. Otherwise, a `KingfisherError` result
     ///                        with detail failing reason will be sent.
     ///                        with detail failing reason will be sent.
     ///
     ///
-    /// Note: This method is marked as `open` for only compatible purpose. Do not overide this method. Instead, override
+    /// Note: This method is marked as `open` for only compatible purpose. Do not override this method. Instead, override
     ///       the version receives `KingfisherParsedOptionsInfo` instead.
     ///       the version receives `KingfisherParsedOptionsInfo` instead.
     open func retrieveImage(forKey key: String,
     open func retrieveImage(forKey key: String,
                                options: KingfisherOptionsInfo? = nil,
                                options: KingfisherOptionsInfo? = nil,
@@ -585,7 +585,7 @@ open class ImageCache {
     /// - Returns: The image stored in memory cache, if exists and valid. Otherwise, if the image does not exist or
     /// - Returns: The image stored in memory cache, if exists and valid. Otherwise, if the image does not exist or
     ///            has already expired, `nil` is returned.
     ///            has already expired, `nil` is returned.
     ///
     ///
-    /// Note: This method is marked as `open` for only compatible purpose. Do not overide this method. Instead, override
+    /// Note: This method is marked as `open` for only compatible purpose. Do not override this method. Instead, override
     ///       the version receives `KingfisherParsedOptionsInfo` instead.
     ///       the version receives `KingfisherParsedOptionsInfo` instead.
     open func retrieveImageInMemoryCache(
     open func retrieveImageInMemoryCache(
         forKey key: String,
         forKey key: String,

+ 1 - 1
Sources/General/ImageSource/ImageDataProvider.swift

@@ -172,7 +172,7 @@ public struct RawImageDataProvider: ImageDataProvider {
     /// Creates an image data provider by the given raw `data` value and a `cacheKey` be used in Kingfisher cache.
     /// Creates an image data provider by the given raw `data` value and a `cacheKey` be used in Kingfisher cache.
     ///
     ///
     /// - Parameters:
     /// - Parameters:
-    ///   - data: The raw data reprensents an image.
+    ///   - data: The raw data represents an image.
     ///   - cacheKey: The key is used for caching the image data. You need a different key for any different image.
     ///   - cacheKey: The key is used for caching the image data. You need a different key for any different image.
     public init(data: Data, cacheKey: String) {
     public init(data: Data, cacheKey: String) {
         self.data = data
         self.data = data

+ 1 - 1
Sources/General/KFOptionsSetter.swift

@@ -247,7 +247,7 @@ extension KFOptionSetter {
     /// - Returns: A `Self` value with changes applied.
     /// - Returns: A `Self` value with changes applied.
     /// If set, options will be passed the store operation for a new files.
     /// If set, options will be passed the store operation for a new files.
     ///
     ///
-    /// This is useful if you want to implement file enctyption on first write - eg [.completeFileProtection]
+    /// This is useful if you want to implement file encryption on first write - eg [.completeFileProtection]
     ///
     ///
     public func diskStoreWriteOptions(_ writingOptions: Data.WritingOptions) -> Self {
     public func diskStoreWriteOptions(_ writingOptions: Data.WritingOptions) -> Self {
         options.diskStoreWriteOptions = writingOptions
         options.diskStoreWriteOptions = writingOptions

+ 1 - 1
Sources/General/KingfisherError.swift

@@ -459,7 +459,7 @@ extension KingfisherError.ImageSettingErrorReason {
         case .dataProviderError(let provider, let error):
         case .dataProviderError(let provider, let error):
             return "Image data provider fails to provide data. Provider: \(provider), error: \(error)"
             return "Image data provider fails to provide data. Provider: \(provider), error: \(error)"
         case .alternativeSourcesExhausted(let errors):
         case .alternativeSourcesExhausted(let errors):
-            return "Image setting from alternaive sources failed: \(errors)"
+            return "Image setting from alternative sources failed: \(errors)"
         }
         }
     }
     }
     
     

+ 1 - 1
Sources/General/KingfisherManager.swift

@@ -58,7 +58,7 @@ public struct RetrieveImageResult {
     /// Gets the data behind the result.
     /// Gets the data behind the result.
     ///
     ///
     /// If this result is from a network downloading (when `cacheType == .none`), calling this returns the downloaded
     /// If this result is from a network downloading (when `cacheType == .none`), calling this returns the downloaded
-    /// data. If the reuslt is from cache, it serializes the image with the given cache serializer in the loading option
+    /// data. If the result is from cache, it serializes the image with the given cache serializer in the loading option
     /// and returns the result.
     /// and returns the result.
     ///
     ///
     /// - Note:
     /// - Note:

+ 2 - 2
Sources/Networking/ImagePrefetcher.swift

@@ -303,7 +303,7 @@ public class ImagePrefetcher: CustomStringConvertible {
         }
         }
     }
     }
 
 
-    /// Stops current downloading progress, and cancel any future prefetching activity that might be occuring.
+    /// Stops current downloading progress, and cancel any future prefetching activity that might be occurring.
     public func stop() {
     public func stop() {
         prefetchQueue.async {
         prefetchQueue.async {
             if self.finished { return }
             if self.finished { return }
@@ -409,7 +409,7 @@ public class ImagePrefetcher: CustomStringConvertible {
     
     
     private func reportCompletionOrStartNext() {
     private func reportCompletionOrStartNext() {
         if let resource = self.pendingSources.popFirst() {
         if let resource = self.pendingSources.popFirst() {
-            // Loose call stack for huge ammount of sources.
+            // Loose call stack for huge amount of sources.
             prefetchQueue.async { self.startPrefetching(resource) }
             prefetchQueue.async { self.startPrefetching(resource) }
         } else {
         } else {
             guard allFinished else { return }
             guard allFinished else { return }

+ 1 - 1
Sources/Networking/RedirectHandler.swift

@@ -30,7 +30,7 @@ import Foundation
 public protocol ImageDownloadRedirectHandler {
 public protocol ImageDownloadRedirectHandler {
 
 
     /// The `ImageDownloadRedirectHandler` contained will be used to change the request before redirection.
     /// The `ImageDownloadRedirectHandler` contained will be used to change the request before redirection.
-    /// This is the posibility you can modify the image download request during redirection. You can modify the
+    /// This is the possibility you can modify the image download request during redirection. You can modify the
     /// request for some customizing purpose, such as adding auth token to the header, do basic HTTP auth or
     /// request for some customizing purpose, such as adding auth token to the header, do basic HTTP auth or
     /// something like url mapping.
     /// something like url mapping.
     ///
     ///

+ 2 - 2
Sources/Views/AnimatedImageView.swift

@@ -1,10 +1,10 @@
 //
 //
-//  AnimatableImageView.swift
+//  AnimatedImageView.swift
 //  Kingfisher
 //  Kingfisher
 //
 //
 //  Created by bl4ckra1sond3tre on 4/22/16.
 //  Created by bl4ckra1sond3tre on 4/22/16.
 //
 //
-//  The AnimatableImageView, AnimatedFrame and Animator is a modified version of 
+//  The AnimatedImageView, AnimatedFrame and Animator is a modified version of 
 //  some classes from kaishin's Gifu project (https://github.com/kaishin/Gifu)
 //  some classes from kaishin's Gifu project (https://github.com/kaishin/Gifu)
 //
 //
 //  The MIT License (MIT)
 //  The MIT License (MIT)

+ 2 - 2
Tests/Dependency/Nocilla/README.md

@@ -112,7 +112,7 @@ stubRequest(@"GET", @"http://www.google.com").andReturn(404);
 ```
 ```
 
 
 #### Returning a specific status code and header
 #### Returning a specific status code and header
-The same approch here, you can use `withHeader` or `withHeaders`
+The same approach here, you can use `withHeader` or `withHeaders`
 
 
 ```objc
 ```objc
 stubRequest(@"POST", @"https://api.example.com/dogs.json").
 stubRequest(@"POST", @"https://api.example.com/dogs.json").
@@ -184,7 +184,7 @@ If some request is made but it wasn't stubbed, Nocilla won't let that request hi
 At this moment Nocilla will raise an exception with a meaningful message about the error and how to solve it, including a snippet of code on how to stub the unexpected request.
 At this moment Nocilla will raise an exception with a meaningful message about the error and how to solve it, including a snippet of code on how to stub the unexpected request.
 
 
 ### Testing asynchronous requests
 ### Testing asynchronous requests
-When testing asynchrounous requests your request will be sent on a different thread from the one on which your test is executed. It is important to keep this in mind, and design your test in such a way that is has enough time to finish. For instance  ```tearDown()``` when using ```XCTest``` and ```afterEach()``` when using [Quick](https://github.com/Quick/Quick) and [Nimble](https://github.com/Quick/Nimble) will cause the request never to complete.
+When testing asynchronous requests your request will be sent on a different thread from the one on which your test is executed. It is important to keep this in mind, and design your test in such a way that is has enough time to finish. For instance  ```tearDown()``` when using ```XCTest``` and ```afterEach()``` when using [Quick](https://github.com/Quick/Quick) and [Nimble](https://github.com/Quick/Nimble) will cause the request never to complete.
 
 
 
 
 ## Who uses Nocilla.
 ## Who uses Nocilla.