Author: sveinung Date: Sat Dec 20 20:20:35 2014 New Revision: 27361 URL: http://svn.gna.org/viewcvs/freeciv?rev=27361&view=rev Log: Merge the Help build Wonder success message text.
Put the only difference, if work is remaining or surplus, in a variable. See patch #5581 Modified: trunk/server/unithand.c Modified: trunk/server/unithand.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.c?rev=27361&r1=27360&r2=27361&view=diff ============================================================================== --- trunk/server/unithand.c (original) +++ trunk/server/unithand.c Sat Dec 20 20:20:35 2014 @@ -2075,7 +2075,7 @@ static void handle_unit_help_build_wonder(struct player *pplayer, int unit_id, int city_id) { - const char *text; + const char *work; struct city *pcity_dest; struct unit *punit = player_unit_by_number(pplayer, unit_id); @@ -2098,16 +2098,26 @@ conn_list_do_buffer(pplayer->connections); if (build_points_left(pcity_dest) >= 0) { - text = _("Your %s helps build the %s in %s (%d remaining)."); + /* TRANS: Your Caravan helps build the Pyramids in Bergen (4 + * remaining). */ + work = _("remaining"); } else { - text = _("Your %s helps build the %s in %s (%d surplus)."); - } - notify_player(pplayer, city_tile(pcity_dest), E_CARAVAN_ACTION, ftc_server, - text, /* Must match arguments below. */ + /* TRANS: Your Caravan helps build the Pyramids in Bergen (4 + * surplus). */ + work = _("surplus"); + } + + notify_player(pplayer, city_tile(pcity_dest), E_CARAVAN_ACTION, + ftc_server, + /* TRANS: Your Caravan helps build the Pyramids in Bergen + * (4 surplus). */ + _("Your %s helps build the %s in %s (%d %s)."), unit_link(punit), - improvement_name_translation(pcity_dest->production.value.building), + improvement_name_translation( + pcity_dest->production.value.building), city_link(pcity_dest), - abs(build_points_left(pcity_dest))); + abs(build_points_left(pcity_dest)), + work); wipe_unit(punit, ULR_USED, NULL); send_player_info_c(pplayer, pplayer->connections); _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits