Merge lp:~gunchleoc/widelands/i18n-20140307 into lp:widelands

Proposed by GunChleoc
Status: Merged
Merged at revision: 6866
Proposed branch: lp:~gunchleoc/widelands/i18n-20140307
Merge into: lp:widelands
Diff against target: 616 lines (+90/-70)
23 files modified
maps/MP Scenarios/Island Hopping.wmf/scripting/multiplayer_init.lua (+1/-0)
maps/MP Scenarios/Smugglers.wmf/scripting/texts.lua (+6/-6)
maps/Plateau.wmf/scripting/texts.lua (+1/-1)
scripting/win_conditions/02_collectors.lua (+8/-6)
scripting/win_conditions/04_wood_gnome.lua (+4/-4)
src/editor/ui_menus/editor_main_menu_load_map.cc (+1/-0)
src/editor/ui_menus/editor_main_menu_save_map.cc (+1/-0)
src/logic/production_program.cc (+29/-21)
src/logic/soldier.cc (+2/-4)
src/network/nethost.cc (+3/-3)
src/ui_fsmenu/editor_mapselect.cc (+1/-0)
src/ui_fsmenu/launchMPG.cc (+1/-0)
src/wui/encyclopedia_window.cc (+1/-1)
src/wui/game_main_menu_save_game.cc (+6/-2)
src/wui/playerdescrgroup.cc (+1/-1)
tribes/atlanteans/scripting/sc01_castle_village.lua (+4/-4)
tribes/barbarians/coalmine/help.lua (+3/-2)
tribes/barbarians/conf (+1/-1)
tribes/barbarians/deep_coalmine/help.lua (+3/-2)
tribes/barbarians/deeper_coalmine/help.lua (+3/-2)
tribes/barbarians/scripting/sc01_citadel_village.lua (+4/-4)
tribes/empire/scripting/sc01_castle_village.lua (+4/-4)
txts/README.lua (+2/-2)
To merge this branch: bzr merge lp:~gunchleoc/widelands/i18n-20140307
Reviewer Review Type Date Requested Status
SirVer Needs Information
Review via email: mp+210046@code.launchpad.net

Description of the change

Some more i18n fixes.

Catalogs and translations will need rebuilding.

To post a comment you must log in.
Revision history for this message
SirVer (sirver) wrote :

I have a question about the changes made to for example the wood gnome win condition.

having quotes for each line makes it really inconvenient to type those texts (in the source). I.e.

[[Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.]]

is much better than

[[Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod ]] ..
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, ]] ..
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo ]] ..
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse ]] ..
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non ]] ..
proident, sunt in culpa qui officia deserunt mollit anim id est laborum. ]] ..

Why are those changes necessary?

review: Needs Information
Revision history for this message
SirVer (sirver) wrote :

weird line breaks come from launchpad ....

Revision history for this message
GunChleoc (gunchleoc) wrote :

> I have a question about the changes made to for example the wood gnome win
> condition.
>
> having quotes for each line makes it really inconvenient to type those texts
> (in the source). I.e.
>
> [snip]
> Why are those changes necessary?

I am adding those because semantically empty line breaks are confusing for translators, thus creating extra work for them + head scratching.

Could you please have a look at game_main_menu_save_game.cc for me? I can't get it to work like I want and I can't find the problem. Look for the comment: // TODO: This should be ngettext(" %i player" etc. with boost::format, but it refuses to work, line 140 + 180. If I use boost::format on these with proper numbering, the number isn't displayed properly.

Revision history for this message
SirVer (sirver) wrote :

> I am adding those because semantically empty line breaks are confusing for translators, thus creating extra work for them + head scratching.

Can we find another way? How about introducing a 'texts' secion in each file where we do not care about the length of lines? We could do one sentence per translated unit or so. I think that makes it pretty easy to work with - it also means that diffs are more meaningful as each change is a change per sentence.

// TODO: This should be ngettext(" %i player" etc. with

not sure what the problem is here. I'll need to investigate a bit more. I put it onto my list.

I saw in some other places that you had trouble with segfaults. The reason is that only boost::format understands std::string directly. Everything else needs .c_str() like so:

std::string a = "Hello"
snprintf(..."%s", a.c_str())

as those are old apis that can only deal with plain old c strings, not with classes.

Revision history for this message
GunChleoc (gunchleoc) wrote :

> > I am adding those because semantically empty line breaks are confusing for
> translators, thus creating extra work for them + head scratching.
>
> Can we find another way? How about introducing a 'texts' secion in each file
> where we do not care about the length of lines? We could do one sentence per
> translated unit or so. I think that makes it pretty easy to work with - it
> also means that diffs are more meaningful as each change is a change per
> sentence.

OK, I will do that in the future. Most of the long texts are in scenarios as well.

I have created strings like that all over the place, maybe leave them for now and only change the code when we need to fix a string?

