Skip to content

Commit

Permalink
Merge pull request #46565 from akirashirosawa/power-unit-pgettext
Browse files Browse the repository at this point in the history
Add translation for units of energy (mJ-J-kJ).
  • Loading branch information
ZhilkinSerg authored Jan 5, 2021
2 parents 00c7f69 + 326e83c commit 9170fdd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/player_display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -636,13 +636,13 @@ static void draw_bionics_tab( const catacurses::window &w_bionics,
std::string power_unit;
if( you.get_power_level() < 1_J ) {
power_amount = units::to_millijoule( you.get_power_level() );
power_unit = "mJ";
power_unit = pgettext( "energy unit: millijoule", "mJ" );
} else if( you.get_power_level() < 1_kJ ) {
power_amount = units::to_joule( you.get_power_level() );
power_unit = "J";
power_unit = pgettext( "energy unit: joule", "J" );
} else {
power_amount = units::to_kilojoule( you.get_power_level() );
power_unit = "kJ";
power_unit = pgettext( "energy unit: kilojoule", "kJ" );
}
// NOLINTNEXTLINE(cata-use-named-point-constants)
trim_and_print( w_bionics, point( 1, 1 ), getmaxx( w_bionics ) - 1, c_white,
Expand Down

0 comments on commit 9170fdd

Please sign in to comment.