Skip to content

Conversation

@EnesEfeTokta
Copy link
Owner

This pull request introduces a comprehensive localization and language settings system to the application, along with several related DTO and service updates. The main changes include adding language support to user settings, implementing resource-based localization, and refactoring user profile and settings DTOs for extensibility and clarity.

Localization and Language Support

  • Added a new LanguageType enum and integrated it into user settings DTOs (UserAppSettingsDto, UserAppSettingsUpdateDto), enabling users to select their preferred language. [1] [2] [3]
  • Implemented a resource-based localization system using a new TranslationManager singleton and a TranslateExtension for XAML, allowing UI strings to be translated dynamically based on user settings. [1] [2] [3]
  • Registered new services (IApplySettingsService, IDialogService, IStoresRefresh) and their implementations in the dependency injection container to support the new settings and localization features. [1] [2]

DTO Refactoring and Additions

  • Replaced and expanded user profile and settings DTOs with more detailed versions, such as UserProfileDto, and added new DTOs for updating user information (e.g., UpdateUserNameDto, UpdateUserEmailDto, UpdateUserPasswordDto, UpdateProfilePictureDto). Removed obsolete DTOs (ProfileSettingsDto, ProfileSettingsUpdateDto, old UserProfileDto). [1] [2] [3] [4] [5] [6] [7] [8]

Other Enhancements

  • Extended the ChangeSummaryDto to include daily high and low values for currencies.

These changes lay the groundwork for a localized, user-customizable experience and improve the maintainability and clarity of DTOs and service registrations.

…ialog and refresh services

Replaces and restructures user and settings DTOs, expanding UserModel and UserProfileDto with detailed fields. Adds dialog and store refresh services, updates dependency injection, and refactors ViewModels to use the new IUserStore and related services for profile, app, and notification settings. Implements event-driven updates for currencies and user data, and introduces periodic store refresh in the BottomBarViewModel.
Introduced DailyChange and DailyChangeType properties to CurrencyModel, updated ChangeSummaryDto to include daily high/low, and modified the view and view model to display and bind daily change values with appropriate foreground color.
Introduces localization infrastructure with resource files for multiple languages and a translation manager. Adds language selection to user settings DTOs and updates the LanguageType enum to use culture codes. Refactors related view models and project files to support dynamic language switching.
…sService

Introduced ApplySettingsService and IApplySettingsService for handling application setting changes. Enhanced TranslationManager to support dynamic language updates based on user settings and ApplySettingsService events. Updated UserStore and AppSettingsContentViewModel to integrate ApplySettingsService. Refactored XAML views to use localized strings via the Translate helper, and expanded resource files with new localization keys and translations for multiple languages. Changed LanguageType enum to use en_US instead of en_EN.
Cleaned up unnecessary using statements in App.xaml.cs, AppSettingsContentViewModel.cs, NotificationSettingsContentViewModel.cs, and ProfileSettingsContentViewModel.cs to improve code clarity and maintainability. Also fixed minor formatting in StoresRefresh.cs constructor parameters.
@EnesEfeTokta EnesEfeTokta requested a review from Copilot August 13, 2025 06:36
@EnesEfeTokta EnesEfeTokta self-assigned this Aug 13, 2025
@EnesEfeTokta EnesEfeTokta added the enhancement New feature or request label Aug 13, 2025
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 pull request introduces a comprehensive localization and language settings system to the application, implementing resource-based translations, user-customizable language preferences, and significant refactoring of user management DTOs. The changes lay the foundation for a multi-language, user-customizable experience while improving code maintainability.

  • Adds a complete localization system with support for 6 languages (English, Turkish, German, French, Spanish, Italian) using resource files and XAML markup extensions
  • Implements language selection in user settings with dynamic UI translation capabilities
  • Refactors user profile and settings management with granular DTOs for better separation of concerns

Reviewed Changes

Copilot reviewed 59 out of 60 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
Views/*.xaml Updates UI elements to use the new translation system with {helpers:Translate} markup extensions
ViewModels/*.cs Refactors settings ViewModels to use new UserStore and granular update DTOs
Services/Users/* Complete rewrite of UserStore with new methods for updating specific user settings
Localization/*.resx Adds resource files for 6 languages with translated UI strings
Helpers/Translation*.cs Implements translation manager and XAML markup extension for dynamic localization
Dtos/ Adds new granular DTOs for user updates and removes obsolete profile DTOs
Files not reviewed (1)
  • FinTrack/Localization/Strings.Designer.cs: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

<value>Clear Form</value>
</data>
<data name="Apperance" xml:space="preserve">
<value>Apperance</value>
Copy link

Copilot AI Aug 13, 2025

Choose a reason for hiding this comment

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

There is a typo in the translation key 'Apperance'. It should be 'Appearance'.

Suggested change
<value>Apperance</value>
<data name="Appearance" xml:space="preserve">
<value>Appearance</value>

Copilot uses AI. Check for mistakes.
<data name="Clear_Form" xml:space="preserve">
<value>Formu Temizle</value>
</data>
<data name="Apperance" xml:space="preserve">
Copy link

Copilot AI Aug 13, 2025

Choose a reason for hiding this comment

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

There is a typo in the translation key 'Apperance'. It should be 'Appearance'. This error appears in all localization files.

Suggested change
<data name="Apperance" xml:space="preserve">
<data name="Appearance" xml:space="preserve">

Copilot uses AI. Check for mistakes.

SelectedCurrency.DailyHigh = summary.DailyHigh.ToString() ?? "N/A";
SelectedCurrency.DailyLow = summary.DailyLow.ToString() ?? "N/A";
(SelectedCurrency.DailyChange, SelectedCurrency.WeeklyChangeType) = FormatChangeValue(summary.DailyChangePercentage);
Copy link

Copilot AI Aug 13, 2025

Choose a reason for hiding this comment

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

The DailyChange is being assigned the WeeklyChangeType instead of DailyChangeType. This should use DailyChangeType for consistency.

Suggested change
(SelectedCurrency.DailyChange, SelectedCurrency.WeeklyChangeType) = FormatChangeValue(summary.DailyChangePercentage);
(SelectedCurrency.DailyChange, SelectedCurrency.DailyChangeType) = FormatChangeValue(summary.DailyChangePercentage);

Copilot uses AI. Check for mistakes.
await _apiService.PostAsync<object>("usersettings/update-profile-picture", pictureDto);

CurrentUser.ProfilePictureUrl = pictureDto.ProfilePictureUrl;
OnUserChanged();
Copy link

Copilot AI Aug 13, 2025

Choose a reason for hiding this comment

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

Direct assignment to CurrentUser properties without null checking could cause issues. The CurrentUser property should be checked for null before assignment, even though it's checked at method entry.

Suggested change
OnUserChanged();
if (CurrentUser != null)
{
CurrentUser.ProfilePictureUrl = pictureDto.ProfilePictureUrl;
OnUserChanged();
}

Copilot uses AI. Check for mistakes.
@EnesEfeTokta EnesEfeTokta merged commit d9c476e into main Aug 13, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants