Skip to content

feat: update downloads title desc and translate zh-CN/zh-TW#2695

Open
btea wants to merge 6 commits intonpmx-dev:mainfrom
btea:feat/update-download-desc-and-zh-translations
Open

feat: update downloads title desc and translate zh-CN/zh-TW#2695
btea wants to merge 6 commits intonpmx-dev:mainfrom
btea:feat/update-download-desc-and-zh-translations

Conversation

@btea
Copy link
Copy Markdown
Contributor

@btea btea commented May 9, 2026

🔗 Linked issue

🧭 Context

We've made the download count descriptions clearer and more accurate, and updated the relevant Chinese translations.

📚 Description

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment May 9, 2026 9:08am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview May 9, 2026 9:08am
npmx-lunaria Ignored Ignored May 9, 2026 9:08am

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 9, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 10fab285-c642-43c7-9e03-391db45547ce

📥 Commits

Reviewing files that changed from the base of the PR and between 08b31e4 and e53bed4.

📒 Files selected for processing (15)
  • i18n/locales/cs-CZ.json
  • i18n/locales/de.json
  • i18n/locales/es.json
  • i18n/locales/fr-FR.json
  • i18n/locales/id-ID.json
  • i18n/locales/nb-NO.json
  • i18n/locales/nl.json
  • i18n/locales/pt-BR.json
  • i18n/locales/pt-PT.json
  • i18n/locales/ru-RU.json
  • i18n/locales/sr-Latn-RS.json
  • i18n/locales/uk-UA.json
  • i18n/locales/vi-VN.json
  • i18n/locales/zh-CN.json
  • i18n/locales/zh-TW.json
✅ Files skipped from review due to trivial changes (7)
  • i18n/locales/pt-PT.json
  • i18n/locales/ru-RU.json
  • i18n/locales/nl.json
  • i18n/locales/es.json
  • i18n/locales/uk-UA.json
  • i18n/locales/zh-TW.json
  • i18n/locales/id-ID.json
🚧 Files skipped from review as they are similar to previous changes (2)
  • i18n/locales/de.json
  • i18n/locales/zh-CN.json

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Version-specific download labels added to clarify per-version download info.
  • Accessibility

    • Download information now exposes version-specific accessible labels for screen readers.
  • Localisation

    • Expanded and normalised translations across many languages; new download label template added.
  • Tests

    • UI text capitalization updated (e.g. Command Palette) to match visible interface copy.

Walkthrough

The PR makes download counts on the package versions page version-aware for accessibility by adding a new i18n key package.downloads.version_distribution_title, refactors getDownloadsAriaLabel(downloads, version) to accept a version/group identifier, updates all callsites in the versions page, expands and normalises translation keys across many locales, and adjusts tests for updated UI casing.

Changes

Downloads Versioning & Localization

