Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion client/modules/IDE/components/AssetSize.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { useSelector } from 'react-redux';
import prettyBytes from 'pretty-bytes';

Expand All @@ -18,6 +19,8 @@ const formatPercent = (percent) => {

/* Eventually, this copy should be Total / 250 MB Used */
const AssetSize = () => {
const { t } = useTranslation();

const totalSize = useSelector(
(state) => state.user.totalSize || state.assets.totalSize
);
Expand All @@ -38,7 +41,9 @@ const AssetSize = () => {
<p className="asset-current">
{currentSize} ({percent})
</p>
<p className="asset-max">Max: {sizeLimit}</p>
<p className="asset-max">
{t('AssetList.maximum')}: {sizeLimit}
</p>
</div>
);
};
Expand Down
3 changes: 2 additions & 1 deletion translations/locales/en-US/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,8 @@
"NoUploadedAssets": "No uploaded assets.",
"HeaderName": "Name",
"HeaderSize": "Size",
"HeaderSketch": "Sketch"
"HeaderSketch": "Sketch",
"maximum": "Maximum"
},
"Feedback": {
"Title": "p5.js Web Editor | Feedback",
Expand Down
Loading