Commit 3ec3ab06 authored by Gordon Seto's avatar Gordon Seto Committed by Chromium LUCI CQ

[Nearby] Update device visibility strings.

Update nearby_contact_visibility visibility explanation strings.

Screenshots:
https://screenshot.googleplex.com/7Htyi2qu6qqvtkp.png
https://screenshot.googleplex.com/BgxPKkMQ4tFywjt.png
https://screenshot.googleplex.com/7sboMbzfBXK5Wc3.png

Fixed: 1157633
Change-Id: I9ed1a85f24b35823d3e7487d2923bc4801f2ab5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2586770
Commit-Queue: Gordon Seto <gordonseto@google.com>
Reviewed-by: default avatarJames Vecore <vecore@google.com>
Cr-Commit-Position: refs/heads/master@{#836335}
parent bb103c90
......@@ -31,23 +31,14 @@
other {# contacts are not available. To use Nearby Share with them, add the email addresses associated with their Google Accounts to your contacts.}
}
</message>
<message name="IDS_NEARBY_CONTACT_VISIBILITY_OTHERS" desc="Describes when nearby devices are visible to this user when using the Nearby Share feature.">
People who have chosen to be visible to you when their screen is unlocked and devices near you when Nearby Share is open
</message>
<message name="IDS_NEARBY_CONTACT_VISIBILITY_OTHERS_TITLE" desc="Title of the description for which devices the user can share with using the Nearby Share feature.">
Devices you can share with
</message>
<message name="IDS_NEARBY_CONTACT_VISIBILITY_OWN_ALL" desc="Describes who can see the local device when the Nearby Share visibility setting is set to 'All contacts'.">
All contacts near you when your screen is unlocked and devices near you when Nearby Share is open
Your contacts can share with you when they are nearby. Transfer won't start until you accept.
</message>
<message name="IDS_NEARBY_CONTACT_VISIBILITY_OWN_NONE" desc="Describes who can see the local device when the Nearby Share visibility setting is set to 'Hidden'.">
No one unless you open Nearby Share
No one can share with you until you make yourself visible.<ph name="BR">&lt;br&gt;</ph><ph name="BR">&lt;br&gt;</ph>To make yourself visible temporarily, open the status area by selecting the time, then turn on Nearby visibility.
</message>
<message name="IDS_NEARBY_CONTACT_VISIBILITY_OWN_SOME" desc="Describes who can see the local device when the Nearby Share visibility setting is set to 'Some contacts'.">
Selected contacts near you when your screen is unlocked and devices near you when Nearby Share is open
</message>
<message name="IDS_NEARBY_CONTACT_VISIBILITY_OWN_TITLE" desc="Title of the description for which nearby devices can share with a users device using the Nearby Share feature.">
Who can share with your device
Selected contacts can share with you when nearby. Transfer won't start until you accept.
</message>
<message name="IDS_NEARBY_CONTACT_VISIBILITY_ZERO_STATE_INFO" desc="Help text to learn more about the privacy and visibility settings of the Nearby Share feature.">
Learn more
......
0d92a01cc9e8496c886d644b5d73292ce4410f03
\ No newline at end of file
e9a243de4c8fc2a1fbe843208330ef96d58fd140
\ No newline at end of file
d5f3b900906959a1a4ba281fd09cdfdda5da0856
\ No newline at end of file
419b59dddf53bd9b67cdff879c415ba3cf310537
\ No newline at end of file
0d92a01cc9e8496c886d644b5d73292ce4410f03
\ No newline at end of file
0fb0057823185b73bd14ce89764adc4dae481b0f
\ No newline at end of file
1ef5d39d3c450ec66d3b60c7b8d3ae2fcb38fec1
\ No newline at end of file
f3302a5bb216ffcd926f5ed0591413b9e4e85c23
\ No newline at end of file
3c6dba64173f135c70ab5b7e26dd50a7ef097fc9
\ No newline at end of file
......@@ -164,6 +164,12 @@
display: flex;
}
#explanation {
display: flex;
font-size: 11px;
margin-block-end: 8px;
}
.padded-icon {
margin-inline-end: 16px;
margin-inline-start: 12px;
......@@ -201,7 +207,7 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 400px;
width: 390px;
}
.contact-toggle {
......@@ -338,49 +344,9 @@
if="[[showExplanationState_(selectedVisibility,
contactsState)]]">
<div id="explanation">
<div class="explanation-section">
<iron-icon icon="nearby20:radar" class="padded-icon grey-icon">
</iron-icon>
<div class="viz-description-section">
<div class="cr-title-text">
$i18n{nearbyShareContactVisibilityOthersTitle}
<div class="cr-secondary-text"
inner-h-t-m-l="[[getVisibilityDescription_(selectedVisibility)]]">
</div>
<div class="cr-secondary-text">
$i18n{nearbyShareContactVisibilityOthers}
</div>
</div>
</div>
<div class="explanation-section">
<iron-icon icon="nearby20:visibility"
class="padded-icon grey-icon">
</iron-icon>
<div class="viz-description-section">
<div class="cr-title-text">
$i18n{nearbyShareContactVisibilityOwnTitle}
</div>
<template is="dom-if"
if="[[isVisibility_(selectedVisibility,'all')]]">
<div class="cr-secondary-text">
$i18n{nearbyShareContactVisibilityOwnAll}
</div>
</template>
<template is="dom-if"
if="[[isVisibility_(selectedVisibility,'some')]]">
<div class="cr-secondary-text">
$i18n{nearbyShareContactVisibilityOwnSome}
</div>
</template>
<template is="dom-if"
if="[[isVisibility_(selectedVisibility,'none')]]">
<div class="cr-secondary-text">
$i18n{nearbyShareContactVisibilityOwnNone}
</div>
</template>
</div>
</div>
</div>
</template>
......
......@@ -514,5 +514,23 @@ Polymer({
labelTemplate, this.numUnreachable_);
});
},
/**
* @param {string} selectedVisibility
* @return {string}
* @private
*/
getVisibilityDescription_(selectedVisibility) {
switch (visibilityStringToValue(selectedVisibility)) {
case nearbyShare.mojom.Visibility.kAllContacts:
return this.i18n('nearbyShareContactVisibilityOwnAll');
case nearbyShare.mojom.Visibility.kSelectedContacts:
return this.i18n('nearbyShareContactVisibilityOwnSome');
case nearbyShare.mojom.Visibility.kNoOne:
return this.i18nAdvanced('nearbyShareContactVisibilityOwnNone');
default:
return '';
}
},
});
})();
......@@ -40,18 +40,12 @@ void RegisterNearbySharedStrings(content::WebUIDataSource* data_source) {
{"nearbyShareContactVisibilityNone", IDS_NEARBY_VISIBLITY_HIDDEN},
{"nearbyShareContactVisibilityNoneDescription",
IDS_NEARBY_VISIBLITY_HIDDEN_DESCRIPTION},
{"nearbyShareContactVisibilityOthers",
IDS_NEARBY_CONTACT_VISIBILITY_OTHERS},
{"nearbyShareContactVisibilityOthersTitle",
IDS_NEARBY_CONTACT_VISIBILITY_OTHERS_TITLE},
{"nearbyShareContactVisibilityOwnAll",
IDS_NEARBY_CONTACT_VISIBILITY_OWN_ALL},
{"nearbyShareContactVisibilityOwnNone",
IDS_NEARBY_CONTACT_VISIBILITY_OWN_NONE},
{"nearbyShareContactVisibilityOwnSome",
IDS_NEARBY_CONTACT_VISIBILITY_OWN_SOME},
{"nearbyShareContactVisibilityOwnTitle",
IDS_NEARBY_CONTACT_VISIBILITY_OWN_TITLE},
{"nearbyShareContactVisibilitySome", IDS_NEARBY_VISIBLITY_SOME_CONTACTS},
{"nearbyShareContactVisibilitySomeDescription",
IDS_NEARBY_VISIBLITY_SOME_CONTACTS_DESCRIPTION},
......
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