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

`pyside6-project lupdate` forgets subfolders

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.8.0, 6.7.3
    • 6.7.1
    • Tooling
    • None
    • All
    • 8acc7f3e5 (dev), 077002dd9 (6.7)

    Description

      Trying to use the `pyside6-project lupdate` command to update translation files does not work correctly if the `.pyproject` file used includes files in subfolders (e.g. `src/main.py`). When internally constructing the `lupdate` command to run, any folder paths are removed (leaving, in the example above, just the `main.py`). The command then promptly fails, as the file in question does not exist.

      This issue is caused by the following line in the source code of `pyside6-project`: https://code.qt.io/cgit/pyside/pyside-setup.git/tree/sources/pyside-tools/project.py#n246

      Calling p.name there means only the filename of the path is included. The line should ideally be adapted to read

      cmd_prefix = [LUPDATE_CMD] + source_files 

      or perhaps

      cmd_prefix = [LUPDATE_CMD] + [os.path.normpath(p) for p in source_files] 

      Attachments

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

        Activity

          People

            kleint Friedemann Kleint
            commandmc Mathis Dröge
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes