mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
Update login strings
This commit is contained in:
parent
74a3370f76
commit
772d139be0
@ -5148,7 +5148,7 @@ Any member of this group will be able to see messages in the channel.";
|
||||
"AuthSessions.AddDevice.ScanTitle" = "Scan QR Code";
|
||||
"AuthSessions.AddDevice.InvalidQRCode" = "Invalid QR Code";
|
||||
"AuthSessions.AddDeviceIntro.Title" = "Log in by QR Code";
|
||||
"AuthSessions.AddDeviceIntro.Text1" = "[Download Telegram]() on your computer";
|
||||
"AuthSessions.AddDeviceIntro.Text1" = "Download Telegram on your computer from [desktop.telegram.org]()";
|
||||
"AuthSessions.AddDeviceIntro.Text2" = "Run Telegram on your computer to get the QR code";
|
||||
"AuthSessions.AddDeviceIntro.Text3" = "Scan the QR code to connect your account";
|
||||
"AuthSessions.AddDeviceIntro.Action" = "Scan QR Code";
|
||||
@ -5167,3 +5167,5 @@ Any member of this group will be able to see messages in the channel.";
|
||||
"ChatList.Search.ShowLess" = "Show less";
|
||||
|
||||
"AuthSessions.OtherDevices" = "The official Telegram App is available for iPhone, iPad, Android, macOS, Windows and Linux. [Learn More]()";
|
||||
|
||||
"AuthSessions.AddDevice.UrlLoginHint" = "This code can be used to allow someone to log in to your Telegram account.\n\nTo confirm Telegram login, please go to Settings > Devices > Scan QR and scan the code.";
|
||||
|
@ -276,7 +276,7 @@ private final class AuthDataTransferSplashScreenNode: ViewControllerTracingNode
|
||||
}
|
||||
textNode.tapAttributeAction = { attributes in
|
||||
if let _ = attributes[NSAttributedString.Key(rawValue: "URL")] {
|
||||
context.sharedContext.openExternalUrl(context: context, urlContext: .generic, url: "https://telegram.org/desktop", forceExternal: true, presentationData: context.sharedContext.currentPresentationData.with { $0 }, navigationController: nil, dismissInput: {})
|
||||
context.sharedContext.openExternalUrl(context: context, urlContext: .generic, url: "https://desktop.telegram.org", forceExternal: true, presentationData: context.sharedContext.currentPresentationData.with { $0 }, navigationController: nil, dismissInput: {})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -593,7 +593,7 @@ public func recentSessionsController(context: AccountContext, activeSessionsCont
|
||||
}, addDevice: {
|
||||
pushControllerImpl?(AuthDataTransferSplashScreen(context: context, activeSessionsContext: activeSessionsContext))
|
||||
}, openOtherAppsUrl: {
|
||||
context.sharedContext.openExternalUrl(context: context, urlContext: .generic, url: "https://telegram.org/desktop", forceExternal: true, presentationData: context.sharedContext.currentPresentationData.with { $0 }, navigationController: nil, dismissInput: {})
|
||||
context.sharedContext.openExternalUrl(context: context, urlContext: .generic, url: "https://desktop.telegram.org", forceExternal: true, presentationData: context.sharedContext.currentPresentationData.with { $0 }, navigationController: nil, dismissInput: {})
|
||||
})
|
||||
|
||||
let previousMode = Atomic<RecentSessionsMode>(value: .sessions)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -500,6 +500,7 @@ func openExternalUrlImpl(context: AccountContext, urlContext: OpenURLContext, ur
|
||||
} else if parsedUrl.host == "login" {
|
||||
if let components = URLComponents(string: "/?" + query) {
|
||||
var code: String?
|
||||
var isToken: Bool = false
|
||||
if let queryItems = components.queryItems {
|
||||
for queryItem in queryItems {
|
||||
if let value = queryItem.value {
|
||||
@ -507,8 +508,18 @@ func openExternalUrlImpl(context: AccountContext, urlContext: OpenURLContext, ur
|
||||
code = value
|
||||
}
|
||||
}
|
||||
if queryItem.name == "token" {
|
||||
isToken = true
|
||||
}
|
||||
}
|
||||
}
|
||||
if isToken {
|
||||
context.sharedContext.presentGlobalController(standardTextAlertController(theme: AlertControllerTheme(presentationData: presentationData), title: nil, text: presentationData.strings.AuthSessions_AddDevice_UrlLoginHint, actions: [
|
||||
TextAlertAction(type: .genericAction, title: presentationData.strings.Common_OK, action: {
|
||||
}),
|
||||
], parseMarkdown: true), nil)
|
||||
return
|
||||
}
|
||||
if let code = code {
|
||||
convertedUrl = "https://t.me/login/\(code)"
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
@ -448,12 +448,12 @@ public final class WalletStrings: Equatable {
|
||||
public var Wallet_SecureStorageReset_Title: String { return self._s[218]! }
|
||||
public var Wallet_Receive_CommentHeader: String { return self._s[219]! }
|
||||
public var Wallet_Info_ReceiveGrams: String { return self._s[220]! }
|
||||
public func Wallet_Updated_MinutesAgo(_ value: Int32) -> String {
|
||||
public func Wallet_Updated_HoursAgo(_ value: Int32) -> String {
|
||||
let form = getPluralizationForm(self.lc, value)
|
||||
let stringValue = walletStringsFormattedNumber(value, self.groupingSeparator)
|
||||
return String(format: self._ps[0 * 6 + Int(form.rawValue)]!, stringValue)
|
||||
}
|
||||
public func Wallet_Updated_HoursAgo(_ value: Int32) -> String {
|
||||
public func Wallet_Updated_MinutesAgo(_ value: Int32) -> String {
|
||||
let form = getPluralizationForm(self.lc, value)
|
||||
let stringValue = walletStringsFormattedNumber(value, self.groupingSeparator)
|
||||
return String(format: self._ps[1 * 6 + Int(form.rawValue)]!, stringValue)
|
||||
|
Loading…
x
Reference in New Issue
Block a user