Skip to content

Conversation

@nfebe
Copy link
Contributor

@nfebe nfebe commented Oct 24, 2025

No description provided.

Signed-off-by: nfebe <fenn25.fn@gmail.com>
@nfebe nfebe marked this pull request as draft October 24, 2025 21:38
@sourceant
Copy link

sourceant bot commented Oct 24, 2025

Code Review Summary

This pull request introduces significant improvements in internationalization (i18n) across several key components and the useStatistics composable. Hardcoded strings have been replaced with dynamic translations using useI18n(), and the language selection mechanism has been made more robust by deriving available languages from the i18n configuration.

🚀 Key Improvements

  • Full internationalization of UI strings in TDashboardTopCard.vue, TTransactionCard.vue, WalletCard.vue, LanguageSelector.vue, pages/dashboard/index.vue, and pages/index.vue.
  • Dynamic language detection and selection in LanguageSelector.vue based on useI18n().locales.
  • Centralized languageInfo mapping for flags and names in LanguageSelector.vue.
  • Simplified AVAILABLE_PERIODS in composables/useStatistics.ts to focus on relevant periods.
  • Added locales files for German (de.json), English (en.json), French (fr.json), and Spanish (es.json) to support the new i18n features.

💡 Minor Suggestions

  • Remove outdated comments in LanguageSelector.vue that refer to manual language array definition (lines 25-31).
  • Remove dead code related to unsupported periods ('all_time', '90d', 'custom') from the getDateRangeForPeriod function in composables/useStatistics.ts.

Copy link

@sourceant sourceant bot left a comment

Choose a reason for hiding this comment

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

Review complete. See the overview comment for a summary.

Comment on lines -25 to -31
// 2. Add a new object to this 'languages' array below.
// 3. Copy the corresponding SVG file from 'node_modules/country-flag-icons/3x2/'
// to the 'public/flags/' directory.
// Example command: cp node_modules/country-flag-icons/3x2/US.svg public/flags/us.svg
const languages = ref([
{ code: 'GB', name: 'English', flagUrl: '/flags/gb.svg' },
{ code: 'FR', name: 'French', flagUrl: '/flags/fr.svg' },
Copy link

Choose a reason for hiding this comment

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

These comments are no longer relevant as the language array is now dynamically generated from locales.value and languageInfo. Removing them will keep the code clean and prevent confusion.

Comment on lines -150 to -154
{ label: 'All time', value: 'all_time', days: 0 },
{ label: 'This week', value: 'current_week', days: 0 },
{ label: 'This month', value: 'current_month', days: 0 },
{ label: 'Last 3 months', value: '90d', days: 90 },
{ label: 'Custom', value: 'custom', days: 0 }
Copy link

Choose a reason for hiding this comment

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

The AVAILABLE_PERIODS array has been updated in the diff to only include thisWeek, thisMonth, and thisYear. The entries for 'All time', 'Last 3 months', and 'Custom' are removed from the definition, which is appropriate for simplifying the period selection.

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.

2 participants