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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
misc(treemap): i18n #12441
misc(treemap): i18n #12441
Changes from 2 commits
51bae87
7ff5861
3ca66c4
c06b918
139bcaa
cba6faa
e8dbc07
36e0838
576f374
4b0b721
12b1ba8
e150536
b76273f
78f168c
a97202d
44a203f
eddd1af
9a7f0f8
cdc698e
6f9e53c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name
orURL / Module
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which column is this in treemap app exactly? it's been awhile since I've used it should we make it part of the vercel deployments on PRs?
Identifier
perhaps?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand the on disk distinction. Just saying it's the uncompressed size?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one doesn't seem right
maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name, and....?
This comment was marked as spam.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we have a good way to handle this; thoughts? It's just a tooltip...
should we do the "nearly correct" thing and just string concat this formatted number w/ a Util.i18n.bytesUnused ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oof, um what about filling with a prefilled value and replacing in the report?
e.g. ask translators to do
{percentUnused}% bytes unused
and forrendererFormattedStrings
we prefillpercentUnused
to be123456789
or some specific predetermined number?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but how would we do the value replacement at runtime? can we do something like
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah IDK, but either way I think we can punt for now :)
Maybe we start an issue with i18n frontend use cases? This happens in the report to some extent too we just chopped off the explanations to make them less helpful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is concating % here OK?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure, good question, but there's a lot of concat going on here with the
partitionByStr:
and thenparts.join
too so I'm not sure that's even our biggest issue. Since we're best effort on this already, seems fine file an issue to solve this report use case? 🤷There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for plain % (not concatenating to another string), there's
new Intl.NumberFormat(locale, {style: 'percent'}).format(value)
. You have to be careful with report formatting stuff because Safari formatting support has really lagged the other browsers (and Node), but'percent'
has been supported for a while now.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but then this value isn't just ##%, it's put into
let str = `${TreemapUtil.formatBytes(bytes)} (${percentStr})`;
, so agree with the 🤷 :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need this? I thought this was just for the performance category renderer