Please nominate your Qt Champions for 2021! https://forum.qt.io/topic/132134/looking-for-the-2021-qt-champions

Missing Translations for Standard Buttons in QtQucikControls2



  • I want to translate my application to german english and spanish.

    So far so good I could provide translations with all the strings i marked for translations. However I realized that some standard buttons do not get translated.

    For Example:

    Dialog {
    //...
        standardButtons: Dialog.Close
    }
    

    That standard button always shows "close" in each language.

    Now what I understand under

    "/home/sandro/Qt/5.15.0/gcc_64/translations/"
    

    I can find translation files for qtquickcontrols2. However only en is available not ge and es:

    fbb11ce5-e277-4488-af28-cf75320027d3-image.png

    Do I copy these files into my ressource file were my own translations are located and load them with a second QTranslator ?

    If the translation files does not exist for my language how to I generate a empty file to fill (for example an empty espanol?

    Im a bit confused about this topic. I could not find good answers in the docs.


  • Moderators

    @sandro4912 said in Missing Translations for Standard Buttons in QtQucikControls2:

    Do I copy these files into my ressource file were my own translations are located and load them with a second QTranslator ?

    Yes.

    If the translation files does not exist for my language how to I generate a empty file to fill (for example an empty espanol?

    I don't know, but you can try to download source code (for example from here: http://download.qt.io/archive/qt/5.15/5.15.1/single/) and run lupdate on the .pro file there, maybe it will work...

    Actually there is the qttranslations folder in sources, looks like it contains all the TS files. So it seems like a good place to start.

    You may need to run configure on the source code first, to prepare qmake stash etc. Not sure if it is necessary in this case.

    Im a bit confused about this topic. I could not find good answers in the docs.



  • This post is deleted!


  • I found this link useful.


Log in to reply