diff --git a/Monal/Classes/AddContactMenu.swift b/Monal/Classes/AddContactMenu.swift index c573addbc..7827de7d6 100644 --- a/Monal/Classes/AddContactMenu.swift +++ b/Monal/Classes/AddContactMenu.swift @@ -291,7 +291,7 @@ struct AddContactMenu: View { MLQRCodeScanner(handleClose: { self.showQRCodeScanner = false }) - .navigationTitle("QR-Code Scanner") + .navigationTitle(Text("QR-Code Scanner")) .navigationBarTitleDisplayMode(.inline) .toolbar(content: { ToolbarItem(placement: .navigationBarLeading, content: { diff --git a/Monal/Classes/BlockedUsers.swift b/Monal/Classes/BlockedUsers.swift index fcff23e13..c7a0708c6 100644 --- a/Monal/Classes/BlockedUsers.swift +++ b/Monal/Classes/BlockedUsers.swift @@ -27,7 +27,7 @@ struct BlockedUsers: View { var body: some View { if showBlockingUnsupportedPlaceholder { - ContentUnavailableShimView("Blocking unsupported", systemImage: "iphone.homebutton.slash", description: Text("Your server does not support blocking (XEP-0191).")) + ContentUnavailableShimView(NSLocalizedString("Blocking unsupported", comment: ""), systemImage: "iphone.homebutton.slash", description: Text("Your server does not support blocking (XEP-0191).")) } else { List { ForEach(blockedJids, id: \.self) { blockedJid in @@ -42,7 +42,7 @@ struct BlockedUsers: View { } } .listStyle(.plain) - .navigationTitle("Blocked Users") + .navigationTitle(Text("Blocked Users")) .animation(.default, value: blockedJids) .onAppear { if !(xmppAccount.accountState.rawValue >= xmppState.stateBound.rawValue && xmppAccount.connectionProperties.accountDiscoDone) { @@ -84,13 +84,13 @@ struct BlockedUsers: View { }) } } - .alert("Enter the jid that you want to block", isPresented: $showAddingToBlocklistForm, actions: { + .alert(NSLocalizedString("Enter the jid that you want to block", comment: ""), isPresented: $showAddingToBlocklistForm, actions: { TextField("user@example.org/resource", text: $jidToBlock) .textInputAutocapitalization(.never) .keyboardType(.emailAddress) .autocorrectionDisabled() - Button("Block", role: .destructive) { + Button(NSLocalizedString("Block", comment: ""), role: .destructive) { guard (jidToBlock.range(of: BlockedUsers.jidPattern, options: .regularExpression) != nil) else { showInvalidJidAlert = true return @@ -101,7 +101,7 @@ struct BlockedUsers: View { MLXMPPManager.sharedInstance().block(true, fullJid: jidToBlock, onAccount: self.xmppAccount.accountID) } - Button("Cancel", role: .cancel, action: {}) + Button(NSLocalizedString("Cancel", comment: ""), role: .cancel, action: {}) } ) // If .onDisappear is applied to the alert or any of its subviews, its perform action won't @@ -112,7 +112,7 @@ struct BlockedUsers: View { jidToBlock = "" } } - .alert("Input is not a valid jid", isPresented: $showInvalidJidAlert, actions: {}) + .alert(NSLocalizedString("Input is not a valid jid", comment: ""), isPresented: $showInvalidJidAlert, actions: {}) .addLoadingOverlay(overlay) } } diff --git a/Monal/Classes/ContactPicker.swift b/Monal/Classes/ContactPicker.swift index 448905270..3201e4224 100644 --- a/Monal/Classes/ContactPicker.swift +++ b/Monal/Classes/ContactPicker.swift @@ -101,7 +101,7 @@ struct ContactPicker: View { var body: some View { if(allContacts.isEmpty) { Text("No contacts to show :(") - .navigationTitle("Contact Lists") + .navigationTitle(Text("Contact Lists")) } else { List(searchResults) { contact in let contactIsSelected = self.selectedContacts.contains(contact); diff --git a/Monal/Classes/ContactsView.swift b/Monal/Classes/ContactsView.swift index 5e2f037dc..ea4c93763 100644 --- a/Monal/Classes/ContactsView.swift +++ b/Monal/Classes/ContactsView.swift @@ -136,7 +136,7 @@ struct ContactsView: View { } } .animation(.default, value: contactList) - .navigationTitle("Contacts") + .navigationTitle(Text("Contacts")) .listStyle(.plain) .searchable(text: $searchText, placement: .navigationBarDrawer(displayMode: .always)) .autocorrectionDisabled() diff --git a/Monal/Classes/MediaGallery.swift b/Monal/Classes/MediaGallery.swift index 42a7b2f8b..3919f413b 100644 --- a/Monal/Classes/MediaGallery.swift +++ b/Monal/Classes/MediaGallery.swift @@ -27,7 +27,7 @@ struct MediaGalleryView: View { } .padding() } - .navigationTitle("Shared Media") + .navigationTitle(Text("Shared Media")) .onAppear { fetchDownloadedMediaItems() } diff --git a/Monal/Classes/WelcomeLogIn.swift b/Monal/Classes/WelcomeLogIn.swift index 36af32ead..19a6b0b62 100644 --- a/Monal/Classes/WelcomeLogIn.swift +++ b/Monal/Classes/WelcomeLogIn.swift @@ -181,7 +181,7 @@ struct WelcomeLogIn: View { .listRowSeparator(.hidden) if advancedMode { - TextField("Optional Hardcoded Hostname", text: $hardcodedServer) + TextField(NSLocalizedString("Optional Hardcoded Hostname", comment: "advanced account settings"), text: $hardcodedServer) .textInputAutocapitalization(.never) .autocorrectionDisabled() .keyboardType(.URL) @@ -192,7 +192,7 @@ struct WelcomeLogIn: View { HStack { Text("Port") Spacer() - TextField("Optional Hardcoded Port", text: $hardcodedPort) + TextField(NSLocalizedString("Optional Hardcoded Port", comment: "advanced account settings"), text: $hardcodedPort) .keyboardType(.numberPad) .addClearButton(isEditing: hardcodedPort.count > 0, text: $hardcodedPort) .onDisappear {