Commit a8533031 authored by My Nguyen's avatar My Nguyen Committed by Commit Bot

[CrOS Settings] Update strings for suggestion features settings page

Following UX writing review, update the relevant strings and layout.
See go/cros-assistive-input-ux-writing-review.
Current view: http://screen/9cXRfLiVR9M

Add icon-secondary-color as specified in http://go/cros-ux-icon-color.
Added a TODO to rename the rest of the files and strings in code.

Bug: 1113612, 1113611
Change-Id: I4360a23addbc7e92bb6eca614e7dd543470f9792
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2341023Reviewed-by: default avatarcalamity <calamity@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Commit-Queue: My Nguyen <myy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#795810}
parent 3cfd3e7e
......@@ -862,13 +862,13 @@
<message name="IDS_OS_SETTINGS_TAG_LANGUAGES_INPUT_INPUT_OPTIONS_SHELF_ALT1" desc="Text for search result item which, when clicked, navigates the user to languages and input settings, with a toggle to enable/disable showing input options in the shelf. Alternate phrase for: 'Show input options in the shelf'">
Input options in toolbar
</message>
<message name="IDS_OS_SETTINGS_TAG_LANGUAGES_SMART_INPUTS" desc="Text for search result item which, when clicked, navigates the user to smart input settings, which allows spelling/grammar suggestions generated using personal information such as contacts.">
Smart inputs
<message name="IDS_OS_SETTINGS_TAG_LANGUAGES_SUGGESTIONS" desc="Text for search result item which, when clicked, navigates the user to suggestions settings, which allows spelling/grammar suggestions generated using personal information such as contacts.">
Suggestions
</message>
<message name="IDS_OS_SETTINGS_TAG_LANGUAGES_PERSONAL_INFORMATION_SUGGESTIONS" desc="Text for search result item which, when clicked, navigates the user to smart input settings, which with a toggle to enable/disable showing personal information suggestions.">
<message name="IDS_OS_SETTINGS_TAG_LANGUAGES_PERSONAL_INFORMATION_SUGGESTIONS" desc="Text for search result item which, when clicked, navigates the user to suggestions settings, which with a toggle to enable/disable showing personal information suggestions.">
Personal information suggestions
</message>
<message name="IDS_OS_SETTINGS_TAG_LANGUAGES_EMOJI_SUGGESTIONS" desc="Text for search result item which, when clicked, navigates the user to smart input settings, with a section having a toggle to enable/disable showing emoji suggestions after an user types a word.">
<message name="IDS_OS_SETTINGS_TAG_LANGUAGES_EMOJI_SUGGESTIONS" desc="Text for search result item which, when clicked, navigates the user to suggestions settings, with a section having a toggle to enable/disable showing emoji suggestions after an user types a word.">
Emoji suggestions
</message>
......
a2e50a891733d2de4b8275809e04d47de9f8a770
\ No newline at end of file
addb191d957651c05ec799c86306ff8a549170c2
\ No newline at end of file
addb191d957651c05ec799c86306ff8a549170c2
\ No newline at end of file
......@@ -289,30 +289,27 @@
System text is shown in this language
</message>
<!-- Smart Inputs Section -->
<message name="IDS_SETTINGS_SMART_INPUTS_TITLE" desc="The label for the smart inputs section, which contains features to help users type faster or more expressively such as suggesting personal information or suggesting emoji to use.">
Smart inputs
<!-- Suggestions Section -->
<message name="IDS_SETTINGS_SUGGESTIONS_TITLE" desc="The label for the suggestions section, which contains features to help users type faster or more expressively such as suggesting personal information or suggesting emoji to use.">
Suggestions
</message>
<message name="IDS_SETTINGS_SMART_INPUTS_PERSONAL_INFO_TITLE" desc="The label for personal information suggestion section.">
<message name="IDS_SETTINGS_SUGGESTIONS_PERSONAL_INFO_TITLE" desc="The label for personal information suggestion section. The feature shows inline suggestions for the users’s name, address, and phone number.">
Personal information suggestions
</message>
<message name="IDS_SETTINGS_SMART_INPUTS_PERSONAL_INFO_DESCRIPTION" desc="The description for personal information suggestion section.">
Personal information suggestions help you write faster with suggestions such as your name, address or phone number. Only you see your own private, personalized suggestions for your account.
<message name="IDS_SETTINGS_SUGGESTIONS_PERSONAL_INFO_HELP_TOOLTIP" desc="The help icon's tooltip for personal information suggestion section to inform users of the privacy of the suggestions.">
Personal suggestions are only shown on your account
</message>
<message name="IDS_SETTINGS_SMART_INPUTS_SHOW_PERSONAL_INFO" desc="The label for the toggle button controlling showing personal information suggestions.">
Show personal information suggestions
<message name="IDS_SETTINGS_SUGGESTIONS_PERSONAL_INFO_DESCRIPTION" desc="The description for personal information suggestion section.">
Write faster with inline suggestions for your name, address, or phone number
</message>
<message name="IDS_SETTINGS_SMART_INPUTS_MANAGE_PERSONAL_INFO" desc="The label for opening Chrome's browser settings page for managing personal addresses">
<message name="IDS_SETTINGS_SUGGESTIONS_MANAGE_PERSONAL_INFO" desc="The label for opening Chrome's browser settings page for managing personal addresses">
Manage personal information
</message>
<message name="IDS_SETTINGS_SMART_INPUTS_EMOJI_SUGGESTION_TITLE" desc="The label for emoji suggestion (when an user types a word, some emojis might be suggested for the user to insert after) section.">
<message name="IDS_SETTINGS_SUGGESTIONS_EMOJI_SUGGESTION_TITLE" desc="The label for emoji suggestion (when an user types a word, some emojis might be suggested for the user to insert after) section.">
Emoji suggestions
</message>
<message name="IDS_SETTINGS_SMART_INPUTS_EMOJI_SUGGESTION_DESCRIPTION" desc="The description for emoji suggestion (when an user types a word, some emojis might be suggested for the user to insert after) section.">
Get emoji suggestions based on what you are typing
</message>
<message name="IDS_SETTINGS_SMART_INPUTS_SHOW_EMOJI_SUGGESTION" desc="The label for the toggle button controlling showing emoji suggestions (when an user types a word, some emojis might be suggested for the user to insert after).">
Show emoji suggestions
<message name="IDS_SETTINGS_SUGGESTIONS_EMOJI_SUGGESTION_DESCRIPTION" desc="The description for emoji suggestion (when an user types a word, some emojis might be suggested for the user to insert after) section.">
Get emoji suggestions based on what you're typing
</message>
<!-- Input Method Options Section -->
......
00668dc066697ae5495e6f014b2b537e19d01968
\ No newline at end of file
f3b9202b9cc8da0fde1045ca3d5c9fd48cdeb7d3
\ No newline at end of file
1eb98dd458e3fafcc3dd67920d1c7c5029101a09
\ No newline at end of file
4455da127a7b8cd9cceb329ca8c8d74146266bba
\ No newline at end of file
94652a66acbbe7508cf91cc96f6d084d82aa2aaf
\ No newline at end of file
103172c35845622747d85ddfd6220c888191591f
\ No newline at end of file
103172c35845622747d85ddfd6220c888191591f
\ No newline at end of file
103172c35845622747d85ddfd6220c888191591f
\ No newline at end of file
103172c35845622747d85ddfd6220c888191591f
\ No newline at end of file
103172c35845622747d85ddfd6220c888191591f
\ No newline at end of file
103172c35845622747d85ddfd6220c888191591f
\ No newline at end of file
103172c35845622747d85ddfd6220c888191591f
\ No newline at end of file
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_link_row/cr_link_row.html">
<link rel="import" href="chrome://resources/cr_elements/cr_toggle/cr_toggle.html">
<link rel="import" href="chrome://resources/html/i18n_behavior.html">
<link rel="import" href="../../controls/settings_toggle_button.html">
<link rel="import" href="../../i18n_setup.html">
......@@ -10,50 +10,62 @@
<dom-module id="os-settings-smart-inputs-page">
<template>
<style include="settings-shared">
h2 {
padding-inline-start: var(--cr-section-padding);
.bottom-pad {
padding: 0 0 var(--cr-section-vertical-padding) 0;
}
.horizontal-align {
align-items: center;
display: flex;
justify-content: space-between;
}
iron-icon {
--iron-icon-fill-color: var(--cros-icon-color-secondary);
}
.padded-section {
margin-top: var(--cr-section-vertical-margin);
padding: 0 var(--cr-section-padding);
}
</style>
<div route-path="default">
<template is="dom-if" if="[[allowAssistivePersonalInfo_]]">
<div id="assistPersonalInfo">
<h2 aria-describedby="personalInfoSuggestionDescription">
<div id="assistPersonalInfo" class="padded-section">
<div aria-hidden="true">
$i18n{personalInfoSuggestionTitle}
</h2>
<span class="settings-box first" aria-hidden="true"
id="personalInfoSuggestionDescription">
$i18n{personalInfoSuggestionDescription}
</span>
<div class="list-frame vertical-list">
<settings-toggle-button class="list-item first"
pref="{{prefs.assistive_input.personal_info_enabled}}"
label="$i18n{showPersonalInfoSuggestion}">
</settings-toggle-button>
<cr-link-row class="hr list-item"
label="$i18n{managePersonalInfo}"
on-click="onManagePersonalInfoClick_" external>
</cr-link-row>
<iron-icon id="help-icon" icon="cr:help-outline"></iron-icon>
<paper-tooltip for="help-icon" position="top"
fit-to-visible-bounds>
$i18n{personalInfoSuggestionHelpTooltip}
</paper-tooltip>
</div>
<div class="horizontal-align bottom-pad">
<div class="secondary" aria-hidden="true"
id="personalInfoSuggestionDescription">
$i18n{personalInfoSuggestionDescription}
</div>
<cr-toggle
checked="[[allowAssistivePersonalInfo_]]"
on-change="onPersonalInfoSuggestionToggled_"
aria-describedby="personalInfoSuggestionDescription">
</cr-toggle>
</div>
<cr-link-row class="hr list-item"
label="$i18n{managePersonalInfo}"
on-click="onManagePersonalInfoClick_" external>
</cr-link-row>
</div>
</template>
<template is="dom-if" if="[[allowEmojiSuggestion_]]">
<div id="emojiSuggestion">
<h2 aria-hidden="true">
$i18n{emojiSuggestionTitle}
</h2>
<span class="settings-box first" aria-hidden="true"
id="emojiSuggestionDescription">
$i18n{emojiSuggestionDescription}
</span>
<div class="list-frame vertical-list">
<settings-toggle-button class="list-item first"
pref="{{prefs.assistive_input.emoji_suggestion_enabled}}"
label="$i18n{showEmojiSuggestion}"
aria-describedby="emojiSuggestionDescription">
</settings-toggle-button>
</div>
</div>
<settings-toggle-button id="emojiSuggestion" class="hr"
pref="{{prefs.assistive_input.emoji_suggestion_enabled}}"
label="$i18n{emojiSuggestionTitle}"
sub-label="$i18n{emojiSuggestionDescription}"
aria-label="$i18n{emojiSuggestionTitle}">
</settings-toggle-button>
</template>
</div>
</template>
......
......@@ -46,4 +46,13 @@ Polymer({
onManagePersonalInfoClick_() {
window.open('chrome://settings/addresses');
},
/**
* @param {!Event} e
* @private
*/
onPersonalInfoSuggestionToggled_(e) {
this.setPrefValue(
'assistive_input.personal_info_enabled', e.target.checked);
},
});
......@@ -82,7 +82,7 @@ bool IsLanguageSettingsV2Enabled() {
const std::vector<SearchConcept>& GetSmartInputsSearchConcepts() {
static const base::NoDestructor<std::vector<SearchConcept>> tags({
{IDS_OS_SETTINGS_TAG_LANGUAGES_SMART_INPUTS,
{IDS_OS_SETTINGS_TAG_LANGUAGES_SUGGESTIONS,
mojom::kSmartInputsSubpagePath,
mojom::SearchResultIcon::kGlobe,
mojom::SearchResultDefaultRank::kMedium,
......@@ -122,22 +122,22 @@ bool IsAssistivePersonalInfoAllowed() {
::chromeos::features::kAssistPersonalInfo);
}
// TODO(crbug/1113611): As Smart Inputs page is renamed to Suggestions.
// All related strings, function names and filenames should be renamed as well.
void AddSmartInputsStrings(content::WebUIDataSource* html_source,
bool is_emoji_suggestion_allowed) {
static constexpr webui::LocalizedString kLocalizedStrings[] = {
{"smartInputsTitle", IDS_SETTINGS_SMART_INPUTS_TITLE},
{"smartInputsTitle", IDS_SETTINGS_SUGGESTIONS_TITLE},
{"personalInfoSuggestionTitle",
IDS_SETTINGS_SMART_INPUTS_PERSONAL_INFO_TITLE},
IDS_SETTINGS_SUGGESTIONS_PERSONAL_INFO_TITLE},
{"personalInfoSuggestionHelpTooltip",
IDS_SETTINGS_SUGGESTIONS_PERSONAL_INFO_HELP_TOOLTIP},
{"personalInfoSuggestionDescription",
IDS_SETTINGS_SMART_INPUTS_PERSONAL_INFO_DESCRIPTION},
{"showPersonalInfoSuggestion",
IDS_SETTINGS_SMART_INPUTS_SHOW_PERSONAL_INFO},
{"managePersonalInfo", IDS_SETTINGS_SMART_INPUTS_MANAGE_PERSONAL_INFO},
{"emojiSuggestionTitle",
IDS_SETTINGS_SMART_INPUTS_EMOJI_SUGGESTION_TITLE},
IDS_SETTINGS_SUGGESTIONS_PERSONAL_INFO_DESCRIPTION},
{"managePersonalInfo", IDS_SETTINGS_SUGGESTIONS_MANAGE_PERSONAL_INFO},
{"emojiSuggestionTitle", IDS_SETTINGS_SUGGESTIONS_EMOJI_SUGGESTION_TITLE},
{"emojiSuggestionDescription",
IDS_SETTINGS_SMART_INPUTS_EMOJI_SUGGESTION_DESCRIPTION},
{"showEmojiSuggestion", IDS_SETTINGS_SMART_INPUTS_SHOW_EMOJI_SUGGESTION},
IDS_SETTINGS_SUGGESTIONS_EMOJI_SUGGESTION_DESCRIPTION},
};
AddLocalizedStringsBulk(html_source, kLocalizedStrings);
......@@ -344,7 +344,7 @@ void LanguagesSection::RegisterHierarchy(HierarchyGenerator* generator) const {
// Smart inputs.
generator->RegisterTopLevelSubpage(
IDS_SETTINGS_SMART_INPUTS_TITLE, mojom::Subpage::kSmartInputs,
IDS_SETTINGS_SUGGESTIONS_TITLE, mojom::Subpage::kSmartInputs,
mojom::SearchResultIcon::kGlobe, mojom::SearchResultDefaultRank::kMedium,
mojom::kSmartInputsSubpagePath);
static constexpr mojom::Setting kSmartInputsFeaturesSettings[] = {
......
......@@ -42,6 +42,11 @@
dark: "$google_blue_300",
},
icon_color_secondary: {
light: "$google_grey_500",
dark: "$google_grey_500",
},
/*
* Component colors.
*/
......
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