launcher: route the last raw literals through strings (#791)

finishes what #767 started (thanks @hernan0078). most of that pr landed
already when the launcher panels moved to LauncherView; these six sites were
what was left, and they sit next to siblings that already call Strings.

also pins the delete chip to the wider of Delete/Sure? instead of to Delete.
english happens to have the longer word first, a translation need not.
This commit is contained in:
bryanthaboi
2026-08-04 09:50:51 -04:00
committed by GitHub
parent 3c1246ee06
commit 7d3950658a
2 changed files with 13 additions and 9 deletions
+10 -6
View File
@@ -807,7 +807,7 @@ local function buildRomCard(imp, parent, m, version, info, ready, locked)
local accent = version == "yellow" and "gold" or version
local c = card(parent, { padding = m.cardPad, gap = 8 * m.s })
label(c, "ROM", 12 * m.s + 1, C("gray"))
label(c, Strings("ROM"), 12 * m.s + 1, C("gray"))
label(c, romState, 15 * m.s + 2, C("white"))
label(c, romDetail, 12 * m.s + 2, C("detail"))
if romProgress ~= nil then
@@ -847,7 +847,7 @@ local function buildSaveFilesCard(imp, parent, m, version, ready, locked)
local savImportLabel = imp.isNX and Strings("Scan again") or Strings("Import save")
local c = card(parent, { padding = m.cardPad, gap = 8 * m.s })
label(c, "SAVE FILES", 12 * m.s + 1, C("gray"))
label(c, Strings("SAVE FILES"), 12 * m.s + 1, C("gray"))
local row = mk({ parent = c, width = "100%",
positioning = "flex", flexDirection = "horizontal", gap = 10 * m.s })
-- explicit halves rather than flex growth, which mis-distributed inside
@@ -889,7 +889,7 @@ local function buildSlotCard(imp, parent, m, version)
local head = mk({ parent = c, width = "100%",
positioning = "flex", flexDirection = "horizontal",
justifyContent = "space-between", alignItems = "center" })
label(head, "SAVE SLOT", 12 * m.s + 1, C("gray"), { textWrap = false })
label(head, Strings("SAVE SLOT"), 12 * m.s + 1, C("gray"), { textWrap = false })
label(head, n == 1 and Strings("1 slot") or Strings("%d slots", n),
12 * m.s + 1, C("gray"), { textWrap = false })
@@ -983,10 +983,14 @@ local function buildSlotCard(imp, parent, m, version)
})
end
local armed = deleteArmed(imp, "slot", slot.id, version)
-- width pinned to the unarmed label so arming to "Sure?" never reflows
-- the row under the pointer (#433)
-- width pinned so arming to "Sure?" never reflows the row under the
-- pointer (#433). Pinned to the wider of the two captions, not to the
-- unarmed one: English "Delete" is the longer of the pair, but a
-- translation need not keep that order (Japanese さくじょ is shorter than
-- よろしい?), and pinning to the shorter one clips the other.
button(imp, btnRow, rowKey .. "-del", DELETE_LABEL(armed), {
w = math.ceil(textWidth(chipSize, DELETE_LABEL(false))) + 26,
w = math.ceil(math.max(textWidth(chipSize, DELETE_LABEL(false)),
textWidth(chipSize, DELETE_LABEL(true)))) + 26,
size = chipSize, kind = armed and "dangerArmed" or "danger",
keepArm = true,
action = function()
+3 -3
View File
@@ -2888,7 +2888,7 @@ end
-- NX / desktop / Android labels and inbox hints for the FlexLove view.
function RomImporter:_modsImportButtonLabel()
if self.isNX then return Strings("Scan again") end
return "Import mod .zip"
return Strings("Import mod .zip")
end
function RomImporter:_modsDefaultHint()
@@ -2899,7 +2899,7 @@ function RomImporter:_modsDefaultHint()
return Strings("Copy a .zip via MTP into %s/imports/mods/\n"
.. "DBI MTP → 1: SD Card/%simports/mods/", saveDir, rel)
end
if self.android then return "Or copy a mod .zip via USB." end
if self.android then return Strings("Or copy a mod .zip via USB.") end
return Strings("Or drop a mod .zip onto the window.")
end
@@ -2915,7 +2915,7 @@ function RomImporter:_savesDefaultHint(version)
.. "DBI MTP → 1: SD Card/%s%s/", game, saveDir, inbox, rel, inbox)
end
if self.android then
return "Import or export a .sav with the system file picker."
return Strings("Import or export a .sav with the system file picker.")
end
return Strings("Import a .sav to a new slot, or export the active slot.")
end