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

@@ -40,12 +40,12 @@ module FileLineData
def self.linereport
if @section
if @key.nil?
return _INTL("File {1}, section {2}\r\n{3}\r\n\r\n", @file, @section, @value)
return _INTL("File {1}, section {2}\r\n{3}", @file, @section, @value) + "\r\n\r\n"
else
return _INTL("File {1}, section {2}, key {3}\r\n{4}\r\n\r\n", @file, @section, @key, @value)
return _INTL("File {1}, section {2}, key {3}\r\n{4}", @file, @section, @key, @value) + "\r\n\r\n"
end
else
return _INTL("File {1}, line {2}\r\n{3}\r\n\r\n", @file, @lineno, @linedata)
return _INTL("File {1}, line {2}\r\n{3}", @file, @lineno, @linedata) + "\r\n\r\n"
end
end
end

View File

@@ -560,7 +560,7 @@ module Compiler
else
pbWriteCsvRecord(record, f, schema)
end
f.write(sprintf("\r\n"))
f.write("\r\n")
end
end
end

View File

@@ -574,7 +574,7 @@ module Compiler
trainerid = GameData::TrainerType.get(trtype).id
filename = GameData::TrainerType.charset_filename_brief(trainerid)
if FileTest.image_exist?("Graphics/Characters/" + filename)
firstpage.graphic.character_name = sprintf(filename)
firstpage.graphic.character_name = filename
end
end
# Create strings that will be used repeatedly