NetSparkleUpdater / NetSparkle

NetSparkle is a C# cross-platform software update framework for .NET developers compatible with .NET 4.6.2/.NET 6+, WinForms, WPF, and Avalonia; uses Ed25519 or DSA signatures! View basic usage here in the README or visit our website for code docs.
https://netsparkleupdater.github.io/NetSparkle/
MIT License
585 stars 81 forks source link

WinForms CultureInfo #170

Open ghost opened 3 years ago

ghost commented 3 years ago

Hi again! I'm having an issue with Cultures and WinForms. I have created a WinForms application with "Default" and "es-MX" culture. Launching with "es-MX" culture by setting it inside Main. NetSparkle doesn't shows up with the desired culture and as far as I can see in the resources it has been translated to "es-MX".

public static void Main(string[] args)
        {
            var culture = CultureInfo.GetCultureInfo("es-MX");
            CultureInfo.DefaultThreadCurrentCulture = culture;
            CultureInfo.DefaultThreadCurrentUICulture = culture;
            ...

image

Help would be appreciated. Thanks.

Deadpikle commented 3 years ago

Hi @Kyberal,

Thanks for the bug report.

Localization support is not yet functional for v2.0 -- see #92. There is some limited localization support working that was carried over from the very old days, but I haven't done anything to get it working again for 2.0 with the WPF and Avalonia UIs, much less update it for the new 2.0 strings.

As you can see from this screenshot, there's still some left over, but even this window is not fully translated:

leftover-localization

You can technically override the UI with your own, but for now, multi-language support is missing/not working. Sorry for the unfortunate news.

If you'd like to contribute translations or work in this area, please feel free! There are some strings in src/NetSparkle/Properties/Resources.resx that need translating, and we'd have to refactor the message that's generated in the update availability window, too. (UpdateAvailableWindow). Then figure out how best to do this localization in WPF/Avalonia...