Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ooni/probe-ios into issues/2524
Browse files Browse the repository at this point in the history
  • Loading branch information
aanorbel committed Oct 19, 2023
2 parents 22a26c9 + 9602f41 commit 762ae61
Show file tree
Hide file tree
Showing 17 changed files with 1,230 additions and 171 deletions.
6 changes: 6 additions & 0 deletions ooniprobe.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@
7A8CB0952ADDDAC1005AB2BC /* libssl.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = libssl.xcframework; path = Pods/libssl/libssl.xcframework; sourceTree = "<group>"; };
7A8CB0962ADDDAC1005AB2BC /* libtor.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = libtor.xcframework; path = Pods/libtor/libtor.xcframework; sourceTree = "<group>"; };
7A8CB0972ADDDAC1005AB2BC /* libz.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = libz.xcframework; path = Pods/libz/libz.xcframework; sourceTree = "<group>"; };
79AA093C2A86E44400C23E27 /* vi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = vi; path = vi.lproj/Localizable.strings; sourceTree = "<group>"; };
79AA093D2A86E47600C23E27 /* my */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = my; path = my.lproj/Localizable.strings; sourceTree = "<group>"; };
7AED19802A6EC9A2003B265A /* libresolv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libresolv.tbd; path = usr/lib/libresolv.tbd; sourceTree = SDKROOT; };
7AED19822A6EC9C7003B265A /* libresolv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libresolv.tbd; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/lib/libresolv.tbd; sourceTree = DEVELOPER_DIR; };
AC948DA31A71FB931BBB1BB3 /* Pods-OONIProbeUnitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OONIProbeUnitTests.debug.xcconfig"; path = "Target Support Files/Pods-OONIProbeUnitTests/Pods-OONIProbeUnitTests.debug.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1322,6 +1324,8 @@
ro,
nl,
sw,
vi,
my,
);
mainGroup = D4A2F5D01A6C3244001B8460;
productRefGroup = D4A2F5DA1A6C3244001B8460 /* Products */;
Expand Down Expand Up @@ -1725,6 +1729,8 @@
ED4ACEDA24A1F22000421FB9 /* ro */,
EDF3B9A326EFA2F700E5F72F /* nl */,
EDF3B9A426EFA30300E5F72F /* sw */,
79AA093C2A86E44400C23E27 /* vi */,
79AA093D2A86E47600C23E27 /* my */,
);
name = Localizable.strings;
sourceTree = "<group>";
Expand Down
100 changes: 52 additions & 48 deletions ooniprobe/Languages.plist
Original file line number Diff line number Diff line change
@@ -1,52 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ar</key>
<string>العربية</string>
<key>ca</key>
<string>Català</string>
<key>de</key>
<string>Deutsch</string>
<key>el</key>
<string>Ελληνικά</string>
<key>es</key>
<string>Español</string>
<key>en</key>
<string>English</string>
<key>fa</key>
<string>فارسی</string>
<key>fr</key>
<string>Français</string>
<key>hi</key>
<string>हिन्दी</string>
<key>id</key>
<string>Indonesia</string>
<key>is</key>
<string>Icelandic</string>
<key>it</key>
<string>Italiano</string>
<key>nl</key>
<string>Nederlands</string>
<key>pt_BR</key>
<string>Português</string>
<key>ro</key>
<string>Română</string>
<key>ru</key>
<string>Pусский</string>
<key>sw</key>
<string>Kiswahili</string>
<key>sk</key>
<string>Slovenčina</string>
<key>sq</key>
<string>Albanian</string>
<key>th</key>
<string>ไทย</string>
<key>tr</key>
<string>Türkçe</string>
<key>zh_CN</key>
<string>中文 (S)</string>
<key>zh_TW</key>
<string>中文 (T)</string>
</dict>
<dict>
<key>my</key>
<string>မြန်မာ</string>
<key>vi</key>
<string>Tiếng Việt</string>
<key>ar</key>
<string>العربية</string>
<key>ca</key>
<string>Català</string>
<key>de</key>
<string>Deutsch</string>
<key>el</key>
<string>Ελληνικά</string>
<key>es</key>
<string>Español</string>
<key>en</key>
<string>English</string>
<key>fa</key>
<string>فارسی</string>
<key>fr</key>
<string>Français</string>
<key>hi</key>
<string>हिन्दी</string>
<key>id</key>
<string>Indonesia</string>
<key>is</key>
<string>Icelandic</string>
<key>it</key>
<string>Italiano</string>
<key>nl</key>
<string>Nederlands</string>
<key>pt_BR</key>
<string>Português</string>
<key>ro</key>
<string>Română</string>
<key>ru</key>
<string>Pусский</string>
<key>sw</key>
<string>Kiswahili</string>
<key>sk</key>
<string>Slovenčina</string>
<key>sq</key>
<string>Albanian</string>
<key>th</key>
<string>ไทย</string>
<key>tr</key>
<string>Türkçe</string>
<key>zh_CN</key>
<string>中文 (S)</string>
<key>zh_TW</key>
<string>中文 (T)</string>
</dict>
</plist>
28 changes: 17 additions & 11 deletions ooniprobe/View/OONIRun/OoniRunViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -149,17 +149,23 @@ - (void)showTestScreen{
if ([urlsObj isKindOfClass:[NSArray class]] && [(NSArray*)urlsObj count] > 0){
[self validateAndAddURLs];
}
}
//then load view
if ([urls count] > 0){
self.tableView.estimatedRowHeight = 44.0;
self.tableView.rowHeight = UITableViewAutomaticDimension;
[self.tableView setHidden:NO];
[self.randomlistLabel setHidden:YES];
//reloading the view with new parameters.
dispatch_async(dispatch_get_main_queue(), ^{
[self.tableView reloadData];
});

//then load view
if ([urls count] > 0){
self.tableView.estimatedRowHeight = 44.0;
self.tableView.rowHeight = UITableViewAutomaticDimension;
[self.tableView setHidden:NO];
[self.randomlistLabel setHidden:YES];
//reloading the view with new parameters.
dispatch_async(dispatch_get_main_queue(), ^{
[self.tableView reloadData];
});
} else {
[self.tableView setHidden:YES];
[self.randomlistLabel setText:NSLocalizedString(@"OONIRun.RandomSamplingOfURLs", nil)];
[self.randomlistLabel setHidden:NO];
}

}
// This condition will only be true if a test arguments were passed to the app
// but could not be processed to extract URLs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,7 @@ -(void)viewWillAppear:(BOOL)animated{
}

-(void)reloadConstraints{
CGFloat uploadConstraint = 0;
if ([RunningTest currentTest].isTestRunning){
uploadConstraint += 64;
}
CGFloat uploadConstraint = 64;
dispatch_async(dispatch_get_main_queue(), ^{
self.uploadBarFooterConstraint.constant = uploadConstraint;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ -(void)viewWillAppear:(BOOL)animated{
}

-(void)reloadConstraints{
CGFloat uploadConstraint = 0;
if ([RunningTest currentTest].isTestRunning){
uploadConstraint += 64;
}
CGFloat uploadConstraint = 64;
dispatch_async(dispatch_get_main_queue(), ^{
self.uploadBarFooterConstraint.constant = uploadConstraint;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ -(IBAction)reRun{
}

-(void)reloadConstraints{
CGFloat uploadConstraint = 0;
if ([RunningTest currentTest].isTestRunning){
uploadConstraint += 64;
}
CGFloat uploadConstraint = 64;
dispatch_async(dispatch_get_main_queue(), ^{
self.uploadBarFooterConstraint.constant = uploadConstraint;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,7 @@ -(void)viewWillAppear:(BOOL)animated{
}

-(void)reloadConstraints{
CGFloat uploadConstraint = 0;
if ([RunningTest currentTest].isTestRunning){
uploadConstraint += 64;
}
CGFloat uploadConstraint = 64;
dispatch_async(dispatch_get_main_queue(), ^{
self.uploadBarFooterConstraint.constant = uploadConstraint;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ -(void)viewWillAppear:(BOOL)animated{
}

-(void)reloadConstraints{
CGFloat uploadConstraint = 0;
if ([RunningTest currentTest].isTestRunning){
uploadConstraint += 64;
}
CGFloat uploadConstraint = 64;
dispatch_async(dispatch_get_main_queue(), ^{
self.uploadBarFooterConstraint.constant = uploadConstraint;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ -(void)viewWillAppear:(BOOL)animated{
}

-(void)reloadConstraints{
CGFloat uploadConstraint = 0;
if ([RunningTest currentTest].isTestRunning){
uploadConstraint += 64;
}
CGFloat uploadConstraint = 64;
dispatch_async(dispatch_get_main_queue(), ^{
self.uploadBarFooterConstraint.constant = uploadConstraint;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ -(void)reloadFooter{
[self.scrollView setNeedsUpdateConstraints];
}
else {
self.scrollViewFooterConstraint.constant = 0;
self.scrollViewFooterConstraint.constant = 64;
[self.scrollView setNeedsUpdateConstraints];
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ -(void)viewWillAppear:(BOOL)animated{
}

-(void)reloadConstraints{
CGFloat uploadConstraint = 0;
if ([RunningTest currentTest].isTestRunning){
uploadConstraint += 64;
}
CGFloat uploadConstraint = 64;
dispatch_async(dispatch_get_main_queue(), ^{
self.uploadBarFooterConstraint.constant = uploadConstraint;
});
Expand Down
10 changes: 7 additions & 3 deletions ooniprobe/View/TestResults/Rows/TestResultTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ -(void)setResult:(Result*)result{
[self rowCircumvention:result];
}
else if ([result.test_group_name isEqualToString:@"experimental"]){
[self rowExperimental];
[self rowExperimental:result];
}
}

Expand Down Expand Up @@ -203,9 +203,13 @@ -(void)rowMiddleBoxes:(Result*)result __deprecated{
}
}

-(void)rowExperimental{
-(void)rowExperimental:(Result*)result{
long totalMeasurements = [result totalMeasurements];
[self.label2 setText:[NSString stringWithFormat:@"%@ %@", @(totalMeasurements), @"measured"]];
[self.label2 setTextColor:[UIColor colorNamed:@"color_gray9"]];
[self.image2 setImage:[UIImage imageNamed:@"tab_test_results"]];
[self.stackView1 setHidden:YES];
[self.stackView2 setHidden:YES];
[self.stackView2 setHidden:NO];
[self.stackView3 setHidden:YES];
}

Expand Down
12 changes: 6 additions & 6 deletions ooniprobe/id.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -390,17 +390,17 @@
"Settings.Proxy.Enabled" = "Proksi";
"Settings.Proxy.None" = "Tidak ada";
"Settings.Proxy.Psiphon" = "Psiphon";
"Settings.Proxy.Custom" = "Custom Proxy";
"Settings.Proxy.Custom.Value" = "Custom Proxy URL";
"Settings.Proxy.Custom.Protocol" = "Custom proxy protocol";
"Settings.Proxy.Custom" = "Proxy Custom";
"Settings.Proxy.Custom.Value" = "URL Proxy Custom";
"Settings.Proxy.Custom.Protocol" = "Protokol Proxy Custom";
"Settings.Proxy.Custom.Connection" = "Koneksi";
"Settings.Proxy.Custom.Hostname" = "Nama host";
"Settings.Proxy.Custom.Port" = "Port";
"Settings.Proxy.Custom.Credentials" = "Credentials (optional)";
"Settings.Proxy.Custom.Credentials" = "Kredensial (opsional)";
"Settings.Proxy.Custom.Username" = "Nama pengguna";
"Settings.Proxy.Custom.Password" = "Kata sandi";
"Settings.Proxy.Psiphon.Over.Custom" = "Use Psiphon over custom proxy";
"Settings.Proxy.Footer" = "Are you unable to use OONI Probe? Try enabling [Psiphon](https://psiphon.ca/) to circumvent potential OONI Probe blocking. Alternatively, you can use a custom proxy.";
"Settings.Proxy.Psiphon.Over.Custom" = "Gunakan Psiphon melalui proxy khusus";
"Settings.Proxy.Footer" = "Apakah anda tidak dapat menggunakan OONI Probe? Coba nyalakan [Psiphon](https://psiphon.ca/) untuk mengelabuhi pemblokiran OONI Probe. Anda juga dapat menggunakan proxy khusus untuk mengelabuhi.";
"Settings.Websites.MaxRuntimeEnabled" = "Batas durasi tes";
"Settings.Websites.MaxRuntime" = "Durasi tes";
"Settings.Websites.Categories.Label" = "Kategori laman yang akan dites";
Expand Down
Loading

0 comments on commit 762ae61

Please sign in to comment.