Commit 74dbf60f authored by Rohit Agarwal's avatar Rohit Agarwal Committed by Commit Bot

Update the incognito related strings in the account sign-in flow.

This CL modifies:

a) The incognito button string in the account picker dialog.

b) The title of the incognito interstitial.

c) The content of the incognito interstitial.

d) Formatting the sub-content of the incognito interstitial to bold
wherever needed.

Screenshot: crbug.com/1133288/#c5

Bug: 1133288
Change-Id: I5dd5513bea0afced5bde8f3281f72145116c96fb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2437396
Commit-Queue: Rohit Agarwal <roagarwal@chromium.org>
Reviewed-by: default avatarAlice Wang <aliceywang@chromium.org>
Reviewed-by: default avatarBoris Sazonov <bsazonov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812807}
parent 04263225
...@@ -14,6 +14,6 @@ ...@@ -14,6 +14,6 @@
android:paddingTop="12dp" android:paddingTop="12dp"
android:paddingBottom="12dp" android:paddingBottom="12dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:text="@string/signin_go_incognito" android:text="@string/signin_incognito_button"
android:textAppearance="@style/TextAppearance.TextLarge.Primary" android:textAppearance="@style/TextAppearance.TextLarge.Primary"
app:drawableStartCompat="@drawable/ic_incognito_24dp" /> app:drawableStartCompat="@drawable/ic_incognito_24dp" />
\ No newline at end of file
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
android:orientation="vertical"> android:orientation="vertical">
<org.chromium.ui.widget.TextViewWithLeading <org.chromium.ui.widget.TextViewWithLeading
android:id="@+id/incognito_interstitial_message"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="16dp" android:layout_marginBottom="16dp"
......
...@@ -4,11 +4,15 @@ ...@@ -4,11 +4,15 @@
package org.chromium.chrome.browser.incognito.interstitial; package org.chromium.chrome.browser.incognito.interstitial;
import android.text.style.StyleSpan;
import android.view.View; import android.view.View;
import android.widget.TextView;
import androidx.annotation.MainThread; import androidx.annotation.MainThread;
import org.chromium.chrome.R;
import org.chromium.ui.modelutil.PropertyModelChangeProcessor; import org.chromium.ui.modelutil.PropertyModelChangeProcessor;
import org.chromium.ui.text.SpanApplier;
/** /**
* The coordinator of the incognito interstitial along with IncognitoInterstitialDelegate are the * The coordinator of the incognito interstitial along with IncognitoInterstitialDelegate are the
...@@ -31,9 +35,25 @@ public class IncognitoInterstitialCoordinator { ...@@ -31,9 +35,25 @@ public class IncognitoInterstitialCoordinator {
@MainThread @MainThread
public IncognitoInterstitialCoordinator( public IncognitoInterstitialCoordinator(
View view, IncognitoInterstitialDelegate incognitoInterstitialDelegate) { View view, IncognitoInterstitialDelegate incognitoInterstitialDelegate) {
formatIncognitoInterstitialMessage(view);
IncognitoInterstitialMediator mediator = IncognitoInterstitialMediator mediator =
new IncognitoInterstitialMediator(incognitoInterstitialDelegate); new IncognitoInterstitialMediator(incognitoInterstitialDelegate);
PropertyModelChangeProcessor.create( PropertyModelChangeProcessor.create(
mediator.getModel(), view, IncognitoInterstitialViewBinder::bindView); mediator.getModel(), view, IncognitoInterstitialViewBinder::bindView);
} }
private static void formatIncognitoInterstitialMessage(View incognitoInterstitialView) {
TextView incognitoInterstitialMessageView =
incognitoInterstitialView.findViewById(R.id.incognito_interstitial_message);
String incognitoInterstitialMessageText =
incognitoInterstitialMessageView.getText().toString();
incognitoInterstitialMessageView.setText(
SpanApplier.applySpans(incognitoInterstitialMessageText,
new SpanApplier.SpanInfo(
"<b1>", "</b1>", new StyleSpan(android.graphics.Typeface.BOLD)),
new SpanApplier.SpanInfo(
"<b2>", "</b2>", new StyleSpan(android.graphics.Typeface.BOLD))));
}
} }
...@@ -190,7 +190,7 @@ public class AccountPickerBottomSheetTest { ...@@ -190,7 +190,7 @@ public class AccountPickerBottomSheetTest {
@MediumTest @MediumTest
public void testExpandedSheetShowsWhenBackpressingOnIncognitoInterstitial() { public void testExpandedSheetShowsWhenBackpressingOnIncognitoInterstitial() {
buildAndShowExpandedBottomSheet(); buildAndShowExpandedBottomSheet();
onView(withText(R.string.signin_go_incognito)).perform(click()); onView(withText(R.string.signin_incognito_button)).perform(click());
onView(isRoot()).perform(pressBack()); onView(isRoot()).perform(pressBack());
onView(withText(R.string.signin_account_picker_dialog_title)).check(matches(isDisplayed())); onView(withText(R.string.signin_account_picker_dialog_title)).check(matches(isDisplayed()));
...@@ -433,7 +433,7 @@ public class AccountPickerBottomSheetTest { ...@@ -433,7 +433,7 @@ public class AccountPickerBottomSheetTest {
@MediumTest @MediumTest
public void testIncognitoOptionShownOnExpandedSheet() { public void testIncognitoOptionShownOnExpandedSheet() {
buildAndShowExpandedBottomSheet(); buildAndShowExpandedBottomSheet();
onView(withText(R.string.signin_go_incognito)).perform(click()); onView(withText(R.string.signin_incognito_button)).perform(click());
checkIncognitoInterstitialSheet(); checkIncognitoInterstitialSheet();
} }
...@@ -441,7 +441,7 @@ public class AccountPickerBottomSheetTest { ...@@ -441,7 +441,7 @@ public class AccountPickerBottomSheetTest {
@MediumTest @MediumTest
public void testLearnMoreButtonOnIncognitoInterstitial() { public void testLearnMoreButtonOnIncognitoInterstitial() {
buildAndShowExpandedBottomSheet(); buildAndShowExpandedBottomSheet();
onView(withText(R.string.signin_go_incognito)).perform(click()); onView(withText(R.string.signin_incognito_button)).perform(click());
onView(withId(R.id.incognito_interstitial_learn_more)).perform(click()); onView(withId(R.id.incognito_interstitial_learn_more)).perform(click());
verify(mIncognitoInterstitialDelegateMock).openLearnMorePage(); verify(mIncognitoInterstitialDelegateMock).openLearnMorePage();
} }
...@@ -450,7 +450,7 @@ public class AccountPickerBottomSheetTest { ...@@ -450,7 +450,7 @@ public class AccountPickerBottomSheetTest {
@MediumTest @MediumTest
public void testContinueButtonOnIncognitoInterstitial() { public void testContinueButtonOnIncognitoInterstitial() {
buildAndShowExpandedBottomSheet(); buildAndShowExpandedBottomSheet();
onView(withText(R.string.signin_go_incognito)).perform(click()); onView(withText(R.string.signin_incognito_button)).perform(click());
onView(withId(R.id.incognito_interstitial_continue_button)).perform(click()); onView(withId(R.id.incognito_interstitial_continue_button)).perform(click());
verify(mIncognitoInterstitialDelegateMock).openCurrentUrlInIncognitoTab(); verify(mIncognitoInterstitialDelegateMock).openCurrentUrlInIncognitoTab();
} }
...@@ -465,7 +465,7 @@ public class AccountPickerBottomSheetTest { ...@@ -465,7 +465,7 @@ public class AccountPickerBottomSheetTest {
onView(withId(R.id.account_picker_horizontal_divider)).check(matches(not(isDisplayed()))); onView(withId(R.id.account_picker_horizontal_divider)).check(matches(not(isDisplayed())));
onView(withId(R.id.account_picker_account_list)).check(matches(not(isDisplayed()))); onView(withId(R.id.account_picker_account_list)).check(matches(not(isDisplayed())));
onView(withId(R.id.incognito_interstitial_bottom_sheet_view)).check(matches(isDisplayed())); onView(withId(R.id.incognito_interstitial_bottom_sheet_view)).check(matches(isDisplayed()));
onView(withText(R.string.incognito_interstitial_message)).check(matches(isDisplayed())); onView(withId(R.id.incognito_interstitial_message)).check(matches(isDisplayed()));
onView(withId(R.id.incognito_interstitial_learn_more)).check(matches(isDisplayed())); onView(withId(R.id.incognito_interstitial_learn_more)).check(matches(isDisplayed()));
onView(withId(R.id.incognito_interstitial_continue_button)).check(matches(isDisplayed())); onView(withId(R.id.incognito_interstitial_continue_button)).check(matches(isDisplayed()));
} }
......
...@@ -2475,8 +2475,8 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p ...@@ -2475,8 +2475,8 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
<message name="IDS_SIGNIN_ADD_ACCOUNT_TO_DEVICE" desc="Text for adding another Google Account to device in the web sign-in flow and account picker dialog, users will be asked to add an account to his device when this text is tapped"> <message name="IDS_SIGNIN_ADD_ACCOUNT_TO_DEVICE" desc="Text for adding another Google Account to device in the web sign-in flow and account picker dialog, users will be asked to add an account to his device when this text is tapped">
Add account to device Add account to device
</message> </message>
<message name="IDS_SIGNIN_GO_INCOGNITO" desc="Button text to open the incognito interstitial in the web sign-in account picker bottom sheet"> <message name="IDS_SIGNIN_INCOGNITO_BUTTON" desc="Button text to open the incognito interstitial in the web sign-in account picker bottom sheet">
Go Incognito Open an Incognito tab
</message> </message>
<message name="IDS_SIGNIN_GMS_UPDATING" desc="Message notifying user that Google Play Services is still updating."> <message name="IDS_SIGNIN_GMS_UPDATING" desc="Message notifying user that Google Play Services is still updating.">
Waiting for Google Play Services to finish updating Waiting for Google Play Services to finish updating
...@@ -2484,14 +2484,13 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p ...@@ -2484,14 +2484,13 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
<!-- Strings for Incognito Interstitial. --> <!-- Strings for Incognito Interstitial. -->
<message name="IDS_INCOGNITO_INTERSTITIAL_TITLE" desc="The title of the incognito interstitial bottom sheet."> <message name="IDS_INCOGNITO_INTERSTITIAL_TITLE" desc="The title of the incognito interstitial bottom sheet.">
Go Incognito Use Incognito to sign in
</message> </message>
<message name="IDS_INCOGNITO_INTERSTITIAL_MESSAGE" desc="The content of incognito interstitial which is shown when a user is in the sign-in flow and they want to go incognito mode to sign in temporarily. Before they go incognito mode they would be presented with this incognito interstitial which would inform them about how they can clear sign-in information in incognito, how their activity may be visbile to others and the possibility of cookies and other incognito data being used across other already open incognito tabs."> <message name="IDS_INCOGNITO_INTERSTITIAL_MESSAGE" desc="The content of Incognito interstitial which is shown when a user is in the sign-in flow and they want to go Incognito mode to continue signing in. Before they go Incognito mode they would be presented with an Incognito interstitial and this message is part of that interstitial which would inform how activity in Incognito may be visbile to others and how data from the Incognito session can be cleared.">
To clear your sign-in information and other data from Chrome, close all Incognito tabs. In Incognito, your activity <ph name="BEGIN_BOLD1">&lt;b1&gt;</ph>might still be visible <ph name="END_BOLD1">&lt;/b1&gt;</ph>to websites that you visit, your employer or school, and your internet service provider.
In Incognito, your activity might still be visible to websites that you visit, your employer or school, and your internet service provider. Data from your Incognito session will only be cleared from Chrome when you <ph name="BEGIN_BOLD2">&lt;b2&gt;</ph>close all Incognito tabs<ph name="END_BOLD2">&lt;/b2&gt;</ph>.
</message> </message>
<!-- Strings for Streamlined Signin and Unified Consent. --> <!-- Strings for Streamlined Signin and Unified Consent. -->
<message name="IDS_SIGNIN_TITLE" desc="Title for the screen that asks users to sign-in and turn on Sync. [CHAR-LIMIT=27]"> <message name="IDS_SIGNIN_TITLE" desc="Title for the screen that asks users to sign-in and turn on Sync. [CHAR-LIMIT=27]">
Turn on sync? Turn on sync?
......
93b07d0c04d34fc6715bee5eae9dc3a17cdff2fe e1fcdd2b8b872b3c5daa0255606bfff0f2b8c0ee
\ No newline at end of file \ No newline at end of file
93b07d0c04d34fc6715bee5eae9dc3a17cdff2fe e1fcdd2b8b872b3c5daa0255606bfff0f2b8c0ee
\ No newline at end of file \ No newline at end of file
6b46bdd9d93b289e6c9dae0c8b8c34753e8f5108
\ 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