From 00a805cc39d9eded8feee232f41271d3456bfcd8 Mon Sep 17 00:00:00 2001 From: "Marco Antonio J. Costa" Date: Tue, 21 Jul 2026 07:07:58 -0300 Subject: [PATCH] remove lying, outdated or superfluous comments no more guards, no more cpp files included --- i18n/LanguageStrings.cpp | 13 +------------ i18n/language.cpp | 7 ------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/i18n/LanguageStrings.cpp b/i18n/LanguageStrings.cpp index 8c05c3a2..a24ff473 100644 --- a/i18n/LanguageStrings.cpp +++ b/i18n/LanguageStrings.cpp @@ -1,10 +1,4 @@ -// All eight languages' string tables in one translation unit (docs/plans/ -// language-design.md): each base + Ja2.5-carryover text file is included inside its -// own per-language namespace, the game-facing table symbols are the pointer globals -// below (statically bound to the build default), and BindLanguageStrings rebinds all -// of them to the language resolved at startup from the LANGUAGE ini key. - -#include "Text.h" +#include "Text.h" #include "FileMan.h" #include "Scheduling.h" #include "EditorMercs.h" @@ -14,11 +8,6 @@ #include -// Recipe R1 (docs/plans/language-design.md): the loose _Text.cpp files are still -// compiled standalone until Cn+2, and #include the headers declaring the now-pointer -// externs themselves; this guard keeps their array definitions out of those standalone -// TUs (which would collide with the pointer extern) while still compiling them here. - namespace lang_en { #include "_EnglishText.cpp" #include "_Ja25EnglishText.cpp" diff --git a/i18n/language.cpp b/i18n/language.cpp index eec929b6..f9b3daec 100644 --- a/i18n/language.cpp +++ b/i18n/language.cpp @@ -2,9 +2,6 @@ #include "DEBUG.H" namespace { -// Cn+4 retired the per-exe ENGLISH/GERMAN/... compile definitions along with the CMake -// language axis, so the build default is now a fixed constant; the ini key (below) -// overrides it at runtime via g_lang/BindLanguageStrings. constexpr i18n::Lang kBuildDefaultLang = i18n::Lang::en; auto RowsForLang(i18n::Lang lang) -> int { @@ -12,10 +9,6 @@ auto RowsForLang(i18n::Lang lang) -> int { } } -/* g_lang used to be a compile-time const picked by the ENGLISH/GERMAN/... - * define; it is now a runtime value that starts at the build's default and - * can be overridden at startup from the [Ja2 Settings] LANGUAGE ini key (see - * SetLanguageFromName / sgp.cpp GetRuntimeSettings). */ i18n::Lang g_lang = kBuildDefaultLang; int MAX_MESSAGES_ON_MAP_BOTTOM = RowsForLang(g_lang);