Skip to content

fix(i18n): improve Japanese translation for chart alt text#2902

Open
shuuji3 wants to merge 4 commits into
mainfrom
shuuji3/fix/improve-japanese-translation
Open

fix(i18n): improve Japanese translation for chart alt text#2902
shuuji3 wants to merge 4 commits into
mainfrom
shuuji3/fix/improve-japanese-translation

Conversation

@shuuji3

@shuuji3 shuuji3 commented Jun 13, 2026

Copy link
Copy Markdown
Member

🔗 Linked issue

N/A

🧭 Context

There was a small error in the download chart alt text transtation where there are two "。" (period equivalent in Japanese) in the middle of the alt text.

📚 Description

  • Fixed the above issue and improve the alt text translation (used more common terminology in the math)
  • Plus, added a new missing translation.

@vercel

vercel Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Jun 15, 2026 2:35pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Jun 15, 2026 2:35pm
npmx-lunaria Ignored Ignored Jun 15, 2026 2:35pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Added Japanese translations for new keyboard shortcuts, command palette entries for package navigation, stats functionality labels, timeline features, and updated trend analysis terminology for improved clarity.
    • Extended localisation coverage for the package comparison interface, including new GitHub Forks labels and descriptions, plus comprehensive diff-related status messages for truncated and large diffs.

Walkthrough

This pull request expands Japanese localization across multiple UI features in a single file. It adds new navigation shortcuts and command palette entries; introduces a complete new noodles section; extends package stats, replacement, and card metadata translations; revises trend chart terminology and copy; and enhances compare UI with GitHub forks facet and diff-handling strings.

Changes

Japanese Localization Updates

Layer / File(s) Summary
Navigation shortcuts and command palette entries
i18n/locales/ja-JP.json
New keyboard shortcut labels for opening the timeline and showing stats; command palette entries extended with changelog and stats keys under the package navigation group.
Noodles feature translation section
i18n/locales/ja-JP.json
New top-level noodles translation object introduced with complete UI strings including metadata, carousel/lens navigation, and missing-item messaging.
Package stats and card metadata translations
i18n/locales/ja-JP.json
Package replacement copy extended with simple and documented keys; new package.stats labels for main_information, trends, and version_distribution; stats link navigation entry added; package.card.version translation introduced for version label display.
Trend chart terminology and copy revision
i18n/locales/ja-JP.json
Trend strength descriptors updated from "強い"/"弱い" (strong/weak) to "上昇"/"下降" (ascending/descending); analysis and general_description alt-text strings refined with adjusted wording and watermark placement.
Compare UI facet and diff handling strings
i18n/locales/ja-JP.json
GitHub forks facet added under compare.facets.items.githubForks with label and description; new diff UI translation strings introduced for diff_truncated, large_diff_mode, and large_diff_options_disabled.

Possibly related PRs

  • npmx-dev/npmx.dev#2745: Both PRs modify i18n/locales/ja-JP.json with overlapping updates to trend chart copy and compare UI diff-related strings.
  • npmx-dev/npmx.dev#2677: Both PRs update i18n locale JSON strings for timeline-related keyboard shortcuts and package navigation entries across locales.

Suggested reviewers

  • graphieros
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing and improving Japanese translations for chart alt text, which aligns with the core focus of the PR.
Description check ✅ Passed The description is related to the changeset, explaining the specific error fixed (duplicate period characters) and the improvements made to the translation.
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
  • Commit unit tests in branch shuuji3/fix/improve-japanese-translation

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

github-actions Bot commented Jun 13, 2026

Copy link
Copy Markdown

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/ja-JP.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.

@codecov

codecov Bot commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@gameroman gameroman added the i18n Related to internationalization label Jun 13, 2026
@trueberryless

Copy link
Copy Markdown
Member

Do you think you could also add the other 36 missing translations keys?

  • shortcuts.open_stats
  • command_palette.package.stats
  • noodles.title
  • noodles.meta_description
  • noodles.latest
  • noodles.what_is
  • noodles.what_is_body
  • noodles.empty
  • noodles.load_more
  • noodles.dates
  • noodles.shipped_in
  • noodles.credits
  • noodles.learn_more
  • noodles.carousel_prev
  • noodles.carousel_next
  • noodles.carousel_dots
  • noodles.carousel_jump
  • noodles.lens_label
  • noodles.lens_slide
  • noodles.lens_slide_position
  • noodles.back_to_archive
  • noodles.missing.title
  • noodles.missing.body
  • package.replacement.simple
  • package.replacement.documented
  • package.stats.main_information
  • package.stats.trends
  • package.stats.version_distribution
  • package.links.stats
  • package.trends.embedding.chart
  • package.trends.embedding.copy_url
  • package.trends.embedding.preview
  • package.trends.embedding.tip
  • compare.diff_truncated

(package.card.version was already added in this PR)

@shuuji3

shuuji3 commented Jun 14, 2026

Copy link
Copy Markdown
Member Author

Oh, I tried https://npmx.dev/translation-status for the first time and I thought there is only one missing key, but this page actually reflects the only stable version? 🤔

screenshot of status page: 'ja-JP 1 missing translation'

Anyway, I'm going to translate them all soon today.

@shuuji3 shuuji3 marked this pull request as draft June 14, 2026 01:57
@trueberryless

Copy link
Copy Markdown
Member

Oh, I tried https://npmx.dev/translation-status for the first time and I thought there is only one missing key, but this page actually reflects the only stable version? 🤔

screenshot of status page: 'ja-JP 1 missing translation'

Yeah, unfortunately the current state from main doesn't load under https://main.npmx.dev/translation-status, so you have to work with our i18n commands to be sure...

I ran node scripts/compare-translations.ts ja-JP to get the output 👍

@graphieros graphieros left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

^^

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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/ja-JP.json`:
- Around line 158-159: The "changelog" label in the locale file is left in
English while adjacent command labels like "stats" are translated to Japanese
for consistency. Translate the value of the "changelog" key from "Changelog" to
its Japanese equivalent (suggested: "変更履歴") to maintain consistent localization
throughout the menu.
🪄 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: 138de581-cac4-479e-8c9c-ce686ce5853a

📥 Commits

Reviewing files that changed from the base of the PR and between 7838bec and 3df327f.

📒 Files selected for processing (1)
  • i18n/locales/ja-JP.json

Comment thread i18n/locales/ja-JP.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

i18n Related to internationalization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants