Enable SwiftLint rule 'nslocalizedstring_key' and fix all violations
This commit is contained in:
parent
77216abe14
commit
92123448a4
2 changed files with 2 additions and 1 deletions
|
|
@ -110,7 +110,7 @@ whitelist_rules:
|
||||||
# - no_grouping_extension
|
# - no_grouping_extension
|
||||||
- no_space_in_method_call
|
- no_space_in_method_call
|
||||||
- notification_center_detachment
|
- notification_center_detachment
|
||||||
# - nslocalizedstring_key
|
- nslocalizedstring_key
|
||||||
# - nslocalizedstring_require_bundle
|
# - nslocalizedstring_require_bundle
|
||||||
- nsobject_prefer_isequal
|
- nsobject_prefer_isequal
|
||||||
# - number_separator
|
# - number_separator
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
extension String {
|
extension String {
|
||||||
public func localize() -> String {
|
public func localize() -> String {
|
||||||
|
// swiftlint:disable:next nslocalizedstring_key
|
||||||
NSLocalizedString(self, value: "#\(self)#", comment: "")
|
NSLocalizedString(self, value: "#\(self)#", comment: "")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue