Skip to content

Feature/translation#175

Merged
mresidovic1 merged 8 commits intodevelopfrom
feature/translation
Jun 2, 2025
Merged

Feature/translation#175
mresidovic1 merged 8 commits intodevelopfrom
feature/translation

Conversation

@fbakovic1
Copy link
Contributor

Prevedeno sve

@netlify
Copy link

netlify bot commented Jun 2, 2025

Deploy Preview for bazaar-admin-web failed. Why did it fail? →

Name Link
🔨 Latest commit 1c51364
🔍 Latest deploy log https://app.netlify.com/projects/bazaar-admin-web/deploys/683db6a1a96188000868f7ef

@mresidovic1 mresidovic1 merged commit 8bcf73f into develop Jun 2, 2025
0 of 5 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 useTranslation in multiple components and replaced static text with t('...') 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.*') or t('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 t from useTranslation twice in this component. Remove the duplicate const { t } = useTranslation(); to prevent hooks duplication.
const { t } = useTranslation();

{
data: clickRevenueByDay,
label: 'Click Revenue',
label: t('analytics.clickRevenue'),
Copy link

Copilot AI Jun 2, 2025

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
{
data: viewRevenueByDay,
label: 'View Revenue',
label: t('analytics.viewRevenue'),
Copy link

Copilot AI Jun 2, 2025

Choose a reason for hiding this comment

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

Translation key analytics.viewRevenue is used here but not defined in public/locales/en/translation.json; please add it to the English locale.

Copilot uses AI. Check for mistakes.
{
data: conversionRevenueByDay,
label: 'Conversion Revenue',
label: t('analytics.conversionRevenue'),
Copy link

Copilot AI Jun 2, 2025

Choose a reason for hiding this comment

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

Translation key analytics.conversionRevenue is referenced but only analytics.conversionsRevenue exists in the English locale; unify the key name to ensure consistency.

Suggested change
label: t('analytics.conversionRevenue'),
label: t('analytics.conversionsRevenue'),

Copilot uses AI. Check for mistakes.
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.

4 participants