Fixed some bad usage of sprintf, cleaned up some translatable messages

This commit is contained in:
Maruno17
2023-04-02 00:52:12 +01:00
parent 1ead0a76f5
commit 9d50b27aa0
32 changed files with 87 additions and 84 deletions

View File

@@ -1049,7 +1049,7 @@ def pbRegionalDexEditor(dex)
end
when 0
if cmd[1] >= 0 # Edit entry
case pbMessage(_INTL("\\ts[]Do what with this entry?"),
case pbMessage("\\ts[]" + _INTL("Do what with this entry?"),
[_INTL("Change species"), _INTL("Clear"),
_INTL("Insert entry"), _INTL("Delete entry"),
_INTL("Cancel")], 5)
@@ -1166,7 +1166,7 @@ def pbRegionalDexEditorMain
refresh_list = true
end
elsif cmd[1] > 0 # Edit a Dex
case pbMessage(_INTL("\\ts[]Do what with this Dex?"),
case pbMessage("\\ts[]" + _INTL("Do what with this Dex?"),
[_INTL("Edit"), _INTL("Copy"), _INTL("Delete"), _INTL("Cancel")], 4)
when 0 # Edit
dex_lists[cmd[1] - 1] = pbRegionalDexEditor(dex_lists[cmd[1] - 1])

View File

@@ -212,7 +212,7 @@ class PokemonTilesetScene
cmds.push("#{tag.id_number}: #{tag.real_name}")
ids.push(tag.id_number)
end
val = pbMessage(_INTL("\\l[1]\\ts[]Set the terrain tag."), cmds, -1, nil, old_idx)
val = pbMessage("\\l[1]\\ts[]" + _INTL("Set the terrain tag."), cmds, -1, nil, old_idx)
if val >= 0 && val != old_tag
set_terrain_tag_for_tile_ID(selected, ids[val])
draw_overlay

View File

@@ -350,12 +350,12 @@ class MapScreenScene
end
def helpWindow
helptext = _INTL("A: Add map to canvas\r\n")
helptext += _INTL("DEL: Delete map from canvas\r\n")
helptext += _INTL("S: Go to another map\r\n")
helptext += _INTL("Click to select a map\r\n")
helptext += _INTL("Double-click: Edit map's metadata\r\n")
helptext += _INTL("Drag map to move it\r\n")
helptext = _INTL("A: Add map to canvas") + "\r\n"
helptext += _INTL("DEL: Delete map from canvas") + "\r\n"
helptext += _INTL("S: Go to another map") + "\r\n"
helptext += _INTL("Click to select a map") + "\r\n"
helptext += _INTL("Double-click: Edit map's metadata") + "\r\n"
helptext += _INTL("Drag map to move it") + "\r\n"
helptext += _INTL("Arrow keys/drag canvas: Move around canvas")
title = Window_UnformattedTextPokemon.newWithSize(
helptext, 0, 0, Graphics.width * 8 / 10, Graphics.height, @viewport

View File

@@ -380,9 +380,7 @@ module BattleAnimationEditor
cmdEditBG = -1
cmdNewFO = -1
cmdEditFO = -1
canvas.animation.timing.each do |i|
commands.push(sprintf("%s", i))
end
canvas.animation.timing.each { |i| commands.push(i.to_s) }
commands[cmdNewSound = commands.length] = _INTL("Add: Play Sound...")
commands[cmdNewBG = commands.length] = _INTL("Add: Set Background Graphic...")
commands[cmdEditBG = commands.length] = _INTL("Add: Edit Background Color/Location...")
@@ -413,7 +411,7 @@ module BattleAnimationEditor
cmdwin.index != cmdEditFO
if framewindow.changed?(1) # Set Frame
canvas.animation.timing[cmdwin.index].frame = framewindow.value(0) - 1
cmdwin.commands[cmdwin.index] = sprintf("%s", canvas.animation.timing[cmdwin.index])
cmdwin.commands[cmdwin.index] = canvas.animation.timing[cmdwin.index].to_s
cmdwin.refresh
next
end
@@ -476,7 +474,7 @@ module BattleAnimationEditor
when 2, 4
pbEditBG(canvas, canvas.animation.timing[cmdwin.index])
end
cmdwin.commands[cmdwin.index] = sprintf("%s", canvas.animation.timing[cmdwin.index])
cmdwin.commands[cmdwin.index] = canvas.animation.timing[cmdwin.index].to_s
cmdwin.refresh
end
if redrawcmds
@@ -486,7 +484,7 @@ module BattleAnimationEditor
cmdwin.commands[cmdNewFO] = nil if cmdNewFO >= 0
cmdwin.commands[cmdEditFO] = nil if cmdEditFO >= 0
cmdwin.commands.compact!
cmdwin.commands.push(sprintf("%s", canvas.animation.timing[canvas.animation.timing.length - 1]))
cmdwin.commands.push(canvas.animation.timing[canvas.animation.timing.length - 1].to_s)
cmdwin.commands[cmdNewSound = cmdwin.commands.length] = _INTL("Add: Play Sound...")
cmdwin.commands[cmdNewBG = cmdwin.commands.length] = _INTL("Add: Set Background Graphic...")
cmdwin.commands[cmdEditBG = cmdwin.commands.length] = _INTL("Add: Edit Background Color/Location...")

View File

@@ -287,7 +287,7 @@ class StringListProperty
do_refresh = true
end
else # Edit value
case pbMessage(_INTL("\\ts[]Do what with this value?"),
case pbMessage("\\ts[]" + _INTL("Do what with this value?"),
[_INTL("Edit"), _INTL("Delete"), _INTL("Cancel")], 3)
when 0 # Edit
new_value = pbMessageFreeText(_INTL("Enter the new value."),
@@ -1096,7 +1096,7 @@ class GameDataPoolProperty
need_refresh = true
end
else # Edit existing value
case pbMessage(_INTL("\\ts[]Do what with this value?"),
case pbMessage("\\ts[]" + _INTL("Do what with this value?"),
[_INTL("Change value"), _INTL("Delete"), _INTL("Cancel")], 3)
when 0 # Change value
new_value = pbChooseFromGameDataList(@game_data, entry[0])
@@ -1250,7 +1250,7 @@ module LevelUpMovesProperty
end
end
else # Edit existing move
case pbMessage(_INTL("\\ts[]Do what with this move?"),
case pbMessage("\\ts[]" + _INTL("Do what with this move?"),
[_INTL("Change level"), _INTL("Change move"), _INTL("Delete"), _INTL("Cancel")], 4)
when 0 # Change level
params = ChooseNumberParams.new
@@ -1457,7 +1457,7 @@ class EvolutionsProperty
end
end
else # Edit evolution
case pbMessage(_INTL("\\ts[]Do what with this evolution?"),
case pbMessage("\\ts[]" + _INTL("Do what with this evolution?"),
[_INTL("Change species"), _INTL("Change method"),
_INTL("Change parameter"), _INTL("Delete"), _INTL("Cancel")], 5)
when 0 # Change species

View File

@@ -206,8 +206,8 @@ MenuHandlers.add(:battle_debug_menu, :mega_evolution, {
next if !trainers[i]
text = (side == 0) ? "Your side:" : "Foe side:"
text += sprintf(" %d: %s", i, trainers[i].name)
text += sprintf(" [ABLE]") if value == -1
text += sprintf(" [UNABLE]") if value == -2
text += " [ABLE]" if value == -1
text += " [UNABLE]" if value == -2
commands.push(text)
cmds.push([side, i])
end