Commit 4e2e15af authored by Abigail Klein's avatar Abigail Klein Committed by Commit Bot

[Live Caption] Add entrypoint in settings page.

Move the entrypoint to the live caption feature to accessibility
settings, which is the location specified by the PRD. Include the
description text, specified by the PRD. The entrypoint allows
live caption to be enabled on Linux and Windows only. Screenshots
are included and uploaded to Google cloud for translation purposes.

Bug: 1055150
Change-Id: I0c645e9273db95a2e5ec929960bc842b6b3e8cae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2090100Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Abigail Klein <abigailbklein@google.com>
Cr-Commit-Position: refs/heads/master@{#748807}
parent 64465df5
...@@ -60,6 +60,12 @@ ...@@ -60,6 +60,12 @@
<message name="IDS_SETTINGS_ACCESSIBLE_IMAGE_LABELS_SUBTITLE" desc="Subtitle for screen reader image labels feature."> <message name="IDS_SETTINGS_ACCESSIBLE_IMAGE_LABELS_SUBTITLE" desc="Subtitle for screen reader image labels feature.">
If an image doesn’t have a useful description, Chrome will try to provide one for you. To create descriptions, images are sent to Google. If an image doesn’t have a useful description, Chrome will try to provide one for you. To create descriptions, images are sent to Google.
</message> </message>
<message name="IDS_SETTINGS_CAPTIONS_ENABLE_LIVE_CAPTION_TITLE" desc="Name of the setting to enable Live Caption.">
Live caption
</message>
<message name="IDS_SETTINGS_CAPTIONS_ENABLE_LIVE_CAPTION_SUBTITLE" desc="Subtitle of the setting to enable Live Caption.">
Live caption detects speech in media and automatically generates captions for all media playing in Chrome.
</message>
<if expr="chromeos"> <if expr="chromeos">
<!-- Android Apps Page --> <!-- Android Apps Page -->
<message name="IDS_SETTINGS_ANDROID_APPS_TITLE" desc="The title of Google Play Store (Arc++ / Android Apps) section."> <message name="IDS_SETTINGS_ANDROID_APPS_TITLE" desc="The title of Google Play Store (Arc++ / Android Apps) section.">
......
cf206f45ac340d44f0e2cddd52cde7d2d1039f5c
\ No newline at end of file
cf206f45ac340d44f0e2cddd52cde7d2d1039f5c
\ No newline at end of file
...@@ -83,9 +83,6 @@ ...@@ -83,9 +83,6 @@
<message name="IDS_SETTINGS_CAPTIONS_DEFAULT_SETTING" desc="Name of the default setting for the caption text."> <message name="IDS_SETTINGS_CAPTIONS_DEFAULT_SETTING" desc="Name of the default setting for the caption text.">
Default Default
</message> </message>
<message name="IDS_SETTINGS_CAPTIONS_ENABLE_LIVE_CAPTION" desc="Name of the setting to enable Live Caption.">
Enable Live Caption
</message>
<!-- Personalization Options SubPage (strings used by the <settings-personalization-options> element) --> <!-- Personalization Options SubPage (strings used by the <settings-personalization-options> element) -->
<message name="IDS_SETTINGS_ENABLE_URL_KEYED_ANONYMIZED_DATA_COLLECTION" desc="The label of the checkbox to enable/disable url keyed anonymized data collection."> <message name="IDS_SETTINGS_ENABLE_URL_KEYED_ANONYMIZED_DATA_COLLECTION" desc="The label of the checkbox to enable/disable url keyed anonymized data collection.">
......
...@@ -61,6 +61,13 @@ ...@@ -61,6 +61,13 @@
<settings-captions prefs="{{prefs}}"></settings-captions> <settings-captions prefs="{{prefs}}"></settings-captions>
</settings-subpage> </settings-subpage>
</template> </template>
<template is="dom-if" if="[[enableLiveCaption_]]">
<settings-toggle-button
pref="{{prefs.accessibility.captions.live_caption_enabled}}"
label="$i18n{captionsEnableLiveCaptionTitle}"
sub-label="$i18n{captionsEnableLiveCaptionSubtitle}">
</settings-toggle-button>
</template>
</if> </if>
</settings-animated-pages> </settings-animated-pages>
</template> </template>
......
...@@ -30,6 +30,16 @@ Polymer({ ...@@ -30,6 +30,16 @@ Polymer({
notify: true, notify: true,
}, },
/**
* Returns true if the 'LiveCaption' media switch is enabled.
*/
enableLiveCaption_: {
type: Boolean,
value: function() {
return loadTimeData.getBoolean('enableLiveCaption');
},
},
/** /**
* Whether to show accessibility labels settings. * Whether to show accessibility labels settings.
*/ */
......
...@@ -122,12 +122,6 @@ ...@@ -122,12 +122,6 @@
</settings-dropdown-menu> </settings-dropdown-menu>
</div> </div>
</div> </div>
<template is="dom-if" if="[[enableLiveCaption_]]">
<settings-toggle-button
pref="{{prefs.accessibility.captions.live_caption_enabled}}"
label="$i18n{captionsEnableLiveCaption}">
</settings-toggle-button>
</template>
</template> </template>
<script src="captions_subpage.js"></script> <script src="captions_subpage.js"></script>
</dom-module> </dom-module>
...@@ -23,16 +23,6 @@ Polymer({ ...@@ -23,16 +23,6 @@ Polymer({
notify: true, notify: true,
}, },
/**
* Returns true if the 'LiveCaption' media switch is enabled.
*/
enableLiveCaption_: {
type: Boolean,
value: function() {
return loadTimeData.getBoolean('enableLiveCaption');
},
},
/** /**
* List of options for the background opacity drop-down menu. * List of options for the background opacity drop-down menu.
* @type {!DropdownMenuOptionList} * @type {!DropdownMenuOptionList}
......
...@@ -198,6 +198,10 @@ void AddA11yStrings(content::WebUIDataSource* html_source) { ...@@ -198,6 +198,10 @@ void AddA11yStrings(content::WebUIDataSource* html_source) {
IDS_SETTINGS_ACCESSIBLE_IMAGE_LABELS_SUBTITLE}, IDS_SETTINGS_ACCESSIBLE_IMAGE_LABELS_SUBTITLE},
{"settingsSliderRoleDescription", {"settingsSliderRoleDescription",
IDS_SETTINGS_SLIDER_MIN_MAX_ARIA_ROLE_DESCRIPTION}, IDS_SETTINGS_SLIDER_MIN_MAX_ARIA_ROLE_DESCRIPTION},
{"captionsEnableLiveCaptionTitle",
IDS_SETTINGS_CAPTIONS_ENABLE_LIVE_CAPTION_TITLE},
{"captionsEnableLiveCaptionSubtitle",
IDS_SETTINGS_CAPTIONS_ENABLE_LIVE_CAPTION_SUBTITLE},
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
{"manageAccessibilityFeatures", {"manageAccessibilityFeatures",
IDS_SETTINGS_ACCESSIBILITY_MANAGE_ACCESSIBILITY_FEATURES}, IDS_SETTINGS_ACCESSIBILITY_MANAGE_ACCESSIBILITY_FEATURES},
......
...@@ -78,7 +78,6 @@ void AddCaptionSubpageStrings(content::WebUIDataSource* html_source) { ...@@ -78,7 +78,6 @@ void AddCaptionSubpageStrings(content::WebUIDataSource* html_source) {
{"captionsColorCyan", IDS_SETTINGS_CAPTIONS_COLOR_CYAN}, {"captionsColorCyan", IDS_SETTINGS_CAPTIONS_COLOR_CYAN},
{"captionsColorMagenta", IDS_SETTINGS_CAPTIONS_COLOR_MAGENTA}, {"captionsColorMagenta", IDS_SETTINGS_CAPTIONS_COLOR_MAGENTA},
{"captionsDefaultSetting", IDS_SETTINGS_CAPTIONS_DEFAULT_SETTING}, {"captionsDefaultSetting", IDS_SETTINGS_CAPTIONS_DEFAULT_SETTING},
{"captionsEnableLiveCaption", IDS_SETTINGS_CAPTIONS_ENABLE_LIVE_CAPTION},
}; };
AddLocalizedStringsBulk(html_source, kLocalizedStrings); AddLocalizedStringsBulk(html_source, kLocalizedStrings);
} }
......
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