File tree Expand file tree Collapse file tree 2 files changed +17
-13
lines changed Expand file tree Collapse file tree 2 files changed +17
-13
lines changed Original file line number Diff line number Diff line change @@ -21,18 +21,22 @@ extension unichar : ExpressibleByUnicodeScalarLiteral {
21
21
}
22
22
23
23
/// Returns a localized string, using the main bundle if one is not specified.
24
- public
25
- func NSLocalizedString( _ key: String ,
26
- tableName: String ? = nil ,
27
- bundle: Bundle = Bundle . main,
28
- value: String = " " ,
29
- comment: String ) -> String {
30
- #if os(Android)
31
- return key
32
- #else
33
- return bundle. localizedString ( forKey: key, value: value, table: tableName)
34
- #endif
24
+ #if os(Android)
25
+ public func NSLocalizedString( _ key: String ,
26
+ tableName: String ? = nil ,
27
+ value: String = " " ,
28
+ comment: String ) -> String {
29
+ return key
35
30
}
31
+ #else
32
+ public func NSLocalizedString( _ key: String ,
33
+ tableName: String ? = nil ,
34
+ bundle: Bundle = Bundle . main,
35
+ value: String = " " ,
36
+ comment: String ) -> String {
37
+ return bundle. localizedString ( forKey: key, value: value, table: tableName)
38
+ }
39
+ #endif
36
40
37
41
#if os(OSX) || os(iOS)
38
42
internal let kCFStringEncodingMacRoman = CFStringBuiltInEncodings . macRoman. rawValue
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ fileprivate extension _HTTPURLProtocol {
197
197
self ? . completeTask ( withError: urlError)
198
198
self ? . client? . urlProtocol ( self !, didFailWithError: urlError)
199
199
}
200
- guard let task = self . task else { fatalError ( ) }
200
+ guard let task = self . task else { fatalError ( ) }
201
201
easyHandle. timeoutTimer = _TimeoutSource ( queue: task. workQueue, milliseconds: timeoutInterval, handler: timeoutHandler)
202
202
203
203
easyHandle. set ( automaticBodyDecompression: true )
@@ -344,7 +344,7 @@ internal extension _HTTPURLProtocol {
344
344
NSURLErrorFailingURLErrorKey: $0,
345
345
NSURLErrorFailingURLStringErrorKey: $0. absoluteString,
346
346
NSLocalizedDescriptionKey: error. localizedDescription
347
- ]
347
+ ]
348
348
}
349
349
let urlError = URLError ( _nsError: NSError ( domain: NSURLErrorDomain, code: error. code, userInfo: userInfo) )
350
350
completeTask ( withError: urlError)
You can’t perform that action at this time.
0 commit comments