From 66f78a352aff15f50072fca75fb95a08793be0ca Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Sun, 20 Jul 2025 12:58:48 +0100 Subject: [PATCH] Update localization --- Telegram/Telegram-iOS/en.lproj/Localizable.strings | 3 +++ .../FaceScanScreen/Sources/AgeVerificationScreen.swift | 9 +++++++-- .../FaceScanScreen/Sources/FaceScanScreen.swift | 8 ++++---- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings index 4b38240318..7051fae35d 100644 --- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings @@ -14745,3 +14745,6 @@ Sorry for the inconvenience."; "AgeVerification.Fail.Title" = "Age check failed"; "AgeVerification.Fail.Text" = "Sorry, you can't view this content."; + +"FaceScan.Instruction.Position" = "Position your face\nwithin the frame"; +"FaceScan.Instruction.Rotate" = "Move your head slowly to\ncomplete the circle"; diff --git a/submodules/TelegramUI/Components/FaceScanScreen/Sources/AgeVerificationScreen.swift b/submodules/TelegramUI/Components/FaceScanScreen/Sources/AgeVerificationScreen.swift index f04f01ed90..efb8d18c65 100644 --- a/submodules/TelegramUI/Components/FaceScanScreen/Sources/AgeVerificationScreen.swift +++ b/submodules/TelegramUI/Components/FaceScanScreen/Sources/AgeVerificationScreen.swift @@ -162,8 +162,13 @@ private final class SheetContent: CombinedComponent { return (TelegramTextAttributes.URL, contents) }) - //TODO:localize - let textString = "To access this content, you must confirm you are at least **18** years old as required by UK law.\n\nThis is a one-time process using your phone's camera. Your selfie will not be stored by Telegram." + var textString = environment.strings.AgeVerification_Text + if let code = component.context.currentAppConfiguration.with({ $0 }).data?["verify_age_country"] as? String { + let key = "AgeVerification.Text.\(code)" + if let string = environment.strings.primaryComponent.dict[key] { + textString = string + } + } let text = text.update( component: BalancedTextComponent( diff --git a/submodules/TelegramUI/Components/FaceScanScreen/Sources/FaceScanScreen.swift b/submodules/TelegramUI/Components/FaceScanScreen/Sources/FaceScanScreen.swift index 936b807798..334469152d 100644 --- a/submodules/TelegramUI/Components/FaceScanScreen/Sources/FaceScanScreen.swift +++ b/submodules/TelegramUI/Components/FaceScanScreen/Sources/FaceScanScreen.swift @@ -458,7 +458,7 @@ final class FaceScanScreenComponent: Component { self.frameView.update(size: frameViewFrame.size) //TODO:localize - var instructionString = "Position your face\nwithin the frame" + var instructionString = environment.strings.FaceScan_Instruction_Position switch self.processState { case .waitingForFace, .positioning: self.frameView.update(state: .viewFinder, intermediateCompletion: { [weak self] in @@ -467,13 +467,13 @@ final class FaceScanScreenComponent: Component { self.state?.updated(transition: .spring(duration: 0.3)) } }, transition: .spring(duration: 0.3)) - instructionString = "Position your face\nwithin the frame" + instructionString = environment.strings.FaceScan_Instruction_Position case .readyToStart: self.frameView.update(state: .segments(Set()), transition: .spring(duration: 0.3)) - instructionString = "Move your head slowly to\ncomplete the circle" + instructionString = environment.strings.FaceScan_Instruction_Rotate case .tracking: self.frameView.update(state: .segments(self.completedAngles), transition: .spring(duration: 0.3)) - instructionString = "Move your head slowly to\ncomplete the circle" + instructionString = environment.strings.FaceScan_Instruction_Rotate case .completed: self.frameView.update(state: .success, transition: .spring(duration: 0.3)) instructionString = ""