Translation of QDialogButtonBox::Cancel into Spanish



  • Dear all,

    I am using a QDialogButtonBox with a Cancel button and experienced that the translation into spanish is not working. Instead of "Cancelar" I obtain the fallback "Cancel". The translation into languages that are natively supported in the split file format such as German and French is working correctly.

    It does not seem to be a problem with loading the translation files, I made sure that the Spanish translation files qt_es.qm and/or qtbase_es.qm are loaded using QTranslator.

    It also does not seem to be a problem with the translation files being out of date. I looked into downloading updated translation files as described here: https://wiki.qt.io/Qt_Localization . I also looked into running lupdate and lrelease using the make files in the qt installation and loading the newly created files.

    It also does not seem to be a problem that the translation does not exist. It is not fully clear to me which instance from Cancel is the relevant one that is used in the context of the QDialogButtonBox but there does not seem to be a translation missing.

    I experience similar issues with translations into Spanish with other default qt Widgets, QFileDialog,

    So far the only workaround I have is to set the text of the buttons explicitly and introduce my own translation. This of cause is somewhat unsatisfactory.

    Any ideas?

    Thanks


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Did you also check that Spanish translation files for the QDialogButtonBox were similar to other languages ?



  • @SGaist Hi SGaist, thanks for your fast response. Yes I did check that the Spanish translation files are similar to German and French.

    The language files shipped with the release version are not "split", that is they do not split into qtbase, etc. To me it seems that in those files the translations are missing and that the files are outdated (we use version 5.6.1).

    I tried with the files that can be downloaded from the webpage of Qt. Those files are split into qbase, etc and appear to be consistent with what one would obtain when carrying out a lupdate, lrelease. In case an lupdate is carried out the number of new translations found is rather small.

    Cheers
    Clemens


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.