From d756b7cd4325a4acd7d8ccd16ac5cd54484d2fb7 Mon Sep 17 00:00:00 2001 From: hernan Date: Fri, 7 Aug 2026 22:14:29 -0400 Subject: [PATCH] OPTIONS: route CANCEL through Strings so a translation mod can reach it CANCEL is appended after the `ui.options.rows` hook, deliberately -- that is what stops a mod from orphaning the exit. But it also means no translation mod can ever see it: there is no row for one to rewrite, and the hook has already run by the time it is added. The result is that a fully translated OPTIONS menu has exactly one English word left on it, and it is the way out. I hit this with a Spanish catalog where every row translated and the exit did not. One call, matching how every other label on this screen is already built. Nothing changes without a catalog loaded: Strings is an identity function until a mod supplies one. Follows the same reasoning as #791. --- src/ui/OptionsMenu.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ui/OptionsMenu.lua b/src/ui/OptionsMenu.lua index 1187dc6c..c44f5718 100644 --- a/src/ui/OptionsMenu.lua +++ b/src/ui/OptionsMenu.lua @@ -585,8 +585,14 @@ function OptionsMenu:update(dt) end function OptionsMenu:draw() + -- Through Strings, like every other label on this menu. CANCEL is + -- appended AFTER the rows hook (see the header), which is what keeps a mod + -- from orphaning the exit -- but it also means a translation mod never sees + -- this string, and cannot: there is no row for it to rewrite. So the one + -- word a Spanish player could not read on a fully translated OPTIONS menu + -- was the way out of it. OptionRows.draw(self.game, self.rows, self.index, self.scroll or 0, - "CANCEL", #self.rows + 1) + Strings("CANCEL"), #self.rows + 1) end return OptionsMenu