Details
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
For Gerrit Dashboard: PYSIDE-2861 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
589621,3 | pyside6-project: Fix lupdate handling with subdirectories | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
589742,2 | pyside6-project: Fix lupdate handling with subdirectories | 6.7 | pyside/pyside-setup | Status: MERGED | +2 | 0 |