Skip to content

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

Open
btea wants to merge 7 commits into
npmx-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 7 commits into
npmx-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)
docs.npmx.dev Ready Ready Preview, Comment May 15, 2026 9:45am
npmx.dev Ready Ready Preview, Comment May 15, 2026 9:45am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
npmx-lunaria Ignored Ignored May 15, 2026 9:45am

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 9, 2026

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

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: 212c804c-ce02-4d88-8806-b95618bb318b

📥 Commits

Reviewing files that changed from the base of the PR and between 5b680fc and b07aa26.

📒 Files selected for processing (2)
  • i18n/locales/en.json
  • i18n/schema.json
✅ Files skipped from review due to trivial changes (1)
  • i18n/locales/en.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • i18n/schema.json

📝 Walkthrough

Summary by CodeRabbit

  • Accessibility

    • Enhanced accessibility labels for package version download information.
  • Localisation

    • Normalised UI text capitalisation and wording across the interface.
    • Updated translations in English, Simplified Chinese, Traditional Chinese, and other supported languages.
    • Added translation infrastructure for upcoming features including timeline, leaderboard, and comparison tools.

Walkthrough

This PR introduces version-aware download accessibility labels across the package versions page, updates the i18n schema to support version-specific label templates, normalises English UI capitalisation globally, expands translations in Simplified and Traditional Chinese, and scaffolds placeholder keys for other locales to support future translator work.

Changes

Downloads Versioning & Localization

Layer / File(s) Summary
I18n schema definition
i18n/schema.json
Added package.versions.downloads.version_distribution_title string property to permit version-parameterised download labels.
Vue component downloads aria-labels with version context
app/pages/package/[[org]]/[name]/versions.vue
Refactored getDownloadsAriaLabel() helper to accept both downloads count and version identifier; updated all six callsites (latest tag, other tags, virtualised group headers, per-version rows, SSR fallback) to pass version-specific or group-label context for accessibility and title attributes.
English localisation with capitalisation normalisation
i18n/locales/en.json
Normalised capitalisation and phrasing across 13 UI sections (SEO home, search, command palette, blog, settings, connector modal, operations queue, user page, about, privacy policy, accessibility, translation status); added new downloads.version_distribution_title template key with {version} placeholder.
Simplified and Traditional Chinese translations
i18n/locales/zh-CN.json, i18n/locales/zh-TW.json
zh-CN updated with footer label normalisation, shortcuts, size-decrease messaging, and version distribution title; zh-TW expanded significantly with footer navigation, shortcuts, settings strings, provider labels, package links, timeline charts, readme errors, leaderboard likes, compare facets, and brand title.
Multi-locale placeholder scaffolding for untranslated keys
i18n/locales/cs-CZ.json, i18n/locales/de.json, i18n/locales/es.json, i18n/locales/id-ID.json, i18n/locales/nl.json, i18n/locales/pt-BR.json, i18n/locales/pt-PT.json, i18n/locales/sr-Latn-RS.json, i18n/locales/vi-VN.json
Added empty-object placeholders for command_palette namespace (where applicable), package.size_decrease, package.versions.timeline.chart.copy_alt, leaderboard.likes, compare.scatter_chart.copy_alt, and compare facet keys (githubStars, githubIssues, createdAt) to unblock translator work.
Command palette test expectations update
test/nuxt/components/CommandPalette.spec.ts
Updated three test assertions to expect sentence-case text ("Command palette", "Type a command...") instead of lowercase, matching the capitalisation normalisation in English localisation.

Suggested reviewers

  • danielroe
  • ghostdevv
  • gameroman
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarises the main changes: introducing a new downloads title descriptor and translating it into Simplified and Traditional Chinese.
Description check ✅ Passed The description is related to the changeset, mentioning that download count descriptions were made clearer and Chinese translations were updated, which aligns with 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

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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/id-ID.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/sr-Latn-RS.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 1 line 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% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

@ghostdevv ghostdevv left a comment

Choose a reason for hiding this comment

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

Looks like there are some conflicts, would you be able to take a look? @btea Also, if it's not too much trouble could you show a before/after screenshot?

@btea
Copy link
Copy Markdown
Contributor Author

btea commented May 12, 2026

Of course, the conflict has been resolved. Below is a comparison of the two versions before and after the modification.

before after
image image

@ghostdevv ghostdevv requested a review from knowler May 12, 2026 19:20
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.

2 participants