Commit 713f9f68 authored by Vincent Boisselle's avatar Vincent Boisselle Committed by Commit Bot

Add the 'by Google' suffix when the search engine isn't Google

Bug: 1082469
Change-Id: I6f6c82d2d0f0fa4173d2b8d7ae0242b7bcc51773
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2199912
Commit-Queue: Vincent Boisselle <vincb@google.com>
Reviewed-by: default avatarDan H <harringtond@chromium.org>
Cr-Commit-Position: refs/heads/master@{#768565}
parent f45aff4b
...@@ -311,12 +311,19 @@ class FeedSurfaceMediator ...@@ -311,12 +311,19 @@ class FeedSurfaceMediator
/** Returns the section header text based on the selected default search engine */ /** Returns the section header text based on the selected default search engine */
private String getSectionHeaderText(boolean isExpanded) { private String getSectionHeaderText(boolean isExpanded) {
Resources res = mCoordinator.getSectionHeaderView().getResources(); Resources res = mCoordinator.getSectionHeaderView().getResources();
final boolean isDefaultSearchEngineGoogle =
TemplateUrlServiceFactory.get().isDefaultSearchEngineGoogle();
final int sectionHeaderStringId; final int sectionHeaderStringId;
if (mHasHeaderMenu) { if (mHasHeaderMenu) {
sectionHeaderStringId = if (isDefaultSearchEngineGoogle) {
isExpanded ? R.string.ntp_discover_on : R.string.ntp_discover_off; sectionHeaderStringId =
isExpanded ? R.string.ntp_discover_on : R.string.ntp_discover_off;
} else {
sectionHeaderStringId = isExpanded ? R.string.ntp_discover_on_branded
: R.string.ntp_discover_off_branded;
}
} else { } else {
sectionHeaderStringId = TemplateUrlServiceFactory.get().isDefaultSearchEngineGoogle() sectionHeaderStringId = isDefaultSearchEngineGoogle
? R.string.ntp_article_suggestions_section_header ? R.string.ntp_article_suggestions_section_header
: R.string.ntp_article_suggestions_section_header_branded; : R.string.ntp_article_suggestions_section_header_branded;
} }
......
...@@ -2296,9 +2296,15 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p ...@@ -2296,9 +2296,15 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
<message name="IDS_NTP_DISCOVER_ON" desc="Title in the feed header when the feed is turned on. Please use the branded term for Discover, as listed under Product Names in the Google Glossary Manager."> <message name="IDS_NTP_DISCOVER_ON" desc="Title in the feed header when the feed is turned on. Please use the branded term for Discover, as listed under Product Names in the Google Glossary Manager.">
Discover Discover
</message> </message>
<message name="IDS_NTP_DISCOVER_ON_BRANDED" desc="Title in the feed header when the feed is turned on and the default search engine is not Google. Please use the branded term for Discover, as listed under Product Names in the Google Glossary Manager.">
Discover by Google
</message>
<message name="IDS_NTP_DISCOVER_OFF" desc="Title in the feed header when the feed is turned off. Please use the branded term for Discover, as listed under Product Names in the Google Glossary Manager."> <message name="IDS_NTP_DISCOVER_OFF" desc="Title in the feed header when the feed is turned off. Please use the branded term for Discover, as listed under Product Names in the Google Glossary Manager.">
Discover - off Discover - off
</message> </message>
<message name="IDS_NTP_DISCOVER_OFF_BRANDED" desc="Title in the feed header when the feed is turned off and the default search engine is not Google. Please use the branded term for Discover, as listed under Product Names in the Google Glossary Manager.">
Discover by Google - off
</message>
<message name="IDS_NTP_FEED_MENU_IPH" desc="In-product help that points at the menu icon for the news feed on Chrome's new tab page. This string instructs the user to open the menu for settings that let them control the content that appears on the feed."> <message name="IDS_NTP_FEED_MENU_IPH" desc="In-product help that points at the menu icon for the news feed on Chrome's new tab page. This string instructs the user to open the menu for settings that let them control the content that appears on the feed.">
Control your stories here Control your stories here
</message> </message>
......
6d53a2dc9c3ba2634d8156b88f073787e1cc7aba
\ No newline at end of file
4a7689dcd1ae24f51641a887c6c024e5571077e2
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment