Enable SwiftLint rule 'nslocalizedstring_require_bundle' and fix all violations
This commit is contained in:
parent
92123448a4
commit
b032ed2df3
2 changed files with 2 additions and 2 deletions
|
|
@ -111,7 +111,7 @@ whitelist_rules:
|
|||
- no_space_in_method_call
|
||||
- notification_center_detachment
|
||||
- nslocalizedstring_key
|
||||
# - nslocalizedstring_require_bundle
|
||||
- nslocalizedstring_require_bundle
|
||||
- nsobject_prefer_isequal
|
||||
# - number_separator
|
||||
- object_literal
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
extension String {
|
||||
public func localize() -> String {
|
||||
// swiftlint:disable:next nslocalizedstring_key
|
||||
NSLocalizedString(self, value: "#\(self)#", comment: "")
|
||||
NSLocalizedString(self, bundle: Bundle.main, value: "#\(self)#", comment: "")
|
||||
}
|
||||
|
||||
public func localize(_ firstValue: CVarArg) -> String {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue