#17597·luanti

Translations using Weblate codes (zh_Hans) never load for clients (zh_CN)

Author: favoritewkyCreated Sep 27, 2026Updated Sep 27, 2026
LabelsBug@ Translation

Luanti version

5.17.0 (Windows)

Summary

Games translated on Weblate that ship locale/<mod>.zh_Hans.po (e.g. "Glitch" and "Repixture" from ContentDB) show completely untranslated in-game text when the client language is zh_CN. The engine UI itself is Chinese, so users get a half-Chinese client and a fully English game. Old-convention content such as minetest_game (*.zh_CN.tr) works fine.

Steps to reproduce

  1. Set language = zh_CN.
  2. Install a game shipping only *.zh_Hans.po (e.g. Glitch).
  3. All in-game strings fall back to English.

Cause

Server::sendMediaAnnouncement (src/server.cpp) filters translation files by exact string comparison: Translations::getFileLanguage(name) == lang_code No language-code aliasing exists anywhere (verified in master source and the 5.17.0 binary), so zh_CN never matches zh_Hans.

Suggestion

Normalize/alias language codes before matching (zh_CN→zh_Hans, zh_TW→zh_Hant) when the client sends its language and/or when the server compares file language codes, or document one canonical code.

Workaround

Copy *.zh_Hans.po to *.zh_CN.po in each game's locale folders.