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

Translator comments and meta-strings support for pyside-lupdate

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 6.2.0
    • 5.15.1, 5.14.2.2, 5.15.3
    • Tooling
    • None
    • All
    • 3f7108cfa0abbce35d35352212f9d0a12312963d (qt/tqtc-qttools/6.2) 5217a8553f41d43c21755667f7f05064209ee8f3 (qt/tqtc-qttools/dev)

    Description

      As it currently stands, the tool pyside2-lupdate does not support translator comments or meta-data strings like its c++ counterpart does.

      The c++ version supports the following according to the documentation :

      A translator comment for adding extra information to a source string

      //: This name refers to a host name.
      hostNameLabel->setText(tr("Name:"));

      Meta-data strings for assigning an ID to a source string

      //= qtn_foo_bar 
      QString text = MyMagicClass::tr("Sim sala bim.");
      

       

      It would be nice to have a pyside counterpart to these types of comments.

      For the translator comments:

      #: This name refers to a host name. 
      host_name_label.setText(self.tr("Name:"))

      For the meta-data

      #= qtn_foo_bar 
      text = MyMagicClass.tr("Sim sala bim.");
      

      Attachments

        Issue Links

          For Gerrit Dashboard: PYSIDE-1376
          # Subject Branch Project Status CR V

          Activity

            People

              kleint Friedemann Kleint
              valorcurse Marcelo Dias Avelino
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes