Feature #22175
closedFilelist should use IEC prefixes and appropriate units for filesize.
Added by Sigfried Arnold over 14 years ago. Updated about 7 years ago.
100%
Description
The filelist shows filesizes a bit weird using an inappropriate SI prefix - it don't even uses a unit.
Examples:
124 Byte (now "124") should be "123 B"
1.428.278 Byte (now "1.4 M") should be "1.36 MiB (1.42 MB)"
1.150 Byte (now "1.1 K") should be "1.12 KiB (1.15 KB)"
http://physics.nist.gov/cuu/Units/binary.html
(issue imported from #M13645)
Files
13645.diff (2.63 KB) 13645.diff | Administrator Admin, 2010-02-24 21:31 | ||
13645_v2.diff (2.63 KB) 13645_v2.diff | Administrator Admin, 2010-02-24 21:42 |
Updated by Sigfried Arnold over 14 years ago
I refactored the code, made it more flexible and added the corrections.
The code is fully backwards compatible but is more scaleable (till inifinity) - but i just wanted to respect the dry-principle ;)
I tested the code with TYPO3 4.2, 4.3 and 4.4 alpha - everything seems to be fine.
The essential part ist now shorter, the function itself is only a few bytes larger - excluding the comments < 100 byte.
Possibly todo (additional feature): the make the default lables and calculation base configurable via localconf.
Ready to bring it into the trunk.
Updated by Sigfried Arnold over 14 years ago
Well, i just figured out, i did the patch in the wrong direction - 13645_v2.diff is now correct :D
Updated by Alexander Opitz almost 11 years ago
- Status changed from New to Needs Feedback
- Target version deleted (
0) - TYPO3 Version set to 4.3
Hi,
as this issue is very old. Is this feature missing in newer versions of TYPO3 CMS (6.1.7)?
If yes, can you provide a newer patch against master by using Gerrit? http://wiki.typo3.org/CWT
Updated by Sigfried Arnold almost 11 years ago
This feature is still missing - i'll make a patch against the current version if it is going to be implemented
Updated by Alexander Opitz almost 11 years ago
- Category set to Backend User Interface
- Status changed from Needs Feedback to New
Ok, will help you with the review process.
Updated by Mathias Schreiber almost 10 years ago
- Category changed from Backend User Interface to File Abstraction Layer (FAL)
- Target version set to 7.4 (Backend)
- Sprint Focus set to On Location Sprint
Updated by Ingo Schmitt almost 10 years ago
- PHP Version deleted (
4.3) - Complexity set to medium
Updated by Pierrick Caillon over 9 years ago
- Status changed from New to In Progress
- Assignee set to Pierrick Caillon
Updated by Gerrit Code Review over 9 years ago
- Status changed from In Progress to Under Review
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40291
Updated by Gerrit Code Review over 9 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40291
Updated by Gerrit Code Review over 9 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40291
Updated by Gerrit Code Review over 9 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40291
Updated by Gerrit Code Review over 9 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40291
Updated by Sigfried Arnold over 9 years ago
Looks good - but the unit symbol is missing - this is required
the units are not k/Ki M/Mi - they are kB/KiB, MB/MiB - and note, the k for Kilo is a small k since K is reserved for Kelvin in SI: KB would be Kelvin*Byte
and thanks for your effort
Updated by Gerrit Code Review over 9 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40291
Updated by Gerrit Code Review over 9 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40291
Updated by Gerrit Code Review over 9 years ago
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40291
Updated by Pierrick Caillon over 9 years ago
The formatting rules in http://physics.nist.gov/cuu/Units/checklist.html are used. Especially the number 15 applying to spacing.
Updated by Gerrit Code Review over 9 years ago
Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40291
Updated by Gerrit Code Review over 9 years ago
Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40291
Updated by Pierrick Caillon over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 20fa75145fe174bd8d27179f6ff6cf2b74abc1dd.
Updated by Sigfried Arnold over 9 years ago
Pierrick Caillon wrote:
The formatting rules in http://physics.nist.gov/cuu/Units/checklist.html are used. Especially the number 15 applying to spacing.
I was not talking about the spacing or the formatting, i was talking about the missing unit symbol :) currently there is just a prefix with no unit
It should be 100 MiB or 200 kB - not just 100 Mi or 200 k - the unit symbol is mandatory, else it could be "anything" - it is pretty obvious that those are Bytes, but it does not say so.
To fix this: "B" needs to be appended to each Prefix since it cannot stand there alone.
Updated by Mathias Schreiber over 9 years ago
- Sprint Focus deleted (
On Location Sprint)
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed