diff --git a/iphone/Maps/UI/Discovery/MWMDiscoveryCityGalleryObjects.h b/iphone/Maps/UI/Discovery/MWMDiscoveryCityGalleryObjects.h index db4b225f12..c8346fab53 100644 --- a/iphone/Maps/UI/Discovery/MWMDiscoveryCityGalleryObjects.h +++ b/iphone/Maps/UI/Discovery/MWMDiscoveryCityGalleryObjects.h @@ -8,6 +8,7 @@ NS_ASSUME_NONNULL_BEGIN - (promo::CityGallery::Item const &)galleryItemAtIndex:(NSUInteger)index; - (NSUInteger)count; - (nullable NSURL *)moreURL; +- (NSString *)tagString; @end diff --git a/iphone/Maps/UI/Discovery/MWMDiscoveryCityGalleryObjects.mm b/iphone/Maps/UI/Discovery/MWMDiscoveryCityGalleryObjects.mm index 9d148feb33..d4192d41ec 100644 --- a/iphone/Maps/UI/Discovery/MWMDiscoveryCityGalleryObjects.mm +++ b/iphone/Maps/UI/Discovery/MWMDiscoveryCityGalleryObjects.mm @@ -32,4 +32,8 @@ return nil; } +- (NSString *)tagString { + return @(m_results.m_category.c_str()); +} + @end diff --git a/iphone/Maps/UI/Discovery/MWMDiscoveryTableManager.mm b/iphone/Maps/UI/Discovery/MWMDiscoveryTableManager.mm index 491a3ac8c9..d200c622ac 100644 --- a/iphone/Maps/UI/Discovery/MWMDiscoveryTableManager.mm +++ b/iphone/Maps/UI/Discovery/MWMDiscoveryTableManager.mm @@ -228,7 +228,7 @@ using namespace discovery; MWMDiscoveryGuideCollectionHolderCell *cell = (MWMDiscoveryGuideCollectionHolderCell *) [self.tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]; MWMDiscoveryCollectionView *collection = (MWMDiscoveryCollectionView *)cell.collectionView; - [cell config]; + [cell config:L(@"gallery_pp_download_guides_title")]; collection.delegate = self; collection.dataSource = self; collection.itemType = ItemType::Promo; diff --git a/iphone/Maps/UI/Discovery/Table Cells/Holders/DiscoveryCollectionHolderCell.swift b/iphone/Maps/UI/Discovery/Table Cells/Holders/DiscoveryCollectionHolderCell.swift index f3d5d38366..5d088838c4 100644 --- a/iphone/Maps/UI/Discovery/Table Cells/Holders/DiscoveryCollectionHolderCell.swift +++ b/iphone/Maps/UI/Discovery/Table Cells/Holders/DiscoveryCollectionHolderCell.swift @@ -31,8 +31,8 @@ final class DiscoveryBookingCollectionHolderCell: DiscoveryCollectionHolder { @objc(MWMDiscoveryGuideCollectionHolderCell) final class DiscoveryGuideCollectionHolderCell: DiscoveryCollectionHolder { - @objc func config() { - header.text = L("gallery_pp_download_guides_title").uppercased() + @objc func config(_ title: String) { + header.text = title.uppercased() collectionView.register(cellClass: DiscoveryGuideCell.self) collectionView.register(cellClass: DiscoveryMoreCell.self) } diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/MWMPlacePageLayout.mm b/iphone/Maps/UI/PlacePage/PlacePageLayout/MWMPlacePageLayout.mm index 0b4e6bca6a..8d4374126a 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageLayout/MWMPlacePageLayout.mm +++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/MWMPlacePageLayout.mm @@ -658,7 +658,8 @@ std::map const kMetaInfoCells = { MWMDiscoveryGuideCollectionHolderCell *cell = (MWMDiscoveryGuideCollectionHolderCell *) [tableView dequeueReusableCellWithCellClass:cls indexPath:indexPath]; MWMDiscoveryCollectionView *collection = (MWMDiscoveryCollectionView *)cell.collectionView; - [cell config]; + [cell config:[NSString stringWithCoreFormat:L(@"pp_discovery_place_related_tag_header") + arguments:@[self.data.promoGallery.tagString]]]; collection.delegate = self; collection.dataSource = self; collection.itemType = discovery::ItemType::Promo;