From 2eb35875e0375e4ccb3174d63782678d49de2866 Mon Sep 17 00:00:00 2001 From: Binrui Dong Date: Sun, 2 Jan 2022 15:00:49 +0800 Subject: [PATCH] Pluralize messages (#53961) --- src/activity_handlers.cpp | 6 ++++-- src/iuse.cpp | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/activity_handlers.cpp b/src/activity_handlers.cpp index ee674b4b4936a..9ee7ef8de068a 100644 --- a/src/activity_handlers.cpp +++ b/src/activity_handlers.cpp @@ -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." ) ); diff --git a/src/iuse.cpp b/src/iuse.cpp index 4d630493ff8aa..64f93fa3d8d2c 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -9568,7 +9568,8 @@ cata::optional 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." ) ); }