Attachment size displayed as {} bytes

RESOLVED FIXED

Status

--
minor
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: jwhitlock, Assigned: jezdez)

Tracking

({in-triage})

Details

(Whiteboard: [specification][type:bug])

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
What did you do?
================
1. As logged-in user, go to https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl$edit
2. Scroll to Attachment list at bottom

What happened?
==============
The size of attachments is listed as "{} bytes"

What should have happened?
==========================
The size of the attachments should be displayed

Is there anything else we should know?
======================================
It is difficult to reproduce this on a developer box, because a 500 error is raised when reading the size of attachments that are not in the local box.
(Reporter)

Comment 1

3 years ago
Created attachment 8690877 [details]
Screenshot of "{} bytes" display
(Reporter)

Comment 2

3 years ago
Recorded 500 error in development as bug 1227197
We have two localized strings:
* "%(bytes)s bytes" in kuma/attachments/templates/attachments/attachment_detail.html
* "%s bytes" in kuma/attachments/templates/attachments/includes/attachment_row.html

Whatever the fix is here we should also normalize on the former.
Severity: normal → minor
Keywords: in-triage
(Reporter)

Updated

3 years ago
Duplicate of this bug: 1240351
Component: General → File attachments

Comment 5

3 years ago
I uploaded https://github.com/mozilla/kuma/pull/3803

Comment 6

3 years ago
(no editbugs so I can't claim the bug)

Updated

3 years ago
Assignee: nobody → krenair

Updated

3 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 7

3 years ago
This will be fixed in https://github.com/mozilla/kuma/pull/3769
Assignee: krenair → jezdez

Comment 8

3 years ago
Commit pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/a24447c09d32380b08d0c19e2bd0d4dc617b93a8
Fix bug 1227193 - Render attachment size correctly.

Also normalized the translated string to one form.

Updated

3 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.