diff --git a/app/pages/[...package].vue b/app/pages/[...package].vue index b32e1bbafe..9fa80ce847 100644 --- a/app/pages/[...package].vue +++ b/app/pages/[...package].vue @@ -134,10 +134,15 @@ const sizeTooltip = computed(() => { const chunks = [ displayVersion.value && displayVersion.value.dist.unpackedSize && - `${formatBytes(displayVersion.value.dist.unpackedSize)} unpacked size (this package)`, + $t('package.stats.size_tooltip.unpacked', { + size: formatBytes(displayVersion.value.dist.unpackedSize), + }), installSize.value && installSize.value.dependencyCount && - `${formatBytes(installSize.value.totalSize)} total unpacked size (including all ${installSize.value.dependencyCount} dependencies for linux-x64)`, + $t('package.stats.size_tooltip.total', { + size: formatBytes(installSize.value.totalSize), + count: installSize.value.dependencyCount, + }), ] return chunks.filter(Boolean).join('\n') }) diff --git a/i18n/locales/en.json b/i18n/locales/en.json index 9c3071c69e..dae801ece6 100644 --- a/i18n/locales/en.json +++ b/i18n/locales/en.json @@ -132,7 +132,11 @@ "vulns": "Vulns", "updated": "Updated", "view_dependency_graph": "View dependency graph", - "inspect_dependency_tree": "Inspect dependency tree" + "inspect_dependency_tree": "Inspect dependency tree", + "size_tooltip": { + "unpacked": "{size} unpacked size (this package)", + "total": "{size} total unpacked size (including all {count} dependencies for linux-x64)" + } }, "links": { "repo": "repo", diff --git a/lunaria/files/en-US.json b/lunaria/files/en-US.json index 9c3071c69e..dae801ece6 100644 --- a/lunaria/files/en-US.json +++ b/lunaria/files/en-US.json @@ -132,7 +132,11 @@ "vulns": "Vulns", "updated": "Updated", "view_dependency_graph": "View dependency graph", - "inspect_dependency_tree": "Inspect dependency tree" + "inspect_dependency_tree": "Inspect dependency tree", + "size_tooltip": { + "unpacked": "{size} unpacked size (this package)", + "total": "{size} total unpacked size (including all {count} dependencies for linux-x64)" + } }, "links": { "repo": "repo",