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? {
#if DEBUG
return .monthlyUnlimited
#else
// #if DEBUG
// return .monthlyUnlimited
// #else
if let currentBestPlan = self.currentBestPlan, let plan = StoreItem(rawValue: currentBestPlan.productID) {
return plan
}
return nil
#endif
// #endif
}
func userFilteredPurchases() -> [StoreKit.Transaction] {

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

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

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

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

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

Loading…
Cancel
Save