Layer / File(s) Summary
I18n Schema Definition
i18n/schema.json
Added version_distribution_title string property under the downloads section.
Vue Component Implementation
app/pages/package/[[org]]/[name]/versions.vue
Refactored getDownloadsAriaLabel(downloads, version) helper to include version/group identifiers in labels; updated all download UI elements (latest tag card, other tags, version rows, virtualised group headers, SSR fallback headers) to pass version or group label for aria-label and title.
English localisation
i18n/locales/en.json
Normalised capitalization/phrasing across multiple UI sections and added downloads.version_distribution_title with a {version} template.
Simplified Chinese
i18n/locales/zh-CN.json
Expanded translations: footer navigation, shortcuts, per_week_short, package.size_decrease, version timeline events and chart copy/alt, package.downloads.version_distribution_title, leaderboard.likes and related labels.
Traditional Chinese
i18n/locales/zh-TW.json
Added/expanded translations for footer/navigation, shortcuts, settings text, per_week_short, provider labels, package size decrease messaging, timeline namespace and chart copy/alt, README error string, leaderboard.likes, compare facets, and package.downloads.version_distribution_title.
Other locales (placeholders & reorders)
i18n/locales/* (cs-CZ, de, es, fr-FR, id-ID, nb-NO, nl, pt-BR, pt-PT, ru-RU, sr-Latn-RS, uk-UA, vi-VN, etc.)
Added placeholder translation keys and small reorders: command_palette scaffolding, package.size_decrease, package.versions.timeline.chart.copy_alt, leaderboard.likes, compare.scatter_chart.copy_alt, compare.facets.items.*.
Tests
test/nuxt/components/CommandPalette.spec.ts
Updated expectations to match re-capitalised UI strings (e.g., "Command palette", "Type a command...").

Possibly Related PRs

  • npmx-dev/npmx.dev#2682: Overlapping additions of i18n keys including leaderboard.likes and downloads.version_distribution_title.
  • npmx-dev/npmx.dev#2677: Related locale additions for nb-NO and keys introduced in en.json (including downloads.version_distribution_title).
  • npmx-dev/npmx.dev#2292: Previously touched the downloads.version_distribution_title key across locales.

Suggested reviewers

  • ghostdevv
  • joaopedrodcf
  • graphieros
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main changes: updating download descriptions and translating Chinese locales (zh-CN/zh-TW).
Description check ✅ Passed The description relates to the changeset by explaining that download count descriptions were clarified and Chinese translations updated, matching the actual changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
i18n/locales/cs-CZ.json Localization changed, will be marked as complete.
i18n/locales/de.json Localization changed, will be marked as complete.
i18n/locales/en.json Source changed, localizations will be marked as outdated.
i18n/locales/es.json Localization changed, will be marked as complete.
i18n/locales/fr-FR.json Localization changed, will be marked as complete.
i18n/locales/id-ID.json Localization changed, will be marked as complete.
i18n/locales/nb-NO.json Localization changed, will be marked as complete.
i18n/locales/nl.json Localization changed, will be marked as complete.
i18n/locales/pt-BR.json Localization changed, will be marked as complete.
i18n/locales/pt-PT.json Localization changed, will be marked as complete.
i18n/locales/ru-RU.json Localization changed, will be marked as complete.
i18n/locales/sr-Latn-RS.json Localization changed, will be marked as complete.
i18n/locales/uk-UA.json Localization changed, will be marked as complete.
i18n/locales/vi-VN.json Localization changed, will be marked as complete.
i18n/locales/zh-CN.json Localization changed, will be marked as complete.
i18n/locales/zh-TW.json Localization changed, will be marked as complete.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/pages/package/`[[org]]/[name]/versions.vue:
- Around line 549-555: The header rows are passing the internal group key into
getDownloadsAriaLabel which can surface an internal identifier; update the calls
that build the header aria/title text to pass the user-facing label instead (use
item.label or an explicit display string) rather than item.groupKey—specifically
change the getDownloadsAriaLabel invocations for grouped header rows
(references: getDownloadsAriaLabel, item.groupKey, item.label,
groupDownloadsMap.get(...)) so the tooltip/aria text shows the displayed group
label while still using groupDownloadsMap.get(item.groupKey)! to fetch counts.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cb71e376-6708-4870-adba-ceeb68208100

📥 Commits

Reviewing files that changed from the base of the PR and between 07a192c and 205ae65.

📒 Files selected for processing (18)
  • app/pages/package/[[org]]/[name]/versions.vue
  • i18n/locales/cs-CZ.json
  • i18n/locales/de.json
  • i18n/locales/en.json
  • i18n/locales/es.json
  • i18n/locales/fr-FR.json
  • i18n/locales/id-ID.json
  • i18n/locales/nb-NO.json
  • i18n/locales/nl.json
  • i18n/locales/pt-BR.json
  • i18n/locales/pt-PT.json
  • i18n/locales/ru-RU.json
  • i18n/locales/sr-Latn-RS.json
  • i18n/locales/uk-UA.json
  • i18n/locales/vi-VN.json
  • i18n/locales/zh-CN.json
  • i18n/locales/zh-TW.json
  • i18n/schema.json

Comment thread app/pages/package/[[org]]/[name]/versions.vue
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@i18n/locales/en.json`:
- Around line 1676-1677: The brand object in the locale JSON has duplicated
"heading" keys which overwrote the intended value and breaks the schema
expecting both "title" and "heading"; locate the duplicate keys in the brand
object and rename the first "heading": "Brand" entry to "title": "Brand" so the
object contains both "title" and "heading" properties (preserving the second
"heading": "brand") to restore schema compliance.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e5bb1aae-711c-482c-9155-501c244306c2

📥 Commits

Reviewing files that changed from the base of the PR and between 07a192c and 53e77f0.

📒 Files selected for processing (5)
  • app/pages/package/[[org]]/[name]/versions.vue
  • i18n/locales/en.json
  • i18n/locales/zh-CN.json
  • i18n/locales/zh-TW.json
  • i18n/schema.json

Comment thread i18n/locales/en.json Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 9, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
app/pages/package/[[org]]/[name]/versions.vue 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant