Dr0ptp4kt has submitted this change and it was merged.
Change subject: Fix for RTL lang bracket problem in About page license links.
......................................................................
Fix for RTL lang bracket problem in About page license links.
Fix for "licence" typo.
Change-Id: I019e25eebbb10b5dc123a994ca88cb281fe02e15
---
M wikipedia/View Controllers/About/AboutViewController.m
M wikipedia/View Controllers/About/AboutViewController.plist
2 files changed, 17 insertions(+), 12 deletions(-)
Approvals:
Dr0ptp4kt: Verified; Looks good to me, approved
Fjalapeno: Looks good to me, but someone else must approve
diff --git a/wikipedia/View Controllers/About/AboutViewController.m
b/wikipedia/View Controllers/About/AboutViewController.m
index 7855c81..1e4de7a 100644
--- a/wikipedia/View Controllers/About/AboutViewController.m
+++ b/wikipedia/View Controllers/About/AboutViewController.m
@@ -30,7 +30,7 @@
static NSString* const kWMFLibrariesKey = @"libraries";
static NSString* const kWMFLibraryNameKey = @"Name";
static NSString* const kWMFLibraryURLKey = @"Source URL";
-static NSString* const kWMFLibraryLicenseTextKey = @"Licence Text";
+static NSString* const kWMFLibraryLicenseTextKey = @"License Text";
static NSString* const kWMFLicenseScheme = @"wmflicense";
static NSString* const kWMFLicenseRedirectScheme = @"about";
@@ -182,12 +182,17 @@
NSString* licenseLink = [[self class]
linkHTMLForURLString:licenseURLPath
title:MWLocalizedString(@"about-libraries-license", nil)];
- return [sourceLink stringByAppendingFormat:@" (%@)", licenseLink];
+ return [sourceLink stringByAppendingString:[self
createRTLCompatibleLicenseLink:licenseLink]];
}];
return [libraries componentsJoinedByString:@", "];
}
+-(NSString *)createRTLCompatibleLicenseLink:(NSString *)licenseLink
+{
+ // See: http://stackoverflow.com/a/7931735
+ return [NSString stringWithFormat:@" (%@)‎", licenseLink];
+}
-(NSString *)repositoryLinks
{
@@ -215,12 +220,12 @@
#pragma mark - License Search
-- (NSString*)licenceTextForLicenseURL:(NSURL*)licenseURL{
+- (NSString*)licenseTextForLicenseURL:(NSURL*)licenseURL{
- return [self licenceTextForLibraryName:[licenseURL host]];
+ return [self licenseTextForLibraryName:[licenseURL host]];
}
-- (NSString*)licenceTextForLibraryName:(NSString*)libraryName{
+- (NSString*)licenseTextForLibraryName:(NSString*)libraryName{
NSString* license = [self.podLibraryLicenses bk_match:^BOOL(NSString* key,
NSString* license) {
@@ -334,7 +339,7 @@
if([[self class] isLicenseURL:requestURL]){
- NSString* licenseText = [self licenceTextForLicenseURL:requestURL];
+ NSString* licenseText = [self licenseTextForLicenseURL:requestURL];
[self.webView loadHTMLString:licenseText baseURL:nil];
return NO;
diff --git a/wikipedia/View Controllers/About/AboutViewController.plist
b/wikipedia/View Controllers/About/AboutViewController.plist
index fe8b897..cff3415 100644
--- a/wikipedia/View Controllers/About/AboutViewController.plist
+++ b/wikipedia/View Controllers/About/AboutViewController.plist
@@ -27,7 +27,7 @@
<string>WikiFont</string>
<key>Source URL</key>
<string>https://github.com/munmay/WikiFont</string>
- <key>Licence Text</key>
+ <key>License Text</key>
<string>Copyright (c) 2014, github.com/munmay
All rights reserved.
@@ -58,7 +58,7 @@
<string>Hpple</string>
<key>Source URL</key>
<string>https://github.com/topfunky/hpple</string>
- <key>Licence Text</key>
+ <key>License Text</key>
<string>pod install</string>
</dict>
<dict>
@@ -66,7 +66,7 @@
<string>NSDate-Extensions</string>
<key>Source URL</key>
<string>https://github.com/erica/NSDate-Extensions</string>
- <key>Licence Text</key>
+ <key>License Text</key>
<string>Copyright (c) 2015, Erica Sadun
All rights reserved.
@@ -97,7 +97,7 @@
<string>AFNetworking</string>
<key>Source URL</key>
<string>https://github.com/AFNetworking/AFNetworking</string>
- <key>Licence Text</key>
+ <key>License Text</key>
<string>pod install</string>
</dict>
<dict>
@@ -105,7 +105,7 @@
<string>CocoaPods</string>
<key>Source URL</key>
<string>https://github.com/CocoaPods/CocoaPods</string>
- <key>Licence Text</key>
+ <key>License Text</key>
<string>This project is licensed under the MIT license.
Copyright (c) 2011 - 2014 Eloy DurĂ¡n <[email protected]>
@@ -134,7 +134,7 @@
<string>BlocksKit</string>
<key>Source URL</key>
<string>https://github.com/zwaldowski/BlocksKit</string>
- <key>Licence Text</key>
+ <key>License Text</key>
<string>pod install</string>
</dict>
</array>
--
To view, visit https://gerrit.wikimedia.org/r/190124
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I019e25eebbb10b5dc123a994ca88cb281fe02e15
Gerrit-PatchSet: 4
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd <[email protected]>
Gerrit-Reviewer: Bgerstle <[email protected]>
Gerrit-Reviewer: Dr0ptp4kt <[email protected]>
Gerrit-Reviewer: Fjalapeno <[email protected]>
Gerrit-Reviewer: Mhurd <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits