QDialogButtonBox - translation of standard button text ("OK", "Cancel" etc.)
I'm using a QDialogButtonBox in an app that will is being translated into Japanese etc. The text for the standard buttons in QDialogButtonBox such as "OK", "Cancel" etc. doesn't show up in my .ts translation files. I assumed the app was going to use the standard localized text for these buttons from the OS, but it doesn't look like this is done.
Do I have to localize the text for these standard buttons myself? If so, is the correct way to re-set the text for each of the standard buttons with the correct text but use "ts()"? Seems a bit strange to have to do it that way if so.
Thanks
Re: QDialogButtonBox - translation of standard button text ("OK", "Cancel" etc.)
Those buttons are translated in a separate file provided with Qt. It should be called qt_ja_jp.qm in case of the Japaneese language. Simply create a second translator in your application, load this file as the dictionary and install the translator alongside the proper translation of your application.
Re: QDialogButtonBox - translation of standard button text ("OK", "Cancel" etc.)
It's a bit hackish, but alternatively you can force those entries to appear in your application's .ts with QT_TRANSLATE_NOOP.
Re: QDialogButtonBox - translation of standard button text ("OK", "Cancel" etc.)