multipass
multipass copied to clipboard
[snap] Snapshot timestamp format doesn't honor user's prefered locale when in a snap
When running locally, the locale is properly used when formatting a snapshot's timestamp:
$ echo $LC_TIME
pt_PT.UTF-8
$ multipass info alive-chamois.snapshot2 | grep Created
Created: ter 14 nov 2023 16:04:17 WET
This is not the case when running in a snap
$ echo $LC_TIME
pt_PT.UTF-8
$ multipass info primary.snapshot1 | grep Created
Created: Tue Nov 14 14:35:27 2023 WET
Localization of the timestamp added by #3237
A couple of relevant (if old) threads:
- https://forum.snapcraft.io/t/lack-of-compiled-locales-breaks-gettext-based-localisation/3758
- https://forum.snapcraft.io/t/why-do-we-ship-usr-lib-locale-with-snap-packages/11652
From that, we could stage all locales or stage sources and compile locales on first launch. I am not sure if there is an easier way nowadays (e.g. using an extension).
A few things that I tried to throw into the snapcraft.yaml
, with no success unfortunately. locales-all
adds some 20Mb to the snap package.