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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix time applet #429

Closed
wants to merge 3 commits into from
Closed

Conversation

wiiznokes
Copy link
Contributor

This PR add localization support to the time applet.
I finally used the "unstable-locales" feature of chrono, as it was already a dep, and it don't depend on system librairies.
I reproduced the exact same layout of Gnome for the french language.

day_before_month should not be exposed to users, but deduced from the env or maybe military_time. It might be a good idea to look how gnome do this.

show_seconds feature was also added 馃帀

@wiiznokes
Copy link
Contributor Author

I think the code is good enough for now. The only issue i can think of is that hours will always use two digits.
We could cover more edge cases but the code will start becoming spaghetti, and this is meant to be a temporary solution.

I wonder how Gnome handle settings like military time, and layout condition, like displaying month before day. I don't think Datetime in fluent will cover all the need for this applet.

i18n-embed-fl.workspace = true
i18n-embed.workspace = true
libcosmic.workspace = true
libcosmic = {workspace = true, features = ["smol"]}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The binary already builds with tokio, so it should use that.

@wiiznokes wiiznokes closed this May 23, 2024
@wiiznokes wiiznokes deleted the fix-time-localization branch May 25, 2024 11:17
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.

None yet

3 participants