Merge lp:~widelands-dev/widelands/fh1-tutorial4 into lp:widelands

Proposed by GunChleoc
Status: Merged
Merged at revision: 8560
Proposed branch: lp:~widelands-dev/widelands/fh1-tutorial4
Merge into: lp:widelands
Diff against target: 544 lines (+119/-139)
2 files modified
data/campaigns/tutorial04_economy.wmf/scripting/texts.lua (+103/-139)
data/scripting/richtext.lua (+16/-0)
To merge this branch: bzr merge lp:~widelands-dev/widelands/fh1-tutorial4
Reviewer Review Type Date Requested Status
Klaus Halfmann Approve
kaputtnik (community) testing Approve
Review via email: mp+336171@code.launchpad.net

Commit message

Converted Tutorial 4 to new font renderer. Added new function "join_sentences(sentence1, sentence2)" to richtext.lua

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

Continuous integration builds have changed state:

Travis build 3063. State: failed. Details: https://travis-ci.org/widelands/widelands/builds/329643125.
Appveyor build 2870. State: failed. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_fh1_tutorial4-2870.

Revision history for this message
Klaus Halfmann (klaus-halfmann) wrote :

Travis had some trasient Issue only
> ... could not connect to ppa.launchpad.net:80 (91.189.95.83), connection timed out
> Unable to locate package g++-6

Same for appveyor:
> Fetching repository commit (0255238)...Error while copying content to a stream.

Code changes look straight forward, will compile and testplay this now.

Revision history for this message
kaputtnik (franku) wrote :

Tested with the fh1-tutorial2 branch and all LGTM :-)

review: Approve (testing)
Revision history for this message
Klaus Halfmann (klaus-halfmann) wrote :

Test this with
./wideland --scenario=/<AbsolutePathTo>widelands-repo/fh1-tutorial4/data/campaigns/tutorial04_economy.wmf/

kaputtnik: Did you test in English or in German?
I will then test the other variant.

Revision history for this message
kaputtnik (franku) wrote :

Oops, didn't test the objectives and there was one issue. In the 'Open the Ware Stastics window' part was a useless paragraphdivider(). I removed it and all looks good now.

Revision history for this message
kaputtnik (franku) wrote :

I have tested in english. The language shouldn't matter, as long the language has no special cases, imho.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 3070. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/330255719.
Appveyor build 2877. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_fh1_tutorial4-2877.

Revision history for this message
kaputtnik (franku) wrote :

Klaus, did you finished your test?

Revision history for this message
Klaus Halfmann (klaus-halfmann) wrote :

Yes finished in German and found a few missing translations only.
In trunk I found, that the help for bulding sites is some HTML only.

review: Approve (compile testplay)
Revision history for this message
kaputtnik (franku) wrote :

> In trunk I found, that the help for bulding sites is some HTML only.

This is another task, imho

Thanks for testing :-)

@bunnybot merge

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 3075. State: failed. Details: https://travis-ci.org/widelands/widelands/builds/331167754.
Appveyor build 2882. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_fh1_tutorial4-2882.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Refusing to merge, since Travis is not green. Use @bunnybot merge force for merging anyways.

Travis build 3075. State: failed. Details: https://travis-ci.org/widelands/widelands/builds/331167754.

Revision history for this message
Klaus Halfmann (klaus-halfmann) wrote :

Transient failure in Travis:

> Could not find compiler set in environment variable CC:
> clang-3.4.

No idea whats wrong there.

@bunnybot merge force

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'data/campaigns/tutorial04_economy.wmf/scripting/texts.lua'
--- data/campaigns/tutorial04_economy.wmf/scripting/texts.lua 2017-12-16 10:48:12 +0000
+++ data/campaigns/tutorial04_economy.wmf/scripting/texts.lua 2018-01-20 11:37:48 +0000
@@ -6,8 +6,7 @@
6-- Some formating functions6-- Some formating functions
7-- =========================7-- =========================
88
9include "scripting/formatting.lua"9include "scripting/richtext_scenarios.lua"
10include "scripting/format_scenario.lua"
1110
1211
13-- =============12-- =============
@@ -16,7 +15,7 @@
1615
17intro1 = {16intro1 = {
18 title = _"Your Economy and its Settings",17 title = _"Your Economy and its Settings",
19 body = rt(18 body = (
20 h1(_[[Economy]]) ..19 h1(_[[Economy]]) ..
21 p(_[[Welcome back. In this tutorial, I’ll tell you what you can do to check how well your economy works.]]) ..20 p(_[[Welcome back. In this tutorial, I’ll tell you what you can do to check how well your economy works.]]) ..
22 p(_[[Building your economy up and making it work well and grow is the main part of Widelands. But you can’t control the workers directly – they will follow the general conditions you set.]]) ..21 p(_[[Building your economy up and making it work well and grow is the main part of Widelands. But you can’t control the workers directly – they will follow the general conditions you set.]]) ..
@@ -29,7 +28,7 @@
29 position = "topright",28 position = "topright",
30 field = field_near_border,29 field = field_near_border,
31 title = _"A Peaceful Land",30 title = _"A Peaceful Land",
32 body = rt(31 body = (
33 p(_[[Now about the map: you have settled in a nice valley between two mountains, rich in marble, iron ore and coal. All were hoping for a peaceful life.]]) ..32 p(_[[Now about the map: you have settled in a nice valley between two mountains, rich in marble, iron ore and coal. All were hoping for a peaceful life.]]) ..
34 p(_[[But one day, you discovered a barren wasteland with abandoned buildings in the east. A strange aura came from there, and no one wanted to set foot there. But the border could not be left undefended, and so you constructed three castles.]]) ..33 p(_[[But one day, you discovered a barren wasteland with abandoned buildings in the east. A strange aura came from there, and no one wanted to set foot there. But the border could not be left undefended, and so you constructed three castles.]]) ..
35 p(_[[You had not been prepared for war, and you have to hurry now to build up an army.]])34 p(_[[You had not been prepared for war, and you have to hurry now to build up an army.]])
@@ -40,7 +39,7 @@
40tavern_burnt_down = {39tavern_burnt_down = {
41 position = "topright",40 position = "topright",
42 title = _"The Tavern is Burning!",41 title = _"The Tavern is Burning!",
43 body = rt(42 body = (
44 h1(_[[An accident]]) ..43 h1(_[[An accident]]) ..
45 p(_[[Oh no, look at this: our tavern is burning! In all the hurry, our innkeeper accidentally dropped a torch. She is fine, but we could not extinguish the fire in time.]])44 p(_[[Oh no, look at this: our tavern is burning! In all the hurry, our innkeeper accidentally dropped a torch. She is fine, but we could not extinguish the fire in time.]])
46 ),45 ),
@@ -51,59 +50,51 @@
51building_stat = {50building_stat = {
52 position = "topright",51 position = "topright",
53 title = _"Building statistics",52 title = _"Building statistics",
54 body = rt(53 body = (
55 h1(_[[Check out your taverns]]) ..54 h1(_[[Check out your taverns]]) ..
56 p(_[[At first, we should find out how many taverns we currently have. Widelands offers you a window where you can easily check this.]])55 p(_[[At first, we should find out how many taverns we currently have. Widelands offers you a window where you can easily check this.]]) ..
57 ) ..56 li_image("images/wui/menus/menu_toggle_menu.png", _[[First, you will have to open the statistics menu (you can find the corresponding button at the bottom). We will need this menu several times.]]) ..
58 rt("image=images/wui/menus/menu_toggle_menu.png",p(_[[First, you will have to open the statistics menu (you can find the corresponding button at the bottom). We will need this menu several times.]])) ..57 li_image("images/wui/menus/menu_building_stats.png", _[[Afterwards, choose the ‘Building statistics’.]]) ..
59 rt("image=images/wui/menus/menu_building_stats.png",p(_[[Afterwards, choose the ‘Building statistics’.]]) ..58 li(_[[Open the building statistics window.]]) ..
60 paragraphdivider() ..59 li_arrow(_[[You can also use the hotkey ‘b’.]])
61 listitem_bullet(_[[Open the building statistics window.]]) ..
62 listitem_arrow(_[[You can also use the hotkey ‘b’.]])
63 ),60 ),
64 h = 350,61 h = 350,
65 obj_name = "open_building_stat",62 obj_name = "open_building_stat",
66 obj_title = _"Open the building statistics window.",63 obj_title = _"Open the building statistics window.",
67 obj_body =64 obj_body =
68 rt("image=images/wui/menus/menu_building_stats.png", p(_[[The building statistics window gives you an overview over the buildings you have.]])) ..65 li_image("images/wui/menus/menu_building_stats.png", _[[The building statistics window gives you an overview over the buildings you have.]]) ..
69 rt(
70 paragraphdivider() ..
71 -- TRANSLATORS: "it" refers to the building statistics window66 -- TRANSLATORS: "it" refers to the building statistics window
72 listitem_bullet(_[[Open it. You can access it from the statistics menu.]]) ..67 li(_[[Open it. You can access it from the statistics menu.]]) ..
73 listitem_arrow(_[[The statistics menu is accessed via the second button at the bottom. It provides several windows that give you information about the game.]])68 li_arrow(_[[The statistics menu is accessed via the second button at the bottom. It provides several windows that give you information about the game.]])
74 )
75}69}
7670
77explain_building_stat = {71explain_building_stat = {
78 title = _"Building Statistics",72 title = _"Building Statistics",
79 body = rt(73 body = (
80 p(_[[This is the building statistics window. It shows you all buildings you can own, sorted by their size.]]) ..74 p(_[[This is the building statistics window. It shows you all buildings you can own, sorted by their size.]]) ..
81 p(_[[Let me now explain what all those numbers mean:]]) ..75 p(_[[Let me now explain what all those numbers mean:]]) ..
82 paragraphdivider() ..76 li(_[[‘2/1’ below the quarry: This means that you have two quarries, plus another one which is under construction.]]) ..
83 listitem_bullet(_[[‘2/1’ below the quarry: This means that you have two quarries, plus another one which is under construction.]]) ..77 li(_[[‘0%’: This indicates the average productivity of all buildings of that type. You have just started this game, therefore none of your buildings has done any work yet, but they are going to start working soon.]]) ..
84 listitem_bullet(_[[‘0%’: This indicates the average productivity of all buildings of that type. You have just started this game, therefore none of your buildings has done any work yet, but they are going to start working soon.]]) ..78 li(_[[‘2/4’ below your sentry: For military buildings, the stationed soldiers are shown instead of a productivity. You want to have four soldiers in your sentries, but only two soldiers are stationed in this kind of building. This leaves two vacant positions – we really need more soldiers.]]) ..
85 listitem_bullet(_[[‘2/4’ below your sentry: For military buildings, the stationed soldiers are shown instead of a productivity. You want to have four soldiers in your sentries, but only two soldiers are stationed in this kind of building. This leaves two vacant positions – we really need more soldiers.]]) ..79 li_arrow(_[[In both cases, the color (green - yellow - red) signals you how good the value is.]]) ..
86 listitem_arrow(_[[In both cases, the color (green - yellow - red) signals you how good the value is.]]) ..80 li(_[[If you click on a building, you can scroll through the buildings of the selected type.]]) ..
87 listitem_bullet(_[[If you click on a building, you can scroll through the buildings of the selected type.]]) ..81 li(_[[If you don’t have any building of a particular building type, it will be shown greyed out.]]) ..
88 listitem_bullet(_[[If you don’t have any building of a particular building type, it will be shown greyed out.]])
89 ) ..
90 rt(
91 h2(_[[Now it’s your turn]]) ..82 h2(_[[Now it’s your turn]]) ..
92 p(_[[This is enough explanation for now. Now try it out yourself. We want to know whether we still have taverns, so you have to choose the ‘Medium buildings’ tab. Close the building statistics menu afterwards.]])83 p(_[[This is enough explanation for now. Now try it out yourself. We want to know whether we still have taverns, so you have to choose the ‘Medium buildings’ tab. Close the building statistics menu afterwards.]])
93 ),84 ),
94 obj_name = "check_taverns",85 obj_name = "check_taverns",
95 obj_title = _"Look up how many taverns you have.",86 obj_title = _"Look up how many taverns you have.",
96 obj_body = rt(87 obj_body = (
97 listitem_bullet(_[[Choose the ‘Medium buildings’ tab in the building statistics window.]]) ..88 li(_[[Choose the ‘Medium buildings’ tab in the building statistics window.]]) ..
98 listitem_bullet(_[[Look up how many taverns you have.]]) ..89 li(_[[Look up how many taverns you have.]]) ..
99 listitem_arrow(_[[Below every building, there are two lines. The first one shows the number of buildings you own and how many are under construction. The second line shows the average productivity if it is a production site or training site, or the stationed and desired soldiers in military buildings.]]) ..90 li_arrow(_[[Below every building, there are two lines. The first one shows the number of buildings you own and how many are under construction. The second line shows the average productivity if it is a production site or training site, or the stationed and desired soldiers in military buildings.]]) ..
100 listitem_bullet(_[[Close the building statistics window when you are done.]])91 li(_[[Close the building statistics window when you are done.]])
101 )92 )
102}93}
10394
104reopen_building_stat = {95reopen_building_stat = {
105 title = _"You closed the building statistics window!",96 title = _"You closed the building statistics window!",
106 body = rt(97 body = (
107 p(_[[You have closed the building statistics window. I didn’t notice that you switched to the medium buildings to look up the number of taverns. Would you please be so nice and show it to me?]])98 p(_[[You have closed the building statistics window. I didn’t notice that you switched to the medium buildings to look up the number of taverns. Would you please be so nice and show it to me?]])
108 ),99 ),
109 show_instantly = true,100 show_instantly = true,
@@ -114,11 +105,10 @@
114reopen_building_stat_obj = {105reopen_building_stat_obj = {
115 obj_name = "open_building_stat_again",106 obj_name = "open_building_stat_again",
116 obj_title = _"Open the building statistics window again.",107 obj_title = _"Open the building statistics window again.",
117 obj_body = rt(108 obj_body = (
118 p(_[[You closed the building statistics window, although you have not yet looked up the number of taverns.]]) ..109 p(_[[You closed the building statistics window, although you have not yet looked up the number of taverns.]]) ..
119 paragraphdivider() ..
120 -- TRANSLATORS: "it" refers to the building statistics window.110 -- TRANSLATORS: "it" refers to the building statistics window.
121 listitem_bullet(_[[Please reopen it and choose the second tab (medium buildings).]])111 li(_[[Please reopen it and choose the second tab (medium buildings).]])
122 ),112 ),
123 h = 250113 h = 250
124}114}
@@ -126,50 +116,45 @@
126inventory1 = {116inventory1 = {
127 position = "topright",117 position = "topright",
128 title = _"Stock",118 title = _"Stock",
129 body = rt(119 body = (
130 h1(_[[Check for rations]]) ..120 h1(_[[Check for rations]]) ..
131 p(_[[OK. In the list, you’ve seen that you have no more taverns or inns. That means that you’re not producing any rations. But let’s see what we still have in stock.]])121 p(_[[OK. In the list, you’ve seen that you have no more taverns or inns. That means that you’re not producing any rations. But let’s see what we still have in stock.]]) ..
132 ) ..122 li_image("images/wui/menus/menu_stock.png", _[[Click on the ‘Stock’ button.]]) ..
133 rt("image=images/wui/menus/menu_stock.png",p(_[[Click on the ‘Stock’ button.]])) ..123 li_arrow(_[[You can also use the hotkey ‘i’ (as in ‘inventory’) to access this window quickly.]])
134 rt(
135 paragraphdivider() ..
136 listitem_arrow(_[[You can also use the hotkey ‘i’ (as in ‘inventory’) to access this window quickly.]])
137 ),124 ),
138 h = 300,125 h = 300,
139 obj_name = "open_inventory",126 obj_name = "open_inventory",
140 obj_title = _"Open your stock window.",127 obj_title = _"Open your stock window.",
141 obj_body = rt(128 obj_body = (
142 p(_[[The stock menu window gives you an overview over the wares you currently have.]]) ..129 p(_[[The stock menu window gives you an overview over the wares you currently have.]]) ..
143 paragraphdivider() ..
144 -- TRANSLATORS: "it" refers to the stock menu window130 -- TRANSLATORS: "it" refers to the stock menu window
145 listitem_bullet(_[[Open it. You can access it from the statistics menu.]]) ..131 li(_[[Open it. You can access it from the statistics menu.]]) ..
146 listitem_arrow(_[[The statistics menu is accessed via the second button at the bottom. It provides several windows that give you information about the game.]])132 li_arrow(_[[The statistics menu is accessed via the second button at the bottom. It provides several windows that give you information about the game.]])
147 )133 )
148}134}
149135
150inventory2 = {136inventory2 = {
151 title = _"Stock",137 title = _"Stock",
152 body = rt(138 body = (
153 p(_[[The stock menu window has four tabs. The first (and currently selected) one shows you all your current wares, including those on roads, at flags and inside buildings waiting for processing.]]) ..139 p(_[[The stock menu window has four tabs. The first (and currently selected) one shows you all your current wares, including those on roads, at flags and inside buildings waiting for processing.]]) ..
154 p(_[[Looking at the rations, there are currently only five in total, probably on their way to somewhere. Five rations are not much for such a big economy.]]) ..140 p(_[[Looking at the rations, there are currently only five in total, probably on their way to somewhere. Five rations are not much for such a big economy.]]) ..
155 p(_[[The second tab shows you all your workers, again those on roads and in buildings summed up.]]) ..141 p(_[[The second tab shows you all your workers, again those on roads and in buildings summed up.]]) ..
156 p(_[[Now have a look at these two tabs. When you click on the]])) ..142 p(_[[Now have a look at these two tabs. When you click on the]]) ..
157 rt("image=images/wui/stats/menu_tab_wares_warehouse.png",p(_[[third tab (‘Wares in warehouses’), I’ll continue.]])143 li_image("images/wui/stats/menu_tab_wares_warehouse.png", _[[third tab (‘Wares in warehouses’), I’ll continue.]])
158 ),144 ),
159 h = 350,145 h = 350,
160 show_instantly = true,146 show_instantly = true,
161 obj_name = "switch_stock_tab",147 obj_name = "switch_stock_tab",
162 obj_title = _"Switch to the third tab in the stock menu window.",148 obj_title = _"Switch to the third tab in the stock menu window.",
163 obj_body = rt(149 obj_body = (
164 p(_[[Have a look at the first two tabs in the stock menu window. They show all the wares and workers you have.]]) ..150 p(_[[Have a look at the first two tabs in the stock menu window. They show all the wares and workers you have.]]) ..
165 paragraphdivider() ..151 li(_[[When you have seen enough, switch to the third tab.]])
166 listitem_bullet(_[[When you have seen enough, switch to the third tab.]])
167 ),152 ),
168}153}
169154
170inventory3 = {155inventory3 = {
171 title = _"Stock",156 title = _"Stock",
172 body = rt(157 body = (
173 p(_[[The third tab shows you the wares that are stored in your headquarters, your warehouses and ports. They are not needed anywhere and are therefore your reserve.]]) ..158 p(_[[The third tab shows you the wares that are stored in your headquarters, your warehouses and ports. They are not needed anywhere and are therefore your reserve.]]) ..
174 p(_[[The fourth tab shows the same thing for workers.]]) ..159 p(_[[The fourth tab shows the same thing for workers.]]) ..
175 p(_[[The third tab tells you that there are no rations left in your headquarters – that’s not good!]])160 p(_[[The third tab tells you that there are no rations left in your headquarters – that’s not good!]])
@@ -180,7 +165,7 @@
180165
181reopen_stock_menu = {166reopen_stock_menu = {
182 title = _"You closed the stock window!",167 title = _"You closed the stock window!",
183 body = rt(168 body = (
184 p(_[[You have closed the stock menu window, but I have not yet finished with my explanation. Would you please reopen it and choose the third tab?]])169 p(_[[You have closed the stock menu window, but I have not yet finished with my explanation. Would you please reopen it and choose the third tab?]])
185 ),170 ),
186 show_instantly = true,171 show_instantly = true,
@@ -191,11 +176,10 @@
191reopen_stock_menu_obj = {176reopen_stock_menu_obj = {
192 obj_name = "open_stock_menu_again",177 obj_name = "open_stock_menu_again",
193 obj_title = _"Open the stock window again.",178 obj_title = _"Open the stock window again.",
194 obj_body = rt(179 obj_body = (
195 p(_[[You closed the stock menu window before I finished telling you everything about it. If you already know everything, please feel free to leave this tutorial at any time.]]) ..180 p(_[[You closed the stock menu window before I finished telling you everything about it. If you already know everything, please feel free to leave this tutorial at any time.]]) ..
196 paragraphdivider() ..
197 -- TRANSLATORS: "it" refers to the stock menu window.181 -- TRANSLATORS: "it" refers to the stock menu window.
198 listitem_bullet(_[[Otherwise, please reopen it and choose the third tab.]])182 li(_[[Otherwise, please reopen it and choose the third tab.]])
199 ),183 ),
200 h = 250184 h = 250
201}185}
@@ -203,30 +187,27 @@
203build_taverns = {187build_taverns = {
204 position = "topright",188 position = "topright",
205 title = _"New taverns",189 title = _"New taverns",
206 body = rt(190 body = (
207 h1(_[[We need new taverns]]) ..191 h1(_[[We need new taverns]]) ..
208 p(_[[Now that you have an overview, you should act. I think we should build more than one tavern – two or three are better. Remember: as long as we don’t produce rations, our miners won’t dig for ore. And without iron, we cannot forge a single helm.]]) ..192 p(_[[Now that you have an overview, you should act. I think we should build more than one tavern – two or three are better. Remember: as long as we don’t produce rations, our miners won’t dig for ore. And without iron, we cannot forge a single helm.]]) ..
209 paragraphdivider() ..193 li(_[[Build at least two taverns.]])
210 listitem_bullet(_[[Build at least two taverns.]])
211 ),194 ),
212 h = 300,195 h = 300,
213 obj_name = "build_taverns",196 obj_name = "build_taverns",
214 obj_title = _"Build new taverns.",197 obj_title = _"Build new taverns.",
215 obj_body = rt(198 obj_body = (
216 p(_[[To make our mines work, we need rations again – the more, the better.]]) ..199 p(_[[To make our mines work, we need rations again – the more, the better.]]) ..
217 paragraphdivider() ..200 li(_[[Build at least two taverns.]])
218 listitem_bullet(_[[Build at least two taverns.]])
219 )201 )
220}202}
221203
222ware_encyclopedia = {204ware_encyclopedia = {
223 title = _"Ware Encyclopedia",205 title = _"Ware Encyclopedia",
224 body = rt(206 body = (
225 p(_[[I am not sure if you could follow my remarks. Why do we need rations to get soldiers?]]) ..207 p(_[[I am not sure if you could follow my remarks. Why do we need rations to get soldiers?]]) ..
226 p(_[[When you’ve played a lot, you will know such things by heart. But when you’re unsure what this tribe needs for a special ware, you can easily look it up in your tribe’s ware encyclopedia.]]) ..208 p(_[[When you’ve played a lot, you will know such things by heart. But when you’re unsure what this tribe needs for a special ware, you can easily look it up in your tribe’s ware encyclopedia.]]) ..
227 p(_[[This encyclopedia can be accessed via]])209 p(_[[This encyclopedia can be accessed via]])..
228 ) ..210 li_image("images/ui_basic/menu_help.png", _[[the help button at the bottom. For all your tribe’s wares, it shows a short help text, a list of buildings that produces the ware and the needed wares.]]) ..
229 rt("image=images/ui_basic/menu_help.png",p(_[[the help button at the bottom. For all your tribe’s wares, it shows a short help text, a list of buildings that produces the ware and the needed wares.]]) ..
230 p(_[[If you want, you can try it out. A soldier needs a wooden spear and a helmet – from there on out, you can search backwards.]])211 p(_[[If you want, you can try it out. A soldier needs a wooden spear and a helmet – from there on out, you can search backwards.]])
231 ),212 ),
232 h = 350213 h = 350
@@ -235,7 +216,7 @@
235building_priority_settings = {216building_priority_settings = {
236 position = "topright",217 position = "topright",
237 title = _"Priority Settings",218 title = _"Priority Settings",
238 body = rt(219 body = (
239 h1(_[[Send the wares where they’re needed]]) ..220 h1(_[[Send the wares where they’re needed]]) ..
240 p(_[[Great. Our taverns have now been built up and are supplying us with rations.]]) ..221 p(_[[Great. Our taverns have now been built up and are supplying us with rations.]]) ..
241 p(_[[At the moment, all mines are supplied with rations. If you want to prioritize a special mine, you simply have to open its window. In the wares tab, behind every ware, you can see ‘traffic lights’.]]) ..222 p(_[[At the moment, all mines are supplied with rations. If you want to prioritize a special mine, you simply have to open its window. In the wares tab, behind every ware, you can see ‘traffic lights’.]]) ..
@@ -249,83 +230,75 @@
249ware_stats1 = {230ware_stats1 = {
250 position = "top",231 position = "top",
251 title = _"Ware Statistics",232 title = _"Ware Statistics",
252 body = rt(233 body = (
253 p(_[[In the statistics menu, there is also a]])) ..234 p(_[[In the statistics menu, there is also a]]) ..
254 rt("image=images/wui/menus/menu_ware_stats.png",p(_[[‘Ware statistics’ button.]])) ..235 li_image("images/wui/menus/menu_ware_stats.png", _[[‘Ware statistics’ button.]]) ..
255 rt(paragraphdivider() ..
256 -- TRANSLATORS: "it" refers to the ware statistics button236 -- TRANSLATORS: "it" refers to the ware statistics button
257 listitem_bullet(_[[Click on it.]])237 li(_[[Click on it.]])
258 ),238 ),
259 w = 200,239 w = 200,
260 h = 200,240 h = 200,
261 obj_name = "open_ware_stat",241 obj_name = "open_ware_stat",
262 obj_title = _"Open the ware statistics window.",242 obj_title = _"Open the ware statistics window.",
263 obj_body = rt(243 obj_body = (
264 paragraphdivider() ..244 li(_[[Open the ‘Ware statistics’ window, accessed via the statistics menu.]])
265 listitem_bullet(_[[Open the ‘Ware statistics’ window, accessed via the statistics menu.]])
266 )245 )
267}246}
268247
269ware_stats2 = {248ware_stats2 = {
270 title = _"Ware Statistics",249 title = _"Ware Statistics",
271 body = rt(250 body = (
272 p(_[[In this menu window, you can select wares to see how their production or consumption has changed over time. Try it out with some wares.]]) ..251 p(_[[In this menu window, you can select wares to see how their production or consumption has changed over time. Try it out with some wares.]]) ..
273 paragraphdivider() ..252 li(_[[I’ll continue as soon as you click on the]]) ..
274 listitem_bullet(_[[I’ll continue as soon as you click on the]])) ..253 li_image("images/wui/stats/menu_tab_wares_econ_health.png", _[[third tab (‘Economy health’).]])
275 rt("image=images/wui/stats/menu_tab_wares_econ_health.png",p(_[[third tab (‘Economy health’).]])
276 ),254 ),
277 h = 250,255 h = 250,
278 show_instantly = true,256 show_instantly = true,
279 obj_name = "switch_ware_stat_tab_to_third",257 obj_name = "switch_ware_stat_tab_to_third",
280 obj_title = _"Switch to the third tab in the ware statistics menu window.",258 obj_title = _"Switch to the third tab in the ware statistics menu window.",
281 obj_body = rt(259 obj_body = (
282 p(_[[The first two tabs show you the production and consumption of any ware. You can toggle them by simply clicking on them.]]) ..260 p(_[[The first two tabs show you the production and consumption of any ware. You can toggle them by simply clicking on them.]]) ..
283 paragraphdivider() ..261 li(_[[When you have seen enough, switch to the third tab.]])
284 listitem_bullet(_[[When you have seen enough, switch to the third tab.]])
285 )262 )
286}263}
287264
288ware_stats3 = {265ware_stats3 = {
289 title = _"Ware Statistics",266 title = _"Ware Statistics",
290 body = rt(267 body = (
291 p(_[[In this tab, you can see the difference between production and consumption, called ‘economy health’. You can see at one glance which one of those two is higher for the selected ware, that means whether the amount increases or decreases.]]) ..268 p(_[[In this tab, you can see the difference between production and consumption, called ‘economy health’. You can see at one glance which one of those two is higher for the selected ware, that means whether the amount increases or decreases.]]) ..
292 p(_[[Now try this out. You can also compare it with the two previous tabs.]]) ..269 p(_[[Now try this out. You can also compare it with the two previous tabs.]]) ..
293 paragraphdivider() ..270 li(_[[Click on the last tab when I should continue.]])
294 listitem_bullet(_[[Click on the last tab when I should continue.]])
295 ),271 ),
296 h = 250,272 h = 250,
297 show_instantly = true,273 show_instantly = true,
298 obj_name = "switch_ware_stat_tab_to_forth",274 obj_name = "switch_ware_stat_tab_to_forth",
299 obj_title = _"Switch to the last tab in the ware statistics menu window.",275 obj_title = _"Switch to the last tab in the ware statistics menu window.",
300 obj_body = rt(276 obj_body = (
301 p(_[[The third tab shows you the economy health of the ware. When the value is positive, this means your stock is growing.]]) ..277 p(_[[The third tab shows you the economy health of the ware. When the value is positive, this means your stock is growing.]]) ..
302 paragraphdivider() ..278 li(_[[When you have seen enough, switch to the fourth tab.]])
303 listitem_bullet(_[[When you have seen enough, switch to the fourth tab.]])
304 )279 )
305}280}
306281
307ware_stats4 = {282ware_stats4 = {
308 title = _"Ware Statistics",283 title = _"Ware Statistics",
309 body = rt(284 body = (
310 p(_[[In the last tab, you can also see your absolute stock. It will increase when the economy health is positive, and decrease otherwise. Compare the two graphs!]]) ..285 p(_[[In the last tab, you can also see your absolute stock. It will increase when the economy health is positive, and decrease otherwise. Compare the two graphs!]]) ..
311 p(_[[The last two tabs are good indicators to see whether shortages are about to come. Don’t forget to check them regularly!]]) ..286 p(_[[The last two tabs are good indicators to see whether shortages are about to come. Don’t forget to check them regularly!]]) ..
312 paragraphdivider() ..287 li(_[[Close this window when you’re done.]])
313 listitem_bullet(_[[Close this window when you’re done.]])
314 ),288 ),
315 h = 250,289 h = 250,
316 show_instantly = true,290 show_instantly = true,
317 obj_name = "close_ware_stats",291 obj_name = "close_ware_stats",
318 obj_title = _"Close the ware statistics window.",292 obj_title = _"Close the ware statistics window.",
319 obj_body = rt(293 obj_body = (
320 p(_[[The stock tab shows you how many wares you have. Compare the information from the four tabs to understand the correlation.]]) ..294 p(_[[The stock tab shows you how many wares you have. Compare the information from the four tabs to understand the correlation.]]) ..
321 paragraphdivider() ..295 li(_[[When you have finished, close the ware statistics window.]])
322 listitem_bullet(_[[When you have finished, close the ware statistics window.]])
323 ),296 ),
324}297}
325298
326reopen_ware_stats1 = {299reopen_ware_stats1 = {
327 title = _"You closed the ware statistics window!",300 title = _"You closed the ware statistics window!",
328 body = rt(301 body = (
329 p(_[[You have closed the ware statistics menu window, but I have not yet finished with my explanation. Would you please reopen it and choose the third tab?]])302 p(_[[You have closed the ware statistics menu window, but I have not yet finished with my explanation. Would you please reopen it and choose the third tab?]])
330 ),303 ),
331 show_instantly = true,304 show_instantly = true,
@@ -336,17 +309,16 @@
336reopen_ware_stats1_obj = {309reopen_ware_stats1_obj = {
337 obj_name = "open_ware_stats_menu_again1",310 obj_name = "open_ware_stats_menu_again1",
338 obj_title = _"Open the ware statistics window again.",311 obj_title = _"Open the ware statistics window again.",
339 obj_body = rt(312 obj_body = (
340 p(_[[You closed the ware statistics menu window before I finished telling you everything about it. If you already know everything, please feel free to leave this tutorial at any time.]]) ..313 p(_[[You closed the ware statistics menu window before I finished telling you everything about it. If you already know everything, please feel free to leave this tutorial at any time.]]) ..
341 paragraphdivider() ..
342 -- TRANSLATORS: "it" refers to the ware statistics window.314 -- TRANSLATORS: "it" refers to the ware statistics window.
343 listitem_bullet(_[[Otherwise, please reopen it and choose the third tab.]])315 li(_[[Otherwise, please reopen it and choose the third tab.]])
344 )316 )
345}317}
346318
347reopen_ware_stats2 = {319reopen_ware_stats2 = {
348 title = _"You closed the ware statistics window!",320 title = _"You closed the ware statistics window!",
349 body = rt(321 body = (
350 p(_[[You have closed the ware statistics menu window, but I have not yet finished with my explanation. Would you please reopen it and choose the fourth tab?]])322 p(_[[You have closed the ware statistics menu window, but I have not yet finished with my explanation. Would you please reopen it and choose the fourth tab?]])
351 ),323 ),
352 show_instantly = true,324 show_instantly = true,
@@ -357,39 +329,35 @@
357reopen_ware_stats2_obj = {329reopen_ware_stats2_obj = {
358 obj_name = "open_ware_stats_menu_again2",330 obj_name = "open_ware_stats_menu_again2",
359 obj_title = _"Open the ware statistics window again.",331 obj_title = _"Open the ware statistics window again.",
360 obj_body = rt(332 obj_body = (
361 p(_[[You closed the ware statistics menu window before I finished telling you everything about it. If you already know everything, please feel free to leave this tutorial at any time.]]) ..333 p(_[[You closed the ware statistics menu window before I finished telling you everything about it. If you already know everything, please feel free to leave this tutorial at any time.]]) ..
362 paragraphdivider() ..
363 -- TRANSLATORS: "it" refers to the ware statistics window.334 -- TRANSLATORS: "it" refers to the ware statistics window.
364 listitem_bullet(_[[Otherwise, please reopen it and choose the fourth tab.]])335 li(_[[Otherwise, please reopen it and choose the fourth tab.]])
365 )336 )
366}337}
367338
368economy_settings1 = {339economy_settings1 = {
369 position = "topright",340 position = "topright",
370 title = _"Economy options",341 title = _"Economy options",
371 body = rt(342 body = (
372 p(_[[I’ve shown you our stock menu window, where you could see which wares are at the warehouses. You remember?]]) ..343 p(_[[I’ve shown you our stock menu window, where you could see which wares are at the warehouses. You remember?]]) ..
373 p(_[[Now I’ll tell you how you can determine how many wares you want to have. The menu window for this purpose can be accessed via any flag and is called ‘Configure economy’.]])) ..344 p(_[[Now I’ll tell you how you can determine how many wares you want to have. The menu window for this purpose can be accessed via any flag and is called ‘Configure economy’.]]) ..
374 -- Yup, that's indeed the correct icon345 -- Yup, that's indeed the correct icon
375 rt("image=images/wui/stats/genstats_nrwares.png",p(_[[This is the icon.]])) ..346 li_image("images/wui/stats/genstats_nrwares.png", _[[This is the icon.]]) ..
376 rt(347 li(_[[Open this window.]])
377 paragraphdivider() ..
378 listitem_bullet(_[[Open this window.]])
379 ),348 ),
380 h = 350,349 h = 350,
381 obj_name = "open_economy_settings",350 obj_name = "open_economy_settings",
382 obj_title = _"Open the ‘Configure economy’ window.",351 obj_title = _"Open the ‘Configure economy’ window.",
383 obj_body = rt(352 obj_body = (
384 paragraphdivider() ..353 li(_[[Open the ‘Configure economy’ window.]]) ..
385 listitem_bullet(_[[Open the ‘Configure economy’ window.]]) ..354 li_arrow(_[[The window can be accessed by clicking on any flag you own.]])
386 listitem_arrow(_[[The window can be accessed by clicking on any flag you own.]])
387 )355 )
388}356}
389357
390economy_settings2 = {358economy_settings2 = {
391 title = _"Economy options",359 title = _"Economy options",
392 body = rt(360 body = (
393 p(_[[This window looks similar to the stock window, but it has additional buttons at the bottom.]]) ..361 p(_[[This window looks similar to the stock window, but it has additional buttons at the bottom.]]) ..
394 p(_[[You first have to select one or more wares (you can also left-click and drag). Then you can set the desired target quantity for the selected wares.]]) ..362 p(_[[You first have to select one or more wares (you can also left-click and drag). Then you can set the desired target quantity for the selected wares.]]) ..
395 p(_[[Most buildings will only produce something when the stock level in your warehouses falls below the target quantity, so you should indicate the reserve you want to stockpile.]]) ..363 p(_[[Most buildings will only produce something when the stock level in your warehouses falls below the target quantity, so you should indicate the reserve you want to stockpile.]]) ..
@@ -401,21 +369,19 @@
401369
402economy_settings3 = {370economy_settings3 = {
403 title = _"Economy options",371 title = _"Economy options",
404 body = rt(372 body = (
405 p(_[[By changing the target quantity, you can therefore decide which wares/tools your resources (in this case: iron) should be turned into or whether you would like to save your iron and wait until you know what you will need it for.]]) ..373 p(_[[By changing the target quantity, you can therefore decide which wares/tools your resources (in this case: iron) should be turned into or whether you would like to save your iron and wait until you know what you will need it for.]]) ..
406 p(_[[Only buildings that consume wares care about this setting. Buildings that produce wares for free (e.g. your farms or wells) will always keep working.]]) ..374 p(_[[Only buildings that consume wares care about this setting. Buildings that produce wares for free (e.g. your farms or wells) will always keep working.]]) ..
407 p(_[[Now let’s try it out: the current target quantity for marble columns is 10. Increase it to be prepared in case you will have to build up your fortifications quickly.]]) ..375 p(_[[Now let’s try it out: the current target quantity for marble columns is 10. Increase it to be prepared in case you will have to build up your fortifications quickly.]]) ..
408 paragraphdivider() ..376 li(_[[Set the target quantity for marble columns to 20 and wait for your stonemason to produce them.]])
409 listitem_bullet(_[[Set the target quantity for marble columns to 20 and wait for your stonemason to produce them.]])
410 ),377 ),
411 obj_name = "produce_marble_columns",378 obj_name = "produce_marble_columns",
412 obj_title = _"Produce 20 marble columns.",379 obj_title = _"Produce 20 marble columns.",
413 obj_body = rt(380 obj_body = (
414 p(_[[Sometimes, you will need many wares at the same time quickly – faster than they can be produced. In this case, it is good to have enough on reserve.]]) ..381 p(_[[Sometimes, you will need many wares at the same time quickly – faster than they can be produced. In this case, it is good to have enough on reserve.]]) ..
415 paragraphdivider() ..382 li(_[[To be prepared for additional fortifications, you should produce 20 marble columns.]]) ..
416 listitem_bullet(_[[To be prepared for additional fortifications, you should produce 20 marble columns.]]) ..383 li_arrow(_[[Your stonemason will not produce marble columns when they are not needed. You have to increase the target quantity.]]) ..
417 listitem_arrow(_[[Your stonemason will not produce marble columns when they are not needed. You have to increase the target quantity.]]) ..384 li_arrow(_[[To do so, click on any flag and choose ‘Configure economy’. In this menu window, you can decide how many wares of each type you wish to have in stock.]])
418 listitem_arrow(_[[To do so, click on any flag and choose ‘Configure economy’. In this menu window, you can decide how many wares of each type you wish to have in stock.]])
419 )385 )
420}386}
421387
@@ -423,34 +389,32 @@
423 field = warehouse_field,389 field = warehouse_field,
424 position = "topright",390 position = "topright",
425 title = _"Warehouse Preferences",391 title = _"Warehouse Preferences",
426 body = rt(392 body = (
427 h1(_[[Bring the marble columns to the front line]]) ..393 h1(_[[Bring the marble columns to the front line]]) ..
428 p(_[[The production of marble columns is working fine now, but it would be great if they were stored where we need them.]]) ..394 p(_[[The production of marble columns is working fine now, but it would be great if they were stored where we need them.]]) ..
429 p(_[[Normally, produced wares are brought to the closest warehouse if they are not needed elsewhere. In this case, this means our headquarters. But we would like to have them in the warehouse near our fortresses.]]) ..395 p(_[[Normally, produced wares are brought to the closest warehouse if they are not needed elsewhere. In this case, this means our headquarters. But we would like to have them in the warehouse near our fortresses.]]) ..
430 p(_[[Every warehouse has four buttons to set the preference. If you move your mouse pointer over them, you will see tooltips that explain what the buttons do.]]) ..396 p(_[[Every warehouse has four buttons to set the preference. If you move your mouse pointer over them, you will see tooltips that explain what the buttons do.]]) ..
431 paragraphdivider() ..397 li(_[[Bring all the marble columns to the warehouse near the front line.]]) ..
432 listitem_bullet(_[[Bring all the marble columns to the warehouse near the front line.]]) ..398 li_arrow(_[[To achieve this, you will have to do two things. First, set a preference for marble columns in the desired warehouse. All marble columns produced in the future will be brought there if possible.]]) ..
433 listitem_arrow(_[[To achieve this, you will have to do two things. First, set a preference for marble columns in the desired warehouse. All marble columns produced in the future will be brought there if possible.]]) ..399 li_arrow(_[[Then, to move the marble columns out of your headquarters, you will have to click on the remove button there.]])
434 listitem_arrow(_[[Then, to move the marble columns out of your headquarters, you will have to click on the remove button there.]])
435 ),400 ),
436 obj_name = "bring_marble_columns_to_front",401 obj_name = "bring_marble_columns_to_front",
437 obj_title = _"Bring 20 marble columns to the front line.",402 obj_title = _"Bring 20 marble columns to the front line.",
438 obj_body = economy_settings3.obj_body .. rt(403 obj_body = economy_settings3.obj_body .. (
439 p(_[[To decide where your wares get stored, you can use the preference buttons in the warehouses.]]) ..404 p(_[[To decide where your wares get stored, you can use the preference buttons in the warehouses.]]) ..
440 listitem_bullet(_[[Bring all the marble columns to the warehouse near the front line.]]) ..405 li(_[[Bring all the marble columns to the warehouse near the front line.]]) ..
441 listitem_arrow(_[[To achieve this, you will have to do two things. First, set a preference for marble columns in the desired warehouse. All marble columns produced in the future will be brought there if possible.]]) ..406 li_arrow(_[[To achieve this, you will have to do two things. First, set a preference for marble columns in the desired warehouse. All marble columns produced in the future will be brought there if possible.]]) ..
442 listitem_arrow(_[[Then, to move the marble columns out of your headquarters, you will have to click on the remove button there.]])407 li_arrow(_[[Then, to move the marble columns out of your headquarters, you will have to click on the remove button there.]])
443 )408 )
444}409}
445410
446conclusion = {411conclusion = {
447 title = _"Borders Secured",412 title = _"Borders Secured",
448 body = rt(413 body =
449 h1(_[[We’re safe now]]) ..414 h1(_[[We’re safe now]]) ..
450 p(_[[Great. We now have enough marble columns so that in case of an aggressor, we can build up our fortifications. But I do not think that that will be necessary. So far, no enemy has shown up.]]) ..415 p(_[[Great. We now have enough marble columns so that in case of an aggressor, we can build up our fortifications. But I do not think that that will be necessary. So far, no enemy has shown up.]]) ..
451 p(_[[I hope I could teach you how you can control the economy in Widelands. There are many options and they can be confusing at first. Even if you’ve only understood a few concepts, you mustn’t give up. Try them out in some games, become familiar with them and experience the possibilities. Then, return to this tutorial and learn the rest!]]) ..416 p(_[[I hope I could teach you how you can control the economy in Widelands. There are many options and they can be confusing at first. Even if you’ve only understood a few concepts, you mustn’t give up. Try them out in some games, become familiar with them and experience the possibilities. Then, return to this tutorial and learn the rest!]]) ..
452 p([[]]) ..417 p([[]]) ..
453 p(_[[This was the last tutorial I had prepared for you. I’ve now taught you everything I know. There are still secrets hidden in this world even I don’t know about. I will now search for a quiet place to spend my sunset years. If you have still questions, the Widelands community will surely help you. You can find it at:]])418 p(_[[This was the last tutorial I had prepared for you. I’ve now taught you everything I know. There are still secrets hidden in this world even I don’t know about. I will now search for a quiet place to spend my sunset years. If you have still questions, the Widelands community will surely help you. You can find it at:]]) ..
454 ) ..419 h1(p("align=center", u("widelands.org")))
455 rt("text-align=center", "<p font-size=24 font-decoration=underline>http://www.widelands.org</p>")
456}420}
457421
=== modified file 'data/scripting/richtext.lua'
--- data/scripting/richtext.lua 2018-01-07 18:04:57 +0000
+++ data/scripting/richtext.lua 2018-01-20 11:37:48 +0000
@@ -442,3 +442,19 @@
442 div("width=100%", font("size=13 color=D1D1D1", header .. " ") ..442 div("width=100%", font("size=13 color=D1D1D1", header .. " ") ..
443 font("size=12", text))443 font("size=12", text))
444end444end
445
446-- RST
447-- .. function:: join_sentences(sentence1, sentence2)
448--
449-- Joins 2 sentences together. Use this rather than manually concatenating
450-- a blank space, because some languages don't use blank spaces.
451--
452-- :arg sentence1: text of the first sentence
453-- :arg sentence2: text of the second sentence
454-- :returns: two concatenated sentences with a localized sentence joiner.
455--
456function join_sentences(sentence1, sentence2)
457 -- TRANSLATORS: Put 2 sentences one after the other.
458 -- TRANSLATORS: Languages using Chinese script probably want to lose the blank space here.
459 return pgettext("sentence_separator", "%s %s"):bformat(sentence1, sentence2)
460end

Subscribers

People subscribed via source and target branches

to status/vote changes: