atsign-foundation / noports

Connect to any device with no external listening ports open
https://noports.com
BSD 3-Clause "New" or "Revised" License
272 stars 15 forks source link

fix: mandarin and cantonese state is saved across app restarts. #1552

Closed CurtlyCritchlow closed 6 days ago

CurtlyCritchlow commented 6 days ago

- What I did Updated settings.toJson() so mandarin and cantonese language is saved across app restarts. - How I did it run dart run build_runner watch build -d in the thermal to update changes made in 'Settings' class. - How to verify it

- Description for the changelog

XavierChanth commented 6 days ago

These seem like non-standard locale codes, can you explain why we've opted to drop the initial language specifier rather than propogate the region specifier?

CurtlyCritchlow commented 6 days ago

These seem like non-standard locale codes, can you explain why we've opted to drop the initial language specifier rather than propogate the region specifier?

It doesn't make a difference what the json value of the enum is since the app is using the language based on the enum itself and its extension methods, not based the jsonValue of the enum. That being said I can update it but it doesn't improve the app one iota.

XavierChanth commented 6 days ago

These seem like non-standard locale codes, can you explain why we've opted to drop the initial language specifier rather than propogate the region specifier?

It doesn't make a difference what the json value of the enum is since the app is using the language based on the enum itself and its extension methods, not based the jsonValue of the enum. That being said I can update it but it doesn't improve the app one iota.

Can you double check that these don't collide with any standard locales, just in case we add more in the future

CurtlyCritchlow commented 6 days ago

These seem like non-standard locale codes, can you explain why we've opted to drop the initial language specifier rather than propogate the region specifier?

It doesn't make a difference what the json value of the enum is since the app is using the language based on the enum itself and its extension methods, not based the jsonValue of the enum. That being said I can update it but it doesn't improve the app one iota.

Can you double check that these don't collide with any standard locales, just in case we add more in the future

Done. I updated the json_value so there will be no potential conflict if we add additional languages in the future.

XavierChanth commented 6 days ago

The build_runner needs to be re-run to regenerate the json model

CurtlyCritchlow commented 6 days ago

Done, thanks for the reminder.