@@ -3,7 +3,6 @@ import SwiftUI
33
44let kKeyNotFound = " Key not found "
55
6-
76public class StringUtils {
87 let bundle : Bundle
98 init ( bundle: Bundle ) {
@@ -17,37 +16,37 @@ public class StringUtils {
1716 }
1817
1918 public func localizedErrorMessage( for error: Error ) -> String {
20- let authError = error as NSError
21- let errorCode = AuthErrorCode ( rawValue: authError. code)
22- switch errorCode {
23- case . emailAlreadyInUse:
24- return localizedString (
25- for: " EmailAlreadyInUseError "
26- )
27- case . invalidEmail:
28- return localizedString ( for: " InvalidEmailError " )
29- case . weakPassword:
30- return localizedString ( for: " WeakPasswordError " )
31- case . tooManyRequests:
32- return localizedString (
33- for: " SignUpTooManyTimesError "
34- )
35- case . wrongPassword:
36- return localizedString (
37- for: " WrongPasswordError "
38- )
39- case . userNotFound:
40- return localizedString (
41- for: " UserNotFoundError "
42- )
43- case . userDisabled:
44- return localizedString (
45- for: " AccountDisabledError "
46- )
47- default :
48- return error. localizedDescription
49- }
19+ let authError = error as NSError
20+ let errorCode = AuthErrorCode ( rawValue: authError. code)
21+ switch errorCode {
22+ case . emailAlreadyInUse:
23+ return localizedString (
24+ for: " EmailAlreadyInUseError "
25+ )
26+ case . invalidEmail:
27+ return localizedString ( for: " InvalidEmailError " )
28+ case . weakPassword:
29+ return localizedString ( for: " WeakPasswordError " )
30+ case . tooManyRequests:
31+ return localizedString (
32+ for: " SignUpTooManyTimesError "
33+ )
34+ case . wrongPassword:
35+ return localizedString (
36+ for: " WrongPasswordError "
37+ )
38+ case . userNotFound:
39+ return localizedString (
40+ for: " UserNotFoundError "
41+ )
42+ case . userDisabled:
43+ return localizedString (
44+ for: " AccountDisabledError "
45+ )
46+ default :
47+ return error. localizedDescription
5048 }
49+ }
5150
5251 /// Auth Picker title
5352 /// found in:
@@ -191,7 +190,7 @@ public class StringUtils {
191190 public var signOutButtonLabel : String {
192191 return localizedString ( for: " AS_SignOut " )
193192 }
194-
193+
195194 /// Account settings - update password button label
196195 /// found in:
197196 /// SignedInView
@@ -212,7 +211,6 @@ public class StringUtils {
212211 public var verifyEmailSheetMessage : String {
213212 return localizedString ( for: " Verification email sent " )
214213 }
215-
216214
217215 /// General string - Back button label
218216 /// found in:
@@ -237,4 +235,39 @@ public class StringUtils {
237235 public var cancelButtonLabel : String {
238236 return localizedString ( for: " Cancel " )
239237 }
238+
239+ /// Facebook provider
240+ /// found in:
241+ /// - SignInWithFacebookButton
242+ public var facebookLoginButtonLabel : String {
243+ return localizedString ( for: " Continue with Facebook " )
244+ }
245+
246+ /// Facebook provider
247+ /// found in:
248+ /// - SignInWithFacebookButton
249+ public var facebookLoginCancelledLabel : String {
250+ return localizedString ( for: " Facebook login cancelled " )
251+ }
252+
253+ /// Facebook provider
254+ /// found in:
255+ /// - SignInWithFacebookButton
256+ public var authorizeUserTrackingLabel : String {
257+ return localizedString ( for: " Authorize User Tracking " )
258+ }
259+
260+ /// Facebook provider
261+ /// found in:
262+ /// - SignInWithFacebookButton
263+ public var facebookLimitedLoginLabel : String {
264+ return localizedString ( for: " Limited Login " )
265+ }
266+
267+ /// Facebook provider
268+ /// found in:
269+ /// - SignInWithFacebookButton
270+ public var facebookAuthorizeUserTrackingMessage : String {
271+ return localizedString ( for: " For classic Facebook login, please authorize user tracking. " )
272+ }
240273}
0 commit comments