Skip to content

fix(dashboard): Fix localization issues in Insights Dashboard - #4189

Merged
HouseinIsProgramming merged 14 commits into
masterfrom
fixing-4004
Feb 27, 2026
Merged

fix(dashboard): Fix localization issues in Insights Dashboard#4189
HouseinIsProgramming merged 14 commits into
masterfrom
fixing-4004

Conversation

@HouseinIsProgramming

@HouseinIsProgramming HouseinIsProgramming commented Jan 30, 2026

Copy link
Copy Markdown
Collaborator

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

vercel Bot commented Jan 30, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
vendure-storybook Ready Ready Preview, Comment Feb 27, 2026 10:55am

Request Review

@coderabbitai

coderabbitai Bot commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The head commit changed during the review from 1895a1b to 81181c4.

📝 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 unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fixing-4004

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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

sonarqubecloud Bot commented Feb 1, 2026

Copy link
Copy Markdown

@michaelbromley

Copy link
Copy Markdown
Member

Looks good, just needs the merges handled

@HouseinIsProgramming
HouseinIsProgramming merged commit 7475025 into master Feb 27, 2026
21 checks passed
@HouseinIsProgramming
HouseinIsProgramming deleted the fixing-4004 branch February 27, 2026 11:05
@vendure-ci-automation-bot vendure-ci-automation-bot Bot locked and limited conversation to collaborators Feb 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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