Repository navigation
Conversation
With no systemd, so the locale1 and AccountsService D-Bus services are missing. The region page failed to reload and neither the system locale nor the user language could be saved. The list of available locales was also almost empty, because only a few locales are generated. Reading: - page_reload no longer aborts when the system D-Bus, the locale1 proxy, or its locale() call fails. It falls back to /etc/locale.conf, /etc/default/locale, ~/.config/locale.conf, ~/.config/environment.d/90-locale.conf, and finally the LANG/LC_* environment variables. Earlier sources win and each variable is only added once. Writing: - set_locale tries locale1 SetLocale first. If that fails, it writes /etc/locale.conf via sudo or doas (keeping the `export` prefix that /etc/profile.d/locale.sh expects), then ~/.config/locale.conf. If nothing can be persisted, it logs a warning. - set_user_language tries AccountsService first. If that fails, it writes LANGUAGE=... to ~/.config/environment.d/90-locale.conf. - The fallback file writes use tokio instead of blocking std calls. Available locales: - Besides `locale -a`, also list every definition found in /usr/share/i18n/locales as a UTF-8 locale. - Normalize all entries to the `.utf8` suffix and deduplicate them in a BTreeSet, so the list is sorted and has no repeats.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With no systemd, so the locale1 and AccountsService D-Bus services are missing. The region page failed to reload and neither the system locale nor the user language could be saved. The list of available locales was also almost empty, because only a few locales are generated.
Reading:
Writing:
exportprefix that /etc/profile.d/locale.sh expects), then ~/.config/locale.conf. If nothing can be persisted, it logs a warning.Available locales:
locale -a, also list every definition found in /usr/share/i18n/locales as a UTF-8 locale..utf8suffix and deduplicate them in a BTreeSet, so the list is sorted and has no repeats.PS: This fix is already working correctly on starkOS GNU/Linux.
Please evaluate this proposal and make corrections if necessary; the main objective is to ensure that locales function properly on non-systemd systems.
Thanks, Luis.