Browse Source

Temp

master
morethanwords 3 years ago
parent
commit
39ca6bfdd0
  1. 2
      src/config/app.ts
  2. 6
      src/helpers/dom.ts
  3. 18
      src/lang.ts
  4. 6
      src/lib/appManagers/appMessagesManager.ts
  5. 121
      src/scripts/out/langPack.strings

2
src/config/app.ts

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

6
src/helpers/dom.ts

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

18
src/lang.ts

@ -29,7 +29,7 @@ const lang = {
"Chat.Subscribe": "SUBSCRIBE", "Chat.Subscribe": "SUBSCRIBE",
"Chat.Selection.MessagesCount": { "Chat.Selection.MessagesCount": {
"one_value": "%d Message", "one_value": "%d Message",
"other_value": "%d Messages", "other_value": "%d Messages"
}, },
"Chat.Selection.LimitToast": "Max selection count reached.", "Chat.Selection.LimitToast": "Max selection count reached.",
"Saved": "Saved", "Saved": "Saved",
@ -253,12 +253,12 @@ const lang = {
"Chat.Service.BotPermissionAllowed": "You allowed this bot to message you when you logged in on %@", "Chat.Service.BotPermissionAllowed": "You allowed this bot to message you when you logged in on %@",
"Chat.Poll.Unvote": "Retract Vote", "Chat.Poll.Unvote": "Retract Vote",
"Chat.Poll.Stop": "Stop Poll", "Chat.Poll.Stop": "Stop Poll",
/* "Chat.Poll.Stop.Confirm.Header": "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.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": { // "Chat.Pinned.UnpinAll": {
"one_value": "Unpin %d Message", // "one_value": "Unpin %d Message",
"other_value": "Unpin All %d Messages" // "other_value": "Unpin All %d Messages"
}, */ // },
"Chat.Pinned.DontShow": "Don't Show Pinned Messages", "Chat.Pinned.DontShow": "Don't Show Pinned Messages",
"Chat.Title.Comments": { "Chat.Title.Comments": {
"one_value": "%d Comment", "one_value": "%d Comment",
@ -340,7 +340,7 @@ const lang = {
"one_value": "%d user", "one_value": "%d user",
"other_value": "%d users" "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.Select": "Select",
"Message.Context.Pin": "Pin", "Message.Context.Pin": "Pin",
"Message.Context.Unpin": "Unpin", "Message.Context.Unpin": "Unpin",
@ -348,7 +348,7 @@ const lang = {
"NewPoll.Explanation.Placeholder": "Add a Comment (Optional)", "NewPoll.Explanation.Placeholder": "Add a Comment (Optional)",
"NewPoll.OptionsAddOption": "Add an Option", "NewPoll.OptionsAddOption": "Add an Option",
"NewPoll.MultipleChoice": "Multiple Answers", "NewPoll.MultipleChoice": "Multiple Answers",
"NewPoll.Quiz": "Quiz Mode", "NewPoll.Quiz": "Quiz Mode"
}; };
export default lang; export default lang;

6
src/lib/appManagers/appMessagesManager.ts

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

121
src/scripts/out/langPack.strings

@ -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."; "FilterIncludeExcludeInfo" = "Choose chats and types of chats that will\nappear and never appear in this folder.";
"FilterNameInputLabel" = "Folder Name"; "FilterNameInputLabel" = "Folder Name";
"FilterMenuDelete" = "Delete Folder"; "FilterMenuDelete" = "Delete Folder";
@ -7,9 +9,6 @@
"FilterAllNonContacts" = "All Non-Contacts"; "FilterAllNonContacts" = "All Non-Contacts";
"FilterAllChannels" = "All Channels"; "FilterAllChannels" = "All Channels";
"FilterAllBots" = "All Bots"; "FilterAllBots" = "All Bots";
"FilterAllUnmuted" = "All Unmuted";
"FilterAllUnread" = "All Unread";
"FilterAllUnarchived" = "All Unarchived";
"WordDelimiter" = ", "; "WordDelimiter" = ", ";
"WordDelimiterLast" = " and "; "WordDelimiterLast" = " and ";
"EditProfile.FirstNameLabel" = "Name"; "EditProfile.FirstNameLabel" = "Name";
@ -19,7 +18,17 @@
"EditProfile.Username.Taken" = "Username is already taken"; "EditProfile.Username.Taken" = "Username is already taken";
"EditProfile.Username.Invalid" = "Username is invalid"; "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 a–z, 0–9 and underscores. Minimum length is 5 characters."; "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 a–z, 0–9 and underscores. Minimum length is 5 characters.";
"ExceptionModal.Search.Placeholder" = "Add exception...";
"ChatList.Menu.Archived" = "Archived"; "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"; "Saved" = "Saved";
"General.Keyboard" = "Keyboard"; "General.Keyboard" = "Keyboard";
"General.SendShortcut.Enter" = "Send by Enter"; "General.SendShortcut.Enter" = "Send by Enter";
@ -32,10 +41,24 @@
"ChatBackground.Blur" = "Blur Wallpaper Image"; "ChatBackground.Blur" = "Blur Wallpaper Image";
"Notifications.Sound" = "Notification Sound"; "Notifications.Sound" = "Notification Sound";
"Notifications.MessagePreview" = "Message preview"; "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.Enabled" = "Enabled";
"Checkbox.Disabled" = "Disabled"; "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_one" = "%1$d device";
"Privacy.Devices_other" = "%1$d devices"; "Privacy.Devices_other" = "%1$d devices";
"PrivacyModal.Search.Placeholder" = "Add Users or Groups...";
"ActionCreateChannel" = "Channel created"; "ActionCreateChannel" = "Channel created";
"ActionCreateGroup" = "un1 created the group"; "ActionCreateGroup" = "un1 created the group";
"ActionChangedTitle" = "un1 changed the group name to un2"; "ActionChangedTitle" = "un1 changed the group name to un2";
@ -44,13 +67,27 @@
"ActionChangedVideo" = "un1 changed the group video"; "ActionChangedVideo" = "un1 changed the group video";
"ActionAddUser" = "un1 added un2"; "ActionAddUser" = "un1 added un2";
"ActionAddUserSelf" = "un1 returned to the group"; "ActionAddUserSelf" = "un1 returned to the group";
"ActionAddUserSelfMega" = "un1 joined the group";
"ActionAddUserSelfYou" = "You returned to the group"; "ActionAddUserSelfYou" = "You returned to the group";
"ActionAddUserSelfMega" = "un1 joined the group";
"ActionLeftUser" = "un1 left the group"; "ActionLeftUser" = "un1 left the group";
"ActionKickUser" = "un1 removed un2"; "ActionKickUser" = "un1 removed un2";
"ActionInviteUser" = "un1 joined the group via invite link"; "ActionInviteUser" = "un1 joined the group via invite link";
"ActionPinnedNoText" = "un1 pinned a message"; "ActionPinnedNoText" = "un1 pinned a message";
"ActionMigrateFromGroup" = "This group was upgraded to a supergroup"; "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"; "FilterAlwaysShow" = "Include Chats";
"FilterNeverShow" = "Exclude Chats"; "FilterNeverShow" = "Exclude Chats";
"FilterInclude" = "Included Chats"; "FilterInclude" = "Included Chats";
@ -60,6 +97,9 @@
"FilterNew" = "New Folder"; "FilterNew" = "New Folder";
"Filters" = "Folders"; "Filters" = "Folders";
"FilterRecommended" = "Recommended Folders"; "FilterRecommended" = "Recommended Folders";
"FilterShowMoreChats_one" = "Show %1$d More Chat";
"FilterShowMoreChats_other" = "Show %1$d More Chats";
"FromYou" = "You";
"Add" = "Add"; "Add" = "Add";
"Chats_one" = "%1$d chat"; "Chats_one" = "%1$d chat";
"Chats_other" = "%1$d chats"; "Chats_other" = "%1$d chats";
@ -69,7 +109,10 @@
"Groups_other" = "%1$d groups"; "Groups_other" = "%1$d groups";
"Users_one" = "%1$d user"; "Users_one" = "%1$d user";
"Users_other" = "%1$d users"; "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"; "UsernameHelpLink" = "This link opens a chat with you:\n%1$s";
"NewChannel" = "New Channel";
"NewGroup" = "New Group"; "NewGroup" = "New Group";
"Contacts" = "Contacts"; "Contacts" = "Contacts";
"SavedMessages" = "Saved Messages"; "SavedMessages" = "Saved Messages";
@ -93,6 +136,8 @@
"NotificationsGroups" = "Groups"; "NotificationsGroups" = "Groups";
"NotificationsChannels" = "Channels"; "NotificationsChannels" = "Channels";
"NotificationsOther" = "Other"; "NotificationsOther" = "Other";
"MarkAsUnread" = "Mark as unread";
"MarkAsRead" = "Mark as read";
"ContactJoined" = "Contact joined Telegram"; "ContactJoined" = "Contact joined Telegram";
"Loading" = "Loading..."; "Loading" = "Loading...";
"Unblock" = "Unblock"; "Unblock" = "Unblock";
@ -100,6 +145,9 @@
"BlockedUsersInfo" = "Blocked users will not be able to contact you and will not see your Last Seen time."; "BlockedUsersInfo" = "Blocked users will not be able to contact you and will not see your Last Seen time.";
"BlockedEmpty" = "None"; "BlockedEmpty" = "None";
"TwoStepVerification" = "Two-Step Verification"; "TwoStepVerification" = "Two-Step Verification";
"PinnedMessage" = "Pinned Message";
"PinnedMessagesCount_one" = "Pinned Message";
"PinnedMessagesCount_other" = "%1$d Pinned Messages";
"PrivacyExceptions" = "Exceptions"; "PrivacyExceptions" = "Exceptions";
"PrivacyLastSeen" = "Last Seen & Online"; "PrivacyLastSeen" = "Last Seen & Online";
"PrivacySettings" = "Privacy and Security"; "PrivacySettings" = "Privacy and Security";
@ -113,6 +161,8 @@
"PrivacyProfilePhotoTitle" = "Who can see my profile photos & videos?"; "PrivacyProfilePhotoTitle" = "Who can see my profile photos & videos?";
"PrivacyP2PHeader" = "Peer-to-Peer"; "PrivacyP2PHeader" = "Peer-to-Peer";
"PrivacyForwardsTitle" = "Who can add a link to my account when forwarding my messages?"; "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?"; "LastSeenTitle" = "Who can see your Last Seen time?";
"SessionsTitle" = "Active Sessions"; "SessionsTitle" = "Active Sessions";
"CurrentSession" = "This device"; "CurrentSession" = "This device";
@ -128,18 +178,60 @@
"ArchivedChats" = "Archived Chats"; "ArchivedChats" = "Archived Chats";
"Cancel" = "Cancel"; "Cancel" = "Cancel";
"HistoryCleared" = "History was cleared"; "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.Filters" = "Chat Folders";
"AccountSettings.Notifications" = "Notifications and Sounds"; "AccountSettings.Notifications" = "Notifications and Sounds";
"AccountSettings.PrivacyAndSecurity" = "Privacy and Security"; "AccountSettings.PrivacyAndSecurity" = "Privacy and Security";
"AccountSettings.Language" = "Language"; "AccountSettings.Language" = "Language";
"Bio.Description" = "Any details such as age, occupation or city.\nExample: 23 y.o. designer from San Francisco"; "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.ScheduledFor" = "Scheduled for %@";
"Chat.Date.ScheduledForToday" = "Scheduled for today"; "Chat.Date.ScheduledForToday" = "Scheduled for today";
"Chat.Service.PeerJoinedTelegram" = "%@ joined Telegram"; "Chat.Service.PeerJoinedTelegram" = "%@ joined Telegram";
"Chat.Service.Channel.UpdatedTitle" = "Channel renamed to \"%@\""; "Chat.Service.Channel.UpdatedTitle" = "Channel renamed to \"%@\"";
"Chat.Service.Channel.UpdatedPhoto" = "Channel photo updated"; "Chat.Service.Channel.UpdatedPhoto" = "Channel photo updated";
"Chat.Service.Channel.RemovedPhoto" = "Channel photo removed"; "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.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.incoming" = "Incoming Call (%@)";
"ChatList.Service.Call.outgoing" = "Outgoing Call (%@)"; "ChatList.Service.Call.outgoing" = "Outgoing Call (%@)";
"ChatList.Service.Call.Cancelled" = "Cancelled Call"; "ChatList.Service.Call.Cancelled" = "Cancelled Call";
@ -158,6 +250,9 @@
"ChatList.Filter.MutedChats" = "Muted"; "ChatList.Filter.MutedChats" = "Muted";
"ChatList.Filter.ReadChats" = "Read"; "ChatList.Filter.ReadChats" = "Read";
"ChatList.Filter.Archive" = "Archived"; "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"; "Date.Today" = "Today";
"EditAccount.Username" = "Username"; "EditAccount.Username" = "Username";
"EditAccount.Title" = "Edit Profile"; "EditAccount.Title" = "Edit Profile";
@ -167,7 +262,15 @@
"Telegram.InstalledStickerPacksController" = "Stickers"; "Telegram.InstalledStickerPacksController" = "Stickers";
"Telegram.NotificationSettingsViewController" = "Notifications"; "Telegram.NotificationSettingsViewController" = "Notifications";
"Stickers.SuggestStickers" = "Suggest Stickers by Emoji"; "Stickers.SuggestStickers" = "Suggest Stickers by Emoji";
"ShareModal.Search.ForwardPlaceholder" = "Forward to...";
"InstalledStickers.LoopAnimated" = "Loop Animated Stickers"; "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.On" = "On";
"PrivacyAndSecurity.Item.Off" = "Off"; "PrivacyAndSecurity.Item.Off" = "Off";
"PrivacySettings.VoiceCalls" = "Calls"; "PrivacySettings.VoiceCalls" = "Calls";
@ -190,4 +293,12 @@
"PrivacySettingsController.AlwaysAllow" = "Always Allow"; "PrivacySettingsController.AlwaysAllow" = "Always Allow";
"PrivacySettingsController.UserCount_one" = "%d user"; "PrivacySettingsController.UserCount_one" = "%d user";
"PrivacySettingsController.UserCount_other" = "%d users"; "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";

Loading…
Cancel
Save