bostrot / wsl2-distro-manager

A GUI to quickly manage your WSL2 instances
https://apps.microsoft.com/store/detail/wsl-manager/9NWS9K95NMJB
Other
1.82k stars 111 forks source link

[BUG] Crash on Choosing non-translated languages #182

Closed ykis-0-0 closed 1 year ago

ykis-0-0 commented 1 year ago

Is there an existing issue for this?

Current Behavior

First of all, to clarify the nature of this issue, this is NOT a translation request.

There are two problems:

  1. The language selection drop-down have an option for "zh-HK", which does not have the i18n translations in /lib/i18n. (Personally I think it depends on the user's Windows language settings)

  2. Out of curiosity I gave the erroneous "zh-HK" option a try, and upon restart it breaks completely, interface unable to be loaded, and only give me a white rectangle with a black bar

An Update: after manually messing with shared_perferences.json, it seems that all of the `zh` languages will cause this to happen*

Expected Behavior

  1. Only languages with existing translation should appear in the language selection drop-down
  2. Upon failure to load some form of error dialog should be shown? (If 1. got fixed this probably would be an non-issue though)

Steps To Reproduce

  1. With Windows set to a language which i18n for this repo doesn't exist (in my case "zh-HK")
  2. Go to the settings of the Distro Manager
  3. Change language to that (not supposed to exist) option
  4. Save and Restart
  5. 💥

Environment

- Windows Version: Windows 10 Pro 22H2 Build 19045.2965
- WSL Distro Manager Version: v1.8.4
- WSL Version: 1.2.5.0
- Source: GitHub release

Anything else?

No response

github-actions[bot] commented 1 year ago

Hello there! As you are a first time Issuer please read our Code of Conduct. Please also check whether your issue description is reasonable and complete. If you are having an issue always include the version you are using (WSL, this app, Windows) as well as a way to reproduce it.