This commit is contained in:
morethanwords 2021-03-25 13:51:57 +04:00
parent 3bc4db22f2
commit 1f615f9ec8
5 changed files with 26 additions and 17 deletions

View File

@ -50,7 +50,7 @@ import serverTimeManager from "../../lib/mtproto/serverTimeManager";
import PeerTitle from "../peerTitle";
const USE_MEDIA_TAILS = false;
const IGNORE_ACTIONS = ['messageActionHistoryClear'];
const IGNORE_ACTIONS: Message.messageService['action']['_'][] = [/* 'messageActionHistoryClear' */];
const TEST_SCROLL_TIMES: number = undefined;
let TEST_SCROLL = TEST_SCROLL_TIMES;

View File

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

View File

@ -195,7 +195,7 @@ const lang = {
"PrivacySettingsController.P2p.Desc": "Disabling peer-to-peer will relay all calls through Telegram servers to avoid revealing your IP address, but may slightly decrease audio and video quality.",
"PrivacySettingsController.PhoneCallDescription": "You can restrict who can call you with granular precision.",
"PrivacySettingsController.ProfilePhoto.CustomHelp": "You can restrict who can see your profile photo with granular precision.",
"PrivacySettingsController.LastSeenDescription": "You won\"t see Last Seen and Online statuses for people with whom you don\"t share yours. Approximate last seen will be shown instead (recently, within a week, within a month).",
"PrivacySettingsController.LastSeenDescription": "You won't see Last Seen and Online statuses for people with whom you don't share yours. Approximate last seen will be shown instead (recently, within a week, within a month).",
"PrivacySettingsController.PeerInfo": "You can add users or entire groups as exceptions that will override the settings above.",
"PrivacySettingsController.Everbody": "Everybody",
"PrivacySettingsController.MyContacts": "My Contacts",
@ -208,7 +208,7 @@ const lang = {
"one_value": "%d user",
"other_value": "%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."
"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."
};
export default lang;

View File

@ -5,6 +5,7 @@ import type lang from "../lang";
import { LangPackDifference, LangPackString } from "../layer";
import apiManager from "./mtproto/mtprotoworker";
import sessionStorage from "./sessionStorage";
import App from "../config/app";
export const langPack: {[actionType: string]: LangPackKey} = {
"messageActionChatCreate": "ActionCreateGroup",
@ -48,8 +49,10 @@ namespace I18n {
sessionStorage.get('langPack'),
polyfillPromise
]).then(([langPack]) => {
if(!langPack || true) {
if(!langPack/* || true */) {
return getLangPack('en');
} else if(langPack.appVersion !== App.langPackVersion) {
return getLangPack(langPack.lang_code);
}
if(!lastRequestedLangCode) {
@ -101,6 +104,8 @@ namespace I18n {
}
langPack.strings = strings;
// @ts-ignore
langPack.appVersion = App.langPackVersion;
return sessionStorage.set({langPack}).then(() => {
applyLangPack(langPack);
@ -193,12 +198,12 @@ namespace I18n {
} else if(str._ === 'langPackString') {
input = str.value;
} else {
input = '[' + key + ']';
//input = key;
//input = '[' + key + ']';
input = key;
}
} else {
input = '[' + key + ']';
//input = key;
//input = '[' + key + ']';
input = key;
}
if(plain) {

View File

@ -28,8 +28,8 @@
"General.SendShortcut.NewLine.Enter" = "New line by Enter";
"General.AutoplayMedia" = "Auto-Play Media";
"ChatBackground.UploadWallpaper" = "Upload Wallpaper";
"ChatBackground.SetColor" = "Upload Wallpaper";
"ChatBackground.Blur" = "Upload Wallpaper";
"ChatBackground.SetColor" = "Set a Color";
"ChatBackground.Blur" = "Blur Wallpaper Image";
"Notifications.Sound" = "Notification Sound";
"Notifications.MessagePreview" = "Message preview";
"Checkbox.Enabled" = "Enabled";
@ -128,6 +128,13 @@
"ArchivedChats" = "Archived Chats";
"Cancel" = "Cancel";
"HistoryCleared" = "History was cleared";
"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.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";
@ -151,15 +158,11 @@
"ChatList.Filter.MutedChats" = "Muted";
"ChatList.Filter.ReadChats" = "Read";
"ChatList.Filter.Archive" = "Archived";
"Bio.Description" = "Any details such as age, occupation or city.\nExample: 23 y.o. designer from San Francisco";
"Date.Today" = "Today";
"EditAccount.Username" = "Username";
"EditAccount.Title" = "Edit Profile";
"EditAccount.Logout" = "Log Out";
"Login.Register.LastName.Placeholder" = "Last Name";
"AccountSettings.Filters" = "Chat Folders";
"AccountSettings.Notifications" = "Notifications and Sounds";
"AccountSettings.PrivacyAndSecurity" = "Privacy and Security";
"AccountSettings.Language" = "Language";
"Telegram.GeneralSettingsViewController" = "General Settings";
"Telegram.InstalledStickerPacksController" = "Stickers";
"Telegram.NotificationSettingsViewController" = "Notifications";
@ -176,7 +179,7 @@
"PrivacySettingsController.P2p.Desc" = "Disabling peer-to-peer will relay all calls through Telegram servers to avoid revealing your IP address, but may slightly decrease audio and video quality.";
"PrivacySettingsController.PhoneCallDescription" = "You can restrict who can call you with granular precision.";
"PrivacySettingsController.ProfilePhoto.CustomHelp" = "You can restrict who can see your profile photo with granular precision.";
"PrivacySettingsController.LastSeenDescription" = "You won\"t see Last Seen and Online statuses for people with whom you don\"t share yours. Approximate last seen will be shown instead (recently, within a week, within a month).";
"PrivacySettingsController.LastSeenDescription" = "You won't see Last Seen and Online statuses for people with whom you don't share yours. Approximate last seen will be shown instead (recently, within a week, within a month).";
"PrivacySettingsController.PeerInfo" = "You can add users or entire groups as exceptions that will override the settings above.";
"PrivacySettingsController.Everbody" = "Everybody";
"PrivacySettingsController.MyContacts" = "My Contacts";
@ -187,4 +190,4 @@
"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.";
"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.";