mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
DiscIO: Make use of fmt where applicable
Once nice benefit of fmt is that we can use positional arguments in localizable strings. This a feature which has been requested for the Korean translation of strings like "Errors were found in %zu blocks in the %s partition." and which will no doubt be useful for other languages too.
This commit is contained in:
@ -15,6 +15,8 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <zlib.h>
|
||||
|
||||
#include "Common/Assert.h"
|
||||
@ -24,7 +26,6 @@
|
||||
#include "Common/Hash.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
#include "Common/StringUtil.h"
|
||||
#include "DiscIO/Blob.h"
|
||||
#include "DiscIO/CompressedBlob.h"
|
||||
#include "DiscIO/DiscScrubber.h"
|
||||
@ -256,8 +257,8 @@ static ConversionResultCode Output(OutputParameters parameters, File::IOFile* ou
|
||||
parameters.inpos == 0 ? 0 : static_cast<int>(100 * *position / parameters.inpos);
|
||||
|
||||
const std::string text =
|
||||
StringFromFormat(Common::GetStringT("%i of %i blocks. Compression ratio %i%%").c_str(),
|
||||
parameters.block_number, num_blocks, ratio);
|
||||
fmt::format(Common::GetStringT("{0} of {1} blocks. Compression ratio {2}%"),
|
||||
parameters.block_number, num_blocks, ratio);
|
||||
|
||||
const float completion = static_cast<float>(parameters.block_number) / num_blocks;
|
||||
|
||||
|
Reference in New Issue
Block a user