mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 13:37:11 +00:00
Process InfoPlist.strings in Localazy config. (#2249)
Also merge the 2 configs into one using a group to download all strings.
This commit is contained in:
parent
669141b119
commit
af562eabf7
@ -1285,6 +1285,7 @@
|
|||||||
42EEA67A6796BDC2761619C5 /* PaginationIndicatorRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaginationIndicatorRoomTimelineView.swift; sourceTree = "<group>"; };
|
42EEA67A6796BDC2761619C5 /* PaginationIndicatorRoomTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaginationIndicatorRoomTimelineView.swift; sourceTree = "<group>"; };
|
||||||
43A84EE187D0C772E18A4E39 /* VoiceMessageCacheProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VoiceMessageCacheProtocol.swift; sourceTree = "<group>"; };
|
43A84EE187D0C772E18A4E39 /* VoiceMessageCacheProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VoiceMessageCacheProtocol.swift; sourceTree = "<group>"; };
|
||||||
4481799F455B3DA243BDA2AC /* ShareToMapsAppActivity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareToMapsAppActivity.swift; sourceTree = "<group>"; };
|
4481799F455B3DA243BDA2AC /* ShareToMapsAppActivity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareToMapsAppActivity.swift; sourceTree = "<group>"; };
|
||||||
|
44C314C00533E2C297796B60 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
450E04B2A976CC4C8CC1807C /* EmoteRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmoteRoomTimelineItem.swift; sourceTree = "<group>"; };
|
450E04B2A976CC4C8CC1807C /* EmoteRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmoteRoomTimelineItem.swift; sourceTree = "<group>"; };
|
||||||
4525E8C0FBDD27D1ACE90952 /* SecureBackupKeyBackupScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecureBackupKeyBackupScreenViewModelProtocol.swift; sourceTree = "<group>"; };
|
4525E8C0FBDD27D1ACE90952 /* SecureBackupKeyBackupScreenViewModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecureBackupKeyBackupScreenViewModelProtocol.swift; sourceTree = "<group>"; };
|
||||||
4549FCB53F43DB0B278374BC /* TemplateScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemplateScreen.swift; sourceTree = "<group>"; };
|
4549FCB53F43DB0B278374BC /* TemplateScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemplateScreen.swift; sourceTree = "<group>"; };
|
||||||
@ -1574,6 +1575,7 @@
|
|||||||
9B06663F7858E45882E63471 /* StaticLocationScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StaticLocationScreen.swift; sourceTree = "<group>"; };
|
9B06663F7858E45882E63471 /* StaticLocationScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StaticLocationScreen.swift; sourceTree = "<group>"; };
|
||||||
9B65A314DF40B6BBF775C2BC /* AnalyticsPromptScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsPromptScreenCoordinator.swift; sourceTree = "<group>"; };
|
9B65A314DF40B6BBF775C2BC /* AnalyticsPromptScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsPromptScreenCoordinator.swift; sourceTree = "<group>"; };
|
||||||
9B663BE498BB39EADC24025D /* SettingsScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsScreenModels.swift; sourceTree = "<group>"; };
|
9B663BE498BB39EADC24025D /* SettingsScreenModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsScreenModels.swift; sourceTree = "<group>"; };
|
||||||
|
9B7D8D3638864B7482E148CC /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
9C4048041C1A6B20CB97FD18 /* TestMeasurementParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestMeasurementParser.swift; sourceTree = "<group>"; };
|
9C4048041C1A6B20CB97FD18 /* TestMeasurementParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestMeasurementParser.swift; sourceTree = "<group>"; };
|
||||||
9C5E81214D27A6B898FC397D /* ElementX.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ElementX.entitlements; sourceTree = "<group>"; };
|
9C5E81214D27A6B898FC397D /* ElementX.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ElementX.entitlements; sourceTree = "<group>"; };
|
||||||
9C698E30698EC59302A8EEBD /* NavigationStackCoordinatorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationStackCoordinatorTests.swift; sourceTree = "<group>"; };
|
9C698E30698EC59302A8EEBD /* NavigationStackCoordinatorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationStackCoordinatorTests.swift; sourceTree = "<group>"; };
|
||||||
@ -6052,6 +6054,8 @@
|
|||||||
isa = PBXVariantGroup;
|
isa = PBXVariantGroup;
|
||||||
children = (
|
children = (
|
||||||
1215A4FC53D2319E81AE8970 /* en */,
|
1215A4FC53D2319E81AE8970 /* en */,
|
||||||
|
44C314C00533E2C297796B60 /* it */,
|
||||||
|
9B7D8D3638864B7482E148CC /* ru */,
|
||||||
);
|
);
|
||||||
name = InfoPlist.strings;
|
name = InfoPlist.strings;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
@ -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.";
|
||||||
|
@ -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.";
|
@ -0,0 +1,5 @@
|
|||||||
|
"NSCameraUsageDescription" = "Element X требуется доступ к камере, для того чтобы отправлять фото и видно в сообщении";
|
||||||
|
"NSFaceIDUsageDescription" = "Для доступа к приложению используется Face ID.";
|
||||||
|
"NSLocationWhenInUseUsageDescription" = "Element X необходимо предоставить разрешения для отправки местоположения.";
|
||||||
|
"NSMicrophoneUsageDescription" = "%s необходимо предоставить доступ к микрофону, для отправки аудиосообщений.";
|
||||||
|
"NSPhotoLibraryUsageDescription" = "Разрешить сохранять фотографии и видео в библиотеку.";
|
@ -13,8 +13,8 @@ struct DownloadStrings: ParsableCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func localazyDownload() throws {
|
private func localazyDownload() throws {
|
||||||
let json = allLanguages ? "localazy-all.json" : "localazy-en.json"
|
let arguments = allLanguages ? " all" : ""
|
||||||
try Utilities.zsh("localazy download --config \(json)")
|
try Utilities.zsh("localazy download\(arguments)")
|
||||||
}
|
}
|
||||||
|
|
||||||
private func swiftgen() throws {
|
private func swiftgen() throws {
|
||||||
|
1
changelog.d/2100.build
Normal file
1
changelog.d/2100.build
Normal file
@ -0,0 +1 @@
|
|||||||
|
Add support for InfoPlist.strings conversion from Localazy.
|
@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
94
localazy.json
Normal file
94
localazy.json
Normal file
@ -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"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user