Skip to content

Commit

Permalink
Pluralize messages (#53961)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettDong authored Jan 2, 2022
1 parent e53cf9c commit 2eb3587
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/activity_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3621,11 +3621,13 @@ void activity_handlers::chop_planks_finish( player_activity *act, Character *you
map &here = get_map();
if( planks > 0 ) {
here.spawn_item( here.getlocal( act->placement ), itype_2x4, planks, 0, calendar::turn );
you->add_msg_if_player( m_good, _( "You produce %d planks." ), planks );
you->add_msg_if_player( m_good, n_gettext( "You produce %d plank.", "You produce %d planks.",
planks ), planks );
}
if( scraps > 0 ) {
here.spawn_item( here.getlocal( act->placement ), itype_splinter, scraps, 0, calendar::turn );
you->add_msg_if_player( m_good, _( "You produce %d splinters." ), scraps );
you->add_msg_if_player( m_good, n_gettext( "You produce %d splinter.", "You produce %d splinters.",
scraps ), scraps );
}
if( planks < max_planks / 2 ) {
you->add_msg_if_player( m_bad, _( "You waste a lot of the wood." ) );
Expand Down
3 changes: 2 additions & 1 deletion src/iuse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9568,7 +9568,8 @@ cata::optional<int> iuse::play_game( Character *p, item *it, bool, const tripoin
.query().action;
if( res == "FRIENDS" ) {
if( fcount > 1 ) {
add_msg( _( "You and your %d friends start playing." ), fcount );
add_msg( n_gettext( "You and your %d friend start playing.",
"You and your %d friends start playing.", fcount ), fcount );
} else {
add_msg( _( "You and your friend start playing." ) );
}
Expand Down

0 comments on commit 2eb3587

Please sign in to comment.