Skip to content

Commit

Permalink
Make more things translatble, thanks nautilusx
Browse files Browse the repository at this point in the history
  • Loading branch information
tmolitor-stud-tu committed Dec 27, 2023
1 parent 3155296 commit f1e56d2
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Monal/Classes/ContactDetails.swift
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ struct ContactDetails: View {
#endif

if(!contact.isGroup && !contact.isSelfChat) {
TextField("Rename Contact", text: $contact.nickNameView)
TextField(NSLocalizedString("Rename Contact", comment: "placeholder text in contact details"), text: $contact.nickNameView)
.textFieldStyle(RoundedBorderTextFieldStyle())
.addClearButton(text:$contact.nickNameView)
}
Expand Down
2 changes: 1 addition & 1 deletion Monal/Classes/ContactPicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ struct ContactPicker: View {
} else {
List {
Section {
TextField("Search contacts", text: $searchFieldInput)
TextField(NSLocalizedString("Search contacts", comment: "placeholder in contact picker"), text: $searchFieldInput)
}
ForEach(Array(contacts.enumerated()), id: \.element) { idx, contact in
if matchesSearch(contact: contact) {
Expand Down
2 changes: 1 addition & 1 deletion Monal/Classes/CreateGroupMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ struct CreateGroupMenu: View {
}
.pickerStyle(.menu)
}
TextField("Group Name (optional)", text: $groupName)
TextField(NSLocalizedString("Group Name (optional)", comment: "placeholder when creating new group"), text: $groupName)
.autocorrectionDisabled()
.autocapitalization(.none)
.addClearButton(text:$groupName)
Expand Down
2 changes: 1 addition & 1 deletion Monal/Classes/PasswordMigration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ struct PasswordMigration: View {
}
))

SecureField("Password", text:Binding(
SecureField(NSLocalizedString("Password", comment: "placeholder when migrating account"), text:Binding(
get: { self.needingMigration[id]?["password"] as? String ?? "" },
set: {
self.needingMigration[id]?["password"] = $0 as NSString
Expand Down
10 changes: 5 additions & 5 deletions Monal/Classes/RegisterAccount.swift
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ struct RegisterAccount: View {

Group {
if(selectedServerIndex == 0) {
TextField("Provide XMPP-Server", text: Binding(
TextField(NSLocalizedString("Provide XMPP-Server", comment: "placeholder when creating account"), text: Binding(
get: { self.providedServer },
set: { string in self.providedServer = string.lowercased().replacingOccurrences(of: " ", with: "") }
))
Expand All @@ -332,16 +332,16 @@ struct RegisterAccount: View {
.disabled(self.registerToken != nil)
}

TextField("Username", text: Binding(
TextField(NSLocalizedString("Username", comment: "placeholder when creating account"), text: Binding(
get: { self.username },
set: { string in self.username = string.lowercased().replacingOccurrences(of: " ", with: "") }
))
//ios15: .textInputAutocapitalization(.never)
.autocapitalization(.none)
.autocorrectionDisabled()

SecureField("Password", text: $password)
SecureField("Password (repeated)", text: $repeatedPassword)
SecureField(NSLocalizedString("Password", comment: "placeholder when creating account"), text: $password)
SecureField(NSLocalizedString("Password (repeated)", comment: "placeholder when creating account"), text: $repeatedPassword)
}

if(self.captchaImg != nil) {
Expand All @@ -355,7 +355,7 @@ struct RegisterAccount: View {
})
.buttonStyle(.borderless)
}
TextField("Captcha", text: $captchaText)
TextField(NSLocalizedString("Captcha", comment: "placeholder when creating account"), text: $captchaText)
//ios15: .textInputAutocapitalization(.never)
.autocapitalization(.none)
.autocorrectionDisabled()
Expand Down
4 changes: 2 additions & 2 deletions Monal/Classes/WelcomeLogIn.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ struct WelcomeLogIn: View {
//for ios >= 15.0
//.listRowSeparator(.hidden)

TextField("[email protected]", text: Binding(
TextField(NSLocalizedString("[email protected]", comment: "placeholder when adding account"), text: Binding(
get: { self.jid },
set: { string in self.jid = string.lowercased().replacingOccurrences(of: " ", with: "") })
)
Expand All @@ -138,7 +138,7 @@ struct WelcomeLogIn: View {
.autocorrectionDisabled()
.keyboardType(.emailAddress)

SecureField("Password", text: $password)
SecureField(NSLocalizedString("Password", comment: "placeholder when adding account"), text: $password)

HStack() {
Button(action: {
Expand Down

0 comments on commit f1e56d2

Please sign in to comment.