-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix: Correct load os language for MessageFormatExtensions
#15441
Fix: Correct load os language for MessageFormatExtensions
#15441
Conversation
This is a quick solution, but it would be good to do this when starting the application, because when I delete |
// Add default language | ||
var osDefaultLanguage = new AppLanguageItem(CultureInfo.InstalledUICulture.Name); | ||
if (AppLanguages.Select(language => language.LanguageName.Contains(osDefaultLanguage.LanguageName)).Any()) | ||
AppLanguages[0].LanguagID = osDefaultLanguage.LanguagID; |
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.
I don't think we need to make any changes here, it should be possible to handle everything from the format extension class.
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 reason for the change to GeneralViewModel.cs was to store the language name, thus avoiding string.Empty, but this is also addressed in a future helper class
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.
Codewise
although I hadn't planned to finish it today I have a helper class ready, but then this fix will be unnecessary |
Co-authored-by: 0x5BFA <62196528+0x5bfa@users.noreply.github.com>
Resolved / Related Issues
To prevent extra work, all changes to the Files codebase must link to an approved issue marked as
Ready to build
. Please insert the issue number following the hashtag with the issue number that this Pull Request resolves.MessageFormatExtensions
#15440Steps used to test these changes
Stability is a top priority for Files and all changes are required to go through testing before being merged into the repo. Please include a list of steps that you used to test this PR.
MessageFormatExtensions
is loaded as the default OS language