Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit f664a6b

Browse files
committed
Address SwiftLint violations regarding NSLocalizedStrings
1 parent edbe1ef commit f664a6b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

WordPressAuthenticator/Signin/LoginWPComViewController.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,10 @@ class LoginWPComViewController: LoginViewController, NUXKeyboardResponder {
142142
return NSLocalizedString("To proceed with this Google account, please first log in with your WordPress.com password. This will only be asked once.", comment: "")
143143
}
144144

145-
return NSLocalizedString("Please enter the password for your WordPress.com account to log in with your Apple ID.", comment: "")
145+
return NSLocalizedString(
146+
"Please enter the password for your WordPress.com account to log in with your Apple ID.",
147+
comment: "Instructional text shown when requesting the user's password for a login initiated via Sign In with Apple"
148+
)
146149
}()
147150

148151
passwordField?.placeholder = NSLocalizedString("Password", comment: "Password placeholder")

WordPressAuthenticator/Unified Auth/View Related/Password/PasswordViewController.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,9 @@ class PasswordViewController: LoginViewController {
145145
// is the actual error string. So check for "password" in the error string, and show the custom
146146
// error message. Otherwise, show the actual response error.
147147
var displayMessage: String {
148+
// swiftlint:disable localization_comment
148149
if nsError.localizedDescription.contains(NSLocalizedString("password", comment: "")) {
150+
// swiftlint:enable localization_comment
149151
return NSLocalizedString("It seems like you've entered an incorrect password. Want to give it another try?", comment: "An error message shown when a wpcom user provides the wrong password.")
150152
}
151153
return nsError.localizedDescription

0 commit comments

Comments
 (0)