Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a4fc0f64b8 | |||
| 9269c7c1c1 | |||
| 403ee63615 | |||
| b622fde291 |
@@ -1,2 +1,2 @@
|
|||||||
VERSION_NAME = 1.0.11
|
VERSION_NAME = 1.0.11
|
||||||
VERSION_ID = 20
|
VERSION_ID = 21
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ class SettingsTableViewController: UITableViewController {
|
|||||||
case goBackendVersion
|
case goBackendVersion
|
||||||
case exportZipArchive
|
case exportZipArchive
|
||||||
case viewLog
|
case viewLog
|
||||||
case donateLink
|
|
||||||
|
|
||||||
var localizedUIString: String {
|
var localizedUIString: String {
|
||||||
switch self {
|
switch self {
|
||||||
@@ -19,13 +18,12 @@ class SettingsTableViewController: UITableViewController {
|
|||||||
case .goBackendVersion: return tr("settingsVersionKeyWireGuardGoBackend")
|
case .goBackendVersion: return tr("settingsVersionKeyWireGuardGoBackend")
|
||||||
case .exportZipArchive: return tr("settingsExportZipButtonTitle")
|
case .exportZipArchive: return tr("settingsExportZipButtonTitle")
|
||||||
case .viewLog: return tr("settingsViewLogButtonTitle")
|
case .viewLog: return tr("settingsViewLogButtonTitle")
|
||||||
case .donateLink: return tr("donateLink")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let settingsFieldsBySection: [[SettingsFields]] = [
|
let settingsFieldsBySection: [[SettingsFields]] = [
|
||||||
[.iosAppVersion, .goBackendVersion, .donateLink],
|
[.iosAppVersion, .goBackendVersion],
|
||||||
[.exportZipArchive],
|
[.exportZipArchive],
|
||||||
[.viewLog]
|
[.viewLog]
|
||||||
]
|
]
|
||||||
@@ -169,15 +167,6 @@ extension SettingsTableViewController {
|
|||||||
self?.presentLogView()
|
self?.presentLogView()
|
||||||
}
|
}
|
||||||
return cell
|
return cell
|
||||||
} else if field == .donateLink {
|
|
||||||
let cell: ButtonCell = tableView.dequeueReusableCell(for: indexPath)
|
|
||||||
cell.buttonText = field.localizedUIString
|
|
||||||
cell.onTapped = {
|
|
||||||
if let url = URL(string: "https://www.wireguard.com/donations/"), UIApplication.shared.canOpenURL(url) {
|
|
||||||
UIApplication.shared.open(url, options: [:])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return cell
|
|
||||||
}
|
}
|
||||||
fatalError()
|
fatalError()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ class ConfTextStorage: NSTextStorage {
|
|||||||
override func replaceCharacters(in range: NSRange, with str: String) {
|
override func replaceCharacters(in range: NSRange, with str: String) {
|
||||||
beginEditing()
|
beginEditing()
|
||||||
backingStore.replaceCharacters(in: range, with: str)
|
backingStore.replaceCharacters(in: range, with: str)
|
||||||
edited(.editedCharacters, range: range, changeInLength: str.count - range.length)
|
edited(.editedCharacters, range: range, changeInLength: str.utf16.count - range.length)
|
||||||
endEditing()
|
endEditing()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,6 +94,7 @@ class ConfTextStorage: NSTextStorage {
|
|||||||
|
|
||||||
func evaluateExcludePrivateIPs(highlightSpans: UnsafePointer<highlight_span>) {
|
func evaluateExcludePrivateIPs(highlightSpans: UnsafePointer<highlight_span>) {
|
||||||
var spans = highlightSpans
|
var spans = highlightSpans
|
||||||
|
let string = backingStore.string
|
||||||
enum FieldType: String {
|
enum FieldType: String {
|
||||||
case dns
|
case dns
|
||||||
case allowedips
|
case allowedips
|
||||||
@@ -102,7 +103,7 @@ class ConfTextStorage: NSTextStorage {
|
|||||||
resetLastPeer()
|
resetLastPeer()
|
||||||
while spans.pointee.type != HighlightEnd {
|
while spans.pointee.type != HighlightEnd {
|
||||||
let span = spans.pointee
|
let span = spans.pointee
|
||||||
var substring = backingStore.attributedSubstring(from: NSRange(location: span.start, length: span.len)).string.lowercased()
|
var substring = String(string.substring(higlightSpan: span)).lowercased()
|
||||||
|
|
||||||
if span.type == HighlightError {
|
if span.type == HighlightError {
|
||||||
resetLastPeer()
|
resetLastPeer()
|
||||||
@@ -123,8 +124,9 @@ class ConfTextStorage: NSTextStorage {
|
|||||||
let next = spans.successor()
|
let next = spans.successor()
|
||||||
let nextnext = next.successor()
|
let nextnext = next.successor()
|
||||||
if next.pointee.type == HighlightDelimiter && nextnext.pointee.type == HighlightCidr {
|
if next.pointee.type == HighlightDelimiter && nextnext.pointee.type == HighlightCidr {
|
||||||
substring += backingStore.attributedSubstring(from: NSRange(location: next.pointee.start, length: next.pointee.len)).string +
|
let delimiter = string.substring(higlightSpan: next.pointee)
|
||||||
backingStore.attributedSubstring(from: NSRange(location: nextnext.pointee.start, length: nextnext.pointee.len)).string
|
let cidr = string.substring(higlightSpan: nextnext.pointee)
|
||||||
|
substring += delimiter + cidr
|
||||||
}
|
}
|
||||||
lastOnePeerAllowedIPs.append(substring)
|
lastOnePeerAllowedIPs.append(substring)
|
||||||
} else if span.type == HighlightPublicKey {
|
} else if span.type == HighlightPublicKey {
|
||||||
@@ -139,7 +141,8 @@ class ConfTextStorage: NSTextStorage {
|
|||||||
hasError = false
|
hasError = false
|
||||||
privateKeyString = nil
|
privateKeyString = nil
|
||||||
|
|
||||||
let fullTextRange = NSRange(location: 0, length: (backingStore.string as NSString).length)
|
let string = backingStore.string
|
||||||
|
let fullTextRange = NSRange(..<string.endIndex, in: string)
|
||||||
|
|
||||||
backingStore.beginEditing()
|
backingStore.beginEditing()
|
||||||
let defaultAttributes: [NSAttributedString.Key: Any] = [
|
let defaultAttributes: [NSAttributedString.Key: Any] = [
|
||||||
@@ -147,15 +150,19 @@ class ConfTextStorage: NSTextStorage {
|
|||||||
.font: defaultFont
|
.font: defaultFont
|
||||||
]
|
]
|
||||||
backingStore.setAttributes(defaultAttributes, range: fullTextRange)
|
backingStore.setAttributes(defaultAttributes, range: fullTextRange)
|
||||||
var spans = highlight_config(backingStore.string)!
|
var spans = highlight_config(string)!
|
||||||
evaluateExcludePrivateIPs(highlightSpans: spans)
|
evaluateExcludePrivateIPs(highlightSpans: spans)
|
||||||
|
|
||||||
let spansStart = spans
|
let spansStart = spans
|
||||||
while spans.pointee.type != HighlightEnd {
|
while spans.pointee.type != HighlightEnd {
|
||||||
let span = spans.pointee
|
let span = spans.pointee
|
||||||
|
|
||||||
let range = NSRange(location: span.start, length: span.len)
|
let startIndex = string.utf8.index(string.startIndex, offsetBy: span.start)
|
||||||
|
let endIndex = string.utf8.index(startIndex, offsetBy: span.len)
|
||||||
|
let range = NSRange(startIndex..<endIndex, in: string)
|
||||||
|
|
||||||
backingStore.setAttributes(nonColorAttributes(for: span.type), range: range)
|
backingStore.setAttributes(nonColorAttributes(for: span.type), range: range)
|
||||||
|
|
||||||
let color = textColorTheme.colorMap[span.type.rawValue, default: textColorTheme.defaultColor]
|
let color = textColorTheme.colorMap[span.type.rawValue, default: textColorTheme.defaultColor]
|
||||||
backingStore.addAttribute(.foregroundColor, value: color, range: range)
|
backingStore.addAttribute(.foregroundColor, value: color, range: range)
|
||||||
|
|
||||||
@@ -164,7 +171,7 @@ class ConfTextStorage: NSTextStorage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if span.type == HighlightPrivateKey {
|
if span.type == HighlightPrivateKey {
|
||||||
privateKeyString = backingStore.attributedSubstring(from: NSRange(location: span.start, length: span.len)).string
|
privateKeyString = String(string.substring(higlightSpan: span))
|
||||||
}
|
}
|
||||||
|
|
||||||
spans = spans.successor()
|
spans = spans.successor()
|
||||||
@@ -178,3 +185,12 @@ class ConfTextStorage: NSTextStorage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private extension String {
|
||||||
|
func substring(higlightSpan span: highlight_span) -> Substring {
|
||||||
|
let startIndex = self.utf8.index(self.utf8.startIndex, offsetBy: span.start)
|
||||||
|
let endIndex = self.utf8.index(startIndex, offsetBy: span.len)
|
||||||
|
|
||||||
|
return self[startIndex..<endIndex]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ class ConfTextView: NSTextView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func setConfText(_ text: String) {
|
func setConfText(_ text: String) {
|
||||||
let fullTextRange = NSRange(location: 0, length: (string as NSString).length)
|
let fullTextRange = NSRange(..<string.endIndex, in: string)
|
||||||
if shouldChangeText(in: fullTextRange, replacementString: text) {
|
if shouldChangeText(in: fullTextRange, replacementString: text) {
|
||||||
replaceCharacters(in: fullTextRange, with: text)
|
replaceCharacters(in: fullTextRange, with: text)
|
||||||
didChangeText()
|
didChangeText()
|
||||||
|
|||||||
@@ -399,24 +399,24 @@
|
|||||||
6FDEF801218646B900D8FBF6 /* ZipArchive.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZipArchive.swift; sourceTree = "<group>"; };
|
6FDEF801218646B900D8FBF6 /* ZipArchive.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZipArchive.swift; sourceTree = "<group>"; };
|
||||||
6FDEF805218725D200D8FBF6 /* SettingsTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsTableViewController.swift; sourceTree = "<group>"; };
|
6FDEF805218725D200D8FBF6 /* SettingsTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsTableViewController.swift; sourceTree = "<group>"; };
|
||||||
6FE1765521C90BBE002690EA /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Sources/WireGuardApp/Base.lproj/Localizable.strings; sourceTree = "<group>"; };
|
6FE1765521C90BBE002690EA /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Sources/WireGuardApp/Base.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
B42B98244F62B9607F9B45CA /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh-Hant; path = Sources/WireGuardApp/zh-Hant.lproj/Localizable.strings; sourceTree = "<group>"; };
|
6F70E20D221058DF008BDFC6 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh-Hant; path = Sources/WireGuardApp/zh-Hant.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
30DA2ED43960DE77912BD89D /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh-Hans; path = Sources/WireGuardApp/zh-Hans.lproj/Localizable.strings; sourceTree = "<group>"; };
|
6F70E20D221058DF008BDFBA /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh-Hans; path = Sources/WireGuardApp/zh-Hans.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
2A4344354DDBADE335B5FD2D /* id */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = id; path = Sources/WireGuardApp/id.lproj/Localizable.strings; sourceTree = "<group>"; };
|
6F70E20D221058DF008BDFC5 /* id */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = id; path = Sources/WireGuardApp/id.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
B829B6E3BE26C748A53A64EE /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = Sources/WireGuardApp/it.lproj/Localizable.strings; sourceTree = "<group>"; };
|
6F70E20D221058DF008BDFBC /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = Sources/WireGuardApp/it.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
5042B6E2E62F7B7537D0EE57 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = Sources/WireGuardApp/de.lproj/Localizable.strings; sourceTree = "<group>"; };
|
6F70E20D221058DF008BDFC3 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = Sources/WireGuardApp/de.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
7872E185E096988E9990CC29 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = Sources/WireGuardApp/fr.lproj/Localizable.strings; sourceTree = "<group>"; };
|
6F70E20D221058DF008BDFB5 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = Sources/WireGuardApp/fr.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
36AFA3DAC2091DD81699B978 /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = Sources/WireGuardApp/fi.lproj/Localizable.strings; sourceTree = "<group>"; };
|
6F70E20D221058DF008BDFBF /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = Sources/WireGuardApp/fi.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
9A06FF3EF8255B77287F0195 /* fa */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fa; path = Sources/WireGuardApp/fa.lproj/Localizable.strings; sourceTree = "<group>"; };
|
6F70E20D221058DF008BDFBE /* fa */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fa; path = Sources/WireGuardApp/fa.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
A7C540D3D2E36084F9AB8A0E /* sl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sl; path = Sources/WireGuardApp/sl.lproj/Localizable.strings; sourceTree = "<group>"; };
|
6F70E20D221058DF008BDFC4 /* sl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sl; path = Sources/WireGuardApp/sl.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
241E007502395B1D0666EE3B /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = Sources/WireGuardApp/pl.lproj/Localizable.strings; sourceTree = "<group>"; };
|
6F70E20D221058DF008BDFB6 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = Sources/WireGuardApp/pl.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
95493F9EF05B71D3B1A5131C /* pa */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pa; path = Sources/WireGuardApp/pa.lproj/Localizable.strings; sourceTree = "<group>"; };
|
6F70E20D221058DF008BDFB9 /* pa */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pa; path = Sources/WireGuardApp/pa.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
C56DE3E0E402E403CA43BF97 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = Sources/WireGuardApp/ko.lproj/Localizable.strings; sourceTree = "<group>"; };
|
6F70E20D221058DF008BDFC1 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = Sources/WireGuardApp/ko.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
5BE8673E6D8166A17C07E2BC /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = Sources/WireGuardApp/ca.lproj/Localizable.strings; sourceTree = "<group>"; };
|
6F70E20D221058DF008BDFB8 /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = Sources/WireGuardApp/ca.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
63ADFB23B4BDD4ECA5B8E84B /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = Sources/WireGuardApp/ru.lproj/Localizable.strings; sourceTree = "<group>"; };
|
6F70E20D221058DF008BDFC0 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = Sources/WireGuardApp/ru.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
47F144079FFBAE33E6A7320E /* ro */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ro; path = Sources/WireGuardApp/ro.lproj/Localizable.strings; sourceTree = "<group>"; };
|
6F70E20D221058DF008BDFBD /* ro */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ro; path = Sources/WireGuardApp/ro.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
C383A8BE821704F21E30AC2A /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = Sources/WireGuardApp/tr.lproj/Localizable.strings; sourceTree = "<group>"; };
|
6F70E20D221058DF008BDFC2 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = Sources/WireGuardApp/tr.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
BD397C79F39F133A747A55BB /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = Sources/WireGuardApp/ja.lproj/Localizable.strings; sourceTree = "<group>"; };
|
6F70E20D221058DF008BDFBB /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = Sources/WireGuardApp/ja.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
88C333FB84302A6942903F37 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Sources/WireGuardApp/es.lproj/Localizable.strings; sourceTree = "<group>"; };
|
6F70E20D221058DF008BDFB7 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Sources/WireGuardApp/es.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
6FE1765921C90E87002690EA /* LocalizationHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalizationHelper.swift; sourceTree = "<group>"; };
|
6FE1765921C90E87002690EA /* LocalizationHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalizationHelper.swift; sourceTree = "<group>"; };
|
||||||
6FE254FA219C10800028284D /* ZipImporter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZipImporter.swift; sourceTree = "<group>"; };
|
6FE254FA219C10800028284D /* ZipImporter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZipImporter.swift; sourceTree = "<group>"; };
|
||||||
6FE254FE219C60290028284D /* ZipExporter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZipExporter.swift; sourceTree = "<group>"; };
|
6FE254FE219C60290028284D /* ZipExporter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZipExporter.swift; sourceTree = "<group>"; };
|
||||||
@@ -1021,8 +1021,8 @@
|
|||||||
knownRegions = (
|
knownRegions = (
|
||||||
Base,
|
Base,
|
||||||
en,
|
en,
|
||||||
zh-Hant,
|
"zh-Hant",
|
||||||
zh-Hans,
|
"zh-Hans",
|
||||||
id,
|
id,
|
||||||
it,
|
it,
|
||||||
de,
|
de,
|
||||||
@@ -1501,24 +1501,24 @@
|
|||||||
6FE1765421C90BBE002690EA /* Localizable.strings */ = {
|
6FE1765421C90BBE002690EA /* Localizable.strings */ = {
|
||||||
isa = PBXVariantGroup;
|
isa = PBXVariantGroup;
|
||||||
children = (
|
children = (
|
||||||
B42B98244F62B9607F9B45CA /* zh-Hant */,
|
6F70E20D221058DF008BDFC6 /* zh-Hant */,
|
||||||
30DA2ED43960DE77912BD89D /* zh-Hans */,
|
6F70E20D221058DF008BDFBA /* zh-Hans */,
|
||||||
2A4344354DDBADE335B5FD2D /* id */,
|
6F70E20D221058DF008BDFC5 /* id */,
|
||||||
B829B6E3BE26C748A53A64EE /* it */,
|
6F70E20D221058DF008BDFBC /* it */,
|
||||||
5042B6E2E62F7B7537D0EE57 /* de */,
|
6F70E20D221058DF008BDFC3 /* de */,
|
||||||
7872E185E096988E9990CC29 /* fr */,
|
6F70E20D221058DF008BDFB5 /* fr */,
|
||||||
36AFA3DAC2091DD81699B978 /* fi */,
|
6F70E20D221058DF008BDFBF /* fi */,
|
||||||
9A06FF3EF8255B77287F0195 /* fa */,
|
6F70E20D221058DF008BDFBE /* fa */,
|
||||||
A7C540D3D2E36084F9AB8A0E /* sl */,
|
6F70E20D221058DF008BDFC4 /* sl */,
|
||||||
241E007502395B1D0666EE3B /* pl */,
|
6F70E20D221058DF008BDFB6 /* pl */,
|
||||||
95493F9EF05B71D3B1A5131C /* pa */,
|
6F70E20D221058DF008BDFB9 /* pa */,
|
||||||
C56DE3E0E402E403CA43BF97 /* ko */,
|
6F70E20D221058DF008BDFC1 /* ko */,
|
||||||
5BE8673E6D8166A17C07E2BC /* ca */,
|
6F70E20D221058DF008BDFB8 /* ca */,
|
||||||
63ADFB23B4BDD4ECA5B8E84B /* ru */,
|
6F70E20D221058DF008BDFC0 /* ru */,
|
||||||
47F144079FFBAE33E6A7320E /* ro */,
|
6F70E20D221058DF008BDFBD /* ro */,
|
||||||
C383A8BE821704F21E30AC2A /* tr */,
|
6F70E20D221058DF008BDFC2 /* tr */,
|
||||||
BD397C79F39F133A747A55BB /* ja */,
|
6F70E20D221058DF008BDFBB /* ja */,
|
||||||
88C333FB84302A6942903F37 /* es */,
|
6F70E20D221058DF008BDFB7 /* es */,
|
||||||
6FE1765521C90BBE002690EA /* Base */,
|
6FE1765521C90BBE002690EA /* Base */,
|
||||||
);
|
);
|
||||||
name = Localizable.strings;
|
name = Localizable.strings;
|
||||||
@@ -1612,6 +1612,7 @@
|
|||||||
CODE_SIGN_ENTITLEMENTS = Sources/WireGuardApp/UI/macOS/WireGuard.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Sources/WireGuardApp/UI/macOS/WireGuard.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Mac Developer";
|
CODE_SIGN_IDENTITY = "Mac Developer";
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
|
ENABLE_HARDENED_RUNTIME = YES;
|
||||||
INFOPLIST_FILE = Sources/WireGuardApp/UI/macOS/Info.plist;
|
INFOPLIST_FILE = Sources/WireGuardApp/UI/macOS/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@@ -1632,6 +1633,7 @@
|
|||||||
CODE_SIGN_ENTITLEMENTS = Sources/WireGuardApp/UI/macOS/WireGuard.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Sources/WireGuardApp/UI/macOS/WireGuard.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Mac Developer";
|
CODE_SIGN_IDENTITY = "Mac Developer";
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
|
ENABLE_HARDENED_RUNTIME = YES;
|
||||||
INFOPLIST_FILE = Sources/WireGuardApp/UI/macOS/Info.plist;
|
INFOPLIST_FILE = Sources/WireGuardApp/UI/macOS/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@@ -1651,6 +1653,7 @@
|
|||||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
|
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
|
||||||
CODE_SIGN_ENTITLEMENTS = Sources/WireGuardNetworkExtension/WireGuardNetworkExtension_macOS.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Sources/WireGuardNetworkExtension/WireGuardNetworkExtension_macOS.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Mac Developer";
|
CODE_SIGN_IDENTITY = "Mac Developer";
|
||||||
|
ENABLE_HARDENED_RUNTIME = YES;
|
||||||
INFOPLIST_FILE = Sources/WireGuardNetworkExtension/Info.plist;
|
INFOPLIST_FILE = Sources/WireGuardNetworkExtension/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@@ -1673,6 +1676,7 @@
|
|||||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
|
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
|
||||||
CODE_SIGN_ENTITLEMENTS = Sources/WireGuardNetworkExtension/WireGuardNetworkExtension_macOS.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Sources/WireGuardNetworkExtension/WireGuardNetworkExtension_macOS.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Mac Developer";
|
CODE_SIGN_IDENTITY = "Mac Developer";
|
||||||
|
ENABLE_HARDENED_RUNTIME = YES;
|
||||||
INFOPLIST_FILE = Sources/WireGuardNetworkExtension/Info.plist;
|
INFOPLIST_FILE = Sources/WireGuardNetworkExtension/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@@ -1759,7 +1763,6 @@
|
|||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
ENABLE_HARDENED_RUNTIME = YES;
|
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
ENABLE_TESTABILITY = YES;
|
ENABLE_TESTABILITY = YES;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
@@ -1827,7 +1830,6 @@
|
|||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
ENABLE_HARDENED_RUNTIME = YES;
|
|
||||||
ENABLE_NS_ASSERTIONS = NO;
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
|
|||||||
@@ -23,11 +23,14 @@ done < Sources/WireGuardApp/Base.lproj/Localizable.strings
|
|||||||
git add Sources/WireGuardApp/*.lproj
|
git add Sources/WireGuardApp/*.lproj
|
||||||
|
|
||||||
declare -A LOCALE_MAP
|
declare -A LOCALE_MAP
|
||||||
|
[[ $(< WireGuard.xcodeproj/project.pbxproj) =~ [[:space:]]([0-9A-F]{24})\ /\*\ Base\ \*/, ]]
|
||||||
|
base_id="${BASH_REMATCH[1]:0:16}"
|
||||||
|
idx=$(( "0x${BASH_REMATCH[1]:16}" ))
|
||||||
while read -r filename; do
|
while read -r filename; do
|
||||||
l="$(basename "$(dirname "$filename")" .lproj)"
|
l="$(basename "$(dirname "$filename")" .lproj)"
|
||||||
[[ $l == Base ]] && continue
|
[[ $l == Base ]] && continue
|
||||||
read -r -n 24 hex < <(LC_ALL=C tr -dc "A-F0-9" < /dev/urandom)
|
((++idx))
|
||||||
LOCALE_MAP["$l"]="$hex"
|
LOCALE_MAP["$l"]="$(printf '%s%08X' "$base_id" $idx)"
|
||||||
done < <(find Sources/WireGuardApp -name Localizable.strings -type f)
|
done < <(find Sources/WireGuardApp -name Localizable.strings -type f)
|
||||||
|
|
||||||
inkr=0 inls=0 inlsc=0
|
inkr=0 inls=0 inlsc=0
|
||||||
@@ -43,6 +46,7 @@ while IFS= read -r line; do
|
|||||||
echo "$line"
|
echo "$line"
|
||||||
printf '\t\t\t\tBase,\n\t\t\t\ten,\n'
|
printf '\t\t\t\tBase,\n\t\t\t\ten,\n'
|
||||||
for l in "${!LOCALE_MAP[@]}"; do
|
for l in "${!LOCALE_MAP[@]}"; do
|
||||||
|
[[ $l == *-* ]] && l="\"$l\""
|
||||||
printf '\t\t\t\t%s,\n' "$l"
|
printf '\t\t\t\t%s,\n' "$l"
|
||||||
done
|
done
|
||||||
inkr=1
|
inkr=1
|
||||||
|
|||||||
Reference in New Issue
Block a user