Skip to content

Conversation

@HouseinIsProgramming
Copy link
Collaborator

@HouseinIsProgramming HouseinIsProgramming commented Jan 30, 2026

Description

Fixes #4004
resolves OSS-24

Big diff due to added translations

Fixes localization issues in the Insights Dashboard where German (and other non-English) users saw English date formats, untranslated strings, and incorrect tooltip labels.

Changes:

  • Data table pagination: Wrap row selection text in <Trans> ("0 of 10 rows selected")
  • Dashboard widgets: Use useLocalFormat().formatRelativeDate() instead of date-fns.formatRelative() for locale-aware relative dates
  • Metrics widget: Pass translated data type labels to chart tooltip (Order Count, Order Total, Average Order Value)
  • Translations: Add missing translations for 22 locales

(same pattern, discovered while fixing):

  • System pages (healthchecks, job-queue): Same date-fnsuseLocalFormat fix
  • Dashboard empty state: Wrap "No widgets available" in <Trans>

Screenshots

image image

Checklist

📌 Always:

  • I have set a clear title
  • My PR is small and contains a single feature
  • I have checked my own PR

👍 Most of the time:

  • I have added or updated test cases
  • I have updated the README if needed

@vercel
Copy link

vercel bot commented Jan 30, 2026

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

Project Deployment Actions Updated (UTC)
vendure-storybook Ready Ready Preview, Comment Feb 1, 2026 7:52pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 30, 2026

📝 Walkthrough

Walkthrough

The PR updates dashboard components to support internationalization using Lingui. Changes include: adding documentation for i18n extraction and application commands, introducing a useLocalFormat hook for locale-aware date formatting, replacing date-fns formatRelative with the hook-provided formatRelativeDate in multiple components, wrapping untranslated strings in Trans components for localization, adding a FilterKeyLabel component for translating filter keys, and adding a new dataLabel prop to MetricsChart to display localized metric labels.

Possibly related PRs

Suggested reviewers

  • michaelbromley
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: fixing localization issues in the Insights Dashboard, directly addressing the primary objective.
Linked Issues check ✅ Passed The PR successfully addresses all coding requirements from issue #4004: locale-aware date formatting via useLocalFormat hook, translated UI strings with Trans components, localized labels for chart tooltips, and translations for 22 locales.
Out of Scope Changes check ✅ Passed All changes are within scope: localization fixes to dashboard widgets, data tables, system pages, and documentation updates directly support resolving issue #4004 objectives.
Description check ✅ Passed Pull request description comprehensively follows the template with clear summary, breaking changes assessment, screenshots, and completed checklist items.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fixing-4004

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.

@HouseinIsProgramming HouseinIsProgramming marked this pull request as ready for review February 1, 2026 19:50
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 1, 2026

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.

Localization issues in Insights Dashboard: wrong date, currency, and untranslated strings

2 participants