Commit a8eae41b authored by Jordy Greenblatt's avatar Jordy Greenblatt Committed by Commit Bot

[CrOS MultiDevice]: Beta versions of all strings in settings ui main page

Change-Id: I0389ed2168472e524a126d263bd30a52602cdb7e
Reviewed-on: https://chromium-review.googlesource.com/1102880
Commit-Queue: Jordy Greenblatt <jordynass@chromium.org>
Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568141}
parent c6c7cdfc
...@@ -4113,11 +4113,26 @@ ...@@ -4113,11 +4113,26 @@
Better Together (Beta) Better Together (Beta)
</message> </message>
<message name="IDS_SETTINGS_MULTIDEVICE_SETUP_SUMMARY" desc="Description of the idea that the user can get a better experience on their Chromebook by connecting it to their phone." translateable="false"> <message name="IDS_SETTINGS_MULTIDEVICE_SETUP_SUMMARY" desc="Description of the idea that the user can get a better experience on their Chromebook by connecting it to their phone." translateable="false">
Your Chromebook works better with your phone. (Beta) Your Chromebook works better with your phone. (Beta) &lt;a target="_blank" href="<ph name="URL">$1<ex>https://google.com/</ex></ph>"&gt;Learn more.&lt;/a&gt;
</message>
<message name="IDS_SETTINGS_MULTIDEVICE_VERIFICATION_TEXT" desc="Text to tell user that their Chromebook needs to verify that it can connect with their phone." translateable="false">
Waiting for verification. (Beta) &lt;a target="_blank" href="<ph name="URL">$1<ex>https://google.com/</ex></ph>"&gt;Learn more.&lt;/a&gt;
</message>
<message name="IDS_SETTINGS_MULTIDEVICE_COULD_NOT_CONNECT" desc="Text to tell user that their Chromebook could not connect to their phone while it was trying to set up multidevice features." translateable="false">
Could not connect to phone. (Beta) &lt;a target="_blank" href="<ph name="URL">$1<ex>https://google.com/</ex></ph>"&gt;Learn more.&lt;/a&gt;
</message> </message>
<message name="IDS_SETTINGS_MULTIDEVICE_SETUP_BUTTON" desc="Label of the button that opens a menu to the user that allows them to set up a connection between the user's phone and their Chromebook to give them access to special features."> <message name="IDS_SETTINGS_MULTIDEVICE_SETUP_BUTTON" desc="Label of the button that opens a menu to the user that allows them to set up a connection between the user's phone and their Chromebook to give them access to special features.">
Set up Set up
</message> </message>
<message name="IDS_SETTINGS_MULTIDEVICE_VERIFY_BUTTON" desc="Label for the button to get the Chromebook to verify that it can connect with their phone." translateable="false">
Verify
</message>
<message name="IDS_SETTINGS_MULTIDEVICE_ENABLED" desc="Text to tell user multidevice features are enabled">
Enabled
</message>
<message name="IDS_SETTINGS_MULTIDEVICE_DISABLED" desc="Text to tell user multidevice features are disabled">
Disabled
</message>
<message name="IDS_SETTINGS_MULTIDEVICE_SMS_CONNECT" desc="Name of a feature. This feature lets the user read and reply to text messages from their Chromebook. New text messages will appear as notifications."> <message name="IDS_SETTINGS_MULTIDEVICE_SMS_CONNECT" desc="Name of a feature. This feature lets the user read and reply to text messages from their Chromebook. New text messages will appear as notifications.">
SMS Connect SMS Connect
</message> </message>
......
...@@ -13,14 +13,8 @@ ...@@ -13,14 +13,8 @@
<div class="settings-box two-line first"> <div class="settings-box two-line first">
<div class="start"> <div class="start">
[[getLabelText_(mode)]] [[getLabelText_(mode)]]
<div class="secondary" id="multideviceSummary"> <div class="secondary" id="multideviceSummary"
[[getSubLabelText_(mode)]] inner-h-t-m-l="[[getSubLabelInnerHtml_(mode)]]">
<template is="dom-if"
if="[[shouldShowLearnMoreLink_(mode)]]" restamp>
<a href="chrome://foo-bar-multidevice-help-page" target="_blank">
$i18n{learnMore}.
</a>
</template>
</div> </div>
</div> </div>
<div class="separator"></div> <div class="separator"></div>
......
...@@ -37,6 +37,15 @@ Polymer({ ...@@ -37,6 +37,15 @@ Polymer({
type: Number, type: Number,
value: settings.MultiDeviceSettingsMode.NO_HOST_SET, value: settings.MultiDeviceSettingsMode.NO_HOST_SET,
}, },
// TODO(jordynass): Set this variable once the information is retrieved from
// multidevice setup service.
/**
* @type {boolean|undefined}
* If a host has been verified, this is true if that host is and enabled and
* false if it is disabled. Otherwise it is undefined.
*/
hostEnabled: Boolean,
}, },
/** /**
...@@ -51,22 +60,20 @@ Polymer({ ...@@ -51,22 +60,20 @@ Polymer({
}, },
/** /**
* @return {string} Translated sublabel. * @return {string} Translated sublabel with a "learn more" link.
* @private * @private
*/ */
getSubLabelText_: function() { getSubLabelInnerHtml_: function() {
switch (this.mode) { switch (this.mode) {
case settings.MultiDeviceSettingsMode.NO_HOST_SET: case settings.MultiDeviceSettingsMode.NO_HOST_SET:
return this.i18n('multideviceSetupSummary'); return this.i18nAdvanced('multideviceSetupSummary');
case settings.MultiDeviceSettingsMode.HOST_SET_WAITING_FOR_SERVER: case settings.MultiDeviceSettingsMode.HOST_SET_WAITING_FOR_SERVER:
// TODO(jordynass): Replace this with the real "Retry" string return this.i18nAdvanced('multideviceCouldNotConnect');
return 'Retry Placeholder';
case settings.MultiDeviceSettingsMode.HOST_SET_WAITING_FOR_VERIFICATION: case settings.MultiDeviceSettingsMode.HOST_SET_WAITING_FOR_VERIFICATION:
// TODO(jordynass): Replace this with the real "Verify" string return this.i18nAdvanced('multideviceVerificationText');
return 'Verification Placeholder';
default: default:
// TODO(jordynass): Replace this with the i18n versions return this.hostEnabled ? this.i18n('multideviceEnabled') :
return 'Enabled/Disabled'; this.i18n('multideviceDisabled');
} }
}, },
...@@ -79,24 +86,14 @@ Polymer({ ...@@ -79,24 +86,14 @@ Polymer({
case settings.MultiDeviceSettingsMode.NO_HOST_SET: case settings.MultiDeviceSettingsMode.NO_HOST_SET:
return this.i18n('multideviceSetupButton'); return this.i18n('multideviceSetupButton');
case settings.MultiDeviceSettingsMode.HOST_SET_WAITING_FOR_SERVER: case settings.MultiDeviceSettingsMode.HOST_SET_WAITING_FOR_SERVER:
// TODO(jordynass): Replace this with the real "Retry" string return this.i18n('retry');
return 'Retry Placeholder';
case settings.MultiDeviceSettingsMode.HOST_SET_WAITING_FOR_VERIFICATION: case settings.MultiDeviceSettingsMode.HOST_SET_WAITING_FOR_VERIFICATION:
// TODO(jordynass): Replace this with the real "Verify" string return this.i18n('multideviceVerifyButton');
return 'Verification Placeholder';
default: default:
return null; return null;
} }
}, },
/**
* @return {boolean}
* @private
*/
shouldShowLearnMoreLink_: function() {
return this.mode != settings.MultiDeviceSettingsMode.HOST_SET_VERIFIED;
},
/** /**
* @return {boolean} * @return {boolean}
* @private * @private
......
...@@ -2468,9 +2468,11 @@ void AddMultideviceStrings(content::WebUIDataSource* html_source) { ...@@ -2468,9 +2468,11 @@ void AddMultideviceStrings(content::WebUIDataSource* html_source) {
LocalizedString localized_strings[] = { LocalizedString localized_strings[] = {
{"multidevicePageTitle", IDS_SETTINGS_MULTIDEVICE}, {"multidevicePageTitle", IDS_SETTINGS_MULTIDEVICE},
{"multideviceSetupButton", IDS_SETTINGS_MULTIDEVICE_SETUP_BUTTON}, {"multideviceSetupButton", IDS_SETTINGS_MULTIDEVICE_SETUP_BUTTON},
{"multideviceVerifyButton", IDS_SETTINGS_MULTIDEVICE_VERIFY_BUTTON},
{"multideviceSetupItemHeading", {"multideviceSetupItemHeading",
IDS_SETTINGS_MULTIDEVICE_SETUP_ITEM_HEADING}, IDS_SETTINGS_MULTIDEVICE_SETUP_ITEM_HEADING},
{"multideviceSetupSummary", IDS_SETTINGS_MULTIDEVICE_SETUP_SUMMARY}, {"multideviceEnabled", IDS_SETTINGS_MULTIDEVICE_ENABLED},
{"multideviceDisabled", IDS_SETTINGS_MULTIDEVICE_DISABLED},
{"smsConnect", IDS_SETTINGS_MULTIDEVICE_SMS_CONNECT}, {"smsConnect", IDS_SETTINGS_MULTIDEVICE_SMS_CONNECT},
{"smsConnectSummary", IDS_SETTINGS_MULTIDEVICE_SMS_CONNECT_SUMMARY}, {"smsConnectSummary", IDS_SETTINGS_MULTIDEVICE_SMS_CONNECT_SUMMARY},
}; };
...@@ -2481,6 +2483,21 @@ void AddMultideviceStrings(content::WebUIDataSource* html_source) { ...@@ -2481,6 +2483,21 @@ void AddMultideviceStrings(content::WebUIDataSource* html_source) {
"enableMultideviceSettings", "enableMultideviceSettings",
base::FeatureList::IsEnabled( base::FeatureList::IsEnabled(
chromeos::features::kEnableUnifiedMultiDeviceSettings)); chromeos::features::kEnableUnifiedMultiDeviceSettings));
html_source->AddString(
"multideviceVerificationText",
l10n_util::GetStringFUTF16(
IDS_SETTINGS_MULTIDEVICE_VERIFICATION_TEXT,
GetHelpUrlWithBoard(chrome::kMultiDeviceLearnMoreURL)));
html_source->AddString(
"multideviceCouldNotConnect",
l10n_util::GetStringFUTF16(
IDS_SETTINGS_MULTIDEVICE_COULD_NOT_CONNECT,
GetHelpUrlWithBoard(chrome::kMultiDeviceLearnMoreURL)));
html_source->AddString(
"multideviceSetupSummary",
l10n_util::GetStringFUTF16(
IDS_SETTINGS_MULTIDEVICE_SETUP_SUMMARY,
GetHelpUrlWithBoard(chrome::kMultiDeviceLearnMoreURL)));
} }
#endif #endif
......
...@@ -265,6 +265,9 @@ const char kGoogleNameserversLearnMoreURL[] = ...@@ -265,6 +265,9 @@ const char kGoogleNameserversLearnMoreURL[] =
const char kInstantTetheringLearnMoreURL[] = const char kInstantTetheringLearnMoreURL[] =
"https://support.google.com/chromebook?p=instant_tethering"; "https://support.google.com/chromebook?p=instant_tethering";
const char kMultiDeviceLearnMoreURL[] =
"https://support.google.com/chromebook?p=multidevice-placeholder";
const char kLanguageSettingsLearnMoreUrl[] = const char kLanguageSettingsLearnMoreUrl[] =
"https://support.google.com/chromebook/answer/1059490"; "https://support.google.com/chromebook/answer/1059490";
......
...@@ -218,6 +218,9 @@ extern const char kGoogleNameserversLearnMoreURL[]; ...@@ -218,6 +218,9 @@ extern const char kGoogleNameserversLearnMoreURL[];
// The URL for the "learn more" link for Instant Tethering. // The URL for the "learn more" link for Instant Tethering.
extern const char kInstantTetheringLearnMoreURL[]; extern const char kInstantTetheringLearnMoreURL[];
// The URL for the "Learn more" link in the connected devices.
extern const char kMultiDeviceLearnMoreURL[];
// The URL for the "Learn more" link in the language settings. // The URL for the "Learn more" link in the language settings.
extern const char kLanguageSettingsLearnMoreUrl[]; extern const char kLanguageSettingsLearnMoreUrl[];
......
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