Review main Abandoned

42900[TASK] Set "si" as default for filesizes

Stefan Froemken CR 0 V 0 Easy +23 −12 updated 03/31/16, 21:02

Commit message

The filesize labels like Ki are not well known to the
outer world. This patch sets "si" as new default
which is configurable within the install tool.
Furthermore a "B" is appended to all labels.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 9

Review log 62

Show 37 earlier messages
  1. Stefan Froemken uploaded patch set 1 08/28/15, 07:24

  2. Mathias Brodala commented on patch set 1 08/28/15, 07:30

    configurable
    within the install tool
    Furthermore a "B" is appended to all labels.
  3. Stefan Froemken uploaded patch set 2 08/28/15, 07:36

  4. Stefan Froemken uploaded patch set 3 08/28/15, 07:39

  5. Stefan Froemken commented on patch set 1 08/28/15, 07:41

    Reply

    done

    Reply

    done

    Reply

    done
  6. Stefan Froemken uploaded patch set 4 08/28/15, 07:46

  7. Andreas Kienast voted on patch set 4 CR +1 08/28/15, 07:51

  8. Morton Jonuschat updated the commit message in patch set 5 08/28/15, 08:48

  9. Andreas Kienast voted on patch set 5 CR +1 08/28/15, 08:49

  10. Morton Jonuschat commented on patch set 5 V -1 08/28/15, 08:55

    Unit tests fail. On it
  11. Morton Jonuschat uploaded patch set 6 08/28/15, 09:02

  12. Morton Jonuschat commented on patch set 6 CR +1 V +1 08/28/15, 09:02

    Verified by unit tests
  13. Andreas Kienast voted on patch set 6 CR +1 09/01/15, 09:15

  14. Wouter Wolters commented on patch set 6 CR -1 09/02/15, 16:57

    failing unit tests in ext:form
  15. Morton Jonuschat uploaded patch set 7 09/02/15, 17:29

  16. Morton Jonuschat commented on patch set 7 09/02/15, 17:30

    Rebased & adjusted EXT:form expectations
  17. Wouter Wolters voted on patch set 7 CR +1 09/02/15, 20:30

  18. Morton Jonuschat voted on patch set 7 CR +1 V +1 09/02/15, 20:32

  19. Frank Nägler commented on patch set 7 CR -1 09/04/15, 14:20

    Feature-22175-SupportIecSiUnitsInFileSizeFormatting.rst

    since this change was releases with 7.4 I think we have to add a new rst file. Change the old (released) rst file is not a good idea. Also I don't think that this is a bugfix, it is a task
  20. Andreas Kienast commented on patch set 7 09/25/15, 06:21

    ping
  21. Morton Jonuschat uploaded patch set 8 09/25/15, 08:58

  22. Nicole Hummel voted on patch set 8 CR +1 09/25/15, 09:05

  23. Frank Nägler voted on patch set 8 CR +1 09/25/15, 09:06

  24. Nicole Hummel commented on patch set 8 V +1 09/25/15, 09:13

    I would however opt to remove the $GLOBALS['TYPO3_CONF_VARS']['SYS']['filesizePrefix'] configuration completly to make life easier
  25. Nicole Hummel commented on patch set 8 09/25/15, 09:16

    Fine with configuration as the labels were introduces as new feature just a while ago with https://review.typo3.org/40291/
  26. Frank Nägler commented on patch set 8 V -1 09/25/15, 09:23

    on it
  27. Frank Nägler uploaded patch set 9 09/25/15, 09:28

  28. Frank Nägler voted on patch set 9 CR +1 V +1 09/25/15, 09:29

  29. Nicole Hummel voted on patch set 9 CR +1 V +1 09/25/15, 09:37

  30. Pierrick Caillon commented on patch set 9 CR -1 09/25/15, 09:51

    GeneralUtility.php:908

    I will not recommend adding the 'B' suffix explicitly because it can vary with language. For example, in French, it is the character 'o'. Impact other changes.
  31. Frank Nägler commented on patch set 9 CR -1 09/25/15, 10:00

    GeneralUtility.php:908 Reply

    you are right, good catch, thx. I will change it!
  32. Frank Nägler uploaded patch set 10 09/25/15, 10:03

  33. Frank Nägler voted on patch set 10 CR +1 V +1 09/25/15, 10:03

  34. Nicole Hummel commented on patch set 10 V -1 09/25/15, 10:07

    Failing unit tests now. Will push an update
  35. Nicole Hummel uploaded patch set 11 09/25/15, 10:09

  36. Nicole Hummel voted on patch set 11 CR +1 V +1 09/25/15, 10:09

  37. Morton Jonuschat commented on patch set 11 CR -1 V -1 09/25/15, 10:22

    We now have a mix of output with 'B' appended for SI units, without 'B' for IEC units and thus just the prefix as output at some places in the core
  1. Morton Jonuschat commented on patch set 11 CR 0 V 0 09/25/15, 10:31

    Undecided on this after discussion on slack
  2. Pierrick Caillon commented on patch set 11 09/25/15, 10:36

    I think the patch should focus on changing the default and providing the global configuration for the default, thus reverting some of the changes. The configuration should include the base if not a keyword but label list. Or includes the way to have the unit name translated correctly.
  3. Jan Helke commented on patch set 11 CR -1 09/25/15, 15:44

    DefaultConfiguration.php:235

    Isn't that a suffix?
  4. Morton Jonuschat commented on patch set 11 09/25/15, 15:46

    DefaultConfiguration.php:235 Reply

    Nope, k, M, G (as well as Ki, Mi, Gi) are actually prefixes to a unit like 'B'
  5. Jan Helke commented on patch set 11 CR 0 09/25/15, 16:02

    OK. I see.
  6. Michael Oehlhof voted on patch set 11 CR +1 09/25/15, 20:42

  7. Michael Oehlhof voted on patch set 11 V +1 09/26/15, 00:46

  8. Frank Nägler commented on patch set 11 CR -1 09/28/15, 08:04

    the current state is inconsistent. KB vs Ki etc. We should use KB and KiB, GB and GiB etc.... The current implementation is not multilanguage ready and need more adjustments. But the solution in this patch use two different systems which make no sense.
  9. Morton Jonuschat uploaded patch set 12 09/29/15, 03:05

  10. Morton Jonuschat commented on patch set 12 CR +1 V +1 09/29/15, 03:10

    After discussing this further on slack we decided to revert back to patchset 9. As a strong default labels based on the 'B' as acronym for 'bytes' are correct in a large part of the world and understood by an even wider audience. Usages in the core that should be translated should be tacked in a dedicated issue, this method provides the means for that by passing in a set of translated labels.
  11. Stefan Froemken commented on patch set 12 V -1 09/29/15, 04:30

    Before merging it. I have found some more old labels in css_styled_content: tt_content.uploads.20.renderObj.40.bytes.labels > Maybe we should remove that line and it constant, too.
  12. Morton Jonuschat commented on patch set 12 10/02/15, 06:21

    Stefan, are you taking care of this?
  13. Stefan Froemken uploaded patch set 13 10/05/15, 11:51

  14. Morton Jonuschat uploaded patch set 14 10/16/15, 17:35

  15. Morton Jonuschat voted on patch set 14 CR +1 V +1 10/16/15, 17:36

  16. Xavier Perseguers commented on patch set 14 10/16/15, 18:28

    GeneralUtilityTest.php:797

    1 does not lead to plural form for "Bytes" ("S")
  17. Morton Jonuschat commented on patch set 14 10/16/15, 18:47

    GeneralUtilityTest.php:797 Reply

    formatSize() has no notion of inflections, singular plurals forms. If you look at the changeset you'll see that "bytes" has been removed from different places in the code that didn't care if it was used in singular or plural form. So while it's grammatically incorrect for this one case of „1 Byte“ I don't see implementing singular and plural forms in the scope of this patch. If we do we need to tackle multi-language too as we would then have to cope with up to 6 forms of pluralization depending on the language.
  18. Stefan Neufeind commented on patch set 14 10/17/15, 09:21

    I wondered if international they also use the uppercase "Bytes" or would lowercase it. And that further lead me to the thought if those units are maybe locale-dependent? If we'd need a locale for those default-labels maybe please file a new issue so that can be taken care of in a separate patch.

    GeneralUtility.php:948

    suffix instead of prefix

    Important-69380-SetSIAsTheDefaultUnitFileSizes.rst:10

    Should we add that "B" or in the case of just bytes then "Bytes" is always appended?

    GeneralUtilityTest.php:797 Reply

    fine with me with just the plural, for the scope of this patch
  19. Stefan Neufeind commented on patch set 14 CR -1 10/17/15, 09:21

    prefix -> suffix
  20. Andreas Kienast commented on patch set 14 10/17/15, 13:00

    Nope, it's a prefix of the unit "bytes". We had that multiple times now :)
  21. Stefan Neufeind commented on patch set 14 10/17/15, 13:14

    It says "filesizePrefix" and it's appended to the actual size. Also the "B" for "Bytes" is in the default-label itself now. But feel free to override me -1.
  22. Morton Jonuschat commented on patch set 14 10/17/15, 13:26

    As Andreas said the discussions about I18n, l10n, prefix/suffix etc. have all been had multiple times. To be totally correct feel free to rename it to filesizeUnitPrefix or something like that, change the upper-/lowercase of the words and enhance the docs as much as you feel the need. Too much time has been wasted on this simple change as is. Now I'll excuse myself from any further discussion on this topic, ping me if you need a final review/verification..
  23. Alexander Opitz commented on patch set 14 CR -1 10/30/15, 09:20

    One nitpick.

    GeneralUtility.php:944

    The SI Prefix for kilo is "k" in lower case. (The KB defined in JEDEC has 1024 as base)

    GeneralUtility.php:948 Reply

    Is filesizePrefixStandard better? As you can only select a standard (iec or si).
  24. Morton Jonuschat wrote 10/30/15, 09:21

    Removed the following approvals: * Code-Review+1 by Morton Jonuschat <m.jonuschat@mojocode.de> * Verified+1 by Morton Jonuschat <m.jonuschat@mojocode.de>
  25. Morton Jonuschat abandoned the change 03/31/16, 21:02

    due to inactivity