diff --git a/Linphone/Core/CoreContext.swift b/Linphone/Core/CoreContext.swift index db4e967df..1d2098217 100644 --- a/Linphone/Core/CoreContext.swift +++ b/Linphone/Core/CoreContext.swift @@ -294,8 +294,6 @@ final class CoreContext: ObservableObject { } else if state == .Cleared { self.loggingInProgress = false self.loggedIn = false - ToastViewModel.shared.toastMessage = "Success_account_logged_out" - ToastViewModel.shared.displayToast = true } else { self.loggingInProgress = false self.loggedIn = false diff --git a/Linphone/Localizable.xcstrings b/Linphone/Localizable.xcstrings index afa0d96d4..66e7116a6 100644 --- a/Linphone/Localizable.xcstrings +++ b/Linphone/Localizable.xcstrings @@ -40,9 +40,6 @@ } } } - }, - "%lld appels" : { - }, "%lld Book (Example)" : { "extractionState" : "manual", @@ -174,15 +171,9 @@ }, "Administrateur" : { - }, - "All calls will be removed from the history." : { - }, "All contacts" : { - }, - "All modifications will be canceled." : { - }, "assistant_account_create" : { "localizations" : { @@ -843,9 +834,15 @@ }, "call_action_resume_call" : { "localizations" : { - "fr" : { + "en" : { "stringUnit" : { "state" : "translated", + "value" : "Resume" + } + }, + "fr" : { + "stringUnit" : { + "state" : "needs_review", "value" : "Reprendre" } } @@ -1219,7 +1216,7 @@ } } }, - "Calls" : { + "calls_count_label" : { }, "calls_list_dialog_merge_into_conference_label" : { @@ -1556,6 +1553,12 @@ } } } + }, + "contact_dialog_delete_message" : { + + }, + "contact_dialog_delete_title" : { + }, "contact_dialog_pick_phone_number_or_sip_address_title" : { "extractionState" : "manual", @@ -1605,6 +1608,9 @@ } } } + }, + "contact_editor_dialog_abort_confirmation_message" : { + }, "contact_editor_first_name" : { "localizations" : { @@ -1701,9 +1707,6 @@ } } } - }, - "Contacts" : { - }, "contacts_list_all_contacts_title" : { "localizations" : { @@ -1785,6 +1788,9 @@ } } } + }, + "content_description_save_changes" : { + }, "Continue" : { "localizations" : { @@ -2736,12 +2742,6 @@ }, "Default mode" : { - }, - "Delete %@?" : { - - }, - "Delete all history" : { - }, "Description" : { @@ -2828,15 +2828,9 @@ }, "Display Name" : { - }, - "Do you really want to delete all calls history?" : { - }, "Domain" : { - }, - "Don’t save modifications?" : { - }, "drawer_menu_account_connection_status_cleared" : { "extractionState" : "manual", @@ -2964,9 +2958,6 @@ }, "Error" : { - }, - "Error Name" : { - }, "Etes-vous sûr de vouloir supprimer %@ ?" : { @@ -3082,6 +3073,12 @@ } } } + }, + "history_dialog_delete_all_call_logs_message" : { + + }, + "history_dialog_delete_all_call_logs_title" : { + }, "history_group_call_start_dialog_set_subject" : { "localizations" : { @@ -3164,12 +3161,6 @@ } } } - }, - "https://linphone.org/en/privacy-policy" : { - - }, - "https://linphone.org/general-terms" : { - }, "I prefere create an account" : { @@ -3383,6 +3374,12 @@ } } } + }, + "meeting_schedule_cancel_dialog_message" : { + + }, + "meeting_schedule_cancel_dialog_title" : { + }, "meeting_schedule_description_hint" : { "localizations" : { @@ -3989,9 +3986,6 @@ } } } - }, - "Ok" : { - }, "Opération en cours..." : { @@ -4112,15 +4106,9 @@ } } } - }, - "Send cancellation notifications" : { - }, "Send Logs" : { - }, - "Send notification to participants ?" : { - }, "settings_title" : { "extractionState" : "manual", @@ -4184,15 +4172,9 @@ }, "Temp Help" : { - }, - "The meeting will be cancelled" : { - }, "The user name or password is incorrects" : { - }, - "This contact will be deleted definitively." : { - }, "TLS" : { diff --git a/Linphone/UI/Assistant/Fragments/LoginFragment.swift b/Linphone/UI/Assistant/Fragments/LoginFragment.swift index 82f2f06c7..945f1716e 100644 --- a/Linphone/UI/Assistant/Fragments/LoginFragment.swift +++ b/Linphone/UI/Assistant/Fragments/LoginFragment.swift @@ -293,8 +293,8 @@ struct LoginFragment: View { } if self.isShowPopup { - let generalTerms = String(format: "[%@](%@)", String(localized: "assistant_dialog_general_terms_label"), String(localized: "https://linphone.org/general-terms")) - let privacyPolicy = String(format: "[%@](%@)", String(localized: "assistant_dialog_privacy_policy_label"), String(localized: "https://linphone.org/en/privacy-policy")) + let generalTerms = String(format: "[%@](%@)", String(localized: "assistant_dialog_general_terms_label"), "https://www.linphone.org/en/terms-of-use/") + let privacyPolicy = String(format: "[%@](%@)", String(localized: "assistant_dialog_privacy_policy_label"), "https://linphone.org/en/privacy-policy") let splitMsg = String(localized: "assistant_dialog_general_terms_and_privacy_policy_message").components(separatedBy: "%@") if splitMsg.count == 3 { // We expect form of STRING %A STRING %@ STRING let contentPopup1 = Text(.init(splitMsg[0])) diff --git a/Linphone/UI/Main/ContentView.swift b/Linphone/UI/Main/ContentView.swift index 3a4a9e475..438de1925 100644 --- a/Linphone/UI/Main/ContentView.swift +++ b/Linphone/UI/Main/ContentView.swift @@ -92,7 +92,7 @@ struct ContentView: View { .padding(.leading, 10) if callViewModel.callsCounter > 1 { - Text("\(callViewModel.callsCounter) appels") + Text(String(format: String(localized: "calls_count_label"), callViewModel.callsCounter)) .default_text_style_white(styleSize: 16) } else { Text("\(callViewModel.displayName)") @@ -102,7 +102,7 @@ struct ContentView: View { Spacer() if callViewModel.callsCounter == 1 { - Text("\(callViewModel.isPaused || telecomManager.isPausedByRemote ? "En pause" : "Actif")") + Text("\(callViewModel.isPaused || telecomManager.isPausedByRemote ? "call_state_paused" : "call_state_connected")") .default_text_style_white(styleSize: 16) .padding(.trailing, 10) } @@ -140,10 +140,10 @@ struct ContentView: View { .foregroundStyle(self.index == 0 ? Color.orangeMain500 : Color.grayMain2c600) .frame(width: 25, height: 25) if self.index == 0 { - Text("Contacts") + Text("bottom_navigation_contacts_label") .default_text_style_700(styleSize: 10) } else { - Text("Contacts") + Text("bottom_navigation_contacts_label") .default_text_style(styleSize: 10) } } @@ -188,10 +188,10 @@ struct ContentView: View { .foregroundStyle(self.index == 1 ? Color.orangeMain500 : Color.grayMain2c600) .frame(width: 25, height: 25) if self.index == 1 { - Text("Calls") + Text("bottom_navigation_calls_label") .default_text_style_700(styleSize: 10) } else { - Text("Calls") + Text("bottom_navigation_calls_label") .default_text_style(styleSize: 10) } } @@ -391,7 +391,7 @@ struct ContentView: View { isShowDeleteAllHistoryPopup.toggle() } label: { HStack { - Text("Delete all history") + Text("menu_delete_history") Spacer() Image("trash-simple-red") .resizable() @@ -669,10 +669,10 @@ struct ContentView: View { .foregroundStyle(self.index == 0 ? Color.orangeMain500 : Color.grayMain2c600) .frame(width: 25, height: 25) if self.index == 0 { - Text("Contacts") + Text("bottom_navigation_contacts_label") .default_text_style_700(styleSize: 10) } else { - Text("Contacts") + Text("bottom_navigation_contacts_label") .default_text_style(styleSize: 10) } } @@ -719,10 +719,10 @@ struct ContentView: View { .foregroundStyle(self.index == 1 ? Color.orangeMain500 : Color.grayMain2c600) .frame(width: 25, height: 25) if self.index == 1 { - Text("Calls") + Text("bottom_navigation_calls_label") .default_text_style_700(styleSize: 9) } else { - Text("Calls") + Text("bottom_navigation_calls_label") .default_text_style(styleSize: 9) } } @@ -1001,17 +1001,15 @@ struct ContentView: View { if isShowDeleteContactPopup { PopupView(isShowPopup: $isShowDeleteContactPopup, - title: Text( - contactViewModel.selectedFriend != nil - ? "Delete \(contactViewModel.selectedFriend!.name!)?" - : (contactViewModel.indexDisplayedFriend != nil - ? "Delete \(contactsManager.lastSearch[contactViewModel.indexDisplayedFriend!].friend!.name!)?" - : "Error Name")), - content: Text("This contact will be deleted definitively."), - titleFirstButton: Text("Cancel"), + title: Text(String(format: String(localized: "contact_dialog_delete_title"), + contactViewModel.selectedFriend != nil + ? contactViewModel.selectedFriend!.name! : (contactViewModel.indexDisplayedFriend != nil + ? contactsManager.lastSearch[contactViewModel.indexDisplayedFriend!].friend!.name! : "Error Name"))), + content: Text("contact_dialog_delete_message"), + titleFirstButton: Text("dialog_cancel"), actionFirstButton: { self.isShowDeleteContactPopup.toggle()}, - titleSecondButton: Text("Ok"), + titleSecondButton: Text("dialog_ok"), actionSecondButton: { if contactViewModel.selectedFriendToDelete != nil { if contactViewModel.indexDisplayedFriend != nil { @@ -1043,20 +1041,20 @@ struct ContentView: View { if isShowDeleteAllHistoryPopup { PopupView(isShowPopup: $isShowDeleteContactPopup, - title: Text("Do you really want to delete all calls history?"), - content: Text("All calls will be removed from the history."), - titleFirstButton: Text("Cancel"), + title: Text("history_dialog_delete_all_call_logs_title"), + content: Text("history_dialog_delete_all_call_logs_message"), + titleFirstButton: Text("dialog_cancel"), actionFirstButton: { self.isShowDeleteAllHistoryPopup.toggle() historyListViewModel.callLogsAddressToDelete = "" }, - titleSecondButton: Text("Ok"), + titleSecondButton: Text("dialog_ok"), actionSecondButton: { historyListViewModel.removeCallLogs() self.isShowDeleteAllHistoryPopup.toggle() historyViewModel.displayedCall = nil - ToastViewModel.shared.toastMessage = "Success_remove_call_logs" + ToastViewModel.shared.toastMessage = "call_history_deleted_toast" ToastViewModel.shared.displayToast.toggle() }) .background(.black.opacity(0.65)) @@ -1068,11 +1066,11 @@ struct ContentView: View { if isShowDismissPopup { PopupView(isShowPopup: $isShowDismissPopup, - title: Text("Don’t save modifications?"), - content: Text("All modifications will be canceled."), - titleFirstButton: Text("Cancel"), + title: Text("content_description_save_changes"), + content: Text("contact_editor_dialog_abort_confirmation_message"), + titleFirstButton: Text("dialog_cancel"), actionFirstButton: {self.isShowDismissPopup.toggle()}, - titleSecondButton: Text("Ok"), + titleSecondButton: Text("dialog_ok"), actionSecondButton: { if editContactViewModel.selectedEditFriend == nil { self.isShowDismissPopup.toggle() @@ -1143,15 +1141,15 @@ struct ContentView: View { if isShowSendCancelMeetingNotificationPopup { PopupView(isShowPopup: $isShowSendCancelMeetingNotificationPopup, - title: Text("The meeting will be cancelled"), - content: Text("Send notification to participants ?"), + title: Text("meeting_schedule_cancel_dialog_title"), + content: Text("meeting_schedule_cancel_dialog_message"), titleFirstButton: Text("Cancel for me only"), actionFirstButton: { meetingViewModel.displayedMeeting = nil meetingsListViewModel.deleteSelectedMeeting() self.isShowSendCancelMeetingNotificationPopup.toggle( ) }, - titleSecondButton: Text("Send cancellation notifications"), + titleSecondButton: Text("meeting_schedule_cancel_dialog_title"), actionSecondButton: { meetingViewModel.displayedMeeting = nil if let meetingToDelete = self.meetingsListViewModel.selectedMeetingToDelete { @@ -1172,11 +1170,11 @@ struct ContentView: View { isShowPopup: $isShowStartCallGroupPopup, title: Text("conversation_info_confirm_start_group_call_dialog_title"), content: Text("conversation_info_confirm_start_group_call_dialog_message"), - titleFirstButton: Text("Cancel"), + titleFirstButton: Text("dialog_cancel"), actionFirstButton: { self.isShowStartCallGroupPopup.toggle() }, - titleSecondButton: Text("Confirm"), + titleSecondButton: Text("dialog_ok"), actionSecondButton: { if conversationViewModel.displayedConversation != nil { conversationViewModel.displayedConversation!.createGroupCall() @@ -1196,11 +1194,11 @@ struct ContentView: View { isShowPopup: $isShowStartCallGroupPopup, title: Text("conversation_info_confirm_start_group_call_dialog_title"), content: Text("conversation_info_confirm_start_group_call_dialog_message"), - titleFirstButton: Text("Cancel"), + titleFirstButton: Text("dialog_cancel"), actionFirstButton: { self.isShowStartCallGroupPopup.toggle() }, - titleSecondButton: Text("Confirm"), + titleSecondButton: Text("dialog_ok"), actionSecondButton: { if conversationViewModel.displayedConversation != nil { conversationViewModel.displayedConversation!.createGroupCall() diff --git a/Linphone/UI/Main/Fragments/HelpView.swift b/Linphone/UI/Main/Fragments/HelpView.swift index 17cf680bf..d7932a40d 100644 --- a/Linphone/UI/Main/Fragments/HelpView.swift +++ b/Linphone/UI/Main/Fragments/HelpView.swift @@ -32,7 +32,7 @@ class HelpView { // TODO (basic debug moved here until halp view is implemented) CoreContext.shared.doOnCoreQueue { _ in Core.resetLogCollection() DispatchQueue.main.async { - ToastViewModel.shared.toastMessage = "Success_clear_logs" + ToastViewModel.shared.toastMessage = "help_troubleshooting_debug_logs_cleaned_toast_message" ToastViewModel.shared.displayToast = true } } diff --git a/Linphone/UI/Main/Fragments/ToastView.swift b/Linphone/UI/Main/Fragments/ToastView.swift index 279be4ce1..3b9628c2e 100644 --- a/Linphone/UI/Main/Fragments/ToastView.swift +++ b/Linphone/UI/Main/Fragments/ToastView.swift @@ -60,35 +60,35 @@ struct ToastView: View { .padding(8) case "Success_remove_call_logs": - Text("History has been deleted") + Text("call_history_deleted_toast) .multilineTextAlignment(.center) .foregroundStyle(Color.greenSuccess500) .default_text_style(styleSize: 15) .padding(8) case "Success_clear_logs": - Text("Logs cleared") + Text("help_troubleshooting_debug_logs_cleaned_toast_message") .multilineTextAlignment(.center) .foregroundStyle(Color.greenSuccess500) .default_text_style(styleSize: 15) .padding(8) case "Success_send_logs": - Text("Logs URL copied into clipboard") + Text("debug_logs_copied_to_clipboard_toast") .multilineTextAlignment(.center) .foregroundStyle(Color.greenSuccess500) .default_text_style(styleSize: 15) .padding(8) case "Success_address_copied_into_clipboard": - Text("SIP address copied into clipboard") + Text("sip_address_copied_to_clipboard_toast") .multilineTextAlignment(.center) .foregroundStyle(Color.greenSuccess500) .default_text_style(styleSize: 15) .padding(8) case "Success_message_copied_into_clipboard": - Text("Message copied into clipboard") + Text("message_copied_to_clipboard_toast") .multilineTextAlignment(.center) .foregroundStyle(Color.greenSuccess500) .default_text_style(styleSize: 15) @@ -109,63 +109,56 @@ struct ToastView: View { .padding(8) case "Failed": - Text("Invalid QR code!") + Text("assistant_qr_code_invalid_toast") .multilineTextAlignment(.center) .foregroundStyle(Color.redDanger500) .default_text_style(styleSize: 15) .padding(8) case "Invalide URI": - Text("Invalide URI") + Text("assistant_invalid_uri_toast") .multilineTextAlignment(.center) .foregroundStyle(Color.redDanger500) .default_text_style(styleSize: 15) .padding(8) case "Registration_failed": - Text("The user name or password is incorrects") + Text("assistant_account_login_forbidden_error") .multilineTextAlignment(.center) .foregroundStyle(Color.redDanger500) .default_text_style(styleSize: 15) .padding(8) case "Unavailable_network": - Text("Network is not reachable") + Text("network_not_reachable") .multilineTextAlignment(.center) .foregroundStyle(Color.redDanger500) .default_text_style(styleSize: 15) .padding(8) case "Success_toast_network_connected": - Text("Network is now reachable again") - .multilineTextAlignment(.center) - .foregroundStyle(Color.greenSuccess500) - .default_text_style(styleSize: 15) - .padding(8) - - case "Success_account_logged_out": - Text("Account successfully logged out") + Text("network_not_reachable_again") .multilineTextAlignment(.center) .foregroundStyle(Color.greenSuccess500) .default_text_style(styleSize: 15) .padding(8) case "Success_toast_call_transfer_successful": - Text("Call has been successfully transferred") + Text("call_transfer_successful_toast") .multilineTextAlignment(.center) .foregroundStyle(Color.greenSuccess500) .default_text_style(styleSize: 15) .padding(8) case "Success_toast_call_transfer_in_progress": - Text("Call is being transferred") + Text("call_transfer_in_progress_toast") .multilineTextAlignment(.center) .foregroundStyle(Color.greenSuccess500) .default_text_style(styleSize: 15) .padding(8) case "Success_toast_meeting_deleted": - Text("Successfully removed meeting") + Text("meeting_info_deleted_toast") .multilineTextAlignment(.center) .foregroundStyle(Color.greenSuccess500) .default_text_style(styleSize: 15) @@ -254,7 +247,7 @@ struct ToastView: View { .foregroundStyle(Color.redDanger500) case "Meeting_added_to_calendar": - Text("Meeting added to iPhone calendar") + Text("meeting_exported_as_calendar_event") .multilineTextAlignment(.center) .foregroundStyle(Color.greenSuccess500) .default_text_style(styleSize: 15) diff --git a/Linphone/UI/Main/Meetings/Fragments/ScheduleMeetingFragment.swift b/Linphone/UI/Main/Meetings/Fragments/ScheduleMeetingFragment.swift index 1bce0c251..8cd20bc70 100644 --- a/Linphone/UI/Main/Meetings/Fragments/ScheduleMeetingFragment.swift +++ b/Linphone/UI/Main/Meetings/Fragments/ScheduleMeetingFragment.swift @@ -433,7 +433,7 @@ struct ScheduleMeetingFragment: View { HStack { Spacer() - Text("Cancel") + Text("dialog_cancel") .default_text_style_orange_500(styleSize: 16) .onTapGesture { if isTimeSelection { @@ -442,7 +442,7 @@ struct ScheduleMeetingFragment: View { showDatePicker.toggle() } } - Text("Ok") + Text("dialog_ok") .default_text_style_orange_500(styleSize: 16) .onTapGesture { pickDate()