-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Snap] Implement Localisation Settings #3153
Comments
Are there any errors or messages in the system log when this is attempted? My initial guess is you need the locale-control interface. You'll probably need to consider what locales to include in your snap(s) as well, though the core22 base snap does ship a It may be worth investigating snaps like the |
@dilyn-corner wrote:
There is no graphics setup since WebThings Gateway is a headless application, so I'm assuming this isn't relevant? Looking more closely at the source code of what the Raspbian back end for localisation settings does I see:
The language and unit settings just seem to be stored internally to the application and are used for the Fluent localisation on the front end:
@dilyn-corner / @ogra1 What would be really useful to know is how you would implement all of the functions in that first list on Ubuntu Core and what interfaces would be required to do that. It looks like it really boils down to listing, getting and setting timezones and listing, getting and setting wireless country. I see there is a I assume the reason for setting the Wi-Fi country is so that the correct (legally allowed) frequency bands are used for the country you are in. How would you do this on Ubuntu Core? Can it be set via NetworkManager, or do I need to use another tool? And how do I get a list of valid country codes? Thanks |
This is another place where the code misses proper abstraction to be more portable:
Instead of reading the file directly it should use
Same thing
Not sure what the difference is to the above function here ...
All in all the code would really benefit from using the above standard tools, even without using it in a snap it would enable you to run seamlessly on fedora, arch, you name it ...
For all of these you likely need a proper |
Just to be clear, the
Could it have been written in a more portable way? Yes, probably. But that wasn't even a consideration when some of this code was first written as a Raspberry Pi-only experiment as far back as 2017! I'm grateful for your advice on how to implement this functionality in a more portable way, which will also work inside snap confinement. I'll work my way through your suggestions, thank you. |
STR:
Expected:
Actual:
From the browser console when setting Language:
Also noticed network errors in the browser console during first time setup:
On one occasion I also noticed an error in run-app.log after creating a username and password during first time setup:
2024-08-20 19:00:20.691 ERROR : Failed to set localization.language to 'en-GB'
The text was updated successfully, but these errors were encountered: