@@ -895,10 +895,10 @@ function buildExportFilename(extension: string): string {
895895}
896896
897897const granularityLabels = computed (() => ({
898- daily: $t (' package.downloads .granularity_daily' ),
899- weekly: $t (' package.downloads .granularity_weekly' ),
900- monthly: $t (' package.downloads .granularity_monthly' ),
901- yearly: $t (' package.downloads .granularity_yearly' ),
898+ daily: $t (' package.trends .granularity_daily' ),
899+ weekly: $t (' package.trends .granularity_weekly' ),
900+ monthly: $t (' package.trends .granularity_monthly' ),
901+ yearly: $t (' package.trends .granularity_yearly' ),
902902}))
903903
904904function getGranularityLabel(granularity : ChartTimeGranularity ) {
@@ -1321,18 +1321,18 @@ const chartConfig = computed(() => {
13211321 userOptions: {
13221322 buttons: { pdf: false , labels: false , fullscreen: false , table: false , tooltip: false },
13231323 buttonTitles: {
1324- csv: $t (' package.downloads .download_file' , { fileType: ' CSV' }),
1325- img: $t (' package.downloads .download_file' , { fileType: ' PNG' }),
1326- svg: $t (' package.downloads .download_file' , { fileType: ' SVG' }),
1327- annotator: $t (' package.downloads .toggle_annotator' ),
1324+ csv: $t (' package.trends .download_file' , { fileType: ' CSV' }),
1325+ img: $t (' package.trends .download_file' , { fileType: ' PNG' }),
1326+ svg: $t (' package.trends .download_file' , { fileType: ' SVG' }),
1327+ annotator: $t (' package.trends .toggle_annotator' ),
13281328 },
13291329 callbacks: {
13301330 img : ({ imageUri }: { imageUri: string }) => {
13311331 loadFile (imageUri , buildExportFilename (' png' ))
13321332 },
13331333 csv : (csvStr : string ) => {
13341334 const PLACEHOLDER_CHAR = ' \0 '
1335- const multilineDateTemplate = $t (' package.downloads .date_range_multiline' , {
1335+ const multilineDateTemplate = $t (' package.trends .date_range_multiline' , {
13361336 start: PLACEHOLDER_CHAR ,
13371337 end: PLACEHOLDER_CHAR ,
13381338 })
@@ -1360,8 +1360,9 @@ const chartConfig = computed(() => {
13601360 fontSize: isMobile .value ? 24 : 16 ,
13611361 color: pending .value ? colors .value .border : colors .value .fgSubtle ,
13621362 axis: {
1363- yLabel: $t (' package.downloads .y_axis_label' , {
1363+ yLabel: $t (' package.trends .y_axis_label' , {
13641364 granularity: getGranularityLabel (selectedGranularity .value ),
1365+ facet: $t (' package.trends.items.downloads' ),
13651366 }),
13661367 xLabel: isMultiPackageMode .value ? ' ' : xAxisLabel .value , // for multiple series, names are displayed in the chart's legend
13671368 yLabelOffsetX: 12 ,
@@ -1478,7 +1479,7 @@ const chartConfig = computed(() => {
14781479 for =" granularity"
14791480 class =" text-3xs font-mono text-fg-subtle tracking-wide uppercase"
14801481 >
1481- {{ $t('package.downloads .granularity') }}
1482+ {{ $t('package.trends .granularity') }}
14821483 </label >
14831484
14841485 <div
@@ -1490,10 +1491,18 @@ const chartConfig = computed(() => {
14901491 :disabled =" pending"
14911492 class =" w-full px-2.5 py-1.75 bg-bg-subtle font-mono text-sm text-fg outline-none appearance-none focus-visible:outline-accent/70"
14921493 >
1493- <option value =" daily" >{{ $t('package.downloads.granularity_daily') }}</option >
1494- <option value =" weekly" >{{ $t('package.downloads.granularity_weekly') }}</option >
1495- <option value =" monthly" >{{ $t('package.downloads.granularity_monthly') }}</option >
1496- <option value =" yearly" >{{ $t('package.downloads.granularity_yearly') }}</option >
1494+ <option value =" daily" >
1495+ {{ $t('package.trends.granularity_daily') }}
1496+ </option >
1497+ <option value =" weekly" >
1498+ {{ $t('package.trends.granularity_weekly') }}
1499+ </option >
1500+ <option value =" monthly" >
1501+ {{ $t('package.trends.granularity_monthly') }}
1502+ </option >
1503+ <option value =" yearly" >
1504+ {{ $t('package.trends.granularity_yearly') }}
1505+ </option >
14971506 </select >
14981507 </div >
14991508 </div >
@@ -1504,7 +1513,7 @@ const chartConfig = computed(() => {
15041513 for =" startDate"
15051514 class =" text-3xs font-mono text-fg-subtle tracking-wide uppercase"
15061515 >
1507- {{ $t('package.downloads .start_date') }}
1516+ {{ $t('package.trends .start_date') }}
15081517 </label >
15091518 <div
15101519 class =" flex items-center gap-2 px-2.5 py-1.75 bg-bg-subtle border border-border rounded-md focus-within:(border-border-hover ring-2 ring-accent/70)"
@@ -1522,7 +1531,7 @@ const chartConfig = computed(() => {
15221531
15231532 <div class =" flex flex-col gap-1" >
15241533 <label for =" endDate" class =" text-3xs font-mono text-fg-subtle tracking-wide uppercase" >
1525- {{ $t('package.downloads .end_date') }}
1534+ {{ $t('package.trends .end_date') }}
15261535 </label >
15271536 <div
15281537 class =" flex items-center gap-2 px-2.5 py-1.75 bg-bg-subtle border border-border rounded-md focus-within:(border-border-hover ring-2 ring-accent/70)"
@@ -1656,9 +1665,7 @@ const chartConfig = computed(() => {
16561665 stroke-linecap =" round"
16571666 />
16581667 </svg >
1659- <span class =" text-fg-subtle" >{{
1660- $t('package.downloads.legend_estimation')
1661- }}</span >
1668+ <span class =" text-fg-subtle" >{{ $t('package.trends.legend_estimation') }}</span >
16621669 </div >
16631670 </div >
16641671 </template >
@@ -1747,7 +1754,11 @@ const chartConfig = computed(() => {
17471754 v-if =" !chartData.dataset && !pending"
17481755 class =" min-h-[260px] flex items-center justify-center text-fg-subtle font-mono text-sm"
17491756 >
1750- {{ $t('package.downloads.no_data') }}
1757+ {{
1758+ $t('package.trends.no_data', {
1759+ facet: $t('package.trends.items.downloads'),
1760+ })
1761+ }}
17511762 </div >
17521763
17531764 <div
@@ -1756,7 +1767,7 @@ const chartConfig = computed(() => {
17561767 aria-live =" polite"
17571768 class =" absolute top-1/2 inset-is-1/2 -translate-x-1/2 -translate-y-1/2 text-xs text-fg-subtle font-mono bg-bg/70 backdrop-blur px-3 py-2 rounded-md border border-border"
17581769 >
1759- {{ $t('package.downloads .loading') }}
1770+ {{ $t('package.trends .loading') }}
17601771 </div >
17611772 </div >
17621773</template >
0 commit comments