Skip to content

i18n: translate the remaining interface corners - #10

Merged
wleeaf merged 7 commits into
wleeaf:mainfrom
h465855hgg:i18n-fix-untranslated-strings
Nov 17, 2026
Merged

wleeaf merged 7 commits into
wleeaf:mainfrom
h465855hgg:i18n-fix-untranslated-strings

Conversation

@h465855hgg

@h465855hgg h465855hgg commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

What this fixes

With 简体中文 selected, a few places still showed English:

  • Qt's own text (dialog buttons, file dialogs, the Copy/Paste menu): only the tiny qt_<locale>.qm was loaded. qtbase, qtmultimedia and qt_help are loaded now too.
  • PE Info window: the directory names and the section, import and relocation lines were not translated. They use tr() now.
  • Text built from English C++ names: address-list Type column, thread states, process summary, code-finder status, unreadable-page message, overlay default, script default name, breakpoint "ID" header. These are translated where they are shown; cheat tables, Lua and the CLI keep the English names.
  • Qt 6.11 file dialog: the system qtbase translation is behind the current Qt strings, so &Look in:, Files of &type: and the file-kind names are added to our own catalogue.

translations/cheatengine_zh_CN.ts has the matching entries and is complete.

Build

The screenshot run reads build/cheatengine_zh_CN.qm, so gui_lifecycle_smoke depends on that file. Depending on a target name instead breaks one Qt version or the other (Qt 6.4 names it after the executable, Qt 6.11 after project()), and Qt 6.4 does not accept LRELEASE_TARGET.

Tests

  • GUI Release build: OK.
  • tools/check-translations.py: complete.
  • gui_lifecycle_smoke in English: OK.
  • CE_LANG=zh_CN ... --screenshots: 206 images; Type column, thread states, process summary and file dialogs checked in Chinese.

Load qtbase, qtmultimedia and qt_help translations besides qt, so stock dialog buttons, file dialogs and the text edit menu follow the interface language. Route the PE info directory names and section, import and relocation labels, and the No process attached error of the address list, through tr(). Add the 21 matching zh_CN entries. Name the lrelease target explicitly so configure works with Qt 6.11, which otherwise names it after project().
@h465855hgg
h465855hgg marked this pull request as draft November 15, 2026 12:55
The address-list Type column, the thread states and the process summary were
built from Qt-free English names (ce::valueTypeName, the /proc state words and
ce::TargetProfile::summary), so they stayed English even with the catalogue
loaded; build those display strings through the catalogue instead. Wrap the
code-finder stop status, the unreadable-page status message, the overlay's
default status, the new-script description and the breakpoint ID column header
in tr().

Add the matching zh_CN entries, and keep the Qt 6.11 file-dialog labels
("&Look in:", "Files of &type:") and file-kind names in the catalogue: the
distribution's qtbase translation still carries the older sources, so those
stock labels were English. Document that readelf output and the shipped
documentation stay in English.
@h465855hgg h465855hgg changed the title i18n: translate the PE info labels and load the Qt base catalogue i18n: translate the remaining interface corners Nov 15, 2026
@h465855hgg
h465855hgg marked this pull request as ready for review November 15, 2026 13:25
@h465855hgg
h465855hgg marked this pull request as draft November 15, 2026 13:27
qt_add_translations() has no LRELEASE_TARGET option in Qt 6.4, the version the
CI image ships, so lupdate took that word for a source file and the build
failed. Depend on the generated .qm instead: it works whichever name Qt gives
its lrelease target (after the executable on older Qt, after project() on
Qt 6.11), and the screenshot run only needs the file next to the binary.
gui_theme_smoke links only gui/theme.cpp and Qt, so the helper added to
theme.cpp pulled in ce::TargetProfile::archName from cecore and the link
failed with an undefined reference. Move it next to its users in
mainwindow_process.cpp (declared in mainwindow.hpp), which the GUI targets
link together with cecore.
@h465855hgg
h465855hgg marked this pull request as ready for review November 15, 2026 14:11
The 32-bit native syscall integration timed out once under ASan; the same
tests pass on main and on this branch before the main merge.
@wleeaf
wleeaf merged commit 92ddcf9 into wleeaf:main Nov 17, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants