@@ -283,7 +283,7 @@ void item::basic_info( std::vector<iteminfo> &info, const iteminfo_query *parts,
283283 }
284284 if ( parts->test ( iteminfo_parts::BASE_OWNER ) && !owner.is_null () ) {
285285 info.emplace_back ( " BASE" , string_format ( _ ( " Owner: %s" ),
286- _ ( get_owner_name () ) ) );
286+ get_owner_name () ) );
287287 }
288288 if ( parts->test ( iteminfo_parts::BASE_CATEGORY ) ) {
289289 info.emplace_back ( " BASE" , _ ( " Category: " ),
@@ -394,7 +394,7 @@ void item::debug_info( std::vector<iteminfo> &info, const iteminfo_query *parts,
394394 typeId ().str () ) );
395395 if ( !old_owner.is_null () ) {
396396 info.emplace_back ( " BASE" , string_format ( _ ( " Old owner: %s" ),
397- _ ( get_old_owner_name () ) ) );
397+ get_old_owner_name () ) );
398398 }
399399 info.emplace_back ( " BASE" , _ ( " age (hours): " ), " " , iteminfo::lower_is_better,
400400 to_hours<int >( age () ) );
@@ -1733,14 +1733,19 @@ void item::armor_protection_info( std::vector<iteminfo> &info, const iteminfo_qu
17331733 bool display_median = percent_best < 50 && percent_worst < 50 ;
17341734
17351735 std::string protection_table;
1736+ const std::string worst_chance_string = string_format ( _ ( " <bad>%d%%</bad> chance" ),
1737+ percent_worst );
1738+ const std::string median_chance = _ ( " <color_c_yellow>Median</color> chance" );
1739+ const std::string best_chance_string = string_format ( _ ( " <good>%d%%</good> chance" ),
1740+ percent_best );
17361741 if ( display_median ) {
17371742 protection_table +=
1738- string_format ( " <bold>%s</bold>;<bad>%d%%</bad> chance;<color_c_yellow>Median</color> chance;<good>%d%%</good> chance \n " ,
1739- _ ( " Protection" ), percent_worst, percent_best );
1743+ string_format ( " <bold>%s</bold>;%s;%s;%s \n " ,
1744+ _ ( " Protection" ), worst_chance_string, median_chance, best_chance_string );
17401745 } else if ( percent_worst > 0 ) {
17411746 protection_table +=
1742- string_format ( " <bold>%s</bold>;<bad>%d%%</bad> chance;<good>%d%%</good> chance \n " ,
1743- _ ( " Protection" ), percent_worst, percent_best );
1747+ string_format ( " <bold>%s</bold>;%s;%s \n " ,
1748+ _ ( " Protection" ), worst_chance_string, best_chance_string );
17441749 } else {
17451750 protection_table += string_format ( " <bold>%s</bold>\n " , _ ( " Protection" ) );
17461751 }
@@ -2715,7 +2720,7 @@ void item::tool_info( std::vector<iteminfo> &info, const iteminfo_query *parts,
27152720 std::string &eport = type->tool ->e_port ;
27162721 if ( !eport.empty () ) {
27172722 std::string compat;
2718- compat += _ ( " * This device has electronic port type: " + colorize ( eport, c_light_green ) ) ;
2723+ compat += _ ( " * This device has electronic port type: " ) + colorize ( _ ( eport ) , c_light_green ) ;
27192724 std::vector<std::string> &eport_banned = type->tool ->e_ports_banned ;
27202725 if ( !eport_banned.empty () ) {
27212726 compat += _ ( " \n * This device does not support transfer to e-port types: " );
0 commit comments