Skip to content
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

Make formattime follow system locale #901

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CrumblyLiquid
Copy link

@CrumblyLiquid CrumblyLiquid commented Aug 28, 2023

Description

Fixes #869.

This draft:

  1. Creates new function get_locale in eww_shared_util that returns the chrono Locale enum.
  2. Enables the chrono unstable-locales feature for the simplexpr crate
  3. Changes the t.format function in simplexpr formattime expression to t.format_localized which then uses the aforementioned get_locale function to get the appropriate Locale enum.

Related issues:

Questions

  1. Is eww_shared_util a good place to put get_locale into?
  2. Is it desirable to have the get_locale function called every time the formattime expression is evaluated?
  3. We might also want to check for the LANG variable if LC_TIME fails.
  4. Maybe we want to use some different way of getting the format like libc-strftime?

Checklist

Please make sure you can check all the boxes that apply to this PR.

  • I added my changes to CHANGELOG.md, if appropriate.
  • The documentation in the docs/content/main directory has been adjusted to reflect my changes.
  • I used cargo fmt to automatically format all code before committing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] formattime doesnt follow system locale
1 participant