Brion VIBBER has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/88164


Change subject: Added license info to details page for already uploaded images.
......................................................................

Added license info to details page for already uploaded images.

Change-Id: Ie1e9326fdb1b10407a364f53abbeb7ded22dd097
---
M Commons-iOS.xcodeproj/project.pbxproj
M Commons-iOS/AspectFillThumbFetcher.m
A Commons-iOS/CategoryLicenseExtractor.h
A Commons-iOS/CategoryLicenseExtractor.m
M Commons-iOS/DetailScrollViewController.h
M Commons-iOS/DetailScrollViewController.m
M Commons-iOS/en.lproj/MainStoryboard.storyboard
M Commons-iOS/messages/messages-en.json
M Commons-iOS/messages/messages-qqq.json
9 files changed, 183 insertions(+), 64 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/commons 
refs/changes/64/88164/1

diff --git a/Commons-iOS.xcodeproj/project.pbxproj 
b/Commons-iOS.xcodeproj/project.pbxproj
index 97b355c..07c631c 100644
--- a/Commons-iOS.xcodeproj/project.pbxproj
+++ b/Commons-iOS.xcodeproj/project.pbxproj
@@ -21,6 +21,7 @@
                04739E0E174F0D3600F32D13 /* WhatIsCommonsViewController.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 04739E0D174F0D3500F32D13 /* 
WhatIsCommonsViewController.m */; };
                0478F8E91731B5EA007D4531 /* WelcomeOverlayView.m in Sources */ 
= {isa = PBXBuildFile; fileRef = 0478F8E81731B5EA007D4531 /* 
WelcomeOverlayView.m */; };
                048C8B9F17FB71520082EB28 /* categoryHamburger.png in Resources 
*/ = {isa = PBXBuildFile; fileRef = 048C8B9E17FB71520082EB28 /* 
categoryHamburger.png */; };
+               048C8BA217FC903A0082EB28 /* CategoryLicenseExtractor.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 048C8BA117FC903A0082EB28 /* 
CategoryLicenseExtractor.m */; };
                04A02DA9177502AF00A392C1 /* GalleryMultiSelectAssetCell.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 04A02DA8177502AF00A392C1 /* 
GalleryMultiSelectAssetCell.m */; };
                04A0F33B17AACF7F004AB164 /* ImageResizer.m in Sources */ = {isa 
= PBXBuildFile; fileRef = 04A0F33A17AACF7F004AB164 /* ImageResizer.m */; };
                04A386E617CEFA2F00BC0A3D /* UIView+Debugging.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 04A386E517CEFA2F00BC0A3D /* UIView+Debugging.m 
*/; };
@@ -360,6 +361,8 @@
                0478F8E71731B5E9007D4531 /* WelcomeOverlayView.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
WelcomeOverlayView.h; sourceTree = "<group>"; };
                0478F8E81731B5EA007D4531 /* WelcomeOverlayView.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= WelcomeOverlayView.m; sourceTree = "<group>"; };
                048C8B9E17FB71520082EB28 /* categoryHamburger.png */ = {isa = 
PBXFileReference; lastKnownFileType = image.png; name = categoryHamburger.png; 
path = "Commons-iOS/categoryHamburger.png"; sourceTree = SOURCE_ROOT; };
+               048C8BA017FC903A0082EB28 /* CategoryLicenseExtractor.h */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
path = CategoryLicenseExtractor.h; sourceTree = "<group>"; };
+               048C8BA117FC903A0082EB28 /* CategoryLicenseExtractor.m */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = CategoryLicenseExtractor.m; sourceTree = "<group>"; };
                04A02DA7177502AF00A392C1 /* GalleryMultiSelectAssetCell.h */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
path = GalleryMultiSelectAssetCell.h; sourceTree = "<group>"; };
                04A02DA8177502AF00A392C1 /* GalleryMultiSelectAssetCell.m */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = GalleryMultiSelectAssetCell.m; sourceTree = 
"<group>"; };
                04A0F33917AACF7F004AB164 /* ImageResizer.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
ImageResizer.h; sourceTree = "<group>"; };
@@ -825,6 +828,8 @@
                                04DC756E1758884200D92849 /* CustomTextField.m 
*/,
                                04DC75611758682900D92849 /* 
AspectFillThumbFetcher.h */,
                                04DC75621758682A00D92849 /* 
AspectFillThumbFetcher.m */,
+                               048C8BA017FC903A0082EB28 /* 
CategoryLicenseExtractor.h */,
+                               048C8BA117FC903A0082EB28 /* 
CategoryLicenseExtractor.m */,
                                04DC756417586EFE00D92849 /* 
PictureOfTheDayImageView.h */,
                                04DC756517586EFE00D92849 /* 
PictureOfTheDayImageView.m */,
                                04C27B1A174452E700B1942F /* DescriptionParser.h 
*/,
@@ -1634,6 +1639,7 @@
                                044A0C3C170F6504003395DD /* GradientButton.m in 
Sources */,
                                3067546F170FF9D900A4BD8F /* 
SettingsViewController.m in Sources */,
                                305BC76A1710BD3300B2CC01 /* LoadingIndicator.m 
in Sources */,
+                               048C8BA217FC903A0082EB28 /* 
CategoryLicenseExtractor.m in Sources */,
                                D4C5B4191720966C00C40532 /* 
LicenseTableViewController.m in Sources */,
                                D4B1CDFD1721E248008E1B31 /* 
CategorySearchTableViewController.m in Sources */,
                                0478F8E91731B5EA007D4531 /* 
WelcomeOverlayView.m in Sources */,
diff --git a/Commons-iOS/AspectFillThumbFetcher.m 
b/Commons-iOS/AspectFillThumbFetcher.m
index 8e37524..669b7d4 100644
--- a/Commons-iOS/AspectFillThumbFetcher.m
+++ b/Commons-iOS/AspectFillThumbFetcher.m
@@ -9,6 +9,7 @@
 #import "MWPromise.h"
 #import "DescriptionParser.h"
 #import "MWI18N.h"
+#import "CategoryLicenseExtractor.h"
 
 #pragma mark - Private
 
@@ -40,7 +41,7 @@
 
 @implementation AspectFillThumbFetcher{
     DescriptionParser *descriptionParser_;
-    NSDictionary *commonLicenses_;
+    CategoryLicenseExtractor *categoryLicenseExtractor_;
 }
 
 - (id)init
@@ -54,7 +55,7 @@
         self.getTitle = nil;
         self.getGenerator = nil;
         descriptionParser_ = [[DescriptionParser alloc] init];
-        commonLicenses_ = [self getLicenses];
+        categoryLicenseExtractor_ = [[CategoryLicenseExtractor alloc] init];
     }
     return self;
 }
@@ -226,10 +227,10 @@
                     dataToCache[@"description"] = [self 
getDescriptionFromJson:result];
                     
                     // Cache the license (check categories for license)
-                    NSString *license = [self 
getLicenseFromCategories:dataToCache[@"categories"]];
+                    NSString *license = [categoryLicenseExtractor_ 
getLicenseFromCategories:dataToCache[@"categories"]];
                     if (license) {
                         dataToCache[@"license"] = license;
-                        dataToCache[@"licenseurl"] = commonLicenses_[license];
+                        dataToCache[@"licenseurl"] = 
[categoryLicenseExtractor_ getURLForLicense:license];
                     }
 
                     [dataToCache 
addEntriesFromDictionary:self.extraDataToCache];
@@ -319,52 +320,6 @@
     }
     if (description == nil) description = [@"" mutableCopy];
     return description;
