Index: src/lang/english.txt =================================================================== --- src/lang/english.txt (revision 11289) +++ src/lang/english.txt (working copy) @@ -480,9 +480,13 @@ ############ range for service numbers ends STR_019C_ROAD_VEHICLE :Road vehicle +STR_ROAD_VEHICLES_PL :road vehicles STR_019D_AIRCRAFT :Aircraft +STR_AIRCRAFT_PL :aircraft STR_019E_SHIP :Ship +STR_SHIPS_PL :ships STR_019F_TRAIN :Train +STR_TRAINS_PL :trains STR_01A0_IS_GETTING_OLD :{WHITE}{STRING} {COMMA} is getting old STR_01A1_IS_GETTING_VERY_OLD :{WHITE}{STRING} {COMMA} is getting very old STR_01A2_IS_GETTING_VERY_OLD_AND :{WHITE}{STRING} {COMMA} is getting very old and urgently needs replacing @@ -3156,7 +3160,7 @@ STR_VEHICLE_LIST_SHIP_DEPOT :{BLACK}{STRING1} - {COMMA} Ship{P "" s} STR_VEHICLE_LIST_AIRCRAFT_DEPOT :{BLACK}{STRING1} - {COMMA} Aircraft -STR_REPLACE_VEHICLES_WHITE :{WHITE}Replace {STRING} +STR_REPLACE_VEHICLES_CAPTION :{STRING2} STR_REPLACE_VEHICLES_START :{BLACK}Start Replacing Vehicles STR_REPLACE_VEHICLES_STOP :{BLACK}Stop Replacing Vehicles STR_NOT_REPLACING :{BLACK}Not replacing @@ -3168,9 +3172,9 @@ STR_REPLACE_HELP_RAILTYPE :{BLACK}Choose the railtype you want to replace engines for STR_REPLACE_HELP_REPLACE_INFO_TAB :{BLACK}Displays which engine the left selected engine is being replaced with, if any STR_REPLACE_HELP :{BLACK}This allows you to replace one engine type with another type, when trains of the original type enter a depot -STR_REPLACE_REMOVE_WAGON :{BLACK}Wagon removal: {ORANGE}{SKIP}{STRING} +STR_REPLACE_REMOVE_WAGON :{BLACK}Wagon removal: {ORANGE}{SKIP}{SKIP}{SKIP}{STRING} STR_REPLACE_REMOVE_WAGON_HELP :{BLACK}Make autoreplace keep the length of a train the same by removing wagons (starting at the front), if replacing the engine would make the train longer. -STR_REPLACE_ENGINE_WAGON_SELECT :{BLACK}Replacing: {ORANGE}{SKIP}{SKIP}{STRING} +STR_REPLACE_ENGINE_WAGON_SELECT :{BLACK}Replacing: {ORANGE}{SKIP}{SKIP}{SKIP}{SKIP}{STRING} STR_REPLACE_ENGINE_WAGON_SELECT_HELP :{BLACK} EXPERIMENTAL FEATURE {}Switch between engine and wagon replacement windows.{}Wagon replacement will only be done if the new wagon can be refitted into carrying the same type of cargo as the old one. This is checked for each wagon when the actual replacement takes place. STR_RAIL_VEHICLE_NOT_AVAILABLE :{WHITE}Vehicle is not available STR_ROAD_VEHICLE_NOT_AVAILABLE :{WHITE}Vehicle is not available @@ -3354,7 +3358,9 @@ STR_GROUP_SHIPS_CAPTION :{WHITE}{GROUP} - {COMMA} Ship{P "" s} STR_GROUP_AIRCRAFTS_CAPTION :{WHITE}{GROUP} - {COMMA} Aircraft STR_GROUP_RENAME_CAPTION :{BLACK}Rename a group -STR_GROUP_REPLACE_CAPTION :{WHITE}Replace Vehicles of "{GROUP}" +STR_GROUP_REPLACE_CAPTION :{WHITE}Replace {STRING} of "{GROUP}" +STR_GROUP_ALL_REPLACE_CAPTION :{WHITE}Replace all {STRING}{SKIP} +STR_GROUP_DEFAULT_REPLACE_CAPTION :{WHITE}Replace ungrouped {STRING}{SKIP} STR_GROUP_CAN_T_CREATE :{WHITE}Can't create group... STR_GROUP_CAN_T_DELETE :{WHITE}Can't delete this group... Index: src/autoreplace_gui.cpp =================================================================== --- src/autoreplace_gui.cpp (revision 11289) +++ src/autoreplace_gui.cpp (working copy) @@ -215,12 +215,12 @@ static void ReplaceVehicleWndProc(Window *w, WindowEvent *e) { - /* Strings for the pulldown menu */ + /* Strings to insert in window caption */ static const StringID _vehicle_type_names[] = { - STR_019F_TRAIN, - STR_019C_ROAD_VEHICLE, - STR_019E_SHIP, - STR_019D_AIRCRAFT + STR_TRAINS_PL, + STR_ROAD_VEHICLES_PL, + STR_SHIPS_PL, + STR_AIRCRAFT_PL }; switch (e->event) { @@ -263,14 +263,21 @@ !EngineHasReplacementForPlayer(p, selected_id[0], selected_group)); /* now the actual drawing of the window itself takes place */ - SetDParam(0, _vehicle_type_names[w->window_number]); + switch (selected_group) { + case ALL_GROUP: SetDParam(0, STR_GROUP_ALL_REPLACE_CAPTION); break; + case DEFAULT_GROUP: SetDParam(0, STR_GROUP_DEFAULT_REPLACE_CAPTION); break; + default: SetDParam(0, STR_GROUP_REPLACE_CAPTION); break; + } + SetDParam(1, _vehicle_type_names[w->window_number]); + SetDParam(2, selected_group); + if (w->window_number == VEH_TRAIN) { /* set on/off for renew_keep_length */ - SetDParam(1, p->renew_keep_length ? STR_CONFIG_PATCHES_ON : STR_CONFIG_PATCHES_OFF); + SetDParam(3, p->renew_keep_length ? STR_CONFIG_PATCHES_ON : STR_CONFIG_PATCHES_OFF); /* set wagon/engine button */ - SetDParam(2, WP(w, replaceveh_d).wagon_btnstate ? STR_ENGINES : STR_WAGONS); + SetDParam(4, WP(w, replaceveh_d).wagon_btnstate ? STR_ENGINES : STR_WAGONS); /* sets the colour of that art thing */ w->widget[13].color = _player_colors[_local_player]; @@ -409,7 +416,7 @@ static const Widget _replace_rail_vehicle_widgets[] = { { WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 443, 0, 13, STR_REPLACE_VEHICLES_WHITE, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 443, 0, 13, STR_REPLACE_VEHICLES_CAPTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, { WWT_STICKYBOX, RESIZE_NONE, 14, 444, 455, 0, 13, STR_NULL, STR_STICKY_BUTTON}, { WWT_PANEL, RESIZE_TB, 14, 0, 227, 126, 227, 0x0, STR_NULL}, { WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 138, 240, 251, STR_REPLACE_VEHICLES_START, STR_REPLACE_HELP_START_BUTTON}, @@ -434,7 +441,7 @@ static const Widget _replace_road_vehicle_widgets[] = { { WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 443, 0, 13, STR_REPLACE_VEHICLES_WHITE, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 443, 0, 13, STR_REPLACE_VEHICLES_CAPTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, { WWT_STICKYBOX, RESIZE_NONE, 14, 444, 455, 0, 13, STR_NULL, STR_STICKY_BUTTON}, { WWT_PANEL, RESIZE_TB, 14, 0, 227, 126, 217, 0x0, STR_NULL}, { WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 138, 218, 229, STR_REPLACE_VEHICLES_START, STR_REPLACE_HELP_START_BUTTON}, @@ -451,7 +458,7 @@ static const Widget _replace_ship_aircraft_vehicle_widgets[] = { { WWT_CLOSEBOX, RESIZE_NONE, 14, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, -{ WWT_CAPTION, RESIZE_NONE, 14, 11, 443, 0, 13, STR_REPLACE_VEHICLES_WHITE, STR_018C_WINDOW_TITLE_DRAG_THIS}, +{ WWT_CAPTION, RESIZE_NONE, 14, 11, 443, 0, 13, STR_REPLACE_VEHICLES_CAPTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, { WWT_STICKYBOX, RESIZE_NONE, 14, 444, 455, 0, 13, STR_NULL, STR_STICKY_BUTTON}, { WWT_PANEL, RESIZE_TB, 14, 0, 227, 110, 201, 0x0, STR_NULL}, { WWT_PUSHTXTBTN, RESIZE_TB, 14, 0, 138, 202, 213, STR_REPLACE_VEHICLES_START, STR_REPLACE_HELP_START_BUTTON},