From e59c9efb09ecd8a75a5472ab665ec5fd1604108c Mon Sep 17 00:00:00 2001 From: QuentinArguillere Date: Mon, 25 Nov 2024 15:40:23 +0100 Subject: [PATCH] Permission translations --- Linphone.xcodeproj/project.pbxproj | 1 + Linphone/Localizable.xcstrings | 155 +++++++++++++++--- .../Fragments/PermissionsFragment.swift | 16 +- 3 files changed, 137 insertions(+), 35 deletions(-) diff --git a/Linphone.xcodeproj/project.pbxproj b/Linphone.xcodeproj/project.pbxproj index 83942e610..cd083517e 100644 --- a/Linphone.xcodeproj/project.pbxproj +++ b/Linphone.xcodeproj/project.pbxproj @@ -1539,6 +1539,7 @@ GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = Linphone/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = Linphone; INFOPLIST_KEY_NSCameraUsageDescription = "Camera usage is required for video VOIP calls"; INFOPLIST_KEY_NSContactsUsageDescription = "Make calls with your friends"; INFOPLIST_KEY_NSMicrophoneUsageDescription = "Microphone usage is required for VOIP calls"; diff --git a/Linphone/Localizable.xcstrings b/Linphone/Localizable.xcstrings index 7dd7a7bfa..c0540bc95 100644 --- a/Linphone/Localizable.xcstrings +++ b/Linphone/Localizable.xcstrings @@ -39,24 +39,12 @@ }, "**%@**" : { - }, - "**Camera** : Pour capturer votre vidéo lors des appels vidéo et conférence." : { - }, "**Company :** %@" : { - }, - "**Contacts** : Pour vous afficher vos contacts et retrouver qui utilise Linphone." : { - }, "**Job :** %@" : { - }, - "**Micro** : Pour permettre à vos correspondants de vous entendre." : { - - }, - "**Notifications** : Pour vous informer quand vous recevez un message ou un appel." : { - }, "#" : { @@ -416,6 +404,134 @@ } } }, + "assistant_permissions_access_camera_title" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "**Access camera:** To capture video during video calls and conferences." + } + }, + "fr" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "**Caméra :** Pour capturer votre vidéo lors des appels et des conférences." + } + } + } + }, + "assistant_permissions_grant_all_of_them" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "OK" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "OK" + } + } + } + }, + "assistant_permissions_post_notifications_title" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "**Post notifications:** To be informed when you receive a message or a call." + } + }, + "fr" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "**Notifications :** Pour vous informer quand vous recevez un message ou un appel." + } + } + } + }, + "assistant_permissions_read_contacts_title" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "**Read contacts:** To display your contacts and find whom is using this app." + } + }, + "fr" : { + "stringUnit" : { + "state" : "needs_review", + "value" : "**Contacts :** Pour vous afficher vos contacts et retrouver qui utilise cette application." + } + } + } + }, + "assistant_permissions_record_audio_title" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "**Record audio:** So your correspondent can hear you and to record voice messages." + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "**Microphone :** Pour permettre à vos correspondants de vous entendre." + } + } + } + }, + "assistant_permissions_skip_permissions" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Do it later" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Plus tard" + } + } + } + }, + "assistant_permissions_subtitle" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "To fully enjoy %@ we need you to grant us the following permissions :" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Pour vous permettre de vous profitez pleinement de %@, nous avons besoin des autorisations suivantes :" + } + } + } + }, + "assistant_permissions_title" : { + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Grant permissions" + } + }, + "fr" : { + "stringUnit" : { + "state" : "translated", + "value" : "Donner les permissions" + } + } + } + }, "Attended transfer" : { }, @@ -1841,9 +1957,6 @@ }, "Could not send ICS invitations to meeting to any participant" : { - }, - "D'accord" : { - }, "Default" : { @@ -1865,9 +1978,6 @@ }, "Delete this contact" : { - }, - "Demande d’autorisations" : { - }, "Deny all" : { @@ -2578,9 +2688,6 @@ } } } - }, - "Meetings" : { - }, "meetings_list_empty" : { "localizations" : { @@ -2961,12 +3068,6 @@ }, "Phone number" : { - }, - "Plus tard" : { - - }, - "Pour vous permettre de vous profitez pleinement de Linphone nous avons besoin des autorisations suivantes :" : { - }, "QR code validated!" : { diff --git a/Linphone/UI/Assistant/Fragments/PermissionsFragment.swift b/Linphone/UI/Assistant/Fragments/PermissionsFragment.swift index 370ae5a38..1058525b3 100644 --- a/Linphone/UI/Assistant/Fragments/PermissionsFragment.swift +++ b/Linphone/UI/Assistant/Fragments/PermissionsFragment.swift @@ -60,14 +60,14 @@ struct PermissionsFragment: View { } .frame(width: geometry.size.width) - Text("Demande d’autorisations") + Text("assistant_permissions_title") .default_text_style_white_800(styleSize: 20) .padding(.top, 20) } .padding(.top, 35) .padding(.bottom, 10) - Text("Pour vous permettre de vous profitez pleinement de Linphone nous avons besoin des autorisations suivantes :") + Text(String(format: String(localized: "assistant_permissions_subtitle"), Bundle.main.displayName)) .default_text_style(styleSize: 15) .multilineTextAlignment(.center) @@ -86,7 +86,7 @@ struct PermissionsFragment: View { .background(Color.grayMain2c200) .cornerRadius(40) - Text("**Notifications** : Pour vous informer quand vous recevez un message ou un appel.") + Text("assistant_permissions_post_notifications_title") .default_text_style(styleSize: 15) .padding(.leading, 10) } @@ -104,7 +104,7 @@ struct PermissionsFragment: View { .background(Color.grayMain2c200) .cornerRadius(40) - Text("**Contacts** : Pour vous afficher vos contacts et retrouver qui utilise Linphone.") + Text("assistant_permissions_read_contacts_title") .default_text_style(styleSize: 15) .padding(.leading, 10) } @@ -122,7 +122,7 @@ struct PermissionsFragment: View { .background(Color.grayMain2c200) .cornerRadius(40) - Text("**Micro** : Pour permettre à vos correspondants de vous entendre.") + Text("assistant_permissions_record_audio_title") .default_text_style(styleSize: 15) .padding(.leading, 10) } @@ -140,7 +140,7 @@ struct PermissionsFragment: View { .background(Color.grayMain2c200) .cornerRadius(40) - Text("**Camera** : Pour capturer votre vidéo lors des appels vidéo et conférence.") + Text("assistant_permissions_access_camera_title") .default_text_style(styleSize: 15) .padding(.leading, 10) } @@ -157,7 +157,7 @@ struct PermissionsFragment: View { sharedMainViewModel.changeWelcomeView() } }, label: { - Text("Plus tard") + Text("assistant_permissions_skip_permissions") .default_text_style_orange_600(styleSize: 20) .frame(height: 35) .frame(maxWidth: .infinity) @@ -176,7 +176,7 @@ struct PermissionsFragment: View { Button { permissionManager.getPermissions() } label: { - Text("D'accord") + Text("assistant_permissions_grant_all_of_them") .default_text_style_white_600(styleSize: 20) .frame(height: 35) .frame(maxWidth: .infinity)