Closed Bug 823794 Opened 11 years ago Closed 11 years ago

[bluetooth] File size displayed in transfer prompt not in human friendly format

Categories

(Firefox OS Graveyard :: Gaia::Bluetooth, defect)

Other
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-kilimanjaro:?, blocking-basecamp:-, b2g18+ fixed)

VERIFIED FIXED
blocking-kilimanjaro ?
blocking-basecamp -
Tracking Status
b2g18 + fixed

People

(Reporter: parul, Assigned: iliu)

Details

(Keywords: late-l10n, polish, Whiteboard: ux-p2, BerlinWW)

Attachments

(4 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20100101 Firefox/17.0
Build ID: 20121128204232

Steps to reproduce:

Test Environment:
Device: unagi phone
Build Identifier: 20121219070201
Update channel: nightly
Git commit info: 2012-12-19 15:11:47

1. Turn on bluetooth on the phone and pair with another device.
2. Transfer a file (image / music / video) to the phone via bluetooth from the other device.




Actual results:

A prompt is displayed on the phone, confirming whether to proceed with the bluetooth file transfer. In the message, the file size is something like "12278236byte".
1. The file size is displayed in bytes. Large numbers are not very human friendly to read and interpret.
2. "byte" should be in plural as in "bytes".
3. There is no space between the file size and "byte".


Expected results:

The file size should be displayed in a human friendly manner. Bytes should be converted into Kilobytes, Megabytes or Gigabytes, as needed.
For example, 
95218 bytes => 92.9 KB
2218379 bytes => 2.1 MB
12278236 bytes = 11.7 MB
blocking-basecamp: --- → ?
blocking-kilimanjaro: --- → ?
OS: All → Gonk (Firefox OS)
Hardware: All → Other
Summary: [bluetooth] → [bluetooth] File size displayed in transfer prompt not in human friendly format
Triage: BB-, tracking-b2g18+, polish - would not block on this
blocking-basecamp: ? → -
tracking-b2g18: --- → +
Keywords: polish
Whiteboard: ux-p2, BerlinWW
Assignee: nobody → iliu
Comment on attachment 700879 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/7539

NOTE: If blocking-basecamp+ is set, just land it for now.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 
User impact if declined: 
Testing completed: 
Risk to taking this patch (and alternatives if risky): None.

1. Display the file size of transfer prompt in human friendly format.
2. Fix a nit for button active style.
Attachment #700879 - Flags: review?(ehung)
Attachment #700879 - Flags: approval-gaia-master?(21)
Evelyn,
Could you please help to review my patch?

Stas,
I modified the content of the string id "wantToReceive".
https://github.com/mozilla-b2g/gaia/pull/7539/files#L2R195

We don't need to put the string "bytes" in the mapping content.
I'll localize it in method humanizeSize().
https://github.com/mozilla-b2g/gaia/pull/7539/files#L1R93
The localization of unit already exist in System app.

Please take a look for it in other languages.

Thanks.
Keywords: late-l10n
Attachment #700879 - Flags: review?(stas)
Comment on attachment 700879 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/7539

r=me with comments addressed.
Attachment #700879 - Flags: review?(ehung) → review+
Comment on attachment 700879 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/7539

Grabbing review from stas.

Mind modelling the size after apps/settings/locales/settings.en-US.properties:storageSize ? We should get the units and the order of them into the localization, too.

also, if you change a string, you'll need to change the ID so that localizers get a signal to catch up on the change.
Attachment #700879 - Flags: review?(stas) → review-
Comment on attachment 700879 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/7539

Evelyn,
I left some suggestion and revised it according your comment.

Axel,
I also refined the localization according your comment.
Could you help to review it again?

Thank you.
Attachment #700879 - Flags: review- → review?(l10n)
Comment on attachment 700879 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/7539

I've left more detailed comments in the PR, you'll actually need to explicitly need to use the new string format.
Attachment #700879 - Flags: review?(l10n) → review-
Comment on attachment 700879 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/7539

I'm removing the a? flag until there is a l10n r+ on the patch.
Attachment #700879 - Flags: approval-gaia-master?(21)
Comment on attachment 700879 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/7539

Pike,
I guess that you want to make the return value more clearly.
I have revised it and left some comment on github.
Thank you.
Attachment #700879 - Flags: review- → review?(l10n)
Comment on attachment 700879 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/7539

Thanks, this looks good, r=me.
Attachment #700879 - Flags: review?(l10n) → review+
Comment on attachment 700879 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/7539

NOTE: If blocking-basecamp+ is set, just land it for now.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): Let the file size readable
User impact if declined: Improve UX
Testing completed: Yes
Risk to taking this patch (and alternatives if risky): None
Attachment #700879 - Flags: approval-gaia-master?(21)
Comment on attachment 700879 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/7539

Seems a small limited safe change. a=me.
Attachment #700879 - Flags: approval-gaia-master?(21) → approval-gaia-master+
Verified fixed in 2013-01-20-07-02-02 pvt nightly b2g18 build
Status: RESOLVED → VERIFIED
This now shows xx.xxKB/xx.xxMB...blah blah blah.
Nice fix.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: