Files icon indicating copy to clipboard operation
Files copied to clipboard

Bug: Not correct Default system language load for `MessageFormatExtensions`

Open XTorLukas opened this issue 1 year ago • 2 comments

Description

The system language is incorrectly defined, a problem occurs when Formater takes the default 'en' for parsing

Screenshot problem

  1. If I don't choose the exact language image
  2. Language not set to system language image
  3. This causes the plural localization to function incorrectly image

Steps To Reproduce

  1. If not specified default language load OS default correctly

XTorLukas avatar May 21 '24 19:05 XTorLukas

We overlooked this because I had it selected explicitly, but I have a quick workaround

XTorLukas avatar May 21 '24 19:05 XTorLukas

It would be enough for this method to be static https://github.com/files-community/Files/blob/b2863a3d483e338357d6a283f16cde702cb97088/src/Files.App/ViewModels/Settings/GeneralViewModel.cs#L146-L163

And then you could just use a similar condition for 'en' instead of CultureInfo.InstalledUICulture and store it in ApplicationLanguages.PrimaryLanguageOverride, I just don't know what the convention is for adding it to the App start method https://github.com/files-community/Files/blob/b2863a3d483e338357d6a283f16cde702cb97088/src/Files.App/Extensions/MessageFormatExtensions.cs#L18

XTorLukas avatar May 21 '24 20:05 XTorLukas