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

Decouple time/date format from language selection #563

Open
Janub opened this issue Mar 11, 2024 · 3 comments
Open

Decouple time/date format from language selection #563

Janub opened this issue Mar 11, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@Janub
Copy link

Janub commented Mar 11, 2024

I think it would be very useful, if you could select your preferred date and time format independently of the UI language. With the current system, selecting English as the UI language automatically also results in a 12h time format and the american MM/DD/YYYY date format.
Ideally you could chose a date and time format on your user settings page, where Theme, Timezone, etc. are configured as well.

@Janub Janub added the enhancement New feature or request label Mar 11, 2024
@jbtronics
Copy link
Member

In principle this is already possible, by manually choosing the right locale.

The en locale automatically defaults to something like en_US so its english with american datetime format. However in principle you can choose any country format you want for that. For example en_DE gives you english language with german datetime format (therefore DD/MM/YYYY and 24h).

There is currently just no way to navigate to that locale via the UI I think. However you can easily access it by modify the URL yourself (just replace the /en/ part with /en_DE/).

For example https://demo.part-db.de/en_DE/log/18567/details shows the dates in german format.
The locale should stay at subsequent navigations from that page.

@Janub
Copy link
Author

Janub commented Mar 15, 2024

I tried your suggestion and it mostly solves the issue for me. There are, however, two minor problems:

  1. The date is shown as DD/MM/YYYY with en_DE, but with just de it is shown as DD.MM.YYYY. It is not a big issue, but still interesting to see as apparently not all of the date formatting is done in the same way.
  2. Some string translations are missing when using the en_DE locale. So far I only noticed the search placeholder "search.placeholder" and the indicator for adding a new catecory/footprint/etc. "entity.select.group.not_added_to_DB"
    Overall I would still love to have the option to choose date format, time format, language (and perhaps decimal separator) as a user setting, but the manual choice of locale is a good workaround for now.

jbtronics added a commit that referenced this issue Jun 22, 2024
jbtronics added a commit that referenced this issue Jun 22, 2024
@jbtronics
Copy link
Member

2. Some string translations are missing when using the en_DE locale. So far I only noticed the search placeholder "search.placeholder" and the indicator for adding a new catecory/footprint/etc. "entity.select.group.not_added_to_DB"

This is now fixed with the latest commit

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

No branches or pull requests

2 participants