mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-31 15:37:01 +00:00
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
This commit is contained in:
commit
9867bae06a
132
Telegram/BUILD
132
Telegram/BUILD
@ -78,6 +78,79 @@ genrule(
|
||||
cmd = "touch $(OUTS)",
|
||||
)
|
||||
|
||||
genrule(
|
||||
name = "GeneratedPresentationStrings",
|
||||
srcs = [
|
||||
"//build-system:GenerateStrings/GenerateStrings.py",
|
||||
"Telegram-iOS/en.lproj/Localizable.strings",
|
||||
],
|
||||
cmd = '''
|
||||
python3 $(location //build-system:GenerateStrings/GenerateStrings.py) \\
|
||||
--source=$(location Telegram-iOS/en.lproj/Localizable.strings) \\
|
||||
--outImplementation=$(location GeneratedPresentationStrings/Sources/PresentationStrings.m) \\
|
||||
--outHeader=$(location GeneratedPresentationStrings/PublicHeaders/PresentationStrings/PresentationStrings.h) \\
|
||||
--outData=$(location GeneratedPresentationStrings/Resources/PresentationStrings.data) \\
|
||||
''',
|
||||
outs = [
|
||||
"GeneratedPresentationStrings/PublicHeaders/PresentationStrings/PresentationStrings.h",
|
||||
"GeneratedPresentationStrings/Sources/PresentationStrings.m",
|
||||
"GeneratedPresentationStrings/Resources/PresentationStrings.data",
|
||||
],
|
||||
)
|
||||
|
||||
empty_languages = [
|
||||
"ar",
|
||||
"be",
|
||||
"ca",
|
||||
"de",
|
||||
"es",
|
||||
"fa",
|
||||
"fr",
|
||||
"id",
|
||||
"it",
|
||||
"ko",
|
||||
"ms",
|
||||
"nl",
|
||||
"pl",
|
||||
"pt",
|
||||
"ru",
|
||||
"tr",
|
||||
"uk",
|
||||
"uz",
|
||||
]
|
||||
|
||||
[
|
||||
genrule(
|
||||
name = "Localizable_{}.strings".format(language),
|
||||
outs = ["{}.lproj/Localizable.strings".format(language)],
|
||||
cmd = "touch $(OUTS)",
|
||||
) for language in empty_languages
|
||||
]
|
||||
|
||||
objc_library(
|
||||
name = "PresentationStrings",
|
||||
enable_modules = True,
|
||||
module_name = "PresentationStrings",
|
||||
srcs = [
|
||||
"GeneratedPresentationStrings/Sources/PresentationStrings.m",
|
||||
],
|
||||
hdrs = [
|
||||
"GeneratedPresentationStrings/PublicHeaders/PresentationStrings/PresentationStrings.h",
|
||||
],
|
||||
includes = [
|
||||
"GeneratedPresentationStrings/PublicHeaders",
|
||||
],
|
||||
sdk_frameworks = [
|
||||
"Foundation",
|
||||
],
|
||||
deps = [
|
||||
"//submodules/NumberPluralizationForm:NumberPluralizationForm",
|
||||
],
|
||||
visibility = [
|
||||
"//visibility:public",
|
||||
],
|
||||
)
|
||||
|
||||
swift_library(
|
||||
name = "_LocalDebugOptions",
|
||||
srcs = [":empty"],
|
||||
@ -122,9 +195,11 @@ filegroup(
|
||||
|
||||
filegroup(
|
||||
name = "AppStringResources",
|
||||
srcs = glob([
|
||||
"Telegram-iOS/*.lproj/Localizable.strings",
|
||||
], exclude = ["Telegram-iOS/*.lproj/**/.*"]),
|
||||
srcs = [
|
||||
"Telegram-iOS/en.lproj/Localizable.strings",
|
||||
] + [
|
||||
"{}.lproj/Localizable.strings".format(language) for language in empty_languages
|
||||
],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
@ -220,6 +295,7 @@ swift_library(
|
||||
"//submodules/PasswordSetupUI:PasswordSetupUIAssets",
|
||||
"//submodules/TelegramUI:TelegramUIResources",
|
||||
"//submodules/TelegramUI:TelegramUIAssets",
|
||||
":GeneratedPresentationStrings/Resources/PresentationStrings.data",
|
||||
],
|
||||
deps = [
|
||||
"//submodules/TelegramUI:TelegramUI",
|
||||
@ -745,49 +821,6 @@ ios_framework(
|
||||
],
|
||||
)
|
||||
|
||||
plist_fragment(
|
||||
name = "SyncCoreInfoPlist",
|
||||
extension = "plist",
|
||||
template =
|
||||
"""
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>{telegram_bundle_id}.SyncCore</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>SyncCore</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
""".format(
|
||||
telegram_bundle_id = telegram_bundle_id,
|
||||
)
|
||||
)
|
||||
|
||||
ios_framework(
|
||||
name = "SyncCoreFramework",
|
||||
bundle_id = "{telegram_bundle_id}.SyncCore".format(
|
||||
telegram_bundle_id = telegram_bundle_id,
|
||||
),
|
||||
families = [
|
||||
"iphone",
|
||||
"ipad",
|
||||
],
|
||||
infoplists = [
|
||||
":SyncCoreInfoPlist",
|
||||
":BuildNumberInfoPlist",
|
||||
":VersionInfoPlist",
|
||||
],
|
||||
frameworks = [
|
||||
":SwiftSignalKitFramework",
|
||||
":PostboxFramework",
|
||||
],
|
||||
minimum_os_version = "9.0",
|
||||
ipa_post_processor = strip_framework,
|
||||
deps = [
|
||||
"//submodules/SyncCore:SyncCore",
|
||||
],
|
||||
)
|
||||
|
||||
plist_fragment(
|
||||
name = "TelegramCoreInfoPlist",
|
||||
extension = "plist",
|
||||
@ -824,7 +857,6 @@ ios_framework(
|
||||
":MtProtoKitFramework",
|
||||
":SwiftSignalKitFramework",
|
||||
":PostboxFramework",
|
||||
":SyncCoreFramework",
|
||||
],
|
||||
minimum_os_version = "9.0",
|
||||
ipa_post_processor = strip_framework,
|
||||
@ -994,7 +1026,6 @@ ios_framework(
|
||||
":MtProtoKitFramework",
|
||||
":SwiftSignalKitFramework",
|
||||
":PostboxFramework",
|
||||
":SyncCoreFramework",
|
||||
":TelegramCoreFramework",
|
||||
":AsyncDisplayKitFramework",
|
||||
":DisplayFramework",
|
||||
@ -1246,7 +1277,6 @@ swift_library(
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||
"//submodules/Postbox:Postbox",
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
"//submodules/SyncCore:SyncCore",
|
||||
"//submodules/OpenSSLEncryptionProvider:OpenSSLEncryptionProvider",
|
||||
"//Telegram:GeneratedSources",
|
||||
],
|
||||
@ -1299,7 +1329,6 @@ ios_extension(
|
||||
frameworks = [
|
||||
":SwiftSignalKitFramework",
|
||||
":PostboxFramework",
|
||||
":SyncCoreFramework",
|
||||
":TelegramCoreFramework",
|
||||
],
|
||||
)
|
||||
@ -1374,7 +1403,6 @@ swift_library(
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||
"//submodules/Postbox:Postbox",
|
||||
"//submodules/TelegramApi:TelegramApi",
|
||||
"//submodules/SyncCore:SyncCore",
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
"//submodules/BuildConfig:BuildConfig",
|
||||
"//submodules/OpenSSLEncryptionProvider:OpenSSLEncryptionProvider",
|
||||
@ -1429,7 +1457,6 @@ ios_extension(
|
||||
":SwiftSignalKitFramework",
|
||||
":PostboxFramework",
|
||||
":TelegramCoreFramework",
|
||||
":SyncCoreFramework",
|
||||
],
|
||||
)
|
||||
|
||||
@ -1796,7 +1823,6 @@ ios_application(
|
||||
":MtProtoKitFramework",
|
||||
":SwiftSignalKitFramework",
|
||||
":PostboxFramework",
|
||||
":SyncCoreFramework",
|
||||
":TelegramCoreFramework",
|
||||
":AsyncDisplayKitFramework",
|
||||
":DisplayFramework",
|
||||
|
@ -2,7 +2,6 @@ import Foundation
|
||||
import SwiftSignalKit
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import Contacts
|
||||
import Intents
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
import Foundation
|
||||
import Intents
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import Postbox
|
||||
import SwiftSignalKit
|
||||
import BuildConfig
|
||||
|
@ -2,7 +2,6 @@ import Foundation
|
||||
import SwiftSignalKit
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import Contacts
|
||||
import Intents
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
|
@ -89,24 +89,21 @@
|
||||
"PUSH_MESSAGE_GAME" = "%1$@|invited you to play %2$@";
|
||||
"PUSH_MESSAGE_INVOICE" = "%1$@|sent you an invoice for %2$@";
|
||||
"PUSH_MESSAGE_FWD" = "%1$@|forwarded you a message";
|
||||
"PUSH_MESSAGE_FWDS_1" = "%1$@|forwarded you a message";
|
||||
"PUSH_MESSAGE_FWDS_any" = "%1$@|forwarded you %2$d messages";
|
||||
"PUSH_MESSAGE_FWDS_TEXT_1" = "forwarded you a message";
|
||||
"PUSH_MESSAGE_FWDS_TEXT_any" = "forwarded you %d messages";
|
||||
"PUSH_MESSAGE_PHOTO" = "%1$@|sent you a photo";
|
||||
"PUSH_MESSAGE_PHOTOS_1" = "%1$@|sent you a photo";
|
||||
"PUSH_MESSAGE_PHOTOS_any" = "%1$@|sent you %2$d photos";
|
||||
"PUSH_MESSAGE_PHOTOS_TEXT_1" = "sent you a photo";
|
||||
"PUSH_MESSAGE_PHOTOS_TEXT_any" = "sent you %d photos";
|
||||
"PUSH_MESSAGE_VIDEO" = "%1$@|sent you a video";
|
||||
"PUSH_MESSAGE_VIDEOS_1" = "%1$@|sent you a video";
|
||||
"PUSH_MESSAGE_VIDEOS_any" = "%1$@|sent you %2$d videos";
|
||||
"PUSH_MESSAGE_VIDEOS_TEXT_1" = "sent you a video";
|
||||
"PUSH_MESSAGE_VIDEOS_TEXT_any" = "sent you %d videos";
|
||||
"PUSH_MESSAGE_ROUND" = "%1$@|sent you a video message";
|
||||
"PUSH_MESSAGE_ROUNDS_1" = "%1$@|sent you a video message";
|
||||
"PUSH_MESSAGE_ROUNDS_any" = "%1$@|sent you %2$d video messages";
|
||||
"PUSH_MESSAGE" = "%1$@|sent you a message";
|
||||
"PUSH_MESSAGES_1" = "%1$@|sent you a message";
|
||||
"PUSH_MESSAGES_any" = "%1$@|sent you %2$d messages";
|
||||
"PUSH_MESSAGES_TEXT_1" = "sent you a message";
|
||||
"PUSH_MESSAGES_TEXT_any" = "sent you %2$d messages";
|
||||
"PUSH_ALBUM" = "%1$@|sent you an album";
|
||||
"PUSH_MESSAGE_FILES_1" = "%1$@|sent you a file";
|
||||
"PUSH_MESSAGE_FILES_any" = "%1$@|sent you %2$d files";
|
||||
|
||||
"PUSH_MESSAGE_FILES_TEXT_1" = "sent you a file";
|
||||
"PUSH_MESSAGE_FILES_TEXT_any" = "sent you %d files";
|
||||
|
||||
"PUSH_CHANNEL_MESSAGE_TEXT" = "%1$@|%2$@";
|
||||
"PUSH_CHANNEL_MESSAGE_NOTEXT" = "%1$@|posted a message";
|
||||
@ -124,24 +121,19 @@
|
||||
"PUSH_CHANNEL_MESSAGE_GIF" = "%1$@|posted a GIF";
|
||||
"PUSH_CHANNEL_MESSAGE_GAME" = "%1$@|invited you to play %2$@";
|
||||
"PUSH_CHANNEL_MESSAGE_FWD" = "%1$@|posted a forwarded message";
|
||||
"PUSH_CHANNEL_MESSAGE_FWDS_1" = "%1$@|posted a forwarded message";
|
||||
"PUSH_CHANNEL_MESSAGE_FWDS_any" = "%1$@|posted %2$d forwarded messages";
|
||||
"PUSH_CHANNEL_MESSAGE_PHOTO" = "%1$@|posted a photo";
|
||||
"PUSH_CHANNEL_MESSAGE_PHOTOS_1" = "%1$@|posted a photo";
|
||||
"PUSH_CHANNEL_MESSAGE_PHOTOS_any" = "%1$@|posted %2$d photos";
|
||||
"PUSH_CHANNEL_MESSAGE_PHOTOS_TEXT_1" = "posted a photo";
|
||||
"PUSH_CHANNEL_MESSAGE_PHOTOS_TEXT_any" = "posted %d photos";
|
||||
"PUSH_CHANNEL_MESSAGE_VIDEO" = "%1$@|posted a video";
|
||||
"PUSH_CHANNEL_MESSAGE_VIDEOS_1" = "%1$@|posted a video";
|
||||
"PUSH_CHANNEL_MESSAGE_VIDEOS_any" = "%1$@|posted %2$d videos";
|
||||
"PUSH_CHANNEL_MESSAGE_VIDEOS_TEXT_1" = "posted a video";
|
||||
"PUSH_CHANNEL_MESSAGE_VIDEOS_TEXT_any" = "posted %d videos";
|
||||
"PUSH_CHANNEL_MESSAGE_ROUND" = "%1$@|posted a video message";
|
||||
"PUSH_CHANNEL_MESSAGE_ROUNDS_1" = "%1$@|posted a video message";
|
||||
"PUSH_CHANNEL_MESSAGE_ROUNDS_any" = "%1$@|posted %2$d video messages";
|
||||
"PUSH_CHANNEL_MESSAGE" = "%1$@|posted a message";
|
||||
"PUSH_CHANNEL_MESSAGES_1" = "%1$@|posted a message";
|
||||
"PUSH_CHANNEL_MESSAGES_any" = "%1$@|posted %2$d messages";
|
||||
"PUSH_CHANNEL_MESSAGES_TEXT_1" = "posted a message";
|
||||
"PUSH_CHANNEL_MESSAGES_TEXT_any" = "posted %d messages";
|
||||
"PUSH_CHANNEL_ALBUM" = "%1$@|posted an album";
|
||||
"PUSH_CHANNEL_MESSAGE_DOCS" = "%1$@|posted %2$d files";
|
||||
"PUSH_CHANNEL_MESSAGE_DOCS_1" = "%1$@|posted a file";
|
||||
"PUSH_CHANNEL_MESSAGE_DOCS_any" = "%1$@|posted %2$d files";
|
||||
"PUSH_CHANNEL_MESSAGE_DOCS_TEXT_1" = "posted a file";
|
||||
"PUSH_CHANNEL_MESSAGE_DOCS_TEXT_any" = "posted %d files";
|
||||
|
||||
"PUSH_CHAT_MESSAGE_TEXT" = "%2$@|%1$@:%3$@";
|
||||
"PUSH_CHAT_MESSAGE_NOTEXT" = "%2$@|%1$@ sent a message to the group";
|
||||
@ -169,23 +161,21 @@
|
||||
"PUSH_CHAT_RETURNED" = "%2$@|%1$@ has returned to the group";
|
||||
"PUSH_CHAT_JOINED" = "%2$@|%1$@ has joined the group";
|
||||
"PUSH_CHAT_MESSAGE_FWD" = "%2$@|%1$@ forwarded a message";
|
||||
"PUSH_CHAT_MESSAGE_FWDS_1" = "%2$@|%1$@ forwarded a message";
|
||||
"PUSH_CHAT_MESSAGE_FWDS_any" = "%2$@|%1$@ forwarded %3$d messages";
|
||||
"PUSH_CHAT_MESSAGE_FWDS_TEXT_1" = "{author} forwarded a message";
|
||||
"PUSH_CHAT_MESSAGE_FWDS_TEXT_any" = "{author} forwarded %d messages";
|
||||
"PUSH_CHAT_MESSAGE_PHOTO" = "%2$@|%1$@ sent a photo";
|
||||
"PUSH_CHAT_MESSAGE_PHOTOS_1" = "%2$@|%1$@ sent a photo";
|
||||
"PUSH_CHAT_MESSAGE_PHOTOS_any" = "%2$@|%1$@ sent %3$d photos";
|
||||
"PUSH_CHAT_MESSAGE_PHOTOS_TEXT_1" = "{author} sent a photo";
|
||||
"PUSH_CHAT_MESSAGE_PHOTOS_TEXT_any" = "{author} sent %d photos";
|
||||
"PUSH_CHAT_MESSAGE_VIDEO" = "%2$@|%1$@ sent a video";
|
||||
"PUSH_CHAT_MESSAGE_VIDEOS_1" = "%2$@|%1$@ sent a video";
|
||||
"PUSH_CHAT_MESSAGE_VIDEOS_any" = "%2$@|%1$@ sent %3$d videos";
|
||||
"PUSH_CHAT_MESSAGE_VIDEOS_TEXT_1" = "{author} sent a video";
|
||||
"PUSH_CHAT_MESSAGE_VIDEOS_TEXT_any" = "{text} sent %d videos";
|
||||
"PUSH_CHAT_MESSAGE_ROUND" = "%2$@|%1$@ sent a video message";
|
||||
"PUSH_CHAT_MESSAGE_ROUNDS_1" = "%2$@|%1$@ sent a video message";
|
||||
"PUSH_CHAT_MESSAGE_ROUNDS_any" = "%2$@|%1$@ sent %3$d video messages";
|
||||
"PUSH_CHAT_MESSAGE" = "%2$@|%1$@ sent a message";
|
||||
"PUSH_CHAT_MESSAGES_1" = "%2$@|%1$@ sent a message";
|
||||
"PUSH_CHAT_MESSAGES_any" = "%2$@|%1$@ sent %3$d messages";
|
||||
"PUSH_CHAT_MESSAGES_TEXT_1" = "{author} sent a message";
|
||||
"PUSH_CHAT_MESSAGES_TEXT_any" = "{author} sent %d messages";
|
||||
"PUSH_CHAT_ALBUM" = "%2$@|%1$@ sent an album";
|
||||
"PUSH_CHAT_MESSAGE_DOCS_FIX1_1" = "%2$@|%1$@ sent a file";
|
||||
"PUSH_CHAT_MESSAGE_DOCS_FIX1_any" = "%2$@|%1$@ sent %3$d files";
|
||||
"PUSH_CHAT_MESSAGE_DOCS_TEXT_1" = "{author} sent a file";
|
||||
"PUSH_CHAT_MESSAGE_DOCS_TEXT_any" = "{author} sent %d files";
|
||||
|
||||
"PUSH_PINNED_TEXT" = "%1$@|pinned \"%2$@\" ";
|
||||
"PUSH_PINNED_NOTEXT" = "%1$@|pinned a message";
|
||||
@ -1285,12 +1275,6 @@
|
||||
"ForwardedContacts_0" = "%@ forwarded contacts";
|
||||
|
||||
"ForwardedAuthors2" = "%@, %@";
|
||||
"ForwardedAuthorsOthers_1" = "%@ and 1 other";
|
||||
"ForwardedAuthorsOthers_2" = "%@ and 2 others";
|
||||
"ForwardedAuthorsOthers_3_10" = "%@ and %@ others";
|
||||
"ForwardedAuthorsOthers_any" = "%@ and %@ others";
|
||||
"ForwardedAuthorsOthers_many" = "%@ and %@ others";
|
||||
"ForwardedAuthorsOthers_0" = "%@ and %@ others";
|
||||
|
||||
"PrivacySettings.TwoStepAuth" = "Two-Step Verification";
|
||||
"TwoStepAuth.Title" = "Two-Step Verification";
|
||||
@ -3298,7 +3282,7 @@ Unused sets are archived when you add more.";
|
||||
"Passport.DeleteDocument" = "Delete Document";
|
||||
"Passport.DeleteDocumentConfirmation" = "Are you sure you want to delete this document? All details will be lost.";
|
||||
|
||||
"Passport.Scans" = "SCANS";
|
||||
"Passport.ScansHeader" = "SCANS";
|
||||
"Passport.Scans.Upload" = "Upload Scan";
|
||||
"Passport.Scans.UploadNew" = "Upload Additional Scan";
|
||||
"Passport.Scans.ScanIndex" = "Scan %@";
|
||||
|
@ -1 +0,0 @@
|
||||
|
@ -1 +0,0 @@
|
||||
|
@ -1 +0,0 @@
|
||||
|
@ -1 +0,0 @@
|
||||
|
@ -1 +0,0 @@
|
||||
|
@ -12,7 +12,6 @@ import Intents
|
||||
import OpenSSLEncryptionProvider
|
||||
import SwiftSignalKit
|
||||
import Postbox
|
||||
import SyncCore
|
||||
import TelegramCore
|
||||
import OpenSSLEncryptionProvider
|
||||
import WidgetItemsUtils
|
||||
|
@ -3,3 +3,7 @@ config_setting(
|
||||
name = "ios_sim_arm64",
|
||||
values = {"cpu": "ios_sim_arm64"},
|
||||
)
|
||||
|
||||
exports_files([
|
||||
"GenerateStrings/GenerateStrings.py",
|
||||
])
|
||||
|
686
build-system/GenerateStrings/GenerateStrings.py
Normal file
686
build-system/GenerateStrings/GenerateStrings.py
Normal file
@ -0,0 +1,686 @@
|
||||
#!/bin/pyton3
|
||||
|
||||
# Based on https://github.com/chrisballinger/python-localizable
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
import re
|
||||
import codecs
|
||||
import struct
|
||||
|
||||
from typing import Dict, List
|
||||
|
||||
|
||||
def _unescape_key(s):
|
||||
return s.replace('\\\n', '')
|
||||
|
||||
|
||||
def _unescape(s):
|
||||
s = s.replace('\\\n', '')
|
||||
return s.replace('\\"', '"').replace(r'\n', '\n').replace(r'\r', '\r')
|
||||
|
||||
|
||||
def _get_content(filename: str):
|
||||
if filename is None:
|
||||
return None
|
||||
return _get_content_from_file(filename, 'utf-8')
|
||||
|
||||
|
||||
def _get_content_from_file(filename: str, encoding: str):
|
||||
f = open(filename, 'rb')
|
||||
try:
|
||||
f = codecs.open(filename, 'r', encoding=encoding)
|
||||
return f.read()
|
||||
except IOError as e:
|
||||
print("Error opening file %s with encoding %s: %s" % (filename, encoding, e.message))
|
||||
except Exception as e:
|
||||
print("Unhandled exception: %s" % e)
|
||||
finally:
|
||||
f.close()
|
||||
|
||||
|
||||
def parse_strings(filename: str):
|
||||
content = _get_content(filename=filename)
|
||||
|
||||
stringset = []
|
||||
f = content
|
||||
if f.startswith(u'\ufeff'):
|
||||
f = f.lstrip(u'\ufeff')
|
||||
# regex for finding all comments in a file
|
||||
cp = r'(?:/\*(?P<comment>(?:[^*]|(?:\*+[^*/]))*\**)\*/)'
|
||||
p = re.compile(r'(?:%s[ \t]*[\n]|[\r\n]|[\r])?(?P<line>(("(?P<key>[^"\\]*(?:\\.[^"\\]*)*)")|('
|
||||
r'?P<property>\w+))\s*=\s*"(?P<value>[^"\\]*(?:\\.[^"\\]*)*)"\s*;)' % cp, re.DOTALL | re.U)
|
||||
c = re.compile(r'//[^\n]*\n|/\*(?:.|[\r\n])*?\*/', re.U)
|
||||
ws = re.compile(r'\s+', re.U)
|
||||
end = 0
|
||||
for i in p.finditer(f):
|
||||
start = i.start('line')
|
||||
end_ = i.end()
|
||||
key = i.group('key')
|
||||
if not key:
|
||||
key = i.group('property')
|
||||
value = i.group('value')
|
||||
while end < start:
|
||||
m = c.match(f, end, start) or ws.match(f, end, start)
|
||||
if not m or m.start() != end:
|
||||
print("Invalid syntax: %s" % f[end:start])
|
||||
end = m.end()
|
||||
end = end_
|
||||
key = _unescape_key(key)
|
||||
stringset.append({'key': key, 'value': _unescape(value)})
|
||||
return stringset
|
||||
|
||||
|
||||
class PositionalArgument:
|
||||
def __init__(self, index: int, kind: str):
|
||||
self.index = index
|
||||
self.kind = kind
|
||||
|
||||
|
||||
class Entry:
|
||||
def __init__(self, name: str, is_pluralized: bool, positional_arguments: [PositionalArgument]):
|
||||
self.name = name
|
||||
self.is_pluralized = is_pluralized
|
||||
self.positional_arguments = positional_arguments
|
||||
|
||||
|
||||
def parse_positional_arguments(string: str) -> [PositionalArgument]:
|
||||
result = list()
|
||||
|
||||
implicit_index = 0
|
||||
argument = re.compile(r'%((\d)\$)?([@d])', re.U)
|
||||
start_position = 0
|
||||
while True:
|
||||
m = argument.search(string, start_position)
|
||||
if m is None:
|
||||
break
|
||||
index = m.group(2)
|
||||
if index is None:
|
||||
index = implicit_index
|
||||
implicit_index += 1
|
||||
else:
|
||||
index = int(index)
|
||||
kind = m.group(3)
|
||||
result.append(PositionalArgument(index=index, kind=kind))
|
||||
start_position = m.end(0)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
def parse_entries(strings: [dict]) -> [Entry]:
|
||||
entries: List[Entry] = []
|
||||
pluralized = re.compile(r'^(.*?)_(0|1|2|3_10|many|any)$', re.U)
|
||||
processed_entries = set()
|
||||
for string in strings:
|
||||
key = string['key']
|
||||
m = pluralized.match(key)
|
||||
if m is not None:
|
||||
raw_key = m.group(1)
|
||||
|
||||
positional_arguments = parse_positional_arguments(string['value'])
|
||||
|
||||
if raw_key in processed_entries:
|
||||
for i in range(0, len(entries)):
|
||||
if entries[i].name == raw_key:
|
||||
if len(entries[i].positional_arguments) < len(positional_arguments):
|
||||
entries[i].positional_arguments = positional_arguments
|
||||
continue
|
||||
processed_entries.add(raw_key)
|
||||
|
||||
entries.append(Entry(
|
||||
name=raw_key,
|
||||
is_pluralized=True,
|
||||
positional_arguments=positional_arguments
|
||||
))
|
||||
else:
|
||||
if key in processed_entries:
|
||||
continue
|
||||
processed_entries.add(key)
|
||||
|
||||
entries.append(Entry(
|
||||
name=key,
|
||||
is_pluralized=False,
|
||||
positional_arguments=parse_positional_arguments(string['value'])
|
||||
))
|
||||
|
||||
had_error = False
|
||||
for entry in entries:
|
||||
if entry.is_pluralized:
|
||||
if len(entry.positional_arguments) > 1:
|
||||
print('Pluralized key "{}" needs to contain at most 1 positional argument, {} were provided'
|
||||
.format(entry.name, len(entry.positional_arguments)))
|
||||
had_error = True
|
||||
|
||||
if had_error:
|
||||
sys.exit(1)
|
||||
|
||||
entries.sort(key=lambda x: x.name)
|
||||
return entries
|
||||
|
||||
|
||||
def write_string(file, string: str):
|
||||
file.write((string + '\n').encode('utf-8'))
|
||||
|
||||
|
||||
def write_bin_uint32(file, value: int):
|
||||
file.write(struct.pack('I', value))
|
||||
|
||||
|
||||
def write_bin_uint8(file, value: int):
|
||||
file.write(struct.pack('B', value))
|
||||
|
||||
|
||||
def write_bin_string(file, value: str):
|
||||
file.write(value.encode('utf-8'))
|
||||
|
||||
|
||||
class IndexCounter:
|
||||
def __init__(self):
|
||||
self.dictionary = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
||||
self.filter_ids = {
|
||||
'NO',
|
||||
'YES',
|
||||
}
|
||||
self.max_index = len(self.dictionary) - 1
|
||||
self.value = []
|
||||
self.increment()
|
||||
|
||||
def increment(self):
|
||||
index = 0
|
||||
while True:
|
||||
if len(self.value) == index:
|
||||
for i in range(len(self.value)):
|
||||
self.value[i] = 0
|
||||
self.value.append(0)
|
||||
break
|
||||
if self.value[index] + 1 <= self.max_index:
|
||||
if index != 0:
|
||||
for i in range(index):
|
||||
self.value[i] = 0
|
||||
self.value[index] += 1
|
||||
break
|
||||
else:
|
||||
index += 1
|
||||
|
||||
def get(self):
|
||||
result = ''
|
||||
for index in reversed(self.value):
|
||||
result += self.dictionary[index]
|
||||
return result
|
||||
|
||||
def get_next_valid_id(self) -> str:
|
||||
while True:
|
||||
result = self.get()
|
||||
self.increment()
|
||||
if result not in self.filter_ids:
|
||||
return result
|
||||
|
||||
|
||||
def sanitize_entry_identifer(string: str) -> str:
|
||||
return string.replace('.', '_')
|
||||
|
||||
|
||||
def generate(header_path: str, implementation_path: str, data_path: str, entries: [Entry]):
|
||||
print('Generating strings into:\n{}\n{}'.format(header_path, implementation_path))
|
||||
with open(header_path, 'wb') as header_file, open(implementation_path, 'wb') as source_file,\
|
||||
open(data_path, 'wb') as data_file:
|
||||
|
||||
formatted_accessors = ''
|
||||
max_format_argument_count = 0
|
||||
for entry in entries:
|
||||
num_arguments = len(entry.positional_arguments)
|
||||
if num_arguments > max_format_argument_count:
|
||||
max_format_argument_count = num_arguments
|
||||
if max_format_argument_count != 0:
|
||||
for num_arguments in range(1, max_format_argument_count + 1):
|
||||
arguments_string = ''
|
||||
arguments_array = ''
|
||||
for i in range(0, num_arguments):
|
||||
arguments_string += ', id _Nonnull arg{}'.format(i)
|
||||
if i != 0:
|
||||
arguments_array += ', '
|
||||
arguments_array += '[[NSString alloc] initWithFormat:@"%@", arg{}]'.format(i)
|
||||
formatted_accessors += '''
|
||||
static _FormattedString * _Nonnull getFormatted{num_arguments}(_PresentationStrings * _Nonnull strings,
|
||||
uint32_t keyId{arguments_string}) {{
|
||||
NSString *formatString = getSingle(strings, strings->_idToKey[@(keyId)]);
|
||||
NSArray<_FormattedStringRange *> *argumentRanges = extractArgumentRanges(formatString);
|
||||
return formatWithArgumentRanges(formatString, argumentRanges, @[{arguments_array}]);
|
||||
}}
|
||||
'''.format(num_arguments=num_arguments, arguments_string=arguments_string, arguments_array=arguments_array)
|
||||
|
||||
write_string(header_file, '''// Automatically-generated file, do not edit
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface _FormattedStringRange : NSObject
|
||||
|
||||
@property (nonatomic, readonly) NSInteger index;
|
||||
@property (nonatomic, readonly) NSRange range;
|
||||
|
||||
- (instancetype _Nonnull)initWithIndex:(NSInteger)index range:(NSRange)range;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface _FormattedString : NSObject
|
||||
|
||||
@property (nonatomic, strong, readonly) NSString * _Nonnull string;
|
||||
@property (nonatomic, strong, readonly) NSArray<_FormattedStringRange *> * _Nonnull ranges;
|
||||
|
||||
- (instancetype _Nonnull)initWithString:(NSString * _Nonnull)string
|
||||
ranges:(NSArray<_FormattedStringRange *> * _Nonnull)ranges;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface _PresentationStringsComponent : NSObject
|
||||
|
||||
@property (nonatomic, strong, readonly) NSString * _Nonnull languageCode;
|
||||
@property (nonatomic, strong, readonly) NSString * _Nonnull localizedName;
|
||||
@property (nonatomic, strong, readonly) NSString * _Nullable pluralizationRulesCode;
|
||||
@property (nonatomic, strong, readonly) NSDictionary<NSString *, NSString *> * _Nonnull dict;
|
||||
|
||||
- (instancetype _Nonnull)initWithLanguageCode:(NSString * _Nonnull)languageCode
|
||||
localizedName:(NSString * _Nonnull)localizedName
|
||||
pluralizationRulesCode:(NSString * _Nullable)pluralizationRulesCode
|
||||
dict:(NSDictionary<NSString *, NSString *> * _Nonnull)dict;
|
||||
|
||||
@end
|
||||
|
||||
@interface _PresentationStrings : NSObject
|
||||
|
||||
@property (nonatomic, readonly) uint32_t lc;
|
||||
@property (nonatomic, strong, readonly) _PresentationStringsComponent * _Nonnull primaryComponent;
|
||||
@property (nonatomic, strong, readonly) _PresentationStringsComponent * _Nullable secondaryComponent;
|
||||
@property (nonatomic, strong, readonly) NSString * _Nonnull baseLanguageCode;
|
||||
@property (nonatomic, strong, readonly) NSString * _Nonnull groupingSeparator;
|
||||
|
||||
- (instancetype _Nonnull)initWithPrimaryComponent:(_PresentationStringsComponent * _Nonnull)primaryComponent
|
||||
secondaryComponent:(_PresentationStringsComponent * _Nullable)secondaryComponent
|
||||
groupingSeparator:(NSString * _Nullable)groupingSeparator;
|
||||
|
||||
@end
|
||||
|
||||
''')
|
||||
|
||||
write_string(source_file, '''// Automatically-generated file, do not edit
|
||||
|
||||
#import <PresentationStrings/PresentationStrings.h>
|
||||
#import <NumberPluralizationForm/NumberPluralizationForm.h>
|
||||
|
||||
@implementation _FormattedStringRange
|
||||
|
||||
- (instancetype _Nonnull)initWithIndex:(NSInteger)index range:(NSRange)range {
|
||||
self = [super init];
|
||||
if (self != nil) {
|
||||
_index = index;
|
||||
_range = range;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation _FormattedString
|
||||
|
||||
- (instancetype _Nonnull)initWithString:(NSString * _Nonnull)string
|
||||
ranges:(NSArray<_FormattedStringRange *> * _Nonnull)ranges {
|
||||
self = [super init];
|
||||
if (self != nil) {
|
||||
_string = string;
|
||||
_ranges = ranges;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation _PresentationStringsComponent
|
||||
|
||||
- (instancetype _Nonnull)initWithLanguageCode:(NSString * _Nonnull)languageCode
|
||||
localizedName:(NSString * _Nonnull)localizedName
|
||||
pluralizationRulesCode:(NSString * _Nullable)pluralizationRulesCode
|
||||
dict:(NSDictionary<NSString *, NSString *> * _Nonnull)dict {
|
||||
self = [super init];
|
||||
if (self != nil) {
|
||||
_languageCode = languageCode;
|
||||
_localizedName = localizedName;
|
||||
_pluralizationRulesCode = pluralizationRulesCode;
|
||||
_dict = dict;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface _PresentationStrings () {
|
||||
@public
|
||||
NSDictionary<NSNumber *, NSString *> *_idToKey;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
static NSArray<_FormattedStringRange *> * _Nonnull extractArgumentRanges(NSString * _Nonnull string) {
|
||||
static NSRegularExpression *argumentRegex = nil;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
argumentRegex = [NSRegularExpression regularExpressionWithPattern:@"%(((\\\\d+)\\\\$)?)([@df])"
|
||||
options:0 error:nil];
|
||||
});
|
||||
|
||||
NSMutableArray<_FormattedStringRange *> *result = [[NSMutableArray alloc] init];
|
||||
NSArray<NSTextCheckingResult *> *matches = [argumentRegex matchesInString:string
|
||||
options:0 range:NSMakeRange(0, string.length)];
|
||||
int index = 0;
|
||||
for (NSTextCheckingResult *match in matches) {
|
||||
int currentIndex = index;
|
||||
NSRange matchRange = [match rangeAtIndex:3];
|
||||
if (matchRange.location != NSNotFound) {
|
||||
currentIndex = [[string substringWithRange:matchRange] intValue] - 1;
|
||||
}
|
||||
[result addObject:[[_FormattedStringRange alloc] initWithIndex:currentIndex range:[match rangeAtIndex:0]]];
|
||||
index += 1;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static _FormattedString * _Nonnull formatWithArgumentRanges(
|
||||
NSString * _Nonnull string,
|
||||
NSArray<_FormattedStringRange *> * _Nonnull ranges,
|
||||
NSArray<NSString *> * _Nonnull arguments
|
||||
) {
|
||||
NSMutableArray<_FormattedStringRange *> *resultingRanges = [[NSMutableArray alloc] init];
|
||||
NSMutableString *result = [[NSMutableString alloc] init];
|
||||
NSUInteger currentLocation = 0;
|
||||
|
||||
for (_FormattedStringRange *range in ranges) {
|
||||
if (currentLocation < range.range.location) {
|
||||
[result appendString:[string substringWithRange:
|
||||
NSMakeRange(currentLocation, range.range.location - currentLocation)]];
|
||||
}
|
||||
[resultingRanges addObject:[[_FormattedStringRange alloc] initWithIndex:range.index
|
||||
range:NSMakeRange(result.length, arguments[range.index].length)]];
|
||||
[result appendString:arguments[range.index]];
|
||||
currentLocation = range.range.location + range.range.length;
|
||||
}
|
||||
|
||||
if (currentLocation != string.length) {
|
||||
[result appendString:[string substringWithRange:NSMakeRange(currentLocation, string.length - currentLocation)]];
|
||||
}
|
||||
|
||||
return [[_FormattedString alloc] initWithString:result ranges:resultingRanges];
|
||||
}
|
||||
|
||||
static NSString * _Nonnull getPluralizationSuffix(_PresentationStrings * _Nonnull strings, int32_t value) {
|
||||
NumberPluralizationForm pluralizationForm = numberPluralizationForm(strings.lc, value);
|
||||
switch (pluralizationForm) {
|
||||
case NumberPluralizationFormZero: {
|
||||
return @"_0";
|
||||
}
|
||||
case NumberPluralizationFormOne: {
|
||||
return @"_1";
|
||||
}
|
||||
case NumberPluralizationFormTwo: {
|
||||
return @"_2";
|
||||
}
|
||||
case NumberPluralizationFormFew: {
|
||||
return @"_3_10";
|
||||
}
|
||||
case NumberPluralizationFormMany: {
|
||||
return @"_many";
|
||||
}
|
||||
default: {
|
||||
return @"_any";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static NSString * _Nonnull getSingle(_PresentationStrings * _Nonnull strings, NSString * _Nonnull key) {
|
||||
NSString *result = strings.primaryComponent.dict[key];
|
||||
if (!result) {
|
||||
result = strings.secondaryComponent.dict[key];
|
||||
}
|
||||
if (!result) {
|
||||
static NSDictionary<NSString *, NSString *> *fallbackDict = nil;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
NSString *lprojPath = [[NSBundle mainBundle] pathForResource:@"en" ofType:@"lproj"];
|
||||
if (!lprojPath) {
|
||||
return;
|
||||
}
|
||||
NSBundle *bundle = [NSBundle bundleWithPath:lprojPath];
|
||||
if (!bundle) {
|
||||
return;
|
||||
}
|
||||
NSString *stringsPath = [bundle pathForResource:@"Localizable" ofType:@"strings"];
|
||||
if (!stringsPath) {
|
||||
return;
|
||||
}
|
||||
fallbackDict = [NSDictionary dictionaryWithContentsOfURL:[NSURL fileURLWithPath:stringsPath]];
|
||||
});
|
||||
result = fallbackDict[key];
|
||||
}
|
||||
if (!result) {
|
||||
result = key;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static NSString * _Nonnull getSingleIndirect(_PresentationStrings * _Nonnull strings, uint32_t keyId) {
|
||||
return getSingle(strings, strings->_idToKey[@(keyId)]);
|
||||
}
|
||||
|
||||
static NSString * _Nonnull getPluralized(_PresentationStrings * _Nonnull strings, NSString * _Nonnull key,
|
||||
int32_t value) {
|
||||
NSString *parsedKey = [[NSString alloc] initWithFormat:@"%@%@", key, getPluralizationSuffix(strings, value)];
|
||||
NSString *formatString = getSingle(strings, parsedKey);
|
||||
NSString *stringValue = formatNumberWithGroupingSeparator(strings.groupingSeparator, value);
|
||||
NSArray<_FormattedStringRange *> *argumentRanges = extractArgumentRanges(formatString);
|
||||
return formatWithArgumentRanges(formatString, argumentRanges, @[stringValue]).string;
|
||||
}
|
||||
|
||||
static NSString * _Nonnull getPluralizedIndirect(_PresentationStrings * _Nonnull strings, uint32_t keyId,
|
||||
int32_t value) {
|
||||
return getPluralized(strings, strings->_idToKey[@(keyId)], value);
|
||||
}''' + formatted_accessors + '''
|
||||
@implementation _PresentationStrings
|
||||
|
||||
- (instancetype _Nonnull)initWithPrimaryComponent:(_PresentationStringsComponent * _Nonnull)primaryComponent
|
||||
secondaryComponent:(_PresentationStringsComponent * _Nullable)secondaryComponent
|
||||
groupingSeparator:(NSString * _Nullable)groupingSeparator {
|
||||
self = [super init];
|
||||
if (self != nil) {
|
||||
static NSDictionary<NSNumber *, NSString *> *idToKey = nil;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
NSString *dataPath = [[NSBundle mainBundle] pathForResource:@"PresentationStrings" ofType:@"data"];
|
||||
if (!dataPath) {
|
||||
assert(false);
|
||||
return;
|
||||
}
|
||||
NSData *data = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:dataPath]];
|
||||
if (!data) {
|
||||
assert(false);
|
||||
return;
|
||||
}
|
||||
if (data.length < 4) {
|
||||
assert(false);
|
||||
return;
|
||||
}
|
||||
|
||||
NSMutableDictionary<NSNumber *, NSString *> *result = [[NSMutableDictionary alloc] init];
|
||||
|
||||
uint32_t entryCount = 0;
|
||||
[data getBytes:&entryCount range:NSMakeRange(0, 4)];
|
||||
|
||||
NSInteger offset = 4;
|
||||
for (uint32_t i = 0; i < entryCount; i++) {
|
||||
uint8_t stringLength = 0;
|
||||
[data getBytes:&stringLength range:NSMakeRange(offset, 1)];
|
||||
offset += 1;
|
||||
|
||||
NSData *stringData = [data subdataWithRange:NSMakeRange(offset, stringLength)];
|
||||
offset += stringLength;
|
||||
|
||||
result[@(i)] = [[NSString alloc] initWithData:stringData encoding:NSUTF8StringEncoding];
|
||||
}
|
||||
idToKey = result;
|
||||
});
|
||||
_idToKey = idToKey;
|
||||
|
||||
_primaryComponent = primaryComponent;
|
||||
_secondaryComponent = secondaryComponent;
|
||||
_groupingSeparator = groupingSeparator;
|
||||
|
||||
if (secondaryComponent) {
|
||||
_baseLanguageCode = secondaryComponent.languageCode;
|
||||
} else {
|
||||
_baseLanguageCode = primaryComponent.languageCode;
|
||||
}
|
||||
|
||||
NSString *languageCode = nil;
|
||||
if (primaryComponent.pluralizationRulesCode) {
|
||||
languageCode = primaryComponent.pluralizationRulesCode;
|
||||
} else {
|
||||
languageCode = primaryComponent.languageCode;
|
||||
}
|
||||
|
||||
NSString *rawCode = languageCode;
|
||||
|
||||
NSRange range = [languageCode rangeOfString:@"_"];
|
||||
if (range.location != NSNotFound) {
|
||||
rawCode = [rawCode substringWithRange:NSMakeRange(0, range.location)];
|
||||
}
|
||||
range = [languageCode rangeOfString:@"-"];
|
||||
if (range.location != NSNotFound) {
|
||||
rawCode = [rawCode substringWithRange:NSMakeRange(0, range.location)];
|
||||
}
|
||||
|
||||
rawCode = [rawCode lowercaseString];
|
||||
|
||||
uint32_t lc = 0;
|
||||
for (NSInteger i = 0; i < rawCode.length; i++) {
|
||||
lc = (lc << 8) + (uint32_t)[rawCode characterAtIndex:i];
|
||||
}
|
||||
_lc = lc;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
''')
|
||||
|
||||
counter = IndexCounter()
|
||||
|
||||
entry_keys = []
|
||||
|
||||
for entry in entries:
|
||||
entry_id = '_L' + counter.get_next_valid_id()
|
||||
|
||||
entry_key_id = len(entry_keys)
|
||||
entry_keys.append(entry.name)
|
||||
|
||||
write_string(source_file, '// {}'.format(entry.name))
|
||||
|
||||
function_arguments = ''
|
||||
format_arguments_array = ''
|
||||
if entry.is_pluralized:
|
||||
function_return_spec = 'NSString * _Nonnull'
|
||||
swift_spec = '_PresentationStrings.{}(self:_:)'.format(sanitize_entry_identifer(entry.name))
|
||||
function_arguments = ', int32_t value'
|
||||
elif len(entry.positional_arguments) != 0:
|
||||
function_return_spec = '_FormattedString * _Nonnull'
|
||||
positional_arguments_spec = ''
|
||||
argument_index = -1
|
||||
for argument in entry.positional_arguments:
|
||||
argument_index += 1
|
||||
format_arguments_array += ', '
|
||||
if argument.kind == 'd':
|
||||
function_arguments += ', NSInteger _{}'.format(argument_index)
|
||||
format_arguments_array += '@(_{})'.format(argument_index)
|
||||
elif argument.kind == '@':
|
||||
function_arguments += ', NSString * _Nonnull _{}'.format(argument_index)
|
||||
format_arguments_array += '_{}'.format(argument_index)
|
||||
else:
|
||||
raise Exception('Unsupported argument type {}'.format(argument.kind))
|
||||
positional_arguments_spec += '_:'
|
||||
swift_spec = '_PresentationStrings.{}(self:{})'.format(
|
||||
sanitize_entry_identifer(entry.name), positional_arguments_spec)
|
||||
else:
|
||||
function_return_spec = 'NSString * _Nonnull'
|
||||
swift_spec = 'getter:_PresentationStrings.{}(self:)'.format(sanitize_entry_identifer(entry.name))
|
||||
|
||||
function_spec = '{} {}'.format(function_return_spec, entry_id)
|
||||
function_spec += '(_PresentationStrings * _Nonnull _self{})'.format(function_arguments)
|
||||
|
||||
write_string(header_file, '{function_spec} __attribute__((__swift_name__("{swift_spec}")));'.format(
|
||||
function_spec=function_spec, swift_spec=swift_spec))
|
||||
|
||||
if entry.is_pluralized:
|
||||
argument_format_type = ''
|
||||
if entry.positional_arguments[0].kind == 'd':
|
||||
argument_format_type = '0'
|
||||
elif entry.positional_arguments[0].kind == '@':
|
||||
argument_format_type = '1'
|
||||
else:
|
||||
raise Exception('Unsupported argument type {}'.format(argument.kind))
|
||||
write_string(source_file, function_spec + ''' {{
|
||||
return getPluralizedIndirect(_self, {entry_key_id}, value);
|
||||
}}'''.format(key=entry.name, entry_key_id=entry_key_id))
|
||||
elif len(entry.positional_arguments) != 0:
|
||||
write_string(source_file, function_spec + ''' {{
|
||||
return getFormatted{argument_count}(_self, {key_id}{arguments_array});
|
||||
}}'''.format(key_id=entry_key_id, argument_count=len(entry.positional_arguments), arguments_array=format_arguments_array))
|
||||
else:
|
||||
write_string(source_file, function_spec + ''' {{
|
||||
return getSingleIndirect(_self, {entry_key_id});
|
||||
}}'''.format(key=entry.name, entry_key_id=entry_key_id))
|
||||
|
||||
write_bin_uint32(data_file, len(entry_keys))
|
||||
for entry_key in entry_keys:
|
||||
write_bin_uint8(data_file, len(entry_key))
|
||||
write_bin_string(data_file, entry_key)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(prog='GenerateStrings')
|
||||
|
||||
parser.add_argument(
|
||||
'--source',
|
||||
required=True,
|
||||
help='Path to Localizable.strings',
|
||||
metavar='path'
|
||||
)
|
||||
parser.add_argument(
|
||||
'--outImplementation',
|
||||
required=True,
|
||||
help='Path to PresentationStrings.m',
|
||||
metavar='path'
|
||||
)
|
||||
parser.add_argument(
|
||||
'--outHeader',
|
||||
required=True,
|
||||
help='Path to PresentationStrings.h',
|
||||
metavar='path'
|
||||
)
|
||||
parser.add_argument(
|
||||
'--outData',
|
||||
required=True,
|
||||
help='Path to PresentationStrings.data',
|
||||
metavar='path'
|
||||
)
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
parser.print_help()
|
||||
sys.exit(1)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
parsed_strings = parse_strings(args.source)
|
||||
all_entries = parse_entries(parsed_strings)
|
||||
generate(header_path=args.outHeader, implementation_path=args.outImplementation, data_path=args.outData,
|
||||
entries=all_entries)
|
@ -16,7 +16,6 @@ swift_library(
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||
"//submodules/Postbox:Postbox",
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
"//submodules/SyncCore:SyncCore",
|
||||
],
|
||||
visibility = [
|
||||
"//visibility:public",
|
||||
|
@ -3,7 +3,6 @@ import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import TelegramPresentationData
|
||||
import TelegramUIPreferences
|
||||
import SwiftSignalKit
|
||||
|
@ -1,32 +1,31 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import TextFormat
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import SwiftSignalKit
|
||||
import TelegramPresentationData
|
||||
import TelegramUIPreferences
|
||||
import Postbox
|
||||
|
||||
public final class ChatMessageItemAssociatedData: Equatable {
|
||||
public enum ChannelDiscussionGroupStatus: Equatable {
|
||||
case unknown
|
||||
case known(PeerId?)
|
||||
case known(EnginePeer.Id?)
|
||||
}
|
||||
|
||||
public let automaticDownloadPeerType: MediaAutoDownloadPeerType
|
||||
public let automaticDownloadNetworkType: MediaAutoDownloadNetworkType
|
||||
public let isRecentActions: Bool
|
||||
public let subject: ChatControllerSubject?
|
||||
public let contactsPeerIds: Set<PeerId>
|
||||
public let contactsPeerIds: Set<EnginePeer.Id>
|
||||
public let channelDiscussionGroup: ChannelDiscussionGroupStatus
|
||||
public let animatedEmojiStickers: [String: [StickerPackItem]]
|
||||
public let forcedResourceStatus: FileMediaResourceStatus?
|
||||
public let currentlyPlayingMessageId: MessageIndex?
|
||||
public let currentlyPlayingMessageId: EngineMessage.Index?
|
||||
|
||||
public init(automaticDownloadPeerType: MediaAutoDownloadPeerType, automaticDownloadNetworkType: MediaAutoDownloadNetworkType, isRecentActions: Bool = false, subject: ChatControllerSubject? = nil, contactsPeerIds: Set<PeerId> = Set(), channelDiscussionGroup: ChannelDiscussionGroupStatus = .unknown, animatedEmojiStickers: [String: [StickerPackItem]] = [:], forcedResourceStatus: FileMediaResourceStatus? = nil, currentlyPlayingMessageId: MessageIndex? = nil) {
|
||||
public init(automaticDownloadPeerType: MediaAutoDownloadPeerType, automaticDownloadNetworkType: MediaAutoDownloadNetworkType, isRecentActions: Bool = false, subject: ChatControllerSubject? = nil, contactsPeerIds: Set<EnginePeer.Id> = Set(), channelDiscussionGroup: ChannelDiscussionGroupStatus = .unknown, animatedEmojiStickers: [String: [StickerPackItem]] = [:], forcedResourceStatus: FileMediaResourceStatus? = nil, currentlyPlayingMessageId: EngineMessage.Index? = nil) {
|
||||
self.automaticDownloadPeerType = automaticDownloadPeerType
|
||||
self.automaticDownloadNetworkType = automaticDownloadNetworkType
|
||||
self.isRecentActions = isRecentActions
|
||||
@ -80,7 +79,7 @@ public extension ChatMessageItemAssociatedData {
|
||||
public enum ChatControllerInteractionLongTapAction {
|
||||
case url(String)
|
||||
case mention(String)
|
||||
case peerMention(PeerId, String)
|
||||
case peerMention(EnginePeer.Id, String)
|
||||
case command(String)
|
||||
case hashtag(String)
|
||||
case timecode(Double, String)
|
||||
@ -111,7 +110,7 @@ public enum ChatHistoryMessageSelection: Equatable {
|
||||
|
||||
public enum ChatControllerInitialBotStartBehavior {
|
||||
case interactive
|
||||
case automatic(returnToPeerId: PeerId, scheduled: Bool)
|
||||
case automatic(returnToPeerId: EnginePeer.Id, scheduled: Bool)
|
||||
}
|
||||
|
||||
public struct ChatControllerInitialBotStart {
|
||||
@ -172,7 +171,7 @@ public enum ChatTextInputStateTextAttributeType: PostboxCoding, Equatable {
|
||||
case bold
|
||||
case italic
|
||||
case monospace
|
||||
case textMention(PeerId)
|
||||
case textMention(EnginePeer.Id)
|
||||
case textUrl(String)
|
||||
|
||||
public init(decoder: PostboxDecoder) {
|
||||
@ -184,7 +183,7 @@ public enum ChatTextInputStateTextAttributeType: PostboxCoding, Equatable {
|
||||
case 2:
|
||||
self = .monospace
|
||||
case 3:
|
||||
self = .textMention(PeerId(decoder.decodeInt64ForKey("peerId", orElse: 0)))
|
||||
self = .textMention(EnginePeer.Id(decoder.decodeInt64ForKey("peerId", orElse: 0)))
|
||||
case 4:
|
||||
self = .textUrl(decoder.decodeStringForKey("url", orElse: ""))
|
||||
default:
|
||||
@ -341,9 +340,9 @@ public struct ChatTextInputStateText: PostboxCoding, Equatable {
|
||||
}
|
||||
|
||||
public enum ChatControllerSubject: Equatable {
|
||||
case message(id: MessageId, highlight: Bool, timecode: Double?)
|
||||
case message(id: EngineMessage.Id, highlight: Bool, timecode: Double?)
|
||||
case scheduledMessages
|
||||
case pinnedMessages(id: MessageId?)
|
||||
case pinnedMessages(id: EngineMessage.Id?)
|
||||
}
|
||||
|
||||
public enum ChatControllerPresentationMode: Equatable {
|
||||
@ -383,10 +382,10 @@ public final class ChatEmbeddedInterfaceState: PeerChatListEmbeddedInterfaceStat
|
||||
public enum ChatPresentationInputQueryResult: Equatable {
|
||||
case stickers([FoundStickerItem])
|
||||
case hashtags([String])
|
||||
case mentions([Peer])
|
||||
case mentions([EnginePeer])
|
||||
case commands([PeerCommand])
|
||||
case emojis([(String, String)], NSRange)
|
||||
case contextRequestResult(Peer?, ChatContextResultCollection?)
|
||||
case contextRequestResult(EnginePeer?, ChatContextResultCollection?)
|
||||
|
||||
public static func ==(lhs: ChatPresentationInputQueryResult, rhs: ChatPresentationInputQueryResult) -> Bool {
|
||||
switch lhs {
|
||||
@ -404,16 +403,10 @@ public enum ChatPresentationInputQueryResult: Equatable {
|
||||
}
|
||||
case let .mentions(lhsPeers):
|
||||
if case let .mentions(rhsPeers) = rhs {
|
||||
if lhsPeers.count != rhsPeers.count {
|
||||
if lhsPeers != rhsPeers {
|
||||
return false
|
||||
} else {
|
||||
for i in 0 ..< lhsPeers.count {
|
||||
if !lhsPeers[i].isEqual(rhsPeers[i]) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
@ -445,14 +438,9 @@ public enum ChatPresentationInputQueryResult: Equatable {
|
||||
}
|
||||
case let .contextRequestResult(lhsPeer, lhsCollection):
|
||||
if case let .contextRequestResult(rhsPeer, rhsCollection) = rhs {
|
||||
if let lhsPeer = lhsPeer, let rhsPeer = rhsPeer {
|
||||
if !lhsPeer.isEqual(rhsPeer) {
|
||||
return false
|
||||
}
|
||||
} else if (lhsPeer != nil) != (rhsPeer != nil) {
|
||||
if lhsPeer != rhsPeer {
|
||||
return false
|
||||
}
|
||||
|
||||
if lhsCollection != rhsCollection {
|
||||
return false
|
||||
}
|
||||
@ -484,7 +472,7 @@ public protocol ChatController: ViewController {
|
||||
var isSendButtonVisible: Bool { get }
|
||||
}
|
||||
|
||||
public protocol ChatMessagePreviewItemNode: class {
|
||||
public protocol ChatMessagePreviewItemNode: AnyObject {
|
||||
var forwardInfoReferenceNode: ASDisplayNode? { get }
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,6 @@ import Foundation
|
||||
import Contacts
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
|
||||
public final class DeviceContactPhoneNumberData: Equatable {
|
||||
public let label: String
|
||||
|
@ -1,7 +1,6 @@
|
||||
import Foundation
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import TelegramUIPreferences
|
||||
import SwiftSignalKit
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
import Foundation
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import Postbox
|
||||
import TelegramUIPreferences
|
||||
import SwiftSignalKit
|
||||
|
@ -1,7 +1,6 @@
|
||||
import Foundation
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import SwiftSignalKit
|
||||
import TelegramUIPreferences
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import Postbox
|
||||
import SwiftSignalKit
|
||||
import TelegramUIPreferences
|
||||
|
@ -1,7 +1,6 @@
|
||||
import Foundation
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
|
||||
private let minimalStreamableSize: Int = 384 * 1024
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
import Foundation
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import Postbox
|
||||
import SwiftSignalKit
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
import Foundation
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import SwiftSignalKit
|
||||
import UIKit
|
||||
import AsyncDisplayKit
|
||||
|
@ -2,7 +2,6 @@ import Foundation
|
||||
import UIKit
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import SwiftSignalKit
|
||||
import Display
|
||||
import AsyncDisplayKit
|
||||
|
@ -1,7 +1,6 @@
|
||||
import Foundation
|
||||
import SwiftSignalKit
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import TelegramPresentationData
|
||||
|
||||
public protocol PeersNearbyManager {
|
||||
|
@ -3,7 +3,6 @@ import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import SwiftSignalKit
|
||||
import TelegramAudio
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
import Foundation
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import Postbox
|
||||
import TelegramUIPreferences
|
||||
import SwiftSignalKit
|
||||
|
@ -1,7 +1,6 @@
|
||||
import Foundation
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import SwiftSignalKit
|
||||
|
||||
public func storedMessageFromSearchPeer(account: Account, peer: Peer) -> Signal<PeerId, NoError> {
|
||||
|
@ -1,7 +1,6 @@
|
||||
import Foundation
|
||||
import SwiftSignalKit
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import TelegramPresentationData
|
||||
|
||||
public protocol ThemeUpdateManager: class {
|
||||
|
@ -4,7 +4,6 @@ import AsyncDisplayKit
|
||||
import Postbox
|
||||
import SwiftSignalKit
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import Display
|
||||
import TelegramAudio
|
||||
import UniversalMediaPlayer
|
||||
|
@ -1,4 +1,4 @@
|
||||
import SyncCore
|
||||
import TelegramCore
|
||||
|
||||
public struct VideoCallsConfiguration: Equatable {
|
||||
public enum VideoCallsSupport {
|
||||
|
@ -1,7 +1,6 @@
|
||||
import Foundation
|
||||
import SwiftSignalKit
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import TelegramPresentationData
|
||||
|
||||
public enum WallpaperUploadManagerStatus {
|
||||
|
@ -10,7 +10,6 @@ swift_library(
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||
"//submodules/Postbox:Postbox",
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
"//submodules/SyncCore:SyncCore",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
|
||||
],
|
||||
|
@ -2,7 +2,6 @@ import Foundation
|
||||
import SwiftSignalKit
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import TelegramUIPreferences
|
||||
import AccountContext
|
||||
|
||||
|
@ -9,7 +9,6 @@ swift_library(
|
||||
deps = [
|
||||
"//submodules/Postbox:Postbox",
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
"//submodules/SyncCore:SyncCore",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
||||
"//submodules/Display:Display",
|
||||
"//submodules/AvatarNode:AvatarNode",
|
||||
|
@ -3,7 +3,6 @@ import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import Postbox
|
||||
import TelegramPresentationData
|
||||
import AvatarNode
|
||||
|
@ -12,7 +12,6 @@ swift_library(
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||
"//submodules/Postbox:Postbox",
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
"//submodules/SyncCore:SyncCore",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
"//submodules/AvatarNode:AvatarNode",
|
||||
"//submodules/AudioBlob:AudioBlob",
|
||||
|
@ -6,7 +6,6 @@ import AvatarNode
|
||||
import SwiftSignalKit
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import AccountContext
|
||||
import AudioBlob
|
||||
|
||||
|
@ -10,7 +10,6 @@ swift_library(
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||
"//submodules/Postbox:Postbox",
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
"//submodules/SyncCore:SyncCore",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
||||
"//submodules/Display:Display",
|
||||
"//submodules/YuvConversion:YuvConversion",
|
||||
|
@ -12,7 +12,6 @@ swift_library(
|
||||
"//submodules/Display:Display",
|
||||
"//submodules/Postbox:Postbox",
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
"//submodules/SyncCore:SyncCore",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
|
||||
|
@ -5,7 +5,6 @@ import Display
|
||||
import SwiftSignalKit
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import TelegramPresentationData
|
||||
import ActivityIndicator
|
||||
import AccountContext
|
||||
|
@ -8,7 +8,6 @@ swift_library(
|
||||
]),
|
||||
deps = [
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
"//submodules/SyncCore:SyncCore",
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
||||
"//submodules/Display:Display",
|
||||
|
@ -9,7 +9,6 @@ swift_library(
|
||||
deps = [
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
"//submodules/SyncCore:SyncCore",
|
||||
"//submodules/Display:Display",
|
||||
"//submodules/TextFormat:TextFormat",
|
||||
"//submodules/Markdown:Markdown",
|
||||
|
@ -1,7 +1,6 @@
|
||||
import Foundation
|
||||
import UIKit
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import Display
|
||||
import TelegramPresentationData
|
||||
import TextFormat
|
||||
@ -30,13 +29,13 @@ public func authorizationNextOptionText(currentType: SentAuthorizationCodeType,
|
||||
return (NSAttributedString(string: strings.Login_CodeSentSms, font: Font.regular(16.0), textColor: primaryColor, paragraphAlignment: .center), false)
|
||||
} else {
|
||||
let timeString = NSString(format: "%d:%.02d", Int(minutes), Int(seconds))
|
||||
return (NSAttributedString(string: strings.Login_WillSendSms(timeString as String).0, font: Font.regular(16.0), textColor: primaryColor, paragraphAlignment: .center), false)
|
||||
return (NSAttributedString(string: strings.Login_WillSendSms(timeString as String).string, font: Font.regular(16.0), textColor: primaryColor, paragraphAlignment: .center), false)
|
||||
}
|
||||
case .call, .flashCall:
|
||||
if timeout <= 0 {
|
||||
return (NSAttributedString(string: strings.ChangePhoneNumberCode_Called, font: Font.regular(16.0), textColor: primaryColor, paragraphAlignment: .center), false)
|
||||
} else {
|
||||
return (NSAttributedString(string: String(format: strings.ChangePhoneNumberCode_CallTimer(String(format: "%d:%.2d", minutes, seconds)).0, minutes, seconds), font: Font.regular(16.0), textColor: primaryColor, paragraphAlignment: .center), false)
|
||||
return (NSAttributedString(string: String(format: strings.ChangePhoneNumberCode_CallTimer(String(format: "%d:%.2d", minutes, seconds)).string, minutes, seconds), font: Font.regular(16.0), textColor: primaryColor, paragraphAlignment: .center), false)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -10,7 +10,6 @@ swift_library(
|
||||
"//submodules/AsyncDisplayKit:AsyncDisplayKit",
|
||||
"//submodules/Display:Display",
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
"//submodules/SyncCore:SyncCore",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/AnimationUI:AnimationUI",
|
||||
"//submodules/AppBundle:AppBundle",
|
||||
|
@ -4,7 +4,6 @@ import AsyncDisplayKit
|
||||
import Postbox
|
||||
import Display
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import SwiftSignalKit
|
||||
import TelegramPresentationData
|
||||
import AnimationUI
|
||||
|
@ -5,7 +5,6 @@ import Postbox
|
||||
import Display
|
||||
import ImageIO
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import TinyThumbnail
|
||||
import FastBlur
|
||||
|
||||
|
@ -10,7 +10,6 @@ swift_library(
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||
"//submodules/Postbox:Postbox",
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
"//submodules/SyncCore:SyncCore",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/LocalAuth:LocalAuth",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
|
@ -3,7 +3,6 @@ import UIKit
|
||||
import Display
|
||||
import AsyncDisplayKit
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import SwiftSignalKit
|
||||
import Postbox
|
||||
import TelegramPresentationData
|
||||
|
@ -4,7 +4,6 @@ import AsyncDisplayKit
|
||||
import Display
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import SwiftSignalKit
|
||||
import PassKit
|
||||
import TelegramPresentationData
|
||||
@ -971,7 +970,7 @@ final class BotCheckoutControllerNode: ItemListControllerNode, PKPaymentAuthoriz
|
||||
let totalAmount = currentTotalPrice(paymentForm: self.paymentFormValue, validatedFormInfo: self.currentValidatedFormInfo, currentShippingOptionId: self.currentShippingOptionId, currentTip: self.currentTipAmount)
|
||||
let payString: String
|
||||
if let paymentForm = self.paymentFormValue, totalAmount > 0 {
|
||||
payString = self.presentationData.strings.Checkout_PayPrice(formatCurrencyAmount(totalAmount, currency: paymentForm.invoice.currency)).0
|
||||
payString = self.presentationData.strings.Checkout_PayPrice(formatCurrencyAmount(totalAmount, currency: paymentForm.invoice.currency)).string
|
||||
} else {
|
||||
payString = self.presentationData.strings.CheckoutInfo_Pay
|
||||
}
|
||||
@ -1324,12 +1323,12 @@ final class BotCheckoutControllerNode: ItemListControllerNode, PKPaymentAuthoriz
|
||||
let alertText: String
|
||||
if requiresBiometrics {
|
||||
if let biometricAuthentication = LocalAuth.biometricAuthentication, case .faceId = biometricAuthentication {
|
||||
alertText = strongSelf.presentationData.strings.Checkout_SavePasswordTimeoutAndFaceId(durationString).0
|
||||
alertText = strongSelf.presentationData.strings.Checkout_SavePasswordTimeoutAndFaceId(durationString).string
|
||||
} else {
|
||||
alertText = strongSelf.presentationData.strings.Checkout_SavePasswordTimeoutAndTouchId(durationString).0
|
||||
alertText = strongSelf.presentationData.strings.Checkout_SavePasswordTimeoutAndTouchId(durationString).string
|
||||
}
|
||||
} else {
|
||||
alertText = strongSelf.presentationData.strings.Checkout_SavePasswordTimeout(durationString).0
|
||||
alertText = strongSelf.presentationData.strings.Checkout_SavePasswordTimeout(durationString).string
|
||||
}
|
||||
|
||||
strongSelf.present(textAlertController(context: strongSelf.context, title: nil, text: alertText, actions: [
|
||||
|
@ -4,7 +4,6 @@ import Display
|
||||
import AsyncDisplayKit
|
||||
import SwiftSignalKit
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import TelegramPresentationData
|
||||
import ItemListUI
|
||||
import PresentationDataUtils
|
||||
|
@ -3,7 +3,6 @@ import UIKit
|
||||
import SwiftSignalKit
|
||||
import Display
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import Postbox
|
||||
import TelegramPresentationData
|
||||
import ProgressNavigationButtonNode
|
||||
|
@ -3,7 +3,6 @@ import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import Postbox
|
||||
import SwiftSignalKit
|
||||
import TelegramPresentationData
|
||||
|
@ -4,7 +4,6 @@ import AsyncDisplayKit
|
||||
import SwiftSignalKit
|
||||
import Display
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import Postbox
|
||||
import TelegramPresentationData
|
||||
import ProgressNavigationButtonNode
|
||||
|
@ -3,7 +3,6 @@ import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import Postbox
|
||||
import SwiftSignalKit
|
||||
import TelegramPresentationData
|
||||
|
@ -3,7 +3,6 @@ import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import SwiftSignalKit
|
||||
import TelegramPresentationData
|
||||
import AccountContext
|
||||
@ -109,7 +108,7 @@ private final class BotCheckoutPasswordAlertContentNode: AlertContentNode {
|
||||
self.titleNode = titleNode
|
||||
|
||||
self.textNode = ASTextNode()
|
||||
self.textNode.attributedText = NSAttributedString(string: strings.Checkout_PasswordEntry_Text(cardTitle).0, font: Font.regular(13.0), textColor: theme.actionSheet.primaryTextColor, paragraphAlignment: .center)
|
||||
self.textNode.attributedText = NSAttributedString(string: strings.Checkout_PasswordEntry_Text(cardTitle).string, font: Font.regular(13.0), textColor: theme.actionSheet.primaryTextColor, paragraphAlignment: .center)
|
||||
self.textNode.displaysAsynchronously = false
|
||||
self.textNode.isUserInteractionEnabled = false
|
||||
|
||||
|
@ -4,7 +4,6 @@ import Display
|
||||
import AsyncDisplayKit
|
||||
import SwiftSignalKit
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import AccountContext
|
||||
import AppBundle
|
||||
|
||||
|
@ -4,7 +4,6 @@ import Display
|
||||
import AsyncDisplayKit
|
||||
import SwiftSignalKit
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import AccountContext
|
||||
import TelegramStringFormatting
|
||||
|
||||
|
@ -3,7 +3,6 @@ import UIKit
|
||||
import Display
|
||||
import AsyncDisplayKit
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import SwiftSignalKit
|
||||
import Postbox
|
||||
import TelegramPresentationData
|
||||
|
@ -3,7 +3,6 @@ import UIKit
|
||||
import Display
|
||||
import AsyncDisplayKit
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import SwiftSignalKit
|
||||
import Postbox
|
||||
import TelegramPresentationData
|
||||
|
@ -4,7 +4,6 @@ import AsyncDisplayKit
|
||||
import Display
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import SwiftSignalKit
|
||||
import TelegramPresentationData
|
||||
import ItemListUI
|
||||
|
@ -5,7 +5,6 @@ import AsyncDisplayKit
|
||||
import Display
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import TelegramPresentationData
|
||||
import AccountContext
|
||||
|
||||
|
@ -12,7 +12,6 @@ swift_library(
|
||||
"//submodules/Display:Display",
|
||||
"//submodules/Postbox:Postbox",
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
"//submodules/SyncCore:SyncCore",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
|
@ -5,7 +5,6 @@ import Postbox
|
||||
import Display
|
||||
import SwiftSignalKit
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import TelegramPresentationData
|
||||
import ItemListUI
|
||||
import PresentationDataUtils
|
||||
@ -438,8 +437,8 @@ class CallListCallItemNode: ItemListRevealOptionsItemNode {
|
||||
statusAccessibilityString = isVideo ? (item.presentationData.strings.Call_VoiceOver_VideoCallOutgoing + ", " + item.presentationData.strings.Call_VoiceOver_VideoCallIncoming) : (item.presentationData.strings.Call_VoiceOver_VoiceCallOutgoing + ", " + item.presentationData.strings.Call_VoiceOver_VoiceCallIncoming)
|
||||
} else if hasIncoming {
|
||||
if let callDuration = callDuration, callDuration != 0 {
|
||||
statusAttributedString = NSAttributedString(string: item.presentationData.strings.Notification_CallTimeFormat(item.presentationData.strings.Notification_CallIncomingShort, callDurationString(strings: item.presentationData.strings, duration: callDuration)).0, font: statusFont, textColor: item.presentationData.theme.list.itemSecondaryTextColor)
|
||||
statusAccessibilityString = item.presentationData.strings.Notification_CallTimeFormat(isVideo ? item.presentationData.strings.Call_VoiceOver_VideoCallIncoming : item.presentationData.strings.Call_VoiceOver_VoiceCallIncoming, callDurationString(strings: item.presentationData.strings, duration: callDuration)).0
|
||||
statusAttributedString = NSAttributedString(string: item.presentationData.strings.Notification_CallTimeFormat(item.presentationData.strings.Notification_CallIncomingShort, callDurationString(strings: item.presentationData.strings, duration: callDuration)).string, font: statusFont, textColor: item.presentationData.theme.list.itemSecondaryTextColor)
|
||||
statusAccessibilityString = item.presentationData.strings.Notification_CallTimeFormat(isVideo ? item.presentationData.strings.Call_VoiceOver_VideoCallIncoming : item.presentationData.strings.Call_VoiceOver_VoiceCallIncoming, callDurationString(strings: item.presentationData.strings, duration: callDuration)).string
|
||||
|
||||
} else {
|
||||
statusAttributedString = NSAttributedString(string: item.presentationData.strings.Notification_CallIncomingShort, font: statusFont, textColor: item.presentationData.theme.list.itemSecondaryTextColor)
|
||||
@ -447,8 +446,8 @@ class CallListCallItemNode: ItemListRevealOptionsItemNode {
|
||||
}
|
||||
} else {
|
||||
if let callDuration = callDuration, callDuration != 0 {
|
||||
statusAttributedString = NSAttributedString(string: item.presentationData.strings.Notification_CallTimeFormat(item.presentationData.strings.Notification_CallOutgoingShort, callDurationString(strings: item.presentationData.strings, duration: callDuration)).0, font: statusFont, textColor: item.presentationData.theme.list.itemSecondaryTextColor)
|
||||
statusAccessibilityString = item.presentationData.strings.Notification_CallTimeFormat(isVideo ? item.presentationData.strings.Call_VoiceOver_VideoCallOutgoing : item.presentationData.strings.Call_VoiceOver_VoiceCallOutgoing, callDurationString(strings: item.presentationData.strings, duration: callDuration)).0
|
||||
statusAttributedString = NSAttributedString(string: item.presentationData.strings.Notification_CallTimeFormat(item.presentationData.strings.Notification_CallOutgoingShort, callDurationString(strings: item.presentationData.strings, duration: callDuration)).string, font: statusFont, textColor: item.presentationData.theme.list.itemSecondaryTextColor)
|
||||
statusAccessibilityString = item.presentationData.strings.Notification_CallTimeFormat(isVideo ? item.presentationData.strings.Call_VoiceOver_VideoCallOutgoing : item.presentationData.strings.Call_VoiceOver_VoiceCallOutgoing, callDurationString(strings: item.presentationData.strings, duration: callDuration)).string
|
||||
} else {
|
||||
statusAttributedString = NSAttributedString(string: item.presentationData.strings.Notification_CallOutgoingShort, font: statusFont, textColor: item.presentationData.theme.list.itemSecondaryTextColor)
|
||||
statusAccessibilityString = isVideo ? item.presentationData.strings.Call_VoiceOver_VideoCallOutgoing : item.presentationData.strings.Call_VoiceOver_VoiceCallOutgoing
|
||||
|
@ -4,7 +4,6 @@ import Display
|
||||
import AsyncDisplayKit
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import SwiftSignalKit
|
||||
import TelegramPresentationData
|
||||
import ItemListUI
|
||||
@ -449,7 +448,7 @@ public final class CallListController: TelegramBaseController {
|
||||
if let cachedUserData = view.cachedData as? CachedUserData, cachedUserData.callsPrivate {
|
||||
let presentationData = strongSelf.context.sharedContext.currentPresentationData.with { $0 }
|
||||
|
||||
strongSelf.present(textAlertController(context: strongSelf.context, title: presentationData.strings.Call_ConnectionErrorTitle, text: presentationData.strings.Call_PrivacyErrorMessage(peer.compactDisplayTitle).0, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]), in: .window(.root))
|
||||
strongSelf.present(textAlertController(context: strongSelf.context, title: presentationData.strings.Call_ConnectionErrorTitle, text: presentationData.strings.Call_PrivacyErrorMessage(peer.compactDisplayTitle).string, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]), in: .window(.root))
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,6 @@ import AsyncDisplayKit
|
||||
import Display
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import SwiftSignalKit
|
||||
import TelegramPresentationData
|
||||
import TelegramUIPreferences
|
||||
@ -232,7 +231,7 @@ final class CallListControllerNode: ASDisplayNode {
|
||||
self.listNode = ListView()
|
||||
self.listNode.verticalScrollIndicatorColor = self.presentationData.theme.list.scrollIndicatorColor
|
||||
self.listNode.accessibilityPageScrolledString = { row, count in
|
||||
return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
|
||||
return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
|
||||
}
|
||||
|
||||
self.leftOverlayNode = ASDisplayNode()
|
||||
@ -338,7 +337,7 @@ final class CallListControllerNode: ASDisplayNode {
|
||||
let actionSheet = ActionSheetController(presentationData: strongSelf.presentationData)
|
||||
var items: [ActionSheetItem] = []
|
||||
|
||||
items.append(ActionSheetButtonItem(title: strongSelf.presentationData.strings.Conversation_DeleteMessagesFor(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).0, color: .destructive, action: { [weak actionSheet] in
|
||||
items.append(ActionSheetButtonItem(title: strongSelf.presentationData.strings.Conversation_DeleteMessagesFor(peer.displayTitle(strings: strongSelf.presentationData.strings, displayOrder: strongSelf.presentationData.nameDisplayOrder)).string, color: .destructive, action: { [weak actionSheet] in
|
||||
actionSheet?.dismissAnimated()
|
||||
guard let strongSelf = self else {
|
||||
return
|
||||
|
@ -5,7 +5,6 @@ import Postbox
|
||||
import Display
|
||||
import SwiftSignalKit
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import TelegramPresentationData
|
||||
import ItemListUI
|
||||
import PresentationDataUtils
|
||||
|
@ -2,7 +2,6 @@ import Foundation
|
||||
import UIKit
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import TelegramPresentationData
|
||||
import MergeLists
|
||||
|
||||
|
@ -2,7 +2,6 @@ import Foundation
|
||||
import UIKit
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import SwiftSignalKit
|
||||
import Display
|
||||
|
||||
|
@ -2,7 +2,6 @@ import Foundation
|
||||
import UIKit
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import SwiftSignalKit
|
||||
import Display
|
||||
import MergeLists
|
||||
|
@ -10,7 +10,6 @@ swift_library(
|
||||
"//submodules/SSignalKit/SwiftSignalKit:SwiftSignalKit",
|
||||
"//submodules/Postbox:Postbox",
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
"//submodules/SyncCore:SyncCore",
|
||||
],
|
||||
visibility = [
|
||||
"//visibility:public",
|
||||
|
@ -1,7 +1,6 @@
|
||||
import Foundation
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import SwiftSignalKit
|
||||
|
||||
public enum ChatHistoryImportTasks {
|
||||
|
@ -12,7 +12,6 @@ swift_library(
|
||||
"//submodules/Display:Display",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/Postbox:Postbox",
|
||||
"//submodules/SyncCore:SyncCore",
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
"//submodules/AppBundle:AppBundle",
|
||||
"//third-party/ZipArchive:ZipArchive",
|
||||
|
@ -2,7 +2,6 @@ import UIKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import SwiftSignalKit
|
||||
import Postbox
|
||||
import TelegramPresentationData
|
||||
|
@ -12,7 +12,6 @@ swift_library(
|
||||
"//submodules/Display:Display",
|
||||
"//submodules/Postbox:Postbox",
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
"//submodules/SyncCore:SyncCore",
|
||||
"//submodules/TextFormat:TextFormat",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
],
|
||||
|
@ -2,7 +2,6 @@ import Foundation
|
||||
import UIKit
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import TextFormat
|
||||
import AccountContext
|
||||
|
||||
|
@ -170,6 +170,14 @@ public final class ChatListSearchItemHeader: ListViewItemHeader {
|
||||
self.actionTitle = actionTitle
|
||||
self.action = action
|
||||
}
|
||||
|
||||
public func combinesWith(other: ListViewItemHeader) -> Bool {
|
||||
if let other = other as? ChatListSearchItemHeader, other.id == self.id {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
public func node(synchronousLoad: Bool) -> ListViewItemHeaderNode {
|
||||
return ChatListSearchItemHeaderNode(type: self.type, theme: self.theme, strings: self.strings, actionTitle: self.actionTitle, action: self.action)
|
||||
|
@ -12,7 +12,6 @@ swift_library(
|
||||
"//submodules/Display:Display",
|
||||
"//submodules/Postbox:Postbox",
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
"//submodules/SyncCore:SyncCore",
|
||||
"//submodules/ListSectionHeaderNode:ListSectionHeaderNode",
|
||||
"//submodules/HorizontalPeerItem:HorizontalPeerItem",
|
||||
"//submodules/MergeLists:MergeLists",
|
||||
|
@ -5,7 +5,6 @@ import Display
|
||||
import SwiftSignalKit
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import TelegramPresentationData
|
||||
import MergeLists
|
||||
import HorizontalPeerItem
|
||||
@ -141,7 +140,7 @@ public final class ChatListSearchRecentPeersNode: ASDisplayNode {
|
||||
self.listView = ListView()
|
||||
self.listView.transform = CATransform3DMakeRotation(-CGFloat.pi / 2.0, 0.0, 0.0, 1.0)
|
||||
self.listView.accessibilityPageScrolledString = { row, count in
|
||||
return strings.VoiceOver_ScrollStatus(row, count).0
|
||||
return strings.VoiceOver_ScrollStatus(row, count).string
|
||||
}
|
||||
|
||||
super.init()
|
||||
|
@ -12,7 +12,6 @@ swift_library(
|
||||
"//submodules/Display:Display",
|
||||
"//submodules/Postbox:Postbox",
|
||||
"//submodules/TelegramCore:TelegramCore",
|
||||
"//submodules/SyncCore:SyncCore",
|
||||
"//submodules/TelegramPresentationData:TelegramPresentationData",
|
||||
"//submodules/TelegramUIPreferences:TelegramUIPreferences",
|
||||
"//submodules/AccountContext:AccountContext",
|
||||
|
@ -5,7 +5,6 @@ import ContextUI
|
||||
import AccountContext
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import Display
|
||||
import TelegramUIPreferences
|
||||
import OverlayStatusController
|
||||
|
@ -5,7 +5,6 @@ import SwiftSignalKit
|
||||
import AsyncDisplayKit
|
||||
import Display
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import TelegramPresentationData
|
||||
import TelegramUIPreferences
|
||||
import TelegramBaseController
|
||||
@ -2340,7 +2339,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
|
||||
beginClear(.forLocalPeer)
|
||||
actionSheet?.dismissAnimated()
|
||||
}))
|
||||
items.append(ActionSheetButtonItem(title: strongSelf.presentationData.strings.ChatList_DeleteForEveryone(mainPeer.compactDisplayTitle).0, color: .destructive, action: { [weak actionSheet] in
|
||||
items.append(ActionSheetButtonItem(title: strongSelf.presentationData.strings.ChatList_DeleteForEveryone(mainPeer.compactDisplayTitle).string, color: .destructive, action: { [weak actionSheet] in
|
||||
beginClear(.forEveryone)
|
||||
actionSheet?.dismissAnimated()
|
||||
}))
|
||||
@ -2369,7 +2368,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
|
||||
}
|
||||
|
||||
if chatPeer is TelegramSecretChat {
|
||||
items.append(ActionSheetButtonItem(title: strongSelf.presentationData.strings.ChatList_DeleteForEveryone(mainPeer.compactDisplayTitle).0, color: .destructive, action: { [weak actionSheet] in
|
||||
items.append(ActionSheetButtonItem(title: strongSelf.presentationData.strings.ChatList_DeleteForEveryone(mainPeer.compactDisplayTitle).string, color: .destructive, action: { [weak actionSheet] in
|
||||
actionSheet?.dismissAnimated()
|
||||
guard let strongSelf = self else {
|
||||
return
|
||||
@ -2511,7 +2510,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
|
||||
})
|
||||
completion(true)
|
||||
}))
|
||||
items.append(ActionSheetButtonItem(title: self.presentationData.strings.ChatList_DeleteForEveryone(mainPeer.compactDisplayTitle).0, color: .destructive, action: { [weak self, weak actionSheet] in
|
||||
items.append(ActionSheetButtonItem(title: self.presentationData.strings.ChatList_DeleteForEveryone(mainPeer.compactDisplayTitle).string, color: .destructive, action: { [weak self, weak actionSheet] in
|
||||
actionSheet?.dismissAnimated()
|
||||
guard let strongSelf = self else {
|
||||
return
|
||||
|
@ -4,7 +4,6 @@ import AsyncDisplayKit
|
||||
import Display
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import SwiftSignalKit
|
||||
import TelegramPresentationData
|
||||
import MergeLists
|
||||
@ -369,7 +368,7 @@ private final class ChatListContainerItemNode: ASDisplayNode {
|
||||
self.presentationData = presentationData
|
||||
|
||||
self.listNode.accessibilityPageScrolledString = { row, count in
|
||||
return presentationData.strings.VoiceOver_ScrollStatus(row, count).0
|
||||
return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
|
||||
}
|
||||
|
||||
self.listNode.updateThemeAndStrings(theme: presentationData.theme, fontSize: presentationData.listsFontSize, strings: presentationData.strings, dateTimeFormat: presentationData.dateTimeFormat, nameSortOrder: presentationData.nameSortOrder, nameDisplayOrder: presentationData.nameDisplayOrder, disableAnimations: true)
|
||||
|
@ -4,7 +4,6 @@ import Display
|
||||
import SwiftSignalKit
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import TelegramPresentationData
|
||||
import PresentationDataUtils
|
||||
import ItemListUI
|
||||
|
@ -4,7 +4,6 @@ import Display
|
||||
import SwiftSignalKit
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import TelegramPresentationData
|
||||
import TelegramUIPreferences
|
||||
import ItemListUI
|
||||
|
@ -5,7 +5,6 @@ import AsyncDisplayKit
|
||||
import SwiftSignalKit
|
||||
import Postbox
|
||||
import TelegramCore
|
||||
import SyncCore
|
||||
import TelegramPresentationData
|
||||
import ItemListUI
|
||||
import TelegramUIPreferences
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user