Repository navigation
ADFA-4910: Get More storage projection counts maps + adaptive size units - #276
Merged
Merged
Conversation
'Your picks' summed only ZIM (real bytes) + a tiny books estimate, so a maps-heavy selection still read 0.0 GB and small picks rounded to 0.0. - Bank the maps selection's total size (from the catalog) into MapsWishlist and add it to picksGb() so maps counts toward the projection. - Show KB/MB/GB adaptively in the legend so sub-GB picks are visible (switch the k2go_legend_your_picks placeholders from %.1f to %s across the base string and all locales to carry pre-formatted, unit-aware values). - Books stay an estimate (the Gutenberg catalog exposes no per-book size).
…the GB/MB boundary)
Every size shown in the redesign UI now goes through ByteFormatter.humanGb / humanMb (adaptive KB/MB/GB, unit picked from the rounded value): - Add humanGb(double)/humanMb(long) to the shared ByteFormatter util. - Route the per-fragment gb()/fmt() helpers (Zim landing/category/confirm/ preparing, Maps choose/confirm), GetMoreHub, WikiVariants and LibrarySize to it; drop the duplicated inline formatters and now-unused Locale imports. - Convert the k2go_legend_sys_free legend (Step 1) to %s across the base string and all 33 locales, formatting via the shared util (matches the your_picks legend).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Get More storage breakdown ("Used / System / Your picks / Free") read "Your picks 0.0" because picksGb() summed only ZIM (real bytes) plus a tiny books estimate — maps were never counted, and sub-GB picks rounded to 0.0.
Verified: Java parses, XML valid, all locales keep 4 balanced %s placeholders.