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

Use locale settings for "paste date and date" #379

Closed
stefonarch opened this issue Oct 9, 2024 · 12 comments
Closed

Use locale settings for "paste date and date" #379

stefonarch opened this issue Oct 9, 2024 · 12 comments

Comments

@stefonarch
Copy link
Contributor

It's always en_US.UTF

@tsujan
Copy link
Owner

tsujan commented Oct 9, 2024

It's intentionally left to the user (because the locale format is too limited). Please see Preferences → Text → Date and time format.

@tsujan tsujan closed this as not planned Won't fix, can't repro, duplicate, stale Oct 9, 2024
@stefonarch
Copy link
Contributor Author

Please see Preferences → Text → Date and time format.

I use this, but it's not localized. Fiddled with " date +%e.%B-%Y " but nothing.

@tsujan
Copy link
Owner

tsujan commented Oct 9, 2024

Fiddled with " date +%e.%B-%Y " but nothing.

For example, "%Y" has no meaning, and "date" is just d+a+t+e, which you most probably don't want.

See https://doc.qt.io/qt-6/qdate.html#fromString-1 and https://doc.qt.io/qt-6/qtime.html#toString for date and time formats.

@tsujan
Copy link
Owner

tsujan commented Oct 9, 2024

But wait a minute! If you empty that text entry, the app uses the date time format used for your current locale, with the long format. Doesn't it?

@tsujan
Copy link
Owner

tsujan commented Oct 9, 2024

OK, the date and time string is always in English and not localized, although its format is localized when that text entry is left empty.

The reason is that Qt has changed. I think we had something similar in LXQt, which I fixed.

@tsujan tsujan reopened this Oct 9, 2024
@stefonarch
Copy link
Contributor Author

although its format is localized when that text entry is left empty.

It's not here, I tried that. Wednesday 9 October 2024 19:41:58 CEST is printed.

@tsujan
Copy link
Owner

tsujan commented Oct 9, 2024

With the fix, it's be mercoledì 9 ottobre 2024 21:26:39 GMT+3:30 for Italian. If it isn't correct, blame Qt ;)

EDIT: Of course, the above string is made here, not at your location.

@tsujan
Copy link
Owner

tsujan commented Oct 9, 2024

Done in 243cbac.

Thanks for telling me about it. I'll do the same thing for FeatherPad.

@tsujan tsujan closed this as completed Oct 9, 2024
@tsujan
Copy link
Owner

tsujan commented Oct 9, 2024

Changed it to the short format (from the long format, which is Qt's default) in e793e9d.

It's more practical to have 09/10/24 21:26 instead of mercoledì 9 ottobre 2024 21:26:39 GMT+3:30 by default.

@stefonarch
Copy link
Contributor Author

I used always a custom format, it works fine now.
9 ottobre 2024

@tsujan
Copy link
Owner

tsujan commented Oct 9, 2024

The problem was that the names were always in English. There was a comment in Qt5 doc that it would happen in Qt6.

I'm sure that I made a PR about that in LXQt; maybe for lxqt-panel's clock.

EDIT: Yes, it was this: lxqt/lxqt-panel#2039

@stefonarch
Copy link
Contributor Author

O yes, one of our bugs in Qt6.

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

No branches or pull requests

2 participants