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 {
waitForView((ViewGroup) mActivityTestRule.getActivity().findViewById(
R.id.feed_stream_recycler_view),
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 {
ARTICLE_SECTION_HEADER_POSITION, click()));
waitForView(rootView,
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 {
......
......@@ -100,7 +100,8 @@ public class SectionHeaderView extends LinearLayout implements View.OnClickListe
if (mHeader.isExpandable()) {
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(
mHeader.isExpanded() ? 0 : R.drawable.hairline_border_card_background);
......
......@@ -544,7 +544,7 @@ public class HomepagePromoTest {
TestThreadUtils.runOnUiThreadBlocking(() -> {
waitForView(rootView,
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 @@
Menu
</message>
<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
</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
</message>
</if>
......
......@@ -1065,10 +1065,12 @@ LocalizedError::PageState LocalizedError::GetPageState(
{"offlineContentList", "actionText"},
base::Value(l10n_util::GetStringUTF16(
IDS_ERRORPAGES_OFFLINE_CONTENT_LIST_OPEN_ALL_BUTTON)));
result.strings.SetPath({"offlineContentList", "showText"},
base::Value(l10n_util::GetStringUTF16(IDS_SHOW)));
result.strings.SetPath({"offlineContentList", "hideText"},
base::Value(l10n_util::GetStringUTF16(IDS_HIDE)));
result.strings.SetPath(
{"offlineContentList", "showText"},
base::Value(l10n_util::GetStringUTF16(IDS_SHOW_CONTENT)));
result.strings.SetPath(
{"offlineContentList", "hideText"},
base::Value(l10n_util::GetStringUTF16(IDS_HIDE_CONTENT)));
}
}
#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