-}
-
-#pragma mark - Licenses
-
--(NSString *)getLicenseFromCategories:(NSMutableArray *)categories
-{
-    // Sort the license names to be looked for by descending length
-    // (prevents unwanted substring matches in the loop below)
-    NSArray *licenseNamesSortedByDescendingLength = [[commonLicenses_ allKeys] 
sortedArrayUsingComparator:^NSComparisonResult(NSString* a, NSString* b) {
-        return (a.length > b.length) ? NO : YES;
-    }];
-
-    // Look at each category checking whether it begins with the name of a 
common license
-    for (NSString *license in licenseNamesSortedByDescendingLength) {
-        for (NSString *category in categories) {
-            NSRange foundRange = [category rangeOfString:license 
options:NSCaseInsensitiveSearch];
-            //if(foundRange.location != NSNotFound){
-            if(foundRange.location == 0){
-                return license;
-            }
-        }
-    }
-    return nil;
-}
-
--(NSDictionary *)getLicenses
-{
-    return @{
-             @"cc-by-sa-3.0" :       
@"//creativecommons.org/licenses/by-sa/3.0/",
-             @"cc-by-sa-3.0-at" :    
@"//creativecommons.org/licenses/by-sa/3.0/at/",
-             @"cc-by-sa-3.0-de" :    
@"//creativecommons.org/licenses/by-sa/3.0/de/",
-             @"cc-by-sa-3.0-ee" :    
@"//creativecommons.org/licenses/by-sa/3.0/ee/",
-             @"cc-by-sa-3.0-es" :    
@"//creativecommons.org/licenses/by-sa/3.0/es/",
-             @"cc-by-sa-3.0-hr" :    
@"//creativecommons.org/licenses/by-sa/3.0/hr/",
-             @"cc-by-sa-3.0-lu" :    
@"//creativecommons.org/licenses/by-sa/3.0/lu/",
-             @"cc-by-sa-3.0-nl" :    
@"//creativecommons.org/licenses/by-sa/3.0/nl/",
-             @"cc-by-sa-3.0-no" :    
@"//creativecommons.org/licenses/by-sa/3.0/no/",
-             @"cc-by-sa-3.0-pl" :    
@"//creativecommons.org/licenses/by-sa/3.0/pl/",
-             @"cc-by-sa-3.0-ro" :    
@"//creativecommons.org/licenses/by-sa/3.0/ro/",
-             @"cc-by-3.0" :          @"//creativecommons.org/licenses/by/3.0/",
-             @"cc-zero" :            
@"//creativecommons.org/publicdomain/zero/1.0/",
-             @"cc-by-sa-2.5" :       
@"//creativecommons.org/licenses/by-sa/2.5/",
-             @"cc-by-2.5" :          @"//creativecommons.org/licenses/by/2.5/",
-             @"cc-by-sa-2.0" :       
@"//creativecommons.org/licenses/by-sa/2.0/",
-             @"cc-by-2.0" :          @"//creativecommons.org/licenses/by/2.0/"
-             };
 }
 
 #pragma mark - JSON
diff --git a/Commons-iOS/CategoryLicenseExtractor.h 
b/Commons-iOS/CategoryLicenseExtractor.h
new file mode 100644
index 0000000..2321ebf
--- /dev/null
+++ b/Commons-iOS/CategoryLicenseExtractor.h
@@ -0,0 +1,14 @@
+//
+//  CategoryLicenseExtractor.h
+//  Commons-iOS
+//
+//  Created by Monte Hurd on 10/2/13.
+
+#import <Foundation/Foundation.h>
+
+@interface CategoryLicenseExtractor : NSObject
+
+-(NSString *)getLicenseFromCategories:(NSMutableArray *)categories;
+-(NSString *)getURLForLicense:(NSString *)license;
+
+@end
diff --git a/Commons-iOS/CategoryLicenseExtractor.m 
b/Commons-iOS/CategoryLicenseExtractor.m
new file mode 100644
index 0000000..f12a03f
--- /dev/null
+++ b/Commons-iOS/CategoryLicenseExtractor.m
@@ -0,0 +1,71 @@
+//
+//  CategoryLicenseExtractor.m
+//  Commons-iOS
+//
+//  Created by Monte Hurd on 10/2/13.
+
+#import "CategoryLicenseExtractor.h"
+
+@implementation CategoryLicenseExtractor{
+    NSDictionary *commonLicenses_;
+}
+
+- (id)init
+{
+    self = [super init];
+    if (self) {
+        commonLicenses_ = [self getLicenses];
+    }
+    return self;
+}
+
+-(NSString *)getLicenseFromCategories:(NSMutableArray *)categories
+{
+    // Sort the license names to be looked for by descending length
+    // (prevents unwanted substring matches in the loop below)
+    NSArray *licenseNamesSortedByDescendingLength = [[commonLicenses_ allKeys] 
sortedArrayUsingComparator:^NSComparisonResult(NSString* a, NSString* b) {
+        return (a.length > b.length) ? NO : YES;
+    }];
+
+    // Look at each category checking whether it begins with the name of a 
common license
+    for (NSString *license in licenseNamesSortedByDescendingLength) {
+        for (NSString *category in categories) {
+            NSRange foundRange = [category rangeOfString:license 
options:NSCaseInsensitiveSearch];
+            //if(foundRange.location != NSNotFound){
+            if(foundRange.location == 0){
+                return license;
+            }
+        }
+    }
+    return nil;
+}
+
+-(NSDictionary *)getLicenses
+{
+    return @{
+             @"cc-by-sa-3.0" :       
@"//creativecommons.org/licenses/by-sa/3.0/",
+             @"cc-by-sa-3.0-at" :    
@"//creativecommons.org/licenses/by-sa/3.0/at/",
+             @"cc-by-sa-3.0-de" :    
@"//creativecommons.org/licenses/by-sa/3.0/de/",
+             @"cc-by-sa-3.0-ee" :    
@"//creativecommons.org/licenses/by-sa/3.0/ee/",
+             @"cc-by-sa-3.0-es" :    
@"//creativecommons.org/licenses/by-sa/3.0/es/",
+             @"cc-by-sa-3.0-hr" :    
@"//creativecommons.org/licenses/by-sa/3.0/hr/",
+             @"cc-by-sa-3.0-lu" :    
@"//creativecommons.org/licenses/by-sa/3.0/lu/",
+             @"cc-by-sa-3.0-nl" :    
@"//creativecommons.org/licenses/by-sa/3.0/nl/",
+             @"cc-by-sa-3.0-no" :    
@"//creativecommons.org/licenses/by-sa/3.0/no/",
+             @"cc-by-sa-3.0-pl" :    
@"//creativecommons.org/licenses/by-sa/3.0/pl/",
+             @"cc-by-sa-3.0-ro" :    
@"//creativecommons.org/licenses/by-sa/3.0/ro/",
+             @"cc-by-3.0" :          @"//creativecommons.org/licenses/by/3.0/",
+             @"cc-zero" :            
@"//creativecommons.org/publicdomain/zero/1.0/",
+             @"cc-by-sa-2.5" :       
@"//creativecommons.org/licenses/by-sa/2.5/",
+             @"cc-by-2.5" :          @"//creativecommons.org/licenses/by/2.5/",
+             @"cc-by-sa-2.0" :       
@"//creativecommons.org/licenses/by-sa/2.0/",
+             @"cc-by-2.0" :          @"//creativecommons.org/licenses/by/2.0/"
+             };
+}
+
+-(NSString *)getURLForLicense:(NSString *)license
+{
+    return commonLicenses_[license];
+}
+
+@end
diff --git a/Commons-iOS/DetailScrollViewController.h 
b/Commons-iOS/DetailScrollViewController.h
index c8958f5..dd18ff0 100644
--- a/Commons-iOS/DetailScrollViewController.h
+++ b/Commons-iOS/DetailScrollViewController.h
@@ -44,7 +44,9 @@
 @property (weak, nonatomic) IBOutlet UILabel *categoryLabel;
 @property (weak, nonatomic) IBOutlet UILabel *categoryListLabel;
 @property (weak, nonatomic) IBOutlet UILabel *addCategoryLabel;
-@property (weak, nonatomic) IBOutlet UILabelDynamicHeight 
*categoryLoadingMsgLabel;
+
+@property (weak, nonatomic) IBOutlet UILabelDynamicHeight 
*categoryDefaultLabel;
+@property (weak, nonatomic) IBOutlet UILabelDynamicHeight *licenseDefaultLabel;
 
 @property (weak, nonatomic) IBOutlet UIView *titleContainer;
 @property (weak, nonatomic) IBOutlet UIView *descriptionContainer;
diff --git a/Commons-iOS/DetailScrollViewController.m 
b/Commons-iOS/DetailScrollViewController.m
index 9b86d0d..5f0058c 100644
--- a/Commons-iOS/DetailScrollViewController.m
+++ b/Commons-iOS/DetailScrollViewController.m
@@ -21,6 +21,7 @@
 #import "OpenInBrowserActivity.h"
 #import "UIView+Debugging.h"
 #import "UILabelDynamicHeight.h"
