-
Notifications
You must be signed in to change notification settings - Fork 0
Develop #17
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
Develop #17
Conversation
…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.
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.
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> |
Copilot
AI
Aug 13, 2025
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.
There is a typo in the translation key 'Apperance'. It should be 'Appearance'.
| <value>Apperance</value> | |
| <data name="Appearance" xml:space="preserve"> | |
| <value>Appearance</value> |
| <data name="Clear_Form" xml:space="preserve"> | ||
| <value>Formu Temizle</value> | ||
| </data> | ||
| <data name="Apperance" xml:space="preserve"> |
Copilot
AI
Aug 13, 2025
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.
There is a typo in the translation key 'Apperance'. It should be 'Appearance'. This error appears in all localization files.
| <data name="Apperance" xml:space="preserve"> | |
| <data name="Appearance" xml:space="preserve"> |
|
|
||
| SelectedCurrency.DailyHigh = summary.DailyHigh.ToString() ?? "N/A"; | ||
| SelectedCurrency.DailyLow = summary.DailyLow.ToString() ?? "N/A"; | ||
| (SelectedCurrency.DailyChange, SelectedCurrency.WeeklyChangeType) = FormatChangeValue(summary.DailyChangePercentage); |
Copilot
AI
Aug 13, 2025
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.
The DailyChange is being assigned the WeeklyChangeType instead of DailyChangeType. This should use DailyChangeType for consistency.
| (SelectedCurrency.DailyChange, SelectedCurrency.WeeklyChangeType) = FormatChangeValue(summary.DailyChangePercentage); | |
| (SelectedCurrency.DailyChange, SelectedCurrency.DailyChangeType) = FormatChangeValue(summary.DailyChangePercentage); |
| await _apiService.PostAsync<object>("usersettings/update-profile-picture", pictureDto); | ||
|
|
||
| CurrentUser.ProfilePictureUrl = pictureDto.ProfilePictureUrl; | ||
| OnUserChanged(); |
Copilot
AI
Aug 13, 2025
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.
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.
| OnUserChanged(); | |
| if (CurrentUser != null) | |
| { | |
| CurrentUser.ProfilePictureUrl = pictureDto.ProfilePictureUrl; | |
| OnUserChanged(); | |
| } |
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
LanguageTypeenum and integrated it into user settings DTOs (UserAppSettingsDto,UserAppSettingsUpdateDto), enabling users to select their preferred language. [1] [2] [3]TranslationManagersingleton and aTranslateExtensionfor XAML, allowing UI strings to be translated dynamically based on user settings. [1] [2] [3]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
UserProfileDto, and added new DTOs for updating user information (e.g.,UpdateUserNameDto,UpdateUserEmailDto,UpdateUserPasswordDto,UpdateProfilePictureDto). Removed obsolete DTOs (ProfileSettingsDto,ProfileSettingsUpdateDto, oldUserProfileDto). [1] [2] [3] [4] [5] [6] [7] [8]Other Enhancements
ChangeSummaryDtoto 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.