This commit is contained in:
morethanwords 2021-03-27 13:42:08 +04:00
parent b0d742932e
commit 39ca6bfdd0
5 changed files with 135 additions and 18 deletions

View File

@ -2,7 +2,7 @@ const App = {
id: 1025907,
hash: '452b0359b988148995f22ff0f4229750',
version: '0.4.0',
langPackVersion: '0.0.3',
langPackVersion: '0.0.4',
domains: [] as string[],
baseDcId: 2
};

View File

@ -805,3 +805,9 @@ export function htmlToDocumentFragment(html: string) {
template.innerHTML = html;
return template.content;
}
export function htmlToSpan(html: string) {
const span = document.createElement('span');
span.innerHTML = html;
return span;
}

View File

@ -29,7 +29,7 @@ const lang = {
"Chat.Subscribe": "SUBSCRIBE",
"Chat.Selection.MessagesCount": {
"one_value": "%d Message",
"other_value": "%d Messages",
"other_value": "%d Messages"
},
"Chat.Selection.LimitToast": "Max selection count reached.",
"Saved": "Saved",
@ -253,12 +253,12 @@ const lang = {
"Chat.Service.BotPermissionAllowed": "You allowed this bot to message you when you logged in on %@",
"Chat.Poll.Unvote": "Retract Vote",
"Chat.Poll.Stop": "Stop Poll",
/* "Chat.Poll.Stop.Confirm.Header": "Stop Poll?",
"Chat.Poll.Stop.Confirm.Text": "If you stop this poll now, nobody will be able to vote in it anymore. This action cannot be undone.", */
/* "Chat.Pinned.UnpinAll": {
"one_value": "Unpin %d Message",
"other_value": "Unpin All %d Messages"
}, */
// "Chat.Poll.Stop.Confirm.Header": "Stop Poll?",
// "Chat.Poll.Stop.Confirm.Text": "If you stop this poll now, nobody will be able to vote in it anymore. This action cannot be undone.",
// "Chat.Pinned.UnpinAll": {
// "one_value": "Unpin %d Message",
// "other_value": "Unpin All %d Messages"
// },
"Chat.Pinned.DontShow": "Don't Show Pinned Messages",
"Chat.Title.Comments": {
"one_value": "%d Comment",
@ -340,7 +340,7 @@ const lang = {
"one_value": "%d user",
"other_value": "%d users"
},
"RcentSessions.Error.FreshReset": "For security reasons, you can't terminate older sessions from a device that you've just connected. Please use an earlier connection or wait for a few hours.",
"RecentSessions.Error.FreshReset": "For security reasons, you can't terminate older sessions from a device that you've just connected. Please use an earlier connection or wait for a few hours.",
"Message.Context.Select": "Select",
"Message.Context.Pin": "Pin",
"Message.Context.Unpin": "Unpin",
@ -348,7 +348,7 @@ const lang = {
"NewPoll.Explanation.Placeholder": "Add a Comment (Optional)",
"NewPoll.OptionsAddOption": "Add an Option",
"NewPoll.MultipleChoice": "Multiple Answers",
"NewPoll.Quiz": "Quiz Mode",
"NewPoll.Quiz": "Quiz Mode"
};
export default lang;

View File

@ -40,7 +40,7 @@ import SlicedArray, { Slice, SliceEnd } from "../../helpers/slicedArray";
import appNotificationsManager, { NotifyOptions } from "./appNotificationsManager";
import PeerTitle from "../../components/peerTitle";
import { forEachReverse } from "../../helpers/array";
import { htmlToDocumentFragment } from "../../helpers/dom";
import { htmlToDocumentFragment, htmlToSpan } from "../../helpers/dom";
//console.trace('include');
// TODO: если удалить сообщение в непрогруженном диалоге, то при обновлении, из-за стейта, последнего сообщения в чатлисте не будет
@ -2722,7 +2722,7 @@ export class AppMessagesManager {
args.push(getNameDivHTML(message.fromId, plain));
}
args.push(plain ? action.title : htmlToDocumentFragment(RichTextProcessor.wrapEmojiText(action.title)));
args.push(plain ? action.title : htmlToSpan(RichTextProcessor.wrapEmojiText(action.title)));
break;
}
@ -2764,7 +2764,7 @@ export class AppMessagesManager {
}]
});
const node = htmlToDocumentFragment(anchorHTML);
const node = htmlToSpan(anchorHTML);
langPackKey = langPack[_];
args = [node];

