diff options
| author | Léo Lam <leo@leolam.fr> | 2020-11-17 18:02:39 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-17 18:02:39 +0100 |
| commit | 07be82d64f16d82bb99e29c84de82120eba348bf (patch) | |
| tree | f4e1dde294ede8ee55901a942b8a24cf6ff81c80 /Source/Core/DiscIO | |
| parent | 4c9b226bd623e12a8269ae869462916e385e647d (diff) | |
| parent | 9a01c3fb9f137b666f27fcf8f1bfc3ac9c42346b (diff) | |
Merge pull request #9253 from JosJuice/positional-arguments
Use positional arguments in all translatable fmt strings
Diffstat (limited to 'Source/Core/DiscIO')
| -rw-r--r-- | Source/Core/DiscIO/CompressedBlob.cpp | 13 | ||||
| -rw-r--r-- | Source/Core/DiscIO/FileBlob.cpp | 6 | ||||
| -rw-r--r-- | Source/Core/DiscIO/NANDImporter.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/DiscIO/VolumeVerifier.cpp | 10 | ||||
| -rw-r--r-- | Source/Core/DiscIO/WIABlob.cpp | 6 |
5 files changed, 19 insertions, 18 deletions
diff --git a/Source/Core/DiscIO/CompressedBlob.cpp b/Source/Core/DiscIO/CompressedBlob.cpp index 76b1366db0..35bbced94c 100644 --- a/Source/Core/DiscIO/CompressedBlob.cpp +++ b/Source/Core/DiscIO/CompressedBlob.cpp @@ -107,7 +107,8 @@ bool CompressedBlobReader::GetBlock(u64 block_num, u8* out_ptr) m_file.Seek(offset, SEEK_SET); if (!m_file.ReadBytes(m_zlib_buffer.data(), comp_block_size)) { - PanicAlertFmtT("The disc image \"{}\" is truncated, some of the data is missing.", m_file_name); + PanicAlertFmtT("The disc image \"{0}\" is truncated, some of the data is missing.", + m_file_name); m_file.Clear(); return false; } @@ -116,8 +117,8 @@ bool CompressedBlobReader::GetBlock(u64 block_num, u8* out_ptr) const u32 block_hash = Common::HashAdler32(m_zlib_buffer.data(), comp_block_size); if (block_hash != m_hashes[block_num]) { - PanicAlertFmtT("The disc image \"{}\" is corrupt.\n" - "Hash of block {} is {:08x} instead of {:08x}.", + PanicAlertFmtT("The disc image \"{0}\" is corrupt.\n" + "Hash of block {1} is {2:08x} instead of {3:08x}.", m_file_name, block_num, block_hash, m_hashes[block_num]); } @@ -277,7 +278,7 @@ bool ConvertToGCZ(BlobReader* infile, const std::string& infile_path, if (!outfile) { PanicAlertFmtT( - "Failed to open the output file \"{}\".\n" + "Failed to open the output file \"{0}\".\n" "Check that you have permissions to write the target folder and that the media can " "be written.", outfile_path); @@ -368,11 +369,11 @@ bool ConvertToGCZ(BlobReader* infile, const std::string& infile_path, } if (result == ConversionResultCode::ReadFailed) - PanicAlertFmtT("Failed to read from the input file \"{}\".", infile_path); + PanicAlertFmtT("Failed to read from the input file \"{0}\".", infile_path); if (result == ConversionResultCode::WriteFailed) { - PanicAlertFmtT("Failed to write the output file \"{}\".\n" + PanicAlertFmtT("Failed to write the output file \"{0}\".\n" "Check that you have enough space available on the target drive.", outfile_path); } diff --git a/Source/Core/DiscIO/FileBlob.cpp b/Source/Core/DiscIO/FileBlob.cpp index 13439d029b..b22bb6caa6 100644 --- a/Source/Core/DiscIO/FileBlob.cpp +++ b/Source/Core/DiscIO/FileBlob.cpp @@ -50,7 +50,7 @@ bool ConvertToPlain(BlobReader* infile, const std::string& infile_path, if (!outfile) { PanicAlertFmtT( - "Failed to open the output file \"{}\".\n" + "Failed to open the output file \"{0}\".\n" "Check that you have permissions to write the target folder and that the media can " "be written.", outfile_path); @@ -90,13 +90,13 @@ bool ConvertToPlain(BlobReader* infile, const std::string& infile_path, const u64 sz = std::min(buffer_size, infile->GetDataSize() - inpos); if (!infile->Read(inpos, sz, buffer.data())) { - PanicAlertFmtT("Failed to read from the input file \"{}\".", infile_path); + PanicAlertFmtT("Failed to read from the input file \"{0}\".", infile_path); success = false; break; } if (!outfile.WriteBytes(buffer.data(), sz)) { - PanicAlertFmtT("Failed to write the output file \"{}\".\n" + PanicAlertFmtT("Failed to write the output file \"{0}\".\n" "Check that you have enough space available on the target drive.", outfile_path); success = false; diff --git a/Source/Core/DiscIO/NANDImporter.cpp b/Source/Core/DiscIO/NANDImporter.cpp index d67bbf047d..aea5398426 100644 --- a/Source/Core/DiscIO/NANDImporter.cpp +++ b/Source/Core/DiscIO/NANDImporter.cpp @@ -272,6 +272,6 @@ void NANDImporter::ExportKeys(const std::string& nand_root) const std::string file_path = nand_root + "/keys.bin"; File::IOFile file(file_path, "wb"); if (!file.WriteBytes(m_nand_keys.data(), NAND_KEYS_SIZE)) - PanicAlertFmtT("Unable to write to file {}", file_path); + PanicAlertFmtT("Unable to write to file {0}", file_path); } } // namespace DiscIO diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp index 860709448e..c1c9a8ae3b 100644 --- a/Source/Core/DiscIO/VolumeVerifier.cpp +++ b/Source/Core/DiscIO/VolumeVerifier.cpp @@ -312,11 +312,11 @@ std::vector<RedumpVerifier::PotentialMatch> RedumpVerifier::ScanDatfile(const st // so show a panic alert rather than just using ERROR_LOG // i18n: "Serial" refers to serial numbers, e.g. RVL-RSBE-USA - PanicAlertFmtT("Serial and/or version data is missing from {}\n" - "Please append \"{}\" (without the quotes) to the datfile URL when downloading\n" - "Example: {}", - GetPathForSystem(system), "serial,version", - "http://redump.org/datfile/gc/serial,version"); + PanicAlertFmtT( + "Serial and/or version data is missing from {0}\n" + "Please append \"{1}\" (without the quotes) to the datfile URL when downloading\n" + "Example: {2}", + GetPathForSystem(system), "serial,version", "http://redump.org/datfile/gc/serial,version"); m_result = {Status::Error, Common::GetStringT("Failed to parse Redump.org data")}; return {}; } diff --git a/Source/Core/DiscIO/WIABlob.cpp b/Source/Core/DiscIO/WIABlob.cpp index a8cce71cbe..6ffc8a286b 100644 --- a/Source/Core/DiscIO/WIABlob.cpp +++ b/Source/Core/DiscIO/WIABlob.cpp @@ -2033,7 +2033,7 @@ bool ConvertToWIAOrRVZ(BlobReader* infile, const std::string& infile_path, if (!outfile) { PanicAlertFmtT( - "Failed to open the output file \"{}\".\n" + "Failed to open the output file \"{0}\".\n" "Check that you have permissions to write the target folder and that the media can " "be written.", outfile_path); @@ -2048,11 +2048,11 @@ bool ConvertToWIAOrRVZ(BlobReader* infile, const std::string& infile_path, chunk_size, callback); if (result == ConversionResultCode::ReadFailed) - PanicAlertFmtT("Failed to read from the input file \"{}\".", infile_path); + PanicAlertFmtT("Failed to read from the input file \"{0}\".", infile_path); if (result == ConversionResultCode::WriteFailed) { - PanicAlertFmtT("Failed to write the output file \"{}\".\n" + PanicAlertFmtT("Failed to write the output file \"{0}\".\n" "Check that you have enough space available on the target drive.", outfile_path); } |
