Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1733

pyside2-uic general unicode string, which canot detect by both pyside2-lupdate and pylupdate5

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.15.2
    • PySide
    • None
    • windows 10, python 3.8.7

    • Windows

    Description

      pyside2-uic general unicode string, which canot detect by both pyside2-lupdate and pylupdate5

      1. create 'untitled.ui' by pyside2-designer.exe
      2. pyside2-uic.exe untitled.ui -o ui_untitled.py. The code is unicode string like this:

      MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"MainWindow", None))
      self.pushButton.setText(QCoreApplication.translate("MainWindow", u"hello world. \u4e2d\u6587", None))

            3. pyside2-lupdate -noobsolete ui_untitled.py -ts i18n_pysid2-ludate.ts

                (or pylupdate5 -noobsolete ui_untitled.py -ts i18n_pylupdate5.ts)

            The result of pyside2-lupdate:

      <?xml version="1.0" encoding="utf-8"?>
      <!DOCTYPE TS><TS version="1.1">
      </TS>

       

      Maybe i think pyside2-uic.exe should genate UTF-8 Text instead unicode string,like pyuic5.exe: 

      MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
      self.pushButton.setText(_translate("MainWindow", "hello world. 中文"))

       

       

       

      Attachments

        1. untitled.ui
          1 kB
        2. ui_untitled.py
          2 kB
        3. i18n_pysid2-ludate.ts
          0.1 kB
        4. i18n_pylupdate5.ts
          0.5 kB

        Issue Links

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

          Activity

            People

              crmaurei Cristian Maureira-Fredes
              dion_sun sun qi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes