diff --git a/Linphone/Localizable.xcstrings b/Linphone/Localizable.xcstrings index 9aea334bb..02f4a8cea 100644 --- a/Linphone/Localizable.xcstrings +++ b/Linphone/Localizable.xcstrings @@ -846,6 +846,23 @@ }, "Contacts" : { + }, + "contacts_list_empty" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "No contact for the moment…" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Aucun contact pour le moment…" + } + } + } }, "Content" : { @@ -868,6 +885,23 @@ }, "Conversations" : { + }, + "conversations_list_empty" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "No conversation for the moment…" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Aucune conversation pour le moment…" + } + } + } }, "Copy address" : { @@ -1269,12 +1303,31 @@ }, "Joining..." : { + }, + "Key" : { + "extractionState" : "manual" }, "Last name" : { }, "Linphone" : { + }, + "list_filter_no_result_found" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "No result found…" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Aucun résultat…" + } + } + } }, "Log out" : { @@ -1296,6 +1349,22 @@ }, "Meetings" : { + }, + "meetings_list_empty" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "No meeting for the moment…" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Aucune réunion pour le moment…" + } + } + } }, "Message" : { @@ -1320,18 +1389,6 @@ }, "Next" : { - }, - "No call for the moment..." : { - - }, - "No contacts for the moment..." : { - - }, - "No conversation for the moment..." : { - - }, - "No meeting for the moment..." : { - }, "No meeting today" : { diff --git a/Linphone/UI/Call/Fragments/CallsListFragment.swift b/Linphone/UI/Call/Fragments/CallsListFragment.swift index 9de87ee1a..4c14a816f 100644 --- a/Linphone/UI/Call/Fragments/CallsListFragment.swift +++ b/Linphone/UI/Call/Fragments/CallsListFragment.swift @@ -365,7 +365,7 @@ struct CallsListFragment: View { .scaledToFit() .clipped() .padding(.all) - Text("No call for the moment...") + Text("history_list_empty_history") .default_text_style_800(styleSize: 16) Spacer() Spacer() diff --git a/Linphone/UI/Main/Contacts/ContactsView.swift b/Linphone/UI/Main/Contacts/ContactsView.swift index 80a9fa5d1..b6492c4fe 100644 --- a/Linphone/UI/Main/Contacts/ContactsView.swift +++ b/Linphone/UI/Main/Contacts/ContactsView.swift @@ -27,11 +27,12 @@ struct ContactsView: View { @Binding var isShowEditContactFragment: Bool @Binding var isShowDeletePopup: Bool + @Binding var text: String var body: some View { NavigationView { ZStack(alignment: .bottomTrailing) { - ContactsFragment(contactViewModel: contactViewModel, isShowDeletePopup: $isShowDeletePopup) + ContactsFragment(contactViewModel: contactViewModel, isShowDeletePopup: $isShowDeletePopup, text: $text) Button { withAnimation { @@ -66,6 +67,7 @@ struct ContactsView: View { historyViewModel: HistoryViewModel(), editContactViewModel: EditContactViewModel(), isShowEditContactFragment: .constant(false), - isShowDeletePopup: .constant(false) + isShowDeletePopup: .constant(false), + text: .constant("") ) } diff --git a/Linphone/UI/Main/Contacts/Fragments/ContactsFragment.swift b/Linphone/UI/Main/Contacts/Fragments/ContactsFragment.swift index 3a453d5d6..7ed99e3bb 100644 --- a/Linphone/UI/Main/Contacts/Fragments/ContactsFragment.swift +++ b/Linphone/UI/Main/Contacts/Fragments/ContactsFragment.swift @@ -29,11 +29,12 @@ struct ContactsFragment: View { @State private var showingSheet = false @State private var showShareSheet = false + @Binding var text: String var body: some View { ZStack { if #available(iOS 16.0, *), idiom != .pad { - ContactsInnerFragment(contactViewModel: contactViewModel, showingSheet: $showingSheet) + ContactsInnerFragment(contactViewModel: contactViewModel, showingSheet: $showingSheet, text: $text) .sheet(isPresented: $showingSheet) { ContactsListBottomSheet( contactViewModel: contactViewModel, @@ -49,7 +50,7 @@ struct ContactsFragment: View { .edgesIgnoringSafeArea(.bottom) } } else { - ContactsInnerFragment(contactViewModel: contactViewModel, showingSheet: $showingSheet) + ContactsInnerFragment(contactViewModel: contactViewModel, showingSheet: $showingSheet, text: $text) .halfSheet(showSheet: $showingSheet) { ContactsListBottomSheet( contactViewModel: contactViewModel, @@ -68,5 +69,5 @@ struct ContactsFragment: View { } #Preview { - ContactsFragment(contactViewModel: ContactViewModel(), isShowDeletePopup: .constant(false)) + ContactsFragment(contactViewModel: ContactViewModel(), isShowDeletePopup: .constant(false), text: .constant("")) } diff --git a/Linphone/UI/Main/Contacts/Fragments/ContactsInnerFragment.swift b/Linphone/UI/Main/Contacts/Fragments/ContactsInnerFragment.swift index a2cc390f9..8fe87a939 100644 --- a/Linphone/UI/Main/Contacts/Fragments/ContactsInnerFragment.swift +++ b/Linphone/UI/Main/Contacts/Fragments/ContactsInnerFragment.swift @@ -29,6 +29,7 @@ struct ContactsInnerFragment: View { @State private var isFavoriteOpen = true @Binding var showingSheet: Bool + @Binding var text: String var body: some View { VStack(alignment: .leading) { @@ -87,7 +88,7 @@ struct ContactsInnerFragment: View { .scaledToFit() .clipped() .padding(.all) - Text("No contacts for the moment...") + Text(!text.isEmpty ? "list_filter_no_result_found" : "contacts_list_empty") .default_text_style_800(styleSize: 16) Spacer() Spacer() @@ -102,5 +103,5 @@ struct ContactsInnerFragment: View { } #Preview { - ContactsInnerFragment(contactViewModel: ContactViewModel(), showingSheet: .constant(false)) + ContactsInnerFragment(contactViewModel: ContactViewModel(), showingSheet: .constant(false), text: .constant("")) } diff --git a/Linphone/UI/Main/ContentView.swift b/Linphone/UI/Main/ContentView.swift index 599c92f1a..066e9c7a9 100644 --- a/Linphone/UI/Main/ContentView.swift +++ b/Linphone/UI/Main/ContentView.swift @@ -522,7 +522,8 @@ struct ContentView: View { historyViewModel: historyViewModel, editContactViewModel: editContactViewModel, isShowEditContactFragment: $isShowEditContactFragment, - isShowDeletePopup: $isShowDeleteContactPopup + isShowDeletePopup: $isShowDeleteContactPopup, + text: $text ) } else if self.index == 1 { HistoryView( @@ -536,13 +537,14 @@ struct ContentView: View { text: $text ) } else if self.index == 2 { - ConversationsView(conversationViewModel: conversationViewModel, conversationsListViewModel: conversationsListViewModel) + ConversationsView(conversationViewModel: conversationViewModel, conversationsListViewModel: conversationsListViewModel, text: $text) } else if self.index == 3 { MeetingsView( meetingsListViewModel: meetingsListViewModel, meetingViewModel: meetingViewModel, isShowScheduleMeetingFragment: $isShowScheduleMeetingFragment, - isShowSendCancelMeetingNotificationPopup: $isShowSendCancelMeetingNotificationPopup + isShowSendCancelMeetingNotificationPopup: $isShowSendCancelMeetingNotificationPopup, + text: $text ) } } diff --git a/Linphone/UI/Main/Conversations/ConversationsView.swift b/Linphone/UI/Main/Conversations/ConversationsView.swift index 161368b2c..0a72dd314 100644 --- a/Linphone/UI/Main/Conversations/ConversationsView.swift +++ b/Linphone/UI/Main/Conversations/ConversationsView.swift @@ -23,11 +23,12 @@ struct ConversationsView: View { @ObservedObject var conversationViewModel: ConversationViewModel @ObservedObject var conversationsListViewModel: ConversationsListViewModel + @Binding var text: String var body: some View { NavigationView { ZStack(alignment: .bottomTrailing) { - ConversationsFragment(conversationViewModel: conversationViewModel, conversationsListViewModel: conversationsListViewModel) + ConversationsFragment(conversationViewModel: conversationViewModel, conversationsListViewModel: conversationsListViewModel, text: $text) Button { } label: { @@ -51,6 +52,7 @@ struct ConversationsView: View { ConversationsListFragment( conversationViewModel: ConversationViewModel(), conversationsListViewModel: ConversationsListViewModel(), - showingSheet: .constant(false) + showingSheet: .constant(false), + text: .constant("") ) } diff --git a/Linphone/UI/Main/Conversations/Fragments/ConversationsFragment.swift b/Linphone/UI/Main/Conversations/Fragments/ConversationsFragment.swift index 791a5f480..2509fa12c 100644 --- a/Linphone/UI/Main/Conversations/Fragments/ConversationsFragment.swift +++ b/Linphone/UI/Main/Conversations/Fragments/ConversationsFragment.swift @@ -27,11 +27,12 @@ struct ConversationsFragment: View { private var idiom: UIUserInterfaceIdiom { UIDevice.current.userInterfaceIdiom } @State var showingSheet: Bool = false + @Binding var text: String var body: some View { ZStack { if #available(iOS 16.0, *), idiom != .pad { - ConversationsListFragment(conversationViewModel: conversationViewModel, conversationsListViewModel: conversationsListViewModel, showingSheet: $showingSheet) + ConversationsListFragment(conversationViewModel: conversationViewModel, conversationsListViewModel: conversationsListViewModel, showingSheet: $showingSheet, text: $text) .sheet(isPresented: $showingSheet) { ConversationsListBottomSheet( conversationsListViewModel: conversationsListViewModel, @@ -40,7 +41,7 @@ struct ConversationsFragment: View { .presentationDetents([.fraction(0.4)]) } } else { - ConversationsListFragment(conversationViewModel: conversationViewModel, conversationsListViewModel: conversationsListViewModel, showingSheet: $showingSheet) + ConversationsListFragment(conversationViewModel: conversationViewModel, conversationsListViewModel: conversationsListViewModel, showingSheet: $showingSheet, text: $text) .halfSheet(showSheet: $showingSheet) { ConversationsListBottomSheet( conversationsListViewModel: conversationsListViewModel, @@ -53,5 +54,5 @@ struct ConversationsFragment: View { } #Preview { - ConversationsFragment(conversationViewModel: ConversationViewModel(), conversationsListViewModel: ConversationsListViewModel()) + ConversationsFragment(conversationViewModel: ConversationViewModel(), conversationsListViewModel: ConversationsListViewModel(), text: .constant("")) } diff --git a/Linphone/UI/Main/Conversations/Fragments/ConversationsListFragment.swift b/Linphone/UI/Main/Conversations/Fragments/ConversationsListFragment.swift index e7c33020b..0e064b39a 100644 --- a/Linphone/UI/Main/Conversations/Fragments/ConversationsListFragment.swift +++ b/Linphone/UI/Main/Conversations/Fragments/ConversationsListFragment.swift @@ -26,6 +26,7 @@ struct ConversationsListFragment: View { @ObservedObject var conversationsListViewModel: ConversationsListViewModel @Binding var showingSheet: Bool + @Binding var text: String var body: some View { VStack { @@ -162,7 +163,7 @@ struct ConversationsListFragment: View { .scaledToFit() .clipped() .padding(.all) - Text("No conversation for the moment...") + Text(!text.isEmpty ? "list_filter_no_result_found" : "conversations_list_empty") .default_text_style_800(styleSize: 16) Spacer() Spacer() @@ -180,6 +181,7 @@ struct ConversationsListFragment: View { ConversationsListFragment( conversationViewModel: ConversationViewModel(), conversationsListViewModel: ConversationsListViewModel(), - showingSheet: .constant(false) + showingSheet: .constant(false), + text: .constant("") ) } diff --git a/Linphone/UI/Main/History/Fragments/HistoryListFragment.swift b/Linphone/UI/Main/History/Fragments/HistoryListFragment.swift index 9df4cddf2..620d7211e 100644 --- a/Linphone/UI/Main/History/Fragments/HistoryListFragment.swift +++ b/Linphone/UI/Main/History/Fragments/HistoryListFragment.swift @@ -152,7 +152,7 @@ struct HistoryListFragment: View { .scaledToFit() .clipped() .padding(.all) - Text(historyListViewModel.callLogs.isEmpty && !text.isEmpty ? "history_list_empty_with_filter_history" : "history_list_empty_history") + Text(!text.isEmpty ? "list_filter_no_result_found" : "history_list_empty_history") .default_text_style_800(styleSize: 16) .multilineTextAlignment(.center) Spacer() diff --git a/Linphone/UI/Main/Meetings/Fragments/MeetingsFragment.swift b/Linphone/UI/Main/Meetings/Fragments/MeetingsFragment.swift index 02d6c4ba1..d3911ab4a 100644 --- a/Linphone/UI/Main/Meetings/Fragments/MeetingsFragment.swift +++ b/Linphone/UI/Main/Meetings/Fragments/MeetingsFragment.swift @@ -28,6 +28,7 @@ struct MeetingsFragment: View { private var idiom: UIUserInterfaceIdiom { UIDevice.current.userInterfaceIdiom } @Binding var showingSheet: Bool + @Binding var text: String @ViewBuilder func createMonthLine(model: MeetingsListItemModel) -> some View { @@ -162,7 +163,7 @@ struct MeetingsFragment: View { .scaledToFit() .clipped() .padding(.all) - Text("No meeting for the moment...") + Text(!text.isEmpty ? "list_filter_no_result_found" : "meetings_list_empty") .default_text_style_800(styleSize: 16) Spacer() Spacer() @@ -180,5 +181,5 @@ struct MeetingsFragment: View { #Preview { MeetingsFragment(meetingsListViewModel: MeetingsListViewModel(), meetingViewModel: MeetingViewModel(), - showingSheet: .constant(false)) + showingSheet: .constant(false), text: .constant("")) } diff --git a/Linphone/UI/Main/Meetings/MeetingsView.swift b/Linphone/UI/Main/Meetings/MeetingsView.swift index 98518402e..94c108486 100644 --- a/Linphone/UI/Main/Meetings/MeetingsView.swift +++ b/Linphone/UI/Main/Meetings/MeetingsView.swift @@ -29,13 +29,14 @@ struct MeetingsView: View { @Binding var isShowSendCancelMeetingNotificationPopup: Bool @State private var showingSheet = false + @Binding var text: String var body: some View { NavigationView { ZStack(alignment: .bottomTrailing) { if #available(iOS 16.0, *), idiom != .pad { - MeetingsFragment(meetingsListViewModel: meetingsListViewModel, meetingViewModel: meetingViewModel, showingSheet: $showingSheet) + MeetingsFragment(meetingsListViewModel: meetingsListViewModel, meetingViewModel: meetingViewModel, showingSheet: $showingSheet, text: $text) .sheet(isPresented: $showingSheet) { MeetingsListBottomSheet( meetingsListViewModel: meetingsListViewModel, @@ -45,7 +46,7 @@ struct MeetingsView: View { .presentationDetents([.fraction(0.1)]) } } else { - MeetingsFragment(meetingsListViewModel: meetingsListViewModel, meetingViewModel: meetingViewModel, showingSheet: $showingSheet) + MeetingsFragment(meetingsListViewModel: meetingsListViewModel, meetingViewModel: meetingViewModel, showingSheet: $showingSheet, text: $text) .halfSheet(showSheet: $showingSheet) { MeetingsListBottomSheet( meetingsListViewModel: meetingsListViewModel, @@ -82,6 +83,7 @@ struct MeetingsView: View { meetingsListViewModel: MeetingsListViewModel(), meetingViewModel: MeetingViewModel(), isShowScheduleMeetingFragment: .constant(false), - isShowSendCancelMeetingNotificationPopup: .constant(false) + isShowSendCancelMeetingNotificationPopup: .constant(false), + text: .constant("") ) }