#2988: Simplify "n players" messages
-------------------------------------------------+-------------------------
 Reporter:  Emdek                                |             Owner:
     Type:  patch (an actual patch, not a        |  cybersphinx
  request for one)                               |            Status:  new
 Priority:  normal                               |         Milestone:
Component:  Translation                          |  unspecified
 Keywords:                                       |           Version:
 Blocking:                                       |  master_20111204
                                                 |        Blocked By:
                                                 |  Operating System:  All
                                                 |  /Non-Specific
-------------------------------------------------+-------------------------
 Following diff replaces (too) many similar messages to translate with one
 using plurals.

 {{{
 --- multimenu.cpp~      2011-12-04 23:37:07.000000000 +0100
 +++ multimenu.cpp       2011-12-16 23:13:05.852344819 +0100
 @@ -144,7 +144,7 @@
  #define M_REQUEST_15P   (MULTIMENU+84)
  #define M_REQUEST_16P   (MULTIMENU+85)
  static const unsigned M_REQUEST_NP[] = {M_REQUEST_2P,    M_REQUEST_3P,
 M_REQUEST_4P,    M_REQUEST_5P,    M_REQUEST_6P,    M_REQUEST_7P,
 M_REQUEST_8P,    M_REQUEST_9P,    M_REQUEST_10P,    M_REQUEST_11P,
 M_REQUEST_12P,    M_REQUEST_13P,    M_REQUEST_14P,    M_REQUEST_15P,
 M_REQUEST_16P};
 -static char const * M_REQUEST_NP_TIPS[] = {   N_("2 players"), N_("3
 players"), N_("4 players"), N_("5 players"), N_("6 players"), N_("7
 players"), N_("8 players"), N_("9 players"), N_("10 players"), N_("11
 players"), N_("12 players"), N_("13 players"), N_("14 players"), N_("15
 players"), N_("16 players")};
 +static char const * M_REQUEST_NP_TIPS[] = {"2 players", "3 players", "4
 players", "5 players", "6 players", "7 players", "8 players", "9 players",
 "10 players", "11 players", "12 players", "13 players", "14 players", "15
 players", "16 players"};

  #define M_REQUEST_BUT  (MULTIMENU+100)         // allow loads of buttons.
  #define M_REQUEST_BUTM (MULTIMENU+1100)
 @@ -649,7 +649,7 @@
                         sButInit.id             = M_REQUEST_NP[numPlayers
 - 2];
                         sButInit.y              += 22;
                         sButInit.UserData       = numPlayers;
 -                       sButInit.pTip           =
 gettext(M_REQUEST_NP_TIPS[numPlayers - 2]);
 +                       sButInit.pTip           = ngettext("%d player",
 "%d players", numPlayers);
                         widgAddButton(psRScreen, &sButInit);
                 }
         }

 }}}

 Testing: compilation successful.

-- 
Ticket URL: <http://developer.wz2100.net/ticket/2988>
Warzone 2100 Trac <http://developer.wz2100.net/>
The Warzone 2100 Project
_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to