Translations

multistore
Laurent 1 year ago
parent dc3815829d
commit b6b0dd8fd3
  1. 8
      PadelClub/Views/Subscription/Guard.swift
  2. 2
      PadelClub/Views/Subscription/SubscriptionInfoView.swift
  3. 4
      PadelClub/Views/User/AccountView.swift
  4. 4
      PadelClub/Views/User/ChangePasswordView.swift
  5. 16
      PadelClub/Views/User/LoginView.swift
  6. 20
      PadelClub/Views/User/UserCreationView.swift

@ -145,14 +145,14 @@ import LeStorage
} }
var currentPlan: StoreItem? { var currentPlan: StoreItem? {
#if DEBUG // #if DEBUG
return .monthlyUnlimited // return .monthlyUnlimited
#else // #else
if let currentBestPlan = self.currentBestPlan, let plan = StoreItem(rawValue: currentBestPlan.productID) { if let currentBestPlan = self.currentBestPlan, let plan = StoreItem(rawValue: currentBestPlan.productID) {
return plan return plan
} }
return nil return nil
#endif // #endif
} }
func userFilteredPurchases() -> [StoreKit.Transaction] { func userFilteredPurchases() -> [StoreKit.Transaction] {

@ -53,5 +53,5 @@ struct NoPaymentTip: Tip {
} }
#Preview { #Preview {
SubscriptionInfoView() SubscriptionInfoView(payment: .free)
} }

@ -15,10 +15,10 @@ struct AccountView: View {
var body: some View { var body: some View {
Form { Form {
NavigationLink("Change password") { NavigationLink("Changer de mot de passe") {
ChangePasswordView() ChangePasswordView()
} }
Button("Disconnect") { Button("Déconnexion") {
DataStore.shared.disconnect() DataStore.shared.disconnect()
handler() handler()
} }

@ -26,12 +26,12 @@ struct ChangePasswordView: View {
Button(action: { Button(action: {
self._changePassword() self._changePassword()
}, label: { }, label: {
Text("Change password") Text("Changer de mot de passe")
}) })
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
} }
} }
.navigationTitle("Change password") .navigationTitle("Changer de mot de passe")
} }
fileprivate func _changePassword() { fileprivate func _changePassword() {

@ -29,10 +29,10 @@ struct LoginView: View {
Form { Form {
Section { Section {
TextField("Username", text: self.$username) TextField("Nom d'utilisateur", text: self.$username)
.autocorrectionDisabled() .autocorrectionDisabled()
.textInputAutocapitalization(.never) .textInputAutocapitalization(.never)
SecureField("Password", text: self.$password) SecureField("Mot de passe", text: self.$password)
} header: { } header: {
if self.showEmailValidationMessage { if self.showEmailValidationMessage {
@ -47,7 +47,7 @@ struct LoginView: View {
if self.isLoading { if self.isLoading {
ProgressView() ProgressView()
} else { } else {
Text("Login").frame(maxWidth: .infinity) Text("Connexion").frame(maxWidth: .infinity)
} }
}) })
if let error = self.errorText { if let error = self.errorText {
@ -57,21 +57,21 @@ struct LoginView: View {
if !self.showEmailValidationMessage { if !self.showEmailValidationMessage {
Section { Section {
NavigationLink("Sign up") { NavigationLink("Créer un compte") {
UserCreationView() UserCreationView()
} }
Button(action: { Button(action: {
self.showEmailPopup = true self.showEmailPopup = true
}, label: { }, label: {
Text("Forgotten password") Text("Mot passe oublié")
}) })
.alert( .alert(
Text("Password reset"), Text("Changer de mot de passe"),
isPresented: self.$showEmailPopup isPresented: self.$showEmailPopup
) { ) {
EmailConfirmationView() EmailConfirmationView()
} message: { } message: {
Text("Please enter your email") Text("Veuillez entrer votre email")
} }
} }
} }
@ -126,7 +126,7 @@ struct EmailConfirmationView: View {
Button { Button {
self._forgottenPassword() self._forgottenPassword()
} label: { } label: {
Text("Send email") Text("Envoyer l'email")
} }
} }

@ -35,7 +35,7 @@ struct UserCreationFormView: View {
Form { Form {
Section { Section {
TextField("Username", text: self.$username) TextField("Nom d'utilisateur", text: self.$username)
.autocorrectionDisabled() .autocorrectionDisabled()
.textInputAutocapitalization(.never) .textInputAutocapitalization(.never)
TextField("Email", text: self.$email) TextField("Email", text: self.$email)
@ -45,18 +45,18 @@ struct UserCreationFormView: View {
} }
Section { Section {
SecureField("Password", text: self.$password1) SecureField("Mot de passe", text: self.$password1)
SecureField("Confirm password", text: self.$password2) SecureField("Confirmez le mot de passe", text: self.$password2)
} }
Section { Section {
TextField("First Name", text: self.$firstName) TextField("Prénom", text: self.$firstName)
.autocorrectionDisabled() .autocorrectionDisabled()
TextField("Last Name", text: self.$lastName) TextField("Nom", text: self.$lastName)
.autocorrectionDisabled() .autocorrectionDisabled()
TextField("Phone", text: self.$phone) TextField("Téléphone", text: self.$phone)
.autocorrectionDisabled() .autocorrectionDisabled()
Picker("Select a country", selection: $selectedCountryIndex) { Picker("Pays", selection: $selectedCountryIndex) {
ForEach(0..<self.countries.count, id: \.self) { index in ForEach(0..<self.countries.count, id: \.self) { index in
Text(self.countries[index]).tag(index) Text(self.countries[index]).tag(index)
} }
@ -78,7 +78,7 @@ struct UserCreationFormView: View {
if self.isLoading { if self.isLoading {
ProgressView() ProgressView()
} else { } else {
Text("Create") Text("Créer")
} }
}).disabled(!self.dataCollectAuthorized) }).disabled(!self.dataCollectAuthorized)
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
@ -87,7 +87,7 @@ struct UserCreationFormView: View {
.onAppear { .onAppear {
self._selectCountry() self._selectCountry()
} }
.alert("Password do not match", isPresented: self.$showUnmatchingPasswordView, actions: { .alert("Les mots de passe ne correspondent pas", isPresented: self.$showUnmatchingPasswordView, actions: {
Button("Ok", action: {}) Button("Ok", action: {})
} ) } )
} }
@ -153,7 +153,7 @@ struct UserCreationView: View {
UserCreationFormView(showLoginScreen: self.$showLoginScreen) UserCreationFormView(showLoginScreen: self.$showLoginScreen)
} }
} }
.navigationTitle("Create user") .navigationTitle("Créez votre compte")
} }
} }

Loading…
Cancel
Save