View File

@ -1,3 +1,5 @@
"AttachAlbum" = "Album";
"BlockModal.Search.Placeholder" = "Block user...";
"FilterIncludeExcludeInfo" = "Choose chats and types of chats that will\nappear and never appear in this folder.";
"FilterNameInputLabel" = "Folder Name";
"FilterMenuDelete" = "Delete Folder";
@ -7,9 +9,6 @@
"FilterAllNonContacts" = "All Non-Contacts";
"FilterAllChannels" = "All Channels";
"FilterAllBots" = "All Bots";
"FilterAllUnmuted" = "All Unmuted";
"FilterAllUnread" = "All Unread";
"FilterAllUnarchived" = "All Unarchived";
"WordDelimiter" = ", ";
"WordDelimiterLast" = " and ";
"EditProfile.FirstNameLabel" = "Name";
@ -19,7 +18,17 @@
"EditProfile.Username.Taken" = "Username is already taken";
"EditProfile.Username.Invalid" = "Username is invalid";
"EditProfile.Username.Help" = "You can choose a username on Telegram. If you do, people will be able to find you by this username and contact you without needing your phone number.\n\nYou can use az, 09 and underscores. Minimum length is 5 characters.";
"ExceptionModal.Search.Placeholder" = "Add exception...";
"ChatList.Menu.Archived" = "Archived";
"Chat.Menu.SelectMessages" = "Select Messages";
"Chat.Menu.ClearSelection" = "Clear Selection";
"Chat.Input.UnpinAll" = "Unpin All Messages";
"Chat.Input.Attach.PhotoOrVideo" = "Photo or Video";
"Chat.Input.Attach.Document" = "Document";
"Chat.Subscribe" = "SUBSCRIBE";
"Chat.Selection.MessagesCount_one" = "%d Message";
"Chat.Selection.MessagesCount_other" = "%d Messages";
"Chat.Selection.LimitToast" = "Max selection count reached.";
"Saved" = "Saved";
"General.Keyboard" = "Keyboard";
"General.SendShortcut.Enter" = "Send by Enter";
@ -32,10 +41,24 @@
"ChatBackground.Blur" = "Blur Wallpaper Image";
"Notifications.Sound" = "Notification Sound";
"Notifications.MessagePreview" = "Message preview";
"NewPrivateChat" = "New Private Chat";
"NewPoll.OptionLabel" = "Option %d";
"NewPoll.Create" = "CREATE";
"Message.Context.Selection.Copy" = "Copy selected";
"Message.Context.Selection.Clear" = "Clear selection";
"Message.Context.Selection.Delete" = "Delete selected";
"Message.Context.Selection.Forward" = "Forward selected";
"Message.Context.Selection.SendNow" = "Send Now selected";
"Checkbox.Enabled" = "Enabled";
"Checkbox.Disabled" = "Disabled";
"Error.PreviewSender.CaptionTooLong" = "Caption is too long.";
"PreviewSender.GroupItems" = "Group items";
"PreviewSender.Send" = "SEND";
"PreviewSender.SendAlbum_one" = "Send Album";
"PreviewSender.SendAlbum_other" = "Send %d Albums";
"Privacy.Devices_one" = "%1$d device";
"Privacy.Devices_other" = "%1$d devices";
"PrivacyModal.Search.Placeholder" = "Add Users or Groups...";
"ActionCreateChannel" = "Channel created";
"ActionCreateGroup" = "un1 created the group";
"ActionChangedTitle" = "un1 changed the group name to un2";
@ -44,13 +67,27 @@
"ActionChangedVideo" = "un1 changed the group video";
"ActionAddUser" = "un1 added un2";
"ActionAddUserSelf" = "un1 returned to the group";
"ActionAddUserSelfMega" = "un1 joined the group";
"ActionAddUserSelfYou" = "You returned to the group";
"ActionAddUserSelfMega" = "un1 joined the group";
"ActionLeftUser" = "un1 left the group";
"ActionKickUser" = "un1 removed un2";
"ActionInviteUser" = "un1 joined the group via invite link";
"ActionPinnedNoText" = "un1 pinned a message";
"ActionMigrateFromGroup" = "This group was upgraded to a supergroup";
"AttachPhoto" = "Photo";
"AttachVideo" = "Video";
"AttachGif" = "GIF";
"AttachLocation" = "Location";
"AttachLiveLocation" = "Live Location";
"AttachContact" = "Contact";
"AttachDocument" = "File";
"AttachSticker" = "Sticker";
"AttachAudio" = "Voice message";
"AttachRound" = "Video message";
"AttachGame" = "Game";
"ChannelMegaJoined" = "You joined this group";
"Channel.DescriptionPlaceholder" = "Description (optional)";
"Draft" = "Draft";
"FilterAlwaysShow" = "Include Chats";
"FilterNeverShow" = "Exclude Chats";
"FilterInclude" = "Included Chats";
@ -60,6 +97,9 @@
"FilterNew" = "New Folder";
"Filters" = "Folders";
"FilterRecommended" = "Recommended Folders";
"FilterShowMoreChats_one" = "Show %1$d More Chat";
"FilterShowMoreChats_other" = "Show %1$d More Chats";
"FromYou" = "You";
"Add" = "Add";
"Chats_one" = "%1$d chat";
"Chats_other" = "%1$d chats";
@ -69,7 +109,10 @@
"Groups_other" = "%1$d groups";
"Users_one" = "%1$d user";
"Users_other" = "%1$d users";
"Members_one" = "%1$d member";
"Members_other" = "%1$d members";
"UsernameHelpLink" = "This link opens a chat with you:\n%1$s";
"NewChannel" = "New Channel";
"NewGroup" = "New Group";
"Contacts" = "Contacts";
"SavedMessages" = "Saved Messages";
@ -93,6 +136,8 @@
"NotificationsGroups" = "Groups";
"NotificationsChannels" = "Channels";
"NotificationsOther" = "Other";
"MarkAsUnread" = "Mark as unread";
"MarkAsRead" = "Mark as read";
"ContactJoined" = "Contact joined Telegram";
"Loading" = "Loading...";
"Unblock" = "Unblock";
@ -100,6 +145,9 @@
"BlockedUsersInfo" = "Blocked users will not be able to contact you and will not see your Last Seen time.";
"BlockedEmpty" = "None";
"TwoStepVerification" = "Two-Step Verification";
"PinnedMessage" = "Pinned Message";
"PinnedMessagesCount_one" = "Pinned Message";
"PinnedMessagesCount_other" = "%1$d Pinned Messages";
"PrivacyExceptions" = "Exceptions";
"PrivacyLastSeen" = "Last Seen & Online";
"PrivacySettings" = "Privacy and Security";
@ -113,6 +161,8 @@
"PrivacyProfilePhotoTitle" = "Who can see my profile photos & videos?";
"PrivacyP2PHeader" = "Peer-to-Peer";
"PrivacyForwardsTitle" = "Who can add a link to my account when forwarding my messages?";
"Reminders" = "Reminders";
"ScheduledMessages" = "Scheduled Messages";
"LastSeenTitle" = "Who can see your Last Seen time?";
"SessionsTitle" = "Active Sessions";
"CurrentSession" = "This device";
@ -128,18 +178,60 @@
"ArchivedChats" = "Archived Chats";
"Cancel" = "Cancel";
"HistoryCleared" = "History was cleared";
"Archive" = "Archive";
"Unarchive" = "Unarchive";
"Delete" = "Delete";
"Reply" = "Reply";
"Edit" = "Edit";
"Forward" = "Forward";
"CopyLink" = "Copy Link";
"Copy" = "Copy";
"Search" = "Search";
"LinkCopied" = "Link copied to clipboard";
"LinkCopiedPrivateInfo" = "This link will only work for members of this chat.";
"GroupAddMembers" = "Add Members";
"SendMessageTo" = "Add people...";
"SelectChat" = "Select Chat";
"JumpToDate" = "Jump to Date";
"Caption" = "Caption";
"Message" = "Message";
"Poll" = "Poll";
"SharedFilesTab2" = "Files";
"SharedMediaTab2" = "Media";
"SharedLinksTab2" = "Links";
"SharedMusicTab2" = "Music";
"SharedVoiceTab2" = "Voice";
"NewPoll" = "New Poll";
"PollOptions" = "Poll options";
"AskAQuestion" = "Ask a Question";
"AddAnExplanationInfo" = "Users will see this text after choosing the wrong answer, good for educational purposes.";
"AccDescrQuizExplanation" = "Explanation";
"AccountSettings.Filters" = "Chat Folders";
"AccountSettings.Notifications" = "Notifications and Sounds";
"AccountSettings.PrivacyAndSecurity" = "Privacy and Security";
"AccountSettings.Language" = "Language";
"Bio.Description" = "Any details such as age, occupation or city.\nExample: 23 y.o. designer from San Francisco";
"Chat.CopySelectedText" = "Copy Selected Text";
"Chat.Date.ScheduledFor" = "Scheduled for %@";
"Chat.Date.ScheduledForToday" = "Scheduled for today";
"Chat.Service.PeerJoinedTelegram" = "%@ joined Telegram";
"Chat.Service.Channel.UpdatedTitle" = "Channel renamed to \"%@\"";
"Chat.Service.Channel.UpdatedPhoto" = "Channel photo updated";
"Chat.Service.Channel.RemovedPhoto" = "Channel photo removed";
"Chat.Service.Channel.UpdatedVideo" = "Channel video updated";
"Chat.Service.BotPermissionAllowed" = "You allowed this bot to message you when you logged in on %@";
"Chat.Poll.Unvote" = "Retract Vote";
"Chat.Poll.Stop" = "Stop Poll";
"Chat.Pinned.DontShow" = "Don't Show Pinned Messages";
"Chat.Title.Comments_one" = "%d Comment";
"Chat.Title.Comments_other" = "%d Comments";
"Chat.Send.WithoutSound" = "Send Without Sound";
"Chat.Send.SetReminder" = "Set a Reminder";
"Chat.Send.ScheduledMessage" = "Schedule Message";
"ChatList.Context.Mute" = "Mute";
"ChatList.Context.Unmute" = "Unmute";
"ChatList.Context.Pin" = "Pin";
"ChatList.Context.Unpin" = "Unpin";
"ChatList.Service.Call.incoming" = "Incoming Call (%@)";
"ChatList.Service.Call.outgoing" = "Outgoing Call (%@)";
"ChatList.Service.Call.Cancelled" = "Cancelled Call";
@ -158,6 +250,9 @@
"ChatList.Filter.MutedChats" = "Muted";
"ChatList.Filter.ReadChats" = "Read";
"ChatList.Filter.Archive" = "Archived";
"Channel.ChannelNameHolder" = "Channel Name";
"Channel.DescriptionHolderDescrpiton" = "You can provide an optional description for your channel.";
"CreateGroup.NameHolder" = "Group Name";
"Date.Today" = "Today";
"EditAccount.Username" = "Username";
"EditAccount.Title" = "Edit Profile";
@ -167,7 +262,15 @@
"Telegram.InstalledStickerPacksController" = "Stickers";
"Telegram.NotificationSettingsViewController" = "Notifications";
"Stickers.SuggestStickers" = "Suggest Stickers by Emoji";
"ShareModal.Search.ForwardPlaceholder" = "Forward to...";
"InstalledStickers.LoopAnimated" = "Loop Animated Stickers";
"PreviewSender.CaptionPlaceholder" = "Add a caption...";
"PreviewSender.SendFile_one" = "Send File";
"PreviewSender.SendFile_other" = "Send %d Files";
"PreviewSender.SendPhoto_one" = "Send Photo";
"PreviewSender.SendPhoto_other" = "Send %d Photos";
"PreviewSender.SendVideo_one" = "Send Video";
"PreviewSender.SendVideo_other" = "Send %d Videos";
"PrivacyAndSecurity.Item.On" = "On";
"PrivacyAndSecurity.Item.Off" = "Off";
"PrivacySettings.VoiceCalls" = "Calls";
@ -190,4 +293,12 @@
"PrivacySettingsController.AlwaysAllow" = "Always Allow";
"PrivacySettingsController.UserCount_one" = "%d user";
"PrivacySettingsController.UserCount_other" = "%d users";
"RecentSessions.Error.FreshReset" = "For security reasons, you can't terminate older sessions from a device that you've just connected. Please use an earlier connection or wait for a few hours.";
"RcentSessions.Error.FreshReset" = "For security reasons, you can't terminate older sessions from a device that you've just connected. Please use an earlier connection or wait for a few hours.";
"Message.Context.Select" = "Select";
"Message.Context.Pin" = "Pin";
"Message.Context.Unpin" = "Unpin";
"NewPoll.Anonymous" = "Anonymous Voting";
"NewPoll.Explanation.Placeholder" = "Add a Comment (Optional)";
"NewPoll.OptionsAddOption" = "Add an Option";
"NewPoll.MultipleChoice" = "Multiple Answers";
"NewPoll.Quiz" = "Quiz Mode";