Update localization

This commit is contained in:
Ilya Laktyushin 2025-07-20 12:58:48 +01:00
parent e7e2fa1e83
commit 66f78a352a
3 changed files with 14 additions and 6 deletions

View File

@ -14745,3 +14745,6 @@ Sorry for the inconvenience.";
"AgeVerification.Fail.Title" = "Age check failed"; "AgeVerification.Fail.Title" = "Age check failed";
"AgeVerification.Fail.Text" = "Sorry, you can't view this content."; "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";

View File

@ -162,8 +162,13 @@ private final class SheetContent: CombinedComponent {
return (TelegramTextAttributes.URL, contents) return (TelegramTextAttributes.URL, contents)
}) })
//TODO:localize var textString = environment.strings.AgeVerification_Text
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." 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( let text = text.update(
component: BalancedTextComponent( component: BalancedTextComponent(

View File

@ -458,7 +458,7 @@ final class FaceScanScreenComponent: Component {
self.frameView.update(size: frameViewFrame.size) self.frameView.update(size: frameViewFrame.size)
//TODO:localize //TODO:localize
var instructionString = "Position your face\nwithin the frame" var instructionString = environment.strings.FaceScan_Instruction_Position
switch self.processState { switch self.processState {
case .waitingForFace, .positioning: case .waitingForFace, .positioning:
self.frameView.update(state: .viewFinder, intermediateCompletion: { [weak self] in 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)) self.state?.updated(transition: .spring(duration: 0.3))
} }
}, 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: case .readyToStart:
self.frameView.update(state: .segments(Set()), transition: .spring(duration: 0.3)) 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: case .tracking:
self.frameView.update(state: .segments(self.completedAngles), transition: .spring(duration: 0.3)) 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: case .completed:
self.frameView.update(state: .success, transition: .spring(duration: 0.3)) self.frameView.update(state: .success, transition: .spring(duration: 0.3))
instructionString = "" instructionString = ""