Merge lp:~widelands-dev/widelands/localization-post-build20 into lp:widelands

Proposed by GunChleoc
Status: Merged
Merged at revision: 9111
Proposed branch: lp:~widelands-dev/widelands/localization-post-build20
Merge into: lp:widelands
Diff against target: 1422 lines (+322/-251)
35 files modified
data/campaigns/fri01.wmf/scripting/texts.lua (+7/-7)
data/campaigns/fri02.wmf/scripting/texts.lua (+3/-3)
data/scripting/editor/terrain_help.lua (+8/-3)
data/scripting/format_scenario.lua (+0/-41)
data/scripting/richtext_scenarios.lua (+5/-1)
data/tribes/buildings/productionsites/frisians/mead_brewery/helptexts.lua (+1/-1)
data/tribes/immovables/resi/atlanteans/init.lua (+20/-20)
data/tribes/immovables/resi/barbarians/init.lua (+20/-20)
data/tribes/immovables/resi/empire/init.lua (+20/-20)
data/tribes/immovables/resi/frisians/init.lua (+20/-20)
data/tribes/scripting/help/building_help.lua (+8/-2)
data/tribes/scripting/help/ware_help.lua (+15/-6)
data/tribes/scripting/help/worker_help.lua (+24/-15)
data/tribes/wares/bread_frisians/helptexts.lua (+1/-1)
data/tribes/wares/brick/helptexts.lua (+1/-1)
data/tribes/wares/coal/helptexts.lua (+1/-1)
data/tribes/wares/felling_ax/helptexts.lua (+7/-7)
data/tribes/wares/fire_tongs/helptexts.lua (+9/-9)
data/tribes/wares/fruit/helptexts.lua (+1/-1)
data/tribes/wares/gold/helptexts.lua (+9/-9)
data/tribes/wares/gold_ore/helptexts.lua (+9/-1)
data/tribes/wares/iron/helptexts.lua (+9/-9)
data/tribes/wares/iron_ore/helptexts.lua (+10/-1)
data/tribes/wares/mead/helptexts.lua (+1/-1)
src/graphic/CMakeLists.txt (+2/-0)
src/graphic/gl/initialize.cc (+42/-21)
src/logic/map_objects/tribes/productionsite.cc (+5/-1)
src/logic/map_objects/tribes/worker.cc (+1/-1)
src/ui_fsmenu/scenariodetails.cc (+6/-1)
src/wui/interactive_base.cc (+0/-16)
src/wui/interactive_gamebase.cc (+35/-0)
src/wui/interactive_gamebase.h (+2/-0)
src/wui/mapdetails.cc (+11/-7)
src/wui/productionsitewindow.cc (+8/-3)
src/wui/suggested_teams_box.cc (+1/-1)
To merge this branch: bzr merge lp:~widelands-dev/widelands/localization-post-build20
Reviewer Review Type Date Requested Status
hessenfarmer test and review Approve
Review via email: mp+367305@code.launchpad.net

Commit message

Backlog of localization updates
- Add localized versions to the basic SDL error messages. We will show
  the unlocalized version along with it due to lack of font support for
  some languages.
- String improvements for fri01 and fri02
- Improved headings for worker help

To post a comment you must log in.
Revision history for this message
hessenfarmer (stephan-lutz) wrote :

I think we should link the open bugs for these changes to the branch. There are other open bugs regarding the e.g the frisians which could be fixed as well. I will link all relevant bugs. If they should be fixed seperatly feel free to remove them again.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 4937. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/531119384.
Appveyor build 4718. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_localization_post_build20-4718.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Thanks for collecting them - let's fix them all in this branch.

Revision history for this message
hessenfarmer (stephan-lutz) wrote :

Just saw that there are 2 issues on transifex for the first frisian scenario which would fit in here as well.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Done. I have also changed the descnames for the resource indicators.

Resource indicators, fields, rocks and trees now have tooltips. Do we want them for all of these?

Revision history for this message
hessenfarmer (stephan-lutz) wrote :

Code looks good so far. one nit in a diff. will download compile and test now.

Revision history for this message
hessenfarmer (stephan-lutz) wrote :

Sorry found another bug which fits in here. Can be solved in seperate branch though.

Revision history for this message
hessenfarmer (stephan-lutz) wrote :

have tested this - at least for the encyclopedia part. Texts look good.
Although while watching at them I noticed that some words seem to be out of line (menaing they seem to be slighly above or below the other words. that looks weird but is unrelated to this branch as it is the same in b20.

so from my side this can go in

review: Approve (test and review)
Revision history for this message
GunChleoc (gunchleoc) wrote :

Yes, that's https://bugs.launchpad.net/widelands/+bug/1827544

Thanks for the review :)

