diff --git a/ElementX.xcodeproj/project.pbxproj b/ElementX.xcodeproj/project.pbxproj index b051f2275..029f0d598 100644 --- a/ElementX.xcodeproj/project.pbxproj +++ b/ElementX.xcodeproj/project.pbxproj @@ -1285,6 +1285,7 @@ 42EEA67A6796BDC2761619C5 /* PaginationIndicatorRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaginationIndicatorRoomTimelineView.swift; sourceTree = ""; }; 43A84EE187D0C772E18A4E39 /* VoiceMessageCacheProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VoiceMessageCacheProtocol.swift; sourceTree = ""; }; 4481799F455B3DA243BDA2AC /* ShareToMapsAppActivity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareToMapsAppActivity.swift; sourceTree = ""; }; + 44C314C00533E2C297796B60 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/InfoPlist.strings; sourceTree = ""; }; 450E04B2A976CC4C8CC1807C /* EmoteRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmoteRoomTimelineItem.swift; sourceTree = ""; }; 4525E8C0FBDD27D1ACE90952 /* SecureBackupKeyBackupScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecureBackupKeyBackupScreenViewModelProtocol.swift; sourceTree = ""; }; 4549FCB53F43DB0B278374BC /* TemplateScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemplateScreen.swift; sourceTree = ""; }; @@ -1574,6 +1575,7 @@ 9B06663F7858E45882E63471 /* StaticLocationScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StaticLocationScreen.swift; sourceTree = ""; }; 9B65A314DF40B6BBF775C2BC /* AnalyticsPromptScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsPromptScreenCoordinator.swift; sourceTree = ""; }; 9B663BE498BB39EADC24025D /* SettingsScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsScreenModels.swift; sourceTree = ""; }; + 9B7D8D3638864B7482E148CC /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/InfoPlist.strings; sourceTree = ""; }; 9C4048041C1A6B20CB97FD18 /* TestMeasurementParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestMeasurementParser.swift; sourceTree = ""; }; 9C5E81214D27A6B898FC397D /* ElementX.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ElementX.entitlements; sourceTree = ""; }; 9C698E30698EC59302A8EEBD /* NavigationStackCoordinatorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationStackCoordinatorTests.swift; sourceTree = ""; }; @@ -6052,6 +6054,8 @@ isa = PBXVariantGroup; children = ( 1215A4FC53D2319E81AE8970 /* en */, + 44C314C00533E2C297796B60 /* it */, + 9B7D8D3638864B7482E148CC /* ru */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/ElementX/Resources/Localizations/en.lproj/InfoPlist.strings b/ElementX/Resources/Localizations/en.lproj/InfoPlist.strings index 4352f822e..47f84ab95 100644 --- a/ElementX/Resources/Localizations/en.lproj/InfoPlist.strings +++ b/ElementX/Resources/Localizations/en.lproj/InfoPlist.strings @@ -1 +1,5 @@ -"NSPhotoLibraryUsageDescription" = "The photo library is used to send photos and videos."; +"NSCameraUsageDescription" = "To take pictures or videos and send them as a message Element X needs access to the camera."; +"NSFaceIDUsageDescription" = "Face ID is used to access your app."; +"NSLocationWhenInUseUsageDescription" = "Grant location access so that Element X can share your location."; +"NSMicrophoneUsageDescription" = "To record and send messages with audio, Element X needs to access the microphone."; +"NSPhotoLibraryUsageDescription" = "Allows saving photos and videos to your library."; diff --git a/ElementX/Resources/Localizations/it.lproj/InfoPlist.strings b/ElementX/Resources/Localizations/it.lproj/InfoPlist.strings new file mode 100644 index 000000000..1ca8dfaaa --- /dev/null +++ b/ElementX/Resources/Localizations/it.lproj/InfoPlist.strings @@ -0,0 +1,5 @@ +"NSCameraUsageDescription" = "Per scattare foto o video e inviarli come messaggio, Element X deve accedere alla fotocamera."; +"NSFaceIDUsageDescription" = "Face ID viene utilizzato per accedere alla tua app."; +"NSLocationWhenInUseUsageDescription" = "Concedi l'accesso alla posizione in modo che Element X possa condividere la tua posizione."; +"NSMicrophoneUsageDescription" = "Per registrare e inviare messaggi con audio, Element X deve accedere al microfono."; +"NSPhotoLibraryUsageDescription" = "Consente di salvare foto e video nella tua libreria."; diff --git a/ElementX/Resources/Localizations/ru.lproj/InfoPlist.strings b/ElementX/Resources/Localizations/ru.lproj/InfoPlist.strings new file mode 100644 index 000000000..c6ce47ca3 --- /dev/null +++ b/ElementX/Resources/Localizations/ru.lproj/InfoPlist.strings @@ -0,0 +1,5 @@ +"NSCameraUsageDescription" = "Element X требуется доступ к камере, для того чтобы отправлять фото и видно в сообщении"; +"NSFaceIDUsageDescription" = "Для доступа к приложению используется Face ID."; +"NSLocationWhenInUseUsageDescription" = "Element X необходимо предоставить разрешения для отправки местоположения."; +"NSMicrophoneUsageDescription" = "%s необходимо предоставить доступ к микрофону, для отправки аудиосообщений."; +"NSPhotoLibraryUsageDescription" = "Разрешить сохранять фотографии и видео в библиотеку."; diff --git a/Tools/Sources/DownloadStrings.swift b/Tools/Sources/DownloadStrings.swift index faa8bb98a..b1f457624 100644 --- a/Tools/Sources/DownloadStrings.swift +++ b/Tools/Sources/DownloadStrings.swift @@ -13,8 +13,8 @@ struct DownloadStrings: ParsableCommand { } private func localazyDownload() throws { - let json = allLanguages ? "localazy-all.json" : "localazy-en.json" - try Utilities.zsh("localazy download --config \(json)") + let arguments = allLanguages ? " all" : "" + try Utilities.zsh("localazy download\(arguments)") } private func swiftgen() throws { diff --git a/changelog.d/2100.build b/changelog.d/2100.build new file mode 100644 index 000000000..9ca99eac0 --- /dev/null +++ b/changelog.d/2100.build @@ -0,0 +1 @@ +Add support for InfoPlist.strings conversion from Localazy. \ No newline at end of file diff --git a/localazy-all.json b/localazy-all.json deleted file mode 100644 index 07ca5e542..000000000 --- a/localazy-all.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "readKey": "a7876306080832595063-aa37154bb3772f6146890fca868d155b2228b492c56c91f67abdcdfb74d6142d", - - "conversion": { - "actions": [ - { - "type": "ios-strings", - "output": "ElementX/Resources/Localizations/${iosLprojFolder}/Localizable.strings", - "excludeKeys": ["REGEX:.*_android"], - "filterPlurals": true, - "replacements": { - "%s": "%@", - "$s": "$@" - }, - "params": { - "flatten_keys": "underscore" - } - }, - { - "type": "ios-stringsdict", - "output": "ElementX/Resources/Localizations/${iosLprojFolder}/Localizable.stringsdict", - "excludeKeys": ["REGEX:.*_android"], - "replacements": { - "%s": "%@", - "$s": "$@" - }, - "params": { - "variable": "COUNT", - "flatten_keys": "underscore" - } - } - ] - } -} diff --git a/localazy-en.json b/localazy-en.json deleted file mode 100644 index 96d98e871..000000000 --- a/localazy-en.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "readKey": "a7876306080832595063-aa37154bb3772f6146890fca868d155b2228b492c56c91f67abdcdfb74d6142d", - - "conversion": { - "actions": [ - { - "type": "ios-strings", - "output": "ElementX/Resources/Localizations/${iosLprojFolder}/Localizable.strings", - "excludeKeys": ["REGEX:.*_android"], - "conditions": [ - "equals: ${languageCode}, en" - ], - "filterPlurals": true, - "replacements": { - "%s": "%@", - "$s": "$@" - }, - "params": { - "flatten_keys": "underscore" - } - }, - { - "type": "ios-stringsdict", - "output": "ElementX/Resources/Localizations/${iosLprojFolder}/Localizable.stringsdict", - "excludeKeys": ["REGEX:.*_android"], - "conditions": [ - "equals: ${languageCode}, en" - ], - "replacements": { - "%s": "%@", - "$s": "$@" - }, - "params": { - "variable": "COUNT", - "flatten_keys": "underscore" - } - } - ] - } -} diff --git a/localazy.json b/localazy.json new file mode 100644 index 000000000..3158afc15 --- /dev/null +++ b/localazy.json @@ -0,0 +1,94 @@ +{ + "readKey": "a7876306080832595063-aa37154bb3772f6146890fca868d155b2228b492c56c91f67abdcdfb74d6142d", + + "conversion": { + "actions": [ + { + "type": "ios-strings", + "output": "ElementX/Resources/Localizations/${iosLprojFolder}/Localizable.strings", + "excludeKeys": ["REGEX:.*_android"], + "conditions": [ + "equals: ${languageCode}, en | equals: ${file}, content.json" + ], + "filterPlurals": true, + "replacements": { + "%s": "%@", + "$s": "$@" + }, + "params": { + "flatten_keys": "underscore" + } + }, + { + "type": "ios-stringsdict", + "output": "ElementX/Resources/Localizations/${iosLprojFolder}/Localizable.stringsdict", + "excludeKeys": ["REGEX:.*_android"], + "conditions": [ + "equals: ${languageCode}, en | equals: ${file}, content.json" + ], + "replacements": { + "%s": "%@", + "$s": "$@" + }, + "params": { + "variable": "COUNT", + "flatten_keys": "underscore" + } + }, + { + "type": "ios-strings", + "changeExtension": "strings", + "output": "ElementX/Resources/Localizations/${iosLprojFolder}/${file}", + "conditions": [ + "equals: ${languageCode}, en | equals: ${file}, InfoPlist.json" + ] + }, + + + + { + "group": "all", + "type": "ios-strings", + "output": "ElementX/Resources/Localizations/${iosLprojFolder}/Localizable.strings", + "excludeKeys": ["REGEX:.*_android"], + "conditions": [ + "!equals: ${languageCode}, en | equals: ${file}, content.json" + ], + "filterPlurals": true, + "replacements": { + "%s": "%@", + "$s": "$@" + }, + "params": { + "flatten_keys": "underscore" + } + }, + { + "group": "all", + "type": "ios-stringsdict", + "output": "ElementX/Resources/Localizations/${iosLprojFolder}/Localizable.stringsdict", + "excludeKeys": ["REGEX:.*_android"], + "conditions": [ + "!equals: ${languageCode}, en | equals: ${file}, content.json" + ], + "replacements": { + "%s": "%@", + "$s": "$@" + }, + "params": { + "variable": "COUNT", + "flatten_keys": "underscore" + } + }, + { + "group": "all", + "type": "ios-strings", + "changeExtension": "strings", + "output": "ElementX/Resources/Localizations/${iosLprojFolder}/${file}", + "conditions": [ + "!equals: ${languageCode}, en | equals: ${file}, InfoPlist.json" + ] + } + ] + } +}