Merge lp:~widelands-dev/widelands/string-fixes into lp:widelands

Proposed by GunChleoc on 2015-07-31
Status: Merged
Merged at revision: 7505
Proposed branch: lp:~widelands-dev/widelands/string-fixes
Merge into: lp:widelands
Diff against target: 798 lines (+139/-104)
37 files modified
campaigns/atl01.wmf/scripting/texts.lua (+1/-1)
campaigns/bar01.wmf/scripting/texts.lua (+1/-1)
campaigns/emp01.wmf/scripting/texts.lua (+3/-2)
campaigns/emp02.wmf/scripting/texts.lua (+4/-4)
campaigns/tutorial01_basic_control.wmf/scripting/texts.lua (+1/-1)
maps/MP Scenarios/Smugglers.wmf/scripting/texts.lua (+3/-3)
maps/Trident of Fire.wmf/elemental (+0/-1)
scripting/win_conditions/collectors.lua (+15/-6)
src/editor/tools/editor_info_tool.cc (+25/-19)
src/editor/ui_menus/editor_main_menu_random_map.cc (+1/-1)
src/editor/ui_menus/editor_main_menu_save_map.cc (+1/-1)
src/editor/ui_menus/editor_main_menu_save_map_make_directory.cc (+1/-1)
src/editor/ui_menus/editor_player_menu.cc (+1/-5)
src/editor/ui_menus/editor_tool_place_immovable_options_menu.cc (+1/-1)
src/logic/game.cc (+1/-1)
src/logic/map.cc (+2/-1)
src/logic/objective.h (+1/-1)
src/logic/player.cc (+5/-5)
src/logic/production_program.cc (+1/-2)
src/network/internet_gaming.cc (+7/-5)
src/network/netclient.cc (+4/-2)
src/ui_basic/spinbox.cc (+3/-3)
src/ui_fsmenu/launch_mpg.cc (+11/-8)
src/ui_fsmenu/options.cc (+3/-1)
src/wui/game_options_sound_menu.cc (+4/-4)
src/wui/game_summary.cc (+4/-0)
src/wui/multiplayersetupgroup.cc (+2/-1)
src/wui/plot_area.cc (+9/-6)
src/wui/soldierlist.cc (+10/-3)
tribes/atlanteans/blackroot_farm/conf (+1/-1)
tribes/atlanteans/dungeon/conf (+5/-5)
tribes/atlanteans/foresters_house/help.lua (+1/-1)
tribes/atlanteans/horsebreeder/conf (+1/-1)
tribes/barbarians/warriorsax/conf (+1/-1)
tribes/empire/foresters_house/help.lua (+1/-1)
tribes/empire/vineyard/conf (+1/-1)
tribes/scripting/format_help.lua (+3/-3)
To merge this branch: bzr merge lp:~widelands-dev/widelands/string-fixes
Reviewer Review Type Date Requested Status
SirVer 2015-07-31 Approve on 2015-08-04
Review via email: mp+266520@code.launchpad.net

Description of the change

Various string fixes for issues reported on Transifex.

Eliminated preceding and trailing whitespaces.

To post a comment you must log in.
7497. By GunChleoc on 2015-07-31

New warehouse stock policy icons by fraang.

7498. By SirVer on 2015-07-31

This is an overhaul of the Developers list. I also moved the definition for the
locales into the JSON files, which then get parsed into i18n/locales.lua by the
update script. This way, we will have all locale-related info in one place, and
managed on Transifex.

7499. By GunChleoc on 2015-08-01

Adjusted angle of winter water waves.

7500. By GunChleoc on 2015-08-01

Fetched translations and updated catalogues.

7501. By GunChleoc on 2015-08-02

Economy tutorial fix: the building statistics window needs some time to build its contents.

7502. By GunChleoc on 2015-08-03

edited dither_layer values for terrains. This fixes some problems with Wasteland terrains, hard edges and trees appearing as if they grew on water.

7503. By TiborB on 2015-08-03

AI - small fix of attacking logic

7504. By TiborB on 2015-08-03

AI - attacking logic - additional fix

7505. By SirVer on 2015-08-04

Various string fixes for issues reported on Transifex.

Eliminated preceding and trailing whitespaces.

SirVer (sirver) wrote :

I reviewed offline and merged right after.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'campaigns/atl01.wmf/scripting/texts.lua'
2--- campaigns/atl01.wmf/scripting/texts.lua 2015-07-26 10:45:53 +0000
3+++ campaigns/atl01.wmf/scripting/texts.lua 2015-08-03 07:41:58 +0000
4@@ -263,7 +263,7 @@
5 {
6 title = _"Sidolus Seeks Out Jundlina",
7 body = sidolus(
8- _([[May Satul warm you, Jundlina. Have you considered mining for resources in the mountains around us? We are running short of quartz, crystal and diamonds for our buildings. Also we could use more iron, gold and especially coal. If we find an ample supply of those commodities, we could start producing weapons and tools; this would help enormously. Of course, we would need smelters, a weapon smithy, an armor smithy and a toolsmithy. And maybe even more.]]))
9+ _([[May Satul warm you, Jundlina. Have you considered mining for resources in the mountains around us? We are running short of quartz and diamonds for our buildings. Also, we could use more iron, gold and especially coal. If we find an ample supply of those commodities, we could start producing weapons and tools; this would help enormously. Of course, we would need smelters, a weapon smithy, an armor smithy and a toolsmithy. And maybe even more.]]))
10 },
11 {
12 title = _"Jundlina Replies",
13
14=== modified file 'campaigns/bar01.wmf/scripting/texts.lua'
15--- campaigns/bar01.wmf/scripting/texts.lua 2015-07-26 11:05:38 +0000
16+++ campaigns/bar01.wmf/scripting/texts.lua 2015-08-03 07:41:58 +0000
17@@ -43,7 +43,7 @@
18 number = 2,
19 body = objective_text(_"Build coal and iron ore mines",
20 listitem_bullet(_"Build a coal mine and an iron ore mine.") ..
21- listitem_arrow(_"To do so, place a flag up on the mountain’s flank to the east (on mountain terrain though, not mountain meadow). When you click on the new flag, you can send geologists there. Because the flag is on a mountain, the geologists will search for ores; otherwise, they would search for water. Then build a mine for both kinds of resources that he will find, choosing the appropriate mine to be built:") ..
22+ listitem_arrow(_"To do so, place a flag up on the mountain’s flank to the east (on mountain terrain though, not mountain meadow). When you click on the new flag, you can send geologists there. Because the flag is on a mountain, the geologists will search for ores; otherwise, they would search for water. Then build a mine for both kinds of resources that they will find, choosing the appropriate mine to be built:") ..
23 "</rt>" ..
24 rt("image=tribes/barbarians/resi_coal1/resi_00.png", p(_"a bit of coal")) ..
25 rt("image=tribes/barbarians/resi_coal2/resi_00.png", p(_"a lot of coal")) ..
26
27=== modified file 'campaigns/emp01.wmf/scripting/texts.lua'
28--- campaigns/emp01.wmf/scripting/texts.lua 2015-07-25 08:07:44 +0000
29+++ campaigns/emp01.wmf/scripting/texts.lua 2015-08-03 07:41:58 +0000
30@@ -85,7 +85,8 @@
31 .. paragraphdivider() ..
32 _([[Three weeks later, I returned to Fremil to speak with our king. He was furious at the Barbarians, yet forbade any attack on these tribes. He believed that our army was too weak to survive in a war against the Barbarians.]])
33 .. paragraphdivider() ..
34- _([[Still, I saw no way that I could erase my shame without fighting against these Barbarians. So, I left Fremil by boat to find a new world and a new life for myself, somewhere in the south. Now I am sailing on the perl-gulf with my family, some of my friends and a few of my best warriors.]])),
35+ -- TRANSLATORS: Gulf of Perl is a place name.
36+ _([[Still, I saw no way that I could erase my shame without fighting against these Barbarians. So, I left Fremil by boat to find a new world and a new life for myself, somewhere in the south. Now I am sailing on the Gulf of Perl with my family, some of my friends and a few of my best warriors.]])),
37 w=500,
38 posy=1,
39 }
40@@ -93,7 +94,7 @@
41 diary_page_2 = {
42 title=_"The Rough Sea",
43 body= lutius(_"Diary of Lutius",
44- _([[It seems as if sailing on the perl-gulf was one of our biggest mistakes. Nature was against us and drove us into a dark, wild storm. I really don’t know how many hours have passed since the waves rose higher than our boat, but still it would be suicide to go outside.]])
45+ _([[It seems as if sailing on the Gulf of Perl was one of our biggest mistakes. Nature was against us and drove us into a dark, wild storm. I really don’t know how many hours have passed since the waves rose higher than our boat, but still it would be suicide to go outside.]])
46 .. paragraphdivider() ..
47 _([[Our ship is badly damaged and is taking in more and more water. We can thank the Gods if we survive this black night with our lives.]])),
48 w=400,
49
50=== modified file 'campaigns/emp02.wmf/scripting/texts.lua'
51--- campaigns/emp02.wmf/scripting/texts.lua 2015-07-25 18:16:31 +0000
52+++ campaigns/emp02.wmf/scripting/texts.lua 2015-08-03 07:41:58 +0000
53@@ -61,10 +61,10 @@
54
55 obj_build_mining_infrastructure = {
56 name = "build_mining_infrastructure ",
57- title =_"Build a stonemason and mining infrastructure",
58+ title =_"Build a stonemason’s house and mining infrastructure",
59 number = 7,
60- body = objective_text(_"Stonemason and Mining Infrastructure",
61- listitem_bullet(_[[Build a stonemason and then a complete mining and production infrastructure (coal mine and / or charcoal kiln, iron ore mine, toolsmithy, weapon smithy, armor smithy and smelting works).]])
62+ body = objective_text(_"Stonemason’s house and Mining Infrastructure",
63+ listitem_bullet(_[[Build a stonemason’s house and then a complete mining and production infrastructure (coal mine and / or charcoal kiln, iron ore mine, toolsmithy, weapon smithy, armor smithy and smelting works).]])
64 ),
65 }
66
67@@ -176,7 +176,7 @@
68 body= saledus(_"Saledus is excited",
69 _([[By the Gods, this is an unbelievable stroke of fortune! There are two more mountains, and it seems that one has a large quantity of coal and the other of iron ore. I advise you to immediately build iron ore and coal mines (or at least charcoal kilns), smelting works, toolsmithies, armor and weapon smithies.]])
70 .. paragraphdivider() ..
71- _([[However: for all these bigger buildings, we need better and more elegant building materials. So you have to build a stonemason, who will cut columns from marble.]])
72+ _([[However: for all these bigger buildings, we need better and more elegant building materials. So you have to build a house for the stonemason, who will cut columns from marble.]])
73 .. paragraphdivider() ..
74 _([[After everything, we can now begin to live like we did in Fremil.]]))
75 .. new_objectives(obj_build_mining_infrastructure)
76
77=== modified file 'campaigns/tutorial01_basic_control.wmf/scripting/texts.lua'
78--- campaigns/tutorial01_basic_control.wmf/scripting/texts.lua 2015-07-26 10:48:55 +0000
79+++ campaigns/tutorial01_basic_control.wmf/scripting/texts.lua 2015-08-03 07:41:58 +0000
80@@ -410,7 +410,7 @@
81 obj_title = _"Archive all messages in your inbox",
82 obj_body = rt(
83 h1(_"Archive Your Inbox Messages") ..
84- p(_[[The message window is central to fully controlling your tribe’s fortune. However, you will get a lot of messages in a real game. To keep your head straight, you should try to keep the inbox empty. ]]) ..
85+ p(_[[The message window is central to fully controlling your tribe’s fortune. However, you will get a lot of messages in a real game. To keep your head straight, you should try to keep the inbox empty.]]) ..
86 paragraphdivider() ..
87 listitem_bullet(_[[Archive all your messages in your inbox now.]]) ..
88 listitem_arrow(_[[To do so, open the message window by pressing ‘n’ or clicking the rightmost button at the very bottom of the screen. Then mark all messages by checking the check box in front of them. Then, click the ‘Archive All’ button.]])
89
90=== modified file 'maps/MP Scenarios/Smugglers.wmf/scripting/texts.lua'
91--- maps/MP Scenarios/Smugglers.wmf/scripting/texts.lua 2014-10-03 20:16:29 +0000
92+++ maps/MP Scenarios/Smugglers.wmf/scripting/texts.lua 2015-08-03 07:41:58 +0000
93@@ -4,10 +4,10 @@
94 welcome_msg = rt(
95 h1(_"Smugglers") ..
96 h2(_"Rules") ..
97- p(_([[Smugglers is a fun map for 4 players. You and your partner start diagonally from each other on a point symmetric island. There are plenty of smuggling tunnels on this island, each consisting of a receiving and a sending end. ]]) ..
98- _([[To establish a smuggling route, you need to build a warehouse on a sending/receiving spot while your team mate has to build one on the corresponding receiving/sending spot. A ware is then transported every 10 seconds. ]]) ..
99+ p(_([[Smugglers is a fun map for 4 players. You and your partner start diagonally from each other on a point symmetric island. There are plenty of smuggling tunnels on this island, each consisting of a receiving and a sending end.]])) ..
100+ p(_([[To establish a smuggling route, you need to build a warehouse on a sending/receiving spot while your team mate has to build one on the corresponding receiving/sending spot. A ware is then transported every 10 seconds.]])) ..
101 -- TRANSLATORS: %s = '<number> points'
102- _([[For harder to defend smuggling routes, you get 2 or 3 points per ware smuggled. The first team to collect %s wins.]])) ..
103+ p(_([[For harder to defend smuggling routes, you get 2 or 3 points per ware smuggled. The first team to collect %s wins.]])) ..
104 rt(h2(_"A sending spot")) .. rt("image=map:send_spot.png", p(" ")) ..
105 rt(h2(_"A receiving spot")) .. rt("image=map:recv_spot.png", p(" ")) ..
106 rt(h2(_"Notes") ..
107
108=== modified file 'maps/Trident of Fire.wmf/elemental'
109--- maps/Trident of Fire.wmf/elemental 2014-10-08 19:52:48 +0000
110+++ maps/Trident of Fire.wmf/elemental 2015-08-03 07:41:58 +0000
111@@ -9,7 +9,6 @@
112 name=_"Trident of Fire"
113 author="Robnick"
114 descr=_"In the vicinity of three major volcanoes, six lovely islands are inviting settlers to start a new life. Deserts and a quickly growing forest wait to be discovered. But only by becoming a naval power will your tribe be able to explore enough resources to compete with its opponents."
115-hint=_"Suggested teams: red vs. green | (blue, yellow) vs. (green, orange) | (blue, black) vs. (green, red) | (blue, black, yellow) vs. (green, red, orange)"
116 tags="official,seafaring,1v1,2teams,3teams"
117
118 [teams00]
119
120=== modified file 'scripting/win_conditions/collectors.lua'
121--- scripting/win_conditions/collectors.lua 2015-05-06 07:15:40 +0000
122+++ scripting/win_conditions/collectors.lua 2015-08-03 07:41:58 +0000
123@@ -5,6 +5,7 @@
124 include "scripting/coroutine.lua" -- for sleep
125 include "scripting/messages.lua"
126 include "scripting/formatting.lua"
127+include "scripting/format_scenario.lua"
128 include "scripting/table.lua"
129 include "scripting/win_condition_functions.lua"
130
131@@ -108,9 +109,9 @@
132 points = points + lpoints
133 local warename = wl.Game():get_ware_description(plr.tribe_name, ware).descname
134 -- TRANSLATORS: For example: 'gold (3 P) x 4 = 12 P", P meaning "Points'
135- descr[#descr+1] = [[• ]] .. (_" %1$s (%2$i P) x %3$i = %4$i P"):bformat(
136+ descr[#descr+1] = listitem_bullet(_"%1$s (%2$i P) x %3$i = %4$i P"):bformat(
137 warename, value, count, lpoints
138- ) .. "<br>"
139+ )
140 end
141 descr[#descr+1] = "</p>" .. h3(ngettext("Total: %i point", "Total: %i points", points)):format(points)
142 .. "<p line-spacing=3 font-size=12>"
143@@ -123,13 +124,21 @@
144 set_textdomain("win_conditions")
145 local h = math.floor(remaining_time / 60)
146 local m = remaining_time % 60
147+ -- TRANSLATORS: Context: 'The game will end in (2 hours and) 30 minutes.'
148 local time = ""
149+ if m > 0 then
150+ time = (ngettext("%i minute", "%i minutes", m)):format(m)
151+ end
152 if h > 0 then
153- -- TRANSLATORS: Context: 'The game will end in %s.'
154- time = (_"%1$ih%2$02im"):bformat(h,m)
155- else
156- time = (ngettext("%i minute", "%i minutes", m)):format(m)
157+ if m > 0 then
158+ -- TRANSLATORS: Context: 'The game will end in 2 hours and 30 minutes.'
159+ time = (ngettext("%1% hour and %2%", "%1% hours and %2%", h)):bformat(h, time)
160+ else
161+ -- TRANSLATORS: Context: 'The game will end in 2 hours.'
162+ time = (ngettext("%1% hour", "%1% hours", h)):bformat(h)
163+ end
164 end
165+ -- TRANSLATORS: Context: 'The game will end in 2 hours and 30 minutes.'
166 local msg = p(_"The game will end in %s."):format(time)
167 msg = msg .. "\n\n"
168
169
170=== modified file 'src/editor/tools/editor_info_tool.cc'
171--- src/editor/tools/editor_info_tool.cc 2015-02-24 13:51:38 +0000
172+++ src/editor/tools/editor_info_tool.cc 2015-08-03 07:41:58 +0000
173@@ -20,6 +20,7 @@
174 #include "editor/tools/editor_info_tool.h"
175
176 #include <cstdio>
177+#include <vector>
178
179 #include <boost/format.hpp>
180
181@@ -54,29 +55,33 @@
182 buf += "• " + (boost::format(_("Coordinates: (%1$i, %2$i)"))
183 % center.node.x % center.node.y).str() + "\n";
184
185- std::string temp = "";
186+
187+ std::vector<std::string> caps_strings;
188 Widelands::NodeCaps const caps = f.nodecaps();
189 switch (caps & Widelands::BUILDCAPS_SIZEMASK) {
190- /** TRANSLATORS: This is part of a list, e.g. Caps: medium flag walk */
191- case Widelands::BUILDCAPS_SMALL: temp += _(" small"); break;
192- /** TRANSLATORS: This is part of a list, e.g. Caps: medium flag walk */
193- case Widelands::BUILDCAPS_MEDIUM: temp += _(" medium"); break;
194- /** TRANSLATORS: This is part of a list, e.g. Caps: medium flag walk */
195- case Widelands::BUILDCAPS_BIG: temp += _(" big"); break;
196+ /** TRANSLATORS: Editor terrain property: small building plot */
197+ case Widelands::BUILDCAPS_SMALL: caps_strings.push_back(_("small")); break;
198+ /** TRANSLATORS: Editor terrain property: medium building plot */
199+ case Widelands::BUILDCAPS_MEDIUM: caps_strings.push_back(_("medium")); break;
200+ /** TRANSLATORS: Editor terrain property: big building plot */
201+ case Widelands::BUILDCAPS_BIG: caps_strings.push_back(_("big")); break;
202 default: break;
203 };
204- /** TRANSLATORS: This is part of a list, e.g. Caps: medium flag walk */
205- if (caps & Widelands::BUILDCAPS_FLAG) temp += _(" flag");
206- /** TRANSLATORS: This is part of a list, e.g. Caps: flag mine walk */
207- if (caps & Widelands::BUILDCAPS_MINE) temp += _(" mine");
208- /** TRANSLATORS: This is part of a list, e.g. Caps: big flag port walk */
209- if (caps & Widelands::BUILDCAPS_PORT) temp += _(" port");
210- /** TRANSLATORS: This is part of a list, e.g. Caps: medium flag walk */
211- if (caps & Widelands::MOVECAPS_WALK) temp += _(" walk");
212- /** TRANSLATORS: This is part of a list, e.g. Caps: swim */
213- if (caps & Widelands::MOVECAPS_SWIM) temp += _(" swim");
214+ /** TRANSLATORS: Editor terrain property: space for a flag */
215+ if (caps & Widelands::BUILDCAPS_FLAG) caps_strings.push_back(_("flag"));
216+ /** TRANSLATORS: Editor terrain property: mine building plot */
217+ if (caps & Widelands::BUILDCAPS_MINE) caps_strings.push_back(_("mine"));
218+ /** TRANSLATORS: Editor terrain property: port space */
219+ if (caps & Widelands::BUILDCAPS_PORT) caps_strings.push_back(_("port"));
220+ /** TRANSLATORS: Editor terrain property: units can walk on this terrain */
221+ if (caps & Widelands::MOVECAPS_WALK) caps_strings.push_back(_("walkable"));
222+ /** TRANSLATORS: Editor terrain property: units can swim on this terrain (fish, ships) */
223+ if (caps & Widelands::MOVECAPS_SWIM) caps_strings.push_back(_("swimmable"));
224
225- buf += std::string("• ") + (boost::format(_("Caps:%s")) % temp).str() + "\n";
226+ buf += std::string("• ")
227+ + (boost::format(_("Caps: %s"))
228+ % i18n::localize_list(caps_strings, i18n::ConcatenateWith::COMMA)).str()
229+ + "\n";
230
231 if (f.get_owned_by() > 0) {
232 buf += std::string("• ") +
233@@ -86,6 +91,7 @@
234 buf += std::string("• ") + _("Owned by: —") + "\n";
235 }
236
237+ std::string temp = "";
238 temp = f.get_immovable() ? _("Has base immovable") : _("No base immovable");
239 buf += "• " + temp + "\n";
240
241@@ -150,7 +156,7 @@
242
243 if (map.get_nrplayers() > 0) {
244 buf += "• " +
245- (boost::format(_("Players: %d")) % static_cast<int>(map.get_nrplayers())).str() + "\n";
246+ (boost::format(_("Players: %u")) % static_cast<unsigned int>(map.get_nrplayers())).str() + "\n";
247 }
248 else {
249 buf += "• " + std::string(_("Players: -")) + "\n";
250
251=== modified file 'src/editor/ui_menus/editor_main_menu_random_map.cc'
252--- src/editor/ui_menus/editor_main_menu_random_map.cc 2014-11-30 18:49:38 +0000
253+++ src/editor/ui_menus/editor_main_menu_random_map.cc 2015-08-03 07:41:58 +0000
254@@ -57,7 +57,7 @@
255 {"greenland", _("Summer")},
256 {"winterland", _("Winter")},
257 {"desert", _("Desert")},
258- {"blackland", _("Black")},
259+ {"blackland", _("Wasteland")},
260 }),
261 m_current_world(0) {
262 int32_t const offsx = 5;
263
264=== modified file 'src/editor/ui_menus/editor_main_menu_save_map.cc'
265--- src/editor/ui_menus/editor_main_menu_save_map.cc 2015-07-25 21:12:32 +0000
266+++ src/editor/ui_menus/editor_main_menu_save_map.cc 2015-08-03 07:41:58 +0000
267@@ -108,7 +108,7 @@
268 posy += 20 + spacing;
269
270 new UI::Textarea
271- (this, posx, posy, descr_label_w, 20, _("Descr: "), UI::Align_CenterLeft);
272+ (this, posx, posy, descr_label_w, 20, _("Descr:"), UI::Align_CenterLeft);
273 m_descr =
274 new UI::MultilineTextarea
275 (this,
276
277=== modified file 'src/editor/ui_menus/editor_main_menu_save_map_make_directory.cc'
278--- src/editor/ui_menus/editor_main_menu_save_map_make_directory.cc 2014-09-19 09:07:14 +0000
279+++ src/editor/ui_menus/editor_main_menu_save_map_make_directory.cc 2015-08-03 07:41:58 +0000
280@@ -35,7 +35,7 @@
281 int32_t const offsy = 30;
282 int32_t posy = offsy;
283
284- new UI::Textarea(this, spacing, posy, _("Enter Directory Name: "));
285+ new UI::Textarea(this, spacing, posy, _("Enter Directory Name:"));
286 posy += 20 + spacing;
287
288 m_edit =
289
290=== modified file 'src/editor/ui_menus/editor_player_menu.cc'
291--- src/editor/ui_menus/editor_player_menu.cc 2015-06-05 19:13:06 +0000
292+++ src/editor/ui_menus/editor_player_menu.cc 2015-08-03 07:41:58 +0000
293@@ -202,12 +202,8 @@
294 map.set_nrplayers(nr_players);
295 { // register new default name for this players
296 assert(nr_players <= 99); // 2 decimal digits
297- std::string number = "";
298- if (char const nr_players_10 = nr_players / 10)
299- number += '0' + nr_players_10;
300- number += '0' + nr_players % 10;
301 /** TRANSLATORS: Default player name, e.g. Player 1 */
302- const std::string name = (boost::format(_("Player %s")) % number).str();
303+ const std::string name = (boost::format(_("Player %u")) % static_cast<unsigned int>(nr_players)).str();
304 map.set_scenario_player_name(nr_players, name);
305 }
306 map.set_scenario_player_tribe(nr_players, m_tribes[0]);
307
308=== modified file 'src/editor/ui_menus/editor_tool_place_immovable_options_menu.cc'
309--- src/editor/ui_menus/editor_tool_place_immovable_options_menu.cc 2014-12-03 20:16:51 +0000
310+++ src/editor/ui_menus/editor_tool_place_immovable_options_menu.cc 2015-08-03 07:41:58 +0000
311@@ -55,7 +55,7 @@
312 EditorInteractive& parent,
313 EditorPlaceImmovableTool& tool,
314 UI::UniqueWindow::Registry& registry)
315- : EditorToolOptionsMenu(parent, registry, 0, 0, _("Immovable Select")) {
316+ : EditorToolOptionsMenu(parent, registry, 0, 0, _("Immovables")) {
317 const Widelands::World& world = parent.egbase().world();
318 multi_select_menu_.reset(
319 new CategorizedItemSelectionMenu<Widelands::ImmovableDescr, EditorPlaceImmovableTool>(
320
321=== modified file 'src/logic/game.cc'
322--- src/logic/game.cc 2015-04-07 06:49:51 +0000
323+++ src/logic/game.cc 2015-08-03 07:41:58 +0000
324@@ -487,7 +487,7 @@
325 "no starting position.\n"
326 "You can manually add a starting position with the Widelands "
327 "Editor to fix this problem."),
328- p);
329+ static_cast<unsigned int>(p));
330 }
331 }
332
333
334=== modified file 'src/logic/map.cc'
335--- src/logic/map.cc 2015-07-25 21:12:32 +0000
336+++ src/logic/map.cc 2015-08-03 07:41:58 +0000
337@@ -24,6 +24,7 @@
338
339 #include <boost/algorithm/string.hpp>
340 #include <boost/algorithm/string/predicate.hpp>
341+#include <boost/format.hpp>
342
343 #include "base/log.h"
344 #include "base/macros.h"
345@@ -330,7 +331,7 @@
346 // <undefined> (as set before) is useless and will lead to a
347 // crash -> Widelands will search for tribe "<undefined>"
348 set_scenario_player_tribe(1, TribeDescr::get_all_tribenames()[0]);
349- set_scenario_player_name(1, _("Player 1"));
350+ set_scenario_player_name(1, (boost::format(_("Player %u")) % 1).str());
351 set_scenario_player_ai(1, "");
352 set_scenario_player_closeable(1, false);
353
354
355=== modified file 'src/logic/objective.h'
356--- src/logic/objective.h 2014-07-05 16:41:51 +0000
357+++ src/logic/objective.h 2015-08-03 07:41:58 +0000
358@@ -33,7 +33,7 @@
359 class Objective {
360 public:
361 Objective(const std::string& init_name)
362- : m_name(init_name), m_descname(init_name), m_descr(_("no descr")), m_visible(true), m_done(false) {
363+ : m_name(init_name), m_descname(init_name), m_descr(_("This objective has no description.")), m_visible(true), m_done(false) {
364 }
365
366 // Unique internal name of the objective.
367
368=== modified file 'src/logic/player.cc'
369--- src/logic/player.cc 2015-02-09 05:57:08 +0000
370+++ src/logic/player.cc 2015-08-03 07:41:58 +0000
371@@ -226,11 +226,11 @@
372 throw WLWarning
373 (_("Missing starting position"),
374 _
375- ("Widelands could not start the game, because player %u has no "
376- "starting position.\n"
377- "You can manually add a starting position with Widelands Editor, "
378- "to fix this problem."),
379- m_plnum);
380+ ("Widelands could not start the game, because player %u has "
381+ "no starting position.\n"
382+ "You can manually add a starting position with the Widelands "
383+ "Editor to fix this problem."),
384+ static_cast<unsigned int>(m_plnum));
385 }
386
387
388
389=== modified file 'src/logic/production_program.cc'
390--- src/logic/production_program.cc 2015-04-21 20:32:22 +0000
391+++ src/logic/production_program.cc 2015-08-03 07:41:58 +0000
392@@ -1226,8 +1226,7 @@
393 "percentage", parameters);
394 }
395 std::string description =
396- /** TRANSLATORS: %1$s = production site name, %2$s = production program name, %3$s = resource */
397- (boost::format(_("%1$s %2$s mine %3$s")) % descr->descname() % production_program_name
398+ (boost::format("%1$s %2$s mine %3$s") % descr->descname() % production_program_name
399 % world.get_resource(m_resource)->descname())
400 .str();
401
402
403=== modified file 'src/network/internet_gaming.cc'
404--- src/network/internet_gaming.cc 2015-01-21 20:57:11 +0000
405+++ src/network/internet_gaming.cc 2015-08-03 07:41:58 +0000
406@@ -582,12 +582,14 @@
407
408 if (subcmd == IGPCMD_CHAT) {
409 // Something went wrong with the chat message the user sent.
410- message += _("Chat message could not be sent. ");
411+ message += _("Chat message could not be sent.");
412 if (reason == "NO_SUCH_USER")
413- message +=
414- (boost::format
415- (InternetGamingMessages::get_message(reason)) % packet.string().c_str())
416- .str();
417+ message =
418+ (boost::format ("%s %s")
419+ % message
420+ % (boost::format
421+ (InternetGamingMessages::get_message(reason)) % packet.string().c_str()))
422+ .str();
423 }
424
425 else if (subcmd == IGPCMD_GAME_OPEN) {
426
427=== modified file 'src/network/netclient.cc'
428--- src/network/netclient.cc 2015-02-06 16:37:25 +0000
429+++ src/network/netclient.cc 2015-08-03 07:41:58 +0000
430@@ -1091,8 +1091,10 @@
431 else
432 msg = NetworkGamingMessages::get_message(reason, arg);
433
434- if (trysave)
435- msg += _(" An automatic savegame will be created.");
436+ if (trysave) {
437+ /** TRANSLATORS: %s contains an error message. */
438+ msg = (boost::format(_("%s An automatic savegame will be created.")) % msg).str();
439+ }
440
441 UI::WLMessageBox mmb
442 (d->modal,
443
444=== modified file 'src/ui_basic/spinbox.cc'
445--- src/ui_basic/spinbox.cc 2014-12-06 12:22:35 +0000
446+++ src/ui_basic/spinbox.cc 2015-08-03 07:41:58 +0000
447@@ -124,7 +124,7 @@
448 std::string unit_text = std::to_string(sbi->value);
449 if (! sbi->unit.empty()) {
450 /** TRANSLATORS: %i = number, %s = unit, e.g. "5 pixels" in the advanced options */
451- unit_text = (boost::format(_("%i %s")) % sbi->value % sbi->unit.c_str()).str();
452+ unit_text = (boost::format(_("%1$i %2$s")) % sbi->value % sbi->unit.c_str()).str();
453 }
454
455 sbi->text = new UI::Textarea
456@@ -197,7 +197,7 @@
457 }
458 }
459 if (!was_in_list) {
460- sbi->text->set_text((boost::format("%i %s") % sbi->value % sbi->unit.c_str()).str());
461+ sbi->text->set_text((boost::format(_("%1$i %2$s")) % sbi->value % sbi->unit.c_str()).str());
462 }
463
464 sbi->butMinus->set_enabled(sbi->min < sbi->value);
465@@ -358,7 +358,7 @@
466 void SpinBox::remove_replacement(int32_t value)
467 {
468 if (int32_t i = find_replacement(value) >= 0) {
469- sbi->valrep[i].text = (boost::format("%i %s") % value % sbi->unit.c_str()).str();
470+ sbi->valrep[i].text = (boost::format(_("%1$i %2$s")) % value % sbi->unit.c_str()).str();
471 }
472 }
473
474
475=== modified file 'src/ui_fsmenu/launch_mpg.cc'
476--- src/ui_fsmenu/launch_mpg.cc 2015-01-31 16:03:59 +0000
477+++ src/ui_fsmenu/launch_mpg.cc 2015-08-03 07:41:58 +0000
478@@ -73,7 +73,8 @@
479 (this, "saved_game",
480 space, y + buth + space, butw, buth,
481 g_gr->images().get("pics/but0.png"),
482- _("Saved game"), _("Select a saved game"), true, false);
483+ /** Translators: This is a button to select a savegame */
484+ _("Saved Game"), _("Select a saved game"), true, false);
485 btn->sigclicked.connect
486 (boost::bind
487 (&MapOrSaveSelectionWindow::pressedButton, boost::ref(*this), 2));
488@@ -294,7 +295,8 @@
489 m_wincondition.set_tooltip
490 (_("Win condition is set through the scenario"));
491 } else if (m_settings->settings().savegame) {
492- m_wincondition.set_title(_("Savegame"));
493+ /** Translators: This is a game type */
494+ m_wincondition.set_title(_("Saved Game"));
495 m_wincondition.set_tooltip
496 (_("The game is a saved game – the win condition was set before."));
497 } else {
498@@ -429,12 +431,13 @@
499 throw WLWarning
500 (_("File not found"),
501 _
502- ("Widelands tried to start a game with a file that could not be "
503- "found at the given path.\n"
504- "The file was: %s\n"
505- "If this happens, the host might have selected a file that you do "
506- "not own. Normally, such a file should be sent from the host to "
507- "you, but perhaps the transfer was not yet finished!?!"),
508+ ("Widelands tried to start a game with a file that could not be "
509+ "found at the given path.\n"
510+ "The file was: %s\n"
511+ "If this happens in a network game, the host might have selected "
512+ "a file that you do not own. Normally, such a file should be sent "
513+ "from the host to you, but perhaps the transfer was not yet "
514+ "finished!?!"),
515 m_settings->settings().mapfilename.c_str());
516 if (m_settings->can_launch())
517 end_modal(1);
518
519=== modified file 'src/ui_fsmenu/options.cc'
520--- src/ui_fsmenu/options.cc 2015-05-09 09:32:07 +0000
521+++ src/ui_fsmenu/options.cc 2015-08-03 07:41:58 +0000
522@@ -206,7 +206,7 @@
523 m_label_language.get_x() + m_fx.get_w() + m_padding,
524 m_label_music.get_y() + m_label_music.get_h() + m_padding,
525 m_language_list.get_w(), m_fx.get_h(),
526- _("Enable Sound"), UI::Align_VCenter),
527+ _("Enable Sound Effects"), UI::Align_VCenter),
528
529 // Second options block 'In-game options'
530 // Title 2
531@@ -221,6 +221,8 @@
532 m_single_watchwin.get_x() + m_single_watchwin.get_w() + m_padding,
533 m_offset_second_group,
534 get_w() - 2 * m_hmargin - m_single_watchwin.get_w(), m_single_watchwin.get_h(),
535+ /** TRANSLATORS: A watchwindow is a window where you keep watching an object or a map region,*/
536+ /** TRANSLATORS: and it also lets you jump to it on the map. */
537 _("Use single watchwindow mode"), UI::Align_VCenter),
538
539 m_auto_roadbuild_mode (this, Point(m_single_watchwin.get_x(),
540
541=== modified file 'src/wui/game_options_sound_menu.cc'
542--- src/wui/game_options_sound_menu.cc 2014-09-10 08:55:04 +0000
543+++ src/wui/game_options_sound_menu.cc 2015-08-03 07:41:58 +0000
544@@ -31,17 +31,17 @@
545 ingame_music_label
546 (this,
547 hmargin() + STATEBOX_WIDTH + hspacing(), vmargin(),
548- _("Ingame Music")),
549+ _("Enable Music")),
550 ingame_sound(this, Point(hmargin(), vmargin() + STATEBOX_HEIGHT + vspacing())),
551 ingame_sound_label
552 (this,
553 hmargin() + STATEBOX_WIDTH + hspacing(),
554 vmargin() + STATEBOX_HEIGHT + vspacing(),
555- _("Sound FX")),
556+ _("Enable Sound Effects")),
557 ingame_music_volume_label
558 (this,
559 hmargin(), vmargin() + 2 * (STATEBOX_HEIGHT + vspacing()) + vbigspacing(),
560- _("Ingame Music Volume")),
561+ _("Music Volume")),
562 ingame_music_volume
563 (this,
564 hmargin(),
565@@ -55,7 +55,7 @@
566 hmargin(),
567 vmargin() + 2 * (STATEBOX_HEIGHT + vspacing()) + vbigspacing()
568 + 2 * vspacing() + slideh() + ingame_music_volume_label.get_h(),
569- _("Sound FX Volume")),
570+ _("Sound Effects Volume")),
571 ingame_sound_volume
572 (this,
573 hmargin(),
574
575=== modified file 'src/wui/game_summary.cc'
576--- src/wui/game_summary.cc 2015-05-11 19:49:47 +0000
577+++ src/wui/game_summary.cc 2015-08-03 07:41:58 +0000
578@@ -163,9 +163,11 @@
579 std::string stat_str;
580 switch (pes.result) {
581 case Widelands::PlayerEndResult::PLAYER_LOST:
582+ /** TRANSLATORS: This is shown in the game summary for the players who have lost. */
583 stat_str = _("Lost");
584 break;
585 case Widelands::PlayerEndResult::PLAYER_WON:
586+ /** TRANSLATORS: This is shown in the game summary for the players who have won. */
587 stat_str = _("Won");
588 if (!single_won) {
589 single_won = p;
590@@ -174,9 +176,11 @@
591 }
592 break;
593 case Widelands::PlayerEndResult::PLAYER_RESIGNED:
594+ /** TRANSLATORS: This is shown in the game summary for the players who have resigned. */
595 stat_str = _("Resigned");
596 break;
597 default:
598+ /** TRANSLATORS: This is shown in the game summary when we don't know if the player has lost or won. */
599 stat_str = _("Unknown");
600 }
601 te.set_string(2, stat_str);
602
603=== modified file 'src/wui/multiplayersetupgroup.cc'
604--- src/wui/multiplayersetupgroup.cc 2015-01-21 21:21:46 +0000
605+++ src/wui/multiplayersetupgroup.cc 2015-08-03 07:41:58 +0000
606@@ -358,7 +358,8 @@
607 if (settings.scenario)
608 init->set_title(_("Scenario"));
609 else if (settings.savegame)
610- init->set_title(_("Savegame"));
611+ /** Translators: This is a game type */
612+ init->set_title(_("Saved Game"));
613 else {
614 std::string tribepath("tribes/" + player_setting.tribe);
615 i18n::Textdomain td(tribepath); // for translated initialisation
616
617=== modified file 'src/wui/plot_area.cc'
618--- src/wui/plot_area.cc 2015-04-23 23:34:49 +0000
619+++ src/wui/plot_area.cc 2015-08-03 07:41:58 +0000
620@@ -103,10 +103,13 @@
621
622 std::string get_unit_name(UNIT unit) {
623 switch (unit) {
624- case UNIT_DAY: return _("d");
625- case UNIT_HOUR: return _("h");
626- case UNIT_MIN: return _("min");
627- default: return "invalid";
628+ /** TRANSLATOR: day(s). Used in statistics. */
629+ case UNIT_DAY: return _("%1% d");
630+ /** TRANSLATOR: hour(s). Used in statistics. */
631+ case UNIT_HOUR: return _("%1% h");
632+ /** TRANSLATOR: minute(s). Used in statistics. */
633+ case UNIT_MIN: return _("%1% min");
634+ default: return "%1% invalid";
635 }
636 }
637
638@@ -234,7 +237,7 @@
639 LINE_COLOR, 2);
640
641 // print the used unit
642- const Image* xtick = UI::g_fh1->render(xtick_text_style(get_unit_name(unit)));
643+ const Image* xtick = UI::g_fh1->render(xtick_text_style((boost::format(get_unit_name(unit)) % "").str()));
644 dst.blit(Point(2, spacing + 2), xtick, BlendMode::UseAlpha, UI::Align_CenterLeft);
645 }
646
647@@ -267,7 +270,7 @@
648 for (int32_t i = 0; i < m_game_time_id; i++) {
649 UNIT unit = get_suggested_unit(time_in_ms[i]);
650 uint32_t val = ms_to_unit(unit, time_in_ms[i]);
651- labels.push_back(boost::lexical_cast<std::string>(val) + get_unit_name(unit));
652+ labels.push_back((boost::format(get_unit_name(unit)) % boost::lexical_cast<std::string>(val)).str());
653 }
654 labels.push_back(_("game"));
655 return labels;
656
657=== modified file 'src/wui/soldierlist.cc'
658--- src/wui/soldierlist.cc 2014-12-06 12:22:35 +0000
659+++ src/wui/soldierlist.cc 2015-08-03 07:41:58 +0000
660@@ -400,11 +400,18 @@
661 m_soldierpanel.set_click(boost::bind(&SoldierList::eject, this, _1));
662
663 const UI::TextStyle & style = UI::TextStyle::ui_small();
664- // Note the extra character in the HP: string below to fix bug 724169
665+ // We don't want translators to translate this twice, so it's a bit involved.
666 uint32_t maxtextwidth = std::max
667 (style.calc_bare_width(_("Click soldier to send away")),
668- /** TRANSLATORS: Health, Attack, Defense, Evade */
669- style.calc_bare_width(_("HP: 8/8 AT: 8/8 DE: 8/8 EV: 8/8_")));
670+ style.calc_bare_width(
671+ (boost::format("%s ") // We need some extra space to fix bug 724169
672+ /** TRANSLATORS: Health, Attack, Defense, Evade */
673+ % (boost::format(_("HP: %1$u/%2$u AT: %3$u/%4$u DE: %5$u/%6$u EV: %7$u/%8$u"))
674+ % 8 % 8
675+ % 8 % 8
676+ % 8 % 8
677+ % 8 % 8
678+ )).str()));
679 set_min_desired_breadth(maxtextwidth + 4);
680
681 UI::Box * buttons = new UI::Box(this, 0, 0, UI::Box::Horizontal);
682
683=== modified file 'tribes/atlanteans/blackroot_farm/conf'
684--- tribes/atlanteans/blackroot_farm/conf 2015-06-10 07:00:10 +0000
685+++ tribes/atlanteans/blackroot_farm/conf 2015-08-03 07:41:58 +0000
686@@ -41,7 +41,7 @@
687
688 [out_of_resource_notification]
689 title=_Out of Fields
690-message=_The farmer working at this blackroot farm has no cleared soil to plant his seeds.
691+message=_The blackroot farmer working at this blackroot farm has no cleared soil to plant his seeds.
692 productivity_threshold=30
693
694 [idle]
695
696=== modified file 'tribes/atlanteans/dungeon/conf'
697--- tribes/atlanteans/dungeon/conf 2015-03-26 06:59:37 +0000
698+++ tribes/atlanteans/dungeon/conf 2015-08-03 07:41:58 +0000
699@@ -36,11 +36,11 @@
700 max_level=3
701
702 [programs]
703-sleep=_Sleep
704-upgrade_soldier_attack_0=_Upgrade soldier attack from level 0 to level 1
705-upgrade_soldier_attack_1=_Upgrade soldier attack from level 1 to level 2
706-upgrade_soldier_attack_2=_Upgrade soldier attack from level 2 to level 3
707-upgrade_soldier_attack_3=_Upgrade soldier attack from level 3 to level 4
708+sleep=_sleeping
709+upgrade_soldier_attack_0=_upgrading soldier attack from level 0 to level 1
710+upgrade_soldier_attack_1=_upgrading soldier attack from level 1 to level 2
711+upgrade_soldier_attack_2=_upgrading soldier attack from level 2 to level 3
712+upgrade_soldier_attack_3=_upgrading soldier attack from level 3 to level 4
713
714 [sleep]
715 sleep=5000
716
717=== modified file 'tribes/atlanteans/foresters_house/help.lua'
718--- tribes/atlanteans/foresters_house/help.lua 2015-07-26 10:59:28 +0000
719+++ tribes/atlanteans/foresters_house/help.lua 2015-08-03 07:41:58 +0000
720@@ -15,7 +15,7 @@
721 --General Section
722 building_help_general_string("atlanteans", building_description,
723 _"Plants trees in the surrounding area.",
724- _"The foresters’s house needs free space within the work area to plant the trees.") ..
725+ _"The forester’s house needs free space within the work area to plant the trees.") ..
726
727 --Dependencies
728 building_help_dependencies_production("atlanteans", building_description) ..
729
730=== modified file 'tribes/atlanteans/horsebreeder/conf'
731--- tribes/atlanteans/horsebreeder/conf 2013-07-23 20:21:03 +0000
732+++ tribes/atlanteans/horsebreeder/conf 2015-08-03 07:41:58 +0000
733@@ -1,4 +1,4 @@
734-help=_"Breeds the strong atlantean horses"
735+help=_"Breeds the strong Atlantean horses"
736
737 [buildcost]
738 carrier=1
739
740=== modified file 'tribes/barbarians/warriorsax/conf'
741--- tribes/barbarians/warriorsax/conf 2014-07-28 14:04:36 +0000
742+++ tribes/barbarians/warriorsax/conf 2015-08-03 07:41:58 +0000
743@@ -1,4 +1,4 @@
744-help=_The warrior’s axe is the most dangerous of all Barbarian weapons. Only a few warriors ever were able to handle those huge and powerful axes. It is produced in a war mill and used – together with food – in a training camp to train soldiers from attack level 4 to level 5.
745+help=_The warrior’s ax is the most dangerous of all Barbarian weapons. Only a few warriors ever were able to handle those huge and powerful axes. It is produced in a war mill and used – together with food – in a training camp to train soldiers from attack level 4 to level 5.
746
747 default_target_quantity=1
748 preciousness=1
749
750=== modified file 'tribes/empire/foresters_house/help.lua'
751--- tribes/empire/foresters_house/help.lua 2015-07-26 10:59:28 +0000
752+++ tribes/empire/foresters_house/help.lua 2015-08-03 07:41:58 +0000
753@@ -15,7 +15,7 @@
754 --General Section
755 building_help_general_string("empire", building_description,
756 _"Plants trees in the surrounding area.",
757- _"The foresters’s house needs free space within the work area to plant the trees.") ..
758+ _"The forester’s house needs free space within the work area to plant the trees.") ..
759
760 --Dependencies
761 building_help_dependencies_production("empire", building_description) ..
762
763=== modified file 'tribes/empire/vineyard/conf'
764--- tribes/empire/vineyard/conf 2015-06-10 07:00:10 +0000
765+++ tribes/empire/vineyard/conf 2015-08-03 07:41:58 +0000
766@@ -41,7 +41,7 @@
767
768 [out_of_resource_notification]
769 title=_Out of Fields
770-message=_The farmer working at this vineyard has no cleared soil to plant his seeds.
771+message=_The vine farmer working at this vineyard has no cleared soil to plant his grapevines.
772 productivity_threshold=30
773
774 [idle]
775
776=== modified file 'tribes/scripting/format_help.lua'
777--- tribes/scripting/format_help.lua 2015-07-26 11:34:47 +0000
778+++ tribes/scripting/format_help.lua 2015-08-03 07:41:58 +0000
779@@ -278,17 +278,17 @@
780
781 if(building_description.type_name == "productionsite") then
782 if(building_description.workarea_radius and building_description.workarea_radius > 0) then
783- result = result .. text_line(_"Work area:", building_description.workarea_radius)
784+ result = result .. text_line(_"Work area radius:", building_description.workarea_radius)
785 end
786
787 elseif(building_description.type_name == "warehouse") then
788 result = result .. rt(h3(_"Healing:")
789- .. p(_"Garrisoned soldiers heal %s per second":bformat(building_description.heal_per_second)))
790+ .. p(ngettext("Garrisoned soldiers heal %d health point per second", "Garrisoned soldiers heal %s health points per second", building_description.heal_per_second):bformat(building_description.heal_per_second)))
791 result = result .. text_line(_"Conquer range:", building_description.conquers)
792
793 elseif(building_description.type_name == "militarysite") then
794 result = result .. rt(h3(_"Healing:")
795- .. p(_"Garrisoned soldiers heal %s per second":bformat(building_description.heal_per_second)))
796+ .. p(ngettext("Garrisoned soldiers heal %d health point per second", "Garrisoned soldiers heal %s health points per second", building_description.heal_per_second):bformat(building_description.heal_per_second)))
797 result = result .. text_line(_"Capacity:", building_description.max_number_of_soldiers)
798 result = result .. text_line(_"Conquer range:", building_description.conquers)
799