|
1 | 1 | import FirebaseAuth |
2 | 2 | import SwiftUI |
3 | 3 |
|
4 | | -// Auth Picker (not signed-in) |
5 | | -let kAuthPickerTitle = "AuthPickerTitle" |
6 | | - |
7 | | -// Used across multiple Views |
8 | | -let kEnterYourEmail = "EnterYourEmail" |
9 | | -let kEnterYourPassword = "EnterYourPassword" |
10 | | -let kOK = "OK" |
11 | | -let kBack = "Back" |
12 | | - |
13 | | -// Signed-in |
14 | | -let kSignedInTitle = "SignedIn" |
15 | | - |
16 | | -let kForgotPasswordButtonLabel = "ForgotPasswordTitle" |
17 | | -let kForgotPasswordInputLabel = "ForgotPassword" |
18 | | - |
19 | | -// Password recovery |
20 | | -let kPasswordRecoveryTitle = "PasswordRecoveryTitle" |
21 | | -let kPasswordRecoveryEmailSentTitle = "PasswordRecoveryEmailSentTitle" |
22 | | -let kPasswordRecoveryMessage = "PasswordRecoveryMessage" |
23 | | -let kPasswordRecoveryEmailSentMessage = "PasswordRecoveryEmailSentMessage" |
24 | | - |
25 | 4 | let kKeyNotFound = "Key not found" |
26 | 5 |
|
27 | 6 | // Errors |
@@ -84,84 +63,84 @@ public class StringUtils { |
84 | 63 | /// found in: |
85 | 64 | /// - AuthPickerView |
86 | 65 | public var authPickerTitle: String { |
87 | | - return localizedString(for: kAuthPickerTitle) |
| 66 | + return localizedString(for: "AuthPickerTitle") |
88 | 67 | } |
89 | 68 |
|
90 | 69 | /// Email input label |
91 | 70 | /// found in: |
92 | 71 | /// - EmailAuthView |
93 | 72 | /// - PasswordRecoveryView |
94 | 73 | public var emailInputLabel: String { |
95 | | - return localizedString(for: kEnterYourEmail) |
| 74 | + return localizedString(for: "EnterYourEmail") |
96 | 75 | } |
97 | 76 |
|
98 | 77 | /// Password button action label |
99 | 78 | /// found in: |
100 | 79 | /// - EmailAuthView |
101 | 80 | public var passwordButtonLabel: String { |
102 | | - return localizedString(for: kForgotPasswordButtonLabel) |
| 81 | + return localizedString(for: "ForgotPasswordTitle") |
103 | 82 | } |
104 | 83 |
|
105 | 84 | /// Password input label |
106 | 85 | /// found in: |
107 | 86 | /// - EmailAuthView |
108 | 87 | public var passwordInputLabel: String { |
109 | | - return localizedString(for: kEnterYourPassword) |
| 88 | + return localizedString(for: "EnterYourPassword") |
110 | 89 | } |
111 | 90 |
|
112 | 91 | /// Password recovery title |
113 | 92 | /// found in: |
114 | 93 | /// - PasswordRecoveryView |
115 | 94 | public var passwordRecoveryTitle: String { |
116 | | - return localizedString(for: kPasswordRecoveryTitle) |
| 95 | + return localizedString(for: "PasswordRecoveryTitle") |
117 | 96 | } |
118 | 97 |
|
119 | 98 | /// Password recovery email sent title |
120 | 99 | /// found in: |
121 | 100 | /// - PasswordRecoveryView |
122 | 101 | public var passwordRecoveryEmailSentTitle: String { |
123 | | - return localizedString(for: kPasswordRecoveryEmailSentTitle) |
| 102 | + return localizedString(for: "PasswordRecoveryEmailSentTitle") |
124 | 103 | } |
125 | 104 |
|
126 | 105 | /// Password recovery helper message |
127 | 106 | /// found in: |
128 | 107 | /// - PasswordRecoveryView |
129 | 108 | public var passwordRecoveryHelperMessage: String { |
130 | | - return localizedString(for: kPasswordRecoveryMessage) |
| 109 | + return localizedString(for: "PasswordRecoveryMessage") |
131 | 110 | } |
132 | 111 |
|
133 | 112 | /// Password recovery email sent message |
134 | 113 | /// found in: |
135 | 114 | /// - PasswordRecoveryView |
136 | 115 | public var passwordRecoveryEmailSentMessage: String { |
137 | | - return localizedString(for: kPasswordRecoveryEmailSentMessage) |
| 116 | + return localizedString(for: "PasswordRecoveryEmailSentMessage") |
138 | 117 | } |
139 | 118 |
|
140 | 119 | /// Forgot password input label |
141 | 120 | /// found in: |
142 | 121 | /// - PasswordRecoveryView |
143 | 122 | public var forgotPasswordInputLabel: String { |
144 | | - return localizedString(for: kForgotPasswordInputLabel) |
| 123 | + return localizedString(for: "ForgotPassword") |
145 | 124 | } |
146 | 125 |
|
147 | 126 | /// Signed in title |
148 | 127 | /// found in: |
149 | 128 | /// - SignedInView |
150 | 129 | public var signedInTitle: String { |
151 | | - return localizedString(for: kSignedInTitle) |
| 130 | + return localizedString(for: "SignedIn") |
152 | 131 | } |
153 | 132 |
|
154 | 133 | /// General string - Back button label |
155 | 134 | /// found in: |
156 | 135 | /// - PasswordRecoveryView |
157 | 136 | public var backButtonLabel: String { |
158 | | - return localizedString(for: kBack) |
| 137 | + return localizedString(for: "Back") |
159 | 138 | } |
160 | 139 |
|
161 | 140 | /// General string - OK button label |
162 | 141 | /// found in: |
163 | 142 | /// - PasswordRecoveryView |
164 | 143 | public var okButtonLabel: String { |
165 | | - return localizedString(for: kOK) |
| 144 | + return localizedString(for: "OK") |
166 | 145 | } |
167 | 146 | } |
0 commit comments