@bunnybot merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/campaigns/fri01.wmf/scripting/texts.lua'
2--- data/campaigns/fri01.wmf/scripting/texts.lua 2018-09-29 08:43:57 +0000
3+++ data/campaigns/fri01.wmf/scripting/texts.lua 2019-05-13 05:46:56 +0000
4@@ -129,8 +129,8 @@
5 -- TRANSLATORS: Reebaud – Introduction 1
6 _([[Welcome to the beautiful isle of Langeness! I am Reebaud, the chieftain of this pristine island.]])
7 .. paragraphdivider() ..
8- -- TRANSLATORS: Reebaud – Introduction 1
9- _([[My tribe and I have just arrived from the mainland. There were fights with the Danes in the North, the Vikings in the East… So, I decided to lead my tribe away to start a quiet, peaceful life on this untouched island.]])),
10+ -- TRANSLATORS: Reebaud – Introduction 1. Schauenburg and Holstein are dukedoms
11+ _([[My tribe and I have just arrived from the mainland. There were fights with the Danes in the North, the Schauenburgers and Holsteiners in the East and South… So I decided to lead my tribe away to start a quiet, peaceful life on this untouched island.]])),
12 }
13 intro_2 = {
14 title =_ "Introduction",
15@@ -139,13 +139,13 @@
16 _([[This is as good a place as any to start building our new home. First of all, we must ensure a stable supply of basic building materials.]])
17 .. paragraphdivider() ..
18 -- TRANSLATORS: Reebaud – Introduction 2
19- _([[I have asked Hauke, one of my advisors to oversee the construction of our settlement.]])),
20+ _([[I have asked Hauke, one of my advisors, to oversee the construction of our settlement.]])),
21 }
22 intro_3 = {
23 title =_ "Introduction",
24 body=hauke(_"The first buildings",
25- -- TRANSLATORS: Hauke – Introduction 3
26- _([[Greetings, Chieftain Reebaud! I will start with the colonization of the island straight away.]])
27+ -- TRANSLATORS: Hauke – Introduction 3. "Peace" is the traditional frisian greeting
28+ _([[Peace, Chieftain Reebaud! I will start with the colonization of the island straight away.]])
29 .. paragraphdivider() ..
30 -- TRANSLATORS: Hauke – Introduction 3
31 _([[Like all Frisians, we build our houses mainly with bricks. We improve them by adding some logs and granite. The roofs are thatched with reed, naturally. Nothing is better suited to keep the rain out.]])
32@@ -231,7 +231,7 @@
33 _([[Well done. The miners are satisfied and have started working again.]])
34 .. paragraphdivider() ..
35 -- TRANSLATORS: Hauke – better food
36- _([[But when the mines will have to be expanded, rations won’t keep the miners happy. Better take precautions – build a second tavern, then consider enhancing one to a drinking hall.]])
37+ _([[But when the mines will have to be enhanced, rations won’t keep the miners happy. Better take precautions – build a second tavern, then consider enhancing one to a drinking hall.]])
38 .. paragraphdivider() ..
39 -- TRANSLATORS: Hauke – better food
40 _([[A drinking hall needs better food. Build a bakery, a brewery, and two or three farms to start growing barley. Keep in mind that barley grows very slowly; therefore, these few farms won’t suffice when we actually need the bread and beer. We should keep expanding quickly to have more space for farming.]])
41@@ -409,7 +409,7 @@
42 title =_ "Don’t Forget the Soldiers",
43 body=reebaud(_"Soldiers to the port!",
44 -- TRANSLATORS: Reebaud – rising water
45- _([[I almost forgot in this haste – whereever we will land, we’ll need soldiers to secure and expand our new colony. There’s space for up to 10 soldiers on our ship, if they don’t mind being all crammed up together. Let’s send some to the port when it’s completed, so they can embark when we set sail!]])),
46+ _([[I almost forgot in this haste – whereever we will land, we’ll need soldiers to secure and expand our new colony. There’s space for up to ten soldiers on our ship, if they don’t mind being all crammed together. Let’s send some to the port when it’s completed, so they can embark when we set sail!]])),
47 }
48
49 victory_1 = {
50
51=== modified file 'data/campaigns/fri02.wmf/scripting/texts.lua'
52--- data/campaigns/fri02.wmf/scripting/texts.lua 2018-09-29 08:43:57 +0000
53+++ data/campaigns/fri02.wmf/scripting/texts.lua 2019-05-13 05:46:56 +0000
54@@ -243,7 +243,7 @@
55 title =_ "Recruiting",
56 body=reebaud(_"Our economy is complete",
57 -- TRANSLATORS: Reebaud – Aqua Farms 4
58- _([[You are right – we should build more berry farms, collector’s houses and taverns as well as a drinking hall, and advanced bakeries and breweries.]])
59+ _([[You are right – we should build more berry farms, fruit collector’s houses and taverns as well as a drinking hall, and advanced bakeries and breweries.]])
60 .. paragraphdivider() ..
61 -- TRANSLATORS: Reebaud – Aqua Farms 4
62 _([[However, we can already start focusing on recruiting and training soldiers. We can now afford to use metal for weapons, helmets and garments. I propose building armor smithies, a barracks, a training arena and a tailor’s shop now.]])),
63@@ -274,8 +274,8 @@
64 supply_murilius_4 = {
65 title =_ "We Are Not Alone",
66 body=reebaud(_"Strangers",
67- -- TRANSLATORS: Reebaud – Supply Murilius 4
68- _([[Greetings, representative of the Empire! I am Reebaud, the chieftain of this tribe. All we want is to settle down here, build our home and live our lives in peace. We do not seek trouble, but we aren’t afraid to fight, either.]])),
69+ -- TRANSLATORS: Reebaud – Supply Murilius 4. "Peace" is the traditional frisian greeting, nothing more.
70+ _([[Peace, representative of the Empire! I am Reebaud, the chieftain of this tribe. All we want is to settle down here, build our home and live our lives in peace. We do not seek trouble, but we aren’t afraid to fight, either.]])),
71 }
72 supply_murilius_5 = {
73 title =_ "We Are Not Alone",
74
75=== modified file 'data/scripting/editor/terrain_help.lua'
76--- data/scripting/editor/terrain_help.lua 2018-09-11 10:31:02 +0000
77+++ data/scripting/editor/terrain_help.lua 2019-05-13 05:46:56 +0000
78@@ -20,9 +20,14 @@
79 if (#valid_resources > 0) then
80 result = result .. h2(_"Resources")
81 if (#valid_resources > 0) then
82- -- TRANSLATORS: A header in the editor help
83- result = result .. h3(ngettext(
84- "Valid Resource:", "Valid Resources:", #valid_resources))
85+ if (#valid_resources == 1) then
86+ -- TRANSLATORS: A header in the editor help if there is 1 valid resource
87+ result = result .. h3(_"Valid Resource:")
88+ else
89+ -- TRANSLATORS: A header in the editor help if there is more than 1 valid resource
90+ result = result .. h3(_"Valid Resources:")
91+ end
92+
93 for count, resource in pairs(valid_resources) do
94 result = result .. li_image(
95 resource.representative_image, resource.descname)
96
97=== removed file 'data/scripting/format_scenario.lua'
98--- data/scripting/format_scenario.lua 2018-02-12 10:09:42 +0000
99+++ data/scripting/format_scenario.lua 1970-01-01 00:00:00 +0000
100@@ -1,41 +0,0 @@
101--- TODO(GunChleoc): This is for the legacy font renderer. Remove when we remove the old renderer and break savegame compatibility.
102-
103-
104-function speech(img, clr, g_title, g_text)
105- local title, text = g_title, g_text
106- if not text then
107- title = nil
108- text = g_title
109- end
110-
111- -- Surround the text with translatable ","
112- text = (_'“%s”'):format(text)
113-
114- local s = ""
115- if title then
116- s = rt("<p font-size=20 font-weight=bold font-face=serif " ..
117- ("font-color=%s>"):format(clr) .. title ..
118- "</p><p font-size=8> <br></p>"
119- )
120- end
121-
122- return s .. rt(("image=%s"):format(img), p(text))
123-end
124-
125-
126-function objective_text(heading, body)
127- return rt(h2(heading) .. p(body))
128-end
129-
130-
131-function new_objectives(...)
132- local sum = 0
133- local s = ""
134- for idx,obj in ipairs{...} do
135- s = s .. obj.body
136- sum = sum + obj.number
137- end
138- return rt("<p font-size=10> <br></p>" ..
139- "<p font=serif font-size=18 font-weight=bold font-color=D1D1D1>"
140- .. ngettext("New Objective", "New Objectives", sum) .. "</p>") .. s
141-end
142
143=== modified file 'data/scripting/richtext_scenarios.lua'
144--- data/scripting/richtext_scenarios.lua 2018-02-24 09:01:10 +0000
145+++ data/scripting/richtext_scenarios.lua 2019-05-13 05:46:56 +0000
146@@ -87,5 +87,9 @@
147 text = text .. obj.body
148 sum = sum + obj.number
149 end
150- return h1(ngettext("New Objective", "New Objectives", sum)) .. text
151+ local objectives_header = _"New Objective"
152+ if (sum > 1) then
153+ objectives_header = _"New Objectives"
154+ end
155+ return h1(objectives_header) .. text
156 end
157
158=== modified file 'data/tribes/buildings/productionsites/frisians/mead_brewery/helptexts.lua'
159--- data/tribes/buildings/productionsites/frisians/mead_brewery/helptexts.lua 2018-02-17 15:41:29 +0000
160+++ data/tribes/buildings/productionsites/frisians/mead_brewery/helptexts.lua 2019-05-13 05:46:56 +0000
161@@ -13,7 +13,7 @@
162
163 function building_helptext_purpose()
164 -- TRANSLATORS: Purpose helptext for a building
165- return pgettext("building", "Brews beer out of barley and water. It also brews mead, which is beer refined with honey. Mead is consumed by miners in deep mines and by experienced soldiers.")
166+ return pgettext("building", "Brews beer out of barley and water. It also brews mead, which is beer refined with honey. Mead is consumed by experienced soldiers.")
167 end
168
169 function building_helptext_note()
170
171=== modified file 'data/tribes/immovables/resi/atlanteans/init.lua'
172--- data/tribes/immovables/resi/atlanteans/init.lua 2018-09-29 12:33:27 +0000
173+++ data/tribes/immovables/resi/atlanteans/init.lua 2019-05-13 05:46:56 +0000
174@@ -1,10 +1,10 @@
175 dirname = path.dirname(__file__)
176
177 tribes:new_immovable_type {
178- msgctxt = "immovable",
179+ msgctxt = "resource_indicator",
180 name = "atlanteans_resi_none",
181 -- TRANSLATORS: This is a resource name used in lists of resources
182- descname = pgettext("immovable", "Resources: None"),
183+ descname = pgettext("resource_indicator", "No Resources"),
184 helptext_script = dirname .. "../helptexts/none.lua",
185 icon = dirname .. "pics/none_0.png",
186 attributes = { "resi" },
187@@ -24,10 +24,10 @@
188 }
189
190 tribes:new_immovable_type {
191- msgctxt = "immovable",
192+ msgctxt = "resource_indicator",
193 name = "atlanteans_resi_water",
194 -- TRANSLATORS: This is a resource name used in lists of resources
195- descname = pgettext("immovable", "Resources: Water Vein"),
196+ descname = pgettext("resource_indicator", "Water"),
197 helptext_script = dirname .. "../helptexts/water.lua",
198 icon = dirname .. "pics/water_0.png",
199 attributes = { "resi" },
200@@ -48,10 +48,10 @@
201 }
202
203 tribes:new_immovable_type {
204- msgctxt = "immovable",
205+ msgctxt = "resource_indicator",
206 name = "atlanteans_resi_coal_1",
207 -- TRANSLATORS: This is a resource name used in lists of resources
208- descname = pgettext("immovable", "Resources: Coal Vein"),
209+ descname = pgettext("resource_indicator", "Some Coal"),
210 helptext_script = dirname .. "../helptexts/coal_1.lua",
211 icon = dirname .. "pics/coal_1_0.png",
212 attributes = { "resi" },
213@@ -72,10 +72,10 @@
214 }
215
216 tribes:new_immovable_type {
217- msgctxt = "immovable",
218+ msgctxt = "resource_indicator",
219 name = "atlanteans_resi_gold_1",
220 -- TRANSLATORS: This is a resource name used in lists of resources
221- descname = pgettext("immovable", "Resources: Gold Vein"),
222+ descname = pgettext("resource_indicator", "Some Gold"),
223 helptext_script = dirname .. "../helptexts/gold_1.lua",
224 icon = dirname .. "pics/gold_1_0.png",
225 attributes = { "resi" },
226@@ -96,10 +96,10 @@
227 }
228
229 tribes:new_immovable_type {
230- msgctxt = "immovable",
231+ msgctxt = "resource_indicator",
232 name = "atlanteans_resi_iron_1",
233 -- TRANSLATORS: This is a resource name used in lists of resources
234- descname = pgettext("immovable", "Resources: Iron Vein"),
235+ descname = pgettext("resource_indicator", "Some Iron"),
236 helptext_script = dirname .. "../helptexts/iron_1.lua",
237 icon = dirname .. "pics/iron_1_0.png",
238 attributes = { "resi" },
239@@ -120,10 +120,10 @@
240 }
241
242 tribes:new_immovable_type {
243- msgctxt = "immovable",
244+ msgctxt = "resource_indicator",
245 name = "atlanteans_resi_stones_1",
246 -- TRANSLATORS: This is a resource name used in lists of resources
247- descname = pgettext("immovable", "Resources: Some Stones"),
248+ descname = pgettext("resource_indicator", "Some Precious Stones"),
249 helptext_script = dirname .. "../helptexts/stones_1.lua",
250 icon = dirname .. "pics/stones_1_0.png",
251 attributes = { "resi" },
252@@ -144,10 +144,10 @@
253 }
254
255 tribes:new_immovable_type {
256- msgctxt = "immovable",
257+ msgctxt = "resource_indicator",
258 name = "atlanteans_resi_coal_2",
259 -- TRANSLATORS: This is a resource name used in lists of resources
260- descname = pgettext("immovable", "Resources: Main Coal Vein"),
261+ descname = pgettext("resource_indicator", "A Lot of Coal"),
262 helptext_script = dirname .. "../helptexts/coal_2.lua",
263 icon = dirname .. "pics/coal_2_0.png",
264 attributes = { "resi" },
265@@ -168,10 +168,10 @@
266 }
267
268 tribes:new_immovable_type {
269- msgctxt = "immovable",
270+ msgctxt = "resource_indicator",
271 name = "atlanteans_resi_gold_2",
272 -- TRANSLATORS: This is a resource name used in lists of resources
273- descname = pgettext("immovable", "Resources: Main Gold Vein"),
274+ descname = pgettext("resource_indicator", "A Lot of Gold"),
275 helptext_script = dirname .. "../helptexts/gold_2.lua",
276 icon = dirname .. "pics/gold_2_0.png",
277 attributes = { "resi" },
278@@ -192,10 +192,10 @@
279 }
280
281 tribes:new_immovable_type {
282- msgctxt = "immovable",
283+ msgctxt = "resource_indicator",
284 name = "atlanteans_resi_iron_2",
285 -- TRANSLATORS: This is a resource name used in lists of resources
286- descname = pgettext("immovable", "Resources: Main Iron Vein"),
287+ descname = pgettext("resource_indicator", "A Lot of Iron"),
288 helptext_script = dirname .. "../helptexts/iron_2.lua",
289 icon = dirname .. "pics/iron_2_0.png",
290 attributes = { "resi" },
291@@ -216,10 +216,10 @@
292 }
293
294 tribes:new_immovable_type {
295- msgctxt = "immovable",
296+ msgctxt = "resource_indicator",
297 name = "atlanteans_resi_stones_2",
298 -- TRANSLATORS: This is a resource name used in lists of resources
299- descname = pgettext("immovable", "Resources: A Lot of Stones"),
300+ descname = pgettext("resource_indicator", "A Lot of Precious Stones"),
301 helptext_script = dirname .. "../helptexts/stones_2.lua",
302 icon = dirname .. "pics/stones_2_0.png",
303 attributes = { "resi" },
304
305=== modified file 'data/tribes/immovables/resi/barbarians/init.lua'
306--- data/tribes/immovables/resi/barbarians/init.lua 2018-09-29 12:33:27 +0000
307+++ data/tribes/immovables/resi/barbarians/init.lua 2019-05-13 05:46:56 +0000
308@@ -1,10 +1,10 @@
309 dirname = path.dirname(__file__)
310
311 tribes:new_immovable_type {
312- msgctxt = "immovable",
313+ msgctxt = "resource_indicator",
314 name = "barbarians_resi_none",
315 -- TRANSLATORS: This is a resource name used in lists of resources
316- descname = pgettext("immovable", "Resources: None"),
317+ descname = pgettext("resource_indicator", "No Resources"),
318 helptext_script = dirname .. "../helptexts/none.lua",
319 icon = dirname .. "pics/none.png",
320 attributes = { "resi" },
321@@ -24,10 +24,10 @@
322 }
323
324 tribes:new_immovable_type {
325- msgctxt = "immovable",
326+ msgctxt = "resource_indicator",
327 name = "barbarians_resi_water",
328 -- TRANSLATORS: This is a resource name used in lists of resources
329- descname = pgettext("immovable", "Resources: Water Vein"),
330+ descname = pgettext("resource_indicator", "Water"),
331 helptext_script = dirname .. "../helptexts/water.lua",
332 icon = dirname .. "pics/water.png",
333 attributes = { "resi" },
334@@ -47,10 +47,10 @@
335 }
336
337 tribes:new_immovable_type {
338- msgctxt = "immovable",
339+ msgctxt = "resource_indicator",
340 name = "barbarians_resi_coal_1",
341 -- TRANSLATORS: This is a resource name used in lists of resources
342- descname = pgettext("immovable", "Resources: Coal Vein"),
343+ descname = pgettext("resource_indicator", "Some Coal"),
344 helptext_script = dirname .. "../helptexts/coal_1.lua",
345 icon = dirname .. "pics/coal_1.png",
346 attributes = { "resi" },
347@@ -70,10 +70,10 @@
348 }
349
350 tribes:new_immovable_type {
351- msgctxt = "immovable",
352+ msgctxt = "resource_indicator",
353 name = "barbarians_resi_gold_1",
354 -- TRANSLATORS: This is a resource name used in lists of resources
355- descname = pgettext("immovable", "Resources: Gold Vein"),
356+ descname = pgettext("resource_indicator", "Some Gold"),
357 helptext_script = dirname .. "../helptexts/gold_1.lua",
358 icon = dirname .. "pics/gold_1.png",
359 attributes = { "resi" },
360@@ -93,10 +93,10 @@
361 }
362
363 tribes:new_immovable_type {
364- msgctxt = "immovable",
365+ msgctxt = "resource_indicator",
366 name = "barbarians_resi_iron_1",
367 -- TRANSLATORS: This is a resource name used in lists of resources
368- descname = pgettext("immovable", "Resources: Iron Vein"),
369+ descname = pgettext("resource_indicator", "Some Iron"),
370 helptext_script = dirname .. "../helptexts/iron_1.lua",
371 icon = dirname .. "pics/iron_1.png",
372 attributes = { "resi" },
373@@ -116,10 +116,10 @@
374 }
375
376 tribes:new_immovable_type {
377- msgctxt = "immovable",
378+ msgctxt = "resource_indicator",
379 name = "barbarians_resi_stones_1",
380 -- TRANSLATORS: This is a resource name used in lists of resources
381- descname = pgettext("immovable", "Resources: Some Stones"),
382+ descname = pgettext("resource_indicator", "Some Granite"),
383 helptext_script = dirname .. "../helptexts/stones_1.lua",
384 icon = dirname .. "pics/stones_1.png",
385 attributes = { "resi" },
386@@ -139,10 +139,10 @@
387 }
388
389 tribes:new_immovable_type {
390- msgctxt = "immovable",
391+ msgctxt = "resource_indicator",
392 name = "barbarians_resi_coal_2",
393 -- TRANSLATORS: This is a resource name used in lists of resources
394- descname = pgettext("immovable", "Resources: Main Coal Vein"),
395+ descname = pgettext("resource_indicator", "A Lot of Coal"),
396 helptext_script = dirname .. "../helptexts/coal_2.lua",
397 icon = dirname .. "pics/coal_2.png",
398 attributes = { "resi" },
399@@ -162,10 +162,10 @@
400 }
401
402 tribes:new_immovable_type {
403- msgctxt = "immovable",
404+ msgctxt = "resource_indicator",
405 name = "barbarians_resi_gold_2",
406 -- TRANSLATORS: This is a resource name used in lists of resources
407- descname = pgettext("immovable", "Resources: Main Gold Vein"),
408+ descname = pgettext("resource_indicator", "A Lot of Gold"),
409 helptext_script = dirname .. "../helptexts/gold_2.lua",
410 icon = dirname .. "pics/gold_2.png",
411 attributes = { "resi" },
412@@ -185,10 +185,10 @@
413 }
414
415 tribes:new_immovable_type {
416- msgctxt = "immovable",
417+ msgctxt = "resource_indicator",
418 name = "barbarians_resi_iron_2",
419 -- TRANSLATORS: This is a resource name used in lists of resources
420- descname = pgettext("immovable", "Resources: Main Iron Vein"),
421+ descname = pgettext("resource_indicator", "A Lot of Iron"),
422 helptext_script = dirname .. "../helptexts/iron_2.lua",
423 icon = dirname .. "pics/iron_2.png",
424 attributes = { "resi" },
425@@ -208,10 +208,10 @@
426 }
427
428 tribes:new_immovable_type {
429- msgctxt = "immovable",
430+ msgctxt = "resource_indicator",
431 name = "barbarians_resi_stones_2",
432 -- TRANSLATORS: This is a resource name used in lists of resources
433- descname = pgettext("immovable", "Resources: A Lot of Stones"),
434+ descname = pgettext("resource_indicator", "A Lot of Granite"),
435 helptext_script = dirname .. "../helptexts/stones_2.lua",
436 icon = dirname .. "pics/stones_2.png",
437 attributes = { "resi" },
438
439=== modified file 'data/tribes/immovables/resi/empire/init.lua'
440--- data/tribes/immovables/resi/empire/init.lua 2018-09-29 12:33:27 +0000
441+++ data/tribes/immovables/resi/empire/init.lua 2019-05-13 05:46:56 +0000
442@@ -1,10 +1,10 @@
443 dirname = path.dirname(__file__)
444
445 tribes:new_immovable_type {
446- msgctxt = "immovable",
447+ msgctxt = "resource_indicator",
448 name = "empire_resi_none",
449 -- TRANSLATORS: This is a resource name used in lists of resources
450- descname = pgettext("immovable", "Resources: None"),
451+ descname = pgettext("resource_indicator", "No Resources"),
452 helptext_script = dirname .. "../helptexts/none.lua",
453 icon = dirname .. "pics/none.png",
454 attributes = { "resi" },
455@@ -24,10 +24,10 @@
456 }
457
458 tribes:new_immovable_type {
459- msgctxt = "immovable",
460+ msgctxt = "resource_indicator",
461 name = "empire_resi_water",
462 -- TRANSLATORS: This is a resource name used in lists of resources
463- descname = pgettext("immovable", "Resources: Water Vein"),
464+ descname = pgettext("resource_indicator", "Water"),
465 helptext_script = dirname .. "../helptexts/water.lua",
466 icon = dirname .. "pics/water.png",
467 attributes = { "resi" },
468@@ -47,10 +47,10 @@
469 }
470
471 tribes:new_immovable_type {
472- msgctxt = "immovable",
473+ msgctxt = "resource_indicator",
474 name = "empire_resi_coal_1",
475 -- TRANSLATORS: This is a resource name used in lists of resources
476- descname = pgettext("immovable", "Resources: Coal Vein"),
477+ descname = pgettext("resource_indicator", "Some Coal"),
478 helptext_script = dirname .. "../helptexts/coal_1.lua",
479 icon = dirname .. "pics/coal_1.png",
480 attributes = { "resi" },
481@@ -70,10 +70,10 @@
482 }
483
484 tribes:new_immovable_type {
485- msgctxt = "immovable",
486+ msgctxt = "resource_indicator",
487 name = "empire_resi_gold_1",
488 -- TRANSLATORS: This is a resource name used in lists of resources
489- descname = pgettext("immovable", "Resources: Gold Vein"),
490+ descname = pgettext("resource_indicator", "Some Gold"),
491 helptext_script = dirname .. "../helptexts/gold_1.lua",
492 icon = dirname .. "pics/gold_1.png",
493 attributes = { "resi" },
494@@ -93,10 +93,10 @@
495 }
496
497 tribes:new_immovable_type {
498- msgctxt = "immovable",
499+ msgctxt = "resource_indicator",
500 name = "empire_resi_iron_1",
501 -- TRANSLATORS: This is a resource name used in lists of resources
502- descname = pgettext("immovable", "Resources: Iron Vein"),
503+ descname = pgettext("resource_indicator", "Some Iron"),
504 helptext_script = dirname .. "../helptexts/iron_1.lua",
505 icon = dirname .. "pics/iron_1.png",
506 attributes = { "resi" },
507@@ -116,10 +116,10 @@
508 }
509
510 tribes:new_immovable_type {
511- msgctxt = "immovable",
512+ msgctxt = "resource_indicator",
513 name = "empire_resi_stones_1",
514 -- TRANSLATORS: This is a resource name used in lists of resources
515- descname = pgettext("immovable", "Resources: Some Stones"),
516+ descname = pgettext("resource_indicator", "Some Marble"),
517 helptext_script = dirname .. "../helptexts/stones_1.lua",
518 icon = dirname .. "pics/stones_1.png",
519 attributes = { "resi" },
520@@ -139,10 +139,10 @@
521 }
522
523 tribes:new_immovable_type {
524- msgctxt = "immovable",
525+ msgctxt = "resource_indicator",
526 name = "empire_resi_coal_2",
527 -- TRANSLATORS: This is a resource name used in lists of resources
528- descname = pgettext("immovable", "Resources: Main Coal Vein"),
529+ descname = pgettext("resource_indicator", "A Lot of Coal"),
530 helptext_script = dirname .. "../helptexts/coal_2.lua",
531 icon = dirname .. "pics/coal_2.png",
532 attributes = { "resi" },
533@@ -162,10 +162,10 @@
534 }
535
536 tribes:new_immovable_type {
537- msgctxt = "immovable",
538+ msgctxt = "resource_indicator",
539 name = "empire_resi_gold_2",
540 -- TRANSLATORS: This is a resource name used in lists of resources
541- descname = pgettext("immovable", "Resources: Main Gold Vein"),
542+ descname = pgettext("resource_indicator", "A Lot of Gold"),
543 helptext_script = dirname .. "../helptexts/gold_2.lua",
544 icon = dirname .. "pics/gold_2.png",
545 attributes = { "resi" },
546@@ -185,10 +185,10 @@
547 }
548
549 tribes:new_immovable_type {
550- msgctxt = "immovable",
551+ msgctxt = "resource_indicator",
552 name = "empire_resi_iron_2",
553 -- TRANSLATORS: This is a resource name used in lists of resources
554- descname = pgettext("immovable", "Resources: Main Iron Vein"),
555+ descname = pgettext("resource_indicator", "A Lot of Iron"),
556 helptext_script = dirname .. "../helptexts/iron_2.lua",
557 icon = dirname .. "pics/iron_2.png",
558 attributes = { "resi" },
559@@ -208,10 +208,10 @@
560 }
561
562 tribes:new_immovable_type {
563- msgctxt = "immovable",
564+ msgctxt = "resource_indicator",
565 name = "empire_resi_stones_2",
566 -- TRANSLATORS: This is a resource name used in lists of resources
567- descname = pgettext("immovable", "Resources: A Lot of Stones"),
568+ descname = pgettext("resource_indicator", "A Lot of Marble"),
569 helptext_script = dirname .. "../helptexts/stones_2.lua",
570 icon = dirname .. "pics/stones_2.png",
571 attributes = { "resi" },
572
573=== modified file 'data/tribes/immovables/resi/frisians/init.lua'
574--- data/tribes/immovables/resi/frisians/init.lua 2018-09-29 12:33:27 +0000
575+++ data/tribes/immovables/resi/frisians/init.lua 2019-05-13 05:46:56 +0000
576@@ -1,10 +1,10 @@
577 dirname = path.dirname(__file__)
578
579 tribes:new_immovable_type {
580- msgctxt = "immovable",
581+ msgctxt = "resource_indicator",
582 name = "frisians_resi_none",
583 -- TRANSLATORS: This is a resource name used in lists of resources
584- descname = pgettext("immovable", "Resources: None"),
585+ descname = pgettext("resource_indicator", "No Resources"),
586 helptext_script = dirname .. "../helptexts/none.lua",
587 icon = dirname .. "pics/none_0.png",
588 attributes = { "resi" },
589@@ -24,10 +24,10 @@
590 }
591
592 tribes:new_immovable_type {
593- msgctxt = "immovable",
594+ msgctxt = "resource_indicator",
595 name = "frisians_resi_water",
596 -- TRANSLATORS: This is a resource name used in lists of resources
597- descname = pgettext("immovable", "Resources: Water Vein"),
598+ descname = pgettext("resource_indicator", "Water"),
599 helptext_script = dirname .. "../helptexts/water.lua",
600 icon = dirname .. "pics/water_0.png",
601 attributes = { "resi" },
602@@ -48,10 +48,10 @@
603 }
604
605 tribes:new_immovable_type {
606- msgctxt = "immovable",
607+ msgctxt = "resource_indicator",
608 name = "frisians_resi_coal_1",
609 -- TRANSLATORS: This is a resource name used in lists of resources
610- descname = pgettext("immovable", "Resources: Coal Vein"),
611+ descname = pgettext("resource_indicator", "Some Coal"),
612 helptext_script = dirname .. "../helptexts/coal_1.lua",
613 icon = dirname .. "pics/coal_1_0.png",
614 attributes = { "resi" },
615@@ -72,10 +72,10 @@
616 }
617
618 tribes:new_immovable_type {
619- msgctxt = "immovable",
620+ msgctxt = "resource_indicator",
621 name = "frisians_resi_gold_1",
622 -- TRANSLATORS: This is a resource name used in lists of resources
623- descname = pgettext("immovable", "Resources: Gold Vein"),
624+ descname = pgettext("resource_indicator", "Some Gold"),
625 helptext_script = dirname .. "../helptexts/gold_1.lua",
626 icon = dirname .. "pics/gold_1_0.png",
627 attributes = { "resi" },
628@@ -96,10 +96,10 @@
629 }
630
631 tribes:new_immovable_type {
632- msgctxt = "immovable",
633+ msgctxt = "resource_indicator",
634 name = "frisians_resi_iron_1",
635 -- TRANSLATORS: This is a resource name used in lists of resources
636- descname = pgettext("immovable", "Resources: Iron Vein"),
637+ descname = pgettext("resource_indicator", "Some Iron"),
638 helptext_script = dirname .. "../helptexts/iron_1.lua",
639 icon = dirname .. "pics/iron_1_0.png",
640 attributes = { "resi" },
641@@ -120,10 +120,10 @@
642 }
643
644 tribes:new_immovable_type {
645- msgctxt = "immovable",
646+ msgctxt = "resource_indicator",
647 name = "frisians_resi_stones_1",
648 -- TRANSLATORS: This is a resource name used in lists of resources
649- descname = pgettext("immovable", "Resources: Some Stones"),
650+ descname = pgettext("resource_indicator", "Some Granite"),
651 helptext_script = dirname .. "../helptexts/stones_1.lua",
652 icon = dirname .. "pics/stones_1_0.png",
653 attributes = { "resi" },
654@@ -144,10 +144,10 @@
655 }
656
657 tribes:new_immovable_type {
658- msgctxt = "immovable",
659+ msgctxt = "resource_indicator",
660 name = "frisians_resi_coal_2",
661 -- TRANSLATORS: This is a resource name used in lists of resources
662- descname = pgettext("immovable", "Resources: Main Coal Vein"),
663+ descname = pgettext("resource_indicator", "A Lot of Coal"),
664 helptext_script = dirname .. "../helptexts/coal_2.lua",
665 icon = dirname .. "pics/coal_2_0.png",
666 attributes = { "resi" },
667@@ -168,10 +168,10 @@
668 }
669
670 tribes:new_immovable_type {
671- msgctxt = "immovable",
672+ msgctxt = "resource_indicator",
673 name = "frisians_resi_gold_2",
674 -- TRANSLATORS: This is a resource name used in lists of resources
675- descname = pgettext("immovable", "Resources: Main Gold Vein"),
676+ descname = pgettext("resource_indicator", "A Lot of Gold"),
677 helptext_script = dirname .. "../helptexts/gold_2.lua",
678 icon = dirname .. "pics/gold_2_0.png",
679 attributes = { "resi" },
680@@ -192,10 +192,10 @@
681 }
682
683 tribes:new_immovable_type {
684- msgctxt = "immovable",
685+ msgctxt = "resource_indicator",
686 name = "frisians_resi_iron_2",
687 -- TRANSLATORS: This is a resource name used in lists of resources
688- descname = pgettext("immovable", "Resources: Main Iron Vein"),
689+ descname = pgettext("resource_indicator", "A Lot of Iron"),
690 helptext_script = dirname .. "../helptexts/iron_2.lua",
691 icon = dirname .. "pics/iron_2_0.png",
692 attributes = { "resi" },
693@@ -216,10 +216,10 @@
694 }
695
696 tribes:new_immovable_type {
697- msgctxt = "immovable",
698+ msgctxt = "resource_indicator",
699 name = "frisians_resi_stones_2",
700 -- TRANSLATORS: This is a resource name used in lists of resources
701- descname = pgettext("immovable", "Resources: A Lot of Stones"),
702+ descname = pgettext("resource_indicator", "A Lot of Granite"),
703 helptext_script = dirname .. "../helptexts/stones_2.lua",
704 icon = dirname .. "pics/stones_2_0.png",
705 attributes = { "resi" },
706
707=== modified file 'data/tribes/scripting/help/building_help.lua'
708--- data/tribes/scripting/help/building_help.lua 2019-04-14 13:43:55 +0000
709+++ data/tribes/scripting/help/building_help.lua 2019-05-13 05:46:56 +0000
710@@ -660,8 +660,14 @@
711 if (number_of_workers > 0) then
712 local tool_string = help_tool_string(tribe, toolnames, number_of_workers)
713 if (tool_string ~= "") then
714- -- TRANSLATORS: Tribal Encyclopedia: Heading for which tool workers use
715- result = result .. h3(ngettext("Worker uses:","Workers use:", number_of_workers)) .. tool_string
716+ if (number_of_workers == 1) then
717+ -- TRANSLATORS: Tribal Encyclopedia: Heading for which tool 1 worker uses
718+ result = result .. h3(_"Worker uses:")
719+ else
720+ -- TRANSLATORS: Tribal Encyclopedia: Heading for which tool more than 1 worker uses
721+ result = result .. h3(_"Workers use:")
722+ end
723+ result = result .. tool_string
724 end
725 end
726
727
728=== modified file 'data/tribes/scripting/help/ware_help.lua'
729--- data/tribes/scripting/help/ware_help.lua 2019-04-07 05:46:13 +0000
730+++ data/tribes/scripting/help/ware_help.lua 2019-05-13 05:46:56 +0000
731@@ -102,10 +102,14 @@
732 for j, program_name in ipairs(producing_programs) do
733 result = result .. help_consumed_wares_workers(tribe, building, program_name)
734 if (produced_wares_counters[program_name] > 0) then
735- result = result
736- -- TRANSLATORS: Ware Encyclopedia: Wares produced by a productionsite
737- .. h3(ngettext("Ware produced:", "Wares produced:", produced_wares_counters[program_name]))
738- .. produced_wares_strings[program_name]
739+ if (produced_wares_counters[program_name] == 1) then
740+ -- TRANSLATORS: Ware Encyclopedia: 1 ware produced by a productionsite
741+ result = result .. h3(_"Ware produced:")
742+ else
743+ -- TRANSLATORS: Ware Encyclopedia: More than 1 ware produced by a productionsite
744+ result = result .. h3(_"Wares produced:")
745+ end
746+ result = result .. produced_wares_strings[program_name]
747 end
748 end
749 end
750@@ -163,8 +167,13 @@
751
752 -- Now show consumers (buildings + workers)
753 if (consumers_amount > 0) then
754- -- TRANSLATORS: Ware Encyclopedia: A list of buildings and / or workers that consume a ware
755- result = result .. h2(ngettext("Consumer", "Consumers", consumers_amount))
756+ if (consumers_amount == 1) then
757+ -- TRANSLATORS: Ware Encyclopedia: Heading for 1 building and / or worker that consumes a ware
758+ result = result .. h2(_"Consumer")
759+ else
760+ -- TRANSLATORS: Ware Encyclopedia: A list of buildings and / or workers that consume a ware
761+ result = result .. h2(_"Consumers")
762+ end
763 if (consumers ~= "") then
764 result = result .. consumers_string
765 end
766
767=== modified file 'data/tribes/scripting/help/worker_help.lua'
768--- data/tribes/scripting/help/worker_help.lua 2018-09-29 05:10:39 +0000
769+++ data/tribes/scripting/help/worker_help.lua 2019-05-13 05:46:56 +0000
770@@ -74,10 +74,14 @@
771 for j, program_name in ipairs(producing_programs) do
772 result = result .. help_consumed_wares_workers(tribe, building, program_name)
773 if (recruited_workers_counters[program_name] > 0) then
774- result = result
775- -- TRANSLATORS: Worker Encyclopedia: Workers recruited by a productionsite
776- .. h3(ngettext("Worker recruited:", "Workers recruited:", recruited_workers_counters[program_name]))
777- .. recruited_workers_strings[program_name]
778+ if (recruited_workers_counters[program_name] == 1) then
779+ -- TRANSLATORS: Worker Encyclopedia: 1 worker recruited by a productionsite
780+ result = result .. h3(_"Worker recruited:")
781+ else
782+ -- TRANSLATORS: Worker Encyclopedia: More than 1 worker recruited by a productionsite
783+ result = result .. h3(_"Workers recruited:")
784+ end
785+ result = result .. recruited_workers_strings[program_name]
786 end
787 end
788 end
789@@ -101,9 +105,16 @@
790 if (#worker_description.employers > 0) then
791 local normal = {}
792 local additional = {}
793- -- TRANSLATORS: Worker Encyclopedia: A list of buildings where a worker is needed to work at
794- -- TRANSLATORS: You can also translate this as 'workplace(s)'
795- result = result .. h2(ngettext("Works at", "Works at", #worker_description.employers))
796+
797+ if (#worker_description.employers == 1) then
798+ -- TRANSLATORS: Worker Encyclopedia: Heading for 1 building where a worker can work
799+ -- TRANSLATORS: You can also translate this as 'workplace'
800+ result = result .. h2(pgettext("workerhelp_one_building", "Works at"))
801+ else
802+ -- TRANSLATORS: Worker Encyclopedia: A list of more than 1 building where a worker can work
803+ -- TRANSLATORS: You can also translate this as 'workplaces'
804+ result = result .. h2(pgettext("workerhelp_multiple_buildings", "Works at"))
805+ end
806 for i, building in ipairs(worker_description.employers) do
807 result = result .. dependencies({worker_description, building}, building.descname)
808 normal[building.descname] = true
809@@ -115,17 +126,15 @@
810 table.insert(additional, build)
811 end
812 end
813- --[[ TODO(GunChleoc): Put this in after Build 20, activate the translators comments and also fix the plural above
814 if #additional == 1 then
815- -- #Translators: Worker Encyclopedia: Heading above a list of buildings where a worker may work instead of a less experienced worker
816- -- #TRANSLATORS: You can also translate this as 'additional workplace'
817- result = result .. h3(pgettext("workerhelp_one_building", "Can also work at"))
818+ -- Translators: Worker Encyclopedia: Heading above a list 1 building where a worker may work instead of a less experienced worker
819+ -- TRANSLATORS: You can also translate this as 'additional workplace'
820+ result = result .. h2(pgettext("workerhelp_one_building", "Can also work at"))
821 else
822- -- #Translators: Worker Encyclopedia: Heading above a list of buildings where a worker may work instead of a less experienced worker
823- -- #TRANSLATORS: You can also translate this as 'additional workplaces'
824- result = result .. h3(ngettext("Can also work at", "Can also work at", #additional))
825+ -- Translators: Worker Encyclopedia: Heading above a list of buildings where a worker may work instead of a less experienced worker
826+ -- TRANSLATORS: You can also translate this as 'additional workplaces'
827+ result = result .. h2(pgettext("workerhelp_multiple_buildings", "Can also work at"))
828 end
829- ]]
830 for i, build in ipairs(additional) do
831 result = result .. dependencies({worker_description, build}, build.descname)
832 end
833
834=== modified file 'data/tribes/wares/bread_frisians/helptexts.lua'
835--- data/tribes/wares/bread_frisians/helptexts.lua 2017-07-07 16:51:39 +0000
836+++ data/tribes/wares/bread_frisians/helptexts.lua 2019-05-13 05:46:56 +0000
837@@ -1,7 +1,7 @@
838 function ware_helptext(tribe)
839 local helptext = {
840 -- TRANSLATORS: Helptext for a ware: Frisian Bread
841- frisians = pgettext("frisians_ware", "Bread is made out of barley and water and is used in the taverns and drinking halls to prepare rations. It is also consumed by training soldiers.")
842+ frisians = pgettext("frisians_ware", "Bread is made out of barley and water and is used in the taverns to prepare rations. It is also consumed by training soldiers.")
843 }
844 local result = ""
845 if tribe then
846
847=== modified file 'data/tribes/wares/brick/helptexts.lua'
848--- data/tribes/wares/brick/helptexts.lua 2017-07-07 16:51:39 +0000
849+++ data/tribes/wares/brick/helptexts.lua 2019-05-13 05:46:56 +0000
850@@ -1,7 +1,7 @@
851 function ware_helptext(tribe)
852 local helptext = {
853 -- TRANSLATORS: Helptext for a ware: Brick
854- frisians = pgettext("frisians_ware", "Bricks are the best and most important building material. They are made out of clay and granite.")
855+ frisians = pgettext("frisians_ware", "Bricks are the best and most important building material. They are made out of a mix of clay and granite dried in a coal fire.")
856 }
857 local result = ""
858 if tribe then
859
860=== modified file 'data/tribes/wares/coal/helptexts.lua'
861--- data/tribes/wares/coal/helptexts.lua 2018-02-17 15:41:29 +0000
862+++ data/tribes/wares/coal/helptexts.lua 2019-05-13 05:46:56 +0000
863@@ -9,7 +9,7 @@
864 -- TRANSLATORS: Helptext for a ware: Coal
865 empire = pgettext("empire_ware", "The fires of the Empire smelting works, armor smithies and weapon smithies are usually fed with coal."),
866 -- TRANSLATORS: Helptext for a ware: Coal
867- frisians = pgettext("frisians_ware", "The fires of the furnaces and armor smithies are fed with coal.")
868+ frisians = pgettext("frisians_ware", "The fires of the brick kilns, furnaces and armor smithies are fed with coal.")
869 }
870 local result = ""
871 if tribe then
872
873=== modified file 'data/tribes/wares/felling_ax/helptexts.lua'
874--- data/tribes/wares/felling_ax/helptexts.lua 2017-07-07 16:51:39 +0000
875+++ data/tribes/wares/felling_ax/helptexts.lua 2019-05-13 05:46:56 +0000
876@@ -1,13 +1,13 @@
877 function ware_helptext(tribe)
878 local helptext = {
879 -- TRANSLATORS: Helptext for a ware: Felling Ax
880- default = pgettext("ware", "The felling ax is the tool of the lumberjack to chop down trees."),
881- -- TRANSLATORS: Helptext for a ware: Felling Ax
882- barbarians = pgettext("barbarians_ware", "Felling axes are produced in the metal workshop (but cease to be produced by the building if it is enhanced to an ax workshop and war mill)."),
883- -- TRANSLATORS: Helptext for a ware: Felling Ax
884- frisians = pgettext("frisians_ware", "Felling axes are produced by the blacksmithy."),
885- -- TRANSLATORS: Helptext for a ware: Felling Ax
886- empire = pgettext("empire_ware", "Felling axes are produced by the toolsmith.")
887+ default = pgettext("ware", "The felling ax is the tool to chop down trees."),
888+ -- TRANSLATORS: Helptext for a ware: Felling Ax
889+ barbarians = pgettext("barbarians_ware", "Felling axes are used by lumberjacks and produced in the metal workshop (but cease to be produced by the building if it is enhanced to an ax workshop and war mill)."),
890+ -- TRANSLATORS: Helptext for a ware: Felling Ax
891+ frisians = pgettext("frisians_ware", "Felling axes are used by woodcutters and produced by the blacksmithy."),
892+ -- TRANSLATORS: Helptext for a ware: Felling Ax
893+ empire = pgettext("empire_ware", "Felling axes are used by lumberjacks and produced by the toolsmithy.")
894 }
895 local result = ""
896 if tribe then
897
898=== modified file 'data/tribes/wares/fire_tongs/helptexts.lua'
899--- data/tribes/wares/fire_tongs/helptexts.lua 2017-07-07 16:51:39 +0000
900+++ data/tribes/wares/fire_tongs/helptexts.lua 2019-05-13 05:46:56 +0000
901@@ -1,15 +1,15 @@
902 function ware_helptext(tribe)
903 local helptext = {
904 -- TRANSLATORS: Helptext for a ware: Fire Tongs
905- default = pgettext("ware", "Fire tongs are the tools of the smelter, who works in the smelting works."),
906- -- TRANSLATORS: Helptext for a ware: Fire Tongs
907- atlanteans = pgettext("atlanteans_ware_fire_tongs", "They are produced by the toolsmith."),
908- -- TRANSLATORS: Helptext for a ware: Fire Tongs
909- frisians = pgettext("frisians_ware", "They are produced by the blacksmithy."),
910- -- TRANSLATORS: Helptext for a ware: Fire Tongs
911- barbarians = pgettext("barbarians_ware", "Produced by the metal workshop (but they cease to be produced by the building if it is enhanced to an ax workshop and war mill)."),
912- -- TRANSLATORS: Helptext for a ware: Fire Tongs
913- empire = pgettext("empire_ware_fire_tongs", "They are produced by the toolsmith.")
914+ default = pgettext("ware", "Fire tongs are the tools for smelting ores."),
915+ -- TRANSLATORS: Helptext for a ware: Fire Tongs
916+ atlanteans = pgettext("atlanteans_ware_fire_tongs", "They are used in the smelting works and produced by the toolsmith."),
917+ -- TRANSLATORS: Helptext for a ware: Fire Tongs
918+ frisians = pgettext("frisians_ware", "They are used in the furnace and the brick kiln and produced by the blacksmithy."),
919+ -- TRANSLATORS: Helptext for a ware: Fire Tongs
920+ barbarians = pgettext("barbarians_ware", "They are used in the smelting works and produced by the metal workshop (but they cease to be produced by the building if it is enhanced to an ax workshop and war mill)."),
921+ -- TRANSLATORS: Helptext for a ware: Fire Tongs
922+ empire = pgettext("empire_ware_fire_tongs", "They are used in the smelting works and produced by the toolsmith.")
923 }
924 local result = ""
925 if tribe then
926
927=== modified file 'data/tribes/wares/fruit/helptexts.lua'
928--- data/tribes/wares/fruit/helptexts.lua 2017-07-07 16:51:39 +0000
929+++ data/tribes/wares/fruit/helptexts.lua 2019-05-13 05:46:56 +0000
930@@ -1,7 +1,7 @@
931 function ware_helptext(tribe)
932 local helptext = {
933 -- TRANSLATORS: Helptext for a ware: Fruit
934- frisians = pgettext("frisians_ware", "Fruit are berries gathered from berry bushes by a fruit collector. They are used for rations and meals.")
935+ frisians = pgettext("frisians_ware", "Fruit are berries gathered from berry bushes by a fruit collector. They are used for rations and for feeding the fish at the aqua farms.")
936 }
937 local result = ""
938 if tribe then
939
940=== modified file 'data/tribes/wares/gold/helptexts.lua'
941--- data/tribes/wares/gold/helptexts.lua 2018-02-17 15:41:29 +0000
942+++ data/tribes/wares/gold/helptexts.lua 2019-05-13 05:46:56 +0000
943@@ -1,15 +1,15 @@
944 function ware_helptext(tribe)
945 local helptext = {
946 -- TRANSLATORS: Helptext for a ware: Gold
947- default = pgettext("ware", "Gold is the most valuable of all metals, and it is obtained out of gold ore in a smelting works."),
948- -- TRANSLATORS: Helptext for a ware: Gold
949- atlanteans = pgettext("atlanteans_ware", "Gold is used by the armor smithy, the weapon smithy and the gold spinning mill."),
950- -- TRANSLATORS: Helptext for a ware: Gold
951- barbarians = pgettext("barbarians_ware", "Only very important things are embellished with gold. It is used as a precious building material and to produce different axes (in the war mill) and different parts of armor (in the helm smithy)."),
952- -- TRANSLATORS: Helptext for a ware: Gold
953- frisians = pgettext("frisians_ware", "Only very important things are embellished with gold. It is used to produce better swords and the best helmets. The best armor is also decorated with gold."),
954- -- TRANSLATORS: Helptext for a ware: Gold
955- empire = pgettext("empire_ware", "Armor and weapons are embellished with gold in the armor smithy and the weapon smithy.")
956+ default = pgettext("ware", "Gold is the most valuable of all metals, and it is smelted out of gold ore."),
957+ -- TRANSLATORS: Helptext for a ware: Gold
958+ atlanteans = pgettext("atlanteans_ware", "It is produced by the smelting works and used by the armor smithy, the weapon smithy and the gold spinning mill."),
959+ -- TRANSLATORS: Helptext for a ware: Gold
960+ barbarians = pgettext("barbarians_ware", "Only very important things are embellished with gold. It is produced by the smelting works and used as a precious building material and to produce different axes (in the war mill) and different parts of armor (in the helm smithy)."),
961+ -- TRANSLATORS: Helptext for a ware: Gold
962+ frisians = pgettext("frisians_ware", "Only very important things are embellished with gold. It is produced by the furnace and is used to produce better swords and the best helmets. The best armor is also decorated with gold."),
963+ -- TRANSLATORS: Helptext for a ware: Gold
964+ empire = pgettext("empire_ware", "It is produced by the smelting works. Armor and weapons are embellished with gold in the armor smithy and the weapon smithy.")
965 }
966 local result = ""
967 if tribe then
968
969=== modified file 'data/tribes/wares/gold_ore/helptexts.lua'
970--- data/tribes/wares/gold_ore/helptexts.lua 2018-02-17 15:41:29 +0000
971+++ data/tribes/wares/gold_ore/helptexts.lua 2019-05-13 05:46:56 +0000
972@@ -1,7 +1,15 @@
973 function ware_helptext(tribe)
974 local helptext = {
975 -- TRANSLATORS: Helptext for a ware: Gold Ore
976- default = pgettext("ware", "Gold ore is mined in a gold mine. Smelted in a smelting works, it turns into gold which is used as a precious building material and to produce weapons and armor.")
977+ default = pgettext("ware", "Gold ore is mined in a gold mine."),
978+ -- TRANSLATORS: Helptext for a ware: Gold Ore
979+ atlanteans = pgettext("atlanteans_ware", "Smelted in a smelting works, it turns into gold which is used as a precious building material and to produce weapons and armor."),
980+ -- TRANSLATORS: Helptext for a ware: Gold Ore
981+ barbarians = pgettext("barbarians_ware", "Smelted in a smelting works, it turns into gold which is used as a precious building material and to produce weapons and armor."),
982+ -- TRANSLATORS: Helptext for a ware: Gold Ore
983+ frisians = pgettext("frisians_ware", "Smelted in a furnace, it turns into gold which is used as a precious building material and to produce weapons and armor."),
984+ -- TRANSLATORS: Helptext for a ware: Gold Ore
985+ empire = pgettext("empire_ware", "Smelted in a smelting works, it turns into gold which is used as a precious building material and to produce weapons and armor.")
986 }
987 local result = ""
988 if tribe then
989
990=== modified file 'data/tribes/wares/iron/helptexts.lua'
991--- data/tribes/wares/iron/helptexts.lua 2018-02-17 15:41:29 +0000
992+++ data/tribes/wares/iron/helptexts.lua 2019-05-13 05:46:56 +0000
993@@ -1,15 +1,15 @@
994 function ware_helptext(tribe)
995 local helptext = {
996 -- TRANSLATORS: Helptext for a ware: Iron
997- default = pgettext("ware", "Iron is extracted from iron ore in the smelting works."),
998- -- TRANSLATORS: Helptext for a ware: Iron
999- atlanteans = pgettext("atlanteans_ware", "It is used in the toolsmithy, armor smithy and weapon smithy."),
1000- -- TRANSLATORS: Helptext for a ware: Iron
1001- barbarians = pgettext("barbarians_ware", "It is used to produce weapons and tools in the metal workshop, ax workshop, war mill and helm smithy."),
1002- -- TRANSLATORS: Helptext for a ware: Iron
1003- empire = pgettext("empire_ware", "Weapons, armor and tools are made of iron."),
1004- -- TRANSLATORS: Helptext for a ware: Iron
1005- frisians = pgettext("frisians_ware", "Tools and weapons are made of iron. It is also used as jewellery for fur garment armor to give it a silver shine.")
1006+ default = pgettext("ware", "Iron is smelted out of iron ores."),
1007+ -- TRANSLATORS: Helptext for a ware: Iron
1008+ atlanteans = pgettext("atlanteans_ware", "It is produced by the smelting works and used in the toolsmithy, armor smithy and weapon smithy."),
1009+ -- TRANSLATORS: Helptext for a ware: Iron
1010+ barbarians = pgettext("barbarians_ware", "It is produced by the smelting works and used to produce weapons and tools in the metal workshop, ax workshop, war mill and helm smithy."),
1011+ -- TRANSLATORS: Helptext for a ware: Iron
1012+ empire = pgettext("empire_ware", "It is produced by the smelting works. Weapons, armor and tools are made of iron."),
1013+ -- TRANSLATORS: Helptext for a ware: Iron
1014+ frisians = pgettext("frisians_ware", "It is produced by the furnace. Tools and weapons are made of iron. It is also used as jewellery for fur garment armor to give it a silver shine.")
1015 }
1016 local result = ""
1017 if tribe then
1018
1019=== modified file 'data/tribes/wares/iron_ore/helptexts.lua'
1020--- data/tribes/wares/iron_ore/helptexts.lua 2015-10-31 12:11:44 +0000
1021+++ data/tribes/wares/iron_ore/helptexts.lua 2019-05-13 05:46:56 +0000
1022@@ -1,7 +1,16 @@
1023 function ware_helptext(tribe)
1024 local helptext = {
1025 -- TRANSLATORS: Helptext for a ware: Iron Ore
1026- default = pgettext("default_ware", "Iron ore is mined in iron mines. It is smelted in a smelting works to retrieve the iron.")
1027+ default = pgettext("default_ware", "Iron ore is mined in iron mines."),
1028+ -- TRANSLATORS: Helptext for a ware: Iron Ore
1029+ atlanteans = pgettext("atlanteans_ware", "It is smelted in a smelting works to retrieve the iron."),
1030+ -- TRANSLATORS: Helptext for a ware: Iron Ore
1031+ barbarians = pgettext("barbarians_ware", "It is smelted in a smelting works to retrieve the iron."),
1032+ -- TRANSLATORS: Helptext for a ware: Iron Ore
1033+ frisians = pgettext("frisians_ware", "It is smelted in a furnace to retrieve the iron."),
1034+ -- TRANSLATORS: Helptext for a ware: Iron Ore
1035+ empire = pgettext("empire_ware", "It is smelted in a smelting works to retrieve the iron.")
1036+
1037 }
1038 local result = ""
1039 if tribe then
1040
1041=== modified file 'data/tribes/wares/mead/helptexts.lua'
1042--- data/tribes/wares/mead/helptexts.lua 2018-02-17 15:41:29 +0000
1043+++ data/tribes/wares/mead/helptexts.lua 2019-05-13 05:46:56 +0000
1044@@ -1,7 +1,7 @@
1045 function ware_helptext(tribe)
1046 local helptext = {
1047 -- TRANSLATORS: Helptext for a ware: Mead
1048- frisians = pgettext("frisians_ware", "Mead is produced by mead breweries and used in drinking halls for producing meals. Soldiers drink mead during advanced training."),
1049+ frisians = pgettext("frisians_ware", "Mead is produced by mead breweries. Soldiers drink mead during advanced training."),
1050 }
1051 local result = ""
1052 if tribe then
1053
1054=== modified file 'src/graphic/CMakeLists.txt'
1055--- src/graphic/CMakeLists.txt 2019-05-04 15:37:33 +0000
1056+++ src/graphic/CMakeLists.txt 2019-05-13 05:46:56 +0000
1057@@ -104,8 +104,10 @@
1058 DEPENDS
1059 base_exceptions
1060 base_geometry
1061+ base_i18n
1062 base_log
1063 base_macros
1064+ graphic_text
1065 io_fileread
1066 io_filesystem
1067 )
1068
1069=== modified file 'src/graphic/gl/initialize.cc'
1070--- src/graphic/gl/initialize.cc 2019-04-09 16:43:49 +0000
1071+++ src/graphic/gl/initialize.cc 2019-05-13 05:46:56 +0000
1072@@ -24,10 +24,13 @@
1073
1074 #include <SDL.h>
1075 #include <boost/algorithm/string.hpp>
1076+#include <boost/format.hpp>
1077 #include <boost/regex.hpp>
1078
1079+#include "base/i18n.h"
1080 #include "base/macros.h"
1081 #include "graphic/gl/utils.h"
1082+#include "graphic/text/bidi.h"
1083
1084 namespace Gl {
1085
1086@@ -184,6 +187,21 @@
1087 reinterpret_cast<const char*>(glGetString(GL_SHADING_LANGUAGE_VERSION));
1088 log("Graphics: OpenGL: ShadingLanguage: \"%s\"\n", shading_language_version_string);
1089
1090+ // Show a basic SDL window with an error message, and log it too, then exit 1. Since font support does not exist for all languages, we show both the original and a localized text.
1091+ auto show_opengl_error_and_exit = [] (const std::string& message, const std::string& localized_message) {
1092+ std::string display_message = "";
1093+ if (message != localized_message) {
1094+ display_message = message + "\n\n" + (i18n::has_rtl_character(localized_message.c_str()) ? i18n::line2bidi(i18n::make_ligatures(localized_message.c_str()).c_str()) : localized_message);
1095+ } else {
1096+ display_message = message;
1097+ }
1098+
1099+ /** TRANSLATORS: Error message printed to console/command line/log file */
1100+ log(_("ERROR: %s\n"), display_message.c_str());
1101+ SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "OpenGL Error", display_message.c_str(), NULL);
1102+ exit(1);
1103+ };
1104+
1105 std::vector<std::string> shading_language_version_vector;
1106 boost::split(
1107 shading_language_version_vector, shading_language_version_string, boost::is_any_of("."));
1108@@ -196,12 +214,14 @@
1109 atoi(shading_language_version_vector.at(1).c_str());
1110 if (major_shading_language_version < 1 ||
1111 (major_shading_language_version == 1 && minor_shading_language_version < 20)) {
1112- log("ERROR: Shading language version is too old!\n");
1113- SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "OpenGL Error",
1114- "Widelands won’t work because your graphics driver is too old.\n"
1115- "The shading language needs to be version 1.20 or newer.",
1116- nullptr);
1117- exit(1);
1118+ show_opengl_error_and_exit("Widelands won’t work because your graphics driver is too old.\n"
1119+ "The shading language needs to be version 1.20 or newer.",
1120+ (boost::format("%s\n%s") %
1121+ /** TRANSLATORS: Basic error message when we can't handle the graphics driver. Font support is limited here, so do not use advanced typography **/
1122+ _("Widelands won’t work because your graphics driver is too old.") %
1123+ /** TRANSLATORS: Basic error message when we can't handle the graphics driver. Font support is limited here, so do not use advanced typography **/
1124+ _("The shading language needs to be version 1.20 or newer.")).str());
1125+
1126 }
1127 } else {
1128 // We don't have a minor version. Ensure that the string to compare is a valid integer before
1129@@ -210,25 +230,26 @@
1130 if (boost::regex_match(shading_language_version_string, re)) {
1131 const int major_shading_language_version = atoi(shading_language_version_string);
1132 if (major_shading_language_version < 2) {
1133- log("ERROR: Shading language version is too old!\n");
1134- SDL_ShowSimpleMessageBox(
1135- SDL_MESSAGEBOX_ERROR, "OpenGL Error",
1136- "Widelands won’t work because your graphics driver is too old.\n"
1137- "The shading language needs to be version 1.20 or newer.",
1138- nullptr);
1139- exit(1);
1140+ show_opengl_error_and_exit("Widelands won’t work because your graphics driver is too old.\n"
1141+ "The shading language needs to be version 1.20 or newer.",
1142+ (boost::format("%s\n%s") %
1143+ /** TRANSLATORS: Basic error message when we can't handle the graphics driver. Font support is limited here, so do not use advanced typography **/
1144+ _("Widelands won’t work because your graphics driver is too old.") %
1145+ /** TRANSLATORS: Basic error message when we can't handle the graphics driver. Font support is limited here, so do not use advanced typography **/
1146+ _("The shading language needs to be version 1.20 or newer.")).str());
1147+
1148 }
1149 } else {
1150 // Exit because we couldn't detect the shading language version, so there must be a problem
1151 // communicating with the graphics adapter.
1152- log("ERROR: Unable to detect the shading language version!\n");
1153- SDL_ShowSimpleMessageBox(
1154- SDL_MESSAGEBOX_ERROR, "OpenGL Error",
1155- "Widelands won't work because we were unable to detect the shading "
1156- "language version.\nThere is an unknown problem with reading the "
1157- "information from the graphics driver.",
1158- nullptr);
1159- exit(1);
1160+ show_opengl_error_and_exit("Widelands won't work because we were unable to detect the shading language version.\n"
1161+ "There is an unknown problem with reading the information from the graphics driver.",
1162+ (boost::format("%s\n%s") %
1163+ /** TRANSLATORS: Basic error message when we can't handle the graphics driver. Font support is limited here, so do not use advanced typography **/
1164+ _("Widelands won't work because we were unable to detect the shading language version.") %
1165+ /** TRANSLATORS: Basic error message when we can't handle the graphics driver. Font support is limited here, so do not use advanced typography **/
1166+ _("There is an unknown problem with reading the information from the graphics driver.")).str());
1167+
1168 }
1169 }
1170
1171
1172=== modified file 'src/logic/map_objects/tribes/productionsite.cc'
1173--- src/logic/map_objects/tribes/productionsite.cc 2019-05-05 14:05:07 +0000
1174+++ src/logic/map_objects/tribes/productionsite.cc 2019-05-13 05:46:56 +0000
1175@@ -302,7 +302,11 @@
1176
1177 if (uint32_t const nr_requests = nr_working_positions - nr_workers) {
1178 *s = (boost::format("<font color=%s>%s</font>") % UI_FONT_CLR_BAD.hex_value() %
1179- ngettext("Worker missing", "Workers missing", nr_requests))
1180+ (nr_requests == 1 ?
1181+ /** TRANSLATORS: Productivity label on a building if there is 1 worker missing */
1182+ _("Worker missing") :
1183+ /** TRANSLATORS: Productivity label on a building if there is more than 1 worker missing. If you need plural forms here, please let us know. */
1184+ _("Workers missing")))
1185 .str();
1186 return;
1187 }
1188
1189=== modified file 'src/logic/map_objects/tribes/worker.cc'
1190--- src/logic/map_objects/tribes/worker.cc 2019-05-04 10:47:44 +0000
1191+++ src/logic/map_objects/tribes/worker.cc 2019-05-13 05:46:56 +0000
1192@@ -985,7 +985,7 @@
1193 game,
1194 std::unique_ptr<Message>(new Message(Message::Type::kGeologists, game.get_gametime(),
1195 rdescr->descname(), rdescr->representative_image(),
1196- rdescr->descname(), message, position, serial_,
1197+ ri.descr().descname(), message, position, serial_,
1198 rdescr->name())),
1199 rdescr->timeout_ms(), rdescr->timeout_radius());
1200 }
1201
1202=== modified file 'src/ui_fsmenu/scenariodetails.cc'
1203--- src/ui_fsmenu/scenariodetails.cc 2019-04-24 01:33:04 +0000
1204+++ src/ui_fsmenu/scenariodetails.cc 2019-05-13 05:46:56 +0000
1205@@ -51,9 +51,14 @@
1206 .str());
1207
1208 if (scenariodata.playable) {
1209+ const std::string authors_heading = (scenariodata.authors.get_number() == 1) ?
1210+ /** TRANSLATORS: Label in campaign scenario details if there is 1 author */
1211+ _("Author") :
1212+ /** TRANSLATORS: Label in campaign scenario details if there is more than 1 author. If you need plural forms here, please let us know. */
1213+ _("Authors");
1214 std::string description =
1215 (boost::format("%s%s") %
1216- as_heading(ngettext("Author", "Authors", scenariodata.authors.get_number()),
1217+ as_heading(authors_heading,
1218 UI::PanelStyle::kFsMenu) %
1219 as_content(scenariodata.authors.get_names(), UI::PanelStyle::kFsMenu))
1220 .str();
1221
1222=== modified file 'src/wui/interactive_base.cc'
1223--- src/wui/interactive_base.cc 2019-05-04 05:37:07 +0000
1224+++ src/wui/interactive_base.cc 2019-05-13 05:46:56 +0000
1225@@ -51,7 +51,6 @@
1226 #include "sound/sound_handler.h"
1227 #include "wui/game_chat_menu.h"
1228 #include "wui/game_debug_ui.h"
1229-#include "wui/interactive_player.h"
1230 #include "wui/logmessage.h"
1231 #include "wui/mapviewpixelconstants.h"
1232 #include "wui/mapviewpixelfunctions.h"
1233@@ -223,22 +222,7 @@
1234 }
1235
1236 void InteractiveBase::set_sel_pos(Widelands::NodeAndTriangle<> const center) {
1237- const Map& map = egbase().map();
1238 sel_.pos = center;
1239-
1240- if (upcast(InteractiveGameBase const, igbase, this))
1241- if (upcast(Widelands::ProductionSite, productionsite, map[center.node].get_immovable())) {
1242- if (upcast(InteractivePlayer const, iplayer, igbase)) {
1243- const Widelands::Player& player = iplayer->player();
1244- if (!player.see_all() &&
1245- (1 >= player.vision(Widelands::Map::get_index(center.node, map.get_width())) ||
1246- player.is_hostile(*productionsite->get_owner())))
1247- return set_tooltip("");
1248- }
1249- set_tooltip(productionsite->info_string(Widelands::Building::InfoStringFormat::kTooltip));
1250- return;
1251- }
1252- set_tooltip("");
1253 }
1254
1255 /*
1256
1257=== modified file 'src/wui/interactive_gamebase.cc'
1258--- src/wui/interactive_gamebase.cc 2019-04-20 05:44:37 +0000
1259+++ src/wui/interactive_gamebase.cc 2019-05-13 05:46:56 +0000
1260@@ -40,6 +40,7 @@
1261 #include "wui/dismantlesitewindow.h"
1262 #include "wui/game_client_disconnected.h"
1263 #include "wui/game_summary.h"
1264+#include "wui/interactive_player.h"
1265 #include "wui/militarysitewindow.h"
1266 #include "wui/productionsitewindow.h"
1267 #include "wui/shipwindow.h"
1268@@ -139,6 +140,40 @@
1269 }
1270 }
1271
1272+void InteractiveGameBase::set_sel_pos(Widelands::NodeAndTriangle<> const center) {
1273+ InteractiveBase::set_sel_pos(center);
1274+
1275+ const Widelands::Map& map = egbase().map();
1276+
1277+ // If we have an immovable, we might want to show a tooltip
1278+ Widelands::BaseImmovable* imm = map[center.node].get_immovable();
1279+ if (imm == nullptr) {
1280+ return set_tooltip("");
1281+ }
1282+
1283+ // If we have a player, only show tooltips if he sees the field
1284+ const Widelands::Player* player = nullptr;
1285+ if (upcast(InteractivePlayer, iplayer, this)) {
1286+ player = iplayer->get_player();
1287+ if (player != nullptr && !player->see_all() &&
1288+ (1 >= player->vision(Widelands::Map::get_index(center.node, map.get_width())))) {
1289+ return set_tooltip("");
1290+ }
1291+ }
1292+
1293+ if (imm->descr().type() == Widelands::MapObjectType::IMMOVABLE) {
1294+ // Trees, Resource Indicators, fields ...
1295+ return set_tooltip(imm->descr().descname());
1296+ } else if (upcast(Widelands::ProductionSite, productionsite, imm)) {
1297+ // No productionsite tips for hostile players
1298+ if (player == nullptr || !player->is_hostile(*productionsite->get_owner())) {
1299+ return set_tooltip(productionsite->info_string(Widelands::Building::InfoStringFormat::kTooltip));
1300+ }
1301+ }
1302+ set_tooltip("");
1303+
1304+}
1305+
1306 /**
1307 * Called for every game after loading (from a savegame or just from a map
1308 * during single/multiplayer/scenario).
1309
1310=== modified file 'src/wui/interactive_gamebase.h'
1311--- src/wui/interactive_gamebase.h 2019-02-27 17:19:00 +0000
1312+++ src/wui/interactive_gamebase.h 2019-05-13 05:46:56 +0000
1313@@ -74,6 +74,8 @@
1314 // 'map_views', hence this function.
1315 virtual void draw_map_view(MapView* given_map_view, RenderTarget* dst) = 0;
1316
1317+ void set_sel_pos(Widelands::NodeAndTriangle<> const center) override;
1318+
1319 virtual void node_action(const Widelands::NodeAndTriangle<>& node_and_triangle) = 0;
1320 const PlayerType& get_playertype() const {
1321 return playertype_;
1322
1323=== modified file 'src/wui/mapdetails.cc'
1324--- src/wui/mapdetails.cc 2019-04-18 16:50:35 +0000
1325+++ src/wui/mapdetails.cc 2019-05-13 05:46:56 +0000
1326@@ -88,7 +88,7 @@
1327 // Show directory information
1328 if (mapdata.maptype == MapData::MapType::kDirectory) {
1329 name_label_.set_text(
1330- (boost::format("<rt>%s%s</rt>") % as_heading(_("Directory:"), style_, true) %
1331+ (boost::format("<rt>%s%s</rt>") % as_heading(_("Directory"), style_, true) %
1332 as_content(mapdata.localized_name, style_))
1333 .str());
1334 main_box_.set_size(main_box_.get_w(), get_h());
1335@@ -96,7 +96,7 @@
1336 } else { // Show map information
1337 name_label_.set_text(
1338 (boost::format("<rt>%s%s</rt>") %
1339- as_heading(mapdata.maptype == MapData::MapType::kScenario ? _("Scenario:") : _("Map:"),
1340+ as_heading(mapdata.maptype == MapData::MapType::kScenario ? _("Scenario") : _("Map"),
1341 style_, true) %
1342 as_content(localize_mapname ? mapdata.localized_name : mapdata.name, style_))
1343 .str());
1344@@ -122,8 +122,12 @@
1345 }
1346
1347 // Show map information
1348- std::string description =
1349- as_heading(ngettext("Author:", "Authors:", mapdata.authors.get_number()), style_);
1350+ const std::string authors_heading = (mapdata.authors.get_number() == 1) ?
1351+ /** TRANSLATORS: Label in map details if there is 1 author */
1352+ _("Author") :
1353+ /** TRANSLATORS: Label in map details if there is more than 1 author. If you need plural forms here, please let us know. */
1354+ _("Authors");
1355+ std::string description = as_heading(authors_heading, style_);
1356 description =
1357 (boost::format("%s%s") % description % as_content(mapdata.authors.get_names(), style_))
1358 .str();
1359@@ -133,19 +137,19 @@
1360 tags.push_back(localize_tag(tag));
1361 }
1362 std::sort(tags.begin(), tags.end());
1363- description = (boost::format("%s%s") % description % as_heading(_("Tags:"), style_)).str();
1364+ description = (boost::format("%s%s") % description % as_heading(_("Tags"), style_)).str();
1365 description = (boost::format("%s%s") % description %
1366 as_content(i18n::localize_list(tags, i18n::ConcatenateWith::COMMA), style_))
1367 .str();
1368
1369 description =
1370- (boost::format("%s%s") % description % as_heading(_("Description:"), style_)).str();
1371+ (boost::format("%s%s") % description % as_heading(_("Description"), style_)).str();
1372 description =
1373 (boost::format("%s%s") % description % as_content(mapdata.description, style_)).str();
1374
1375 if (!mapdata.hint.empty()) {
1376 /** TRANSLATORS: Map hint header when selecting a map. */
1377- description = (boost::format("%s%s") % description % as_heading(_("Hint:"), style_)).str();
1378+ description = (boost::format("%s%s") % description % as_heading(_("Hint"), style_)).str();
1379 description =
1380 (boost::format("%s%s") % description % as_content(mapdata.hint, style_)).str();
1381 }
1382
1383=== modified file 'src/wui/productionsitewindow.cc'
1384--- src/wui/productionsitewindow.cc 2019-02-23 11:00:49 +0000
1385+++ src/wui/productionsitewindow.cc 2019-05-13 05:46:56 +0000
1386@@ -96,8 +96,13 @@
1387 worker_table_ = new UI::Table<uintptr_t>(worker_box, 0, 0, 0, 100, UI::PanelStyle::kWui);
1388 worker_caps_ = new UI::Box(worker_box, 0, 0, UI::Box::Horizontal);
1389
1390- worker_table_->add_column(
1391- 210, (ngettext("Worker", "Workers", production_site->descr().nr_working_positions())));
1392+ const std::string workers_heading = (production_site->descr().nr_working_positions() == 1) ?
1393+ /** TRANSLATORS: Header in production site window if there is 1 worker */
1394+ _("Worker") :
1395+ /** TRANSLATORS: Header in production site window if there is more than 1 worker. If you need plural forms here, please let us know. */
1396+ _("Workers");
1397+
1398+ worker_table_->add_column(210, workers_heading);
1399 worker_table_->add_column(60, _("Exp"));
1400 worker_table_->add_column(150, _("Next Level"));
1401
1402@@ -122,7 +127,7 @@
1403 worker_box->add(worker_caps_, UI::Box::Resizing::kFullSize);
1404 get_tabs()->add(
1405 "workers", g_gr->images().get(pic_tab_workers), worker_box,
1406- (ngettext("Worker", "Workers", production_site->descr().nr_working_positions())));
1407+ workers_heading);
1408 update_worker_table(production_site);
1409 }
1410 think();
1411
1412=== modified file 'src/wui/suggested_teams_box.cc'
1413--- src/wui/suggested_teams_box.cc 2019-02-23 11:00:49 +0000
1414+++ src/wui/suggested_teams_box.cc 2019-05-13 05:46:56 +0000
1415@@ -87,7 +87,7 @@
1416 set_visible(true);
1417 suggested_teams_box_label_->set_visible(true);
1418 /** TRANSLATORS: Label for the list of suggested teams when choosing a map */
1419- suggested_teams_box_label_->set_text(_("Suggested Teams:"));
1420+ suggested_teams_box_label_->set_text(_("Suggested Teams"));
1421 int32_t teamlist_offset =
1422 suggested_teams_box_label_->get_y() + suggested_teams_box_label_->get_h() + padding_;
1423

Subscribers

People subscribed via source and target branches

to status/vote changes: