mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Update localization
This commit is contained in:
@@ -9886,3 +9886,16 @@ Sorry for the inconvenience.";
|
||||
|
||||
"Gallery.ViewOncePhotoTooltip" = "This photo can only be viewed once.";
|
||||
"Gallery.ViewOnceVideoTooltip" = "This video can only be viewed once.";
|
||||
|
||||
"ChatList.SessionReview.ConfirmToastTitle" = "New Login Allowed";
|
||||
"ChatList.SessionReview.ConfirmToastText" = "You can check the list of your active logins in [Settings > Devices]().";
|
||||
|
||||
"ChatList.SessionReview.PanelTitle" = "Someone just got acess to your messages!";
|
||||
"ChatList.SessionReview.PanelText" = "We detected a new login to your account from %1$@, %2$@. Is it you?";
|
||||
"ChatList.SessionReview.PanelConfirm" = "Yes, it's me";
|
||||
"ChatList.SessionReview.PanelReject" = "No, it's not me!";
|
||||
|
||||
"SessionReview.NoticeText" = "Never send your login code to anyone or you can lose your Telegram account!";
|
||||
"SessionReview.Title" = "New Login Prevented";
|
||||
"SessionReview.Text" = "We have terminated the login attempt from **%1$@**, **%2$@**";
|
||||
"SessionReview.OkAction" = "Got it";
|
||||
|
||||
@@ -1623,8 +1623,7 @@ public final class ChatListNode: ListView {
|
||||
} else {
|
||||
animationBackgroundColor = UIColor(rgb: 0x474747)
|
||||
}
|
||||
//TODO:localize
|
||||
self.present?(UndoOverlayController(presentationData: presentationData, content: .universal(animation: "anim_success", scale: 1.0, colors: ["info1.info1.stroke": animationBackgroundColor, "info2.info2.Fill": animationBackgroundColor], title: "New Login Allowed", text: "You can check the list of your active logins in [Settings > Devices]().", customUndoText: nil, timeout: 5), elevatedLayout: false, action: { [weak self] action in
|
||||
self.present?(UndoOverlayController(presentationData: presentationData, content: .universal(animation: "anim_success", scale: 1.0, colors: ["info1.info1.stroke": animationBackgroundColor, "info2.info2.Fill": animationBackgroundColor], title: presentationData.strings.ChatList_SessionReview_ConfirmToastTitle, text: presentationData.strings.ChatList_SessionReview_ConfirmToastText, customUndoText: nil, timeout: 5), elevatedLayout: false, action: { [weak self] action in
|
||||
switch action {
|
||||
case .info:
|
||||
self?.interaction?.openActiveSessions()
|
||||
|
||||
@@ -207,14 +207,13 @@ class ChatListStorageInfoItemNode: ItemListRevealOptionsItemNode {
|
||||
spacing = 2.0
|
||||
alignment = .center
|
||||
|
||||
//TODO:localize
|
||||
let titleStringValue = NSMutableAttributedString(attributedString: NSAttributedString(string: "Someone just got acess to your messages!", font: titleFont, textColor: item.theme.rootController.navigationBar.primaryTextColor))
|
||||
let titleStringValue = NSMutableAttributedString(attributedString: NSAttributedString(string: item.strings.ChatList.SessionReview_PanelTitle, font: titleFont, textColor: item.theme.rootController.navigationBar.primaryTextColor))
|
||||
titleString = titleStringValue
|
||||
|
||||
textString = NSAttributedString(string: "We detected a new login to your account from \(newSessionReview.device), \(newSessionReview.location). Is it you?", font: textFont, textColor: item.theme.rootController.navigationBar.secondaryTextColor)
|
||||
textString = NSAttributedString(string: item.strings.ChatList_SessionReview_PanelText(newSessionReview.device, newSessionReview.location).0, font: textFont, textColor: item.theme.rootController.navigationBar.secondaryTextColor)
|
||||
|
||||
okButtonLayout = makeOkButtonTextLayout(TextNodeLayoutArguments(attributedString: NSAttributedString(string: "Yes, it's me", font: titleFont, textColor: item.theme.list.itemAccentColor), maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: params.width - sideInset - rightInset, height: 100.0)))
|
||||
cancelButtonLayout = makeCancelButtonTextLayout(TextNodeLayoutArguments(attributedString: NSAttributedString(string: "No, it's not me!", font: titleFont, textColor: item.theme.list.itemDestructiveColor), maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: params.width - sideInset - rightInset, height: 100.0)))
|
||||
okButtonLayout = makeOkButtonTextLayout(TextNodeLayoutArguments(attributedString: NSAttributedString(string: item.strings.ChatList_SessionReview_PanelConfirm, font: titleFont, textColor: item.theme.list.itemAccentColor), maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: params.width - sideInset - rightInset, height: 100.0)))
|
||||
cancelButtonLayout = makeCancelButtonTextLayout(TextNodeLayoutArguments(attributedString: NSAttributedString(string: item.strings.ChatList_SessionReview_PanelReject, font: titleFont, textColor: item.theme.list.itemDestructiveColor), maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: params.width - sideInset - rightInset, height: 100.0)))
|
||||
}
|
||||
|
||||
let titleLayout = makeTitleLayout(TextNodeLayoutArguments(attributedString: titleString, maximumNumberOfLines: 1, truncationType: .end, constrainedSize: CGSize(width: params.width - sideInset - rightInset, height: 100.0), alignment: alignment, lineSpacing: 0.18))
|
||||
|
||||
@@ -103,11 +103,10 @@ public final class NewSessionInfoContentComponent: Component {
|
||||
|
||||
contentHeight += -14.0
|
||||
|
||||
//TODO:localize
|
||||
let noticeSize = self.notice.update(
|
||||
transition: .immediate,
|
||||
component: AnyComponent(BalancedTextComponent(
|
||||
text: .plain(NSAttributedString(string: "Never send your login code to anyone or you can lose your Telegram account!", font: Font.semibold(15.0), textColor: component.theme.list.itemDestructiveColor)),
|
||||
text: .plain(NSAttributedString(string: component.strings.SessionReview_NoticeText, font: Font.semibold(15.0), textColor: component.theme.list.itemDestructiveColor)),
|
||||
horizontalAlignment: .center,
|
||||
maximumNumberOfLines: 0,
|
||||
lineSpacing: 0.2
|
||||
@@ -146,9 +145,8 @@ public final class NewSessionInfoContentComponent: Component {
|
||||
contentHeight += iconSize
|
||||
contentHeight += 16.0
|
||||
|
||||
//TODO:localize
|
||||
let titleString = NSMutableAttributedString()
|
||||
titleString.append(NSAttributedString(string: "New Login Prevented", font: Font.semibold(19.0), textColor: component.theme.list.itemPrimaryTextColor))
|
||||
titleString.append(NSAttributedString(string: component.strings.SessionReview_Title, font: Font.semibold(19.0), textColor: component.theme.list.itemPrimaryTextColor))
|
||||
let imageAttachment = NSTextAttachment()
|
||||
imageAttachment.image = self.iconBackground.image
|
||||
titleString.append(NSAttributedString(attachment: imageAttachment))
|
||||
@@ -171,8 +169,7 @@ public final class NewSessionInfoContentComponent: Component {
|
||||
contentHeight += titleSize.height
|
||||
contentHeight += 16.0
|
||||
|
||||
//TODO:localize
|
||||
let text: String = "We have terminated the login attempt from **\(component.newSessionReview.device), \(component.newSessionReview.location)**"
|
||||
let text: String = component.strings.SessionReview_Text(component.newSessionReview.device, component.newSessionReview.location).0
|
||||
|
||||
let mainText = NSMutableAttributedString()
|
||||
mainText.append(parseMarkdownIntoAttributedString(text, attributes: MarkdownAttributes(
|
||||
|
||||
@@ -96,11 +96,9 @@ private final class NewSessionInfoSheetContentComponent: Component {
|
||||
contentHeight += contentSize.height
|
||||
contentHeight += 30.0
|
||||
|
||||
//TODO:localize
|
||||
|
||||
var buttonContents: [AnyComponentWithIdentity<Empty>] = []
|
||||
buttonContents.append(AnyComponentWithIdentity(id: AnyHashable(0 as Int), component: AnyComponent(
|
||||
Text(text: "Got it", font: Font.semibold(17.0), color: environment.theme.list.itemCheckColors.foregroundColor)
|
||||
Text(text: environment.strings.SessionReview_OkAction, font: Font.semibold(17.0), color: environment.theme.list.itemCheckColors.foregroundColor)
|
||||
)))
|
||||
if self.remainingTimer > 0 {
|
||||
buttonContents.append(AnyComponentWithIdentity(id: AnyHashable(1 as Int), component: AnyComponent(
|
||||
|
||||
@@ -240,7 +240,6 @@ private final class StoryStealthModeSheetContentComponent: Component {
|
||||
contentHeight += contentSize.height
|
||||
contentHeight += 41.0
|
||||
|
||||
//TODO:localize
|
||||
let buttonText: String
|
||||
let content: AnyComponentWithIdentity<Empty>
|
||||
switch component.mode {
|
||||
|
||||
Reference in New Issue
Block a user