+#import "CategoryLicenseExtractor.h"
 
 #define URL_IMAGE_LICENSE @"https://creativecommons.org/licenses/by-sa/3.0/";
 
@@ -66,6 +67,8 @@
     UIPanGestureRecognizer *detailsPanRecognizer_;
     CFTimeInterval timeLastDetailsPan_;
     CFTimeInterval timeLastCategoryPan_;
+    CategoryLicenseExtractor *categoryLicenseExtractor_;
+    NSURL *licenseURL_;
 }
 
 #pragma mark - Init / dealloc
@@ -74,11 +77,13 @@
 {
     self = [super initWithCoder:coder];
     if (self) {
+        categoryLicenseExtractor_ = [[CategoryLicenseExtractor alloc] init];
         descriptionParser_ = [[DescriptionParser alloc] init];
         isFirstAppearance_ = YES;
         navBackgroundView_ = nil;
         viewAboveBackground_ = nil;
         viewBelowBackground_ = nil;
+        licenseURL_ = nil;
         self.categoriesNeedToBeRefreshed = NO;
         timeLastDetailsPan_ = CACurrentMediaTime();
         timeLastCategoryPan_ = CACurrentMediaTime();
@@ -223,11 +228,17 @@
     self.licenseContainer.backgroundColor = containerColor;
     self.categoryContainer.backgroundColor = containerColor;
     
+    // Show "Loading..." label for licenses
+    self.licenseDefaultLabel.text = [MWMessage 
forKey:@"details-license-loading"].text;
+
+    // Style the licenseDefaultLabel
+    [self styleDetailsLabel:self.licenseDefaultLabel];
+    
     [self configureForSelectedRecord];
     [self configureHideKeyboardButton];
 
     // Apply the style used by category labels to the category "Loading..." 
placeholder
-    [self styleCategoryLabel:self.categoryLoadingMsgLabel];
+    [self styleDetailsLabel:self.categoryDefaultLabel];
 
     //[self.view randomlyColorSubviews];
 }
@@ -410,7 +421,7 @@
         // Get categories and description
         if (record.complete.boolValue) {
             self.descriptionTextLabel.text = [MWMessage 
forKey:@"details-description-loading"].text;
-            self.categoryLoadingMsgLabel.text = [MWMessage 
forKey:@"details-category-loading"].text;
+            self.categoryDefaultLabel.text = [MWMessage 
forKey:@"details-category-loading"].text;
 
             dispatch_async(dispatch_get_main_queue(), ^(void) {
                 [self getPreviouslySavedDescriptionForRecord:record];
@@ -418,6 +429,10 @@
             });
         }else{
             [self updateCategoryContainer];
+            
+
+// new pic! add list of licenses to be chosen from here
+
         }
 
         dispatch_async(dispatch_get_main_queue(), ^(void) {
@@ -443,7 +458,6 @@
                 self.descriptionLabel.hidden = NO;
                 
                 // fixme: load license info from wiki page
-                self.licenseLabel.hidden = YES;
                 self.licenseNameLabel.hidden = YES;
                 self.ccByImage.hidden = YES;
                 self.ccSaImage.hidden = YES;
@@ -466,7 +480,6 @@
                 
                 self.descriptionLabel.hidden = NO;
                 self.descriptionPlaceholder.hidden = (record.desc.length > 0);
-                self.licenseLabel.hidden = NO;
                 self.licenseNameLabel.hidden = NO;
                 self.ccByImage.hidden = NO;
                 self.ccSaImage.hidden = NO;
@@ -887,6 +900,39 @@
     }];
 }
 
