`pyside6-lupdate` does not extract translatable strings from variables
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 155
- Avg merge
- 16h 10m
- Merged PRs (30d)
- 59
Description
Release Type
Self-Compiled
Version
v1.10.1
Operating System
Any
Relevant logs
No response
Describe the bug
The application uses the following pattern for defining table columns:
class BaseModsPanel(QWidget):
COL_MOD_NAME = "Name"
COL_AUTHOR = "Author"
# ...
def _get_standard_mod_columns(self) -> list[HeaderColumn]:
return [
self.tr(self.COL_MOD_NAME), # ❌ Not extracted by lupdate
self.tr(self.COL_AUTHOR),
# ...
]
Problem:
pyside6-lupdate performs static code analysis and cannot evaluate variable values. As a result, strings like "Name", "Author", and other column names do not appear in .ts translation files, and users see English text even when a different language is selected.
Additional context
No response
Code of Conduct
I agree to follow this project's Code of Conduct
Duplicate Issue Check
I've checked for similar issues and didn't find anything
Wiki/FAQ Check
I've checked the Wiki for a solution and didn't find a solution
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with BaseModsPanel._get_standard_mod_columns and reproduce the extraction using pyside6-lupdate. Check the generated .ts files for the column strings such as "Name" and "Author"; done means those strings are extracted and can display translated text when a different language is selected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- localization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100