Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-69146

Translation of own Qt texts not working on Qt Device Creation image for Raspberry Pi 3

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.11.2
    • 5.9.1, 5.11.1
    • Device Creation
    • None
    • Device creation Raspberry Pi 3
    • Linux/X11

    Description

      Whereas the sample code included in the Qt documentation for Internationalization works well in Linux Desktop (Debian at least), it doesn't work when using the Boot2Qt Raspberry Pi 3 installation. Custom .qm translation files are successfully loaded and used but, it doesn't take effect for .qm system files for every language. For example:

      QTranslator qtTranslator;
      qtTranslator.load("qt_" + QLocale::system().name(),
      QLibraryInfo::location(QLibraryInfo::TranslationsPath));
      app.installTranslator(&qtTranslator);
      The qt_XX.qm files are located and loaded with no errors but they are not used correctly in GUI (QDialogButtonBox buttons, QFileDialog, ...). The 'Yes', 'No', 'Ok', 'Cancel' or 'Open' texts are not translated.

      Workaround: Copy the files qtquick1_XX.qm and qtscript_XX.qm from the Linux Desktop Qt translations folder to the Raspberry Pi Qt translations folder (/usr/share/translations/).

       

      I can't tell if this is a bug for later or earlier versions to 5.9.1 or for other platforms.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sapiippo Samuli Piippo
            marcoscv Marcos Vega
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes