Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to feed card more links #2388

Merged
merged 11 commits into from Jul 5, 2018
1 change: 1 addition & 0 deletions WMF Framework/CommonStrings.swift
Expand Up @@ -109,6 +109,7 @@ public class CommonStrings: NSObject {
@objc public static let localizedEnableLocationExploreTitle = WMFLocalizedString("explore-enable-location-title", value:"Explore articles near your current location", comment:"Explains that you can explore articles near your current location. \"Location\" should be the same term, which is used in the device settings, under \"Privacy\".")
@objc public static let localizedEnableLocationDescription = WMFLocalizedString("places-enable-location-description", value:"Access to your location is available only when the app or one of its features is visible on your screen.", comment:"Describes that access to your location is only used when the app or one of its features is on the screen")
@objc public static let localizedEnableLocationButtonTitle = WMFLocalizedString("places-enable-location-action-button-title", value:"Enable location", comment:"Button title to enable location access")
@objc public static let nearbyFooterTitle = WMFLocalizedString("home-nearby-footer", value: "More places near your location", comment: "Footer for presenting user option to see longer list of nearby articles.")

@objc public static let readingListLoginSubtitle = WMFLocalizedString("reading-list-login-subtitle", value:"Log in or create an account to allow your saved articles and reading lists to be synced across devices and saved to your user preferences.", comment:"Subtitle explaining that saved articles and reading lists can be synced across Wikipedia apps.")
@objc public static let readingListLoginButtonTitle = WMFLocalizedString("reading-list-login-button-title", value:"Log in to sync your saved articles", comment:"Title for button to login to sync saved articles and reading lists.")
Expand Down
2 changes: 1 addition & 1 deletion Wikipedia/Code/ExploreViewController.swift
Expand Up @@ -407,7 +407,7 @@ class ExploreViewController: ColumnarCollectionViewController, ExploreCardViewCo
cardVC.contentGroup = group
cell.titleLabel.text = group.headerTitle
cell.subtitleLabel.text = group.headerSubTitle
cell.footerButton.setTitle(group.moreTitle, for: .normal)
cell.footerButton.setTitle(group.footerText, for: .normal)
cell.customizationButton.isHidden = !(group.contentGroupKind.isCustomizable || group.contentGroupKind.isGlobal)
cell.apply(theme: theme)
cell.delegate = self
Expand Down
26 changes: 11 additions & 15 deletions Wikipedia/Code/WMFContentGroup+WMFFeedContentDisplaying.m
Expand Up @@ -356,17 +356,17 @@ - (WMFFeedDetailType)detailType {
- (nullable NSString *)footerText {
switch (self.contentGroupKind) {
case WMFContentGroupKindRelatedPages:
return self.moreLikeTitle;
return WMFLocalizedStringWithDefaultValue(@"explore-because-you-read-footer", nil, nil, @"Additional related articles", @"Footer for presenting user option to see longer list of articles related to a previously read article.");
case WMFContentGroupKindLocation: {
if (self.isForToday) {
return WMFLocalizedStringWithDefaultValue(@"home-nearby-footer", nil, nil, @"More from nearby your location", @"Footer for presenting user option to see longer list of nearby articles.");
return [WMFCommonStrings nearbyFooterTitle];
} else {
return [NSString localizedStringWithFormat:WMFLocalizedStringWithDefaultValue(@"home-nearby-location-footer", nil, nil, @"More nearby %1$@", @"Footer for presenting user option to see longer list of articles nearby a specific location. %1$@ will be replaced with the name of the location"), self.placemark.name];
}
}
case WMFContentGroupKindLocationPlaceholder: {
if (self.isForToday) {
return WMFLocalizedStringWithDefaultValue(@"home-nearby-footer", nil, nil, @"More from nearby your location", @"Footer for presenting user option to see longer list of nearby articles.");
return [WMFCommonStrings nearbyFooterTitle];
} else {
return [NSString localizedStringWithFormat:WMFLocalizedStringWithDefaultValue(@"home-nearby-location-footer", nil, nil, @"More nearby %1$@", @"Footer for presenting user option to see longer list of articles nearby a specific location. %1$@ will be replaced with the name of the location"), self.placemark.name];
}
Expand All @@ -377,19 +377,15 @@ - (nullable NSString *)footerText {
return WMFLocalizedStringWithDefaultValue(@"explore-another-random", nil, nil, @"Another random article", @"Displayed on buttons that indicate they would load 'Another random article'");
case WMFContentGroupKindFeaturedArticle:
break;
case WMFContentGroupKindTopRead: {
NSString *dateString = [self localContentDateShortDisplayString];
if (!dateString) {
dateString = @"";
}

return
[NSString localizedStringWithFormat:WMFLocalizedStringWithDefaultValue(@"explore-most-read-footer-for-date", nil, nil, @"All top read articles on %1$@", @"Text which shown on the footer beneath 'Most read articles', which presents a longer list of 'most read' articles for a given date when tapped. %1$@ will be substituted with the date"), dateString];
}
case WMFContentGroupKindTopRead:
return WMFLocalizedStringWithDefaultValue(@"explore-most-read-footer", nil, nil, @"All top read articles", @"Text which shown on the footer beneath 'Most read articles', which presents a longer list of 'most read' articles for a given date when tapped.");
case WMFContentGroupKindNews:
return WMFLocalizedStringWithDefaultValue(@"home-news-footer", nil, nil, @"More in the news", @"Footer for presenting user option to see longer list of news stories.");
case WMFContentGroupKindOnThisDay:
return WMFLocalizedStringWithDefaultValue(@"on-this-day-footer", nil, nil, @"More historical events on this day", @"Footer for presenting user option to see longer list of 'On this day' articles.");
return WMFLocalizedStringWithDefaultValue(@"home-news-footer", nil, nil, @"More current events", @"Footer for presenting user option to see longer list of news stories.");
case WMFContentGroupKindOnThisDay: {
id events = self.fullContent.object;
NSUInteger eventsCount = events && [events respondsToSelector:@selector(count)] ? [events count] : 0;
return [NSString localizedStringWithFormat:WMFLocalizedStringWithDefaultValue(@"on-this-day-footer-with-event-count", nil, nil, @"%1$@ more historical events on this day", @"Footer for presenting user option to see longer list of 'On this day' articles. %1$@ will be substituted with the number of events"), @(eventsCount)];
}
case WMFContentGroupKindUnknown:
default:
break;
Expand Down
9 changes: 5 additions & 4 deletions Wikipedia/Localizations/en.lproj/Localizable.strings
Expand Up @@ -124,6 +124,7 @@
"error-unknown" = "An unknown error occurred";
"explore-another-random" = "Another random article";
"explore-because-you-read" = "Because you read";
"explore-because-you-read-footer" = "Additional related articles";
"explore-continue-reading-heading" = "Continue reading";
"explore-enable-location-title" = "Explore articles near your current location";
"explore-featured-article-heading" = "Featured article";
Expand Down Expand Up @@ -175,7 +176,7 @@
"explore-hide-card-prompt" = "Hide this card";
"explore-main-page-description" = "Main page of Wikimedia projects";
"explore-main-page-heading" = "Today on Wikipedia";
"explore-most-read-footer-for-date" = "All top read articles on $1";
"explore-most-read-footer" = "All top read articles";
"explore-most-read-generic-heading" = "Top read";
"explore-most-read-more-list-title-for-date" = "Top on $1";
"explore-most-read-sub-heading-on-language-wikipedia" = "On $1 Wikipedia";
Expand Down Expand Up @@ -241,9 +242,9 @@
"home-button-popover-title" = "Tap to go home";
"home-button-saved-accessibility-label" = "Wikipedia, return to Saved";
"home-more-like-footer" = "More like $1";
"home-nearby-footer" = "More from nearby your location";
"home-nearby-footer" = "More places near your location";
"home-nearby-location-footer" = "More nearby $1";
"home-news-footer" = "More in the news";
"home-news-footer" = "More current events";
"home-reading-list-prompt" = "Your saved articles can now be organized into reading lists and synced across devices. Log in to allow your reading lists to be saved to your user preferences.";
"home-themes-action-title" = "Manage preferences";
"home-themes-prompt" = "Adjust your Reading preferences including text size and theme from the article tool bar or in your user settings for a more comfortable reading experience.";
Expand Down Expand Up @@ -307,7 +308,7 @@
"number-thousands" = "$1K";
"on-this-day-detail-header-date-range" = "from $1 - $2";
"on-this-day-detail-header-title" = "{{PLURAL:$1|$1 historical event|$1 historical events}}";
"on-this-day-footer" = "More historical events on this day";
"on-this-day-footer-with-event-count" = "$1 more historical events on this day";
"on-this-day-title" = "On this day";
"open-link-cancel" = "Cancel";
"page-edit-history" = "Full edit history";
Expand Down
5 changes: 3 additions & 2 deletions Wikipedia/Localizations/qqq.lproj/Localizable.strings
Expand Up @@ -124,6 +124,7 @@
"error-unknown" = "Message displayed when an unknown error occurred";
"explore-another-random" = "Displayed on buttons that indicate they would load 'Another random article'";
"explore-because-you-read" = "Text for 'Because you read' header";
"explore-because-you-read-footer" = "Footer for presenting user option to see longer list of articles related to a previously read article.";
"explore-continue-reading-heading" = "Text for 'Continue Reading' header";
"explore-enable-location-title" = "Explains that you can explore articles near your current location. \"Location\" should be the same term, which is used in the device settings, under \"Privacy\".";
"explore-featured-article-heading" = "Text for 'Featured article' header";
Expand Down Expand Up @@ -175,7 +176,7 @@
"explore-hide-card-prompt" = "Title of button shown for users to confirm the hiding of a suggestion in the explore feed";
"explore-main-page-description" = "Main page description that shows when the main page lacks a Wikidata description.";
"explore-main-page-heading" = "Text for 'Today on Wikipedia' header";
"explore-most-read-footer-for-date" = "Text which shown on the footer beneath 'Most read articles', which presents a longer list of 'most read' articles for a given date when tapped. $1 will be substituted with the date";
"explore-most-read-footer" = "Text which shown on the footer beneath 'Most read articles', which presents a longer list of 'most read' articles for a given date when tapped.";
"explore-most-read-generic-heading" = "Text for 'Most read articles' explore section header used when no language is present";
"explore-most-read-more-list-title-for-date" = "Title with date for the view displaying longer list of top read articles. $1 will be substituted with the date";
"explore-most-read-sub-heading-on-language-wikipedia" = "Subtext beneath the 'Most read articles' header when describing which specific Wikipedia. $1 will be replaced with the language - for example, 'On English Wikipedia'";
Expand Down Expand Up @@ -307,7 +308,7 @@
"number-thousands" = "$1K - $1 is replaced with a number represented in thousands. In English the letter 'K' is commonly used after a number to indicate that number is in 'thousands'. So the letter 'K' should be changed to a character or short string indicating thousands. For example 500,000 would become 500K. If there is no simple translation for this in the target language, make the translation $1 with no other characters and the full number will be shown.\n{{Identical|$1k}}";
"on-this-day-detail-header-date-range" = "Text for 'On this day' detail view events 'year range' label - $1 is replaced with string version of the oldest event year - i.e. '300 BC', $2 is replaced with string version of the most recent event year - i.e. '2006',";
"on-this-day-detail-header-title" = "Title for 'On this day' detail view - $1 is replaced with the number of historical events which occurred on the given day";
"on-this-day-footer" = "Footer for presenting user option to see longer list of 'On this day' articles.";
"on-this-day-footer-with-event-count" = "Footer for presenting user option to see longer list of 'On this day' articles. $1 will be substituted with the number of events";
"on-this-day-title" = "Title for the 'On this day' feed section";
"open-link-cancel" = "Text for cancel button in popup menu of terms/license link options\n{{Identical|Cancel}}";
"page-edit-history" = "Label for button used to show an article's complete edit history";
Expand Down
Binary file modified Wikipedia/iOS Native Localizations/ar.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/ast.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/bn.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/br.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/bs.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/ca.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/ckb.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/cs.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/da.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/de.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/el.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/en.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/es.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/eu.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/fa.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/fi.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/fr.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/gl.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/he.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/hi.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/hu.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/id.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/is.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/it.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/ja.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/ka.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/kab.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/km.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/ko.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/ksh.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/lb.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/lt.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/mk.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/mr.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/ms.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/my.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/nb.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/ne.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/nl.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/pa.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/pl.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/ps.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/pt-br.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/pt.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/ro.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/ru.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/sah.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/sk.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/sr-EC.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/sv.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/ta.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/th.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/tr.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/uk.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/ur.lproj/Localizable.strings
Binary file not shown.
Binary file modified Wikipedia/iOS Native Localizations/vi.lproj/Localizable.strings
Binary file not shown.
Binary file not shown.
Binary file not shown.