Commit 1fe4c789 authored by Peter Kotwicz's avatar Peter Kotwicz Committed by Commit Bot

[Android] Rename one of two duplicate IDS_SHOW resource strings

This CL renames IDS_SHOW to IDS_SHOW_CONTENT in
components/component_strings.grd so that
it no longer conflicts with
components/browser_ui/strings/android/browser_ui_strings.grd

I renamed the string as opposed to deleting the copy because the two
strings are used for different purposes.
IDS_SHOW in //components/component_strings.grd is used to toggle hiding
and showing content
IDS_SHOW in
components/browser_ui/strings/android/browser_ui_strings.grd
is used as text in button in a dialog.

BUG=1093825

Change-Id: If77186cd7c52c3cdb0002b05d9c91628421a5ebe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2358770
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799376}
parent ff5d9296
...@@ -825,6 +825,6 @@ public class InstantStartTest { ...@@ -825,6 +825,6 @@ public class InstantStartTest {
waitForView((ViewGroup) mActivityTestRule.getActivity().findViewById( waitForView((ViewGroup) mActivityTestRule.getActivity().findViewById(
R.id.feed_stream_recycler_view), R.id.feed_stream_recycler_view),
allOf(withId(R.id.header_status), allOf(withId(R.id.header_status),
withText(expanded ? R.string.hide : R.string.show))); withText(expanded ? R.string.hide_content : R.string.show_content)));
} }
} }
...@@ -480,7 +480,7 @@ public class FeedNewTabPageTest { ...@@ -480,7 +480,7 @@ public class FeedNewTabPageTest {
ARTICLE_SECTION_HEADER_POSITION, click())); ARTICLE_SECTION_HEADER_POSITION, click()));
waitForView(rootView, waitForView(rootView,
allOf(withId(R.id.header_status), allOf(withId(R.id.header_status),
withText(expanded ? R.string.hide : R.string.show))); withText(expanded ? R.string.hide_content : R.string.show_content)));
} }
private boolean getPreferenceForArticleSectionHeader() throws Exception { private boolean getPreferenceForArticleSectionHeader() throws Exception {
......
...@@ -100,7 +100,8 @@ public class SectionHeaderView extends LinearLayout implements View.OnClickListe ...@@ -100,7 +100,8 @@ public class SectionHeaderView extends LinearLayout implements View.OnClickListe
if (mHeader.isExpandable()) { if (mHeader.isExpandable()) {
if (!mHasMenu) { if (!mHasMenu) {
mStatusView.setText(mHeader.isExpanded() ? R.string.hide : R.string.show); mStatusView.setText(
mHeader.isExpanded() ? R.string.hide_content : R.string.show_content);
} }
setBackgroundResource( setBackgroundResource(
mHeader.isExpanded() ? 0 : R.drawable.hairline_border_card_background); mHeader.isExpanded() ? 0 : R.drawable.hairline_border_card_background);
......
...@@ -544,7 +544,7 @@ public class HomepagePromoTest { ...@@ -544,7 +544,7 @@ public class HomepagePromoTest {
TestThreadUtils.runOnUiThreadBlocking(() -> { TestThreadUtils.runOnUiThreadBlocking(() -> {
waitForView(rootView, waitForView(rootView,
allOf(withId(R.id.header_status), allOf(withId(R.id.header_status),
withText(expanded ? R.string.hide : R.string.show))); withText(expanded ? R.string.hide_content : R.string.show_content)));
}); });
} }
} }
...@@ -362,10 +362,10 @@ ...@@ -362,10 +362,10 @@
Menu Menu
</message> </message>
<if expr="is_android"> <if expr="is_android">
<message name="IDS_SHOW" desc="Generic label to show content for a feature. [CHAR-LIMIT=20]" formatter_data="android_java"> <message name="IDS_SHOW_CONTENT" desc="Generic label to show content for a feature. [CHAR-LIMIT=20]" formatter_data="android_java">
Show Show
</message> </message>
<message name="IDS_HIDE" desc="Generic label to hide content for a feature. [CHAR-LIMIT=20]" formatter_data="android_java"> <message name="IDS_HIDE_CONTENT" desc="Generic label to hide content for a feature. [CHAR-LIMIT=20]" formatter_data="android_java">
Hide Hide
</message> </message>
</if> </if>
......
...@@ -1065,10 +1065,12 @@ LocalizedError::PageState LocalizedError::GetPageState( ...@@ -1065,10 +1065,12 @@ LocalizedError::PageState LocalizedError::GetPageState(
{"offlineContentList", "actionText"}, {"offlineContentList", "actionText"},
base::Value(l10n_util::GetStringUTF16( base::Value(l10n_util::GetStringUTF16(
IDS_ERRORPAGES_OFFLINE_CONTENT_LIST_OPEN_ALL_BUTTON))); IDS_ERRORPAGES_OFFLINE_CONTENT_LIST_OPEN_ALL_BUTTON)));
result.strings.SetPath({"offlineContentList", "showText"}, result.strings.SetPath(
base::Value(l10n_util::GetStringUTF16(IDS_SHOW))); {"offlineContentList", "showText"},
result.strings.SetPath({"offlineContentList", "hideText"}, base::Value(l10n_util::GetStringUTF16(IDS_SHOW_CONTENT)));
base::Value(l10n_util::GetStringUTF16(IDS_HIDE))); result.strings.SetPath(
{"offlineContentList", "hideText"},
base::Value(l10n_util::GetStringUTF16(IDS_HIDE_CONTENT)));
} }
} }
#endif // defined(OS_ANDROID) #endif // defined(OS_ANDROID)
......
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