bndw / wifi-card

📶 Print a QR code for connecting to your WiFi (wificard.io)
https://wificard.io
MIT License
6.61k stars 466 forks source link

Incorrect language in the language drop-down list if a language other than English #180

Closed olekstomek closed 3 years ago

olekstomek commented 3 years ago

The website detects the Polish language and presents the version of the website in this language. However, in the drop-down list, the currently indicated language is English instead of Polish in this case.

Web browser: Chrome 92.0.4515.131 Android 10 dev.wificard.io (because I can't open on mobile Chrome wificard.io): 1628372454589

Web browser: built into Android 10 MIUI Global 12.0.4, browser V12.11.4-gn Android 10 wificard.io (because I can open here wificard.io) 1628372454604

bndw commented 3 years ago

This was possibly introduced in https://github.com/bndw/wifi-card/pull/170/commits/e1a8ad896602f8b2596fdbce9cac29b009228d37. React complains about controlled components not using defaultValue, but hard-coding defaultValue would likely result in the behavior you're seeing.

bndw commented 3 years ago

@olekstomek I've deployed a potential fix to https://dev.wificard.io. Would you mind confirming if that resolves the issue?

olekstomek commented 3 years ago

@bndw confirmed, it works perfect.