diff options
| author | cah <cth@carlh.net> | 2025-07-10 22:47:19 +0200 |
|---|---|---|
| committer | cah <cth@carlh.net> | 2025-07-10 22:47:19 +0200 |
| commit | 4be4e97abf911e7633172ada950d107a3ed28834 (patch) | |
| tree | c9deceb5f3684fa081db0613da88264732093fcb /src/lib/transcode_job.cc | |
| parent | 727c1aa7da8b325dfa38c8443b1dd356acaf6ec3 (diff) | |
| parent | 42bde2d97039f6d0d645d83db90612d18ebf225a (diff) | |
Merge branch 'compose-to-fmt-take2'
This removes all uses of String::compose, replacing them with fmt and
updating the i18n strings where required.
Diffstat (limited to 'src/lib/transcode_job.cc')
| -rw-r--r-- | src/lib/transcode_job.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/lib/transcode_job.cc b/src/lib/transcode_job.cc index c6da13381..2a408266f 100644 --- a/src/lib/transcode_job.cc +++ b/src/lib/transcode_job.cc @@ -25,7 +25,6 @@ #include "analytics.h" -#include "compose.hpp" #include "content.h" #include "config.h" #include "dcp_film_encoder.h" @@ -72,7 +71,7 @@ TranscodeJob::~TranscodeJob () string TranscodeJob::name () const { - return String::compose (_("Transcoding %1"), _film->name()); + return fmt::format(_("Transcoding {}"), _film->name()); } @@ -113,7 +112,7 @@ TranscodeJob::run () set_progress (1); set_error( _("Files have changed since they were added to the project."), - variant::insert_dcpomatic(_("Open the project in %1, check the settings, then save it before trying again.")) + variant::insert_dcpomatic(_("Open the project in {}, check the settings, then save it before trying again.")) ); set_state (FINISHED_ERROR); return; @@ -131,13 +130,13 @@ TranscodeJob::run () set_progress (1); set_state (FINISHED_OK); - LOG_GENERAL(N_("Transcode job completed successfully: %1 fps"), dcp::locale_convert<string>(frames_per_second(), 2, true)); + LOG_GENERAL(N_("Transcode job completed successfully: {} fps"), dcp::locale_convert<string>(frames_per_second(), 2, true)); if (variant::count_created_dcps() && dynamic_pointer_cast<DCPFilmEncoder>(_encoder)) { try { Analytics::instance()->successful_dcp_encode(); } catch (FileError& e) { - LOG_WARNING (N_("Failed to write analytics (%1)"), e.what()); + LOG_WARNING (N_("Failed to write analytics ({})"), e.what()); } } @@ -177,10 +176,10 @@ TranscodeJob::status () const return Job::status(); } - auto status = String::compose(_("%1; %2/%3 frames"), Job::status(), _encoder->frames_done(), _film->length().frames_round(_film->video_frame_rate())); + auto status = fmt::format(_("{}; {}/{} frames"), Job::status(), _encoder->frames_done(), _film->length().frames_round(_film->video_frame_rate())); if (auto const fps = _encoder->current_rate()) { /// TRANSLATORS: fps here is an abbreviation for frames per second - status += String::compose(_("; %1 fps"), dcp::locale_convert<string>(*fps, 1, true)); + status += fmt::format(_("; {} fps"), dcp::locale_convert<string>(*fps, 1, true)); } return status; |
