File tree Expand file tree Collapse file tree 3 files changed +50
-6
lines changed
FirebaseSwiftUI/FirebaseAuthSwiftUI/Sources Expand file tree Collapse file tree 3 files changed +50
-6
lines changed Original file line number Diff line number Diff line change 329329
330330 },
331331 "Don't have an account yet?" : {
332-
332+ "localizations" : {
333+ "en" : {
334+ "stringUnit" : {
335+ "state" : "translated",
336+ "value" : "Don't have an account yet?"
337+ }
338+ }
339+ }
333340 },
334341 "EditEmailTitle" : {
335342 "comment" : "Controller title shown when editing account email. Use short/abbreviated translation for 'email' which is less than 15 chars.",
554561
555562 },
556563 "Login" : {
557-
564+ "localizations" : {
565+ "en" : {
566+ "stringUnit" : {
567+ "state" : "translated",
568+ "value" : "Login"
569+ }
570+ }
571+ }
558572 },
559573 "Name" : {
560574 "comment" : "Label next to a name text field.",
Original file line number Diff line number Diff line change @@ -236,6 +236,34 @@ public class StringUtils {
236236 return localizedString ( for: " Cancel " )
237237 }
238238
239+ /// Email provider
240+ /// found in:
241+ /// - AuthPickerView
242+ public var emailLoginFlowLabel : String {
243+ return localizedString ( for: " Login " )
244+ }
245+
246+ /// Email provider
247+ /// found in:
248+ /// - AuthPickerView
249+ public var emailSignUpFlowLabel : String {
250+ return localizedString ( for: " Sign up " )
251+ }
252+
253+ /// Email provider
254+ /// found in:
255+ /// - AuthPickerView
256+ public var dontHaveAnAccountYetLabel : String {
257+ return localizedString ( for: " Don't have an account yet? " )
258+ }
259+
260+ /// Email provider
261+ /// found in:
262+ /// - AuthPickerView
263+ public var alreadyHaveAnAccountLabel : String {
264+ return localizedString ( for: " Already have an account? " )
265+ }
266+
239267 /// Facebook provider
240268 /// found in:
241269 /// - SignInWithFacebookButton
Original file line number Diff line number Diff line change @@ -29,21 +29,23 @@ extension AuthPickerView: View {
2929 } else if authService. authView == . emailLink {
3030 EmailLinkView ( )
3131 } else {
32- Text ( authService. authenticationFlow == . login ? " Login " : " Sign up " )
32+ Text ( authService. authenticationFlow == . login ? authService. string
33+ . emailLoginFlowLabel : authService. string. emailSignUpFlowLabel)
3334 VStack { Divider ( ) }
3435 EmailAuthView ( )
3536 authService. renderButtons ( )
3637 VStack { Divider ( ) }
3738 HStack {
3839 Text ( authService
39- . authenticationFlow == . login ? " Don't have an account yet? " :
40- " Already have an account? " )
40+ . authenticationFlow == . login ? authService . string . dontHaveAnAccountYetLabel :
41+ authService . string . alreadyHaveAnAccountLabel )
4142 Button ( action: {
4243 withAnimation {
4344 switchFlow ( )
4445 }
4546 } ) {
46- Text ( authService. authenticationFlow == . signUp ? " Log in " : " Sign up " )
47+ Text ( authService. authenticationFlow == . signUp ? authService. string
48+ . emailLoginFlowLabel : authService. string. emailSignUpFlowLabel)
4749 . fontWeight ( . semibold)
4850 . foregroundColor ( . blue)
4951 }
You can’t perform that action at this time.
0 commit comments