Commit 97afa2b0 authored by Anastasiia Nikolaienko's avatar Anastasiia Nikolaienko Committed by Commit Bot

Add account manager description text for child users

Bug: 1043108
Change-Id: Ie64acba83e6965a0fd7efe88fbb8c15a95550047
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2091345
Commit-Queue: Anastasiia Nikolaienko <anastasiian@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Reviewed-by: default avatarKush Sinha <sinhak@chromium.org>
Cr-Commit-Position: refs/heads/master@{#749589}
parent 3c098f45
...@@ -697,7 +697,10 @@ ...@@ -697,7 +697,10 @@
<!-- Account Manager (OS settings) --> <!-- Account Manager (OS settings) -->
<message name="IDS_SETTINGS_ACCOUNT_MANAGER_DESCRIPTION" desc="Description of the Account Manager Settings page. Shown just below the title of the page."> <message name="IDS_SETTINGS_ACCOUNT_MANAGER_DESCRIPTION" desc="Description of the Account Manager Settings page. Shown just below the title of the page.">
Manage your signed-in accounts. Websites, apps, and extensions in Chrome and Google Play may use these accounts to customize your experience, depending on permissions. &lt;a&gt;Learn more&lt;/a&gt; Manage your signed-in accounts. Websites, apps, and extensions in Chrome and Google Play may use these accounts to customize your experience, depending on permissions. <ph name="LINK_BEGIN">&lt;a&gt;</ph>Learn more<ph name="LINK_END">&lt;/a&gt;</ph>
</message>
<message name="IDS_SETTINGS_ACCOUNT_MANAGER_CHILD_DESCRIPTION" desc="Description of the Account Manager Settings page for child users. Shown just below the title of the page.">
Add a school account or manage child accounts here. <ph name="LINK_BEGIN">&lt;a&gt;</ph>Learn more<ph name="LINK_END">&lt;/a&gt;</ph>
</message> </message>
<message name="IDS_SETTINGS_ACCOUNT_MANAGER_LIST_HEADER" desc="List header for Account List in Account Manager Settings page."> <message name="IDS_SETTINGS_ACCOUNT_MANAGER_LIST_HEADER" desc="List header for Account List in Account Manager Settings page.">
Accounts Accounts
......
05ce55b3b1f72551dc7524643577ce67be247b25
\ No newline at end of file
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
<div class="settings-box first"> <div class="settings-box first">
<settings-localized-link <settings-localized-link
class="account-manager-description" class="account-manager-description"
localized-string="$i18n{accountManagerDescription}" localized-string="[[getAccountManagerDescription_()]]"
link-url="$i18nRaw{accountManagerLearnMoreUrl}"> link-url="$i18nRaw{accountManagerLearnMoreUrl}">
</settings-localized-link> </settings-localized-link>
</div> </div>
......
...@@ -77,13 +77,25 @@ Polymer({ ...@@ -77,13 +77,25 @@ Polymer({
return loadTimeData.getBoolean('secondaryGoogleAccountSigninAllowed'); return loadTimeData.getBoolean('secondaryGoogleAccountSigninAllowed');
}, },
/**
* @return {string} account manager description text.
* @private
*/
getAccountManagerDescription_() {
if (this.isChildUser_ &&
loadTimeData.getBoolean('isEduCoexistenceEnabled')) {
return loadTimeData.getString('accountManagerChildDescription');
}
return loadTimeData.getString('accountManagerDescription');
},
/** /**
* @return {string} 'Secondary Accounts disabled' message depending on * @return {string} 'Secondary Accounts disabled' message depending on
* account type * account type
* @private * @private
*/ */
getSecondaryAccountsDisabledUserMessage_() { getSecondaryAccountsDisabledUserMessage_() {
return loadTimeData.getBoolean('isChild') return this.isChildUser_
? this.i18n('accountManagerSecondaryAccountsDisabledChildText') ? this.i18n('accountManagerSecondaryAccountsDisabledChildText')
: this.i18n('accountManagerSecondaryAccountsDisabledText'); : this.i18n('accountManagerSecondaryAccountsDisabledText');
}, },
......
...@@ -583,6 +583,8 @@ void AddFingerprintStrings(content::WebUIDataSource* html_source) { ...@@ -583,6 +583,8 @@ void AddFingerprintStrings(content::WebUIDataSource* html_source) {
void AddAccountManagerPageStrings(content::WebUIDataSource* html_source) { void AddAccountManagerPageStrings(content::WebUIDataSource* html_source) {
static constexpr webui::LocalizedString kLocalizedStrings[] = { static constexpr webui::LocalizedString kLocalizedStrings[] = {
{"accountManagerDescription", IDS_SETTINGS_ACCOUNT_MANAGER_DESCRIPTION}, {"accountManagerDescription", IDS_SETTINGS_ACCOUNT_MANAGER_DESCRIPTION},
{"accountManagerChildDescription",
IDS_SETTINGS_ACCOUNT_MANAGER_CHILD_DESCRIPTION},
{"accountListHeader", IDS_SETTINGS_ACCOUNT_MANAGER_LIST_HEADER}, {"accountListHeader", IDS_SETTINGS_ACCOUNT_MANAGER_LIST_HEADER},
{"accountManagerPrimaryAccountTooltip", {"accountManagerPrimaryAccountTooltip",
IDS_SETTINGS_ACCOUNT_MANAGER_PRIMARY_ACCOUNT_TOOLTIP}, IDS_SETTINGS_ACCOUNT_MANAGER_PRIMARY_ACCOUNT_TOOLTIP},
......
...@@ -268,6 +268,8 @@ void OSSettingsUI::InitOSWebUIHandlers(content::WebUIDataSource* html_source) { ...@@ -268,6 +268,8 @@ void OSSettingsUI::InitOSWebUIHandlers(content::WebUIDataSource* html_source) {
"secondaryGoogleAccountSigninAllowed", "secondaryGoogleAccountSigninAllowed",
profile->GetPrefs()->GetBoolean( profile->GetPrefs()->GetBoolean(
chromeos::prefs::kSecondaryGoogleAccountSigninAllowed)); chromeos::prefs::kSecondaryGoogleAccountSigninAllowed));
html_source->AddBoolean("isEduCoexistenceEnabled",
features::IsEduCoexistenceEnabled());
} }
web_ui()->AddMessageHandler( web_ui()->AddMessageHandler(
......
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