mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Update localization
This commit is contained in:
parent
9fe004a7ec
commit
d93a33cabb
4 changed files with 59 additions and 31 deletions
|
|
@ -15928,7 +15928,20 @@ Error: %8$@";
|
|||
"BackgroundTasks.UploadingStories_any" = "Uploading %d Stories";
|
||||
"BackgroundTasks.StoryOpenAppToContinue" = "Open app to continue";
|
||||
"BackgroundTasks.StorySubtitle" = "Running...";
|
||||
"BackgroundTasks.StoryFinished" = "Finished";
|
||||
|
||||
"BackgroundTasks.UploadingMedia_1" = "Sending Message";
|
||||
"BackgroundTasks.UploadingMedia_any" = "Sending %d Messages";
|
||||
"BackgroundTasks.MediaSubtitle" = "Running...";
|
||||
"BackgroundTasks.MediaFinished" = "Finished";
|
||||
|
||||
"DisableSharing.Title" = "Disable Sharing";
|
||||
"DisableSharing.Screenshot.Title" = "No Screenshots";
|
||||
"DisableSharing.Screenshot.Text" = "Disable screenshots and screen recordings in this chat.";
|
||||
|
||||
"DisableSharing.Forwarding.Title" = "No Forwarding";
|
||||
"DisableSharing.Forwarding.Text" = "Disable message forwarding to other chats.";
|
||||
|
||||
"DisableSharing.Saving.Title" = "No Saving";
|
||||
"DisableSharing.Saving.Text" = "Disable copying text and saving photos and videos to Photos.";
|
||||
"DisableSharing.Confirm" = "Disable Sharing";
|
||||
|
|
|
|||
|
|
@ -100,7 +100,6 @@ private final class PeerCopyProtectionInfoSheetContent: CombinedComponent {
|
|||
|
||||
let theme = environment.theme
|
||||
let strings = environment.strings
|
||||
let _ = strings
|
||||
|
||||
let sideInset: CGFloat = 30.0 + environment.safeInsets.left
|
||||
let textSideInset: CGFloat = 30.0 + environment.safeInsets.left
|
||||
|
|
@ -131,7 +130,7 @@ private final class PeerCopyProtectionInfoSheetContent: CombinedComponent {
|
|||
|
||||
let title = title.update(
|
||||
component: BalancedTextComponent(
|
||||
text: .plain(NSAttributedString(string: "Disable Sharing", font: titleFont, textColor: textColor)),
|
||||
text: .plain(NSAttributedString(string: strings.DisableSharing_Title, font: titleFont, textColor: textColor)),
|
||||
horizontalAlignment: .center,
|
||||
maximumNumberOfLines: 0,
|
||||
lineSpacing: 0.1
|
||||
|
|
@ -150,9 +149,9 @@ private final class PeerCopyProtectionInfoSheetContent: CombinedComponent {
|
|||
AnyComponentWithIdentity(
|
||||
id: "screenshot",
|
||||
component: AnyComponent(InfoParagraphComponent(
|
||||
title: "No Screenshots",
|
||||
title: strings.DisableSharing_Screenshot_Title,
|
||||
titleColor: textColor,
|
||||
text: "Disable screenshots and screen recordings in this chat.",
|
||||
text: strings.DisableSharing_Screenshot_Text,
|
||||
textColor: secondaryTextColor,
|
||||
accentColor: linkColor,
|
||||
iconName: "Premium/CopyProtection/NoScreenshot",
|
||||
|
|
@ -164,9 +163,9 @@ private final class PeerCopyProtectionInfoSheetContent: CombinedComponent {
|
|||
AnyComponentWithIdentity(
|
||||
id: "forward",
|
||||
component: AnyComponent(InfoParagraphComponent(
|
||||
title: "No Forwarding",
|
||||
title: strings.DisableSharing_Forwarding_Title,
|
||||
titleColor: textColor,
|
||||
text: "Disable message forwarding to other chats.",
|
||||
text: strings.DisableSharing_Forwarding_Text,
|
||||
textColor: secondaryTextColor,
|
||||
accentColor: linkColor,
|
||||
iconName: "Premium/CopyProtection/NoForward",
|
||||
|
|
@ -178,9 +177,9 @@ private final class PeerCopyProtectionInfoSheetContent: CombinedComponent {
|
|||
AnyComponentWithIdentity(
|
||||
id: "save",
|
||||
component: AnyComponent(InfoParagraphComponent(
|
||||
title: "No Saving",
|
||||
title: strings.DisableSharing_Saving_Title,
|
||||
titleColor: textColor,
|
||||
text: "Disable copying text and saving photos and videos to Photos.",
|
||||
text: strings.DisableSharing_Saving_Text,
|
||||
textColor: secondaryTextColor,
|
||||
accentColor: linkColor,
|
||||
iconName: "Premium/CopyProtection/NoDownload",
|
||||
|
|
@ -227,7 +226,7 @@ private final class PeerCopyProtectionInfoSheetContent: CombinedComponent {
|
|||
if component.context.isPremium {
|
||||
buttonContent = AnyComponentWithIdentity(id: "disable", component: AnyComponent(
|
||||
ButtonTextContentComponent(
|
||||
text: "Disable Sharing",
|
||||
text: strings.DisableSharing_Confirm,
|
||||
badge: 0,
|
||||
textColor: theme.list.itemCheckColors.foregroundColor,
|
||||
badgeBackground: theme.list.itemCheckColors.foregroundColor,
|
||||
|
|
|
|||
|
|
@ -1844,8 +1844,11 @@ func openResolvedUrlImpl(
|
|||
} else {
|
||||
text = presentationData.strings.AuthConfirmation_LoginSuccess_Text(domain).string
|
||||
}
|
||||
if let topViewController = navigationController?.topViewController as? ViewController {
|
||||
let controller = UndoOverlayController(presentationData: presentationData, content: .actionSucceeded(title: presentationData.strings.AuthConfirmation_LoginSuccess_Title, text: text, cancel: nil, destructive: false), elevatedLayout: topViewController is TabBarController, action: { _ in return true })
|
||||
if var topViewController = navigationController?.topViewController as? ViewController {
|
||||
if let tabBarController = topViewController as? TabBarController, let controller = tabBarController.currentController {
|
||||
topViewController = controller
|
||||
}
|
||||
let controller = UndoOverlayController(presentationData: presentationData, content: .actionSucceeded(title: presentationData.strings.AuthConfirmation_LoginSuccess_Title, text: text, cancel: nil, destructive: false), action: { _ in return true })
|
||||
topViewController.present(controller, in: .current)
|
||||
}
|
||||
}
|
||||
|
|
@ -1888,28 +1891,38 @@ func openResolvedUrlImpl(
|
|||
}, error: { _ in
|
||||
dismissImpl?()
|
||||
|
||||
if case let .request(domain, _, _, _, _, _) = result {
|
||||
if let topViewController = navigationController?.topViewController as? ViewController {
|
||||
let controller = UndoOverlayController(presentationData: presentationData, content: .info(title: presentationData.strings.AuthConfirmation_LoginFail_Title, text: presentationData.strings.AuthConfirmation_LoginFail_Text(domain).string, timeout: nil, customUndoText: nil), elevatedLayout: topViewController is TabBarController, action: { _ in return true })
|
||||
topViewController.present(controller, in: .current)
|
||||
Queue.mainQueue().after(0.3) {
|
||||
if case let .request(domain, _, _, _, _, _) = result {
|
||||
if var topViewController = navigationController?.topViewController as? ViewController {
|
||||
if let tabBarController = topViewController as? TabBarController, let controller = tabBarController.currentController {
|
||||
topViewController = controller
|
||||
}
|
||||
let controller = UndoOverlayController(presentationData: presentationData, content: .info(title: presentationData.strings.AuthConfirmation_LoginFail_Title, text: presentationData.strings.AuthConfirmation_LoginFail_Text(domain).string, timeout: nil, customUndoText: nil), action: { _ in return true })
|
||||
topViewController.present(controller, in: .current)
|
||||
}
|
||||
}
|
||||
|
||||
HapticFeedback().error()
|
||||
}
|
||||
|
||||
HapticFeedback().error()
|
||||
})
|
||||
case .decline:
|
||||
let _ = context.engine.messages.declineUrlAuth(url: url).start()
|
||||
case .failed:
|
||||
dismissImpl?()
|
||||
|
||||
if case let .request(domain, _, _, _, _, _) = result {
|
||||
if let topViewController = navigationController?.topViewController as? ViewController {
|
||||
let controller = UndoOverlayController(presentationData: presentationData, content: .info(title: presentationData.strings.AuthConfirmation_LoginFail_Title, text: presentationData.strings.AuthConfirmation_LoginFail_Text(domain).string, timeout: nil, customUndoText: nil), elevatedLayout: topViewController is TabBarController, action: { _ in return true })
|
||||
topViewController.present(controller, in: .current)
|
||||
Queue.mainQueue().after(0.3) {
|
||||
if case let .request(domain, _, _, _, _, _) = result {
|
||||
if var topViewController = navigationController?.topViewController as? ViewController {
|
||||
if let tabBarController = topViewController as? TabBarController, let controller = tabBarController.currentController {
|
||||
topViewController = controller
|
||||
}
|
||||
let controller = UndoOverlayController(presentationData: presentationData, content: .info(title: presentationData.strings.AuthConfirmation_LoginFail_Title, text: presentationData.strings.AuthConfirmation_LoginFail_Text(domain).string, timeout: nil, customUndoText: nil), action: { _ in return true })
|
||||
topViewController.present(controller, in: .current)
|
||||
}
|
||||
}
|
||||
|
||||
HapticFeedback().error()
|
||||
}
|
||||
|
||||
HapticFeedback().error()
|
||||
}
|
||||
})
|
||||
navigationController?.pushViewController(controller)
|
||||
|
|
@ -1917,8 +1930,11 @@ func openResolvedUrlImpl(
|
|||
controller?.dismissAnimated()
|
||||
}
|
||||
} else {
|
||||
if let topViewController = navigationController?.topViewController as? ViewController {
|
||||
let controller = UndoOverlayController(presentationData: presentationData, content: .info(title: presentationData.strings.AuthConfirmation_LoginFail_Title, text: presentationData.strings.AuthConfirmation_LoginFail_TextUnknown, timeout: nil, customUndoText: nil), elevatedLayout: topViewController is TabBarController, action: { _ in return true })
|
||||
if var topViewController = navigationController?.topViewController as? ViewController {
|
||||
if let tabBarController = topViewController as? TabBarController, let controller = tabBarController.currentController {
|
||||
topViewController = controller
|
||||
}
|
||||
let controller = UndoOverlayController(presentationData: presentationData, content: .info(title: presentationData.strings.AuthConfirmation_LoginFail_Title, text: presentationData.strings.AuthConfirmation_LoginFail_TextUnknown, timeout: nil, customUndoText: nil), action: { _ in return true })
|
||||
topViewController.present(controller, in: .current)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -514,7 +514,7 @@ public final class SharedWakeupManager {
|
|||
return
|
||||
}
|
||||
guard let self else {
|
||||
task.updateTitle(task.title, subtitle: "Finished")
|
||||
task.updateTitle(task.title, subtitle: presentationData.strings.BackgroundTasks_MediaFinished)
|
||||
task.setTaskCompleted(success: true)
|
||||
return
|
||||
}
|
||||
|
|
@ -562,7 +562,7 @@ public final class SharedWakeupManager {
|
|||
|
||||
Task { @MainActor [weak self] in
|
||||
guard let self else {
|
||||
task.updateTitle(task.title, subtitle: "Finished")
|
||||
task.updateTitle(task.title, subtitle: presentationData.strings.BackgroundTasks_MediaFinished)
|
||||
task.setTaskCompleted(success: true)
|
||||
return
|
||||
}
|
||||
|
|
@ -576,7 +576,7 @@ public final class SharedWakeupManager {
|
|||
|
||||
if self.backgroundProcessingTaskId != task.identifier || self.pendingMediaUploadsByKey.isEmpty {
|
||||
self.backgroundProcessingTaskProgressByKey = [:]
|
||||
task.updateTitle(task.title, subtitle: "Finished")
|
||||
task.updateTitle(task.title, subtitle: presentationData.strings.BackgroundTasks_MediaFinished)
|
||||
task.setTaskCompleted(success: true)
|
||||
if self.backgroundProcessingTaskId == task.identifier {
|
||||
self.backgroundProcessingTaskId = nil
|
||||
|
|
@ -690,7 +690,7 @@ public final class SharedWakeupManager {
|
|||
return
|
||||
}
|
||||
guard let self else {
|
||||
task.updateTitle(task.title, subtitle: "Finished")
|
||||
task.updateTitle(task.title, subtitle: presentationData.strings.BackgroundTasks_StoryFinished)
|
||||
task.setTaskCompleted(success: true)
|
||||
return
|
||||
}
|
||||
|
|
@ -738,7 +738,7 @@ public final class SharedWakeupManager {
|
|||
|
||||
Task { @MainActor [weak self] in
|
||||
guard let self else {
|
||||
task.updateTitle(task.title, subtitle: "Finished")
|
||||
task.updateTitle(task.title, subtitle: presentationData.strings.BackgroundTasks_StoryFinished)
|
||||
task.setTaskCompleted(success: true)
|
||||
return
|
||||
}
|
||||
|
|
@ -754,7 +754,7 @@ public final class SharedWakeupManager {
|
|||
|
||||
if self.backgroundStoryProcessingTaskId != task.identifier || self.pendingStoryUploadStatusesByKey.isEmpty {
|
||||
self.backgroundStoryProcessingTaskProgressByKey = [:]
|
||||
task.updateTitle(task.title, subtitle: "Finished")
|
||||
task.updateTitle(task.title, subtitle: presentationData.strings.BackgroundTasks_StoryFinished)
|
||||
task.setTaskCompleted(success: true)
|
||||
if self.backgroundStoryProcessingTaskId == task.identifier {
|
||||
self.backgroundStoryProcessingTaskId = nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue