Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

qmmp: UI translations missing due to post_patch removing .qm files

未关闭 适合新手
#63,041 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
82/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
cmake, shell
领域
build-system

调研方向

问题出在 srcpkgs/qmmp/template 的 post_patch() 函数中,它会从 src 下的 .qrc 文件里删除 .qm 引用。请阅读该函数和 revision 字段,然后检查去掉这一删除步骤后,使用 Qt6LinguistTools 的 CMake 构建是否会生成 .qm 文件。完成的标准是 ./xbps-src pkg qmmp 构建成功,且生成的软件包在 /usr/share/qmmp/translations 中包含 .qm 文件,并且 revision 已递增。

由索引模型根据 Issue 内容生成。

描述

AI 🤖 bug needs-testing
Is this a new report?

Yes

System Info

Void x86_64 glibc Linux 6.16.56

Package(s) Affected

qmmp 2.4.2_1

Does a report exist for this bug with the project's home (upstream) and/or another distro?

Description

qmmp package (version 2.4.2_1) does not load any translation. The language selector in Settings -> Appearance -> Language lists all supported languages, but selecting any language other than English (e.g. it, es, fr, de) has no effect. After restart, the UI remains in English.

Reproduction

  1. xbps-install qmmp
  2. Open qmmp (simple UI)
  3. Go to Settings -> Appearance -> Language
  4. Select Italiano or Español
  5. Click OK and restart qmmp

Expected: UI in Italian/Spanish
Actual: UI still in English

Checked with strings on binary and inside /usr/share/qmmp/translations - no .qm files are installed. Qt translation loader fails silently.

Root Cause

In srcpkgs/qmmp/template:

# Remove references to prebuilt Qt translation files (.qm) that are
# missing from the source tarball and not generated by the CMake build.
post_patch() {
	find src -name "*.qrc" -exec sed -i '/\.qm/d' {} +
}

## Fix

Remove post_patch() entirely. qt6-tools is already in hostmakedepends, CMake with Qt6LinguistTools will generate .qm from .ts.

Tested locally:
- Removed post_patch
- revision=1 -> revision=2
- ./xbps-src pkg qmmp
- Translations it/es now work.

Suggested diff:
- revision=1
+ revision=2
- post_patch() { find src -name "*.qrc" -exec sed -i '/\.qm/d' {} + }

### Expected behaviour

When I select a language (e.g. Italian, Spanish) in Settings -> Appearance -> Language and restart qmmp, the UI should be translated to that language. The package should include the compiled .qm translation files.

### Actual behaviour

Selecting any language other than English has no effect. The UI always stays in English after restart. 

The template contains:

post_patch() {
    find src -name "*.qrc" -exec sed -i '/\.qm/d' {} +
}

This removes all .qm file references from the .qrc resources because upstream tarball doesn't ship prebuilt .qm files. As a result, no translations are built or installed, even though qt6-tools (which provides lrelease) is already in hostmakedepends and CMake would generate them correctly if not deleted.

Steps to reproduce:
1. xbps-install qmmp
2. Settings -> Appearance -> Language -> select Italiano
3. Restart qmmp
4. UI still in English

### Steps to reproduce

1. Install qmmp: `sudo xbps-install -S qmmp`
2. Open qmmp (simple UI is default)
3. Go to Settings -> Appearance (or Ctrl+P -> Appearance)
4. In Language dropdown, select Italiano [it] or Español [es]
5. Click OK and restart qmmp when prompted
6. Observe: UI is still in English, not translated
主要语言
Shell
星标
3.5k
派生
2.8k
平均合并
1 天 9 小时
30 天内合并 PR
305

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

void-linux/void-packages 的其他 Issue

查看 void-linux/void-packages 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。