From c29175d1f924e58b9646a200dbab0301fce3c258 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Wed, 15 Jan 2025 14:31:48 +0200 Subject: [PATCH] Support double-length pseudlanguage in fallback translations and update snapshots for en-us. --- ElementX/Sources/Generated/Strings.swift | 6 +++++- .../View/SessionVerificationScreen.swift | 2 +- .../test_advancedSettingsScreen-iPad-pseudo.1.png | 4 ++-- .../test_advancedSettingsScreen-iPhone-16-pseudo.1.png | 4 ++-- .../PreviewTests/test_homeScreen-iPad-pseudo.Loaded.png | 4 ++-- ..._qRCodeLoginScreen-iPad-pseudo.Connection-not-secure.png | 4 ++-- ...deLoginScreen-iPhone-16-pseudo.Connection-not-secure.png | 4 ++-- .../test_roomDetailsScreen-iPad-pseudo.DM-Room.png | 4 ++-- .../test_roomDetailsScreen-iPad-pseudo.Generic-Room.png | 4 ++-- .../test_roomDetailsScreen-iPad-pseudo.Simple-Room.png | 4 ++-- .../test_roomDetailsScreen-iPhone-16-pseudo.DM-Room.png | 4 ++-- ...test_roomDetailsScreen-iPhone-16-pseudo.Generic-Room.png | 4 ++-- .../test_roomDetailsScreen-iPhone-16-pseudo.Simple-Room.png | 4 ++-- .../PreviewTests/test_roomListFilterView-iPad-en-GB.1.png | 4 ++-- .../PreviewTests/test_roomListFilterView-iPad-en-GB.2.png | 4 ++-- .../PreviewTests/test_roomListFilterView-iPad-pseudo.1.png | 4 ++-- .../PreviewTests/test_roomListFilterView-iPad-pseudo.2.png | 4 ++-- .../test_roomListFilterView-iPhone-16-en-GB.1.png | 2 +- .../test_roomListFilterView-iPhone-16-en-GB.2.png | 4 ++-- .../test_roomListFilterView-iPhone-16-pseudo.1.png | 4 ++-- .../test_roomListFilterView-iPhone-16-pseudo.2.png | 2 +- .../test_roomListFiltersEmptyStateView-iPad-pseudo.1.png | 4 ++-- ...est_roomListFiltersEmptyStateView-iPhone-16-pseudo.1.png | 4 ++-- .../PreviewTests/test_roomListFiltersView-iPad-en-GB.1.png | 4 ++-- .../PreviewTests/test_roomListFiltersView-iPad-pseudo.1.png | 4 ++-- .../PreviewTests/test_roomListFiltersView-iPad-pseudo.2.png | 4 ++-- .../test_roomListFiltersView-iPhone-16-en-GB.1.png | 4 ++-- .../test_roomListFiltersView-iPhone-16-pseudo.1.png | 4 ++-- .../test_roomListFiltersView-iPhone-16-pseudo.2.png | 4 ++-- .../test_serverConfirmationScreen-iPad-pseudo.Login.png | 4 ++-- ...test_serverConfirmationScreen-iPhone-16-pseudo.Login.png | 4 ++-- .../Templates/Strings/structured-swift5-element.stencil | 6 +++++- 32 files changed, 67 insertions(+), 59 deletions(-) diff --git a/ElementX/Sources/Generated/Strings.swift b/ElementX/Sources/Generated/Strings.swift index bb7007bc6b..0dc4dcaa6b 100644 --- a/ElementX/Sources/Generated/Strings.swift +++ b/ElementX/Sources/Generated/Strings.swift @@ -2798,7 +2798,11 @@ extension L10n { guard let bundle = Bundle.lprojBundle(for: language) else { return nil } let format = NSLocalizedString(key, tableName: table, bundle: bundle, comment: "") let translation = String(format: format, locale: Locale(identifier: language), arguments: args) - guard translation != key else { return nil } + guard translation != key, + translation != "\(key) \(key)" // Handle double pseudo for tests + else { + return nil + } return translation } } diff --git a/ElementX/Sources/Screens/Onboarding/SessionVerificationScreen/View/SessionVerificationScreen.swift b/ElementX/Sources/Screens/Onboarding/SessionVerificationScreen/View/SessionVerificationScreen.swift index 8216becae9..891ba3a66d 100644 --- a/ElementX/Sources/Screens/Onboarding/SessionVerificationScreen/View/SessionVerificationScreen.swift +++ b/ElementX/Sources/Screens/Onboarding/SessionVerificationScreen/View/SessionVerificationScreen.swift @@ -162,7 +162,7 @@ struct SessionVerificationScreen: View { VStack(spacing: 16.0) { Text(emoji.symbol) .font(.compound.headingXLBold) - Text(emoji.localizedDescription) + Text(emoji.localizedDescription.capitalized) .font(.compound.bodyMD) .foregroundColor(.compound.textSecondary) } diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_advancedSettingsScreen-iPad-pseudo.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_advancedSettingsScreen-iPad-pseudo.1.png index ee91d09f82..4eb9ab1dbf 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_advancedSettingsScreen-iPad-pseudo.1.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_advancedSettingsScreen-iPad-pseudo.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e71fa4df1e53f4fde23993f2242cc6c1cf239a78bf4a9b46aa1f982f32ae680d -size 159915 +oid sha256:57b1efef6213243fdf44df0ff92c086e5997c42df2ad6065cd2d31c41df84543 +size 159487 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_advancedSettingsScreen-iPhone-16-pseudo.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_advancedSettingsScreen-iPhone-16-pseudo.1.png index e46e2828f5..38e3d92df9 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_advancedSettingsScreen-iPhone-16-pseudo.1.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_advancedSettingsScreen-iPhone-16-pseudo.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:94b8e86129726c0f05a02136b7afa70cb0ae080896d4bc67841dbfa81e7fc3ac -size 127155 +oid sha256:8aeb3ce65022cdfc26f7f4c87166cb58b76cf48645d4c7069d8c4fe12577788c +size 126940 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreen-iPad-pseudo.Loaded.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreen-iPad-pseudo.Loaded.png index c714ec38fd..160bdec4d8 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreen-iPad-pseudo.Loaded.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreen-iPad-pseudo.Loaded.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:10e904ca1164aba89afcc4206f7f925e3b4e6cb16a87e56bb8563b34d8015ac2 -size 247441 +oid sha256:224f0503395f64605bcb29892f243bb2afddb09331b519ef3b85cc5431684c43 +size 247192 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_qRCodeLoginScreen-iPad-pseudo.Connection-not-secure.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_qRCodeLoginScreen-iPad-pseudo.Connection-not-secure.png index 2a20826921..d79e3fb8f8 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_qRCodeLoginScreen-iPad-pseudo.Connection-not-secure.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_qRCodeLoginScreen-iPad-pseudo.Connection-not-secure.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5355925a6e3145c780034847cf41e4255be3c6dd98fcae06e662579b9e2a2986 -size 212206 +oid sha256:ed114f2f1083fe087a5ec7c1c07cc6218b7df78f586fe4bd6cefc0532bbf69c5 +size 213028 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_qRCodeLoginScreen-iPhone-16-pseudo.Connection-not-secure.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_qRCodeLoginScreen-iPhone-16-pseudo.Connection-not-secure.png index 3541b0bf41..9fad0b6c74 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_qRCodeLoginScreen-iPhone-16-pseudo.Connection-not-secure.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_qRCodeLoginScreen-iPhone-16-pseudo.Connection-not-secure.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7363eb88a746c17c4465f6c951aa88f6d42fab58e35173388cec6766f6f2fd88 -size 165735 +oid sha256:d429b4b3121370fcceed80ad37320e6f37cfbe410ab509fe73e3a4c3f41afaea +size 168105 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomDetailsScreen-iPad-pseudo.DM-Room.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomDetailsScreen-iPad-pseudo.DM-Room.png index e14ef85718..6f1f08408f 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomDetailsScreen-iPad-pseudo.DM-Room.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomDetailsScreen-iPad-pseudo.DM-Room.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a9a91f791358737b68ab3695f523c6b821ab84387d6857ed6cf0b01c824d68cc -size 238682 +oid sha256:6f1fa21072fc9fb7e5246d47c0b1fe52fc06451616edb4f5a85b5f8110a5113a +size 238539 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomDetailsScreen-iPad-pseudo.Generic-Room.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomDetailsScreen-iPad-pseudo.Generic-Room.png index 4ccfbfcb69..dd44791cdd 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomDetailsScreen-iPad-pseudo.Generic-Room.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomDetailsScreen-iPad-pseudo.Generic-Room.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2fd20f58c64f70ad239a1931bd641d5dae44fac435019bf7636a8242bb8ecf17 -size 181091 +oid sha256:05a8e9e9769c35b9ca60bad91a2a0308250d83a71f71ce6b8a8373fcd239c7e5 +size 180960 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomDetailsScreen-iPad-pseudo.Simple-Room.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomDetailsScreen-iPad-pseudo.Simple-Room.png index b3d8ffca8c..5466f9a090 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomDetailsScreen-iPad-pseudo.Simple-Room.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomDetailsScreen-iPad-pseudo.Simple-Room.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ebe7c2ae984e6708d2bb380de749bed6cf6ad057617f2376a8eb732cfdf4c82b -size 161418 +oid sha256:c5c714db6abd94fad23c8bc4031dce16fcb7203f368b390cba3212122093df04 +size 161271 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomDetailsScreen-iPhone-16-pseudo.DM-Room.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomDetailsScreen-iPhone-16-pseudo.DM-Room.png index 97ecf093ed..11cf088d65 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomDetailsScreen-iPhone-16-pseudo.DM-Room.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomDetailsScreen-iPhone-16-pseudo.DM-Room.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f3f7e031b232f5b3e3222f689038c935f2d4e2625bf5ae2e8097525da4e49102 -size 181635 +oid sha256:a84ba5be353189c201895cd8be4892d91a9c8da26145bcdaf20b0ae5c2939528 +size 181603 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomDetailsScreen-iPhone-16-pseudo.Generic-Room.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomDetailsScreen-iPhone-16-pseudo.Generic-Room.png index 0944f23bc8..6fe1828edb 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomDetailsScreen-iPhone-16-pseudo.Generic-Room.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomDetailsScreen-iPhone-16-pseudo.Generic-Room.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8d89c461638b63209b79f5c4161fa87fb2bb95a6f1d340a5157a0fdafa32a28c -size 124126 +oid sha256:6f08725ed811cbd9dfbb7263195059179f5a8f3746f0a66efb42ad2058ef8db1 +size 124080 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomDetailsScreen-iPhone-16-pseudo.Simple-Room.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomDetailsScreen-iPhone-16-pseudo.Simple-Room.png index 92da8eadc5..f6cc674992 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomDetailsScreen-iPhone-16-pseudo.Simple-Room.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomDetailsScreen-iPhone-16-pseudo.Simple-Room.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:00cb4122a842fcad06774e2887681531bed4968b536c677fd010ebe223488086 -size 112130 +oid sha256:5cea213feaca53f880ff8e40898d4634e0cbc2cd26b1c2e3f9570328112a3ba2 +size 112092 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPad-en-GB.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPad-en-GB.1.png index c4f743b7f6..4d16f8330c 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPad-en-GB.1.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPad-en-GB.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:81089e267eb08187da43f6a3fec90855fe7d3ad7513abc57b99f71c26562f851 -size 71422 +oid sha256:6aef9b852a17b388c55f255c714a6e1f33d287401aed131198e1a12aad5ae171 +size 71442 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPad-en-GB.2.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPad-en-GB.2.png index 4d290d4f27..3d622c0c0a 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPad-en-GB.2.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPad-en-GB.2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:95c0091b39f9435d70022687ffbe2065b65962708d8fe814d32f11f7e7a133cd -size 70420 +oid sha256:ae83af6ce9c9c917f0bb8700314049eec870be40b2d9937d58f4aba5bdbdddda +size 70422 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPad-pseudo.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPad-pseudo.1.png index 454a7c80d7..9bfee97772 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPad-pseudo.1.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPad-pseudo.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:52da7394e29096bb3b0d91aea0bf536ba566ae0d9598ed997a94605162bf43ae -size 71084 +oid sha256:b4c68ba96ee3915fc4ca1f47c11077c8d5888a886dac27f0c0831f350866ddb6 +size 71093 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPad-pseudo.2.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPad-pseudo.2.png index 83e3c1ecaf..568eedcb28 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPad-pseudo.2.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPad-pseudo.2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4f8bee191ab20cae1bc2418859e3adee4b6487204a63dbceca52f13fa76190af -size 70076 +oid sha256:7ac729da7cd7a56fd56eaf8e29de0cd8a961cead30364a7c972fba2208c7535c +size 70063 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPhone-16-en-GB.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPhone-16-en-GB.1.png index 609947969b..d817f5d0b3 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPhone-16-en-GB.1.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPhone-16-en-GB.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e4569a550eb1f059f4b8f0c2a68cb17c2089f6cc7ed58a5f0455341943f3b8d3 +oid sha256:0e0dc080002ef87fe30502a4954dd118b1f7b17cff0da75aee4e2725828294f3 size 30992 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPhone-16-en-GB.2.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPhone-16-en-GB.2.png index b5b6ce574d..f2f05a2dcc 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPhone-16-en-GB.2.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPhone-16-en-GB.2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:11676d27897d8a94dc2d66fa1a02aa66f55d908000dd445bb192d62867ec9218 -size 30257 +oid sha256:c2dbc609b3d6dfb7d59d15ac9256495b57f7d432330b35db8da77af665b327cd +size 30261 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPhone-16-pseudo.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPhone-16-pseudo.1.png index 0fd7a08a25..0fdff2b79d 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPhone-16-pseudo.1.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPhone-16-pseudo.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:226ae34e1335c3cc1c50c2f9da69d4aa0f7f0d59b69a6b885c376950df915d54 -size 32963 +oid sha256:d63682d90a5a54a76f03c4bb9315784e2e73a82a2d5f6389013bc212eb3e023f +size 32974 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPhone-16-pseudo.2.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPhone-16-pseudo.2.png index 1aa6206c4b..6352863e01 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPhone-16-pseudo.2.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFilterView-iPhone-16-pseudo.2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b26650e65aceee70b06e31f5671ef66510f27e0b513d4c3d02329ff3d88336aa +oid sha256:a9964a51f3463d546b448f1e297cfa799299534b1308d8d882c21d1f64031b95 size 31912 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersEmptyStateView-iPad-pseudo.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersEmptyStateView-iPad-pseudo.1.png index 269577763f..e14cce07da 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersEmptyStateView-iPad-pseudo.1.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersEmptyStateView-iPad-pseudo.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5fba66f49a4dd71ffd7f0c6d44765e4cbd317edf3dd5ff0c3a45cf8966eed4b0 -size 206984 +oid sha256:a47d1a0cb409ed8974781aa1a7af3d5ae4d6ca72234a649417a66cc5b301637d +size 207102 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersEmptyStateView-iPhone-16-pseudo.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersEmptyStateView-iPhone-16-pseudo.1.png index 2990242c43..029709a59c 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersEmptyStateView-iPhone-16-pseudo.1.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersEmptyStateView-iPhone-16-pseudo.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:207c708c4f68f824f36d286775ccead89bbd66bab901e749f8b8195a70e05194 -size 275660 +oid sha256:821ed985065f371e0cd0c0016ac4e0acf73732603cc83927ecf369dc692ff07e +size 276396 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersView-iPad-en-GB.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersView-iPad-en-GB.1.png index aa81e9d2f1..3a360cb21a 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersView-iPad-en-GB.1.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersView-iPad-en-GB.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9abebe20316d5415fa97fd8320e2aea60b088ba474f203055e408b05807a3db5 -size 77993 +oid sha256:0446709fcdaf2eb88fb66a2dea0189d283a9547c352999465eba7d2d7d519d94 +size 77975 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersView-iPad-pseudo.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersView-iPad-pseudo.1.png index 9c58f81721..534446df1f 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersView-iPad-pseudo.1.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersView-iPad-pseudo.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:589d48698c6ecf5ecb947c3f275d864e44dff9b02ec6f70f88c0def34b29de02 -size 80347 +oid sha256:20b36970120ca4fa32777d5840b49fc72770a54b5e9e9e8d525fa9b8033a4c20 +size 80077 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersView-iPad-pseudo.2.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersView-iPad-pseudo.2.png index b63a16d5e2..bfb156ced4 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersView-iPad-pseudo.2.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersView-iPad-pseudo.2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4ce9aded8dd8cc2efe4261577d391057c04d28343230f5d4cdb84723c0816240 -size 80946 +oid sha256:c2807c7d75231d9838c6e930645671a6f9eaad6e8e45a02675728998c805bd4f +size 80651 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersView-iPhone-16-en-GB.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersView-iPhone-16-en-GB.1.png index c125f98e7b..f92d158412 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersView-iPhone-16-en-GB.1.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersView-iPhone-16-en-GB.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:14cb4d904a9c4a284952bae254d4b8d6dd5ea1bbbee1b0ffd97c6a398444c77e -size 36343 +oid sha256:3dca38d0a7783485fb9a81be7fabd20d575c1683302f414083b4e2285d23d2ad +size 36371 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersView-iPhone-16-pseudo.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersView-iPhone-16-pseudo.1.png index fa14be7abe..c0d9100987 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersView-iPhone-16-pseudo.1.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersView-iPhone-16-pseudo.1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:459817b479ac817cda8a1d65a662e52275cbd44a5cdd9e3e42214e3e3d1ecdd4 -size 37177 +oid sha256:d25432a37a41bb8d169efa057e08d8279b9be302c5e50a9325e517fe28b61419 +size 37206 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersView-iPhone-16-pseudo.2.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersView-iPhone-16-pseudo.2.png index b1e1ddf5fe..9e277379ca 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersView-iPhone-16-pseudo.2.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_roomListFiltersView-iPhone-16-pseudo.2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8b1bf5c8b6e2f4335a3d222e5e251edd48b97be4ba2f467d5b54bcf8c88753bc -size 34985 +oid sha256:5723fb0f2726284ce39ac49c6ff1ef7faf809862fe98e4262e742c1c5f98acbf +size 35427 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_serverConfirmationScreen-iPad-pseudo.Login.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_serverConfirmationScreen-iPad-pseudo.Login.png index 2544aa36e5..6fb651fc5d 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_serverConfirmationScreen-iPad-pseudo.Login.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_serverConfirmationScreen-iPad-pseudo.Login.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d3ba91d70369f65259c8200e796c3de3fad1a290740aa82e36bff89a0e45565 -size 119906 +oid sha256:bd4ab23f0c253087af15eb68953cbf7509f2ce65f5abf3eefd6568a18234e551 +size 119931 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_serverConfirmationScreen-iPhone-16-pseudo.Login.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_serverConfirmationScreen-iPhone-16-pseudo.Login.png index a4dbaca01e..c03efed82f 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_serverConfirmationScreen-iPhone-16-pseudo.Login.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_serverConfirmationScreen-iPhone-16-pseudo.Login.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5e5152dd16d06c592d0f6f2181790da2f0d06814c4efd36a70bff9712e99e7a5 -size 86985 +oid sha256:d22f168e1d09cc25655df8b573edde7782c3f66c668d5b4d3ba7ee743c5cbb4a +size 86853 diff --git a/Tools/SwiftGen/Templates/Strings/structured-swift5-element.stencil b/Tools/SwiftGen/Templates/Strings/structured-swift5-element.stencil index 6f9b11b52a..74a5da0767 100644 --- a/Tools/SwiftGen/Templates/Strings/structured-swift5-element.stencil +++ b/Tools/SwiftGen/Templates/Strings/structured-swift5-element.stencil @@ -90,7 +90,11 @@ extension {{enumName}} { guard let bundle = Bundle.lprojBundle(for: language) else { return nil } let format = NSLocalizedString(key, tableName: table, bundle: bundle, comment: "") let translation = String(format: format, locale: Locale(identifier: language), arguments: args) - guard translation != key else { return nil } + guard translation != key, + translation != "\(key) \(key)" // Handle double pseudo for tests + else { + return nil + } return translation } }