From a10006d7c95edfe55c1b00de9e258c55aa7625d1 Mon Sep 17 00:00:00 2001 From: aBlueShadow Date: Fri, 20 Sep 2024 20:16:50 +0200 Subject: [PATCH] add missing translation markers in scienceDatabase --- src/scienceDatabase.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/scienceDatabase.cpp b/src/scienceDatabase.cpp index 5e88774f43..704c2a3313 100644 --- a/src/scienceDatabase.cpp +++ b/src/scienceDatabase.cpp @@ -517,21 +517,25 @@ void fillDefaultDatabaseData() if (ship_template->impulse_speed > 0.0f) { - entry->addKeyValue(tr("database", "Move speed"), string(ship_template->impulse_speed * 60 / 1000, 1) + " u/min"); - entry->addKeyValue(tr("database", "Reverse move speed"), string(ship_template->impulse_reverse_speed * 60 / 1000, 1) + " u/min"); + entry->addKeyValue(tr("database", "Move speed"), tr("database","{speed} u/min").format({{"speed", string(ship_template->impulse_speed * 60 / 1000, 1)}})); + entry->addKeyValue(tr("database", "Reverse move speed"), tr("database","{speed} u/min").format({{"speed", string(ship_template->impulse_reverse_speed * 60 / 1000, 1)}})); } if (ship_template->turn_speed > 0.0f) { - entry->addKeyValue(tr("database", "Turn speed"), string(ship_template->turn_speed, 1) + " deg/sec"); + entry->addKeyValue(tr("database", "Turn speed"), tr("database","{turnspeed} deg/sec").format({{"turnspeed", string(ship_template->turn_speed, 1)}})); } if (ship_template->warp_speed > 0.0f) { - entry->addKeyValue(tr("database", "Warp speed"), string(ship_template->warp_speed * 60 / 1000, 1) + " u/min"); + entry->addKeyValue(tr("database", "Warp speed"), tr("database","{speed} u/min").format({{"speed", string(ship_template->warp_speed * 60 / 1000, 1)}})); } if (ship_template->has_jump_drive) { - entry->addKeyValue(tr("database", "Jump range"), string(ship_template->jump_drive_min_distance / 1000, 0) + " - " + string(ship_template->jump_drive_max_distance / 1000, 0) + " u"); + entry->addKeyValue( + tr("database", "Jump range"), + tr("database","{mindistance} - {maxdistance} u").format({ + {"mindistance", string(ship_template->jump_drive_min_distance / 1000, 0)}, + {"maxdistance", string(ship_template->jump_drive_max_distance / 1000, 0)} + })); } - for(int n=0; nbeams[n].getRange() > 0)