Last modified: 2014-03-19 19:34:45 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T37907, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35907 - History action should use Language::formatSize to display page size instead of long raw byte count
History action should use Language::formatSize to display page size instead o...
Status: NEW
Product: MediaWiki
Classification: Unclassified
History/Diffs (Other open bugs)
1.19.3
All All
: Low enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: i18n
Depends on:
Blocks: messages
  Show dependency treegraph
 
Reported: 2012-04-12 12:22 UTC by Technical 13
Modified: 2014-03-19 19:34 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Technical 13 2012-04-12 12:22:15 UTC
I see the text of this user interface is simply "(bytes)".. It seems to have no parameter for those that do not want that display. Will the wiki-core automatically adjust if I change this to say "(kilobytes)"? Otherwise, it would be nice if I could change it to this (Assuming $1 is the non-raw number of bytes): ({{#ifexpr:{{format:$1|R}}/1024^2<1|{{#ifexpr:{{format:$1|R}}/1024<1|$1 bytes|{{#expr:{{format:$1|R}}/1024round1}} kB}}|{{#expr:{{format:$1|R}}/1024^2round2}} MB}}).
Comment 1 Technical 13 2012-04-12 12:22:43 UTC
*** This bug has been confirmed by popular vote. ***
Comment 2 Sam Reed (reedy) 2012-04-13 02:42:24 UTC
MediaWiki has the functionality to format computing sizes upto and including yottabytes, though I've got a feeling that you won't be having pages that size for a while ;)

There is reasons to have bytes (rather than a rounded number which can allow for large changes of number of bytes, but not show anything as it's less than 1 kilobyte etc.

No, changing the message will just make the output lie

It could be done internally much nicer than trying to use parser functions to do it
Comment 3 Technical 13 2012-04-13 12:25:35 UTC
That doesn't make sense to me.  Looking through the history of a page, it would make more sense to me to see (1.21GB) than (1,293,745,247 bytes).  Outputs have always rounded, that is not a lie.  You say there are "reasons to have bytes (rather than a rounded number which can allow for large changes of number of bytes, but not show anything as it's less than 1 kilobyte etc."  As far as I know, MediaWiki:Pagesize is simply an output the end-user sees, and it isn't used for any computational purposes.
Comment 4 Nemo 2012-09-19 22:03:12 UTC
In other words, it would probably be possible to change the format of revision size without changing the format of the diff size.
However, there would still be a (little?) loss of information in that the user would have to make additions to compare the size of non-adjacent revisions to know if they have exactly the same size.
The "1,293,745,247 bytes" example is a bit far-fetched.
Comment 5 Krinkle 2012-09-20 16:27:33 UTC
I agree, it may not be intended as a feature but I find it quite useful from time to time to make a reasonable assumption based on the byte size.

When there is a chaos in the history (vandalism mixed, reverts, vandalism, reverts etc.), the full byte count is pretty reliable to quickly verify that the last revert's content do in fact equal the last "stable" version (as opposed to the last revert only undoing the last edit, which, if it happens often enough, can be fooled if little bits are forgotten about).

Having said that, one can just as easily select the two revs and generate a difference-view. That's more accurate anyway. So I wouldn't mind loosing this "feature", in return for shorter and more readable size measures on the history page.

I'd much rather see a history like:
* 10B
* 34.5KB
* 1.5MB
than:
* 10B
* 35,328B
* 1,573,000B

(remember, the former 3 numbers are not rounded, 1 KB === 1024 B)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links