RimSort / RimSort/RimSort

`pyside6-lupdate` does not extract translatable strings from variables

Open
#2,334 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bugs 🪲
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.