-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat(i18n): Add translations for team dashboard #3600
Conversation
WalkthroughThis pull request integrates internationalization support into the team dashboard components. The changes replace hardcoded text strings in the TeamStatsGrid and TeamStatsTable components with dynamic translation calls using the useTranslations hook from next-intl. In addition, the locale JSON files have been updated by adding a new "teamStats" section with various key–value pairs for team statistics in multiple languages. Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 ESLint
apps/web/app/[locale]/dashboard/team-dashboard/[teamId]/components/team-stats-grid.tsxOops! Something went wrong! :( ESLint: 8.46.0 ESLint couldn't find the config "next/core-web-vitals" to extend from. Please check that the name of the config is correct. The config "next/core-web-vitals" was referenced from the config file in "/apps/web/.eslintrc.json". If you still have problems, please stop by https://eslint.org/chat/help to chat with the team. apps/web/app/[locale]/dashboard/team-dashboard/[teamId]/components/team-stats-table.tsxOops! Something went wrong! :( ESLint: 8.46.0 ESLint couldn't find the config "next/core-web-vitals" to extend from. Please check that the name of the config is correct. The config "next/core-web-vitals" was referenced from the config file in "/apps/web/.eslintrc.json". If you still have problems, please stop by https://eslint.org/chat/help to chat with the team. Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
apps/web/locales/nl.json (1)
284-298
: Reviewed Dutch Team Stats Translations
The new "teamStats" section is present with the expected keys and Dutch translations. All labels appear appropriate; however, consider verifying the phrasing "Leden die Hebben Gewerkt" for natural language flow—it might be more idiomatic to use "Leden die gewerkt hebben" or a similar variant.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (15)
apps/web/app/[locale]/dashboard/team-dashboard/[teamId]/components/team-stats-grid.tsx
(5 hunks)apps/web/app/[locale]/dashboard/team-dashboard/[teamId]/components/team-stats-table.tsx
(4 hunks)apps/web/locales/ar.json
(1 hunks)apps/web/locales/bg.json
(1 hunks)apps/web/locales/de.json
(1 hunks)apps/web/locales/en.json
(1 hunks)apps/web/locales/es.json
(1 hunks)apps/web/locales/fr.json
(1 hunks)apps/web/locales/he.json
(1 hunks)apps/web/locales/it.json
(1 hunks)apps/web/locales/nl.json
(1 hunks)apps/web/locales/pl.json
(1 hunks)apps/web/locales/pt.json
(1 hunks)apps/web/locales/ru.json
(1 hunks)apps/web/locales/zh.json
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: deploy
🔇 Additional comments (17)
apps/web/app/[locale]/dashboard/team-dashboard/[teamId]/components/team-stats-grid.tsx (3)
7-7
: LGTM! Translation hook properly integrated.The useTranslations hook is correctly imported and initialized.
Also applies to: 39-39
44-44
: LGTM! Consistent translation key usage.Translation keys follow a consistent pattern using the 'common.teamStats' namespace.
Also applies to: 50-50, 59-59, 68-68, 77-77
84-84
: LGTM! Proper dependency management.The translation function 't' is correctly included in the useMemo dependency array to ensure translations update when the language changes.
apps/web/app/[locale]/dashboard/team-dashboard/[teamId]/components/team-stats-table.tsx (2)
15-15
: LGTM! Translation hook properly integrated.The useTranslations hook is correctly imported and initialized.
Also applies to: 47-47
77-77
: LGTM! Consistent translation key usage.Translation keys follow a consistent pattern using the 'common.teamStats' namespace.
Also applies to: 95-102
apps/web/locales/zh.json (1)
284-298
: LGTM! Complete and well-structured translations.The Chinese translations for team statistics are complete and properly structured. All required keys are present and match the usage in components.
apps/web/locales/he.json (1)
271-285
: LGTM! Complete and well-structured translations.The Hebrew translations for team statistics are complete and properly structured. All required keys are present and match the usage in components.
apps/web/locales/ar.json (1)
253-267
: Reviewed Arabic Team Stats Translations
The new "teamStats" section has been correctly added with translations that clearly convey the intended team statistics. Each key (e.g., "MEMBER", "TOTAL_TIME", "NO_DATA_AVAILABLE") uses accurate Arabic terminology and appears consistent with other parts of the file.apps/web/locales/en.json (1)
280-294
: Reviewed English Team Stats Section
The addition of the "teamStats" block provides clear and unambiguous labels for team dashboard statistics. The keys and corresponding text (e.g., "Member", "Total Time", "No Data Available") follow a consistent and readable convention that aligns with our internationalization approach.apps/web/locales/bg.json (1)
271-285
: New TeamStats Translations in Bulgarian LocalizationThis section correctly adds all required keys for team statistics (e.g., MEMBER, TOTAL_TIME, TRACKED, etc.) in Bulgarian. The key names are consistent with the overall dictionary style. Please ensure that the translations are verified for cultural context and that the UI components (such as TeamStatsGrid and TeamStatsTable) correctly utilize these keys via the useTranslations hook.
apps/web/locales/pl.json (1)
284-298
: New TeamStats Translations in Polish LocalizationThe new "teamStats" block has been successfully integrated with appropriate Polish translations for all required keys. The entries (like "MEMBER", "TOTAL_TIME", "TRACKED", etc.) are consistent in style with their counterparts in other locales. It would be good to double-check that the phrasing meets the tone and contextual usage within the team dashboard.
apps/web/locales/it.json (1)
284-298
: New TeamStats Translations in Italian LocalizationThe added "teamStats" section provides translations for key team dashboard metrics in Italian. The values for keys such as "MEMBER", "TOTAL_TIME", "TRACKED", and others are clear and appear to match the intended meanings. Please verify that the style (e.g., capitalization and phrasing) aligns with your overall Italian language guide and that the UI components correctly consume these entries.
apps/web/locales/ru.json (1)
284-298
: New "teamStats" Section in Russian Locale
The added "teamStats" block correctly introduces the new keys for team statistics with appropriate Russian translations. All keys (MEMBER, MEMBERS_WORKED, TOTAL_TIME, TOTAL_HOURS, TRACKED, MANUALLY_ADDED, MANUAL, ACTIVE_TIME, IDLE_TIME, IDLE, UNKNOWN_ACTIVITY, ACTIVITY_LEVEL, NO_DATA_AVAILABLE) follow the naming conventions used in other locale files.apps/web/locales/pt.json (1)
285-299
: New "teamStats" Section in Portuguese Locale
The insertion of the "teamStats" block with keys for team statistics and their corresponding Portuguese translations is accurate and consistent. The keys ("MEMBER", "MEMBERS_WORKED", "TOTAL_TIME", "TOTAL_HOURS", "TRACKED", "MANUALLY_ADDED", "MANUAL", "ACTIVE_TIME", "IDLE_TIME", "IDLE", "UNKNOWN_ACTIVITY", "ACTIVITY_LEVEL", "NO_DATA_AVAILABLE") match those in other localization files, ensuring uniformity across the project.apps/web/locales/es.json (1)
271-285
: New "teamStats" Section in Spanish Locale
The new "teamStats" block in this file is properly added with complete key-value pairs for team statistics translations. The Spanish translations (e.g. "Miembro", "Miembros que Trabajaron", "Tiempo Total", "Horas Totales", "Rastreado", etc.) are contextually appropriate and consistent with both the English keys and other locales.apps/web/locales/de.json (1)
271-285
: New 'teamStats' Translations Added SuccessfullyThe addition of the "teamStats" section brings in translations for key team dashboard metrics (e.g., "MEMBER", "MEMBERS_WORKED", "TOTAL_TIME", etc.). The keys and corresponding German translations are clear and consistent with the project’s naming conventions. Make sure that the components (like TeamStatsGrid and TeamStatsTable) correctly reference these keys via next-intl.
apps/web/locales/fr.json (1)
271-286
: Correct Integration of 'teamStats' Translations in French LocaleThe new "teamStats" section includes the French translations for team dashboard metrics (e.g., "MEMBER": "Membre", "TOTAL_TIME": "Temps Total", etc.) and mirrors the structure used in the German locale. The keys are consistent with other language files, ensuring uniform usage across the application. Please verify that these translation keys are correctly referenced by the UI components.
Description
Please include a summary of the changes and the related issues.
Type of Change
Checklist
Previous screenshots
Please add here videos or images of the previous status
Current screenshots
Please add here videos or images of the current (new) status
Summary by CodeRabbit