Eduard Kuzmenko
4 years ago
13 changed files with 553 additions and 200 deletions
@ -0,0 +1,37 @@
@@ -0,0 +1,37 @@
|
||||
const fs = require('fs'); |
||||
|
||||
let str = fs.readFileSync('../lang.ts').toString().replace(/\s.+\/\/.+/g, ''); |
||||
{ |
||||
const pattern = '= {'; |
||||
str = str.slice(str.indexOf(pattern) + pattern.length - 1); |
||||
} |
||||
|
||||
{ |
||||
const pattern = '};'; |
||||
str = str.slice(0, str.indexOf(pattern) + pattern.length - 1); |
||||
} |
||||
|
||||
//console.log(str);
|
||||
const json = JSON.parse(str); |
||||
//console.log(json);
|
||||
|
||||
const f = (key, value, plural) => { |
||||
value = value |
||||
.replace(/\n/g, '\\n') |
||||
.replace(/"/g, '\\"'); |
||||
return `"${key}${plural ? '_' + plural.replace('_value', '') : ''}" = "${value}";\n`; |
||||
}; |
||||
|
||||
let out = ''; |
||||
for(const key in json) { |
||||
const value = json[key]; |
||||
if(typeof(value) === 'string') { |
||||
out += f(key, value); |
||||
} else { |
||||
for(const plural in value) { |
||||
out += f(key, value[plural], plural); |
||||
} |
||||
} |
||||
} |
||||
|
||||
fs.writeFileSync('./out/langPack.strings', out); |
@ -0,0 +1,190 @@
@@ -0,0 +1,190 @@
|
||||
"FilterIncludeExcludeInfo" = "Choose chats and types of chats that will\nappear and never appear in this folder."; |
||||
"FilterNameInputLabel" = "Folder Name"; |
||||
"FilterMenuDelete" = "Delete Folder"; |
||||
"FilterHeaderEdit" = "Edit Folder"; |
||||
"FilterAllGroups" = "All Groups"; |
||||
"FilterAllContacts" = "All Contacts"; |
||||
"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"; |
||||
"EditProfile.BioLabel" = "Bio (optional)"; |
||||
"EditProfile.Username.Label" = "Username (optional)"; |
||||
"EditProfile.Username.Available" = "Username is available"; |
||||
"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 a–z, 0–9 and underscores. Minimum length is 5 characters."; |
||||
"ChatList.Menu.Archived" = "Archived"; |
||||
"Saved" = "Saved"; |
||||
"General.Keyboard" = "Keyboard"; |
||||
"General.SendShortcut.Enter" = "Send by Enter"; |
||||
"General.SendShortcut.CtrlEnter" = "Send by %s + Enter"; |
||||
"General.SendShortcut.NewLine.ShiftEnter" = "New line by Shift + Enter"; |
||||
"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"; |
||||
"Notifications.Sound" = "Notification Sound"; |
||||
"Notifications.MessagePreview" = "Message preview"; |
||||
"Checkbox.Enabled" = "Enabled"; |
||||
"Checkbox.Disabled" = "Disabled"; |
||||
"Privacy.Devices_one" = "%1$d device"; |
||||
"Privacy.Devices_other" = "%1$d devices"; |
||||
"ActionCreateChannel" = "Channel created"; |
||||
"ActionCreateGroup" = "un1 created the group"; |
||||
"ActionChangedTitle" = "un1 changed the group name to un2"; |
||||
"ActionRemovedPhoto" = "un1 removed the group photo"; |
||||
"ActionChangedPhoto" = "un1 changed the group photo"; |
||||
"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"; |
||||
"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"; |
||||
"FilterAlwaysShow" = "Include Chats"; |
||||
"FilterNeverShow" = "Exclude Chats"; |
||||
"FilterInclude" = "Included Chats"; |
||||
"FilterExclude" = "Excluded Chats"; |
||||
"FilterChatTypes" = "Chat types"; |
||||
"FilterChats" = "Chats"; |
||||
"FilterNew" = "New Folder"; |
||||
"Filters" = "Folders"; |
||||
"FilterRecommended" = "Recommended Folders"; |
||||
"Add" = "Add"; |
||||
"Chats_one" = "%1$d chat"; |
||||
"Chats_other" = "%1$d chats"; |
||||
"Channels_one" = "%1$d channel"; |
||||
"Channels_other" = "%1$d channels"; |
||||
"Groups_one" = "%1$d group"; |
||||
"Groups_other" = "%1$d groups"; |
||||
"Users_one" = "%1$d user"; |
||||
"Users_other" = "%1$d users"; |
||||
"UsernameHelpLink" = "This link opens a chat with you:\n%1$s"; |
||||
"NewGroup" = "New Group"; |
||||
"Contacts" = "Contacts"; |
||||
"SavedMessages" = "Saved Messages"; |
||||
"Settings" = "Settings"; |
||||
"SettingsHelp" = "Help"; |
||||
"General" = "General"; |
||||
"TextSize" = "Message Text Size"; |
||||
"ChatBackground" = "Chat Background"; |
||||
"EnableAnimations" = "Enable Animations"; |
||||
"AutoDownloadMedia" = "Auto-Download Media"; |
||||
"AutodownloadContacts" = "Contacts"; |
||||
"AutodownloadPrivateChats" = "Private Chats"; |
||||
"AutodownloadGroupChats" = "Group Chats"; |
||||
"AutodownloadChannels" = "Channels"; |
||||
"AutoplayGIF" = "GIFs"; |
||||
"AutoplayVideo" = "Videos"; |
||||
"NotificationsForGroups" = "Notifications for groups"; |
||||
"NotificationsForPrivateChats" = "Notifications for private chats"; |
||||
"NotificationsForChannels" = "Notifications for channels"; |
||||
"NotificationsPrivateChats" = "Private Chats"; |
||||
"NotificationsGroups" = "Groups"; |
||||
"NotificationsChannels" = "Channels"; |
||||
"NotificationsOther" = "Other"; |
||||
"ContactJoined" = "Contact joined Telegram"; |
||||
"Loading" = "Loading..."; |
||||
"Unblock" = "Unblock"; |
||||
"BlockedUsers" = "Blocked Users"; |
||||
"BlockedUsersInfo" = "Blocked users will not be able to contact you and will not see your Last Seen time."; |
||||
"BlockedEmpty" = "None"; |
||||
"TwoStepVerification" = "Two-Step Verification"; |
||||
"PrivacyExceptions" = "Exceptions"; |
||||
"PrivacyLastSeen" = "Last Seen & Online"; |
||||
"PrivacySettings" = "Privacy and Security"; |
||||
"PrivacyTitle" = "Privacy"; |
||||
"PrivacyPhone" = "Phone Number"; |
||||
"PrivacyPhoneTitle" = "Who can see my phone number?"; |
||||
"PrivacyPhoneTitle2" = "Who can find me by my number?"; |
||||
"PrivacyPhoneInfo" = "Users who have your number saved in their contacts will also see it on Telegram."; |
||||
"PrivacyPhoneInfo3" = "Users who add your number to their contacts will see it on Telegram only if they are your contacts."; |
||||
"PrivacyProfilePhoto" = "Profile Photos"; |
||||
"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?"; |
||||
"LastSeenTitle" = "Who can see your Last Seen time?"; |
||||
"SessionsTitle" = "Active Sessions"; |
||||
"CurrentSession" = "This device"; |
||||
"TerminateAllSessions" = "Terminate All Other Sessions"; |
||||
"TerminateSessionText" = "Are you sure you want to terminate this session?"; |
||||
"OtherSessions" = "Active sessions"; |
||||
"AreYouSureSessionTitle" = "Terminate session"; |
||||
"AreYouSureSessionsTitle" = "Terminate sessions"; |
||||
"AreYouSureSessions" = "Are you sure you want to terminate all other sessions?"; |
||||
"Terminate" = "Terminate"; |
||||
"WhoCanCallMe" = "Who can call me?"; |
||||
"WhoCanAddMe" = "Who can add me to group chats?"; |
||||
"ArchivedChats" = "Archived Chats"; |
||||
"Cancel" = "Cancel"; |
||||
"HistoryCleared" = "History was cleared"; |
||||
"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.BotPermissionAllowed" = "You allowed this bot to message you when you logged in on %@"; |
||||
"ChatList.Service.Call.incoming" = "Incoming Call (%@)"; |
||||
"ChatList.Service.Call.outgoing" = "Outgoing Call (%@)"; |
||||
"ChatList.Service.Call.Cancelled" = "Cancelled Call"; |
||||
"ChatList.Service.Call.Missed" = "Missed Call"; |
||||
"ChatList.Filter.Header" = "Create folders for different groups of chats and quickly switch between them."; |
||||
"ChatList.Filter.NewTitle" = "Create Folder"; |
||||
"ChatList.Filter.List.Title" = "Chat Folders"; |
||||
"ChatList.Filter.Include.AddChat" = "Add Chats"; |
||||
"ChatList.Filter.Exclude.AddChat" = "Add Chats"; |
||||
"ChatList.Filter.All" = "All"; |
||||
"ChatList.Filter.Contacts" = "Contacts"; |
||||
"ChatList.Filter.NonContacts" = "Non-Contacts"; |
||||
"ChatList.Filter.Groups" = "Groups"; |
||||
"ChatList.Filter.Channels" = "Channels"; |
||||
"ChatList.Filter.Bots" = "Bots"; |
||||
"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"; |
||||
"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"; |
||||
"Stickers.SuggestStickers" = "Suggest Stickers by Emoji"; |
||||
"InstalledStickers.LoopAnimated" = "Loop Animated Stickers"; |
||||
"PrivacyAndSecurity.Item.On" = "On"; |
||||
"PrivacyAndSecurity.Item.Off" = "Off"; |
||||
"PrivacySettings.VoiceCalls" = "Calls"; |
||||
"PrivacySettings.Forwards" = "Forwarded Messages"; |
||||
"PrivacySettings.Groups" = "Groups and Channels"; |
||||
"PrivacySettingsController.AddUsers" = "Add Users"; |
||||
"PrivacySettingsController.GroupDescription" = "You can restrict who can add you to groups and channels with granular precision."; |
||||
"PrivacySettingsController.Forwards.CustomHelp" = "You can restrict who can add a link to your account when forwarding your messages."; |
||||
"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.PeerInfo" = "You can add users or entire groups as exceptions that will override the settings above."; |
||||
"PrivacySettingsController.Everbody" = "Everybody"; |
||||
"PrivacySettingsController.MyContacts" = "My Contacts"; |
||||
"PrivacySettingsController.Nobody" = "Nobody"; |
||||
"PrivacySettingsController.NeverShare" = "Never Share With"; |
||||
"PrivacySettingsController.AlwaysShare" = "Always Share With"; |
||||
"PrivacySettingsController.NeverAllow" = "Never Allow"; |
||||
"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."; |
Loading…
Reference in new issue