temp
This commit is contained in:
parent
ad9a6918d7
commit
f125d432cb
@ -50,7 +50,7 @@ import serverTimeManager from "../../lib/mtproto/serverTimeManager";
|
|||||||
import PeerTitle from "../peerTitle";
|
import PeerTitle from "../peerTitle";
|
||||||
|
|
||||||
const USE_MEDIA_TAILS = false;
|
const USE_MEDIA_TAILS = false;
|
||||||
const IGNORE_ACTIONS = ['messageActionHistoryClear'];
|
const IGNORE_ACTIONS: Message.messageService['action']['_'][] = [/* 'messageActionHistoryClear' */];
|
||||||
|
|
||||||
const TEST_SCROLL_TIMES: number = undefined;
|
const TEST_SCROLL_TIMES: number = undefined;
|
||||||
let TEST_SCROLL = TEST_SCROLL_TIMES;
|
let TEST_SCROLL = TEST_SCROLL_TIMES;
|
||||||
|
@ -2,6 +2,7 @@ const App = {
|
|||||||
id: 1025907,
|
id: 1025907,
|
||||||
hash: '452b0359b988148995f22ff0f4229750',
|
hash: '452b0359b988148995f22ff0f4229750',
|
||||||
version: '0.4.0',
|
version: '0.4.0',
|
||||||
|
langPackVersion: '0.0.1',
|
||||||
domains: [] as string[],
|
domains: [] as string[],
|
||||||
baseDcId: 2
|
baseDcId: 2
|
||||||
};
|
};
|
||||||
|
@ -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.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.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.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.PeerInfo": "You can add users or entire groups as exceptions that will override the settings above.",
|
||||||
"PrivacySettingsController.Everbody": "Everybody",
|
"PrivacySettingsController.Everbody": "Everybody",
|
||||||
"PrivacySettingsController.MyContacts": "My Contacts",
|
"PrivacySettingsController.MyContacts": "My Contacts",
|
||||||
@ -208,7 +208,7 @@ const lang = {
|
|||||||
"one_value": "%d user",
|
"one_value": "%d user",
|
||||||
"other_value": "%d users"
|
"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;
|
export default lang;
|
||||||
|
@ -5,6 +5,7 @@ import type lang from "../lang";
|
|||||||
import { LangPackDifference, LangPackString } from "../layer";
|
import { LangPackDifference, LangPackString } from "../layer";
|
||||||
import apiManager from "./mtproto/mtprotoworker";
|
import apiManager from "./mtproto/mtprotoworker";
|
||||||
import sessionStorage from "./sessionStorage";
|
import sessionStorage from "./sessionStorage";
|
||||||
|
import App from "../config/app";
|
||||||
|
|
||||||
export const langPack: {[actionType: string]: LangPackKey} = {
|
export const langPack: {[actionType: string]: LangPackKey} = {
|
||||||
"messageActionChatCreate": "ActionCreateGroup",
|
"messageActionChatCreate": "ActionCreateGroup",
|
||||||
@ -48,8 +49,10 @@ namespace I18n {
|
|||||||
sessionStorage.get('langPack'),
|
sessionStorage.get('langPack'),
|
||||||
polyfillPromise
|
polyfillPromise
|
||||||
]).then(([langPack]) => {
|
]).then(([langPack]) => {
|
||||||
if(!langPack || true) {
|
if(!langPack/* || true */) {
|
||||||
return getLangPack('en');
|
return getLangPack('en');
|
||||||
|
} else if(langPack.appVersion !== App.langPackVersion) {
|
||||||
|
return getLangPack(langPack.lang_code);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!lastRequestedLangCode) {
|
if(!lastRequestedLangCode) {
|
||||||
@ -101,6 +104,8 @@ namespace I18n {
|
|||||||
}
|
}
|
||||||
|
|
||||||
langPack.strings = strings;
|
langPack.strings = strings;
|
||||||
|
// @ts-ignore
|
||||||
|
langPack.appVersion = App.langPackVersion;
|
||||||
|
|
||||||
return sessionStorage.set({langPack}).then(() => {
|
return sessionStorage.set({langPack}).then(() => {
|
||||||
applyLangPack(langPack);
|
applyLangPack(langPack);
|
||||||
@ -193,12 +198,12 @@ namespace I18n {
|
|||||||
} else if(str._ === 'langPackString') {
|
} else if(str._ === 'langPackString') {
|
||||||
input = str.value;
|
input = str.value;
|
||||||
} else {
|
} else {
|
||||||
input = '[' + key + ']';
|
//input = '[' + key + ']';
|
||||||
//input = key;
|
input = key;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
input = '[' + key + ']';
|
//input = '[' + key + ']';
|
||||||
//input = key;
|
input = key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(plain) {
|
if(plain) {
|
||||||
|
@ -28,8 +28,8 @@
|
|||||||
"General.SendShortcut.NewLine.Enter" = "New line by Enter";
|
"General.SendShortcut.NewLine.Enter" = "New line by Enter";
|
||||||
"General.AutoplayMedia" = "Auto-Play Media";
|
"General.AutoplayMedia" = "Auto-Play Media";
|
||||||
"ChatBackground.UploadWallpaper" = "Upload Wallpaper";
|
"ChatBackground.UploadWallpaper" = "Upload Wallpaper";
|
||||||
"ChatBackground.SetColor" = "Upload Wallpaper";
|
"ChatBackground.SetColor" = "Set a Color";
|
||||||
"ChatBackground.Blur" = "Upload Wallpaper";
|
"ChatBackground.Blur" = "Blur Wallpaper Image";
|
||||||
"Notifications.Sound" = "Notification Sound";
|
"Notifications.Sound" = "Notification Sound";
|
||||||
"Notifications.MessagePreview" = "Message preview";
|
"Notifications.MessagePreview" = "Message preview";
|
||||||
"Checkbox.Enabled" = "Enabled";
|
"Checkbox.Enabled" = "Enabled";
|
||||||
@ -128,6 +128,13 @@
|
|||||||
"ArchivedChats" = "Archived Chats";
|
"ArchivedChats" = "Archived Chats";
|
||||||
"Cancel" = "Cancel";
|
"Cancel" = "Cancel";
|
||||||
"HistoryCleared" = "History was cleared";
|
"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.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";
|
||||||
@ -151,15 +158,11 @@
|
|||||||
"ChatList.Filter.MutedChats" = "Muted";
|
"ChatList.Filter.MutedChats" = "Muted";
|
||||||
"ChatList.Filter.ReadChats" = "Read";
|
"ChatList.Filter.ReadChats" = "Read";
|
||||||
"ChatList.Filter.Archive" = "Archived";
|
"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.Username" = "Username";
|
||||||
"EditAccount.Title" = "Edit Profile";
|
"EditAccount.Title" = "Edit Profile";
|
||||||
"EditAccount.Logout" = "Log Out";
|
"EditAccount.Logout" = "Log Out";
|
||||||
"Login.Register.LastName.Placeholder" = "Last Name";
|
"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.GeneralSettingsViewController" = "General Settings";
|
||||||
"Telegram.InstalledStickerPacksController" = "Stickers";
|
"Telegram.InstalledStickerPacksController" = "Stickers";
|
||||||
"Telegram.NotificationSettingsViewController" = "Notifications";
|
"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.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.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.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.PeerInfo" = "You can add users or entire groups as exceptions that will override the settings above.";
|
||||||
"PrivacySettingsController.Everbody" = "Everybody";
|
"PrivacySettingsController.Everbody" = "Everybody";
|
||||||
"PrivacySettingsController.MyContacts" = "My Contacts";
|
"PrivacySettingsController.MyContacts" = "My Contacts";
|
||||||
@ -187,4 +190,4 @@
|
|||||||
"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.";
|
"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.";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user