> // TODO: This should be ngettext(" %i player" etc. with
>
> not sure what the problem is here. I'll need to investigate a bit more. I put
> it onto my list.
>
> I saw in some other places that you had trouble with segfaults. The reason is
> that only boost::format understands std::string directly. Everything else
> needs .c_str() like so:

I copy/pasted code that is working from somewhere else, so the problem must be in turning the number into a string somehow. I tried both %u and %i, something like this:

(format(ngettext("%u player", "%u players, player_no)) % player_no).str().c_str()
Maybe it's a stupid error with the brackets or something.

Revision history for this message
SirVer (sirver) wrote :

I merged this now and fixed the issue you had with boost::format. The problem here was that player_no was defined to be a [u]int_8 which is the same as unsigned char on most systems. boost now does not understand that this is not a single character, but indeed a small integer value. I got around this by defining player_no to be a simple int (i.e. 4 byte integer). You could also cast in the future:

(format(ngettext("%u player", "%u players, player_no)) % static_cast<int>(player_no)).str().c_str()

Revision history for this message
GunChleoc (gunchleoc) wrote :

Thanks!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'maps/MP Scenarios/Island Hopping.wmf/scripting/multiplayer_init.lua'
2--- maps/MP Scenarios/Island Hopping.wmf/scripting/multiplayer_init.lua 2014-03-05 18:47:03 +0000
3+++ maps/MP Scenarios/Island Hopping.wmf/scripting/multiplayer_init.lua 2014-03-08 16:14:22 +0000
4@@ -129,6 +129,7 @@
5 elseif resource == "goldore" then
6 return ngettext("%s Gold Ore","%s Gold Ore",count):bformat(count)
7 else
8+ -- TRANSLATORS: number + resource name, e.g. '1 stone'
9 return (_"%1$i %2$s"):bformat(count, resource)
10 end
11 end
12
13=== modified file 'maps/MP Scenarios/Smugglers.wmf/scripting/texts.lua'
14--- maps/MP Scenarios/Smugglers.wmf/scripting/texts.lua 2014-03-03 20:50:30 +0000
15+++ maps/MP Scenarios/Smugglers.wmf/scripting/texts.lua 2014-03-08 16:14:22 +0000
16@@ -11,7 +11,7 @@
17 [[To establish a smuggling route, you need to build a warehouse on a sending/receiving spot ]] ..
18 [[while your team mate has to build one on the corresponding receiving/sending spot. ]] ..
19 [[A ware is then transported every 10 seconds. ]]) ..
20--- TRANSLATORS: %s = "<number> points"
21+-- TRANSLATORS: %s = '<number> points'
22 _([[For harder to defend smuggling routes, you get 2 or 3 points per ware smuggled. The first team to collect %s wins.]]
23 )) ..
24 rt("image=map:send_spot.png", p(_"A sending spot")) ..
25@@ -25,30 +25,30 @@
26 [[You can see the number of wares traded at any time in the general statistics menu. Good luck!]]
27 )))
28
29--- TRANSLATORS: the first 2 parameters are player names, the last parameter is "<number> points"
30+-- TRANSLATORS: the first 2 parameters are player names, the last parameter is '<number> points'
31 smuggling_route_established_other_team = rt(p(_(
32 [[A new smuggling route from %1$s to %2$s has been established! ]] ..
33 [[Every ware they smuggle there is worth %3$s.]]
34 )))
35--- TRANSLATORS: %s = "<number> points"
36+-- TRANSLATORS: %s = '<number> points'
37 smuggling_route_established_sender = rt(p(_(
38 [[Your team has established a new smuggling route. You have the sending warehouse. ]] ..
39 [[Every ware smuggled here is worth %s.]]
40 )))
41--- TRANSLATORS: %s = "<number> points"
42+-- TRANSLATORS: %s = '<number> points'
43 smuggling_route_established_receiver = rt(p(_(
44 [[Your team has established a new smuggling route. You have the receiving warehouse. ]] ..
45 [[Every ware smuggled here is worth %s.]]
46 )))
47
48--- TRANSLATORS: the first parameter is "<number> points", the last 2 parameters are player names
49+-- TRANSLATORS: the first parameter is '<number> points', the last 2 parameters are player names
50 smuggling_route_broken = rt(p(_
51 [[The smuggling route worth %1$s from %2$s to %3$s has been broken!]]
52 ))
53
54 game_over = rt(
55 h1("Game over!") ..
56--- TRANSLATORS: the first 4 parameters are player names, the last parameter is "<number> points"
57+-- TRANSLATORS: the first 4 parameters are player names, the last parameter is '<number> points'
58 p(_
59 [[Game over! %1$s and %2$s have won the game! %3$s and %4$s only managed to collect %5$s.]]
60 )
61
62=== modified file 'maps/Plateau.wmf/scripting/texts.lua'
63--- maps/Plateau.wmf/scripting/texts.lua 2014-02-26 16:52:26 +0000
64+++ maps/Plateau.wmf/scripting/texts.lua 2014-03-08 16:14:22 +0000
65@@ -53,7 +53,7 @@
66 "<rt><p line-spacing=3 font-size=12>" .. reflow(text)
67 objs = {...}
68 if #objs > 0 then
69- s = s .. "<br><br></p></rt>" .. rt(h2(_"New Objectives")) .. "<rt><p line-spacing=3 font-size=12>"
70+ s = s .. "<br><br></p></rt>" .. rt(h2(_"New Objective")) .. "<rt><p line-spacing=3 font-size=12>"
71 local i = 1
72 while i < #objs do
73 s = s .. reflow(objs[i].body) .. "<br>"
74
75=== modified file 'scripting/win_conditions/02_collectors.lua'
76--- scripting/win_conditions/02_collectors.lua 2014-02-24 17:19:30 +0000
77+++ scripting/win_conditions/02_collectors.lua 2014-03-08 16:14:22 +0000
78@@ -4,6 +4,7 @@
79
80 use("aux", "coroutine") -- for sleep
81 use("aux", "table")
82+use("aux", "formatting")
83 use("aux", "win_condition_functions")
84
85 set_textdomain("win_conditions")
86@@ -92,7 +93,7 @@
87 )
88
89 local points = 0
90- local descr = { (_"Status for %s"):format(plr.name) .. "<br>"}
91+ local descr = { "</p>" .. h2((_"Status for %s"):format(plr.name)) .. "<p line-spacing=3 font-size=12>"}
92 for idx, ware in ipairs(point_table[plr.tribe_name .. "_order"]) do
93 local value = point_table[plr.tribe_name][ware]
94 local count = 0
95@@ -101,12 +102,13 @@
96 end
97 local lpoints = count * value
98 points = points + lpoints
99- -- TRANSLATORS: For example: "gold (3 P) x 4 = 12 P", P meaning "Points"
100- descr[#descr+1] = (_" %1$s (%2$i P) x %3$i = %4$i P<br>"):bformat(
101+ -- TRANSLATORS: For example: 'gold (3 P) x 4 = 12 P", P meaning "Points'
102+ descr[#descr+1] = [[• ]] .. (_" %1$s (%2$i P) x %3$i = %4$i P"):bformat(
103 ware, value, count, lpoints
104- )
105+ ) .. "<br>"
106 end
107- descr[#descr+1] = (ngettext("Total: %i point", "Total: %i points", points)):format(points)
108+ descr[#descr+1] = "</p>" .. h3(ngettext("Total: %i point", "Total: %i points", points)):format(points)
109+ .. "<p line-spacing=3 font-size=12>"
110 return points, p(table.concat(descr, "\n"))
111 end
112
113@@ -117,7 +119,7 @@
114 local m = remaining_time % 60
115 local time = ""
116 if h > 0 then
117- -- TRANSLATORS: Context: "The game will end in %s."
118+ -- TRANSLATORS: Context: 'The game will end in %s.'
119 time = (_"%1$ih%2$02im"):bformat(h,m)
120 else
121 time = (ngettext("%i minute", "%i minutes", m)):format(m)
122
123=== modified file 'scripting/win_conditions/04_wood_gnome.lua'
124--- scripting/win_conditions/04_wood_gnome.lua 2014-03-03 20:50:30 +0000
125+++ scripting/win_conditions/04_wood_gnome.lua 2014-03-08 16:14:22 +0000
126@@ -12,10 +12,10 @@
127
128 local wc_name = _ "Wood Gnome"
129 local wc_version = 2
130-local wc_desc = _
131-[[As wood gnome you like big forests, so your task is to have more trees on
132-your territory than any other player. The game will end after 4 hours of
133-playing. The one with the most trees at that point will win the game.]]
134+local wc_desc = _(
135+[[As wood gnome you like big forests, so your task is to have more trees on ]] ..
136+[[your territory than any other player. The game will end after 4 hours of ]] ..
137+[[playing. The one with the most trees at that point will win the game.]])
138 local wc_trees_owned = _"Trees owned"
139 return {
140 name = wc_name,
141
142=== modified file 'src/editor/ui_menus/editor_main_menu_load_map.cc'
143--- src/editor/ui_menus/editor_main_menu_load_map.cc 2014-03-05 11:59:09 +0000
144+++ src/editor/ui_menus/editor_main_menu_load_map.cc 2014-03-08 16:14:22 +0000
145@@ -221,6 +221,7 @@
146 m_parentdir = m_curdir.substr(0, m_curdir.rfind('\\'));
147 #endif
148 std::string parent_string =
149+ /** TRANSLATORS: Parent directory */
150 (boost::format("\\<%s\\>") % _("parent")).str();
151 m_ls->add
152 (parent_string.c_str(),
153
154=== modified file 'src/editor/ui_menus/editor_main_menu_save_map.cc'
155--- src/editor/ui_menus/editor_main_menu_save_map.cc 2014-03-05 11:59:09 +0000
156+++ src/editor/ui_menus/editor_main_menu_save_map.cc 2014-03-08 16:14:22 +0000
157@@ -294,6 +294,7 @@
158 m_parentdir = m_curdir.substr(0, m_curdir.rfind('\\'));
159 #endif
160 std::string parent_string =
161+ /** TRANSLATORS: Parent directory */
162 (boost::format("\\<%s\\>") % _("parent")).str();
163 m_ls->add
164 (parent_string.c_str(),
165
166=== modified file 'src/logic/production_program.cc'
167--- src/logic/production_program.cc 2014-03-04 13:24:58 +0000
168+++ src/logic/production_program.cc 2014-03-08 16:14:22 +0000
169@@ -151,7 +151,7 @@
170 std::string ProductionProgram::ActReturn::Negation::description
171 (const Tribe_Descr & tribe) const
172 {
173- /** TRANSLATORS: %s = e.g. "economy needs ..." Context: "and/or not %s" */
174+ /** TRANSLATORS: %s = e.g. 'economy needs ...' Context: 'and/or not %s' */
175 return (boost::format(_("not %s")) % operand->description(tribe)).str();
176 }
177
178@@ -174,7 +174,7 @@
179 std::string ProductionProgram::ActReturn::Economy_Needs_Ware::description
180 (const Tribe_Descr & tribe) const
181 {
182- /** TRANSLATORS: e.g. "economy needs water" Context: "and/or (not) economy needs %s" */
183+ /** TRANSLATORS: e.g. 'economy needs water' Context: 'and/or (not) economy needs %s' */
184 return (boost::format(_("economy needs %s")) % tribe.get_ware_descr(ware_type)->descname()).str();
185 }
186
187@@ -196,7 +196,7 @@
188 std::string ProductionProgram::ActReturn::Economy_Needs_Worker::description
189 (const Tribe_Descr & tribe) const
190 {
191- /** TRANSLATORS: e.g. "economy needs worker" Context: "and/or (not) economy needs %s" */
192+ /** TRANSLATORS: e.g. 'economy needs worker' Context: 'and/or (not) economy needs %s' */
193 return (boost::format(_("economy needs %s")) % tribe.get_ware_descr(worker_type)->descname()).str();
194 }
195
196@@ -229,10 +229,10 @@
197 std::string condition = "";
198 container_iterate_const(std::set<Ware_Index>, group.first, i) {
199 condition =
200- /** TRANSLATORS: Adds a ware to list of wares in "Failed/Skipped ..." messages. */
201+ /** TRANSLATORS: Adds a ware to list of wares in 'Failed/Skipped ...' messages. */
202 (boost::format(_("%1$s %2$s")) % condition % tribe.get_ware_descr(*i.current)->descname())
203 .str();
204- /** TRANSLATORS: Separator for list of wares in "Failed/Skipped ..." messages. */
205+ /** TRANSLATORS: Separator for list of wares in 'Failed/Skipped ...' messages. */
206 condition = (boost::format(_("%s,")) % condition).str();
207 }
208 if (1 < group.second) {
209@@ -257,6 +257,7 @@
210 std::string ProductionProgram::ActReturn::Workers_Need_Experience::description
211 (const Tribe_Descr &) const
212 {
213+ /** TRANSLATORS: 'Failed/Skipped ... because: workers need experience'. */
214 return _("workers need experience");
215 }
216
217@@ -423,16 +424,16 @@
218 (Game & game, ProductionSite & ps) const
219 {
220 std::string statistics_string =
221- /** TRANSLATORS: "Failed %s because (not): %s {and/or %s}" */
222+ /** TRANSLATORS: 'Failed %s because (not): %s {and/or %s}' */
223 m_result == Failed ? (boost::format(_("Failed %s")) % ps.top_state().program->descname()).str() :
224- /** TRANSLATORS: "Completed %s because (not): %s {and/or %s}" */
225+ /** TRANSLATORS: 'Completed %s because (not): %s {and/or %s}' */
226 m_result == Completed ? (boost::format(_("Completed %s")) % ps.top_state().program->descname()).str() :
227- /** TRANSLATORS: "Skipped %s because (not): %s {and/or %s}" */
228+ /** TRANSLATORS: 'Skipped %s because (not): %s {and/or %s}' */
229 (boost::format(_("Skipped %s")) % ps.top_state().program->descname()).str();
230
231 if (!m_conditions.empty()) {
232 std::string result_string = statistics_string;
233- if (m_is_when) { // "when a and b and ..." (all conditions must be true)
234+ if (m_is_when) { // 'when a and b and ...' (all conditions must be true)
235 std::string condition_string = "";
236 for (wl_const_range<Conditions> i(m_conditions); i;)
237 {
238@@ -443,11 +444,11 @@
239 if (i.advance().empty())
240 break;
241 // TODO Would prefer "%1$s and %2$s" but getting segfaults, so leaving this for now
242- /** TRANSLATORS: "Failed/Completed/Skipped %s because: %s {and %s}" */
243+ /** TRANSLATORS: 'Failed/Completed/Skipped %s because: %s {and %s}' */
244 condition_string = (boost::format(_("%s and ")) % condition_string).str();
245 }
246 result_string =
247- /** TRANSLATORS: "Failed/Completed/Skipped %s because: %s {and %s}" */
248+ /** TRANSLATORS: 'Failed/Completed/Skipped %s because: %s {and %s}' */
249 (boost::format(_("%1$s because: %2$s")) % statistics_string % condition_string).str();
250 } else { // "unless a or b or ..." (all conditions must be false)
251 std::string condition_string = "";
252@@ -459,12 +460,12 @@
253 condition_string += i.front()->description(ps.owner().tribe());
254 if (i.advance().empty())
255 break;
256- // TODO Would prefer "%1$s or %2$s" but getting segfaults, so leaving this for now
257- /** TRANSLATORS: "Failed/Completed/Skipped %s because not: %s {or %s}" */
258+ // TODO Would prefer '%1$s or %2$s' but getting segfaults, so leaving this for now
259+ /** TRANSLATORS: 'Failed/Completed/Skipped %s because not: %s {or %s}' */
260 condition_string = (boost::format(_("%s or ")) % condition_string).str();
261 }
262 result_string =
263- /** TRANSLATORS: "Failed/Completed/Skipped %s because not: %s {or %s}" */
264+ /** TRANSLATORS: 'Failed/Completed/Skipped %s because not: %s {or %s}' */
265 (boost::format(_("%1$s because not: %2$s")) % statistics_string % condition_string).str();
266 }
267 snprintf
268@@ -828,7 +829,7 @@
269 if (uint8_t const nr_missing_groups = l_groups.size()) {
270 const Tribe_Descr & tribe = ps.owner().tribe();
271 std::string result_string =
272- /** TRANSLATORS: e.g. "Failed work because: water, wheat (2) are missing" */
273+ /** TRANSLATORS: e.g. 'Failed work because: water, wheat (2) are missing' */
274 (boost::format(_("Failed %s because:")) % ps.top_state().program->descname()).str();
275
276 for (wl_const_range<Groups> i(l_groups); i;)
277@@ -837,13 +838,13 @@
278 for (wl_const_range<std::set<Ware_Index> > j(i.current->first); j;)
279 {
280 result_string =
281- /** TRANSLATORS: Adds a ware to list of wares in "Failed/Skipped ..." messages. */
282+ /** TRANSLATORS: Adds a ware to list of wares in 'Failed/Skipped ...' messages. */
283 (boost::format(_("%1$s %2$s")) % result_string
284 % tribe.get_ware_descr(j.front())->descname())
285 .str();
286 if (j.advance().empty())
287 break;
288- /** TRANSLATORS: Separator for list of wares in "Failed/Skipped ..." messages. */
289+ /** TRANSLATORS: Separator for list of wares in 'Failed/Skipped ...' messages. */
290 result_string = (boost::format(_("%s,")) % result_string).str();
291 }
292 {
293@@ -851,7 +852,7 @@
294 if (1 < count) {
295 // TODO this should be done with ngettext
296 result_string =
297- /** TRANSLATORS: e.g. "Failed work because: water, wheat (2) are missing" */
298+ /** TRANSLATORS: e.g. 'Failed work because: water, wheat (2) are missing' */
299 (boost::format(_("%1$s (%2$i)")) % result_string
300 % static_cast<unsigned int>(count))
301 .str();
302@@ -862,8 +863,9 @@
303 result_string = (boost::format(_("%s and")) % result_string).str();
304 }
305 result_string =
306- /** TRANSLATORS: e.g. "Failed work because: water, wheat (2) are missing" */
307+ /** TRANSLATORS: e.g. %1$s = 'Failed work because: water, wheat (2)' %2$s = 'are missing' */
308 (boost::format(_("%1$s %2$s")) % result_string
309+ /** TRANSLATORS: e.g. 'Failed work because: water, wheat (2) are missing' */
310 % ngettext(" is missing", " are missing", nr_missing_groups))
311 .str();
312
313@@ -958,6 +960,7 @@
314 uint8_t const count = i.current->second;
315 if (1 < count) {
316 char buffer[5];
317+ /** TRANSLATORS: Number used in list of wares */
318 sprintf(buffer, _("%u "), count);
319 result_string += buffer;
320 }
321@@ -965,9 +968,11 @@
322 result_string += tribe.get_ware_descr(i.current->first)->descname();
323 if (i.advance().empty())
324 break;
325+ /** TRANSLATORS: Separator for list of wares */
326 result_string += _(", ");
327 }
328 // Keep translateability in mind!
329+ /** TRANSLATORS: %s is a list of wares */
330 result_string = str(format(_("Produced %s")) % result_string);
331 snprintf
332 (ps.m_result_buffer, sizeof(ps.m_result_buffer),
333@@ -1054,6 +1059,7 @@
334 uint8_t const count = i.current->second;
335 if (1 < count) {
336 char buffer[5];
337+ /** TRANSLATORS: Number used in list of workers */
338 sprintf(buffer, _("%u "), count);
339 unit_string += buffer;
340 }
341@@ -1061,9 +1067,11 @@
342 unit_string += tribe.get_worker_descr(i.current->first)->descname();
343 if (i.advance().empty())
344 break;
345+ /** TRANSLATORS: Separator for list of workers */
346 unit_string += _(", ");
347 }
348- std::string result_string = (boost::format(_("Recruited %s?")) % unit_string).str();
349+ /** TRANSLATORS: %s is a lost of workers */
350+ std::string result_string = (boost::format(_("Recruited %s")) % unit_string).str();
351 snprintf
352 (ps.m_result_buffer, sizeof(ps.m_result_buffer),
353 "%s", result_string.c_str());
354@@ -1119,7 +1127,7 @@
355 "percentage", parameters);
356 }
357 std::string description =
358- /** TRANSLATORS: %1$s = name, %2$s = production program, %3$s = resource*/
359+ /** TRANSLATORS: %1$s = production site name, %2$s = production program name, %3$s = resource */
360 (boost::format(_("%1$s %2$s mine %3$s")) % descr.descname() % production_program_name
361 % world.get_resource(m_resource)->descname())
362 .str();
363
364=== modified file 'src/logic/soldier.cc'
365--- src/logic/soldier.cc 2014-03-05 11:59:09 +0000
366+++ src/logic/soldier.cc 2014-03-08 16:14:22 +0000
367@@ -1557,14 +1557,12 @@
368 descname().c_str(), serial(), owner().player_number(),
369 get_position().x, get_position().y,
370 immovable_position ?
371- /** TRANSLATORS this is followed by "immovable" in the source string */
372- immovable_position->descr().descname().c_str() : _("no"),
373+ immovable_position->descr().descname().c_str() : ("no"),
374 opponent.descname().c_str(), opponent.serial(),
375 opponent.owner().player_number(),
376 dest.x, dest.y,
377 immovable_dest ?
378- /** TRANSLATORS this is followed by "immovable" in the source string */
379- immovable_dest->descr().descname().c_str() : _("no"),
380+ immovable_dest->descr().descname().c_str() : ("no"),
381 descname().c_str());
382 owner().add_message
383 (game,
384
385=== modified file 'src/network/nethost.cc'
386--- src/network/nethost.cc 2014-03-06 12:52:12 +0000
387+++ src/network/nethost.cc 2014-03-08 16:14:22 +0000
388@@ -212,7 +212,7 @@
389 h->setPlayerState(number, newstate, true);
390 }
391
392- virtual void setPlayerTribe
393+ virtual void setPlayerTribe
394 (uint8_t const number, const std::string & tribe, bool const random_tribe) override
395 {
396 if (number >= h->settings().players.size())
397@@ -444,8 +444,8 @@
398 c.msg = (format(_("The client %s could not be found.")) % arg1).str();
399 else {
400 kickClient = num;
401- c.msg = (format(_("Are you sure you want to kick %s?<br>")) % arg1).str();
402- c.msg += (format(_("The stated reason was: %s<br>")) % kickReason).str();
403+ c.msg = (format(_("Are you sure you want to kick %s?")) % arg1).str() + "<br>";
404+ c.msg += (format(_("The stated reason was: %s")) % kickReason).str() + "<br>";
405 c.msg += (format(_("If yes, type: /ack_kick %s")) % arg1).str();
406 }
407 }
408
409=== modified file 'src/ui_fsmenu/editor_mapselect.cc'
410--- src/ui_fsmenu/editor_mapselect.cc 2014-02-22 18:04:02 +0000
411+++ src/ui_fsmenu/editor_mapselect.cc 2014-03-08 16:14:22 +0000
412@@ -227,6 +227,7 @@
413 m_parentdir = m_curdir.substr(0, m_curdir.rfind('\\'));
414 #endif
415 std::string parent_string =
416+ /** TRANSLATORS: Parent directory */
417 (boost::format("\\<%s\\>") % _("parent")).str();
418 m_list.add
419 (parent_string.c_str(),
420
421=== modified file 'src/ui_fsmenu/launchMPG.cc'
422--- src/ui_fsmenu/launchMPG.cc 2014-03-05 11:59:09 +0000
423+++ src/ui_fsmenu/launchMPG.cc 2014-03-08 16:14:22 +0000
424@@ -49,6 +49,7 @@
425 (UI::Panel * parent, GameController * gc, uint32_t w, uint32_t h,
426 UI::Font * font)
427 :
428+ /** TRANSLATORS: Dialog box title for selecting between map or saved game for new multiplayer game */
429 Window(parent, "selection_window", 0, 0, w, h, _("Please select")),
430 m_ctrl(gc)
431 {
432
433=== modified file 'src/wui/encyclopedia_window.cc'
434--- src/wui/encyclopedia_window.cc 2014-03-05 11:59:09 +0000
435+++ src/wui/encyclopedia_window.cc 2014-03-08 16:14:22 +0000
436@@ -191,7 +191,7 @@
437 tribe.get_ware_descr(*k)->descname();
438 if (k.advance().empty())
439 break;
440- /** TRANSLATORS: List or wares, e.g. "Fish or Meat" */
441+ /** TRANSLATORS: List of wares, e.g. "Fish or Meat" */
442 ware_type_names += _(" or ");
443 }
444
445
446=== modified file 'src/wui/game_main_menu_save_game.cc'
447--- src/wui/game_main_menu_save_game.cc 2014-03-05 11:59:09 +0000
448+++ src/wui/game_main_menu_save_game.cc 2014-03-08 16:14:22 +0000
449@@ -137,7 +137,9 @@
450
451 char buf[200];
452 uint8_t player_nr = parent.game().player_manager()->get_number_of_players();
453- sprintf(buf, "%i %s", player_nr, ngettext(_("player"), _("players"), player_nr));
454+ // TODO: This should be ngettext(" %i player" etc. with boost::format, but it refuses to work
455+ /** TRANSLATORS: This is preceded by a number */
456+ sprintf(buf, "%i %s", player_nr, ngettext("player", "players", player_nr));
457 m_players_label.set_text(buf);
458 m_win_condition.set_text(parent.game().get_win_condition_displayname());
459 }
460@@ -175,7 +177,9 @@
461 char buf[200];
462 sprintf
463 (buf, "%i %s", gpdp.get_number_of_players(),
464- ngettext(_("player"), _("players"), gpdp.get_number_of_players()));
465+ // TODO: This should be ngettext(" %i player" etc. with boost::format, but it refuses to work
466+ /** TRANSLATORS: This is preceded by a number */
467+ ngettext("player", "players", gpdp.get_number_of_players()));
468 m_players_label.set_text(buf);
469 } else {
470 // Keep label empty
471
472=== modified file 'src/wui/playerdescrgroup.cc'
473--- src/wui/playerdescrgroup.cc 2014-03-05 11:59:09 +0000
474+++ src/wui/playerdescrgroup.cc 2014-03-08 16:14:22 +0000
475@@ -174,7 +174,7 @@
476 if (player.random_ai) {
477 title += _("AI: Random");
478 } else {
479- /** TRANSLATORS %s = AI type, e.g. "Agressive" */
480+ /** TRANSLATORS %s = AI type, e.g. 'Agressive' */
481 title += (boost::format(_("AI: %s")) % _(player.ai)).str();
482 }
483 }
484
485=== modified file 'tribes/atlanteans/scripting/sc01_castle_village.lua'
486--- tribes/atlanteans/scripting/sc01_castle_village.lua 2014-02-25 14:45:19 +0000
487+++ tribes/atlanteans/scripting/sc01_castle_village.lua 2014-03-08 16:14:22 +0000
488@@ -98,10 +98,10 @@
489 wares = { trunk = 1 }
490 })
491 end) then
492- plr:send_message(_"Not enough space", _
493-[[Some of your starting buildings didn’t have enough room and
494-weren’t built. You are at a disadvantage with this; consider restarting
495-this map with a fair starting condition.]], {popup=true}
496+ plr:send_message(_"Not enough space", _(
497+[[Some of your starting buildings didn’t have enough room and ]] ..
498+[[weren’t built. You are at a disadvantage with this; consider restarting ]] ..
499+[[this map with a fair starting condition.]]), {popup=true}
500 )
501 end
502
503
504=== modified file 'tribes/barbarians/coalmine/help.lua'
505--- tribes/barbarians/coalmine/help.lua 2014-03-05 18:47:03 +0000
506+++ tribes/barbarians/coalmine/help.lua 2014-03-08 16:14:22 +0000
507@@ -9,8 +9,9 @@
508 --Lore Section
509 rt(h2(_"Lore")) ..
510 rt("image=tribes/barbarians/coalmine/coalmine_i_00.png", p(
511- _[[Ages ago, the Barbarians learned to delve into mountainsides for that black material that feeds their furnaces. <br>
512- Wood may serve for a household fire and to keep you warm, but when it comes to working with iron or gold, there is no way around coal.]]
513+ _([[Ages ago, the Barbarians learned to delve into mountainsides for that black material that feeds their furnaces.<br>
514+]] ..
515+ [[Wood may serve for a household fire and to keep you warm, but when it comes to working with iron or gold, there is no way around coal.]])
516 )) ..
517 --General Section
518 rt(h2(_"General")) ..
519
520=== modified file 'tribes/barbarians/conf'
521--- tribes/barbarians/conf 2014-03-05 18:47:03 +0000
522+++ tribes/barbarians/conf 2014-03-08 16:14:22 +0000
523@@ -105,7 +105,7 @@
524 strongbeer=_Strong Beer
525 thatchreed=_Thatch Reed
526 trunk=_Log
527-warhelmet=_War Helm
528+warhelmet=_Warhelm
529 warriorsaxe=_Warrior’s Ax
530 water=_Water
531 wheat=_Wheat
532
533=== modified file 'tribes/barbarians/deep_coalmine/help.lua'
534--- tribes/barbarians/deep_coalmine/help.lua 2014-03-05 18:47:03 +0000
535+++ tribes/barbarians/deep_coalmine/help.lua 2014-03-08 16:14:22 +0000
536@@ -9,8 +9,9 @@
537 --Lore Section
538 rt(h2(_"Lore")) ..
539 rt("image=tribes/barbarians/deep_coalmine/deep_coalmine_i_00.png", p(--text identical to coalmine
540- _[[Ages ago, the Barbarians learned to delve into mountainsides for that black material that feeds their furnaces. <br>
541- Wood may serve for a household fire and to keep you warm, but when it comes to working with iron or gold, there is no way around coal.]]
542+ _([[Ages ago, the Barbarians learned to delve into mountainsides for that black material that feeds their furnaces.<br>
543+]] ..
544+ [[Wood may serve for a household fire and to keep you warm, but when it comes to working with iron or gold, there is no way around coal.]])
545 )) ..
546 --General Section
547 rt(h2(_"General")) ..
548
549=== modified file 'tribes/barbarians/deeper_coalmine/help.lua'
550--- tribes/barbarians/deeper_coalmine/help.lua 2014-03-05 18:47:03 +0000
551+++ tribes/barbarians/deeper_coalmine/help.lua 2014-03-08 16:14:22 +0000
552@@ -9,8 +9,9 @@
553 --Lore Section
554 rt(h2(_"Lore")) ..
555 rt("image=tribes/barbarians/deeper_coalmine/deeper_coalmine_i_00.png", p(--text identical to coalmine
556- _[[Ages ago, the Barbarians learned to delve into mountainsides for that black material that feeds their furnaces. <br>
557- Wood may serve for a household fire and to keep you warm, but when it comes to working with iron or gold, there is no way around coal.]]
558+ _([[Ages ago, the Barbarians learned to delve into mountainsides for that black material that feeds their furnaces.<br>
559+]] ..
560+ [[Wood may serve for a household fire and to keep you warm, but when it comes to working with iron or gold, there is no way around coal.]])
561 )) ..
562 --General Section
563 rt(h2(_"General")) ..
564
565=== modified file 'tribes/barbarians/scripting/sc01_citadel_village.lua'
566--- tribes/barbarians/scripting/sc01_citadel_village.lua 2014-02-25 14:45:19 +0000
567+++ tribes/barbarians/scripting/sc01_citadel_village.lua 2014-03-08 16:14:22 +0000
568@@ -91,10 +91,10 @@
569 wares = { raw_stone = 6, coal = 3 },
570 })
571 end) then
572- plr:send_message(_"Not enough space", _
573-[[Some of your starting buildings didn’t have enough room and
574-weren’t built. You are at a disadvantage with this; consider restarting
575-this map with a fair starting condition.]], {popup=true}
576+ plr:send_message(_"Not enough space", _(
577+[[Some of your starting buildings didn’t have enough room and ]] ..
578+[[weren’t built. You are at a disadvantage with this; consider restarting ]] ..
579+[[this map with a fair starting condition.]]), {popup=true}
580 )
581 end
582 end,
583
584=== modified file 'tribes/empire/scripting/sc01_castle_village.lua'
585--- tribes/empire/scripting/sc01_castle_village.lua 2014-02-25 14:45:19 +0000
586+++ tribes/empire/scripting/sc01_castle_village.lua 2014-03-08 16:14:22 +0000
587@@ -116,10 +116,10 @@
588
589 place_building_in_region(plr, "stonemasons_house", sf:region(11))
590 end) then
591- plr:send_message(_"Not enough space", _
592-[[Some of your starting buildings didn’t have enough room and
593-weren’t built. You are at a disadvantage with this; consider restarting
594-this map with a fair starting condition.]], {popup=true}
595+ plr:send_message(_"Not enough space", _(
596+[[Some of your starting buildings didn’t have enough room and ]] ..
597+[[weren’t built. You are at a disadvantage with this; consider restarting ]] ..
598+[[this map with a fair starting condition.]]), {popup=true}
599 )
600 end
601 end
602
603=== modified file 'txts/README.lua'
604--- txts/README.lua 2014-03-03 20:50:30 +0000
605+++ txts/README.lua 2014-03-08 16:14:22 +0000
606@@ -58,8 +58,8 @@
607 ) .. h2(_
608 [[Keyboard shortcuts (in-game)]]
609 ) .. p(
610-_"PAGEUP: increases games peed" .. "<br>"
611-.. _"PAGEDOWN: decreases games peed" .. "<br>"
612+_"PAGEUP: increases game speed" .. "<br>"
613+.. _"PAGEDOWN: decreases game speed" .. "<br>"
614 .. _"PAUSE: pauses the game" .. "<br>"
615 .. _"SPACE: toggles if building spaces are shown" .. "<br>"
616 .. _"M: toggles minimap" .. "<br>"

Subscribers

People subscribed via source and target branches

to status/vote changes: