Skip to content

Commit 3b02aea

Browse files
author
Isaac
committed
Update localization
1 parent 62d29ee commit 3b02aea

File tree

9 files changed

+64
-38
lines changed

9 files changed

+64
-38
lines changed

Telegram/Telegram-iOS/en.lproj/Localizable.strings

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15506,3 +15506,31 @@ Error: %8$@";
1550615506
"Gift.Auction.Extension" = "+ %1$@ for late bids in top %2$@";
1550715507

1550815508
"ChatList.Auctions.UpcomingAuction" = "Upcoming Auction";
15509+
15510+
"Login.PhoneWithPasskeySubtitle" = "Enter your phone number\nor [log in using Passkey >](passkey)";
15511+
"PrivacySettings.Passkey" = "Passkey";
15512+
"Attachment.SharedAudio" = "SHARED AUDIO";
15513+
"Attachment.FilesSearchPlaceholder" = "Search shared audio";
15514+
"Chat.GiftPurchaseOffer.Reject" = "Reject";
15515+
"Chat.GiftPurchaseOffer.Accept" = "Accept";
15516+
15517+
"Passkeys.DeleteAlert.Title" = "Delete Passkey?";
15518+
"Passkeys.DeleteAlert.Text" = "Once deleted, this passkey can't be used to log in.\n\nDon't forget to remove it from your password manager too.";
15519+
"Passkeys.DeleteAlert.Action" = "Delete";
15520+
"Passkeys.Into.Title" = "Protect your account";
15521+
"Passkeys.Subtitle" = "Log in safely and keep your account secure.";
15522+
"Passkeys.Into.Title0" = "Create a Passkey";
15523+
"Passkeys.Into.Text0" = "Make a passkey to sign in easily and safely.";
15524+
"Passkeys.Into.Title1" = "Log in with Face ID";
15525+
"Passkeys.Into.Text1" = "Use Face ID, Touch ID, or your passcode to sign in.";
15526+
"Passkeys.Into.Title2" = "Store Passkey Securely";
15527+
"Passkeys.Into.Text2" = "Your passkey is safely kept in your iCloud Keychain.";
15528+
"Passkeys.ButtonCreate" = "Create Passkey";
15529+
"Passkeys.ButtonSkip" = "Skip";
15530+
"Passkeys.Title" = "Passkeys";
15531+
"Passkeys.Subtitle" = "Log in safely and keep your account secure.";
15532+
"Passkeys.EmptyName" = "Passkey";
15533+
"Passkeys.PasskeyCreatedPattern" = "created %@";
15534+
"Passkeys.PasskeyCreatedAndUsedPattern" = "created %1$@ • used %2$@";
15535+
"Passkeys.AddPasskey" = "Create Passkey";
15536+
"Passkeys.ListFooter" = "Your passkeys are stored securely in your password manager.";

submodules/AuthorizationUI/Sources/AuthorizationSequencePhoneEntryControllerNode.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -576,11 +576,10 @@ final class AuthorizationSequencePhoneEntryControllerNode: ASDisplayNode {
576576
}
577577

578578
func updateDisplayPasskeyLoginOption() {
579-
//TODO:localize
580579
if self.account == nil {
581580
return
582581
}
583-
let attributedText = NSMutableAttributedString(attributedString: parseMarkdownIntoAttributedString("Enter your phone number\nor [log in using Passkey >](passkey)", attributes: MarkdownAttributes(
582+
let attributedText = NSMutableAttributedString(attributedString: parseMarkdownIntoAttributedString(self.strings.Login_PhoneWithPasskeySubtitle, attributes: MarkdownAttributes(
584583
body: MarkdownAttributeSet(font: Font.regular(17.0), textColor: self.theme.list.itemPrimaryTextColor),
585584
bold: MarkdownAttributeSet(font: Font.semibold(17.0), textColor: self.theme.list.itemPrimaryTextColor),
586585
link: MarkdownAttributeSet(font: Font.regular(17.0), textColor: self.theme.list.itemAccentColor),
@@ -607,7 +606,7 @@ final class AuthorizationSequencePhoneEntryControllerNode: ASDisplayNode {
607606
let titleInset: CGFloat = layout.size.width > 320.0 ? 18.0 : 0.0
608607
let additionalBottomInset: CGFloat = layout.size.width > 320.0 ? 80.0 : 10.0
609608

610-
self.titleNode.attributedText = NSAttributedString(string: self.account == nil ? strings.Login_NewNumber : strings.Login_PhoneTitle, font: Font.bold(28.0), textColor: self.theme.list.itemPrimaryTextColor)
609+
self.titleNode.attributedText = NSAttributedString(string: self.account == nil ? self.strings.Login_NewNumber : self.strings.Login_PhoneTitle, font: Font.bold(28.0), textColor: self.theme.list.itemPrimaryTextColor)
611610
self.titleActivateAreaNode.accessibilityLabel = self.titleNode.attributedText?.string ?? ""
612611

613612
let inset: CGFloat = 24.0

submodules/SettingsUI/Sources/Privacy and Security/PrivacyAndSecurityController.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -673,12 +673,11 @@ private func privacyAndSecurityControllerEntries(
673673
entries.append(.twoStepVerification(presentationData.theme, presentationData.strings.PrivacySettings_TwoStepAuth, twoStepAuthString, twoStepAuthData))
674674

675675
if displayPasskeys {
676-
//TODO:localize
677676
var passkeysString = ""
678677
if let hasPasskeys = hasPasskeys {
679-
passkeysString = hasPasskeys ? "On" : "Off"
678+
passkeysString = hasPasskeys ? presentationData.strings.PrivacySettings_PasscodeOn : presentationData.strings.PrivacySettings_PasscodeOff
680679
}
681-
entries.append(.passkeys(presentationData.theme, "Passkey", passkeysString))
680+
entries.append(.passkeys(presentationData.theme, presentationData.strings.PrivacySettings_Passkey, passkeysString))
682681
}
683682

684683
if let privacySettings = privacySettings {

submodules/TelegramUI/Components/AttachmentFileController/Sources/AttachmentFileController.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,7 @@ private func attachmentFileControllerEntries(presentationData: PresentationData,
207207
case .recent:
208208
listTitle = presentationData.strings.Attachment_RecentlySentFiles
209209
case .audio:
210-
//TODO:localize
211-
listTitle = "SHARED AUDIO"
210+
listTitle = presentationData.strings.Attachment_SharedAudio
212211
}
213212

214213
if case .audio = mode {

submodules/TelegramUI/Components/AttachmentFileController/Sources/AttachmentFileSearchItem.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ private final class AttachmentFileSearchItemNode: ItemListControllerSearchNode {
138138
transition.updateFrame(node: self.containerNode, frame: CGRect(origin: CGPoint(x: 0.0, y: navigationBarHeight), size: CGSize(width: layout.size.width, height: layout.size.height - navigationBarHeight)))
139139
self.containerNode.containerLayoutUpdated(layout.withUpdatedSize(CGSize(width: layout.size.width, height: layout.size.height - navigationBarHeight)), navigationBarHeight: 0.0, transition: transition)
140140

141-
//TODO:localize
142141
let searchInputSize = self.searchInput.update(
143142
transition: .immediate,
144143
component: AnyComponent(
@@ -147,7 +146,7 @@ private final class AttachmentFileSearchItemNode: ItemListControllerSearchNode {
147146
strings: self.presentationData.strings,
148147
metrics: layout.metrics,
149148
safeInsets: layout.safeInsets,
150-
placeholder: self.mode == .audio ? "Search shared audio" : self.presentationData.strings.Attachment_FilesSearchPlaceholder,
149+
placeholder: self.mode == .audio ? self.presentationData.strings.Attachment_FilesSearchPlaceholder : self.presentationData.strings.Attachment_FilesSearchPlaceholder,
151150
updated: { [weak self] query in
152151
guard let self else {
153152
return

submodules/TelegramUI/Components/Chat/ChatMessageBubbleItemNode/Sources/ChatMessageBubbleItemNode.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2844,7 +2844,6 @@ public class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewI
28442844
icon: .suggestedPostApprove
28452845
)
28462846
]
2847-
//TODO:localize
28482847
let (minWidth, buttonsLayout) = actionButtonsLayout(
28492848
item.context,
28502849
item.presentationData.theme,
@@ -2854,8 +2853,8 @@ public class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewI
28542853
ReplyMarkupMessageAttribute(
28552854
rows: [
28562855
ReplyMarkupRow(buttons: [
2857-
ReplyMarkupButton(title: "Reject", titleWhenForwarded: nil, action: .callback(requiresPassword: false, data: buttonDecline)),
2858-
ReplyMarkupButton(title: "Accept", titleWhenForwarded: nil, action: .callback(requiresPassword: false, data: buttonApprove))
2856+
ReplyMarkupButton(title: item.presentationData.strings.Chat_GiftPurchaseOffer_Reject, titleWhenForwarded: nil, action: .callback(requiresPassword: false, data: buttonDecline)),
2857+
ReplyMarkupButton(title: item.presentationData.strings.Chat_GiftPurchaseOffer_Accept, titleWhenForwarded: nil, action: .callback(requiresPassword: false, data: buttonApprove))
28592858
])
28602859
],
28612860
flags: [],

submodules/TelegramUI/Components/Settings/PasskeysScreen/Sources/PasskeysScreen.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,8 @@ final class PasskeysScreenComponent: Component {
180180
return
181181
}
182182
let presentationData = component.context.sharedContext.currentPresentationData.with({ $0 })
183-
//TODO:localize
184-
controller.present(standardTextAlertController(theme: AlertControllerTheme(presentationData: presentationData), title: "Delete Passkey?", text: "Once deleted, this passkey can't be used to log in.\n\nDon't forget to remove it from your password manager too.", actions: [TextAlertAction(type: .genericAction, title: presentationData.strings.Common_Cancel, action: {
185-
}), TextAlertAction(type: .destructiveAction, title: "Delete", action: { [weak self] in
183+
controller.present(standardTextAlertController(theme: AlertControllerTheme(presentationData: presentationData), title: environment.strings.Passkeys_DeleteAlert_Title, text: environment.strings.Passkeys_DeleteAlert_Text, actions: [TextAlertAction(type: .genericAction, title: environment.strings.Common_Cancel, action: {
184+
}), TextAlertAction(type: .destructiveAction, title: environment.strings.Passkeys_DeleteAlert_Action, action: { [weak self] in
186185
guard let self else {
187186
return
188187
}
@@ -266,6 +265,7 @@ final class PasskeysScreenComponent: Component {
266265
component: AnyComponent(PasskeysScreenIntroComponent(
267266
context: component.context,
268267
theme: environment.theme,
268+
strings: environment.strings,
269269
insets: UIEdgeInsets(top: environment.statusBarHeight + environment.navigationHeight, left: 0.0, bottom: environment.safeInsets.bottom, right: 0.0),
270270
displaySkip: component.displaySkip,
271271
createPasskeyAction: { [weak self] in

submodules/TelegramUI/Components/Settings/PasskeysScreen/Sources/PasskeysScreenIntroComponent.swift

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import BundleIconComponent
1313
final class PasskeysScreenIntroComponent: Component {
1414
let context: AccountContext
1515
let theme: PresentationTheme
16+
let strings: PresentationStrings
1617
let insets: UIEdgeInsets
1718
let displaySkip: Bool
1819
let createPasskeyAction: () -> Void
@@ -21,13 +22,15 @@ final class PasskeysScreenIntroComponent: Component {
2122
init(
2223
context: AccountContext,
2324
theme: PresentationTheme,
25+
strings: PresentationStrings,
2426
insets: UIEdgeInsets,
2527
displaySkip: Bool,
2628
createPasskeyAction: @escaping () -> Void,
2729
skipAction: @escaping () -> Void
2830
) {
2931
self.context = context
3032
self.theme = theme
33+
self.strings = strings
3134
self.insets = insets
3235
self.displaySkip = displaySkip
3336
self.createPasskeyAction = createPasskeyAction
@@ -41,6 +44,9 @@ final class PasskeysScreenIntroComponent: Component {
4144
if lhs.theme !== rhs.theme {
4245
return false
4346
}
47+
if lhs.strings !== rhs.strings {
48+
return false
49+
}
4450
if lhs.insets != rhs.insets {
4551
return false
4652
}
@@ -120,7 +126,6 @@ final class PasskeysScreenIntroComponent: Component {
120126

121127
var contentHeight: CGFloat = 0.0
122128

123-
//TODO:localize
124129
let iconSize = self.icon.update(
125130
transition: .immediate,
126131
component: AnyComponent(LottieComponent(
@@ -145,7 +150,7 @@ final class PasskeysScreenIntroComponent: Component {
145150
let titleSize = self.title.update(
146151
transition: .immediate,
147152
component: AnyComponent(MultilineTextComponent(
148-
text: .plain(NSAttributedString(string: "Protect your account", font: Font.bold(27.0), textColor: component.theme.list.itemPrimaryTextColor)),
153+
text: .plain(NSAttributedString(string: component.strings.Passkeys_Into_Title, font: Font.bold(27.0), textColor: component.theme.list.itemPrimaryTextColor)),
149154
horizontalAlignment: .center,
150155
maximumNumberOfLines: 0
151156
)),
@@ -166,7 +171,7 @@ final class PasskeysScreenIntroComponent: Component {
166171
let subtitleSize = self.subtitle.update(
167172
transition: .immediate,
168173
component: AnyComponent(BalancedTextComponent(
169-
text: .plain(NSAttributedString(string: "Log in safely and keep your account secure.", font: Font.regular(16.0), textColor: component.theme.list.itemPrimaryTextColor)),
174+
text: .plain(NSAttributedString(string: component.strings.Passkeys_Subtitle, font: Font.regular(16.0), textColor: component.theme.list.itemPrimaryTextColor)),
170175
horizontalAlignment: .center,
171176
maximumNumberOfLines: 0,
172177
lineSpacing: 0.2
@@ -193,18 +198,18 @@ final class PasskeysScreenIntroComponent: Component {
193198
let itemDescs: [ItemDesc] = [
194199
ItemDesc(
195200
icon: "Settings/Passkeys/Intro1",
196-
title: "Create a Passkey",
197-
text: "Make a passkey to sign in easily and safely."
201+
title: component.strings.Passkeys_Into_Title0,
202+
text: component.strings.Passkeys_Into_Text0
198203
),
199204
ItemDesc(
200205
icon: "Settings/Passkeys/Intro2",
201-
title: "Log in with Face ID",
202-
text: "Use Face ID, Touch ID, or your passcode to sign in."
206+
title: component.strings.Passkeys_Into_Title1,
207+
text: component.strings.Passkeys_Into_Text1
203208
),
204209
ItemDesc(
205210
icon: "Settings/Passkeys/Intro3",
206-
title: "Store Passkey Securely",
207-
text: "Your passkey is safely kept in your iCloud Keychain."
211+
title: component.strings.Passkeys_Into_Title2,
212+
text: component.strings.Passkeys_Into_Text2
208213
)
209214
]
210215
for i in 0 ..< itemDescs.count {
@@ -290,7 +295,7 @@ final class PasskeysScreenIntroComponent: Component {
290295
),
291296
content: AnyComponentWithIdentity(
292297
id: AnyHashable(0),
293-
component: AnyComponent(MultilineTextComponent(text: .plain(NSAttributedString(string: "Create Passkey", font: Font.semibold(17.0), textColor: component.theme.list.itemCheckColors.foregroundColor))))
298+
component: AnyComponent(MultilineTextComponent(text: .plain(NSAttributedString(string: component.strings.Passkeys_ButtonCreate, font: Font.semibold(17.0), textColor: component.theme.list.itemCheckColors.foregroundColor))))
294299
),
295300
action: { [weak self] in
296301
guard let self, let component = self.component else {
@@ -312,7 +317,6 @@ final class PasskeysScreenIntroComponent: Component {
312317
skipButton = ComponentView()
313318
self.skipButton = skipButton
314319
}
315-
//TODO:localize
316320
skipButtonSize = skipButton.update(
317321
transition: transition,
318322
component: AnyComponent(ButtonComponent(
@@ -325,7 +329,7 @@ final class PasskeysScreenIntroComponent: Component {
325329
),
326330
content: AnyComponentWithIdentity(
327331
id: AnyHashable(0),
328-
component: AnyComponent(MultilineTextComponent(text: .plain(NSAttributedString(string: "Skip", font: Font.semibold(17.0), textColor: component.theme.list.itemCheckColors.foregroundColor))))
332+
component: AnyComponent(MultilineTextComponent(text: .plain(NSAttributedString(string: component.strings.Passkeys_ButtonSkip, font: Font.semibold(17.0), textColor: component.theme.list.itemCheckColors.foregroundColor))))
329333
),
330334
action: { [weak self] in
331335
guard let self, let component = self.component else {

0 commit comments

Comments
 (0)