Ticket #44799

Qt: "Close" and "OK" buttons not translated

오픈 날짜: 2022-06-12 01:29 마지막 업데이트: 2023-10-11 08:26

Reporter:
소유자:
(None)
Type:
Status:
Open
Component:
MileStone:
(None)
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
None
File:
1

Details

We have no translations for Qt's default buttons. Qt would want to handle them by its own mechanisms, not through our gettext.

Simplest solution would be not to use those Qt's buttons, but implement equivalents ourselves.

Ticket History (3/15 Histories)

2022-06-12 01:29 Updated by: cazfi
  • New Ticket "Qt: "Close" and "OK" buttons not translated" created
2022-08-05 08:59 Updated by: cazfi
2022-10-07 09:30 Updated by: cazfi
2022-12-07 01:19 Updated by: cazfi
댓글 올리기

I had some kind of patch for this, but I never got it working sensibly on S3_0. Later branches seemed easier, thanks to some Qt-client code refactoring done.

2023-01-28 10:13 Updated by: cazfi
2023-02-17 11:41 Updated by: cazfi
댓글 올리기

Reply To cazfi

I had some kind of patch for this, but I never got it working sensibly on S3_0. Later branches seemed easier, thanks to some Qt-client code refactoring done.

Dropping S3_0 target for that reason.

2023-04-27 20:32 Updated by: cazfi
2023-04-27 21:02 Updated by: None
댓글 올리기

Just saying, one can install a custom QTranslator on the QCoreApplication. Ki18n has a gettext-based implementation.

2023-08-29 19:48 Updated by: cazfi
2023-10-10 07:03 Updated by: cazfi
  • 소유자 Update from (None) to cazfi
  • Resolution Update from None to Accepted
2023-10-10 08:56 Updated by: None
댓글 올리기

What a terrible patch. With this approach you will need to implement custom translations for keyboard shortcuts, the file dialog, "about Qt", ... Qt already ships translations for all of this, just initialize the Qt locale correctly. Strings for many languages are shipped by default, at /usr/share/qt*/translations/ on Debian-like systems. If you insist on having full control, install your own QTranslator in the QApplication.

2023-10-10 09:45 Updated by: cazfi
댓글 올리기

Reply To (Anonymous)

on Debian-like systems.

That's likely the easiest environment to get things working. Not so sure about some Windows setups we have, among others.

2023-10-11 00:30 Updated by: None
댓글 올리기

Windows setups

A few seconds of googling gave the following:

MinGW: mingw-w64-x86_64-qt6-translations

Cygwin: qt5-translations

On Windows I think they can simply be copied next to the executable. Files can also be loaded explicitly using the QTranslator API.

2023-10-11 08:26 Updated by: cazfi
  • 소유자 Update from cazfi to (None)
  • Resolution Update from Accepted to None
  • Milestone Update from 3.1.0-beta4 (closed) to (None)

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login