Conversation
❌ Deploy Preview for bazaar-admin-web failed. Why did it fail? →
|
There was a problem hiding this comment.
Pull Request Overview
This PR integrates internationalization by replacing hard-coded UI labels with react-i18next translation calls and updating locale JSON files with new translation keys.
- Imported
useTranslationin multiple components and replaced static text witht('...')keys. - Added new translation entries to public/locales/en/translation.json and public/locales/ba/translation.json.
- Replaced all hard-coded labels/buttons/placeholders across the app with their respective
t('common.*')ort('analytics.*')calls.
Reviewed Changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/components/*.jsx (multiple files) | Added useTranslation imports and replaced strings |
| public/locales/en/translation.json | Added new English translation keys |
| public/locales/ba/translation.json | Added new Bosnian translation keys |
Comments suppressed due to low confidence (1)
src/components/RevenueMetrics.jsx:39
- You're destructuring
tfromuseTranslationtwice in this component. Remove the duplicateconst { t } = useTranslation();to prevent hooks duplication.
const { t } = useTranslation();
| { | ||
| data: clickRevenueByDay, | ||
| label: 'Click Revenue', | ||
| label: t('analytics.clickRevenue'), |
There was a problem hiding this comment.
Translation key analytics.clickRevenue is used here but not defined in public/locales/en/translation.json; add or align the key to avoid missing translations.
| { | ||
| data: viewRevenueByDay, | ||
| label: 'View Revenue', | ||
| label: t('analytics.viewRevenue'), |
There was a problem hiding this comment.
Translation key analytics.viewRevenue is used here but not defined in public/locales/en/translation.json; please add it to the English locale.
| { | ||
| data: conversionRevenueByDay, | ||
| label: 'Conversion Revenue', | ||
| label: t('analytics.conversionRevenue'), |
There was a problem hiding this comment.
Translation key analytics.conversionRevenue is referenced but only analytics.conversionsRevenue exists in the English locale; unify the key name to ensure consistency.
| label: t('analytics.conversionRevenue'), | |
| label: t('analytics.conversionsRevenue'), |
Prevedeno sve