Update localization

This commit is contained in:
Isaac
2023-12-20 23:14:13 +04:00
parent f8e4ea0fe6
commit 472e8a1556
5 changed files with 54 additions and 32 deletions

View File

@@ -556,8 +556,7 @@ final class ChannelAppearanceScreenComponent: Component {
self.environment?.controller()?.dismiss()
if let lastController = navigationController?.viewControllers.last as? ViewController {
//TODO:localize
let tipController = UndoOverlayController(presentationData: presentationData, content: .actionSucceeded(title: nil, text: "Appearance settings have been updated.", cancel: nil, destructive: false), elevatedLayout: false, position: .bottom, animateInAsReplacement: false, action: { _ in return false })
let tipController = UndoOverlayController(presentationData: presentationData, content: .actionSucceeded(title: nil, text: presentationData.strings.Channel_Appearance_ToastAppliedText, cancel: nil, destructive: false), elevatedLayout: false, position: .bottom, animateInAsReplacement: false, action: { _ in return false })
lastController.present(tipController, in: .window(.root))
}
})
@@ -945,7 +944,6 @@ final class ChannelAppearanceScreenComponent: Component {
let presentationData = component.context.sharedContext.currentPresentationData.with { $0 }
//TODO:localize
let messageItem = PeerNameColorChatPreviewItem.MessageItem(
outgoing: false,
peerId: EnginePeer.Id(namespace: peer.id.namespace, id: PeerId.Id._internalFromInt64Value(0)),
@@ -953,15 +951,15 @@ final class ChannelAppearanceScreenComponent: Component {
photo: peer.profileImageRepresentations,
nameColor: resolvedState.nameColor,
backgroundEmojiId: replyFileId,
reply: (peer.compactDisplayTitle, "Reply to your channel"),
linkPreview: ("Telegram", "Link Preview", "This preview will also be tinted."),
text: "The color you select will be used for the channel's name"
reply: (peer.compactDisplayTitle, environment.strings.Channel_Appearance_ExampleReplyText),
linkPreview: (environment.strings.Channel_Appearance_ExampleLinkWebsite, environment.strings.Channel_Appearance_ExampleLinkTitle, environment.strings.Channel_Appearance_ExampleLinkText),
text: environment.strings.Channel_Appearance_ExampleText
)
var replyLogoContents: [AnyComponentWithIdentity<Empty>] = []
replyLogoContents.append(AnyComponentWithIdentity(id: 0, component: AnyComponent(MultilineTextComponent(
text: .plain(NSAttributedString(
string: "Replies Logo", //TODO:localize
string: environment.strings.Channel_Appearance_NameIcon,
font: Font.regular(presentationData.listsFontSize.baseDisplaySize),
textColor: environment.theme.list.itemPrimaryTextColor
)),
@@ -995,7 +993,7 @@ final class ChannelAppearanceScreenComponent: Component {
header: nil,
footer: AnyComponent(MultilineTextComponent(
text: .plain(NSAttributedString(
string: "Choose a color for the name of your channel, the link it sends, and replies to its messages.", //TODO:localize
string: environment.strings.Channel_Appearance_NameColorFooter,
font: Font.regular(presentationData.listsFontSize.itemListBaseHeaderFontSize),
textColor: environment.theme.list.freeTextColor
)),
@@ -1072,7 +1070,7 @@ final class ChannelAppearanceScreenComponent: Component {
var wallpaperLogoContents: [AnyComponentWithIdentity<Empty>] = []
wallpaperLogoContents.append(AnyComponentWithIdentity(id: 0, component: AnyComponent(MultilineTextComponent(
text: .plain(NSAttributedString(
string: "Channel Wallpaper", //TODO:localize
string: environment.strings.Channel_Appearance_Wallpaper,
font: Font.regular(presentationData.listsFontSize.baseDisplaySize),
textColor: environment.theme.list.itemPrimaryTextColor
)),
@@ -1100,7 +1098,7 @@ final class ChannelAppearanceScreenComponent: Component {
header: nil,
footer: AnyComponent(MultilineTextComponent(
text: .plain(NSAttributedString(
string: "Set a wallpaper that will be visible to everyone reading your channel.", //TODO:localize
string: environment.strings.Channel_Appearance_WallpaperFooter,
font: Font.regular(presentationData.listsFontSize.itemListBaseHeaderFontSize),
textColor: environment.theme.list.freeTextColor
)),
@@ -1169,7 +1167,7 @@ final class ChannelAppearanceScreenComponent: Component {
var profileLogoContents: [AnyComponentWithIdentity<Empty>] = []
profileLogoContents.append(AnyComponentWithIdentity(id: 0, component: AnyComponent(MultilineTextComponent(
text: .plain(NSAttributedString(
string: "Profile Logo", //TODO:localize
string: environment.strings.Channel_Appearance_ProfileIcon,
font: Font.regular(presentationData.listsFontSize.baseDisplaySize),
textColor: environment.theme.list.itemPrimaryTextColor
)),
@@ -1195,7 +1193,7 @@ final class ChannelAppearanceScreenComponent: Component {
background: bannerBackground,
header: AnyComponent(MultilineTextComponent(
text: .plain(NSAttributedString(
string: "PROFILE PAGE COLOR", //TODO:localize
string: environment.strings.Channel_Appearance_ProfileHeader,
font: Font.regular(presentationData.listsFontSize.itemListBaseHeaderFontSize),
textColor: environment.theme.list.freeTextColor
)),
@@ -1203,7 +1201,7 @@ final class ChannelAppearanceScreenComponent: Component {
)),
footer: AnyComponent(MultilineTextComponent(
text: .plain(NSAttributedString(
string: "Choose a color and a logo for the channel's profile.", //TODO:localize
string: environment.strings.Channel_Appearance_ProfileFooter,
font: Font.regular(presentationData.listsFontSize.itemListBaseHeaderFontSize),
textColor: environment.theme.list.freeTextColor
)),
@@ -1280,7 +1278,7 @@ final class ChannelAppearanceScreenComponent: Component {
var emojiStatusContents: [AnyComponentWithIdentity<Empty>] = []
emojiStatusContents.append(AnyComponentWithIdentity(id: 0, component: AnyComponent(MultilineTextComponent(
text: .plain(NSAttributedString(
string: "Channel Emoji Status", //TODO:localize
string: environment.strings.Channel_Appearance_Status,
font: Font.regular(presentationData.listsFontSize.baseDisplaySize),
textColor: environment.theme.list.itemPrimaryTextColor
)),
@@ -1304,7 +1302,7 @@ final class ChannelAppearanceScreenComponent: Component {
theme: environment.theme,
title: AnyComponent(MultilineTextComponent(
text: .plain(NSAttributedString(
string: "Reset Profile Color", //TODO:localize
string: environment.strings.Channel_Appearance_ResetProfileColor,
font: Font.regular(presentationData.listsFontSize.baseDisplaySize),
textColor: environment.theme.list.itemAccentColor
)),
@@ -1352,7 +1350,7 @@ final class ChannelAppearanceScreenComponent: Component {
header: nil,
footer: AnyComponent(MultilineTextComponent(
text: .plain(NSAttributedString(
string: "Choose a status that will be shown next to the channel's name.", //TODO:localize
string: environment.strings.Channel_Appearance_StatusFooter,
font: Font.regular(presentationData.listsFontSize.itemListBaseHeaderFontSize),
textColor: environment.theme.list.freeTextColor
)),
@@ -1393,9 +1391,8 @@ final class ChannelAppearanceScreenComponent: Component {
contentHeight += bottomContentInset
var buttonContents: [AnyComponentWithIdentity<Empty>] = []
//TODO:localize
buttonContents.append(AnyComponentWithIdentity(id: AnyHashable(0 as Int), component: AnyComponent(
Text(text: "Apply Changes", font: Font.semibold(17.0), color: environment.theme.list.itemCheckColors.foregroundColor)
Text(text: environment.strings.Channel_Appearance_ApplyButton, font: Font.semibold(17.0), color: environment.theme.list.itemCheckColors.foregroundColor)
)))
let requiredLevel = requiredBoostSubject.requiredLevel(context: component.context, configuration: premiumConfiguration)
@@ -1512,8 +1509,7 @@ public class ChannelAppearanceScreen: ViewControllerComponentContainer {
), navigationBarAppearance: .default, theme: .default, updatedPresentationData: updatedPresentationData)
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
//TODO:localize
self.title = "Appearance"
self.title = presentationData.strings.Channel_Appearance_Title
self.navigationItem.backBarButtonItem = UIBarButtonItem(title: presentationData.strings.Common_Back, style: .plain, target: nil, action: nil)
self.ready.set(.never())