+#pragma mark - License retrieval
+
+- (void)getPreviouslySavedLicenseFromCategories:(NSMutableArray *)categories
+{
+    // Replaces "loading..." message in licenseDefaultLabel with name of 
license or "Tap for license"
+    // message if no license found. If no license found makes "Tap for 
license" actually link to the
+    // image's wiki page.
+    
+    // Extract license from categories now that categories have been retrieved
+    NSString *license = [categoryLicenseExtractor_ 
getLicenseFromCategories:categories];
+    
+//license = nil;
+    
+    // If license was name was not retrieved change it to say "Tap for 
License" for now
+    if (license == nil){
+        license = [MWMessage forKey:@"picture-of-day-tap-for-license"].text;
+        
+        UITapGestureRecognizer *licenseTapGesture = [[UITapGestureRecognizer 
alloc] initWithTarget:self action:@selector(handleLicenseTap:)];
+        [self.licenseDefaultLabel addGestureRecognizer:licenseTapGesture];
+        
+        // Get the wiki url for the image
+        NSString *pageTitle = [@"File:" 
stringByAppendingString:self.selectedRecord.title];
+        NSURL *wikiUrl = [CommonsApp.singleton URLForWikiPage:pageTitle];
+        licenseURL_ = wikiUrl;
+    }else{
+        licenseURL_ = [NSURL URLWithString:[categoryLicenseExtractor_ 
getURLForLicense:license]];
+        license = [license uppercaseString];
+    }
+
+    // Update licenseDefaultLabel to show name of found license
+    self.licenseDefaultLabel.text = license;
+}
+
 #pragma mark - Category retrieval
 
 - (void)getPreviouslySavedCategoriesForRecord:(FileUpload *)record
@@ -933,6 +979,18 @@
         self.categoryListLabel.text = [self categoryShortList];
 //        [self.tableView reloadData];
     }];
+    
+    [req always:^(id obj) {
+        // Get license (extract from the categories for now)
+        [self getPreviouslySavedLicenseFromCategories:self.categoryList];
+    }];
+}
+
+-(void)handleLicenseTap:(UITapGestureRecognizer *)recognizer
+{
+    [CommonsApp.singleton openURLWithDefaultBrowser:licenseURL_];
+
+    NSLog(@"LICENSE TAPPED, GO TO THIS URL = %@", licenseURL_);
 }
 
 #pragma mark - Category layout
@@ -945,7 +1003,7 @@
     NSMutableArray *categoryLabels = [[NSMutableArray alloc] init];
 
     // No longer need the "Loading..." category placeholder
-    [self.categoryLoadingMsgLabel removeFromSuperview];
+    [self.categoryDefaultLabel removeFromSuperview];
 
     // Every view which gets constrained by this method is also created by 
this method
     // with the exeption of self.categoryLabel. This means views created here 
can be
@@ -981,7 +1039,7 @@
         UILabelDynamicHeight *label = [[UILabelDynamicHeight alloc] 
initWithFrame:CGRectZero];
         label.translatesAutoresizingMaskIntoConstraints = NO;
         label.text = categoryString;
-        [self styleCategoryLabel:label];
+        [self styleDetailsLabel:label];
         [self.categoryContainer addSubview:label];
         [categoryLabels addObject:label];
 
@@ -1039,7 +1097,7 @@
     [self.categoryContainer layoutIfNeeded];
 }
 
--(void)styleCategoryLabel:(UILabelDynamicHeight *)label
+-(void)styleDetailsLabel:(UILabelDynamicHeight *)label
 {
     [label setFont:[UIFont systemFontOfSize:14.0f]];
     label.textColor = [UIColor whiteColor];
diff --git a/Commons-iOS/en.lproj/MainStoryboard.storyboard 
b/Commons-iOS/en.lproj/MainStoryboard.storyboard
index cd09b8e..0fc202f 100644
--- a/Commons-iOS/en.lproj/MainStoryboard.storyboard
+++ b/Commons-iOS/en.lproj/MainStoryboard.storyboard
@@ -1231,8 +1231,8 @@
                         <rect key="frame" x="0.0" y="0.0" width="320" 
height="480"/>
                         <autoresizingMask key="autoresizingMask" 
flexibleMaxX="YES" flexibleMaxY="YES"/>
                         <subviews>
-                            <view contentMode="scaleToFill" misplaced="YES" 
translatesAutoresizingMaskIntoConstraints="NO" id="ehb-uI-yRM" 
userLabel="Scroll Container">
-                                <rect key="frame" x="0.0" y="-330" width="320" 
height="531"/>
+                            <view contentMode="scaleToFill" 
translatesAutoresizingMaskIntoConstraints="NO" id="ehb-uI-yRM" 
userLabel="Scroll Container">
+                                <rect key="frame" x="0.0" y="0.0" width="320" 
height="556"/>
                                 <autoresizingMask key="autoresizingMask" 
widthSizable="YES" heightSizable="YES"/>
                                 <subviews>
                                     <view contentMode="scaleToFill" 
translatesAutoresizingMaskIntoConstraints="NO" id="jhZ-zd-ki7" userLabel="Title 
Container">
@@ -1333,7 +1333,7 @@
                                         </constraints>
                                     </view>
                                     <view contentMode="scaleToFill" 
translatesAutoresizingMaskIntoConstraints="NO" id="0OK-Zl-28Q" 
userLabel="License Container">
-                                        <rect key="frame" x="20" y="356" 
width="280" height="61"/>
+                                        <rect key="frame" x="20" y="356" 
width="280" height="86"/>
                                         <autoresizingMask 
key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <subviews>
                                             <label opaque="NO" 
clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" 
horizontalCompressionResistancePriority="751" text="License          " 
lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" 
adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="240" 
translatesAutoresizingMaskIntoConstraints="NO" id="myN-TB-iEG">
@@ -1343,17 +1343,27 @@
                                                 <color key="textColor" 
cocoaTouchSystemColor="darkTextColor"/>
                                                 <color key="highlightedColor" 
white="1" alpha="1" colorSpace="calibratedWhite"/>
                                             </label>
+                                            <label opaque="NO" 
clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" 
horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" 
lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" 
adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="240" 
translatesAutoresizingMaskIntoConstraints="NO" id="LS9-Wd-TxX" 
userLabel="Default Label" customClass="UILabelDynamicHeight">
+                                                <rect key="frame" x="20" 
y="49" width="240" height="17"/>
+                                                <autoresizingMask 
key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                <fontDescription 
key="fontDescription" type="system" pointSize="14"/>
+                                                <color key="textColor" 
white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                                <nil key="highlightedColor"/>
+                                            </label>
                                         </subviews>
                                         <color key="backgroundColor" 
white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
                                         <constraints>
+                                            <constraint 
firstAttribute="trailing" secondItem="LS9-Wd-TxX" secondAttribute="trailing" 
constant="20" symbolic="YES" id="3IO-iz-5W1"/>
+                                            <constraint 
firstAttribute="bottom" secondItem="LS9-Wd-TxX" secondAttribute="bottom" 
constant="20" symbolic="YES" id="563-j8-Z25"/>
                                             <constraint firstItem="myN-TB-iEG" 
firstAttribute="top" secondItem="0OK-Zl-28Q" secondAttribute="top" 
constant="20" symbolic="YES" id="Mgr-4o-3b3"/>
+                                            <constraint firstItem="LS9-Wd-TxX" 
firstAttribute="top" secondItem="myN-TB-iEG" secondAttribute="bottom" 
constant="8" symbolic="YES" id="Ofm-wF-usc"/>
                                             <constraint firstItem="myN-TB-iEG" 
firstAttribute="leading" secondItem="0OK-Zl-28Q" secondAttribute="leading" 
constant="20" symbolic="YES" id="WVq-O5-9lt"/>
                                             <constraint 
firstAttribute="trailing" secondItem="myN-TB-iEG" secondAttribute="trailing" 
constant="20" symbolic="YES" id="e3q-FH-Ufn"/>
-                                            <constraint 
firstAttribute="bottom" secondItem="myN-TB-iEG" secondAttribute="bottom" 
constant="20" symbolic="YES" id="kB2-Fl-roG" userLabel="Vertical Space - 
License Container - Label - License"/>
+                                            <constraint firstItem="LS9-Wd-TxX" 
firstAttribute="leading" secondItem="0OK-Zl-28Q" secondAttribute="leading" 
constant="20" symbolic="YES" id="xhY-l5-kTp"/>
                                         </constraints>
                                     </view>
                                     <view contentMode="scaleToFill" 
translatesAutoresizingMaskIntoConstraints="NO" id="fx9-U5-jNG" 
userLabel="Category Container">
-                                        <rect key="frame" x="20" y="425" 
width="280" height="86"/>
+                                        <rect key="frame" x="20" y="450" 
width="280" height="86"/>
                                         <autoresizingMask 
key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                         <subviews>
                                             <label opaque="NO" 
clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" 
horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Categories" 
lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" 
adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="240" 
translatesAutoresizingMaskIntoConstraints="NO" id="jUg-Wa-cMl">
@@ -1413,8 +1423,8 @@
                     <nil key="simulatedBottomBarMetrics"/>
                     <connections>
                         <outlet property="categoryContainer" 
destination="fx9-U5-jNG" id="e2I-cl-ZSs"/>
+                        <outlet property="categoryDefaultLabel" 
destination="dyF-FO-sE1" id="OXj-iy-LDf"/>
                         <outlet property="categoryLabel" 
destination="jUg-Wa-cMl" id="8yR-OG-vWN"/>
-                        <outlet property="categoryLoadingMsgLabel" 
destination="dyF-FO-sE1" id="nwo-Ty-SsO"/>
                         <outlet property="descriptionContainer" 
destination="ChD-4f-cDJ" id="Kag-oJ-QIL"/>
                         <outlet property="descriptionLabel" 
destination="CZQ-bf-MDt" id="5Ys-xU-tlY"/>
                         <outlet property="descriptionPlaceholder" 
destination="7ez-E3-hMg" id="Lmn-FU-s50"/>
@@ -1422,6 +1432,7 @@
                         <outlet property="descriptionTextView" 
destination="rwu-hG-Nxi" id="SXN-Wq-k7I"/>
                         <outlet property="descriptionTextViewHeightConstraint" 
destination="tRZ-n3-B8e" id="Pnb-HI-0nD"/>
                         <outlet property="licenseContainer" 
destination="0OK-Zl-28Q" id="uC5-C8-e8R"/>
+                        <outlet property="licenseDefaultLabel" 
destination="LS9-Wd-TxX" id="D6n-Fy-sNz"/>
                         <outlet property="licenseLabel" 
destination="myN-TB-iEG" id="Fg9-q8-CZA"/>
                         <outlet property="scrollContainer" 
destination="ehb-uI-yRM" id="ENZ-Y8-UOx"/>
                         <outlet property="titleContainer" 
destination="jhZ-zd-ki7" id="ZIb-2a-ay0"/>
diff --git a/Commons-iOS/messages/messages-en.json 
b/Commons-iOS/messages/messages-en.json
index e900c54..890e7d0 100644
--- a/Commons-iOS/messages/messages-en.json
+++ b/Commons-iOS/messages/messages-en.json
@@ -48,6 +48,7 @@
     "details-description-loading": "Loading...",
     "details-description-none-found": "No Description Found",
     "details-license-label": "License",
+    "details-license-loading": "Loading...",
     "details-hide-keyboard": "Hide Keyboard",
     "details-category-label": "Categories",
     "details-category-select": "Select...",
diff --git a/Commons-iOS/messages/messages-qqq.json 
b/Commons-iOS/messages/messages-qqq.json
index 75e0047..f022264 100644
--- a/Commons-iOS/messages/messages-qqq.json
+++ b/Commons-iOS/messages/messages-qqq.json
@@ -48,6 +48,7 @@
     "details-description-loading": "Loading message for description on photo 
details.\n{{Identical|Loading}}",
     "details-description-none-found": "No description found message for photo 
details.",
     "details-license-label": "Label for license selector/display field on 
photo details.\n{{Identical|License}}",
+    "details-license-loading": "Loading message for license on photo details.",
     "details-hide-keyboard": "Button text for hiding the image description 
keyboard on the image Details page",
     "details-category-label": "Label for category selector fiel on the image 
Details page. Next to this is a short list of selected 
categories.\n{{Identical|Category}}",
     "details-category-select": "Placeholder for category short list on image 
detail page when no categories are present. Should be short and encourage 
tapping to open the category selector.\n{{Identical|Select}}",

-- 
To view, visit https://gerrit.wikimedia.org/r/88164
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1e9326fdb1b10407a364f53abbeb7ded22dd097
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/commons
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER <[email protected]>
Gerrit-Reviewer: Mhurd <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to