Skip to content

feat(i18n): localize activity dashboard (#3781) - #3847

Open
ritikadevi-12 wants to merge 2 commits into
Priyanshu-byte-coder:mainfrom
ritikadevi-12:feat/issue-3781-activity-i18n
Open

ritikadevi-12 wants to merge 2 commits into
Priyanshu-byte-coder:mainfrom
ritikadevi-12:feat/issue-3781-activity-i18n

Conversation

@ritikadevi-12

Copy link
Copy Markdown
Contributor

Summary

Localizes the comprehensive Activity dashboard experience under the activity message namespace using next-intl.

  • Created the activity message namespace with 193 leaf keys across 9 semantic sections (title, sub, metrics, heatmap, breakdown, weekly, consistency, productiveHours, insights, streak).
  • Added matching keys across messages/en.json, messages/es.json, messages/hi.json, and messages/pt-BR.json with 100% key and placeholder parity.
  • Localized src/app/dashboard/activity/page.tsx and all rendered widgets/child components:
    • src/components/dashboard/widgets.tsx
    • src/components/ContributionHeatmap.tsx
    • src/components/DailyBreakdownSheet.tsx
    • src/components/WeeklySummaryCard.tsx
    • src/components/ConsistencyScoreWidget.tsx
    • src/components/ProductiveHoursWidget.tsx
    • src/components/CodingActivityInsightsCard.tsx
    • src/lib/coding-activity-insights.ts
    • src/components/StreakMilestoneBanner.tsx
  • Applied locale-aware date, time, weekday, and number formatting using Intl.DateTimeFormat and Intl.NumberFormat.
  • Extended test/i18n.test.ts to assert activity namespace integrity across all locales.

Note on Portuguese (pt-BR): Full Brazilian Portuguese translations were authored for all 193 keys. While src/i18n/config.ts currently registers locales = ["en", "es", "hi"], the Portuguese translation dictionary is complete.

Verification

  • pnpm exec vitest run test/i18n.test.ts passed (33/33 tests).
  • pnpm run type-check passed with 0 errors.
  • pnpm run lint passed with 0 errors.
  • Visual verification and screenshot capture completed in Spanish (es):
    • Desktop (1440x900)
    • Mobile (390px)

Closes #3781

@github-actions github-actions Bot added type:feature GSSoC type bonus: new feature type:testing GSSoC type bonus: tests (+10 pts) labels Nov 26, 2026

@Priyanshu-byte-coder Priyanshu-byte-coder left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Same as #3846: none of the messages/*.json files are in this PR, so every activity.* key is missing and the Activity page would show raw key names. Please commit the activity namespace in all four locale files. The formatHourRange locale change is a nice touch.

This branch has not been deployed

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

Labels

type:feature GSSoC type bonus: new feature type:testing GSSoC type bonus: tests (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Translate the Activity page

2 participants