Commit 0eeb777c authored by Curt Clemens's avatar Curt Clemens Committed by Chromium LUCI CQ

[Nearby] Add receive confirmation page error strings

Add "Can't receive", "Please try again", and "The device sharing with
you cancelled the transfer" strings. Display them on the receive
confirmation page when the corresponding error statuses are received.
Also use the "Not enough disk space" string that already existed.

Fixed: 1157284
Change-Id: I085573fb7943c9e38899a6b038bb068386e33c35
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2587398Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Reviewed-by: default avatarJames Vecore <vecore@google.com>
Commit-Queue: Curt Clemens <cclem@google.com>
Cr-Commit-Position: refs/heads/master@{#836339}
parent 1d7795e1
...@@ -122,6 +122,12 @@ ...@@ -122,6 +122,12 @@
<message name="IDS_NEARBY_DEFAULT_DEVICE_NAME" desc="The default device name used unless a user explicitly sets the device name during onboarding or in settings. Displayed to other users during sharing."> <message name="IDS_NEARBY_DEFAULT_DEVICE_NAME" desc="The default device name used unless a user explicitly sets the device name during onboarding or in settings. Displayed to other users during sharing.">
<ph name="GIVEN_NAME">$1<ex>Josh</ex></ph>'s <ph name="DEVICE_TYPE">$2<ex>Chromebook</ex></ph> <ph name="GIVEN_NAME">$1<ex>Josh</ex></ph>'s <ph name="DEVICE_TYPE">$2<ex>Chromebook</ex></ph>
</message> </message>
<message name="IDS_NEARBY_ERROR_CANCELLED" desc="Notify the receiver that the sender cancelled the file share.">
The device sharing with you cancelled the transfer
</message>
<message name="IDS_NEARBY_ERROR_CANT_RECEIVE" desc="Notify user that the file wasn't able to be received. Generic title text for displaying errors to the user. To be shown next to more specific error text.">
Can't receive
</message>
<message name="IDS_NEARBY_ERROR_CANT_SHARE" desc="Notify user that the file wasn't able to be shared. Generic title text for displaying errors to the user. To be shown next to more specific error text."> <message name="IDS_NEARBY_ERROR_CANT_SHARE" desc="Notify user that the file wasn't able to be shared. Generic title text for displaying errors to the user. To be shown next to more specific error text.">
Can't share Can't share
</message> </message>
...@@ -140,6 +146,9 @@ ...@@ -140,6 +146,9 @@
<message name="IDS_NEARBY_ERROR_TIME_OUT" desc="Notify user that the file share failed because something didn't happen in time, e.g. the receiver neither accepted nor declined the share. Generic title text to be shown next to more specific error text describing the situation."> <message name="IDS_NEARBY_ERROR_TIME_OUT" desc="Notify user that the file share failed because something didn't happen in time, e.g. the receiver neither accepted nor declined the share. Generic title text to be shown next to more specific error text describing the situation.">
Time out Time out
</message> </message>
<message name="IDS_NEARBY_ERROR_TRY_AGAIN" desc="Generic suggestion to try again. Used as a subtitle underneath an error message when more details about the error are not available.">
Please try again
</message>
<message name="IDS_NEARBY_ERROR_UNSUPPORTED_FILE_TYPE" desc="Notify user that the file chosen can't be shared because of its type, e.g. missing file extension."> <message name="IDS_NEARBY_ERROR_UNSUPPORTED_FILE_TYPE" desc="Notify user that the file chosen can't be shared because of its type, e.g. missing file extension.">
Unsupported file type Unsupported file type
</message> </message>
......
046268562379b163c232c6235e3316c9d09f8415
\ No newline at end of file
0795215e9a469669df69d8cf6bc5afb20db755a7
\ No newline at end of file
7e4712363200cae7805510acdc7e392b354f877d
\ No newline at end of file
...@@ -61,23 +61,28 @@ Polymer({ ...@@ -61,23 +61,28 @@ Polymer({
* @param {?nearbyShare.mojom.TransferStatus} newStatus * @param {?nearbyShare.mojom.TransferStatus} newStatus
*/ */
onTransferStatusChanged_(newStatus) { onTransferStatusChanged_(newStatus) {
// TODO(cclem) review this mapping, add missing statuses, make sure the
// strings still make sense in the context of the receive page
switch (newStatus) { switch (newStatus) {
case nearbyShare.mojom.TransferStatus.kTimedOut: case nearbyShare.mojom.TransferStatus.kTimedOut:
this.errorTitle_ = this.i18n('nearbyShareErrorTimeOut'); this.errorTitle_ = this.i18n('nearbyShareErrorTimeOut');
this.errorDescription_ = this.i18n('nearbyShareErrorNoResponse'); this.errorDescription_ = this.i18n('nearbyShareErrorTryAgain');
break; break;
case nearbyShare.mojom.TransferStatus.kUnsupportedAttachmentType: case nearbyShare.mojom.TransferStatus.kUnsupportedAttachmentType:
this.errorTitle_ = this.i18n('nearbyShareErrorCantShare'); this.errorTitle_ = this.i18n('nearbyShareErrorCantReceive');
this.errorDescription_ = this.errorDescription_ =
this.i18n('nearbyShareErrorUnsupportedFileType'); this.i18n('nearbyShareErrorUnsupportedFileType');
break; break;
case nearbyShare.mojom.TransferStatus.kMediaUnavailable:
case nearbyShare.mojom.TransferStatus.kNotEnoughSpace: case nearbyShare.mojom.TransferStatus.kNotEnoughSpace:
this.errorTitle_ = this.i18n('nearbyShareErrorCantReceive');
this.errorDescription_ = this.i18n('nearbyShareErrorNotEnoughSpace');
break;
case nearbyShare.mojom.TransferStatus.kCancelled:
this.errorTitle_ = this.i18n('nearbyShareErrorCantReceive');
this.errorDescription_ = this.i18n('nearbyShareErrorCancelled');
break;
case nearbyShare.mojom.TransferStatus.kFailed: case nearbyShare.mojom.TransferStatus.kFailed:
case nearbyShare.mojom.TransferStatus.kMediaUnavailable:
case nearbyShare.mojom.TransferStatus.kAwaitingRemoteAcceptanceFailed: case nearbyShare.mojom.TransferStatus.kAwaitingRemoteAcceptanceFailed:
this.errorTitle_ = this.i18n('nearbyShareErrorCantShare'); this.errorTitle_ = this.i18n('nearbyShareErrorCantReceive');
this.errorDescription_ = this.i18n('nearbyShareErrorSomethingWrong'); this.errorDescription_ = this.i18n('nearbyShareErrorSomethingWrong');
break; break;
default: default:
......
...@@ -66,11 +66,15 @@ void RegisterNearbySharedStrings(content::WebUIDataSource* data_source) { ...@@ -66,11 +66,15 @@ void RegisterNearbySharedStrings(content::WebUIDataSource* data_source) {
IDS_NEARBY_DISCOVERY_PAGE_PLACEHOLDER}, IDS_NEARBY_DISCOVERY_PAGE_PLACEHOLDER},
{"nearbyShareDiscoveryPageSubtitle", IDS_NEARBY_DISCOVERY_PAGE_SUBTITLE}, {"nearbyShareDiscoveryPageSubtitle", IDS_NEARBY_DISCOVERY_PAGE_SUBTITLE},
{"nearbyShareDiscoveryPageTitle", IDS_NEARBY_DISCOVERY_PAGE_TITLE}, {"nearbyShareDiscoveryPageTitle", IDS_NEARBY_DISCOVERY_PAGE_TITLE},
{"nearbyShareErrorCancelled", IDS_NEARBY_ERROR_CANCELLED},
{"nearbyShareErrorCantReceive", IDS_NEARBY_ERROR_CANT_RECEIVE},
{"nearbyShareErrorCantShare", IDS_NEARBY_ERROR_CANT_SHARE}, {"nearbyShareErrorCantShare", IDS_NEARBY_ERROR_CANT_SHARE},
{"nearbyShareErrorNoResponse", IDS_NEARBY_ERROR_NO_RESPONSE}, {"nearbyShareErrorNoResponse", IDS_NEARBY_ERROR_NO_RESPONSE},
{"nearbyShareErrorNotEnoughSpace", IDS_NEARBY_ERROR_NOT_ENOUGH_SPACE},
{"nearbyShareErrorRejected", IDS_NEARBY_ERROR_REJECTED}, {"nearbyShareErrorRejected", IDS_NEARBY_ERROR_REJECTED},
{"nearbyShareErrorSomethingWrong", IDS_NEARBY_ERROR_SOMETHING_WRONG}, {"nearbyShareErrorSomethingWrong", IDS_NEARBY_ERROR_SOMETHING_WRONG},
{"nearbyShareErrorTimeOut", IDS_NEARBY_ERROR_TIME_OUT}, {"nearbyShareErrorTimeOut", IDS_NEARBY_ERROR_TIME_OUT},
{"nearbyShareErrorTryAgain", IDS_NEARBY_ERROR_TRY_AGAIN},
{"nearbyShareErrorUnsupportedFileType", {"nearbyShareErrorUnsupportedFileType",
IDS_NEARBY_ERROR_UNSUPPORTED_FILE_TYPE}, IDS_NEARBY_ERROR_UNSUPPORTED_FILE_TYPE},
{"nearbyShareFeatureName", IDS_NEARBY_SHARE_FEATURE_NAME}, {"nearbyShareFeatureName", IDS_NEARBY_SHARE_FEATURE_NAME},
......
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